From: Gary V. Vaughan Date: Sun, 6 Nov 2011 10:55:08 +0000 (+0700) Subject: maint: calculate required mkinstalldirs calls during `make install'. X-Git-Tag: v2.4.2.418~296 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04fbe0e383061675011726a8555c21bace745050;p=thirdparty%2Flibtool.git maint: calculate required mkinstalldirs calls during `make install'. * Makefile.am (install-data-local): Make sure all destination directories are in place before copying files there, without hardcoding them. Signed-off-by: Gary V. Vaughan --- diff --git a/Makefile.am b/Makefile.am index 0b6053d5e..3c9e39d2d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -470,28 +470,26 @@ install-data-local: $(lt_Makefile_in) @$(NORMAL_INSTALL) ## Don't install over the top of an old pkgdatadir -rm -rf '$(DESTDIR)$(pkgdatadir)'/* -## To avoid spurious reconfiguration when the user installs these files -## with libtoolize, we have to install them in the correct order: ## First, put a copy of the libtool m4 macros in the aclocal dir - $(mkinstalldirs) $(DESTDIR)$(aclocaldir) @list='$(aclocalfiles)'; for p in $$list; do \ f=`echo "$$p" |'$(SED)' 's|^.*/||'`; \ + d=`echo "$(DESTDIR)$(aclocaldir)/$$f" |$(SED) 's,[^/]*$$,,'`; \ + test -d "$$d" || $(mkinstalldirs) "$$d"; \ echo " $(INSTALL_DATA) '$(srcdir)/$(macro_dir)/$$f' '$(DESTDIR)$(aclocaldir)/$$f'"; \ $(INSTALL_DATA) "$(srcdir)/$(macro_dir)/$$f" "$(DESTDIR)$(aclocaldir)/$$f"; \ done ## install the helper scripts - $(mkinstalldirs) '$(DESTDIR)$(pkgdatadir)' - $(mkinstalldirs) '$(DESTDIR)$(pkgdatadir)/config' @list='$(pkgaux_scripts)' && for p in $$list; do \ + d=`echo "$(DESTDIR)$(pkgdatadir)/$$p" |$(SED) 's,[^/]*$$,,'`; \ + test -d "$$d" || $(mkinstalldirs) "$$d"; \ echo " $(INSTALL_SCRIPT) '$(srcdir)/$(ltdl_dir)/$$p' '$(DESTDIR)$(pkgdatadir)/$$p'"; \ $(INSTALL_SCRIPT) "$(srcdir)/$(ltdl_dir)/$$p" "$(DESTDIR)$(pkgdatadir)/$$p"; \ done $(INSTALL_DATA) "$(ltmain_sh)" "$(DESTDIR)$(pkgdatadir)/config/ltmain.sh" ## install the libltdl files - $(mkinstalldirs) '$(DESTDIR)$(pkgdatadir)/libltdl' - $(mkinstalldirs) '$(DESTDIR)$(pkgdatadir)/libltdl/libltdl' - $(mkinstalldirs) '$(DESTDIR)$(pkgdatadir)/libltdl/loaders' @list='$(ltdldatafiles)' && for p in $$list; do \ + d=`echo "$(DESTDIR)$(pkgdatadir)/$$p" |$(SED) 's,[^/]*$$,,'`; \ + test -d "$$d" || $(mkinstalldirs) "$$d"; \ echo " $(INSTALL_DATA) '$(srcdir)/$$p' '$(DESTDIR)$(pkgdatadir)/$$p'"; \ $(INSTALL_DATA) "$(srcdir)/$$p" "$(DESTDIR)$(pkgdatadir)/$$p"; \ done