From: Stefano Lattarini Date: Thu, 24 May 2012 07:56:20 +0000 (+0200) Subject: Merge branch 'ng/dirstamp' into ng/master X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ae1c159376e20230b443c55cb9732f0fbde7c73;p=thirdparty%2Fautomake.git Merge branch 'ng/dirstamp' into ng/master * ng/dirstamp: [ng] dirstamp: remove, use inlined parent directory creation instead Signed-off-by: Stefano Lattarini --- 2ae1c159376e20230b443c55cb9732f0fbde7c73 diff --cc automake.in index 7b0ac7a42,e61bfbd12..ab37fc7c6 --- a/automake.in +++ b/automake.in @@@ -6655,8 -6712,9 +6614,9 @@@ sub preprocess_file ($% 'LIBTOOL' => !! var ('LIBTOOL'), 'NONLIBTOOL' => 1, - + 'HANDLE-EXEEXT' => (exists $configure_vars{'EXEEXT'} ? + 'TRUE' : 'FALSE'), + 'SILENT' => silent_flag (), - %transform); if (! defined ($_ = $am_file_cache{$file})) diff --cc lib/am/header-vars.am index 79dde9ca6,522dfc080..3b6ff6ed8 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@@ -16,13 -16,23 +16,30 @@@ VPATH = @srcdir@ +## Makefiles generated by Automake-NG require GNU make >= 3.81. +## The .FEATURES special variable has been introduced in that make +## version, so use it as a witness to determine whether the current +## make is good enough. +$(if $(.FEATURES),, \ + $(error Automake-NG based builds require GNU make 3.81 or later)) + + am__mkdir = test -d $1 || $(MKDIR_P) $1 + + # In a recipe, ensure the given directory exists, creating it if + # necessary; but tries to do so avoiding useless forks, stats, and + # extra recipe text (the latter is useful when doing "make V=1"). + # If the target has no directory component, or if the parent + # directory of the target already exists, we have nothing to do, so + # try to optimize for those cases -- especially because, for our + # usage patterns, one of them should always be true in non-VPATH + # builds. + am__ensure_dir_exists = \ + $(if $(filter .,$1),:,$(if $(wildcard $1/),:,$(call am__mkdir,$1))) + + # Ensure the directory containing the target of the current recipe + # exists, by creating it if necessary. + am__ensure_target_dir_exists = $(call am__ensure_dir_exists,$(@D)) + ## The 'all' target must be the default one, independently from the ## position it is declared in the output Makefile. .DEFAULT_GOAL := all diff --cc lib/am/texi-vers.am index c930f206f,bdaf900f4..78c107dd7 --- a/lib/am/texi-vers.am +++ b/lib/am/texi-vers.am @@@ -27,12 -27,9 +27,8 @@@ am__dist_common += %VTEXI% %STAMPVTI ## (Not configure.ac, because not all setups define the version number ## in this file.) %STAMPVTI%: %TEXI% $(top_srcdir)/configure - ## It is wrong to have %STAMPVTI% dependent on %DIRSTAMP%, because - ## %STAMPVTI% is distributed and %DIRSTAMP% isn't: a distributed file - ## should never be dependent upon a non-distributed built file. - ## Therefore we ensure that %DIRSTAMP% exists in the rule. - ?DIRSTAMP? test -f %DIRSTAMP% || $(MAKE) %DIRSTAMP% + @$(am__ensure_target_dir_exists) - @(dir=.; test -f ./%TEXI% || dir=$(srcdir); \ - set `$(SHELL) %MDDIR%mdate-sh $$dir/%TEXI%`; \ + @(set `$(SHELL) %MDDIR%mdate-sh $<`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ diff --cc lib/am/texibuild.am index 088b85704,01a737f85..4fb196b50 --- a/lib/am/texibuild.am +++ b/lib/am/texibuild.am @@@ -67,11 -67,13 +63,12 @@@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SU ## Use '--clean' to avoid leaving auxiliary files behind cluttering the build ## directory (see automake bug#11146). We should start using '--tidy' when we ## can assume Texinf 4.9 or later. -?GENERIC? $(TEXI2DVI) %TEXIQUIET% --clean %SOURCE% %TEXIDEVNULL% -?!GENERIC? $(TEXI2DVI) %TEXIQUIET% --clean -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL% + $(TEXI2DVI) %TEXIQUIET% --clean -o $@ $< %TEXIDEVNULL% ?GENERIC?%.pdf: %%SOURCE_SUFFIX% - ?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% %DIRSTAMP% - %AM_V_TEXI2PDF%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + ?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% + %AM_V_TEXI2PDF%$(am__ensure_target_dir_exists) && \ + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ ## Must set MAKEINFO like this so that version.texi will be found even ## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%). MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \ @@@ -80,10 -83,12 +77,11 @@@ ## Use '--clean' to avoid leaving auxiliary files behind cluttering the build ## directory (see automake bug#11146). We should start using '--tidy' when we ## can assume Texinf 4.9 or later. -?GENERIC? $(TEXI2PDF) %TEXIQUIET% --clean %SOURCE% %TEXIDEVNULL% -?!GENERIC? $(TEXI2PDF) %TEXIQUIET% --clean -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL% + $(TEXI2PDF) %TEXIQUIET% --clean -o $@ $< %TEXIDEVNULL% ?GENERIC?%.html: %%SOURCE_SUFFIX% - ?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% %DIRSTAMP% + ?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% + %SILENT%$(am__ensure_target_dir_exists) ## When --split (the default) is used, makeinfo will output a ## directory. However it will not update the time stamp of a ## previously existing directory, and when the names of the nodes