From owner-freebsd-hackers Fri May 31 19:54:51 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from w250.z064001178.sjc-ca.dsl.cnc.net (adsl-66.218.45.239.dslextreme.com [66.218.45.239]) by hub.freebsd.org (Postfix) with SMTP id BFFA837B449 for ; Fri, 31 May 2002 19:54:37 -0700 (PDT) Received: (qmail 1468 invoked by uid 1000); 1 Jun 2002 02:54:57 -0000 Date: Fri, 31 May 2002 19:54:35 -0700 From: Jos Backus To: Julian Elischer Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Improving GNU make compatibility in BSD make (+ patch) Message-ID: <20020601025457.GA1457@lizzy.catnook.com> Reply-To: jos@catnook.com Mail-Followup-To: Julian Elischer , freebsd-hackers@FreeBSD.ORG References: <20020601015343.GA1132@lizzy.catnook.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.99i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, May 31, 2002 at 06:55:54PM -0700, Julian Elischer wrote: > what would you want to do? > > On Fri, 31 May 2002, Jos Backus wrote: > > > Fyi: it appears nobody is really interested in having BSD make and GNU make > > converge a little, so I am not going waste any more time on this. BSD make and GNU make use different symbols for .ALLSRC: GNU make uses $^ and BSD make uses $>. All my tiny patch to BSD make does is have BSD make treat $^ as $>. This fixes the problem of the mktool Makefile which with this patch is executed properly by both make's. Perhaps there is a better way to achieve this but I don't see it. Since BSD make (or OpenBSD make, for that matter) doesn't currently use $^ I thought it was a pretty safe and useful change. Thanks for caring! CC?=gcc OPT=-O2 -march=i686 #DEBUG=-g -pedantic -Wall -Werror LDFLAGS=-s CFLAGS=$(OPT) $(DEBUG) PROGS=envuidgid setugid tcpaccept tcplisten execlp bsok babysit BINMODE?=555 prefix=/usr/local bindir=$(prefix)/bin .c.o: $(CC) $(CFLAGS) -c $< all: $(PROGS) envuidgid: envuidgid.o $(CC) $(LDFLAGS) -o $@ $^ setugid: setugid.o setonlygid.o $(CC) $(LDFLAGS) -o $@ $^ tcpaccept: tcpaccept.o signal_action.o $(CC) $(LDFLAGS) -o $@ $^ tcplisten: tcplisten.o $(CC) $(LDFLAGS) -o $@ $^ execlp: execlp.o $(CC) $(LDFLAGS) -o $@ $^ babysit: babysit.o signal_action.o file_lock.o $(CC) $(LDFLAGS) -o $@ $^ bsok: bsok.o $(CC) $(LDFLAGS) -o $@ $^ $(bindir): mkdir -pm 755 $(bindir) clean: rm -f $(PROGS) install: $(PROGS) $(bindir) install -m $(BINMODE) $(PROGS) $(bindir) -- Jos Backus _/ _/_/_/ Santa Clara, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ jos@catnook.com _/_/ _/_/_/ use Std::Disclaimer; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message