Author: jilles Date: Tue Sep 17 20:09:25 2013 New Revision: 255651 URL: http://svnweb.freebsd.org/changeset/base/255651
Log: share/i18n: Fix installworld with read-only obj. Since iconv was enabled (r254273, August 13), it has been impossible to installworld using a read-only obj tree. This is common with NFS. Parts of share/i18n unconditionally rebuild files like mapper.dir during installation. This patch ensures the files like mapper.dir are not rewritten with the same contents. Tested by: joel Approved by: re (hrs) Modified: head/share/i18n/csmapper/Makefile head/share/i18n/esdb/Makefile Modified: head/share/i18n/csmapper/Makefile ============================================================================== --- head/share/i18n/csmapper/Makefile Tue Sep 17 18:51:35 2013 (r255650) +++ head/share/i18n/csmapper/Makefile Tue Sep 17 20:09:25 2013 (r255651) @@ -7,10 +7,11 @@ SUBDIR= APPLE AST BIG5 CNS CP EBCDIC GB 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 @@ FILES+= mapper.dir mapper.dir.db 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} Modified: head/share/i18n/esdb/Makefile ============================================================================== --- head/share/i18n/esdb/Makefile Tue Sep 17 18:51:35 2013 (r255650) +++ head/share/i18n/esdb/Makefile Tue Sep 17 20:09:25 2013 (r255651) @@ -10,18 +10,20 @@ FILES+= esdb.dir esdb.dir.db esdb.alias 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} _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"