From 8dfb9505f6d74af1ae5e56f62ee7e2433654a2dc Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 15 Mar 1996 03:15:54 +0000 Subject: [PATCH] Bug fixes --- ChangeLog | 15 +++++++++++++++ TODO | 6 ++++++ data.am | 12 ++++++++---- header.am | 8 +++++--- lib/am/data.am | 12 ++++++++---- lib/am/header.am | 8 +++++--- lib/am/scripts.am | 10 ++++++---- libraries.am | 14 ++++++++------ programs.am | 10 ++++++---- scripts.am | 10 ++++++---- 10 files changed, 73 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4210334..2c78179a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,22 @@ Thu Mar 14 09:28:21 1996 Tom Tromey + * header.am (install-@DIR@HEADERS): Allow empty list of headers. + (uninstall-@DIR@HEADERS): Ditto. + + * scripts.am (install-@DIR@SCRIPTS): Allow empty list of scripts. + (uninstall-@DIR@SCRIPTS): Ditto. + + * libraries.am (install-@DIR@LIBRARIES): Allow empty list of + libraries. + (uninstall-@DIR@LIBRARIES): Ditto. + + * data.am (install-@DIR@DATA): Allow empty list of data. + (uninstall-@DIR@DATA): Ditto. + * programs.am (install-@DIR@PROGRAMS): Added missing semicolon. From François Pinard. + (install-@DIR@PROGRAMS): Fixed bug when list of programs empty. + (uninstall-@DIR@PROGRAMS): Ditto. Wed Mar 13 19:50:23 1996 Tom Tromey diff --git a/TODO b/TODO index a65279d8..0d1075b7 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,9 @@ Priorities for release: * For 0.32: remove last mention of DIST_OTHER, DIST_SUBDIRS +* "libexec_PROGRAMS =" yields invalid syntax for install + -> write test!!! +* Make a patch in cvs-dist. Use bc + Other priorities: * Must rewrite am_install_var. Should break into multiple functions. @@ -178,6 +182,8 @@ Must document INCLUDES Document gettext support +Make a definition of the term "source" + ================================================================ Libraries: diff --git a/data.am b/data.am index aa445f9e..4c5be281 100644 --- a/data.am +++ b/data.am @@ -17,11 +17,15 @@ ## 02111-1307, USA. install-@DIR@DATA: $(@DIR@_DATA) $(top_srcdir)/mkinstalldirs $(@DIR@dir) - for p in $(@DIR@_DATA); do \ - $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \ +## Funny invocation because Makefile variable can be empty, leading to +## a syntax error in sh. + list="$(@DIR@_DATA)"; for p in $$list; do \ + if test -f $$p; then \ + $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \ + fi; \ done uninstall-@DIR@DATA: - for p in $(@DIR@_DATA); do \ - rm -f $(@DIR@dir)/$$p; \ + list="$(@DIR@_DATA)"; for p in $$list; do \ + rm -f $(@DIR@dir)/$$p; \ done diff --git a/header.am b/header.am index bc257504..7b3b0e7c 100644 --- a/header.am +++ b/header.am @@ -17,11 +17,13 @@ ## 02111-1307, USA. install-@DIR@HEADERS: $(@DIR@_HEADERS) $(top_srcdir)/mkinstalldirs $(@DIR@dir) - for p in $(@DIR@_HEADERS); do \ +## Funny invocation because Makefile variable can be empty, leading to +## a syntax error in sh. + list="$(@DIR@_HEADERS)"; for p in $$list; do \ $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \ done uninstall-@DIR@HEADERS: - for p in $(@DIR@_HEADERS); do \ - rm -f $(@DIR@dir)/$$p; \ + list="$(@DIR@_HEADERS)"; for p in $$list; do \ + rm -f $(@DIR@dir)/$$p; \ done diff --git a/lib/am/data.am b/lib/am/data.am index aa445f9e..4c5be281 100644 --- a/lib/am/data.am +++ b/lib/am/data.am @@ -17,11 +17,15 @@ ## 02111-1307, USA. install-@DIR@DATA: $(@DIR@_DATA) $(top_srcdir)/mkinstalldirs $(@DIR@dir) - for p in $(@DIR@_DATA); do \ - $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \ +## Funny invocation because Makefile variable can be empty, leading to +## a syntax error in sh. + list="$(@DIR@_DATA)"; for p in $$list; do \ + if test -f $$p; then \ + $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \ + fi; \ done uninstall-@DIR@DATA: - for p in $(@DIR@_DATA); do \ - rm -f $(@DIR@dir)/$$p; \ + list="$(@DIR@_DATA)"; for p in $$list; do \ + rm -f $(@DIR@dir)/$$p; \ done diff --git a/lib/am/header.am b/lib/am/header.am index bc257504..7b3b0e7c 100644 --- a/lib/am/header.am +++ b/lib/am/header.am @@ -17,11 +17,13 @@ ## 02111-1307, USA. install-@DIR@HEADERS: $(@DIR@_HEADERS) $(top_srcdir)/mkinstalldirs $(@DIR@dir) - for p in $(@DIR@_HEADERS); do \ +## Funny invocation because Makefile variable can be empty, leading to +## a syntax error in sh. + list="$(@DIR@_HEADERS)"; for p in $$list; do \ $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \ done uninstall-@DIR@HEADERS: - for p in $(@DIR@_HEADERS); do \ - rm -f $(@DIR@dir)/$$p; \ + list="$(@DIR@_HEADERS)"; for p in $$list; do \ + rm -f $(@DIR@dir)/$$p; \ done diff --git a/lib/am/scripts.am b/lib/am/scripts.am index 39199d71..6ccf1218 100644 --- a/lib/am/scripts.am +++ b/lib/am/scripts.am @@ -17,13 +17,15 @@ ## 02111-1307, USA. install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS) $(top_srcdir)/mkinstalldirs $(@DIR@dir) - for p in $(@DIR@_SCRIPTS); do \ - if test -f $$p; then \ +## Funny invocation because Makefile variable can be empty, leading to +## a syntax error in sh. + list="$(@DIR@_SCRIPTS)"; for p in $$list; do \ + if test -f $$p; then \ $(INSTALL_SCRIPT) $$p $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ - else :; fi; \ + else :; fi; \ done uninstall-@DIR@SCRIPTS: - for p in $(@DIR@_SCRIPTS); do \ + list="$(@DIR@_SCRIPTS)"; for p in $$list; do \ rm -f $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ done diff --git a/libraries.am b/libraries.am index ab4c9c19..cb201879 100644 --- a/libraries.am +++ b/libraries.am @@ -17,15 +17,17 @@ ## 02111-1307, USA. install-@DIR@LIBRARIES: $(@DIR@_LIBFILES) $(top_srcdir)/mkinstalldirs $(@DIR@dir) - for p in $(@DIR@_LIBFILES); do \ - if test -f $$p; then \ +## Funny invocation because Makefile variable can be empty, leading to +## a syntax error in sh. + list="$(@DIR@_LIBFILES)"; for p in $$list; do \ + if test -f $$p; then \ $(INSTALL_DATA) $$p $(@DIR@dir)/$$p; \ ## Must ranlib after installing because mod time changes. \ - $(RANLIB) $(@DIR@dir)/$$p; \ - else :; fi; \ + $(RANLIB) $(@DIR@dir)/$$p; \ + else :; fi; \ done uninstall-@DIR@LIBRARIES: - for p in $(@DIR@_LIBFILES); do \ - rm -f $(@DIR@dir)/$$p; \ + list="$(@DIR@_LIBFILES)"; for p in $$list; do \ + rm -f $(@DIR@dir)/$$p; \ done diff --git a/programs.am b/programs.am index a6eaca52..490edcb9 100644 --- a/programs.am +++ b/programs.am @@ -17,13 +17,15 @@ ## 02111-1307, USA. install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS) $(top_srcdir)/mkinstalldirs $(@DIR@dir) - for p in $(@DIR@_PROGRAMS); do \ - if test -f $$p; then \ +## Funny invocation because Makefile variable can be empty, leading to +## a syntax error in sh. + list="$(@DIR@_PROGRAMS)"; for p in $$list; do \ + if test -f $$p; then \ $(INSTALL_PROGRAM) $$p $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ - else :; fi; \ + else :; fi; \ done uninstall-@DIR@PROGRAMS: - for p in $(@DIR@_PROGRAMS); do \ + list="$(@DIR@_PROGRAMS)"; for p in $$list; do \ rm -f $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ done diff --git a/scripts.am b/scripts.am index 39199d71..6ccf1218 100644 --- a/scripts.am +++ b/scripts.am @@ -17,13 +17,15 @@ ## 02111-1307, USA. install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS) $(top_srcdir)/mkinstalldirs $(@DIR@dir) - for p in $(@DIR@_SCRIPTS); do \ - if test -f $$p; then \ +## Funny invocation because Makefile variable can be empty, leading to +## a syntax error in sh. + list="$(@DIR@_SCRIPTS)"; for p in $$list; do \ + if test -f $$p; then \ $(INSTALL_SCRIPT) $$p $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ - else :; fi; \ + else :; fi; \ done uninstall-@DIR@SCRIPTS: - for p in $(@DIR@_SCRIPTS); do \ + list="$(@DIR@_SCRIPTS)"; for p in $$list; do \ rm -f $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ done -- 2.43.5