From owner-freebsd-stable Thu Jan 4 17:30:48 2001 From owner-freebsd-stable@FreeBSD.ORG Thu Jan 4 17:30:44 2001 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mail.gmx.net (pop.gmx.net [194.221.183.20]) by hub.freebsd.org (Postfix) with SMTP id 6E29337B400 for ; Thu, 4 Jan 2001 17:30:43 -0800 (PST) Received: (qmail 26112 invoked by uid 0); 5 Jan 2001 01:30:41 -0000 Received: from p3e9bc23d.dip.t-dialin.net (HELO forge.local) (62.155.194.61) by mail.gmx.net (mail08) with SMTP; 5 Jan 2001 01:30:41 -0000 Received: from thomas by forge.local with local (Exim 3.16 #1 (Debian)) id 14ELhp-0000J0-00; Fri, 05 Jan 2001 02:30:09 +0100 Date: Fri, 5 Jan 2001 02:30:09 +0100 To: David Wolfskill Cc: stable@FreeBSD.ORG Subject: Re: make vs. gmake (was: Re: Roadmap for perl upgrades to STABLE?) Message-ID: <20010105023009.A1100@crow.dom2ip.de> Mail-Followup-To: tmoestl@gmx.net, David Wolfskill , stable@FreeBSD.ORG References: <20001226231547.R72273@elvis.mu.org> <200101041616.f04GGsh72194@pau-amma.whistle.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200101041616.f04GGsh72194@pau-amma.whistle.com>; from dhw@whistle.com on Thu, Jan 04, 2001 at 08:16:54AM -0800 From: Thomas Moestl Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jan 04, 2001 at 08:16:54AM -0800, David Wolfskill wrote: > >> Not that I'm a fan of the GPL, but wouldn't importation of gmake > >> into the toolchain that gets installed by default help this problem > >> along enormously? > >What can it do that bmake can't? > Compile amanda 2.4.2. :-( > > [Ref. http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23328 -- seems that > some Makefiles created by automake (which the amanda folks use) get > created in a way that cause our make to behave in unexpected ways. I > was able to generate a simpler test case that re-creates the problem > (and it's in the PR), but have no fix, nor is it likely I will be able to > devote the time required to become familiar enough with make's internals > to get much of a clue anytime soon, unfortunately. I expect to be able > to help test, though, and am quite willing to do that.] I have attached a patch (against -CURRENT) that fixes the test case in the PR for me. It would be interesting to know how well it works with real-world examples like the amanda Makefile. I have just rolled a complete "make buildworld" with the patched make without problems. Anyone who is brave enough to try this should make a backup copy of his make anyway, because it is a pain to recover a broken make ;-) Feedback is very welcome! If there are no problems with the patch, I will submit a PR soon. - thomas --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="make.diff" *** src/usr.bin/make/suff.c~ Sat Dec 2 21:24:38 2000 --- src/usr.bin/make/suff.c Fri Jan 5 02:12:31 2001 *************** *** 460,467 **** { Lst_Concat (suffClean, sufflist, LST_CONCLINK); sufflist = Lst_Init(FALSE); ! sNum = 0; suffNull = emptySuff; } /*- --- 460,475 ---- { Lst_Concat (suffClean, sufflist, LST_CONCLINK); sufflist = Lst_Init(FALSE); ! sNum = 1; suffNull = emptySuff; + /* + * Clear suffNull's children list (the other suffixes are built new, but + * suffNull is used as is). + * NOFREE is used because all suffixes are are on the suffClean list. + * suffNull should not have parents. + */ + Lst_Destroy(suffNull->children, NOFREE); + suffNull->children = Lst_Init(FALSE); } /*- *************** *** 714,733 **** Suff *s = (Suff *) sp; char *cp; LstNode ln; ! Suff *s2; /* * First see if it is a transformation from this suffix. */ cp = SuffStrIsPrefix(s->name, transform->name); if (cp != (char *)NULL) { ! ln = Lst_Find(sufflist, (void *)cp, SuffSuffHasNameP); ! if (ln != NULL) { /* * Found target. Link in and return, since it can't be anything * else. */ - s2 = (Suff *)Lst_Datum(ln); SuffInsert(s2->children, s); SuffInsert(s->parents, s2); return(0); --- 722,746 ---- Suff *s = (Suff *) sp; char *cp; LstNode ln; ! Suff *s2 = NULL; /* * First see if it is a transformation from this suffix. */ cp = SuffStrIsPrefix(s->name, transform->name); if (cp != (char *)NULL) { ! if (cp[0] == '\0') /* null rule */ ! s2 = suffNull; ! else { ! ln = Lst_Find(sufflist, (void *)cp, SuffSuffHasNameP); ! if (ln != NULL) ! s2 = (Suff *)Lst_Datum(ln); ! } ! if (s2 != NULL) { /* * Found target. Link in and return, since it can't be anything * else. */ SuffInsert(s2->children, s); SuffInsert(s->parents, s2); return(0); *************** *** 2359,2365 **** void * s; void * dummy; { ! printf ("%s ", ((Suff *) s)->name); return (dummy ? 0 : 0); } --- 2372,2378 ---- void * s; void * dummy; { ! printf ("`%s' ", ((Suff *) s)->name); return (dummy ? 0 : 0); } --OXfL5xGRrasGEqWY-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message