[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
nobase.test fix
From: |
Alexandre Duret-Lutz |
Subject: |
nobase.test fix |
Date: |
30 Oct 2001 21:12:35 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
It turns out that install-sh will build missing directories
(as when running GNU install with the -D option).
Therfore, to installing nobase_ data files we just have to use
$(install_sh) instead of $(INSTAL_DATA).
Index: ChangeLog
--- ChangeLog
+++ ChangeLog
@@ -1,1 +1,12 @@
+2001-10-30 Alexandre Duret-Lutz <address@hidden>
+
+ Fix for nobase.test:
+ * automake.in (transform): Handle %$TOKEN?IFTRUE:IFFALSE%.
+ * lib/am/data.am (install-%DIR%%PRIMARY%): Use $(install_sh) instead
+ of $(INSTALL_DATA) for nobase_ targets.
+ * lib/am/lisp.am (install-%DIR%LISP): Likewise.
+ * lib/am/python.am (install-%DIR%PYTHON): Likewise.
+ * tests/nobase.test (configure.in): Append AC_OUTPUT.
+ * tests/Makefile.am (XFAIL_TESTS): Remove nobase.test.
+
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1224
diff -u -r1.1224 automake.in
--- automake.in 2001/10/30 16:50:14 1.1224
+++ automake.in 2001/10/30 20:17:29
@@ -7243,8 +7243,10 @@
# -------------------
# Foreach ($TOKEN, $VAL) in %PAIRS produce a replacement expression suitable
# for file_contents which:
-# - replaces @$TOKEN@ with $VALUE,
-# - enables/disables ?$TOKEN?.
+# - replaces %$TOKEN% with $VAL,
+# - enables/disables ?$TOKEN? and ?!$TOKEN?,
+# - replaces %?$TOKEN% with TRUE or FALSE,
+# - replaces %$TOKEN?IFTRUE:IFFALSE% with IFTRUE or IFFALSE.
sub transform (%)
{
my (%pairs) = @_;
@@ -7257,11 +7259,13 @@
{
$result .= "s/\Q?$token?\E//gm;s/^.*\Q?!$token?\E.*\\n//gm;";
$result .= "s/\Q%?$token%\E/TRUE/gm;";
+ $result .= "s/\Q%$token?\E([^:]*?):[^%]*?%\E/\$1/gm;";
}
else
{
$result .= "s/\Q?!$token?\E//gm;s/^.*\Q?$token?\E.*\\n//gm;";
$result .= "s/\Q%?$token%\E/FALSE/gm;";
+ $result .= "s/\Q%$token?\E[^:]*?:([^%]*?)%\E/\$1/gm;";
}
}
Index: lib/am/data.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/data.am,v
retrieving revision 1.37
diff -u -r1.37 data.am
--- data.am 2001/05/03 07:28:20 1.37
+++ data.am 2001/10/30 20:17:29
@@ -33,12 +33,14 @@
## A file can be in the source directory or the build directory.
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
## If the _%PRIMARY% variable has an entry like foo/bar, install it as
-## $(destdir)/bar, not $(destdir)/foo/bar. The user can always make a
-## new dir variable for the latter case.
+## $(destdir)/bar, not $(destdir)/foo/bar. The user can make a
+## new dir variable or use a nobase_ target for the latter case.
?BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \
+?BASE? echo " $(INSTALL_%ONE_PRIMARY%) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
+?BASE? $(INSTALL_%ONE_PRIMARY%) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
?!BASE? f="$$p"; \
- echo " $(INSTALL_%ONE_PRIMARY%) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
- $(INSTALL_%ONE_PRIMARY%) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
+?!BASE? echo " $(install_sh) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
+?!BASE? $(install_sh) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
done
endif %?INSTALL%
Index: lib/am/lisp.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/lisp.am,v
retrieving revision 1.30
diff -u -r1.30 lisp.am
--- lisp.am 2001/10/02 15:29:40 1.30
+++ lisp.am 2001/10/30 20:17:29
@@ -50,12 +50,12 @@
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
?BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \
?!BASE? f="$$p"; \
- echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
- $(INSTALL_DATA) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
+ echo " $(%BASE?INSTALL_DATA:install_sh%) $$d$$p
$(DESTDIR)$(%NDIR%dir)/$$f"; \
+ $(%BASE?INSTALL_DATA:install_sh%) $$d$$p
$(DESTDIR)$(%NDIR%dir)/$$f; \
## Only install .elc file if it exists.
if test -f $${p}c; then \
- echo " $(INSTALL_DATA) $${p}c $(DESTDIR)$(%NDIR%dir)/$${f}c"; \
- $(INSTALL_DATA) $${p}c $(DESTDIR)$(%NDIR%dir)/$${f}c; \
+ echo " $(%BASE?INSTALL_DATA:install_sh%) $${p}c
$(DESTDIR)$(%NDIR%dir)/$${f}c"; \
+ $(%BASE?INSTALL_DATA:install_sh%) $${p}c
$(DESTDIR)$(%NDIR%dir)/$${f}c; \
else : ; fi; \
done; \
else : ; fi
Index: lib/am/python.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/python.am,v
retrieving revision 1.12
diff -u -r1.12 python.am
--- python.am 2001/10/25 12:56:15 1.12
+++ python.am 2001/10/30 20:17:29
@@ -37,8 +37,8 @@
?!BASE? d="$$p"; \
dlist="$$dlist $$d"; \
## Don't perform translation, since script name is important.
- echo " $(INSTALL_PROGRAM) $(srcdir)/$$p
$(DESTDIR)$(%NDIR%dir)/$$d"; \
- $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(%NDIR%dir)/$$d; \
+ echo " $(%BASE?INSTALL_DATA:install_sh%) $(srcdir)/$$p
$(DESTDIR)$(%NDIR%dir)/$$d"; \
+ $(%BASE?INSTALL_DATA:install_sh%) $(srcdir)/$$p
$(DESTDIR)$(%NDIR%dir)/$$d; \
else :; fi; \
done; \
## Byte-compile must be done at install time, since file times are
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.349
diff -u -r1.349 Makefile.am
--- Makefile.am 2001/10/26 10:01:05 1.349
+++ Makefile.am 2001/10/30 20:17:31
@@ -1,6 +1,6 @@
## Process this file with automake to create Makefile.in
-XFAIL_TESTS = condd.test subdir5.test auxdir2.test cond17.test nobase.test
+XFAIL_TESTS = condd.test subdir5.test auxdir2.test cond17.test
TESTS = \
acinclude.test \
Index: tests/nobase.test
===================================================================
RCS file: /cvs/automake/automake/tests/nobase.test,v
retrieving revision 1.1
diff -u -r1.1 nobase.test
--- nobase.test 2001/10/17 17:20:50 1.1
+++ nobase.test 2001/10/30 20:17:31
@@ -3,6 +3,10 @@
. $srcdir/defs || exit 1
+cat >> configure.in <<'EOF'
+AC_OUTPUT
+EOF
+
cat > Makefile.am << 'EOF'
foodir = $(prefix)/foo
nobase_foo_HEADERS = bar/baz.h
--
Alexandre Duret-Lutz
- nobase.test fix,
Alexandre Duret-Lutz <=