summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index c8af005..3eecd0c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -63,6 +63,18 @@ $(dirs) :
$(DESTDIR)$(bindir)/% : % $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) $< $@
-Makefile : $(srcdir)/configure
+Makefile %.mk : $(srcdir)/configure
$<
+# This is taken straight from the GNU `make' manual.
+# That makes it GFDL, which is incompatible with the GPL
+# I claim `fair-use'
+ %.d: %.c
+ @set -e; rm -f $@; \
+ $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
+ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$
+
+sources = $(filter %.c,$(filelist))
+include $(sources:.c=.d)
+