diff options
author | jlam <jlam@pkgsrc.org> | 2004-08-23 03:44:34 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-08-23 03:44:34 +0000 |
commit | f79acda48d43e57f5bf9c5890c0fd96fe26d6910 (patch) | |
tree | 40459e0078ac1500d96a808829be7d1c45a1997e /bootstrap | |
parent | f8dd9611442914c779dc2594d00f2334eb959510 (diff) | |
download | pkgsrc-f79acda48d43e57f5bf9c5890c0fd96fe26d6910.tar.gz |
* Modify bmake to use libnbcompat to ensure that a regex implementation
exists.
* nbsed-20040821 requires libnbcompat, so make the appropriate
adjustments to the build to use it.
* If nbsed is built during bootstrap, then use it as the sed for
pkg_install so that the correct program is embedded into the pkg_view
and linkfarm scripts.
* We don't need bmake to build any of the bootstrap packages, so just
call out to the system make.
Diffstat (limited to 'bootstrap')
-rw-r--r-- | bootstrap/bmake/Makefile.in | 6 | ||||
-rw-r--r-- | bootstrap/bmake/makefile.boot.in | 4 | ||||
-rw-r--r-- | bootstrap/bmake/var.c | 17 | ||||
-rwxr-xr-x | bootstrap/bootstrap | 25 | ||||
-rw-r--r-- | bootstrap/mods/bmake/Makefile.in | 6 |
5 files changed, 36 insertions, 22 deletions
diff --git a/bootstrap/bmake/Makefile.in b/bootstrap/bmake/Makefile.in index baa2dc8b379..22262b9bd05 100644 --- a/bootstrap/bmake/Makefile.in +++ b/bootstrap/bmake/Makefile.in @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.in,v 1.1.1.1 2004/03/11 13:04:14 grant Exp $ +# $NetBSD: Makefile.in,v 1.2 2004/08/23 03:44:34 jlam Exp $ # @(#)Makefile 5.2 (Berkeley) 12/28/90 -# $Id: Makefile.in,v 1.1.1.1 2004/03/11 13:04:14 grant Exp $ +# $Id: Makefile.in,v 1.2 2004/08/23 03:44:34 jlam Exp $ # you can use this Makefile if you have an earlier version of bmake. prefix= @prefix@ @@ -14,7 +14,9 @@ MACHINE_ARCH=@machine_arch@ CFLAGS+= -I. -I${srcdir} @DEFS@ @CPPFLAGS@ ${XDEFS} ${CFLAGS_${.TARGET:T}} CFLAGS_main.o= "-DMAKE_VERSION=\"${MAKE_VERSION}\"" +LDFLAGS= @LDFLAGS@ LIBOBJS= @LIBOBJS@ +LDADD= @LIBS@ PROG= bmake SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ diff --git a/bootstrap/bmake/makefile.boot.in b/bootstrap/bmake/makefile.boot.in index 390b4596760..35e88e36302 100644 --- a/bootstrap/bmake/makefile.boot.in +++ b/bootstrap/bmake/makefile.boot.in @@ -1,5 +1,5 @@ # RCSid: -# $Id: makefile.boot.in,v 1.1.1.1 2004/03/11 13:04:10 grant Exp $ +# $Id: makefile.boot.in,v 1.2 2004/08/23 03:44:34 jlam Exp $ # # modify MACHINE and MACHINE_ARCH as appropriate for your target architecture @@ -27,7 +27,7 @@ bmake: bmake.boot bmake.boot: ${OBJ} (cd lst.lib; $(MAKE) -f makefile.boot CC="$(CC)" CFLAGS="-I.. -I${srcdir}/.. ${CFLAGS}" ) - ${CC} *.o -o $@ @LIBS@ + ${CC} *.o -o $@ @LDFLAGS@ @LIBS@ rm -f *.[ado] */*.[ado] bootstrap: bmake.boot diff --git a/bootstrap/bmake/var.c b/bootstrap/bmake/var.c index 48cf7de5e00..76688887698 100644 --- a/bootstrap/bmake/var.c +++ b/bootstrap/bmake/var.c @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.1.1.1 2004/03/11 13:04:14 grant Exp $ */ +/* $NetBSD: var.c,v 1.2 2004/08/23 03:44:34 jlam Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -39,20 +39,20 @@ */ #ifdef MAKE_BOOTSTRAP -static char rcsid[] = "$NetBSD: var.c,v 1.1.1.1 2004/03/11 13:04:14 grant Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.2 2004/08/23 03:44:34 jlam Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.1.1.1 2004/03/11 13:04:14 grant Exp $"); +__RCSID("$NetBSD: var.c,v 1.2 2004/08/23 03:44:34 jlam Exp $"); #endif #endif /* not lint */ #endif #if !defined(MAKE_BOOTSTRAP) && !defined(lint) -__IDSTRING(rcs_id,"$Id: var.c,v 1.1.1.1 2004/03/11 13:04:14 grant Exp $"); +__IDSTRING(rcs_id,"$Id: var.c,v 1.2 2004/08/23 03:44:34 jlam Exp $"); #endif /*- @@ -100,7 +100,16 @@ __IDSTRING(rcs_id,"$Id: var.c,v 1.1.1.1 2004/03/11 13:04:14 grant Exp $"); #include <ctype.h> #ifndef NO_REGEX #include <sys/types.h> +#include <nbcompat/nbconfig.h> +/* bmake supplies its own <sys/cdefs.h> so this header is always present. */ +#ifndef HAVE_SYS_CDEFS_H +#define HAVE_SYS_CDEFS_H 1 +#endif +#if HAVE_REGEX_H #include <regex.h> +#else +#include <nbcompat/regex.h> +#endif #endif #include <stdlib.h> #include "make.h" diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap index 7ca281f2a49..64ce9cf2092 100755 --- a/bootstrap/bootstrap +++ b/bootstrap/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: bootstrap,v 1.18 2004/05/11 02:07:19 schmonz Exp $ +# $NetBSD: bootstrap,v 1.19 2004/08/23 03:44:34 jlam Exp $ # # # Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved. @@ -35,7 +35,7 @@ # #set -x -BOOTSTRAP_VERSION=20040214 +BOOTSTRAP_VERSION=20040821 # set defaults for system locations prefix=/usr/pkg @@ -448,6 +448,11 @@ fi PKG_DBDIR=$pkgdbdir; export PKG_DBDIR LOCALBASE=$prefix; export LOCALBASE +# build libnbcompat +echo_msg "Building libnbcompat" +copy_src ../pkgtools/libnbcompat/files libnbcompat +run_cmd "(cd $wrkdir/libnbcompat; $shprog ./configure -C --prefix=$prefix --sysconfdir=$sysconfdir && make)" + # set up an example mk.conf file MKCONF_EXAMPLE=${wrkdir}/mk.conf.example export MKCONF_EXAMPLE @@ -538,12 +543,7 @@ if [ "$need_mkdir" = "yes" ]; then fi echo_msg "Installing bmake" -run_cmd "(cd $wrkdir/bmake; $shprog ./configure --prefix=$prefix --with-default-sys-path=$prefix/share/mk $configargs && make -f makefile.boot bootstrap && env BINDIR=$prefix/bin MANDIR=$prefix/man $BSTRAP_ENV ./bmake -f Makefile install)" - -# build libnbcompat -echo_msg "Building libnbcompat" -copy_src ../pkgtools/libnbcompat/files libnbcompat -run_cmd "(cd $wrkdir/libnbcompat; $shprog ./configure -C --prefix=$prefix --sysconfdir=$sysconfdir && $prefix/bin/bmake)" +run_cmd "(cd $wrkdir/bmake; env CPPFLAGS='-I../libnbcompat' LDFLAGS='-L../libnbcompat' LIBS='-lnbcompat' $shprog ./configure --prefix=$prefix --with-default-sys-path=$prefix/share/mk $configargs && make -f makefile.boot bootstrap && env BINDIR=$prefix/bin MANDIR=$prefix/man $BSTRAP_ENV ./bmake -f Makefile install)" # bootstrap tnftp case "$DEBIAN" in @@ -577,7 +577,7 @@ env DIGESTPROG=$prefix/bin/digest PKG_DIGEST=md5 PKG_DBDIR=$pkgdbdir \ case "$need_pax" in yes) echo_msg "Installing pax" copy_src ../archivers/pax/files pax - run_cmd "(cd $wrkdir/pax; env $BSTRAP_ENV CPPFLAGS='-I../libnbcompat' LDFLAGS='-L../libnbcompat' LIBS='-lnbcompat' $shprog ./configure -C --prefix=$prefix --sysconfdir=$sysconfdir && $prefix/bin/bmake && $prefix/bin/bmake install)" + run_cmd "(cd $wrkdir/pax; env $BSTRAP_ENV CPPFLAGS='-I../libnbcompat' LDFLAGS='-L../libnbcompat' LIBS='-lnbcompat' $shprog ./configure -C --prefix=$prefix --sysconfdir=$sysconfdir && make && make install)" echo "PAX=$prefix/bin/pax" >> ${MKCONF_EXAMPLE} pkg_install_args="$pkg_install_args --with-pax=$prefix/bin/pax --with-tar=$prefix/bin/tar" ;; @@ -590,7 +590,7 @@ esac case "$need_mtree" in yes) echo_msg "Installing mtree" copy_src ../pkgtools/mtree/files mtree - run_cmd "(cd $wrkdir/mtree; env $BSTRAP_ENV CPPFLAGS='-I../libnbcompat' LDFLAGS='-L../libnbcompat' LIBS='-lnbcompat' $shprog ./configure -C --prefix=$prefix --sysconfdir=$sysconfdir && $prefix/bin/bmake && $prefix/bin/bmake install)" + run_cmd "(cd $wrkdir/mtree; env $BSTRAP_ENV CPPFLAGS='-I../libnbcompat' LDFLAGS='-L../libnbcompat' LIBS='-lnbcompat' $shprog ./configure -C --prefix=$prefix --sysconfdir=$sysconfdir && make && make install)" pkg_install_args="$pkg_install_args --with-mtree=$prefix/sbin/mtree" ;; *) pkg_install_args="$pkg_install_args --with-mtree=$mtreeprog" @@ -601,8 +601,9 @@ esac case "$need_sed" in yes) echo_msg "Installing sed" copy_src ../textproc/nbsed/files sed - run_cmd "(cd $wrkdir/sed; env $BSTRAP_ENV $shprog ./configure -C --prefix=$prefix --sysconfdir=$sysconfdir && make && make install)" + run_cmd "(cd $wrkdir/sed; env $BSTRAP_ENV CPPFLAGS='-I../libnbcompat' LDFLAGS='-L../libnbcompat' LIBS='-lnbcompat' $shprog ./configure -C --prefix=$prefix --sysconfdir=$sysconfdir && make && make install)" echo "SED=$prefix/bin/nbsed" >> ${MKCONF_EXAMPLE} + BSTRAP_ENV="SED=\"$prefix/bin/nbsed\" $BSTRAP_ENV" ;; esac @@ -613,7 +614,7 @@ pkg_install_mandir="$prefix/man" if [ "$prefix" = "/usr" ]; then pkg_install_mandir="$prefix/share/man" fi -run_cmd "(cd $wrkdir/pkg_install; env $BSTRAP_ENV CPPFLAGS='-I../libnbcompat -I../../libnbcompat' LDFLAGS='-L../libnbcompat -L../../libnbcompat' LIBS='-lnbcompat' $shprog ./configure -C --prefix=$prefix --sysconfdir=$sysconfdir --with-pkgdbdir=$pkgdbdir --mandir=$pkg_install_mandir $pkg_install_args && $prefix/bin/bmake && $prefix/bin/bmake install)" +run_cmd "(cd $wrkdir/pkg_install; env $BSTRAP_ENV CPPFLAGS='-I../libnbcompat -I../../libnbcompat' LDFLAGS='-L../libnbcompat -L../../libnbcompat' LIBS='-lnbcompat' $shprog ./configure -C --prefix=$prefix --sysconfdir=$sysconfdir --with-pkgdbdir=$pkgdbdir --mandir=$pkg_install_mandir $pkg_install_args && make && make install)" # all's ready, install the man page echo_msg "Installing packages(7) man page" diff --git a/bootstrap/mods/bmake/Makefile.in b/bootstrap/mods/bmake/Makefile.in index 8e62d8c6672..ab28fa158f9 100644 --- a/bootstrap/mods/bmake/Makefile.in +++ b/bootstrap/mods/bmake/Makefile.in @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.in,v 1.1.1.1 2004/03/11 13:03:59 grant Exp $ +# $NetBSD: Makefile.in,v 1.2 2004/08/23 03:44:34 jlam Exp $ # @(#)Makefile 5.2 (Berkeley) 12/28/90 -# $Id: Makefile.in,v 1.1.1.1 2004/03/11 13:03:59 grant Exp $ +# $Id: Makefile.in,v 1.2 2004/08/23 03:44:34 jlam Exp $ # you can use this Makefile if you have an earlier version of bmake. prefix= @prefix@ @@ -14,7 +14,9 @@ MACHINE_ARCH=@machine_arch@ CFLAGS+= -I. -I${srcdir} @DEFS@ @CPPFLAGS@ ${XDEFS} ${CFLAGS_${.TARGET:T}} CFLAGS_main.o= "-DMAKE_VERSION=\"${MAKE_VERSION}\"" +LDFLAGS= @LDFLAGS@ LIBOBJS= @LIBOBJS@ +LDADD= @LIBS@ PROG= bmake SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ |