[patch] include_once in make
Max Khon
fjoe at samodelkin.net
Mon Mar 17 11:41:34 PDT 2008
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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
>
> - --
> Pietro Cerutti
> gahr at 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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
More information about the freebsd-current
mailing list