Skip to content
Snippets Groups Projects
Commit f1becf12 authored by Fred Wright's avatar Fred Wright Committed by Christopher Nielsen
Browse files

Makefile: Fix superfluous library rebuilds.

The fix for parallel builds made directories separate targets, but
directory dependencies need to be order-only, since their mtimes are
updated whenever files are added, removed, or renamed.  Failure to do
this resulted in intermittent unnecessary rebuilds of libraries when
building tests.  When building directly in the repo, this is a
harmless waste of time, but when building in the MacPorts context,
such rebuilds fail due to ownership and permission issues.  This
change makes directories order-only dependencies, thereby ignoring
their mtimes.

This also removes unnecessary directory dependencies from the tests
that don't use the library.

TESTED:
Ran tests on all platforms.  Intermittent test failures are now gone.
parent 295b94ae
Branches
Tags rim-only
No related merge requests found
...@@ -328,14 +328,14 @@ $(SOBJLIST): $(ALLSLIBOBJS) ...@@ -328,14 +328,14 @@ $(SOBJLIST): $(ALLSLIBOBJS)
$(BUILDLIBDIR) $(DESTDIR)$(LIBDIR): $(BUILDLIBDIR) $(DESTDIR)$(LIBDIR):
$(MKINSTALLDIRS) $@ $(MKINSTALLDIRS) $@
$(BUILDDLIBPATH): $(ALLDLIBOBJS) $(BUILDLIBDIR) $(BUILDDLIBPATH): $(ALLDLIBOBJS) | $(BUILDLIBDIR)
$(CC) $(BUILDDLIBFLAGS) $(ALLLDFLAGS) $(ALLDLIBOBJS) -o $@ $(CC) $(BUILDDLIBFLAGS) $(ALLLDFLAGS) $(ALLDLIBOBJS) -o $@
$(BUILDSYSLIBPATH): $(ALLSYSLIBOBJS) $(BUILDLIBDIR) $(BUILDSYSLIBPATH): $(ALLSYSLIBOBJS) | $(BUILDLIBDIR)
$(CC) $(BUILDSYSLIBFLAGS) $(ALLLDFLAGS) $(SYSREEXPORTFLAG) \ $(CC) $(BUILDSYSLIBFLAGS) $(ALLLDFLAGS) $(SYSREEXPORTFLAG) \
$(ALLSYSLIBOBJS) -o $@ $(ALLSYSLIBOBJS) -o $@
$(BUILDSLIBPATH): $(SOBJLIST) $(BUILDLIBDIR) $(BUILDSLIBPATH): $(SOBJLIST) | $(BUILDLIBDIR)
$(RM) $@ $(RM) $@
$(AR) $(BUILDSLIBFLAGS) $@ $$(cat $<) $(AR) $(BUILDSLIBFLAGS) $@ $$(cat $<)
...@@ -367,7 +367,7 @@ $(XTESTOBJS_C): %.o: %.c $(ALLHEADERS) ...@@ -367,7 +367,7 @@ $(XTESTOBJS_C): %.o: %.c $(ALLHEADERS)
$(CC) -c -std=c99 -fno-builtin -I$(SRCINCDIR) $(CFLAGS) $< -o $@ $(CC) -c -std=c99 -fno-builtin -I$(SRCINCDIR) $(CFLAGS) $< -o $@
# The xtests don't require the library # The xtests don't require the library
$(XTESTPRGS_C): %: %.o $(BUILDLIBDIR) $(XTESTPRGS_C): %: %.o
$(CC) $(XTESTLDFLAGS) $< -o $@ $(CC) $(XTESTLDFLAGS) $< -o $@
# The "darwin_c" tests need the -fno-builtin option with some compilers. # The "darwin_c" tests need the -fno-builtin option with some compilers.
...@@ -376,7 +376,7 @@ $(MANTESTOBJS_C): %.o: %.c $(ALLHEADERS) ...@@ -376,7 +376,7 @@ $(MANTESTOBJS_C): %.o: %.c $(ALLHEADERS)
$(CC) -c -std=c99 -fno-builtin -I$(SRCINCDIR) $(CFLAGS) $< -o $@ $(CC) -c -std=c99 -fno-builtin -I$(SRCINCDIR) $(CFLAGS) $< -o $@
# Currently, the manual C tests don't require the library # Currently, the manual C tests don't require the library
$(MANTESTPRGS_C): %: %.o $(BUILDLIBDIR) $(MANTESTPRGS_C): %: %.o
$(CC) $(MANTESTLDFLAGS) $< -o $@ $(CC) $(MANTESTLDFLAGS) $< -o $@
# But the manual C++ tests *do* require the library # But the manual C++ tests *do* require the library
...@@ -471,15 +471,15 @@ install-headers: ...@@ -471,15 +471,15 @@ install-headers:
install-lib: install-dlib install-slib install-syslib install-lib: install-dlib install-slib install-syslib
install-dlib: $(BUILDDLIBPATH) $(DESTDIR)$(LIBDIR) install-dlib: $(BUILDDLIBPATH) | $(DESTDIR)$(LIBDIR)
$(INSTALL_PROGRAM) $(BUILDDLIBPATH) $(DESTDIR)$(LIBDIR) $(INSTALL_PROGRAM) $(BUILDDLIBPATH) $(DESTDIR)$(LIBDIR)
$(POSTINSTALL) -id $(DLIBPATH) $(DESTDIR)$(DLIBPATH) $(POSTINSTALL) -id $(DLIBPATH) $(DESTDIR)$(DLIBPATH)
install-syslib: $(BUILDSYSLIBPATH) $(DESTDIR)$(LIBDIR) install-syslib: $(BUILDSYSLIBPATH) | $(DESTDIR)$(LIBDIR)
$(INSTALL_PROGRAM) $(BUILDSYSLIBPATH) $(DESTDIR)$(LIBDIR) $(INSTALL_PROGRAM) $(BUILDSYSLIBPATH) $(DESTDIR)$(LIBDIR)
$(POSTINSTALL) -id $(SYSLIBPATH) $(DESTDIR)$(SYSLIBPATH) $(POSTINSTALL) -id $(SYSLIBPATH) $(DESTDIR)$(SYSLIBPATH)
install-slib: $(BUILDSLIBPATH) $(DESTDIR)$(LIBDIR) install-slib: $(BUILDSLIBPATH) | $(DESTDIR)$(LIBDIR)
$(INSTALL_DATA) $(BUILDSLIBPATH) $(DESTDIR)$(LIBDIR) $(INSTALL_DATA) $(BUILDSLIBPATH) $(DESTDIR)$(LIBDIR)
install-tiger: $(TIGERBINS) install-tiger: $(TIGERBINS)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment