From owner-freebsd-hackers Wed Sep 27 05:51:53 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id FAA29539 for hackers-outgoing; Wed, 27 Sep 1995 05:51:53 -0700 Received: from UUCP-GW.CC.UH.EDU (root@UUCP-GW.CC.UH.EDU [129.7.1.11]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id FAA29530 for ; Wed, 27 Sep 1995 05:51:45 -0700 Received: from Taronga.COM by UUCP-GW.CC.UH.EDU with UUCP id AA05112 (5.67a/IDA-1.5); Wed, 27 Sep 1995 07:46:53 -0500 Received: (from peter@localhost) by bonkers.taronga.com (8.6.11/8.6.9) id HAA10105; Wed, 27 Sep 1995 07:32:24 -0500 Date: Wed, 27 Sep 1995 07:32:24 -0500 From: peter@taronga.com (Peter da Silva) Message-Id: <199509271232.HAA10105@bonkers.taronga.com> To: kelly@fsl.noaa.gov, hackers@freebsd.org Subject: Re: ports startup scripts In-Reply-To: <9509261306.AA14836@emu.fsl.noaa.gov> References: <199509260541.AAA04042@chrome.jdl.com> Organization: Taronga Park BBS Sender: owner-hackers@freebsd.org Precedence: bulk In article <9509261306.AA14836@emu.fsl.noaa.gov>, Sean Kelly wrote: >That suggests to me that our startup ought to be driven by make and >not sh, then. But then there's the problem of auto-editing Makefiles. No, don't auto-*edit* makefiles. Auto-*generate* makefiles. exec 3>&1 exec >/etc/Makefile cat /etc/pkg.d/.base/Makefile start="start:" stop="stop:" for i in /etc/pkg.d/* do pkg=`basename $i` if [ -f $i/start.mk ] then if [ -f $i/start.dep ] then echo "$pkg-start: `cat $i/start.dep`" else echo "$pkg-start:" fi cat $i/start.mk start="$start $pkg-start" fi echo "" if [ -f $i/stop.mk ] then if [ -f $i/stop.dep ] then echo "$pkg-stop: `cat $i/stop.dep`" else echo "$pkg-stop:" fi cat $i/stop.mk stop="$stop $pkg-stop" fi echo "" done echo $start echo $stop exec >&3 exec 3>&- Now you can "cd /etc; make start". >Maybe we can auto-edit Imakefiles more safely? Imake is *evil*. Evil, evil, evil, evil. Using cpp as a general preprocessor works, barely, for X. Don't drive anything else down that path.