Date: Wed, 27 Sep 1995 07:32:24 -0500 From: peter@taronga.com (Peter da Silva) To: kelly@fsl.noaa.gov, hackers@freebsd.org Subject: Re: ports startup scripts Message-ID: <199509271232.HAA10105@bonkers.taronga.com> In-Reply-To: <9509261306.AA14836@emu.fsl.noaa.gov> References: <199509260541.AAA04042@chrome.jdl.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <9509261306.AA14836@emu.fsl.noaa.gov>, Sean Kelly <kelly@fsl.noaa.gov> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509271232.HAA10105>