pkgsrc-Users archive

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

Re: self bootstrap on Interix 3.5



On Sat, 8 Apr 2006 21:57:41 +0900, OBATA Akio writes:
>Self bootstrap on Interix is succeed.

Cool!

>Please review following patches and check effect on other platforms.
>
>1. DEFAULT_MAKESYSPATH issue (devel/bmake)
>
>Interix have /usr/share/mk/sys.mk and it is no good for pkgsrc.
>for example, 
> CC=c89
>
>I think MAKESYSPATH should be only ${PREFIX}/share/mk.
>Here is a patch.

Hmmm, the build isn't going to work unless a valid sys.mk is found,
and since DEFAULT_MAKESYSPATH is at the end of MAKESYSPATH, if
${PREFIX}/share/mk contains the right stuff, then DEFAULT_MAKESYSPATH
shouldn't make any difference (performance issues aside).

But since bmake was modified to default to ${PREFIX}/share/mk only, 
(at least when built via its boot-strap script) I don't see a particular
problem with this patch.  I'll test it out... (in bmake not pkgsrc).

>Index: devel/bmake/files/makefile.boot.in
>===================================================================
>RCS file: /home/cvsroot/NetBSD/pkgsrc/devel/bmake/files/makefile.boot.in,v
>retrieving revision 1.2
>diff -u -r1.2 makefile.boot.in
>--- devel/bmake/files/makefile.boot.in  10 Nov 2005 00:09:34 -0000      1.2
>+++ devel/bmake/files/makefile.boot.in  8 Apr 2006 11:14:19 -0000
>@@ -13,14 +13,13 @@
> MKDEP_OPTS=-A
> MK=${prefix}/share/mk
> MKSRC=@mksrc@
>-DEFAULT_MAKESYSPATH=/usr/share/mk:/usr/local/share/mk:/opt/share/mk
> CFLAGS=-I. -I$(srcdir) @DEFS@ @CPPFLAGS@ ${XDEFS} -D_PATH_DEFSYSPATH=\"@defau
>lt_sys_path@\"
> MDEFS="-D@force_machine@MACHINE=\"@machine@\"" "-DMACHINE_ARCH=\"@machine_arc
>h@\""
>
> OBJ=arch.o buf.o compat.o cond.o dir.o for.o hash.o job.o main.o make.o \
>     parse.o str.o suff.o targ.o trace.o var.o util.o getopt.o sigcompat.o @LI
>BOBJS@
>
>-BMAKE_ENV= CC="$(CC)" LIBC= MAKEFLAGS= MAKESYSPATH=`pwd`/mk:${MKSRC}:${MK}:${
>DEFAULT_MAKESYSPATH}
>+BMAKE_ENV= CC="$(CC)" LIBC= MAKEFLAGS= MAKESYSPATH=`pwd`/mk:${MKSRC}:${MK}
>
> bootstrap:     bmake.boot .mk.done
>        ${BMAKE_ENV} ./bmake.boot -f Makefile
>===================================================================
>

>2. ${MAKEFILE} issue(devel/bmake)
>
>Unit test of bmake expect ${MAKEFILE} is defined, but not defined on Interix,
>so unit test is failed.
>
>I don't know why this hack exist.
>I think if it is enabled case-sensitivity for the file system,
>it can distinguish b/w [Mm]akefile.

That's handy to know.

>Here is a patch.

I think we need Todd's input here...
I don't have access to one of these systems, so have to go by the input
from those that do. 

--sjg

>Index: devel/bmake/files/main.c
>===================================================================
>RCS file: /home/cvsroot/NetBSD/pkgsrc/devel/bmake/files/main.c,v
>retrieving revision 1.1
>diff -u -r1.1 main.c
>--- devel/bmake/files/main.c    31 Oct 2005 21:34:24 -0000      1.1
>+++ devel/bmake/files/main.c    8 Apr 2006 11:41:06 -0000
>@@ -1136,16 +1136,7 @@
>                Parse_File("(stdin)", stdin);
>                Var_Set("MAKEFILE", "", VAR_GLOBAL, 0);
>        } else {
>-#ifdef __INTERIX
>-               /*
>-                * XXX Hack from tv:
>-                * This system has broken filesystem support - can't
>-                * always distinguish b/w [Mm]akefile.
>-                */
>-               setMAKEFILE = FALSE;
>-#else
>                setMAKEFILE = strcmp(fname, ".depend");
>-#endif
>
>                /* if we've chdir'd, rebuild the path name */
>                if (strcmp(curdir, objdir) && *fname != '/') {



Home | Main Index | Thread Index | Old Index