[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 06/11] build: name temporary files in `Makefile.am' consistent
From: |
Gary V. Vaughan |
Subject: |
[PATCH v2 06/11] build: name temporary files in `Makefile.am' consistently. |
Date: |
Thu, 23 Sep 2010 22:21:23 +0700 |
This is another silly patch that ends up being mostly edited away
by the next couple of patches in the series... but I think it's
useful to split it out so that you can see what I'm thinking at
each stage. It was also a good exercise because after splitting,
I realised that the original 3/4 didn't apply this concept in all
the places it could have.
Okay to push?
* Makefile.am (libltdl/m4/ltversion.m4): Rename temporary file
to `ltversion.m4T'.
(libltdl/config/ltmain.sh): Rename temporary file to `ltmain.shT'.
(libtoolize): Rename temporary file to `libtoolizeT'.
(tests/defs): Rename temporary file to `defsT'
(tests/testsuite): Rename temporary file to `testsuiteT'.
(CLEANFILES): Adjust and add `tests/defsT' and `tests/testsuiteT'.
Signed-off-by: Gary V. Vaughan <address@hidden>
---
ChangeLog | 9 +++++++++
Makefile.am | 41 +++++++++++++++++++++--------------------
2 files changed, 30 insertions(+), 20 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f812d1d..f26e65b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2010-08-31 Gary V. Vaughan <address@hidden>
+ build: name temporary files in `Makefile.am' consistently.
+ * Makefile.am (libltdl/m4/ltversion.m4): Rename temporary file
+ to `ltversion.m4T'.
+ (libltdl/config/ltmain.sh): Rename temporary file to `ltmain.shT'.
+ (libtoolize): Rename temporary file to `libtoolizeT'.
+ (tests/defs): Rename temporary file to `defsT'
+ (tests/testsuite): Rename temporary file to `testsuiteT'.
+ (CLEANFILES): Adjust and add `tests/defsT' and `tests/testsuiteT'.
+
build: factor Makefile.am `m4sh' invocations to LT_M4SH.
* Makefile.am (LT_M4SH): Now that all directories are listed as
fully qualified paths, the search path argument to M4SH is always
diff --git a/Makefile.am b/Makefile.am
index 0f5cd52..9143350 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -74,8 +74,9 @@ EXTRA_DIST += bootstrap $(srcdir)/libtoolize.in
$(auxdir)/ltmain.m4sh \
ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 \
ChangeLog.2005 ChangeLog.2006 ChangeLog.2007 \
ChangeLog.2008 ChangeLog.2009
-CLEANFILES += libtool libtoolize libtoolize.tmp \
- $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp
+CLEANFILES += libtool libtoolize libtoolizeT \
+ tests/defsT tests/testsuitT \
+ $(auxdir)/ltmain.shT $(m4dir)/ltversion.m4T
## These are the replacements that need to be made at bootstrap time,
## because they must be static in distributed files, and not accidentally
@@ -116,14 +117,14 @@ $(srcdir)/$(m4dir)/ltversion.m4: $(m4dir)/ltversion.in
configure.ac ChangeLog
case $$prereq in *ChangeLog | *configure.ac);; *) rebuild=:;; esac; \
done; \
if $$rebuild; then \
- rm -f $(srcdir)/$(m4dir)/ltversion.tmp; \
+ rm -f $(srcdir)/$(m4dir)/ltversion.m4T; \
serial=`echo "$$revision" | sed 's,^1[.],,g'`; \
echo $(bootstrap_edit) \
$(srcdir)/$(m4dir)/ltversion.in \> $(srcdir)/$(m4dir)/ltversion.m4;
\
$(bootstrap_edit) \
- $(srcdir)/$(m4dir)/ltversion.in >
$(srcdir)/$(m4dir)/ltversion.tmp; \
- chmod a-w $(srcdir)/$(m4dir)/ltversion.tmp; \
- mv -f $(srcdir)/$(m4dir)/ltversion.tmp
$(srcdir)/$(m4dir)/ltversion.m4; \
+ $(srcdir)/$(m4dir)/ltversion.in >
$(srcdir)/$(m4dir)/ltversion.m4T; \
+ chmod a-w $(srcdir)/$(m4dir)/ltversion.m4T; \
+ mv -f $(srcdir)/$(m4dir)/ltversion.m4T
$(srcdir)/$(m4dir)/ltversion.m4; \
fi
## And for similar reasons, ltmain.sh can't be built from config.status.
@@ -147,7 +148,7 @@ $(srcdir)/$(auxdir)/ltmain.sh: $(sh_files)
$(auxdir)/ltmain.m4sh configure.ac Ch
case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \
done; \
if $$rebuild; then \
- rm -f $(srcdir)/$(auxdir)/ltmain.in $(srcdir)/$(auxdir)/ltmain.tmp \
+ rm -f $(srcdir)/$(auxdir)/ltmain.in $(srcdir)/$(auxdir)/ltmain.shT \
$(srcdir)/$(auxdir)/ltmain.sh; \
echo $(LT_M4SH) $(srcdir)/$(auxdir)/ltmain.m4sh \
\> $(srcdir)/$(auxdir)/ltmain.in; \
@@ -156,10 +157,10 @@ $(srcdir)/$(auxdir)/ltmain.sh: $(sh_files)
$(auxdir)/ltmain.m4sh configure.ac Ch
echo $(bootstrap_edit) \
$(srcdir)/$(auxdir)/ltmain.in "> $$target"; \
$(bootstrap_edit) \
- $(srcdir)/$(auxdir)/ltmain.in > $(srcdir)/$(auxdir)/ltmain.tmp;
\
+ $(srcdir)/$(auxdir)/ltmain.in > $(srcdir)/$(auxdir)/ltmain.shT;
\
rm -f $(srcdir)/$(auxdir)/ltmain.in; \
- chmod a-w $(srcdir)/$(auxdir)/ltmain.tmp; \
- mv -f $(srcdir)/$(auxdir)/ltmain.tmp $(srcdir)/$(auxdir)/ltmain.sh; \
+ chmod a-w $(srcdir)/$(auxdir)/ltmain.shT; \
+ mv -f $(srcdir)/$(auxdir)/ltmain.shT $(srcdir)/$(auxdir)/ltmain.sh; \
fi
# Use `$(srcdir)' for the benefit of non-GNU makes: this is
@@ -228,12 +229,12 @@ configure_edit = sed \
bin_SCRIPTS = libtoolize libtool
libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
- rm -f libtoolize.tmp libtoolize
+ rm -f libtoolizeT libtoolize
$(configure_edit) \
- $(srcdir)/libtoolize.in > libtoolize.tmp
- chmod a+x libtoolize.tmp
- chmod a-w libtoolize.tmp
- mv -f libtoolize.tmp libtoolize
+ $(srcdir)/libtoolize.in > libtoolizeT
+ chmod a+x libtoolizeT
+ chmod a-w libtoolizeT
+ mv -f libtoolizeT libtoolize
# We used to do this with a 'stamp-vcl' file, but non-gmake builds
# would rerun configure on every invocation, so now we manually
@@ -538,8 +539,8 @@ INSTALLCHECK_ENVIRONMENT = \
# Use `$(srcdir)' for the benefit of non-GNU makes: this is
# how `testsuite' appears in our dependencies.
$(srcdir)/$(TESTSUITE): $(srcdir)/tests/package.m4 $(TESTSUITE_AT) Makefile.am
- $(AUTOTEST) -I $(srcdir)/tests $(TESTSUITE_AT) -o
$(srcdir)/testsuite.tmp
- mv -f $(srcdir)/testsuite.tmp $(srcdir)/testsuite
+ $(AUTOTEST) -I $(srcdir)/tests $(TESTSUITE_AT) -o $(srcdir)/testsuiteT
+ mv -f $(srcdir)/testsuiteT $(srcdir)/testsuite
$(srcdir)/tests/package.m4: $(srcdir)/configure.ac Makefile.am
{ \
@@ -894,9 +895,9 @@ DIST_SUBDIRS += $(CONF_SUBDIRS)
# regenerated since the source tree can be read-only.
check-recursive: tests/defs
tests/defs: $(srcdir)/tests/defs.in
- rm -f tests/defs.tmp tests/defs; \
- $(configure_edit) $(srcdir)/tests/defs.in > tests/defs.tmp; \
- mv -f tests/defs.tmp tests/defs
+ rm -f tests/defsT tests/defs; \
+ $(configure_edit) $(srcdir)/tests/defs.in > tests/defsT; \
+ mv -f tests/defsT tests/defs
# Use `$(srcdir)/tests' for the benefit of non-GNU makes: this is
# how defs.in appears in our dependencies.
--
1.7.3
- Re: [PATCH 1/r47] maint: help2man targets should rely on the binaries they call., (continued)
[PATCH v2 01/11] maint: rearrange Makefile.am in preparation for a follow-up patch., Gary V. Vaughan, 2010/09/23
[PATCH v2 02/11] maint: don't leak developer GREP, SED etc into distribution file., Gary V. Vaughan, 2010/09/23
[PATCH v2 03/11] build: compare `revision' rather than `correctver' in Makefile.am., Gary V. Vaughan, 2010/09/23
[PATCH v2 04/11] build: avoid unnecessary directory changes in Makefile rules., Gary V. Vaughan, 2010/09/23
[PATCH v2 05/11] build: factor Makefile.am `m4sh' invocations to LT_M4SH., Gary V. Vaughan, 2010/09/23
[PATCH v2 06/11] build: name temporary files in `Makefile.am' consistently.,
Gary V. Vaughan <=
[PATCH v2 09/11] build: eliminate `ltmain.in' intermediate file., Gary V. Vaughan, 2010/09/23
[PATCH v2 08/11] build: don't hardcode repeated long paths in Makefile rules., Gary V. Vaughan, 2010/09/23
[PATCH v2 10/11] build: eliminate superfluous temporary files from `Makefile.am'., Gary V. Vaughan, 2010/09/23
[PATCH v2 11/11] maint: simplify and improve safety of bootstrap process., Gary V. Vaughan, 2010/09/23
[PATCH v2 07/11] build: make better use of automatic variables in `Makefile.am'., Gary V. Vaughan, 2010/09/23