Subject: Re: bmake and bootstrap and own.mk and MKCONF
To: Jeremy C. Reed <reed@reedmedia.net>
From: Simon J. Gerraty <sjg@crufty.net>
List: tech-pkg
Date: 10/07/2005 08:28:35
>These are against bmake-20050901.tar.gz.

Thanks, these mostly look reasonable.
Some questions/comments below

>-.if (${OS} != "NetBSD" && ${OS} != "FreeBSD" && ${OS} != "OpenBSD")
>+.if (${OS} != "NetBSD" && ${OS} != "FreeBSD" && ${OS} != "OpenBSD" && ${OS} !
>= "DragonFly")

This list is likely to get longer.  I'll probably change to

BSDs+= NetBSD FreeBSD OpenBSD DragonFly

.if ${BSDs:S/${OS}//} != ${BSDs}
# OS is a member of BSDs
.endif
.if ${BSDs:S/${OS}//} == ${BSDs}
# OS is not a member of BSDs
.endif

better name than BSDs (that doesn't conflict with anyone's TM)?

>--- tmp/bmake/machine.sh	2003-07-10 23:16:35.000000000 -0700
>+++ devel/bmake/files/machine.sh	2005-09-16 16:37:08.000000000 -0700
>@@ -32,7 +32,8 @@ esac
>  # Great! Solaris keeps moving arch(1)
>  # we need this here, and it is not always available...
>  Which() {
>-	for d in `IFS=:; echo ${2:-$PATH}`
>+	pathcomponents=`IFS=:; echo ${2:-$PATH}`
>+	for d in ${pathcomponents}

Ok curious, what's the point of this change?
If it is only for debug (so you see something when sh -x)
I typically use

>  	do
		: checking $d
>  		test -x $d/$1 && { echo $d/$1; break; }
>  	done
>+IRIX)
>+	MACHINE_ARCH=`uname -p 2>/dev/null`

This change is unnecessary - machine is already set to uname -p on
platforms that support it, and the default for MACHINE_ARCH is
$machine.

>diff -pruN tmp/bmake/main.c devel/bmake/files/main.c
>--- tmp/bmake/main.c	2005-09-03 15:15:08.000000000 -0700
>+++ devel/bmake/files/main.c	2005-09-16 16:40:19.000000000 -0700
>@@ -1136,7 +1136,16 @@ ReadMakefile(ClientData p, ClientData q
>  		Parse_File("(stdin)", stdin);
>  		Var_Set("MAKEFILE", "", VAR_GLOBAL, 0);
>  	} else {
>+#ifdef __INTERIX
>+		/* XXX tv: Hack pending a fix to bsd.pkg.mk to use some other
>+		   variable name than this.  When using a NFS pkgsrc repository

I'm guessing that this isn't the only system that has problems with
case insensitive filesystems.  This might be better done via config.h

#ifdef HAVE_CASEINSENSITIVE_FILESYSTEM ?

>,
>+		   bmake thinks "makefile" exists when running under "su" even
>+		   though the filesystem is mounted case-sensitive on the
>+		   non-su side.  This hoses all sorts of fun things. */
>+		setMAKEFILE = FALSE;
>+#else
>  		setMAKEFILE = strcmp(fname, ".depend");
>+#endif

Thanks I'll let you know when I've made the appropriate changes.

--sjg