cvs commit: src ObsoleteFiles.inc

Dag-Erling Smørgrav des at des.no
Mon Aug 14 12:47:33 UTC 2006


des at des.no (Dag-Erling Smørgrav) writes:
> Dmitry Pryanishnikov <dmitry at atlantis.dp.ua> writes:
> > So ':>>${FILE}' isn't the same as 'touch ${FILE}' for existing files.
> when the purpose is only "to ensure that a file exists" as I wrote
> above, this does not matter.

besides, in most cases where touch is used in src/sys, what is really
needed is truncate (or :>):

opt_ppp.h:
        touch ${.TARGET}
.if ${PPP_BSDCOMP} > 0
        echo "#define PPP_BSDCOMP ${PPP_BSDCOMP}" >> ${.TARGET}
.endif
.if ${PPP_DEFLATE} > 0
        echo "#define PPP_DEFLATE ${PPP_DEFLATE}" >> ${.TARGET}
.endif
.if ${PPP_FILTER} > 0
        echo "#define PPP_FILTER ${PPP_FILTER}" >> ${.TARGET}
.endif
.endif

if for some reason this target should run several times, opt_ppp.h
will end up with multiple definitions of the same macros.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the cvs-src mailing list