summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-06-14 23:41:58 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-06-14 23:41:58 +0200
commited1dc9dddc2a3d5746ccf5722336ecc9dcf5ed29 (patch)
tree2231c13500d9796eaa8d83ffe4b2b0d5eab26a47
parent2ef0a2d367b4db6ca77ff5b8e5f504bdbdbd18de (diff)
downloadautomake-ed1dc9dddc2a3d5746ccf5722336ecc9dcf5ed29.tar.gz
am: stop using "%KEY:iffalse?iftrue%" transforms
And the similar "reduced forms" "%KEY:iffalse%" and "%KEY?iftrue%" as well. They are harder to grasp, can be easily reformulated in function of other "plainer" transforms ("?KEY?" and "?!KEY?"), and we'll remove support for them anyway in a later change. * lib/am/data.am, lib/am/libs.am, lib/am/lisp.am, lib/am/ltlib.am, lib/am/progs.am, lib/am/python.am, lib/am/scripts.am: Adjusted not to rely on those kinds of transforms. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
-rw-r--r--lib/am/data.am3
-rw-r--r--lib/am/libs.am6
-rw-r--r--lib/am/lisp.am12
-rw-r--r--lib/am/ltlib.am9
-rw-r--r--lib/am/progs.am16
-rw-r--r--lib/am/python.am3
-rw-r--r--lib/am/scripts.am3
7 files changed, 37 insertions, 15 deletions
diff --git a/lib/am/data.am b/lib/am/data.am
index b8b658800..b91f55ca1 100644
--- a/lib/am/data.am
+++ b/lib/am/data.am
@@ -24,7 +24,8 @@ endif %?INSTALL%
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%%PRIMARY%
+?EXEC?.PHONY install-exec-am: install-%DIR%%PRIMARY%
+?!EXEC?.PHONY install-data-am: install-%DIR%%PRIMARY%
install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%)
@$(NORMAL_INSTALL)
if %?BASE%
diff --git a/lib/am/libs.am b/lib/am/libs.am
index d1f63ae84..f94a7124e 100644
--- a/lib/am/libs.am
+++ b/lib/am/libs.am
@@ -24,7 +24,8 @@ endif %?INSTALL%
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%LIBRARIES
+?EXEC?.PHONY install-exec-am: install-%DIR%LIBRARIES
+?!EXEC?.PHONY install-data-am: install-%DIR%LIBRARIES
install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
@$(NORMAL_INSTALL)
if %?BASE%
@@ -69,7 +70,8 @@ endif !%?BASE%
@list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
for p in $$list; do \
if test -f $$p; then \
- %BASE?$(am__strip_dir):f=$$p;% \
+?BASE? $(am__strip_dir) \
+?!BASE? f=$$p; \
## Must ranlib after installing because mod time changes.
## cd to target directory because AIX ranlib messes up with whitespace
## in the argument.
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index ba5c92a90..e32bc506b 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -83,8 +83,13 @@ $(am__ELCFILES): elc-stamp
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-%DIR%LISP_INSTALL = %BASE?$(INSTALL_DATA):$(install_sh_DATA)%
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%LISP
+
+?BASE?%DIR%LISP_INSTALL = $(INSTALL_DATA)
+?!BASE?%DIR%LISP_INSTALL = $(install_sh_DATA)
+
+?EXEC?.PHONY install-exec-am: install-%DIR%LISP
+?!EXEC?.PHONY install-data-am: install-%DIR%LISP
+
install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
@$(NORMAL_INSTALL)
## Do not install anything if EMACS was not found.
@@ -100,7 +105,8 @@ install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
for p in $$list; do \
## A lisp file can be in the source directory or the build directory.
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- %BASE?$(am__strip_dir):$(am__vpath_adj)% \
+?BASE? $(am__strip_dir) \
+?!BASE? $(am__vpath_adj) \
echo " $(%DIR%LISP_INSTALL) '$$d$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
$(%DIR%LISP_INSTALL) "$$d$$p" "$(DESTDIR)$(%NDIR%dir)/$$f" || exit $$?; \
## Only install .elc file if it exists.
diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am
index 1ca26b58f..af3a25659 100644
--- a/lib/am/ltlib.am
+++ b/lib/am/ltlib.am
@@ -23,8 +23,12 @@ endif %?INSTALL%
## ------------ ##
if %?INSTALL%
+
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%LTLIBRARIES
+
+?EXEC?.PHONY install-exec-am: install-%DIR%LTLIBRARIES
+?!EXEC?.PHONY install-data-am: install-%DIR%LTLIBRARIES
+
install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
@$(NORMAL_INSTALL)
if %?BASE%
@@ -89,7 +93,8 @@ uninstall-%DIR%LTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
for p in $$list; do \
- %BASE?$(am__strip_dir):f=$$p;% \
+?BASE? $(am__strip_dir) \
+?!BASE? f=$$p; \
?LIBTOOL? echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
?LIBTOOL? $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
?!LIBTOOL? echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
diff --git a/lib/am/progs.am b/lib/am/progs.am
index 2be8bcab4..104270c8b 100644
--- a/lib/am/progs.am
+++ b/lib/am/progs.am
@@ -20,7 +20,8 @@
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%PROGRAMS
+?EXEC?.PHONY install-exec-am: install-%DIR%PROGRAMS
+?!EXEC?.PHONY install-data-am: install-%DIR%PROGRAMS
install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
@$(NORMAL_INSTALL)
## Funny invocation because Makefile variable can be empty, leading to
@@ -34,13 +35,16 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
## On Cygwin with libtool test won't see 'foo.exe' but instead 'foo'.
## So we check for both.
sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p%LIBTOOL? || test -f $$p1%; \
- then echo "$$p"; echo "$$p"; else :; fi; \
+ while read p p1; do if test -f $$p \
+?LIBTOOL? || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
## We now have a list of sourcefile pairs, separated by newline.
## Turn that into "sourcefile source_base target_dir xformed_target_base",
## with newlines being turned into spaces in a second step.
- sed -e 'p;s,.*/,,;n;h' -e '%BASE?s|.*|.|:s|[^/]*$$||; s|^$$|.|%' \
+ sed -e 'p;s,.*/,,;n;h' \
+?BASE? -e 's|.*|.|' \
+?!BASE? -e 's|[^/]*$$||; s|^$$|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
## The following awk script turns that into one line containing directories
@@ -86,7 +90,9 @@ uninstall-%DIR%PROGRAMS:
## but keep the directory part in the hold buffer, in order to
## reapply it again afterwards in the nobase case. Append $(EXEEXT).
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/'%BASE? : -e 'x;s,[^/]*$$,,;G;s,\n,,'%`; \
+ -e 's/$$/$(EXEEXT)/' \
+?!BASE? -e 'x;s,[^/]*$$,,;G;s,\n,,' \
+ `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$files
diff --git a/lib/am/python.am b/lib/am/python.am
index cab61294a..f9b7790c8 100644
--- a/lib/am/python.am
+++ b/lib/am/python.am
@@ -26,7 +26,8 @@ endif %?INSTALL%
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%PYTHON
+?EXEC?.PHONY install-exec-am: install-%DIR%PYTHON
+?!EXEC?.PHONY install-data-am: install-%DIR%PYTHON
install-%DIR%PYTHON: $(%DIR%_PYTHON)
@$(NORMAL_INSTALL)
if %?BASE%
diff --git a/lib/am/scripts.am b/lib/am/scripts.am
index 64e093e64..88c1c9217 100644
--- a/lib/am/scripts.am
+++ b/lib/am/scripts.am
@@ -25,7 +25,8 @@ endif %?INSTALL%
if %?INSTALL%
## if doesn't work properly for Automake variables yet.
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%SCRIPTS
+?EXEC?.PHONY install-exec-am: install-%DIR%SCRIPTS
+?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS
install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
@$(NORMAL_INSTALL)
## Funny invocation because Makefile variable can be empty, leading to