Date: Mon, 3 Jun 2002 15:49:13 +0800 From: "David Xu" <davidx@viasoft.com.cn> To: "Terry Lambert" <tlambert2@mindspring.com>, <jos@catnook.com> Cc: <freebsd-hackers@FreeBSD.ORG> Subject: Re: Improving GNU make compatibility in BSD make (+ patch) Message-ID: <008201c20ad3$282b0380$ef01a8c0@davidwnt> References: <20020531024250.GA90997@lizzy.catnook.com> <3CF73679.A5AB7886@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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" <tlambert2@mindspring.com> To: <jos@catnook.com> Cc: <freebsd-hackers@FreeBSD.ORG> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?008201c20ad3$282b0380$ef01a8c0>