summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2020-01-15 20:16:48 +0100
committerNiels Möller <nisse@lysator.liu.se>2020-01-15 20:16:48 +0100
commit574272317865c07614706356e7062ca0b30e21c6 (patch)
tree15b968c7847ddf267d501cfe97dbd87c44d51968
parent0d1b423df26319088f2512b6314f6774132ccb82 (diff)
downloadnettle-574272317865c07614706356e7062ca0b30e21c6.tar.gz
Simplify dependency rules using GNU make -include.
* aclocal.m4 (DEP_INCLUDE): Delete substituted variable. * Makefile.in: Use the GNU make directive -include to include dependency .d files. Delete dependency files on make clean. * examples/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. Also use $(OBJEXT) properly. * tools/Makefile.in: Likewise. * configure.ac (dummy-dep-files): Delete these config commands.
-rw-r--r--ChangeLog12
-rw-r--r--Makefile.in4
-rw-r--r--aclocal.m47
-rw-r--r--configure.ac13
-rw-r--r--examples/Makefile.in4
-rw-r--r--testsuite/Makefile.in4
-rw-r--r--tools/Makefile.in4
7 files changed, 20 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index 4fc3d99f..75be32a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2020-01-15 Niels Möller <nisse@lysator.liu.se>
+
+ * aclocal.m4 (DEP_INCLUDE): Delete substituted variable.
+
+ * Makefile.in: Use the GNU make directive -include to include
+ dependency .d files. Delete dependency files on make clean.
+ * examples/Makefile.in: Likewise.
+ * testsuite/Makefile.in: Likewise. Also use $(OBJEXT) properly.
+ * tools/Makefile.in: Likewise.
+
+ * configure.ac (dummy-dep-files): Delete these config commands.
+
2020-01-10 Niels Möller <nisse@lysator.liu.se>
From Dmitry Eremin-Solenikov: Consistently rename ecc files and
diff --git a/Makefile.in b/Makefile.in
index 38160bb4..21d1c77d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -658,7 +658,7 @@ distcheck: dist
$(rm_distcheck)
clean-here:
- -rm -f $(TARGETS) *.$(OBJEXT) *.s *.so *.dll *.a \
+ -rm -f $(TARGETS) *.$(OBJEXT) *.$(OBJEXT).d *.s *.so *.dll *.a \
ecc-curve25519.h ecc-curve448.h \
ecc-secp192r1.h ecc-secp224r1.h ecc-secp256r1.h \
ecc-secp384r1.h ecc-secp521r1.h \
@@ -683,4 +683,4 @@ tags-here:
etags -o $(srcdir)/TAGS $(srcdir)/*.c $(srcdir)/*.h
DEP_FILES = $(SOURCES:.c=.$(OBJEXT).d)
-@DEP_INCLUDE@ $(DEP_FILES)
+-include $(DEP_FILES)
diff --git a/aclocal.m4 b/aclocal.m4
index 9b1ff6f4..df2d84de 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -456,13 +456,6 @@ if test x$enable_dependency_tracking = xyes ; then
fi
fi
-if test x$enable_dependency_tracking = xyes ; then
- DEP_INCLUDE='include '
-else
- DEP_INCLUDE='# '
-fi
-
-AC_SUBST([DEP_INCLUDE])
AC_SUBST([DEP_FLAGS])
AC_SUBST([DEP_PROCESS])])
diff --git a/configure.ac b/configure.ac
index 5e340d7a..09f719a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,19 +163,6 @@ GMP_PROG_EXEEXT_FOR_BUILD
LSH_DEPENDENCY_TRACKING
-if test x$enable_dependency_tracking = xyes ; then
- # Since the makefiles use include to get the dependency files, we must
- # make sure that the files exist. We generate some more files than are
- # actually needed.
-
- AC_CONFIG_COMMANDS([dummy-dep-files],
- [(cd "$srcdir" && find . '(' -name '*.c' -o -name '*.cxx' ')' -print) \
- | sed 's/\.cx*$//' | (while read f; do \
- test -f "$f.o.d" || echo > "$f.o.d"; \
- done)
-])
-fi
-
if test "x$enable_gcov" = "xyes"; then
CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs"
fi
diff --git a/examples/Makefile.in b/examples/Makefile.in
index edf2e68f..7075e889 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -131,7 +131,7 @@ distdir: $(DISTFILES)
cp $? $(distdir)
clean:
- -rm -f $(TARGETS) *.$(OBJEXT)
+ -rm -f $(TARGETS) *.$(OBJEXT) *.$(OBJEXT).d
distclean: clean
-rm -f Makefile *.d
@@ -139,4 +139,4 @@ distclean: clean
tags:
etags -o $(srcdir)/TAGS --include $(top_srcdir) $(srcdir)/*.c $(srcdir)/*.h
-@DEP_INCLUDE@ $(SOURCES:.c=.$(OBJEXT).d)
+-include $(SOURCES:.c=.$(OBJEXT).d)
diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in
index 97128040..adde619d 100644
--- a/testsuite/Makefile.in
+++ b/testsuite/Makefile.in
@@ -156,7 +156,7 @@ distdir: $(DISTFILES)
clean:
-rm -f $(TARGETS) $(EXTRA_TARGETS) dlopen-test$(EXEEXT) \
- *.o test.in test1.out test2.out
+ *.$(OBJEXT) *.$(OBJEXT).d test.in test1.out test2.out
distclean: clean
-rm -f Makefile *.d
@@ -167,4 +167,4 @@ tags:
# Includes dependency files for everything, including objects which
# the current configuration will not build.
DEP_FILES = $(SOURCES:.c=.$(OBJEXT).d) $(CXX_SOURCES:.cxx=.$(OBJEXT).d)
-@DEP_INCLUDE@ $(DEP_FILES)
+-include $(DEP_FILES)
diff --git a/tools/Makefile.in b/tools/Makefile.in
index e1390f95..eb12a7f6 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -89,7 +89,7 @@ distdir: $(DISTFILES)
cp $? $(distdir)
clean:
- -rm -f $(TARGETS) *.o
+ -rm -f $(TARGETS) *.$(OBJEXT) *.$(OBJEXT).d
distclean: clean
-rm -f Makefile *.d
@@ -97,4 +97,4 @@ distclean: clean
tags:
etags -o $(srcdir)/TAGS --include $(top_srcdir) $(srcdir)/*.c $(srcdir)/*.h
-@DEP_INCLUDE@ $(SOURCES:.c=.$(OBJEXT).d)
+-include $(SOURCES:.c=.$(OBJEXT).d)