The -print can be removed from the find invocation.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I wonder if the -print was intentionally left for debugging purposes. I'm adding Glen who touched this line last.
The purpose of the print is to show what is being installed. Without it the -exec install invocation has no output, we don't see which files are installed. In most other cases of installing files we see exactly what is being installed to where. There's a few ways to resolve this:
- Adding -v to the INSTALL line resolves that.
- This patch:
# git diff diff --git share/zoneinfo/Makefile share/zoneinfo/Makefile index 2f10854cc2e7..044956b856c1 100644 --- share/zoneinfo/Makefile +++ share/zoneinfo/Makefile @@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA} zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \ ${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES} +.if make(*install*) +TZS!= cd ${TZBUILDDIR} && find -s * -type f +.endif + beforeinstall: install-zoneinfo install-zoneinfo: mkdir -p ${DESTDIR}/usr/share/zoneinfo cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS} - cd ${TZBUILDDIR} && \ - find -s * -type f -print -exec ${INSTALL} ${TAG_ARGS} \ +.for f in ${TZS} + ${INSTALL} ${TAG_ARGS} \ -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ - \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; + ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} ${DESTDIR}/usr/share/zoneinfo/${f} +.endfor ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/
I (believe I) understand the problem. I'm not sure what the patch does, though. Where's the "-v" there?
The patch doesn't have one, but you could just change your original line to have -v after ${INSTALL}: ${INSTALL} -v
Okay. But then what exactly is the purpose of the change, compared to eg just adding "-v" to the code currently in the tree?
Okay; Alex explained to me what it actually does. Geez, make(1) is hard...
So it looks like it works just fine. Should I commit it, or do you want to do it yourself - since it's your code anyway? Thanks!
I can confirm this patch works and prints all the timezones during installworld and doesn't print hundreds of lines when make is invoked with -s (which was my original motivation for this patch).
It doesn't work if I run make install inside share/zoneinfo because for some reason TZBUILDDIR is set to /path/to/freebsd-src/share/zoneinfo/buildir. But that is also the case for the previous version so it should be fine.