Date: 03 Mar 2001 01:17:01 +0100 From: Cyrille Lefevre <clefevre@poboxes.com> To: Andrew J Caines <A.J.Caines@altavista.net> Cc: FreeBSD Stable <stable@FreeBSD.ORG> Subject: Re: Automating STABLE updates - update_stable and install_stable Message-ID: <ofvjyade.fsf@gits.dyndns.org> In-Reply-To: Andrew J Caines's message of "Thu, 1 Mar 2001 02:08:07 -0500" References: <20010206232640.E18191@hal9000.bsdonline.org> <20010301020807.E83990@hal9000.bsdonline.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Andrew J Caines <A.J.Caines@altavista.net> writes: > Fixed scripts are still at > > <http://hal9000.bsdonline.org/software/scripts/update_stable> > <http://hal9000.bsdonline.org/software/scripts/install_stable> > > Other comments, suggestions and wads of cash are welcome. well, I'm using the following makefile to do the job : #!/usr/bin/make -f # # @(#) etc:Makefile 1.5 (clefevre@citeweb.net) Mon Feb 12 01:12:51 CET 2001 # # Copyright (c) 2000-2001 Cyrille Lefevre. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # TODO : rel target and maybe dump target # make release RELEASETAG=RELENG_4 CHROOTDIR=/disk1/release/root \ # LOCAL_PATCHES=/disk1/release/patches LOCAL_SCRIPT=/disk1/release/script \ # NOPORTS=YES NODOC=YES NOSRC=YES # NOSHARED=YES RELEASENOUPDATE=YES # ftp://current.jp.FreeBSD.org/pub/FreeBSD/snapshots/i386/ISO-IMAGES/ .MAKEARGS: .dl NCVS= true RELENG= -r RELENG_4 CUSTOM= CUSTOM GENERIC= GENERIC DEBUG?= -g JOBS?= -j4 ALTDIR= # /disk0 ALTFILES= dev/MAKEDEV* etc boot root/.profile root/.kshrc root/.kshdirsrc # GRUBDIR= /usr/local/share/grub/i386-freebsd GRUBFILES= e2fs_stage1_5 fat_stage1_5 ffs_stage1_5 \ minix_stage1_5 reiserfs_stage1_5 stage[12] SPLASHFILES= chuck_nebula.bmp daemon_640.bmp \ dual_chuck-40.bmp saturn_1_640.bmp FORCE_LBA= # --force-lba # -> CHS ! BOOTDEV= /dev/ad0s3 BOOTDIR= /grub BOOTFILES= boot0 mbr $(FLOPFILES:N*.map:Nstage*) ${SPLASHFILES:%=splash/%} FLOPDEV= /dev/fd0 FLOPDIR= /flop FLOPFILES= boot[12] defaults/loader.conf \ grub/device.map grub/menu.lst $(GRUBFILES:N*1_5:%=grub/%) \ loader loader.4th loader.help loader.rc support.4th \ kernel.conf loader.conf loader.conf.local # NOEXEC?= -n AT?= @ DATE!= date +%Y%m%d%H%M DO-MAKE= $(MAKE) -k -f $(.CURDIR)/Makefile FAKE-NOEXEC= $(NOEXEC:M-n:S/-n/exit;/g) FAKE-CVSUP= $(AT)$(FAKE-MAKE:S/-make/-cvsup/) REAL-CVSUP= $(FAKE-CVSUP:S/fake-/real-/) $(NOEXEC) # CVSUPARGS?= FAKE-CVS= $(AT)$(FAKE-MAKE:S/-make/-update/) REAL-CVS= $(FAKE-CVS:S/fake-/real-/) $(NOEXEC) CVS?= cvs # CVSARGS?= FAKE-MAKE= $(AT)$(DO-MAKE) DO-TARGET=$(.TARGET) fake-make REAL-MAKE= $(FAKE-MAKE:S/fake-/real-/) $(NOEXEC) PASS-ARGS= CVSUPARGS="$(CVSUPARGS)" CVSARGS="$(CVSARGS)" \ MAKEARGS="$(MAKEARGS)" TEEARGS="$(TEEARGS)" \ DIR="$(DIR)" TARGET="$(TARGET)" \ CUSTOM="$(CUSTOM)" GENERIC="$(GENERIC)" KERNCONF="$(KERNCONF)" # TARGET?= # MAKEARGS?= TEE?= tee # TEEARGS?= -a LOGDIR?= /var/log/make LOGPRE?= $(DIR:S,/,_,g)$(SUBDIR:S,/,_,g)_ .if defined(TARGET) && !empty(TARGET) LOGFILE?= $(LOGDIR)/$(LOGPRE)$(TARGET:S/real-//).log BEGFILE?= $(LOGDIR)/.$(LOGPRE)$(TARGET:S/real-//).begin ENDFILE?= $(LOGDIR)/.$(LOGPRE)$(TARGET:S/real-//).end .else LOGFILE?= $(LOGDIR)/$(LOGPRE)$(.TARGET:S/real-//).log BEGFILE?= $(LOGDIR)/.$(LOGPRE)$(.TARGET:S/real-//).begin ENDFILE?= $(LOGDIR)/.$(LOGPRE)$(.TARGET:S/real-//).end .endif GREP?= grep GREPARGS?= -B 2 .if defined(ALTDIR) && !empty(ALTDIR) MOUNTED= .$(ALTDIR:S,/,_,g) ALT= alt .else ALT= .endif OLDWAY= gen sys NEWWAY= kern CURWAY= $(OLDWAY) MAIN= some SRCS= src $(CURWAY) doc www etc $(ALT) ports PROG= all least most some cvsup update build install clean $(ALT) .MAIN: $(MAIN) .PHONY: $(SRCS) $(.TARGET:S/$/-all/g) $(SRCS): $(.TARGET:S/$/-all/g) .PHONY: $(PROG) $(SRCS:S/$/-$(.TARGET)/g) $(PROG): $(SRCS:S/$/-$(.TARGET)/g) .PHONY: help usage help usage: @echo "usage: $(MAKE) [category[-target]]... [variable=value]..." @echo " $(MAKE) [[category-]target]... [variable=value]..." @echo "" @echo "categories: $(SRCS)" @echo "targets: $(PROG)" @echo "variables: NCVS RELENG CUSTOM GENERIC ALTDIR DEBUG JOBS NOEXEC AT" @echo "" @echo "defaults: $(MAKE) $(MAIN) NCVS=\"$(NCVS)\" RELENG=\"$(RELENG)\" \\" @echo " CUSTOM=\"$(CUSTOM)\" GENERIC=\"$(GENERIC)\" ALTDIR=\"$(ALTDIR)\" \\" @echo " DEBUG=\"$(DEBUG)\" JOBS=\"$(JOBS)\" NOEXEC=\"$(NOEXEC)\" AT=\"$(AT)\"" .PHONY: boot flop grub boot: [ -d $(BOOTDIR) ] || mkdir $(BOOTDIR) mount $(BOOTDEV)a $(BOOTDIR) grub-install $(FORCE_LBA) --mount-point=$(BOOTDIR) $(BOOTDEV) cd /boot && find $(BOOTFILES) | cpio -pdm $(BOOTDIR)/boot 2>&1 | grep -v newer -[ -f $(BOOTDIR)/kernel ] && chflags noschg $(BOOTDIR)/kernel cp -p /kernel $(BOOTDIR)/kernel -[ -f $(BOOTDIR)/kernel.$(GENERIC) ] && \ chflags noschg $(BOOTDIR)/kernel.$(GENERIC) cp -p /kernel.$(GENERIC) $(BOOTDIR)/kernel.$(GENERIC) umount $(BOOTDIR) flop: disklabel -wB $(FLOPDEV) fd1440 newfs -m 5 -o space $(FLOPDEV)c [ -d $(FLOPDIR) ] || mkdir $(FLOPDIR) mount $(FLOPDEV)c $(FLOPDIR) mkdir -p $(FLOPDIR)/boot/grub cd /boot && find $(FLOPFILES) | cpio -pdm $(FLOPDIR)/boot 2>&1 | grep -v newer kgzip -o $(FLOPDIR)/kernel /kernel umount $(FLOPDIR) grub: flop (echo 'root (fd0)'; echo 'setup $(FORCE_LBA) (fd0)'; echo quit) | \ grub --batch src-all: src-least src-most src-least: src-cvsup src-update src-some: src-build src-install src-most: src-update src-some src-cvsup: src-cvsup-1 src-cvsup-2 src-cvsup-1: $(FAKE-CVSUP) DIR=/usr/src CVSUPARGS=$(SUPFILE) # src src-cvsup-2: $(FAKE-CVSUP) DIR=/usr/src CVSUPARGS=$(SUPFILE1) TEEARGS=-a # crypto src-update: $(FAKE-CVS) DIR=/usr/src CVSARGS="$(RELENG)" src-build: src-build-1 src-build-2 src-build-3 src-build-4 src-build-1: $(FAKE-MAKE) DIR=/usr/src TARGET=buildworld \ MAKEARGS="$(JOBS)" src-build-2: $(FAKE-MAKE) DIR=/usr/src/share/doc \ MAKEARGS="$(JOBS) PRINTERDEVICE=html" src-build-3: -$(FAKE-NOEXEC) $(MKDIR) /usr/obj/usr/src/release/sysinstall src-build-4: $(FAKE-MAKE) DIR=/usr/src/release/sysinstall \ MAKEARGS="$(JOBS) MAKEOBJDIRPREFIX=/usr/obj" src-install: src-install-1 src-install-2 src-install-3 src-install-1: $(FAKE-MAKE) DIR=/usr/src TARGET=installworld src-install-2: $(FAKE-MAKE) DIR=/usr/src/share/doc TARGET=install \ MAKEARGS="PRINTERDEVICE=html" src-install-3: $(FAKE-MAKE) DIR=/usr/src/release TARGET=install \ MAKEARGS="MAKEOBJDIRPREFIX=/usr/obj" src-clean: src-clean-1 src-clean-2 src-clean-3 src-clean-1: $(FAKE-MAKE) DIR=/usr/src TARGET=clean src-clean-2: $(FAKE-MAKE) DIR=/usr/src/share/doc TARGET=clean src-clean-3: $(FAKE-MAKE) DIR=/usr/src/release/sysinstall TARGET=clean \ MAKEARGS="MAKEOBJDIRPREFIX=/usr/obj" .if defined(ALTDIR) && !empty(ALTDIR) src-alt: do-mount do-src-alt do-umount do-src-alt: do-src-alt-1 do-src-alt-2 do-src-alt-1: $(FAKE-MAKE) DIR=/usr/src TARGET=installworld TEEARGS=-a \ MAKEARGS="DESTDIR=$(ALTDIR)" do-src-alt-2: $(FAKE-MAKE) DIR=/usr/src/release/sysinstall TARGET=install TEEARGS=-a \ MAKEARGS="DESTDIR=$(ALTDIR)" .endif kern-all: kern-least kern-most kern-least: kern-cvsup kern-update kern-some: kern-build kern-install kern-most: kern-some kern-cvsup: src-cvsup kern-update: src-update kern-build: kern-build-1 kern-build-1: $(FAKE-MAKE) DIR=/usr/src TARGET=buildkernel \ MAKEARGS="$(JOBS) KERNCONF=\\\"$(CUSTOM)\\ $(GENERIC)\\\"" # DEBUG=$(DEBUG) kern-install: kern-install-1 kern-install-2 kern-install-3 \ kern-install-4 kern-install-5 kern-install-1: $(FAKE-MAKE) DIR=/usr/src TARGET=installkernel \ MAKEARGS="KERNCONF=$(CUSTOM)" kern-install-2: $(FAKE-MAKE) DIR=/usr/src TARGET=installkernel TEEARGS=-a \ MAKEARGS="KERNCONF=$(GENERIC)" kern-install-3: -$(FAKE-NOEXEC) for KERNEL in $(CUSTOM) $(GENERIC); do \ chflags noschg /$$KERNEL /kernel.$$KERNEL; \ mv /$$KERNEL /kernel.$$KERNEL; \ chflags schg /kernel.$$KERNEL; \ cp -p /kernel.$$KERNEL /kernel.$$KERNEL.$(DATE); \ done kern-install-4: -$(FAKE-NOEXEC) chflags noschg /kernel kern-install-5: $(FAKE-NOEXEC) cp -p /kernel.$(CUSTOM) /kernel kern-clean: $(FAKE-NOEXEC) echo "no cleankernel target right now !" .if defined(ALTDIR) && !empty(ALTDIR) kern-alt: do-mount do-kern-alt do-umount do-kern-alt: do-kern-alt-1 do-kern-alt-2 do-kern-alt-3 do-kern-alt-4 \ do-kern-alt-5 do-kern-alt-6 do-kern-alt-7 do-kern-alt-8 do-kern-alt-1: -$(FAKE-NOEXEC) chflags noschg $(ALTDIR)/kernel $(ALTDIR)/$(GENERIC) do-kern-alt-2: -$(FAKE-NOEXEC) rm -f $(ALTDIR)/kernel $(ALTDIR)/$(GENERIC) do-kern-alt-3: $(FAKE-MAKE) DIR=/usr/src TARGET=installkernel TEEARGS=-a \ MAKEARGS="DESTDIR=$(ALTDIR) KERNCONF=$(CUSTOM)" do-kern-alt-4: $(FAKE-MAKE) DIR=/usr/src TARGET=installkernel TEEARGS=-a \ MAKEARGS="DESTDIR=$(ALTDIR) KERNCONF=$(GENERIC)" do-kern-alt-5: -$(FAKE-NOEXEC) for KERNEL in $(CUSTOM) $(GENERIC); do \ chflags noschg $(ALTDIR)/$$KERNEL; \ done do-kern-alt-6: -$(FAKE-NOEXEC) mv $(ALTDIR)/$(CUSTOM) $(ALTDIR)/kernel do-kern-alt-7: -$(FAKE-NOEXEC) mv $(ALTDIR)/$(GENERIC) $(ALTDIR)/kernel.$(GENERIC) do-kern-alt-8: $(FAKE-NOEXEC) chflags schg $(ALTDIR)/kernel $(ALTDIR)/kernel.$(GENERIC) .endif gen-all: gen-least gen-most gen-least: gen-cvsup gen-update gen-some: gen-build gen-install gen-most: gen-some gen-cvsup: src-cvsup gen-update: src-update gen-build: gen-build-1 gen-build-2 gen-build-3 gen-build-1: $(FAKE-NOEXEC) cd /sys/i386/conf && config $(GENERIC) gen-build-2: $(FAKE-MAKE) DIR=/sys/compile/$(GENERIC) TARGET=depend gen-build-3: $(FAKE-MAKE) DIR=/sys/compile/$(GENERIC) \ MAKEARGS="$(JOBS) KERNEL=kernel.$(GENERIC) DEBUG=$(DEBUG)" gen-install: gen-install-1 gen-install-2 gen-install-1: $(FAKE-MAKE) DIR=/sys/compile/$(GENERIC) TARGET=install \ MAKEARGS="KERNEL=kernel.$(GENERIC)" gen-install-2: $(FAKE-NOEXEC) cp -p /kernel.$(GENERIC) /kernel.$(GENERIC).$(DATE) gen-clean: $(FAKE-MAKE) DIR=/sys/compile/$(GENERIC) TARGET=clean \ MAKEARGS="KERNEL=kernel.$(GENERIC)" .if defined(ALTDIR) && !empty(ALTDIR) gen-alt: do-mount do-gen-alt do-umount do-gen-alt: do-gen-alt-1 do-gen-alt-2 do-gen-alt-3 do-gen-alt-4 do-gen-alt-1: -$(FAKE-NOEXEC) rm -rf $(ALTDIR)/kernel.$(GENERIC).old do-gen-alt-2: -$(FAKE-NOEXEC) mkdir -p $(ALTDIR)/kernel.$(GENERIC).old/kernel.$(GENERIC) do-gen-alt-3: $(FAKE-MAKE) DIR=/sys/compile/$(GENERIC) TARGET=install TEEARGS=-a \ MAKEARGS="DESTDIR=$(ALTDIR) KERNEL=kernel.$(GENERIC)" do-gen-alt-4: # do-gen-alt-1 # doesn't work ! -$(FAKE-NOEXEC) rm -rf $(ALTDIR)/kernel.$(GENERIC).old .endif sys-all: sys-least sys-most sys-least: sys-cvsup sys-update sys-some: sys-build sys-install sys-most: sys-some sys-cvsup: src-cvsup sys-update: src-update sys-build: sys-build-1 sys-build-2 sys-build-3 sys-build-1: $(FAKE-NOEXEC) cd /sys/i386/conf && config $(CUSTOM) sys-build-2: $(FAKE-MAKE) DIR=/sys/compile/$(CUSTOM) TARGET=depend sys-build-3: $(FAKE-MAKE) DIR=/sys/compile/$(CUSTOM) \ MAKEARGS="$(JOBS) DEBUG=$(DEBUG)" sys-install: sys-install-1 sys-install-2 sys-install-3 \ sys-install-4 sys-install-5 sys-install-1: $(FAKE-MAKE) DIR=/sys/compile/$(CUSTOM) TARGET=install sys-install-2: $(FAKE-NOEXEC) mv /kernel.old /kernel.$(CUSTOM).old sys-install-3: $(FAKE-NOEXEC) cp -p /kernel /kernel.$(CUSTOM).$(DATE) sys-install-4: -$(FAKE-NOEXEC) chflags noschg /kernel.$(CUSTOM) sys-install-5: $(FAKE-NOEXEC) cp -p /kernel /kernel.$(CUSTOM) sys-clean: $(FAKE-MAKE) DIR=/sys/compile/$(CUSTOM) TARGET=clean .if defined(ALTDIR) && !empty(ALTDIR) sys-alt: do-mount do-sys-alt do-umount do-sys-alt: do-sys-alt-1 do-sys-alt-2 do-sys-alt-3 do-sys-alt-4 do-sys-alt-1: -$(FAKE-NOEXEC) rm -rf $(ALTDIR)/kernel.old do-sys-alt-2: -$(FAKE-NOEXEC) mkdir -p $(ALTDIR)/kernel.old/kernel do-sys-alt-3: $(FAKE-MAKE) DIR=/sys/compile/$(CUSTOM) TARGET=install TEEARGS=-a \ MAKEARGS="DESTDIR=$(ALTDIR)" do-sys-alt-4: # do-sys-alt-1 # doesn't work! -$(FAKE-NOEXEC) rm -rf $(ALTDIR)/kernel.old .endif etc-all: etc-least etc-most etc-least: etc-cvsup etc-update etc-some: etc-build etc-install etc-most: etc-some etc-cvsup: src-cvsup etc-update: src-update etc-build: etc-install: etc-install-1 etc-install-2 etc-install-3 etc-install-1: $(FAKE-NOEXEC) mergemaster # -t $(ETCDIR) etc-install-2: $(FAKE-NOEXEC) cd /dev && sh MAKEDEV all etc-install-3: $(FAKE-NOEXEC) cd /dev && sh MAKEDEV.local all etc-clean: .if defined(ALTDIR) && !empty(ALTDIR) etc-alt: do-mount do-etc-alt do-umount do-etc-alt: do-etc-alt-1 do-etc-alt-2 do-etc-alt-3 do-etc-alt-4 do-etc-alt-5 do-etc-alt-1: $(FAKE-NOEXEC) touch $(ALTDIR)/etc/fstab do-etc-alt-2: $(FAKE-NOEXEC) cd / && \ find $(ALTFILES) -name splash -prune -o -print | \ cpio -pdm $(ALTDIR) 2>&1 | grep -v 'newer or same' do-etc-alt-3: $(FAKE-NOEXEC) cd $(ALTDIR)/dev && sh MAKEDEV all do-etc-alt-4: $(FAKE-NOEXEC) cd $(ALTDIR)/dev && sh MAKEDEV.local all do-etc-alt-5: $(FAKE-NOEXEC) . /boot/loader.conf.local && [ -n "$$bitmap_name" ] && \ echo $$bitmap_name | cpio -pdm $(ALTDIR) 2>&1 | grep -v 'newer or same' .endif .if defined(ALTDIR) && !empty(ALTDIR) alt-all: alt-least alt-most alt-least: alt-cvsup alt-update alt-some: alt-build alt-install alt-most: alt-some alt-cvsup: src-cvsup alt-update: src-update alt-build: src-build alt-install: do-mount do-alt-install do-umount do-alt-install: do-alt-install-1 do-alt-install-2 do-alt-install-3 do-alt-install-1: -$(FAKE-NOEXEC) chflags noschg $(ALTDIR)/kernel && \ rm -rf $(ALTDIR)/kernel do-alt-install-2: -$(FAKE-NOEXEC) chflags noschg $(ALTDIR)/kernel.$(GENERIC) && \ rm -rf $(ALTDIR)/kernel.$(GENERIC) do-alt-install-3: $(SRCS:S/^/do-/g:S/$/-alt/g) alt-alt: do-alt-alt: .endif doc-all: doc-least doc-most doc-least: doc-cvsup doc-update doc-some: doc-most: doc-update doc-build doc-install doc-cvsup: $(FAKE-CVSUP) DIR=/usr/doc CVSUPARGS=$(DOCSUPFILE) # doc doc-update: $(FAKE-CVS) DIR=/usr/doc \ CVSARGS="Makefile README share $(DOC_LANG)" doc-build: $(FAKE-MAKE) DIR=/usr/doc # MAKEARGS="$(JOBS)" doc-install: $(FAKE-MAKE) DIR=/usr/doc TARGET=install doc-clean: $(FAKE-MAKE) DIR=/usr/doc TARGET=clean .if defined(ALTDIR) && !empty(ALTDIR) doc-alt: do-doc-alt: .endif www-all: www-least www-most www-least: www-cvsup www-update www-some: www-most: www-update www-build www-install www-cvsup: doc-cvsup www-update: $(FAKE-CVS) DIR=/usr SUBDIR=/www \ CVSARGS="www/Makefile www/Makefile.inc www/share www/en" www-build: www-build-1 www-build-1: $(FAKE-MAKE) DIR=/usr/www # MAKEARGS="$(JOBS)" www-install: $(FAKE-MAKE) DIR=/usr/www TARGET=install www-clean: $(FAKE-MAKE) DIR=/usr/www TARGET=clean .if defined(ALTDIR) && !empty(ALTDIR) www-alt: do-www-alt: .endif ports-all: ports-least ports-most ports-least: ports-cvsup ports-update ports-some: ports-build ports-install ports-most: ports-update ports-some ports-cvsup: $(FAKE-CVSUP) DIR=/usr/ports CVSUPARGS=$(PORTSSUPFILE) # ports ports-update: $(FAKE-CVS) DIR=/usr/ports ports-build: ports-install: ports-clean: .if defined(ALTDIR) && !empty(ALTDIR) ports-alt: do-ports-alt: .endif .if defined(ALTDIR) && !empty(ALTDIR) .PHONY: do-mount do-umount do-mount: $(FAKE-NOEXEC) rm -f $(MOUNTED) $(FAKE-NOEXEC) mount | grep -q $(ALTDIR) && touch $(MOUNTED) || mount $(ALTDIR) do-umount: $(FAKE-NOEXEC) if [ -f $(MOUNTED) ]; then \ rm -f $(MOUNTED) ; \ else \ umount $(ALTDIR) ; \ sleep 5 ; zzz ; \ fi .endif .PHONY: fake-cvsup fake-update fake-make real-cvsup real-update real-make # the reason of the use of an intermediate make level is if you # put some stuff in /etc/make.conf which depends on the current # directory. what do I do, of course :) fake-cvsup fake-update fake-make: $(AT)cd $(DIR) && $(DO-MAKE) $(DO-TARGET) \ FAKE-CVSUP="$(REAL-CVSUP)" \ FAKE-CVS="$(REAL-CVS)" \ FAKE-MAKE="$(REAL-MAKE)" \ $(PASS-ARGS) real-cvsup: -cd $(DIR) && [ -f $(LOGFILE) ] && \ case "$(TEEARGS)" in *-a*) ;; *) mv -f $(LOGFILE) $(LOGFILE).old ;; esac -cd $(DIR) && case "$(TEEARGS)" in *-a*) ;; *) touch $(BEGFILE) ;; esac cd $(DIR) && $(SUP) $(SUPFLAGS) $(CVSUPARGS) 2>&1 | \ $(TEE) $(TEEARGS) $(LOGFILE) -cd $(DIR) && case "$(TEEARGS)" in *-a*) ;; *) touch $(ENDFILE) ;; esac .if defined(NCVS) real-update: -cd $(DIR) && [ -f $(LOGFILE) ] && \ case "$(TEEARGS)" in *-a*) ;; *) mv -f $(LOGFILE) $(LOGFILE).old ;; esac -cd $(DIR) && case "$(TEEARGS)" in *-a*) ;; *) touch $(BEGFILE) ;; esac cd $(DIR) && $(CVS) update $(CVSARGS) 2>&1 | \ $(TEE) $(TEEARGS) $(LOGFILE) -cd $(DIR) && case "$(TEEARGS)" in *-a*) ;; *) touch $(ENDFILE) ;; esac .else real-update: .endif real-make: -cd $(DIR) && [ -f $(LOGFILE) ] && \ case "$(TEEARGS)" in *-a*) ;; *) mv -f $(LOGFILE) $(LOGFILE).old ;; esac -cd $(DIR) && case "$(TEEARGS)" in *-a*) ;; *) touch $(BEGFILE) ;; esac cd $(DIR) && $(MAKE) -k $(MAKEARGS) $(TARGET) 2>&1 | \ $(TEE) $(TEEARGS) $(LOGFILE) -cd $(DIR) && case "$(TEEARGS)" in *-a*) ;; *) touch $(ENDFILE) ;; esac # cd $(DIR) && $(GREP) $(GREPARGS) Error $(LOGFILE) # eof Cyrille. -- home: mailto:clefevre@poboxes.com UNIX is user-friendly; it's just particular work: mailto:Cyrille.Lefevre@edf.fr about who it chooses to be friends with. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ofvjyade.fsf>