Date: Sun, 15 Sep 2013 22:16:23 +0200 From: Jilles Tjoelker <jilles@stack.nl> To: Joel Dahl <joel@vnode.se> Cc: src-committers@freebsd.org, John Baldwin <jhb@freebsd.org>, Peter Wemm <peter@freebsd.org>, svn-src-all@freebsd.org, Dimitry Andric <dim@freebsd.org>, gabor@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r254273 - in head: . include lib lib/libc/iconv lib/libiconv_compat lib/libkiconv share/mk sys/sys tools/build/mk Message-ID: <20130915201623.GA28602@stack.nl> In-Reply-To: <20130912221927.GA473@stack.nl> References: <201308130715.r7D7F1nu076335@svn.freebsd.org> <20130822155835.GA52789@devbox.vnode.local> <20130903195241.GA93218@devbox.vnode.local> <201309051013.35286.jhb@freebsd.org> <20130905201540.GA23637@devbox.vnode.local> <20130912221927.GA473@stack.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 13, 2013 at 12:19:27AM +0200, Jilles Tjoelker wrote:
> On Thu, Sep 05, 2013 at 10:15:40PM +0200, Joel Dahl wrote:
> > Installworld is still broken on systems with readonly /usr/obj.
> I use this. It makes the mapper.dir and similar files depend on their
> actual sources instead of phony targets, and therefore only rebuilt when
> needed.
The previous patch had some problems (two makes in parallel in the same
directory, no rebuild when the sources of the $i/foo.$i files changed in
-DNOCLEAN mode). This patch should work better. It avoids changing the
targets and instead leaves the destination file untouched if the content
remains the same.
Index: share/i18n/csmapper/Makefile
===================================================================
--- share/i18n/csmapper/Makefile (revision 255570)
+++ share/i18n/csmapper/Makefile (working copy)
@@ -7,10 +7,11 @@
KAZAKH KOI KS MISC TCVN
mapper.dir: ${SUBDIR}
- > ${.TARGET}
-.for i in ${SUBDIR}
- cat ${i}/mapper.dir.${i} >> ${.TARGET}
-.endfor
+ newfile=$$(for i in ${SUBDIR}; do \
+ cat $$i/mapper.dir.$$i; \
+ done); \
+ [ "$$newfile" = "$$(cat ${.TARGET} 2>/dev/null)" ] || \
+ printf '%s\n' "$$newfile" >${.TARGET}
mapper.dir.db: mapper.dir
${MKCSMAPPER} -m -o ${.TARGET} ${.ALLSRC}
@@ -18,10 +19,11 @@
CLEANFILES+= mapper.dir mapper.dir.db
charset.pivot: ${SUBDIR}
- > ${.TARGET}
-.for i in ${SUBDIR}
- cat ${i}/charset.pivot.${i} >> ${.TARGET}
-.endfor
+ newfile=$$(for i in ${SUBDIR}; do \
+ cat $$i/charset.pivot.$$i; \
+ done); \
+ [ "$$newfile" = "$$(cat ${.TARGET} 2>/dev/null)" ] || \
+ printf '%s\n' "$$newfile" >${.TARGET}
charset.pivot.pvdb: charset.pivot
${MKCSMAPPER} -p -o ${.TARGET} ${.ALLSRC}
Index: share/i18n/esdb/Makefile
===================================================================
--- share/i18n/esdb/Makefile (revision 255570)
+++ share/i18n/esdb/Makefile (working copy)
@@ -10,18 +10,20 @@
CLEANFILES= ${FILES}
esdb.dir: ${SUBDIR}
- > $@
-.for i in ${SUBDIR}
- cat ${i}/esdb.dir.${i} >>${.TARGET}
-.endfor
+ newfile=$$(for i in ${SUBDIR}; do \
+ cat $$i/esdb.dir.$$i; \
+ done); \
+ [ "$$newfile" = "$$(cat ${.TARGET} 2>/dev/null)" ] || \
+ printf '%s\n' "$$newfile" >${.TARGET}
esdb.dir.db: esdb.dir
${MKESDB} -m -o ${.TARGET} ${.ALLSRC}
esdb.alias: ${SUBDIR}
- > $@
-.for i in ${SUBDIR}
- cat ${i}/esdb.alias.${i} >>${.TARGET}
-.endfor
+ newfile=$$(for i in ${SUBDIR}; do \
+ cat $$i/esdb.alias.$$i; \
+ done); \
+ [ "$$newfile" = "$$(cat ${.TARGET} 2>/dev/null)" ] || \
+ printf '%s\n' "$$newfile" >${.TARGET}
esdb.alias.db: esdb.alias
${MKESDB} -m -o ${.TARGET} ${.ALLSRC}
--
Jilles Tjoelker
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130915201623.GA28602>
