From owner-freebsd-current@FreeBSD.ORG Mon Mar 17 18:41:34 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84F0B1065670 for ; Mon, 17 Mar 2008 18:41:34 +0000 (UTC) (envelope-from fjoe@samodelkin.net) Received: from atlas57.myplace.ru (atlas57.myplace.ru [80.66.68.57]) by mx1.freebsd.org (Postfix) with ESMTP id A81948FC28 for ; Mon, 17 Mar 2008 18:41:33 +0000 (UTC) (envelope-from fjoe@samodelkin.net) Received: (qmail 31362 invoked from network); 17 Mar 2008 23:57:03 +0600 Received: from gw.nsib.ru (HELO husky.fjoe.local) (217.117.80.2) by atlas57.myplace.ru with (DHE-RSA-AES256-SHA encrypted) SMTP; 17 Mar 2008 23:57:03 +0600 Message-ID: <47DEB51B.4040606@samodelkin.net> Date: Tue, 18 Mar 2008 00:14:51 +0600 From: Max Khon User-Agent: Thunderbird 2.0.0.6 (X11/20071028) MIME-Version: 1.0 To: Pietro Cerutti References: <47DE9BC7.7040108@FreeBSD.org> <47DEAE25.8070600@FreeBSD.org> In-Reply-To: <47DEAE25.8070600@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current Subject: Re: [patch] include_once in make X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Mar 2008 18:41:34 -0000 Pietro Cerutti wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Dear all, > > The updated patch implements the list traversal using the macros in > lst.h (thanks Harti Brandt). > > http://people.freebsd.org/~gahr/make.diff Looks good 1) Unnecessary junk --- make.orig/Makefile 2008-03-14 22:17:10.000000000 +0100 +++ make/Makefile 2008-03-17 14:54:38.000000000 +0100 @@ -3,7 +3,7 @@ # $FreeBSD: src/usr.bin/make/Makefile,v 1.66 2008/03/04 22:32:58 obrien Exp $ PROG= make -CFLAGS+=-I${.CURDIR} +CFLAGS+=-I${.CURDIR} -ggdb SRCS= arch.c buf.c cond.c dir.c for.c hash.c hash_tables.c job.c \ 2) obey style(9): + LstNode *lNode; + if(once) + LST_FOREACH(lNode, &source_makefiles) + if (!strcmp((char *)Lst_Datum(lNode), name)) + return (1); You should have empty line after lNode declaration. You should have space after "if" statement. You'd better enclose if-statement (and if-statement in LST_FOREACH) into curly braces because they are more than one line long 3) again, missing space after "if" + if(!add_ret) + ParsePushInput(fullname, NULL, NULL, 0); I'd also give "add_ret" other name (more descriptive). > Greetings, > > Pietro Cerutti wrote: > | Dear list, > | > | I have a patch which implements the include_once and sinclude_once > | keywords in make. I think it would be useful in cases where a double > | include would mess things up (i.e., ports). > | > | http://people.freebsd.org/~gahr/make.diff > | > | Any comment is welcome! > | > | Regards, > | > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > > - -- > Pietro Cerutti > gahr@FreeBSD.org > > PGP Public Key: > http://gahr.ch/pgp > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.8 (FreeBSD) > > iEYEAREKAAYFAkferiUACgkQwMJqmJVx946+CgCaA7rKXYY6Vo+3/N5AW2ItnSEY > 0coAn1y2jgpmJfw1QX/uvIRVUiL1hcDm > =zP7A > -----END PGP SIGNATURE----- > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"