]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
maint: calculate required mkinstalldirs calls during `make install'.
authorGary V. Vaughan <gary@gnu.org>
Sun, 6 Nov 2011 10:55:08 +0000 (17:55 +0700)
committerGary V. Vaughan <gary@gnu.org>
Tue, 8 Nov 2011 13:07:43 +0000 (20:07 +0700)
* 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 <gary@gnu.org>
Makefile.am

index 0b6053d5ed979f84bc2387a2ca83703b7fd96af2..3c9e39d2df3eb358bc4aee1a014f67b6eafeb1ed 100644 (file)
@@ -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