diff --git a/ChangeLog b/ChangeLog index 325b9085ae357231a6f3dda1aba181e056bd17bd..50e255410e5f6bdae9c73926b3debd7ab8e0c090 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-11-27 Niels M�ller <niels@s3.kth.se> + + * tools/Makefile.in (install): Use MKDIR_P to create installation + directory. Install only one file at a time. + + * Makefile.in (MKDIR_P): Use MKDIR_P for creating installation + directories. + + * configure.ac: Use AC_PROG_MKDIR_P. + 2006-11-24 Niels M�ller <nisse@lysator.liu.se> * testsuite/yarrow-test.c (test_main): Use gold-bug.txt as input diff --git a/Makefile.in b/Makefile.in index cbbefe6f12d371f5815fed380cb8ac624672ea89..599b45739e95b01d27ae07fea94cf41db5fe5fe9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -12,6 +12,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = $(INSTALL_PROGRAM) -s +MKDIR_P = @MKDIR_P@ SUBDIRS = tools testsuite examples @@ -229,11 +230,11 @@ config.m4: config.m4.in config.status # Installation # FIXME: Use mkinstalldirs. install-here: install-info install-headers libnettle.a $(SHLIBINSTALL) - [ -d $(DESTDIR)$(libdir) ] || mkdir $(DESTDIR)$(libdir) + $(MKDIR_P) $(DESTDIR)$(libdir) $(INSTALL_DATA) libnettle.a $(DESTDIR)$(libdir) install-shared: $(SHLIBFORLINK) - [ -d $(DESTDIR)$(libdir) ] || mkdir $(DESTDIR)$(libdir) + $(MKDIR_P) $(DESTDIR)$(libdir) $(INSTALL_PROGRAM) $(SHLIBFORLINK) $(DESTDIR)$(libdir)/$(SHLIBFILE) [ -z "$(SHLIBSONAME)" ] \ || (cd $(DESTDIR)$(libdir) \ @@ -245,7 +246,7 @@ install-shared: $(SHLIBFORLINK) # friends for ordinary explicit rules. install-info: nettle.info - [ -d $(DESTDIR)$(infodir) ] || mkdir $(DESTDIR)$(infodir) + $(MKDIR_P) $(DESTDIR)$(infodir) f=nettle.info ; \ [ -f $$f ] || f="$(srcdir)/$$f" ; \ $(INSTALL_DATA) "$$f" $(DESTDIR)$(infodir) ; \ @@ -257,8 +258,7 @@ install-info: nettle.info # NOTE: I'd like to use $^, but that's a GNU extension. $? should be # more portable, and equivalent for phony targets. install-headers: $(INSTALL_HEADERS) - [ -d $(DESTDIR)$(includedir) ] || mkdir $(DESTDIR)$(includedir) - [ -d $(DESTDIR)$(includedir)/nettle ] || mkdir $(DESTDIR)$(includedir)/nettle + $(MKDIR_P) $(DESTDIR)$(includedir)/nettle for f in $(INSTALL_HEADERS) ; do \ if [ -f "$$f" ] ; then \ $(INSTALL_DATA) "$$f" $(DESTDIR)$(includedir)/nettle ; \ diff --git a/configure.ac b/configure.ac index cbc772d7b71c8fd8a017f69b58ea73d7c4fcfedd..b324ac52d47b842a9a5c697cbe5b84fb82e9f989 100644 --- a/configure.ac +++ b/configure.ac @@ -96,6 +96,10 @@ fi AC_PROG_INSTALL +# According to the autoconf manual, needs install-sh from +# autoconf-2.60 or automake-1.10 to avoid races. +AC_PROG_MKDIR_P + LSH_DEPENDENCY_TRACKING if test x$enable_dependency_tracking = xyes ; then