mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
2fd149a582
---------------------- ./MANIFEST ./configure.in ./configure ./Makefile.in ./bin/distdep [NEW] ./config/conclude.in ./config/depend.in ./src/.distdep [NEW] ./test/.distdep [NEW] Added some code so non-GNU systems have a list of dependencies between the .c files and the .h files. Hopefully this works and y'all don't have to keep saying `make clean' each time you change a header. On systems with GNU make, GCC, and Perl, the dependency information is generated automatically from rules in config/depend.in as has always been done. But now extra files called `.distdep' (for `distributable dependencies) are left in each directory and these are part of CVS and thus releases. (A `make dep' will create dependencies on demand without doing anything else.) On systems lacking one or more of the tools above, the various `.distdep' files are inserted into the end of the Makefiles. If you do developement on one of these systems you'll have to update the `.distdep' and/or Makefile by hand, or wait until you have access to a GNU system and do a `make dep'.
38 lines
1.4 KiB
Makefile
38 lines
1.4 KiB
Makefile
# -*- makefile -*-
|
|
|
|
# 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.
|
|
#
|
|
.PRECIOUS: .depend .distdep
|
|
dep depend: .distdep
|
|
|
|
.distdep: .depend
|
|
touch .distdep
|
|
-perl -p $(ROOT)/bin/distdep .depend >.distdep
|
|
|
|
.depend: $(LIB_SRC) $(PROG_SRC)
|
|
@touch .depend
|
|
@for dep in $? dummy; do \
|
|
if [ $$dep != "dummy" ]; then \
|
|
echo Building dependencies for $$dep; \
|
|
obj=`echo $$dep | sed 's/\.c/\\\\.o/'`; \
|
|
sed "/$$obj/,/[^\\]$$/d" <$@ >$@- && mv $@- $@; \
|
|
$(CC) -M -MG $(CPPFLAGS) $$dep >>$@; \
|
|
fi; \
|
|
done;
|
|
-perl -p $(ROOT)/bin/distdep .depend >.distdep
|
|
|
|
-include .depend
|
|
|