Skip to content

Commit 5e3502e

Browse files
committed
Prepare for integration with main Starlink build
- dat_par.h is now static - Library change to libhds_v5 to match v4 scheme - Now build with _v5 API symbols by default
1 parent 4adf4be commit 5e3502e

13 files changed

+1382
-479
lines changed

.gitignore

+3-6
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,11 @@ autom4te.cache
77
aclocal.m4
88
.deps
99
.libs
10-
*_ERR
1110
*_err.h
12-
DAT_PAR
13-
dat_par.h
14-
dat_par_h
15-
dat_par_f
1611
hdsTest
1712
*.log
1813
*.trs
19-
hds_ctest.h5sdf
14+
hds_ctest.sdf
2015
build-aux
2116
configure
2217
config.h
@@ -28,3 +23,5 @@ starconf.status
2823
config.status
2924
libtool
3025
componentinfo.dtd
26+
fac_200_err
27+
hds_types.h

Makefile.am

+13-60
Original file line numberDiff line numberDiff line change
@@ -2,85 +2,54 @@
22

33
## bin_PROGRAMS = hdsdump
44
## dist_bin_SCRIPTS = hds_link hds_link_adam
5-
noinst_PROGRAMS = dat_par_f dat_par_h make-hds-types
6-
## starhelp_DATA = hds_machine.txt
7-
8-
AM_CFLAGS = -g -O0
5+
noinst_PROGRAMS = make-hds-types
96

107
# libhdsf is for fortran interface
11-
lib_LTLIBRARIES = libhdsh5.la
8+
lib_LTLIBRARIES = libhds_v5.la
129

1310
TESTS = hdsTest
1411
check_PROGRAMS = hdsTest
1512

16-
libhdsh5_la_SOURCES = \
13+
libhds_v5_la_SOURCES = \
1714
$(PUBLIC_INCLUDES) \
1815
$(PUBLIC_CINCLUDES) \
1916
$(include_MESSAGES) \
2017
$(PRIVATE_INCLUDES) \
2118
$(C_ROUTINES)
2219

23-
libhdsh5_la_LIBADD = `starmem_link` `ems_link`
24-
25-
##libhdsf_la_SOURCES = \
26-
## $(F_ROUTINES) \
27-
## $(F_C_ROUTINES) \
28-
## $(BLOCK_DATA_FILES)
29-
30-
##libhdsf_la_LIBADD = `ems_link`
20+
libhds_v5_la_LIBADD = `starmem_link` `ems_link` `one_link` -lhdf5 -lhdf5_hl
3121

3222
# Make all library code position independent. This is handy for creating
3323
# shareable libraries from the static ones (Java JNI libraries).
3424
if !NOPIC
35-
libhdsh5_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
36-
libhdsh5_la_FCFLAGS = $(AM_FCFLAGS) -prefer-pic
37-
libhdsf_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
38-
libhdsf_la_FCFLAGS = $(AM_FCFLAGS) -prefer-pic
25+
libhds_v5_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
3926
endif
4027

41-
## hds_machine_SOURCES = hds_machine.c
42-
## hds_machine_LDADD = libhds.la `ems_link` `cnf_link` `starmem_link`
43-
44-
dat_par_h_SOURCES = dat_par_h.c
45-
dat_par_f_SOURCES = dat_par_f.c
4628
make_hds_types_SOURCES = make-hds-types.c
4729

48-
## hdsdump_SOURCES = hds_dev/hdsdump.c
49-
## hdsdump_LDADD = libhds.la `ems_link` `cnf_link` `starmem_link`
50-
51-
# Try to make sure that hds_types.h is built early
52-
# This does not seem to work right in conjunction with BUILT_SOURCES
53-
dat_par_f_DEPENDENCIES = hds_types.h hds1_types.h
54-
dat_par_h_DEPENDENCIES = hds_types.h hds1_types.h dat1.h
55-
56-
## hds_test_SOURCES = hds_test.f
57-
## hds_test_LDADD = libhdsf.la libhds.la `ems_link` `chr_link` `cnf_link`
58-
5930
hdsTest_SOURCES = hdsTest.c
60-
hdsTest_LDADD = libhdsh5.la `ems_link` `one_link`
31+
hdsTest_LDADD = libhds_v5.la
6132

6233
## hds_test_prm_SOURCES = hds_test_prm.c
6334
## hds_test_prm_LDADD = libhds.la `ems_link` `cnf_link` `cnf_link`
6435

6536
cincludedir = $(includedir)/star
6637
cinclude_HEADERS = $(PUBLIC_CINCLUDES)
6738
include_HEADERS = $(PUBLIC_INCLUDES)
68-
include_MESSAGES = CMP_ERR DAT_ERR dat_err.h
69-
70-
## stardocs_DATA = @STAR_LATEX_DOCUMENTATION@
39+
noinst_MESSAGES = dat_err.h
7140

7241
# dat_par.h was previously released so must go in the root include dir
73-
PUBLIC_CINCLUDES = hds.h hds_types.h hds_fortran.h
74-
PUBLIC_INCLUDES = DAT_PAR dat_par.h
42+
PUBLIC_CINCLUDES = hds_v5.h hds_types.h
7543

7644
PRIVATE_INCLUDES = \
45+
hds_h dat_par.h
7746
hds1_types.h \
7847
dat1.h \
7948
$(noinst_MESSAGES)
8049

8150
C_ROUTINES = \
8251
$(PUBLIC_C_ROUTINES) \
83-
$(PRIVATE_C_ROUTINES) $(F_C_ROUTINES)
52+
$(PRIVATE_C_ROUTINES)
8453

8554
PUBLIC_C_ROUTINES = \
8655
datAlter.c \
@@ -192,37 +161,21 @@ dau1CheckType.c \
192161
dau1HdsType.c \
193162
dau1Native2MemType.c
194163

195-
F_C_ROUTINES = \
196-
fortran_interface.c \
197-
hdsDimC2F.c \
198-
hdsDimF2C.c
199-
200-
DAT_PAR: dat_par_f$(EXEEXT)
201-
./dat_par_f > DAT_PAR
202-
203-
dat_par.h: dat_par_h$(EXEEXT)
204-
./dat_par_h > dat_par.h
205-
206164
hds_types.h: make-hds-types$(EXEEXT)
207165
./make-hds-types
208166

209167
hds1_types.h: make-hds-types$(EXEEXT)
210168
./make-hds-types
211169

212-
#hds_machine.txt: hds_machine$(EXEEXT)
213-
# echo "Machine characteristics, as determined by HDS" >$@
214-
# echo "" >>$@
215-
# ./hds_machine >>$@
216-
217170
# Have to make sure that hds_types appears before DAT_PAR so that
218171
# the include file generation routines are built in the correct order
219172
BUILT_SOURCES = hds_types.h hds1_types.h \
220-
$(include_MESSAGES) $(noinst_MESSAGES) DAT_PAR dat_par.h
173+
$(include_MESSAGES) $(noinst_MESSAGES)
221174

222-
CLEANFILES = DAT_PAR dat_par.h CMP_ERR DAT_ERR dat_err.h \
175+
CLEANFILES = dat_err.h \
223176
hds_types.h hds1_types.h
224177

225178
## dist_starnews_DATA = hds.news
226179

227-
EXTRA_DIST = cmp_err.msg dat_err.msg
180+
EXTRA_DIST = dat_err.msg
228181

cmp_err.msg

-13
This file was deleted.

component.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!DOCTYPE component SYSTEM "componentinfo.dtd">
33
<!-- component.xml. Generated from component.xml.in by configure. -->
44

5-
<component id="hdsonhdf5" support="S">
5+
<component id="hds-v5" support="S">
66
<version>5.1-1</version>
7-
<path>libraries/hdsonhdf5</path>
7+
<path>libext/hds-v5</path>
88
<description>Hierarchical Data System layered on HDF5</description>
99
<abstract>
1010
<p>HDS is a file-based hierarchical data system designed for the
@@ -28,15 +28,15 @@
2828
software.</p>
2929
</abstract>
3030
<dependencies >
31-
<build>sae</build><build>chr</build><build>cnf</build><build>ems</build><build>one</build><build>prm</build><build>starmem</build><link>chr</link><link>cnf</link><link>ems</link><link>one</link><link>starmem</link><test>chr</test><test>cnf</test><test>ems</test><test>prm</test><test>starmem</test><sourceset>star2html</sourceset><sourceset>messgen</sourceset>
31+
<build>sae</build><build>chr</build><build>cnf</build><build>ems</build><build>one</build><build>prm</build><build>starmem</build><link>chr</link><link>cnf</link><link>ems</link><link>one</link><link>starmem</link><link>one</link><test>chr</test><test>cnf</test><test>ems</test><test>prm</test><test>starmem</test><sourceset>messgen</sourceset>
3232
</dependencies>
3333
<developers>
3434
<person>
3535
<name>Tim Jenness</name>
3636
<role>owner</role>
3737
</person>
3838
</developers>
39-
<documentation> sun92</documentation>
39+
<documentation></documentation>
4040
<bugreports>starlink@jiscmail.ac.uk</bugreports>
4141
<!-- <notes><p></p></notes> -->
4242
</component>

component.xml.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<component id="@PACKAGE@" support="S">
66
<version>@PACKAGE_VERSION@</version>
7-
<path>libraries/hdsonhdf5</path>
7+
<path>libext/hds-v5</path>
88
<description>Hierarchical Data System layered on HDF5</description>
99
<abstract>
1010
<p>HDS is a file-based hierarchical data system designed for the

configure.ac

+3-18
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script
22
AC_REVISION($Revision$)
33

44
dnl Initialisation: package name and version number
5-
AC_INIT([hdsonhdf5],[5.1-1],[starlink@jiscmail.ac.uk])
5+
AC_INIT([hds-v5],[5.1-1],[starlink@jiscmail.ac.uk])
66
AC_CONFIG_AUX_DIR([build-aux])
77

88
dnl Require autoconf-2.50 at least
@@ -17,15 +17,6 @@ AC_CONFIG_SRCDIR([hdsTest.c])
1717
dnl Include defaults for Starlink configurations
1818
STAR_DEFAULTS
1919

20-
dnl Define _POSIX_C_SOURCE to be used in all routines. This was
21-
dnl declared in the old header file "hds1_feature.h", but we need
22-
dnl to make sure all feature-level defines are included in the autoconf
23-
dnl tests (this is important for large file support under Solaris, which
24-
dnl does not define _LARGEFILE_SOURCE without _POSIX_C_SOURCE).
25-
AC_DEFINE([_POSIX_C_SOURCE], [200112L], [Specify the version of the POSIX
26-
standard we want to work with (should provide POSIX.1, POSIX.2 and POSIX.4,
27-
if available)])
28-
2920
dnl Find required versions of the programs we need for configuration
3021
AC_PROG_CC
3122
AC_PROG_FC
@@ -45,8 +36,6 @@ dnl by operating system
4536
AC_HEADER_STDC
4637
AC_CHECK_HEADERS(stddef.h)
4738
AC_CHECK_HEADERS(unistd.h)
48-
AC_CHECK_HEADERS([sys/param.h])
49-
AC_CHECK_HEADERS(inttypes.h)
5039

5140
dnl Check for largefile support (various macros and fseeko).
5241
dnl Make sure we don't use the cached version for this (can
@@ -67,17 +56,13 @@ AC_CHECK_SIZEOF(size_t)
6756

6857
dnl Declare the build and use dependencies for this package
6958
STAR_DECLARE_DEPENDENCIES([build], [sae chr cnf ems one prm starmem])
70-
STAR_DECLARE_DEPENDENCIES([link], [chr cnf ems one starmem])
59+
STAR_DECLARE_DEPENDENCIES([link], [chr cnf ems one starmem one])
7160
STAR_DECLARE_DEPENDENCIES([test], [chr cnf ems prm starmem])
7261

73-
dnl List the sun/ssn/... numbers which document this package and
74-
dnl which are present as .tex files in this directory.
75-
STAR_LATEX_DOCUMENTATION(sun92)
76-
7762
dnl There are two .msg files in this directory, so we need to specify
7863
dnl the names of them explicitly, rather than them being defaulted from
7964
dnl the package name.
80-
STAR_MESSGEN([cmp_err.msg dat_err.msg])
65+
STAR_MESSGEN([dat_err.msg])
8166

8267
AM_CONFIG_HEADER(config.h)
8368

dat1.h

+1-13
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,7 @@ typedef enum {
103103

104104
/* Global Constants: */
105105
/* ================ */
106-
/* The following are "public" values. Copies are made available externally */
107-
/* in the dat_par.h and dat_par(.f) files. */
108-
#define DAT__MXDIM 7 /* Maximum number of object dimensions */
109-
#define DAT__NOLOC "<NOT A LOCATOR> "/* Null (invalid) locator value */
110-
#define DAT__NOWLD 0 /* Null wild-card search context */
111-
#define DAT__ROOT "<ROOT LOCATOR> "/* Root locator value */
112-
#define DAT__SZGRP 15 /* Size of group name */
113-
#define DAT__SZLOC 16 /* Size of Fortran locator string */
114-
#define DAT__SZMOD 15 /* Size of access mode string */
115-
#define DAT__SZNAM 15 /* Size of object name */
116-
#define DAT__SZTYP 15 /* Size of type string */
117-
#define DAT__FLEXT ".h5sdf" /* Default HDS file extension */
118-
#define DAT__SZFLX 6 /* Length of DAT__FLEXT */
106+
#include "dat_par.h"
119107

120108
/* Internal Constants */
121109
#define DAT__MXCHR 0xffff /* Max characters in a character data type */

dat_par.h

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
#if !defined( DAT_PAR_INCLUDED ) /* dat_par.h already included? */
2+
#define DAT_PAR_INCLUDED 1
3+
/*
4+
*+
5+
* Name:
6+
* dat_par.h
7+
8+
* Purpose:
9+
* Define public global constants for the dat_ and hds_ routines.
10+
11+
* Language:
12+
* ANSI C
13+
14+
* Type of Module:
15+
* Global constants (macro) include file.
16+
17+
* Description:
18+
* This file contains macro definitions for global constants which
19+
* are used by the dat_ and hds_ routines within the HDS package and
20+
* which may also be needed by software which calls these routines.
21+
22+
* Copyright:
23+
* Copyright (C) 1998 Central Laboratory of the Research Councils
24+
25+
* Authors:
26+
* Generated automatically by the dat_par_h program.
27+
* {enter_new_authors_here}
28+
29+
* History:
30+
* {enter_changes_here}
31+
32+
*-
33+
*/
34+
35+
/* Remove earlier definitions if clash with private dat1.h version */
36+
#ifdef DAT__MXDIM
37+
#undef DAT__MXDIM
38+
#endif
39+
#ifdef DAT__NOLOC
40+
#undef DAT__NOLOC
41+
#endif
42+
#ifdef DAT__NOWLD
43+
#undef DAT__NOWLD
44+
#endif
45+
#ifdef DAT__ROOT
46+
#undef DAT__ROOT
47+
#endif
48+
#ifdef DAT__SZGRP
49+
#undef DAT__SZGRP
50+
#endif
51+
#ifdef DAT__SZLOC
52+
#undef DAT__SZLOC
53+
#endif
54+
#ifdef DAT__SZMOD
55+
#undef DAT__SZMOD
56+
#endif
57+
#ifdef DAT__SZNAM
58+
#undef DAT__SZNAM
59+
#endif
60+
#ifdef DAT__SZTYP
61+
#undef DAT__SZTYP
62+
#endif
63+
#ifdef DAT__FLEXT
64+
#undef DAT__FLEXT
65+
#endif
66+
#ifdef DAT__SZFLX
67+
#undef DAT__SZFLX
68+
#endif
69+
70+
/* Global Constants: */
71+
72+
#define DAT__MXDIM 7 /* Maximum number of object dimensions */
73+
#define DAT__NOLOC "<NOT A LOCATOR> " /* Null (invalid) locator value */
74+
#define DAT__NOWLD 0 /* Null wild-card search context */
75+
#define DAT__ROOT "<ROOT LOCATOR> " /* Root locator value */
76+
#define DAT__SZGRP 15 /* Size of group name */
77+
#define DAT__SZLOC 16 /* Size of locator */
78+
#define DAT__SZMOD 15 /* Size of access mode string */
79+
#define DAT__SZNAM 15 /* Size of object name */
80+
#define DAT__SZTYP 15 /* Size of type string */
81+
#define DAT__SZFLX 4 /* Size of file extension DAT__FLEXT */
82+
#define DAT__FLEXT ".sdf" /* Default HDS file extension */
83+
84+
/*. */
85+
#endif

0 commit comments

Comments
 (0)