mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
f2caef690b
Fix Irix pmake bugs Description: Build fails on Irix when builddir != srcdir Solution: * acconfig.h * src/H5config.h.in [REGENERATED] Added definition for HAVE_STREAM * config/conclude.in * config/depend1.in * config/depend2.in * config/depend3.in * config/depend4.in The `Dependencies' file is located in the source tree. This fixes bugs for Irix pmake when compiling outside the source tree. Hopefully it still preserves Albert's changes which allow concurrent compilations to not stomp on each other's Dependencies files. * examples/Dependencies [REGENERATED] * src/Dependencies [REGENERATED] * test/Dependencies [REGENERATED] * tools/Dependencies [REGENERATED] Regenerated for testing purposes. Platforms: i686-pc-linux mips-sgi-irix6.5 sparc-sun-solaris2.6
51 lines
2.3 KiB
Makefile
51 lines
2.3 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.
|
|
##
|
|
## 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.
|
|
##
|
|
$(srcdir)/Dependencies: .depend
|
|
@if test "$(srcdir)" != "."; then \
|
|
echo '## This file is machine generated on GNU systems.' >$@; \
|
|
echo '## Only temporary changes may be made here.' >>$@; \
|
|
echo >>$@; \
|
|
perl -p $(top_srcdir)/bin/distdep .depend >>$@; \
|
|
else \
|
|
echo 'Dependencies cannot be built when $$srcdir == $$builddir'; \
|
|
fi
|
|
|
|
.depend: $(LIB_SRC) $(TEST_SRC) $(PROG_SRC)
|
|
@touch .depend
|
|
@for dep in $? dummy; do \
|
|
if [ $$dep != "dummy" ]; then \
|
|
echo Building dependencies for $$dep; \
|
|
obj=`basename $$dep .c`.lo; \
|
|
sed '\%^'"$$obj"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \
|
|
$(TRACE) $$dep; \
|
|
$(CC) -M -MG $(CPPFLAGS) $$dep 2>/dev/null | \
|
|
sed 's% $(srcdir)/% $$(srcdir)/%g' | \
|
|
sed 's% $(top_srcdir)/% $$(top_srcdir)/%g' | \
|
|
sed 's% $(top_builddir)/% $$(top_builddir)/%g' | \
|
|
sed 's/\.o/.lo/' >>$@; \
|
|
fi; \
|
|
done;
|
|
|
|
-include .depend
|
|
|