automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nobase.test fix


From: Alexandre Duret-Lutz
Subject: Re: nobase.test fix
Date: 31 Oct 2001 14:31:05 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>> "akim" == akim  <address@hidden> writes:

[...]

 akim> I like that idea, but I'm a bit worried with partial extension of
 akim> the language supported by file_contents.  In particular, some day
 akim> we ought to have dignified loops, tests and so on, and I'm afraid
 akim> operators like ? : are not very good (telling about nesting them :).

 akim> Why don't you use if/endif, or ?FOO? syntax that kills/keeps a line?

Because I'm not happy to duplicate a line just to change a word.
(BTW, if/endif don't work well in backslashed paragraphs)

Here is a new version, which define the INSTALL program to use
as a separate macro.

Index: ChangeLog
--- ChangeLog
+++ ChangeLog
@@ -1,1 +1,12 @@
+2001-10-31  Alexandre Duret-Lutz  <address@hidden>
+
+       Fix for nobase.test:
+       * lib/am/data.am (install-%DIR%%PRIMARY%): Declare and use
+       %DIR%%PRIMARY%_INSTALL, and set it to $(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: lib/am/data.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/data.am,v
retrieving revision 1.37
diff -u -r1.37 data.am
--- lib/am/data.am 2001/05/03 07:28:20 1.37
+++ lib/am/data.am 2001/10/31 13:38:41
@@ -22,6 +22,8 @@

 if %?INSTALL%
 _am_installdirs += $(DESTDIR)$(%NDIR%dir)
+?BASE?%DIR%%PRIMARY%_INSTALL = $(INSTALL_%ONE_PRIMARY%)
+?!BASE?%DIR%%PRIMARY%_INSTALL = $(install_sh)
 ?EXEC?.PHONY install-exec-am: install-%DIR%%PRIMARY%
 ?!EXEC?.PHONY install-data-am: install-%DIR%%PRIMARY%
 install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%)
@@ -33,12 +35,12 @@
 ## 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?          f="$$p"; \
-         echo " $(INSTALL_%ONE_PRIMARY%) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
-         $(INSTALL_%ONE_PRIMARY%) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
+         echo " $(%DIR%%PRIMARY%_INSTALL) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
+         $(%DIR%%PRIMARY%_INSTALL) $$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
--- lib/am/lisp.am 2001/10/02 15:29:40 1.30
+++ lib/am/lisp.am 2001/10/31 13:38:41
@@ -36,6 +36,8 @@
 
 if %?INSTALL%
 _am_installdirs += $(DESTDIR)$(%NDIR%dir)
+?BASE?%DIR%LISP_INSTALL = $(INSTALL_DATA)
+?!BASE?%DIR%LISP_INSTALL = $(install_sh)
 ?EXEC?.PHONY install-exec-am: install-%DIR%LISP
 ?!EXEC?.PHONY install-data-am: install-%DIR%LISP
 install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
@@ -50,12 +52,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 " $(%DIR%LISP_INSTALL) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
+           $(%DIR%LISP_INSTALL) $$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 " $(%DIR%LISP_INSTALL) $${p}c 
$(DESTDIR)$(%NDIR%dir)/$${f}c"; \
+             $(%DIR%LISP_INSTALL) $${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
--- lib/am/python.am 2001/10/25 12:56:15 1.12
+++ lib/am/python.am 2001/10/31 13:38:41
@@ -23,6 +23,8 @@
 
 if %?INSTALL%
 _am_installdirs += $(DESTDIR)$(%NDIR%dir)
+?BASE?%DIR%PYTHON_INSTALL = $(INSTALL_DATA)
+?!BASE?%DIR%PYTHON_INSTALL = $(install_sh)
 ?EXEC?.PHONY install-exec-am: install-%DIR%PYTHON
 ?!EXEC?.PHONY install-data-am: install-%DIR%PYTHON
 install-%DIR%PYTHON: $(%DIR%_PYTHON)
@@ -37,8 +39,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 " $(%DIR%PYTHON_INSTALL) $(srcdir)/$$p 
$(DESTDIR)$(%NDIR%dir)/$$d"; \
+           $(%DIR%PYTHON_INSTALL) $(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
--- tests/Makefile.am 2001/10/26 10:01:05 1.349
+++ tests/Makefile.am 2001/10/31 13:38:41
@@ -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
--- tests/nobase.test 2001/10/17 17:20:50 1.1
+++ tests/nobase.test 2001/10/31 13:38:42
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]