pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/bootstrap * Modify bmake to use libnbcompat to ensure ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e53f152a0e7e
branches:  trunk
changeset: 479812:e53f152a0e7e
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon Aug 23 03:44:34 2004 +0000

description:
* 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:

 bootstrap/bmake/Makefile.in      |   6 ++++--
 bootstrap/bmake/makefile.boot.in |   4 ++--
 bootstrap/bmake/var.c            |  17 +++++++++++++----
 bootstrap/bootstrap              |  25 +++++++++++++------------
 bootstrap/mods/bmake/Makefile.in |   6 ++++--
 5 files changed, 36 insertions(+), 22 deletions(-)

diffs (199 lines):

diff -r 4e01706c77ef -r e53f152a0e7e bootstrap/bmake/Makefile.in
--- a/bootstrap/bmake/Makefile.in       Mon Aug 23 03:32:12 2004 +0000
+++ b/bootstrap/bmake/Makefile.in       Mon Aug 23 03:44:34 2004 +0000
@@ -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 @@
 
 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 -r 4e01706c77ef -r e53f152a0e7e bootstrap/bmake/makefile.boot.in
--- a/bootstrap/bmake/makefile.boot.in  Mon Aug 23 03:32:12 2004 +0000
+++ b/bootstrap/bmake/makefile.boot.in  Mon Aug 23 03:44:34 2004 +0000
@@ -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.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 -r 4e01706c77ef -r e53f152a0e7e bootstrap/bmake/var.c
--- a/bootstrap/bmake/var.c     Mon Aug 23 03:32:12 2004 +0000
+++ b/bootstrap/bmake/var.c     Mon Aug 23 03:44:34 2004 +0000
@@ -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 @@
 #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 -r 4e01706c77ef -r e53f152a0e7e bootstrap/bootstrap
--- a/bootstrap/bootstrap       Mon Aug 23 03:32:12 2004 +0000
+++ b/bootstrap/bootstrap       Mon Aug 23 03:44:34 2004 +0000
@@ -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 @@
 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 @@
 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 @@
 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 @@
 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 @@
 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 @@
 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 -r 4e01706c77ef -r e53f152a0e7e bootstrap/mods/bmake/Makefile.in
--- a/bootstrap/mods/bmake/Makefile.in  Mon Aug 23 03:32:12 2004 +0000
+++ b/bootstrap/mods/bmake/Makefile.in  Mon Aug 23 03:44:34 2004 +0000
@@ -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 @@
 
 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 \



Home | Main Index | Thread Index | Old Index