From owner-cvs-all@FreeBSD.ORG Mon Aug 14 12:54:15 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4921D16A4DF; Mon, 14 Aug 2006 12:54:15 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id E700343D79; Mon, 14 Aug 2006 12:54:13 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 27CCD20AF; Mon, 14 Aug 2006 14:54:06 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on tim.des.no Received: from xps.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id 0542F20AC; Mon, 14 Aug 2006 14:54:06 +0200 (CEST) Received: by xps.des.no (Postfix, from userid 1001) id E2CDF33C24; Mon, 14 Aug 2006 14:54:05 +0200 (CEST) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Ruslan Ermilov References: <200608101942.k7AJgOrB051336@repoman.freebsd.org> <20060811235619.G93570@atlantis.atlantis.dp.ua> <20060811220244.GC5237@rambler-co.ru> <20060811223642.GA21117@xor.obsecurity.org> <20060812005213.384b744b@Magellan.Leidinger.net> <20060812084253.GA8597@rambler-co.ru> <20060812123531.GA36569@xor.obsecurity.org> <20060813185551.GA15783@rambler-co.ru> <864pwfwpnm.fsf@xps.des.no> <20060814121415.GA59023@rambler-co.ru> Date: Mon, 14 Aug 2006 14:54:05 +0200 In-Reply-To: <20060814121415.GA59023@rambler-co.ru> (Ruslan Ermilov's message of "Mon, 14 Aug 2006 16:14:15 +0400") Message-ID: <86y7trtr4i.fsf@xps.des.no> User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Alexander Leidinger , cvs-all@FreeBSD.org, Kris Kennaway Subject: Re: cvs commit: src ObsoleteFiles.inc X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Aug 2006 12:54:15 -0000 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Ruslan Ermilov writes: > "Dag-Erling Sm=F8rgrav" writes: > > BTW, if you just need to ensure that a file exists, a safe alternative > > to 'touch ${FILE}' is ':>>${FILE}'. Makefiles in src/sys/modules > > which use touch should probably be updated to use this instead. > Very good, I like it. See attached patch. I ended up using :> instead of :>> since that is what is meant in most cases (i.e. the file is supposed to be empty) DES --=20 Dag-Erling Sm=F8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=touch.diff Index: sys/conf/kern.post.mk =================================================================== RCS file: /home/ncvs/src/sys/conf/kern.post.mk,v retrieving revision 1.95 diff -u -r1.95 kern.post.mk --- sys/conf/kern.post.mk 18 Jun 2006 17:48:45 -0000 1.95 +++ sys/conf/kern.post.mk 14 Aug 2006 12:50:05 -0000 @@ -132,7 +132,7 @@ # in the a.out ld. For now, this works. HACK_EXTRA_FLAGS?= -shared hack.So: Makefile - touch hack.c + :> hack.c ${CC} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.So rm -f hack.c Index: sys/conf/kmod.mk =================================================================== RCS file: /home/ncvs/src/sys/conf/kmod.mk,v retrieving revision 1.209 diff -u -r1.209 kmod.mk --- sys/conf/kmod.mk 30 Jun 2006 19:35:35 -0000 1.209 +++ sys/conf/kmod.mk 14 Aug 2006 12:51:14 -0000 @@ -192,7 +192,7 @@ .if defined(EXPORT_SYMS) .if ${EXPORT_SYMS} != YES .if ${EXPORT_SYMS} == NO - touch export_syms + :> export_syms .elif !exists(${.CURDIR}/${EXPORT_SYMS}) echo ${EXPORT_SYMS} > export_syms .else @@ -311,7 +311,7 @@ CLEANFILES+= ${_src} .if !target(${_src}) ${_src}: - touch ${.TARGET} + :> ${.TARGET} .endif .endfor .endif Index: sys/conf/newvers.sh =================================================================== RCS file: /home/ncvs/src/sys/conf/newvers.sh,v retrieving revision 1.72 diff -u -r1.72 newvers.sh --- sys/conf/newvers.sh 19 Aug 2005 03:56:45 -0000 1.72 +++ sys/conf/newvers.sh 14 Aug 2006 12:50:47 -0000 @@ -83,7 +83,7 @@ echo 0 > version fi -touch version +:>> version v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} t=`date` i=`${MAKE:-make} -V KERN_IDENT` cat << EOF > vers.c Index: sys/modules/if_ef/Makefile =================================================================== RCS file: /home/ncvs/src/sys/modules/if_ef/Makefile,v retrieving revision 1.13 diff -u -r1.13 Makefile --- sys/modules/if_ef/Makefile 24 Feb 2006 12:27:09 -0000 1.13 +++ sys/modules/if_ef/Makefile 14 Aug 2006 12:47:29 -0000 @@ -19,16 +19,16 @@ #ETHER_SNAP= opt_inet.h: - echo "#define INET 1" > opt_inet.h + echo "#define INET 1" > ${.TARGET} opt_ipx.h: - echo "#define IPX 1" > opt_ipx.h + echo "#define IPX 1" > ${.TARGET} opt_ef.h: - touch opt_ef.h + :> ${.TARGET} .for frame in ETHER_II ETHER_8023 ETHER_8022 ETHER_SNAP .if defined(${frame}) - echo "#define ${frame} 1" >> opt_ef.h + echo "#define ${frame} 1" >> ${.TARGET} .endif .endfor .endif Index: sys/modules/if_ppp/Makefile =================================================================== RCS file: /home/ncvs/src/sys/modules/if_ppp/Makefile,v retrieving revision 1.35 diff -u -r1.35 Makefile --- sys/modules/if_ppp/Makefile 27 Feb 2006 16:56:22 -0000 1.35 +++ sys/modules/if_ppp/Makefile 14 Aug 2006 12:48:11 -0000 @@ -20,18 +20,20 @@ .endif .if !defined(KERNBUILDDIR) -.if ${PPP_INET} > 0 opt_inet.h: + :> ${.TARGET} +.if ${PPP_INET} > 0 echo "#define INET 1" >> ${.TARGET} .endif -.if ${PPP_IPX} > 0 opt_ipx.h: + :> ${.TARGET} +.if ${PPP_IPX} > 0 echo "#define IPX ${PPP_IPX}" >> ${.TARGET} .endif opt_ppp.h: - touch ${.TARGET} + :> ${.TARGET} .if ${PPP_BSDCOMP} > 0 echo "#define PPP_BSDCOMP ${PPP_BSDCOMP}" >> ${.TARGET} .endif Index: sys/modules/netgraph/mppc/Makefile =================================================================== RCS file: /home/ncvs/src/sys/modules/netgraph/mppc/Makefile,v retrieving revision 1.13 diff -u -r1.13 Makefile --- sys/modules/netgraph/mppc/Makefile 14 Oct 2005 23:30:13 -0000 1.13 +++ sys/modules/netgraph/mppc/Makefile 14 Aug 2006 12:48:18 -0000 @@ -20,7 +20,7 @@ .if !defined(KERNBUILDDIR) opt_netgraph.h: - touch ${.TARGET} + :> ${.TARGET} .if ${NETGRAPH_MPPC_COMPRESSION} > 0 echo "#define NETGRAPH_MPPC_COMPRESSION 1" >> ${.TARGET} .endif Index: sys/modules/sound/sound/Makefile =================================================================== RCS file: /home/ncvs/src/sys/modules/sound/sound/Makefile,v retrieving revision 1.18 diff -u -r1.18 Makefile --- sys/modules/sound/sound/Makefile 27 May 2006 16:32:05 -0000 1.18 +++ sys/modules/sound/sound/Makefile 14 Aug 2006 12:48:58 -0000 @@ -22,7 +22,7 @@ # existing one from KERNBUILDDIR which possibly has DEV_ISA defined so # sound.ko is always built without isadma support. opt_isa.h: - touch ${.TARGET} + :> ${.TARGET} .else SRCS+= sndbuf_dma.c --=-=-=--