summaryrefslogtreecommitdiff
path: root/MCONFIG.in
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>1999-07-03 20:25:58 +0000
committerTheodore Ts'o <tytso@mit.edu>1999-07-03 20:25:58 +0000
commit9d564f73f594282d87209313ea59e4ca08727ab3 (patch)
tree09c14c39d89cfa127f36b5d7b44cadc8f74ef13a /MCONFIG.in
parentc54b3c3c99a5d3011f6f60934e90dae7f60b3b00 (diff)
downloade2fsprogs-9d564f73f594282d87209313ea59e4ca08727ab3.tar.gz
ChangeLog, Makefile.in, configure.in, MCONFIG.in, configure, wordwrap.pl:
Makefile.in (depend): Make "make depend" at the top-level automatically recurse through all subdirectories. configure.in: Test for perl since it's needed by wordwrap.pl MCONFIG.in (depend): Fix make-depend so that it the dependencies are automatically word-wrapped. Added the makefile macro $(PERL). wordwrap.pl: New file which does the word wrapping.
Diffstat (limited to 'MCONFIG.in')
-rw-r--r--MCONFIG.in17
1 files changed, 11 insertions, 6 deletions
diff --git a/MCONFIG.in b/MCONFIG.in
index 45c6d911..675197ed 100644
--- a/MCONFIG.in
+++ b/MCONFIG.in
@@ -41,6 +41,7 @@ CHMOD = @CHMOD@
AR = @AR@
AWK = @AWK@
SED = @SED@
+PERL = @PERL@
RANLIB = @RANLIB@
STRIP = @STRIP@
LD = $(PURE) @CC@
@@ -155,15 +156,16 @@ $(top_srcdir)/configure: $(top_srcdir)/configure.in
# Make depend magic...
#
-.depend: Makefile $(SRCS) $(top_srcdir)/depfix.sed
+.depend: Makefile $(SRCS) $(top_srcdir)/depfix.sed $(top_srcdir)/wordwrap.pl
if test -n "$(SRCS)" ; then \
$(CC) -M $(ALL_CFLAGS) $(SRCS) | \
- sed -f $(top_srcdir)/depfix.sed \
+ $(SED) -f $(top_srcdir)/depfix.sed \
-e 's; $(srcdir)/; $$(srcdir)/;g' \
-e 's; $(top_srcdir)/; $$(top_srcdir)/;g' \
-e 's; $(top_builddir)/; $$(top_builddir)/;g' \
-e 's; \./; ;g' \
- -e '/^ *\\$$/d' > .depend; \
+ -e '/^ *\\$$/d' | \
+ $(PERL) $(top_srcdir)/wordwrap.pl > .depend; \
else :; fi
depend:: .depend
@@ -171,8 +173,11 @@ depend:: .depend
sed -e '/^# +++ Dependency line eater +++/,$$d' \
< $(srcdir)/Makefile.in | cat - .depend \
> $(srcdir)/Makefile.in.new; \
- $(MV) $(srcdir)/Makefile.in $(srcdir)/Makefile.in.old; \
- $(MV) $(srcdir)/Makefile.in.new $(srcdir)/Makefile.in; \
- else :; fi
+ if cmp -s $(srcdir)/Makefile.in $(srcdir)/Makefile.in.new ; then \
+ $(RM) $(srcdir)/Makefile.in.new ; \
+ else \
+ $(MV) $(srcdir)/Makefile.in $(srcdir)/Makefile.in.old; \
+ $(MV) $(srcdir)/Makefile.in.new $(srcdir)/Makefile.in; \
+ fi ; else :; fi
# End of file MCONFIG