[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
factoring out some common code in bin/Makefile.am
From: |
Paul Eggert |
Subject: |
factoring out some common code in bin/Makefile.am |
Date: |
Fri, 10 Dec 2004 15:55:30 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
I installed this:
2004-12-10 Paul Eggert <address@hidden>
* bin/Makefile.am (MOSTLYCLEANFILES): Renamed from CLEANFILES.
Add *.tmp.
(autoconf, autoheader, autom4te, autoreconf, autoscan, autoupdate,
ifnames): Factor common code. And they said it couldn't be done!
Index: bin/Makefile.am
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/Makefile.am,v
retrieving revision 1.19
diff -p -u -r1.19 Makefile.am
--- bin/Makefile.am 9 Dec 2004 21:14:45 -0000 1.19
+++ bin/Makefile.am 10 Dec 2004 23:51:25 -0000
@@ -29,7 +29,7 @@ EXTRA_DIST = autoconf.as autoheader.in a
autoscan.in autom4te.in
# Files that should be removed, but which Automake does not know.
-CLEANFILES = $(bin_SCRIPTS) autoconf.in
+MOSTLYCLEANFILES = $(bin_SCRIPTS) autoconf.in *.tmp
## ------------- ##
@@ -57,58 +57,22 @@ autoconf.in: $(srcdir)/autoconf.as $(m4s
## All the files below depend on Makefile so that they are rebuilt
## when the prefix etc. changes. It took quite a while to have these
-## rules correct, don't break them! In particular, we believe there is
-## no solution to factor the code.
+## rules correct, don't break them!
## Use chmod -w to prevent people from editing the wrong file by accident.
-autoconf: autoconf.in Makefile
- rm -f autoconf autoconf.tmp
- $(edit) autoconf.in >autoconf.tmp
- chmod +x autoconf.tmp
- chmod a-w autoconf.tmp
- mv -f autoconf.tmp autoconf
-
-autoheader: $(srcdir)/autoheader.in Makefile
- rm -f autoheader autoheader.tmp
- $(edit) $(srcdir)/autoheader.in >autoheader.tmp
- chmod +x autoheader.tmp
- chmod a-w autoheader.tmp
- mv -f autoheader.tmp autoheader
-
-autom4te: $(srcdir)/autom4te.in Makefile
- rm -f autom4te autom4te.tmp
- $(edit) $(srcdir)/autom4te.in >autom4te.tmp
- chmod +x autom4te.tmp
- chmod a-w autom4te.tmp
- mv -f autom4te.tmp autom4te
-
-autoreconf: $(srcdir)/autoreconf.in Makefile
- rm -f autoreconf autoreconf.tmp
- $(edit) $(srcdir)/autoreconf.in >autoreconf.tmp
- chmod +x autoreconf.tmp
- chmod a-w autoreconf.tmp
- mv -f autoreconf.tmp autoreconf
-
-autoscan: $(srcdir)/autoscan.in Makefile
- rm -f autoscan autoscan.tmp
- $(edit) $(srcdir)/autoscan.in >autoscan.tmp
- chmod +x autoscan.tmp
- chmod a-w autoscan.tmp
- mv -f autoscan.tmp autoscan
-
-autoupdate: $(srcdir)/autoupdate.in Makefile
- rm -f autoupdate autoupdate.tmp
- $(edit) $(srcdir)/autoupdate.in >autoupdate.tmp
- chmod +x autoupdate.tmp
- chmod a-w autoupdate.tmp
- mv -f autoupdate.tmp autoupdate
-
-ifnames: $(srcdir)/ifnames.in Makefile
- rm -f ifnames ifnames.tmp
- $(edit) $(srcdir)/ifnames.in >ifnames.tmp
- chmod +x ifnames.tmp
- chmod a-w ifnames.tmp
- mv -f ifnames.tmp ifnames
-
+$(bin_SCRIPTS): Makefile
+ rm -f $@ address@hidden
+ $(edit) $(srcdir)/address@hidden >address@hidden
+ chmod +x address@hidden
+ chmod a-w address@hidden
+ mv address@hidden $@
+
+autoconf: $(srcdir)/autoconf.in
+autoheader: $(srcdir)/autoheader.in
+autom4te: $(srcdir)/autom4te.in
+autoreconf: $(srcdir)/autoreconf.in
+autoscan: $(srcdir)/autoscan.in
+autoupdate: $(srcdir)/autoupdate.in
+ifnames: $(srcdir)/ifnames.in
## --------------- ##
- factoring out some common code in bin/Makefile.am,
Paul Eggert <=