From owner-freebsd-hackers Mon Jun 3 0:56: 4 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.viasoft.com.cn (ip-167-164-97-218.anlai.com [218.97.164.167]) by hub.freebsd.org (Postfix) with ESMTP id 9E20537B405 for ; Mon, 3 Jun 2002 00:55:56 -0700 (PDT) Received: from davidwnt (davidwnt.viasoft.com.cn [192.168.1.239]) by mail.viasoft.com.cn (8.9.3/8.9.3) with SMTP id QAA27431; Mon, 3 Jun 2002 16:10:42 +0800 Message-ID: <008201c20ad3$282b0380$ef01a8c0@davidwnt> From: "David Xu" To: "Terry Lambert" , Cc: References: <20020531024250.GA90997@lizzy.catnook.com> <3CF73679.A5AB7886@mindspring.com> Subject: Re: Improving GNU make compatibility in BSD make (+ patch) Date: Mon, 3 Jun 2002 15:49:13 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 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 The reason that autoconf & automake can only run under gmake is=20 gmake will re-read included file if the included file itself is modified = by some rules. BSD make does not! so they do not work with BSD make. for example: DEP_FILES =3D aaa.d bbb.d ccc.d $(DEP_FILES): %.d : %.cpp @echo "Generating auto dependency for $<" @$(SHELL) -ec '$(GXX) -MM $(CXXFLAGS) $< \ | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ [ -s $@ ] || rm -f $@' -include $(DEP_FILES) when aaa.d and bbb.d and ccc.d are updated, gmake will re-readed it in = while BSD make not. in this example, if I use BSD make, I must first create target "depend" = in Makefile and run the stupid "make depend" command everytime I modified my source = code, with gmake, I can always run "make" without additional steps and it will = generates auto-depend rule before compiling real source code. David Xu ----- Original Message -----=20 From: "Terry Lambert" To: Cc: Sent: Friday, May 31, 2002 4:38 PM Subject: Re: Improving GNU make compatibility in BSD make (+ patch) > Jos Backus wrote: > > So BSD make interpreting either `$^' or `$+' as its own `$>' would = improve > > compatibility with GNU make Makefiles. I am just not sure which of = the two GNU > > make variables maps better to our `$>'. This patch implements the = former: >=20 > The biggest problem with GNU make that I've seen is re-expansion > of variable variables. >=20 > The suggested fix doesn't address that, so it won't fix the most > common "compatability problem". >=20 > If we are going to evolve make into gmake (not a good idea, IMO), > then probably the place to start is "any port that requires gmake" > to get it working under "make". >=20 > I'm not sure, but I believe the other BSD's, and "OpenPorts" have > modified "make" syntax somewhat. It's probably a good idea to keep > compatability with options in the "OpenPorts" camp, more than any > other, if it ever evolves to fulfill its potential properly. >=20 > I really hate that many autoconf/automake scripts generate code > that can ony be run by gmake, and sometimes also requires that > /bin/sh actually be "bash" instead of "sh". >=20 > It also occurs to me (from experience with "perl"), that in any > language where it's posible to do something in more than one way, > it is then impossible to differentiate "the right way" from "the > wrong way". 8-(. >=20 > -- Terry >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message