Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/csu



>> I can comment out the MAKEOBJDIR assignment in nbmake-amd64 and it still
>> works fine. BSDOBJDIR doesn't seem to do anything. BUILDID breaks this.
>> I have no idea why those variables even exist, the code in bsd.own.mk is
>> messy at best and I don't think it justifies the changes to the
>> Makefiles. As such, please either kill BUILDID or find a proper fix and
>> backout this change.

FWIW I think I last used BSDOBJDIR etc 10+ years ago.
I tend to use something like:

MAKEOBJDIR='${.CURDIR:S,${SRCTOP},${OBJTOP},}'

>The attached patch seems to sort this out.

I didn't follow the conversation, how is this patch relevant to BUILDID?

>Index: src/usr.bin/make/parse.c
>===================================================================
>--- src/usr.bin/make/parse.c
>+++ src/usr.bin/make/parse.c
>@@ -2206,11 +2206,12 @@
>     char *dirname;
>     int len;
> 
>     slash = strrchr(filename, '/');
>     if (slash == NULL) {
>-      Var_Set(".PARSEDIR", ".", VAR_GLOBAL, 0);
>+      extern char curdir[];

I thought scoped externs like this were frowned on?

>+      Var_Set(".PARSEDIR", curdir, VAR_GLOBAL, 0);
>       Var_Set(".PARSEFILE", filename, VAR_GLOBAL, 0);


Home | Main Index | Thread Index | Old Index