From: Stefano Lattarini Date: Sat, 11 Aug 2012 13:02:01 +0000 (+0200) Subject: [ng] dist: cosmetic/clarity improvements X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ac4fa0e027a090e598a9106d5c4c5b10068c087;p=thirdparty%2Fautomake.git [ng] dist: cosmetic/clarity improvements * lib/am/distdir.mk: Here, using the fact that this file is now included verbatim and we can thus use GNU make constructs that would have confused the Automake parser. Signed-off-by: Stefano Lattarini --- diff --git a/lib/am/distdir.mk b/lib/am/distdir.mk index 6359df6ef..36ad25b50 100644 --- a/lib/am/distdir.mk +++ b/lib/am/distdir.mk @@ -162,14 +162,15 @@ distdir: $(am.dist.all-files) | $(am.dir) ## in case some explanatory text is desirable. ## ifdef am.conf.is-topdir - @$(if $(am.conf.check-news), \ - sed 15q $(srcdir)/NEWS | grep -F '$(VERSION)' || { \ - echo "NEWS not updated; not releasing" 1>&2; \ - exit 1; \ - }) +ifdef am.conf.check-news + @case `sed 15q $(srcdir)/NEWS` in \ + *'$(VERSION)'*) : ;; \ + *) echo "NEWS not updated; not releasing" 1>&2; exit 1;; \ + esac +endif # am.conf.is-topdir $(am.dist.remove-distdir) test -d "$(distdir)" || mkdir "$(distdir)" -endif +endif # am.conf.check-news ## Make the subdirectories for the files, avoiding to exceed command ## line length limitations. $(call am.xargs-map,am.dist.xmkdir,$(am.dist.parent-dirs)) @@ -258,10 +259,11 @@ endif # DIST_SUBDIRS ## info files. ## We must explicitly set distdir and top_distdir for these sub-makes. ## - $(if $(am.dist.extra-targets), \ +ifdef am.dist.extra-targets $(MAKE) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ - $(am.dist.extra-targets)) + $(am.dist.extra-targets) +endif ## ## This complex find command will try to avoid changing the modes of ## links into the source tree, in case they're hard-linked. @@ -288,10 +290,11 @@ ifdef am.conf.is-topdir ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" - @$(if $(am.dist.filename-filter), \ - if find "$(distdir)" -type f -print \ +ifdef am.dist.filename-filter + @if find "$(distdir)" -type f -print \ | grep '^$(am.dist.filename-filter)' 1>&2; then \ echo '$@: error: the above filenames are too long' 1>&2; \ exit 1; \ - else :; fi) -endif + else :; fi +endif # am.dist.filename-filter +endif # am.conf.is-topdir