1999-07-20 03:56:57 +08:00
|
|
|
## -*- makefile -*-
|
1997-08-16 00:40:24 +08:00
|
|
|
|
1999-07-20 03:56:57 +08:00
|
|
|
## We keep a list of dependencies in `.depend' for each of the source
|
|
|
|
## files on which it depends. When one of the source files is modified
|
|
|
|
## we remove its record from .depend and regenerate its dependencies,
|
|
|
|
## tacking them onto the end of .depend. By including the .depend file
|
|
|
|
## into the makefile, we're telling make that the makefile depends on
|
|
|
|
## the dependency list in the .depend file.
|
|
|
|
##
|
|
|
|
## This is as fast as the `.d' method described in the GNU make manual
|
|
|
|
## for automatic dependencies, but has the added advantage that all
|
|
|
|
## dependencies are stored in one place. The advantage over the
|
|
|
|
## `makedepend' program is that only those files that are out of date
|
|
|
|
## have dependency information rebuilt, and the Makefile is not
|
|
|
|
## modified.
|
|
|
|
##
|
|
|
|
## This is also where tracing information is updated. The $(TRACE)
|
|
|
|
## program is run on each source file to make sure that the H5TRACE()
|
|
|
|
## macros are up to date. If they are then the file is not modified,
|
|
|
|
## otherwise the file is changed and a backup is saved by appending a
|
|
|
|
## tilde to the file name.
|
|
|
|
##
|
2000-01-26 22:50:12 +08:00
|
|
|
.PRECIOUS: Dependencies
|
|
|
|
Dependencies: .depend
|
1999-11-04 02:05:58 +08:00
|
|
|
@if test "$(srcdir)" != "."; then \
|
|
|
|
echo '## This file is machine generated on GNU systems.' \
|
|
|
|
>$@; \
|
|
|
|
echo '## Only temporary changes may be made here.' \
|
|
|
|
>>$@; \
|
2000-01-26 22:50:12 +08:00
|
|
|
echo >>$@; \
|
1999-11-04 02:05:58 +08:00
|
|
|
perl -p $(top_srcdir)/bin/distdep .depend >>$@; \
|
|
|
|
fi
|
1997-08-16 00:40:24 +08:00
|
|
|
|
1999-11-01 23:21:16 +08:00
|
|
|
.PRECIOUS: .depend
|
1998-07-13 23:35:21 +08:00
|
|
|
.depend: $(LIB_SRC) $(TEST_SRC) $(PROG_SRC)
|
1997-08-16 00:40:24 +08:00
|
|
|
@touch .depend
|
|
|
|
@for dep in $? dummy; do \
|
|
|
|
if [ $$dep != "dummy" ]; then \
|
|
|
|
echo Building dependencies for $$dep; \
|
1999-11-24 03:35:49 +08:00
|
|
|
obj=`basename $$dep .c`.lo; \
|
|
|
|
sed '\%^'"$$obj"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \
|
[svn-r429] Changes since 19980616
----------------------
./html/tracing.html NEW
This entire update is to make it possible for the library to
print the name, arguments, and return value of every API call
without requiring any extra work from developers or app
programmers. This file describes how this all works.
./configure.in
Added the `--enable-tracing' switch. If you use it then the
library will include code to print API function names,
argument names and values, and function return values.
However, you must then turn on the tracing by setting the
HDF5_TRACE environment variable to a file descriptor number.
The default is `--disable-tracing' since enabling it causes a
slight increase in library size and a slowdown resulting from
an extra function call for each API function call (I couldn't
even measure the slowdown :-)
./bin/trace NEW
A perl script that synchronizes the H5TRACE() macro calls in
the *.c files with the function return type and formal
argument names and types. If you use GNU make and gcc then
this will be done automatically, otherwise just invoke this
script with the names of one or more .c files. You could do
it by hand to, but encoding argument types is a little tricky
at first.
./config/commence.in
Added the $(TRACE) macro, which defaults to the no-op.
Added -D_POSIX_SOURCE to the compiler command line.
./src/Makefile.in
Override the default for $(TRACE).
./config/depend.in
Automatically calls $(TRACE) to synchronize the H5TRACE()
macros in any source file that changed. As with makefile
dependencies, one way to force synchronization of all files is
to remove the `.depend' file.
./MANIFEST
Added new files.
./src/H5Eprivate.h
Modified HRETURN_ERROR() and HRETURN() for tracing.
./src/H5.c
./src/H5private.h
This is where the real tracing work really happens, in
H5_trace().
./src/H5A.c
./src/H5D.c
./src/H5G.c
./src/H5P.c
./src/H5S.c
./src/H5Z.c
Added H5TRACE() calls to all API functions. You don't really
need these changes if you don't want to merge your stuff
because they can be generated automatically by going to the
hdf5/src directory and saying ../bin/trace *.c
./src/H5T.c
Added H5TRACE() calls. Other stuff below.
./src/H5E.c
./src/H5Epublic.h
Added H5TRACE() calls. Created a type H5E_auto_t for the
`func' argument of H5Eset_auto() and H5Eget_auto() to make
those arguments easier to parse for tracing. It should also
make it clearer for users that don't know how to read
complicated ANSI data types.
./src/H5F.c
Added H5TRACE() calls. Changed a couple `uintn' argument
types in API functions to `unsigned int' since `uintn' part of
the API. Changed a few "can't" and "cant" error messages to
"unable to".
./src/H5Ipublic.h
Removed H5_DIRECTORY from the H5I_group_t enum. It wasn't
used anywhere.
./src/H5Tconv.c
Removed an unused label.
./src/H5Fistore.c
./src/H5Oattr.c
./src/H5Odtype.c
./src/H5T.c
./test/dsets.c
./test/dtypes.c
Fixed a warning about a variable possibly used before it's
initialized. Added __unused__ to turn off some unused
argument warnings that pop up when debugging is turned off and
optimizations are turned on.
1998-06-18 04:46:29 +08:00
|
|
|
$(TRACE) $$dep; \
|
1999-08-11 04:21:32 +08:00
|
|
|
$(CC) -M -MG $(CPPFLAGS) $$dep 2>/dev/null | \
|
1999-11-03 01:29:33 +08:00
|
|
|
sed 's% $(srcdir)/% $$(srcdir)/%g' | \
|
|
|
|
sed 's% $(top_srcdir)/% $$(top_srcdir)/%g' | \
|
|
|
|
sed 's% $(top_builddir)/% $$(top_builddir)/%g' | \
|
1999-08-11 04:21:32 +08:00
|
|
|
sed 's/\.o/.lo/' >>$@; \
|
1997-08-16 00:40:24 +08:00
|
|
|
fi; \
|
1998-03-19 02:09:16 +08:00
|
|
|
done;
|
1999-11-04 02:05:58 +08:00
|
|
|
@if test "$(srcdir)" != "."; then \
|
|
|
|
echo '## This file is machine generated on GNU systems.' \
|
2000-01-26 22:50:12 +08:00
|
|
|
>Dependencies; \
|
1999-11-04 02:05:58 +08:00
|
|
|
echo '## Only temporary changes may be made here.' \
|
2000-01-26 22:50:12 +08:00
|
|
|
>>Dependencies; \
|
|
|
|
echo >>Dependencies; \
|
|
|
|
perl -p $(top_srcdir)/bin/distdep .depend>>Dependencies;\
|
1999-11-04 02:05:58 +08:00
|
|
|
fi
|
1997-08-16 00:40:24 +08:00
|
|
|
|
|
|
|
-include .depend
|
1997-08-29 00:36:57 +08:00
|
|
|
|