From 5bba04f30ad6cf4a3667d8248f35fdb0c8512e5e Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 12 Dec 1995 18:35:36 +0000 Subject: [PATCH] Install optional objects only if they exist --- ChangeLog | 7 +++++++ lib/am/scripts.am | 4 +++- libraries.am | 8 +++++--- programs.am | 6 ++++-- scripts.am | 4 +++- 5 files changed, 22 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 05b22f43..0422de1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ Tue Dec 12 10:06:28 1995 Tom Tromey + * scripts.am (install-@DIR@SCRIPTS): Only install script if it + exists. + * libraries.am (install-@DIR@LIBRARIES): Only install library if + it exists. + * programs.am (install-@DIR@PROGRAMS): Only install program if it + exists. + * texinfos-vars.am (TEXFILES): Removed. * Makefile.am (pkgdata_DATA): Removed libprograms.am. diff --git a/lib/am/scripts.am b/lib/am/scripts.am index 0319e99d..0ea6734b 100644 --- a/lib/am/scripts.am +++ b/lib/am/scripts.am @@ -1,7 +1,9 @@ install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS) $(top_srcdir)/mkinstalldirs $(@DIR@dir) for p in $(@DIR@_SCRIPTS); do \ - $(INSTALL_SCRIPT) $$p $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ + if test -f $$p; then \ + $(INSTALL_SCRIPT) $$p $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ + else :; fi; \ done uninstall-@DIR@SCRIPTS: diff --git a/libraries.am b/libraries.am index b130ada1..3f88d422 100644 --- a/libraries.am +++ b/libraries.am @@ -1,9 +1,11 @@ install-@DIR@LIBRARIES: $(@DIR@_LIBFILES) $(topsrcdir)/mkinstalldirs $(@DIR@dir) for p in $(@DIR@_LIBFILES); do \ - $(INSTALL_DATA) $$p $(@DIR@dir)/$$p; \ -## Must ranlib after installing because mod time changes. - $(RANLIB) $(@DIR@dir)/$$p; \ + 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; \ done uninstall-@DIR@LIBRARIES: diff --git a/programs.am b/programs.am index 2f2285d0..dd8e62d1 100644 --- a/programs.am +++ b/programs.am @@ -1,7 +1,9 @@ install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS) $(top_srcdir)/mkinstalldirs $(@DIR@dir) - for p in $(@DIR@_PROGRAMS); do \ - $(INSTALL_PROGRAM) $$p $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ + for p in $(@DIR@_PROGRAMS); do \ + if test -f $$p; then \ + $(INSTALL_PROGRAM) $$p $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ + else :; fi \ done uninstall-@DIR@PROGRAMS: diff --git a/scripts.am b/scripts.am index 0319e99d..0ea6734b 100644 --- a/scripts.am +++ b/scripts.am @@ -1,7 +1,9 @@ install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS) $(top_srcdir)/mkinstalldirs $(@DIR@dir) for p in $(@DIR@_SCRIPTS); do \ - $(INSTALL_SCRIPT) $$p $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ + if test -f $$p; then \ + $(INSTALL_SCRIPT) $$p $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ + else :; fi; \ done uninstall-@DIR@SCRIPTS: -- 2.43.5