Commit 57427231 authored by Niels Möller's avatar Niels Möller

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.
parent 0d1b423d
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
......
......@@ -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)
......@@ -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])])
......
......@@ -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
......
......@@ -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)
......@@ -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)
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment