Subject: bootstrap should use its new bmake
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 10/03/2003 17:08:04
For some odd reason, the files were getting immediately cleaned out after
building via bootstrap. I am using make under BSD/OS 4.3.1.

in pax
configure:1633: gcc  -I../libnbcompat -L../libnbcompat conftest.c
-lnbcompat >&5
ld: cannot find -lnbcompat

At end of libnbcompat build it does:
rm -f *.a *.o bits nbcompat/nbtypes.h nbcompat/nbcompat.h

For example, the libnbcompat.a file was removed. Then next it couldn't be
linked to it.

My workaround was to simply use the installed version.

Then my next problem was that installing mtree failed because files were
missing!

Then pax Makefile did:

rm -f ar_io.o ar_subs.o buf_subs.o cpio.o file_subs.o ftree.o gen_subs.o
getoldopt.o options.o pat_rep.o pax.o sel_subs.o tables.o tar.o tty_subs.o
getid.o spec.o misc.o stat_flags.o pack_dev.o pax

before the install!


So I am guessing that the makefile is incorrect or the BSD/OS make is
incorrect.

Anyways, I just made it use the newly installed bmake instead of make.

Is the following okay?

(May I add it?)


Index: bootstrap
===================================================================
RCS file: /cvsroot/othersrc/bootstrap-pkgsrc/bootstrap,v
retrieving revision 1.76
diff -b -u -r1.76 bootstrap
--- bootstrap	2003/09/23 14:51:40	1.76
+++ bootstrap	2003/10/03 23:58:58
@@ -428,7 +428,7 @@
 # we often need NetBSD's pax as well, nowadays, to make binary packages
 case "$need_pax" in
 yes)	echo_msg "Installing pax"
-	run_cmd "(cd pax; env CPPFLAGS='-I../libnbcompat' LDFLAGS='-L../libnbcompat' LIBS='-lnbcompat' $shprog ./configure --prefix=$prefix && make && make install)"
+	run_cmd "(cd pax; env CPPFLAGS='-I${prefix}/include/nbcompat -I${prefix}/include' LDFLAGS='-L${prefix}/lib' LIBS='-lnbcompat' $shprog ./configure --prefix=$prefix && ${prefix}/bin/bmake && ${prefix}/bin/bmake install)"
 	echo "PAX=$prefix/bin/pax" >> mk.conf.example
 	pkg_install_args="$pkg_install_args --with-pax=$prefix/bin/pax --with-tar=$prefix/bin/tar"
 	;;
@@ -440,7 +440,7 @@
 # bootstrap mtree if necessary
 case "$need_mtree" in
 yes)	echo_msg "Installing mtree"
-	run_cmd "(cd mtree; env CPPFLAGS='-I../libnbcompat' LDFLAGS='-L../libnbcompat' LIBS='-lnbcompat' $shprog ./configure --prefix=$prefix && make && make install)"
+	run_cmd "(cd mtree; env CPPFLAGS='-I${prefix}/include/nbcompat -I${prefix}/include' LDFLAGS='-L${prefix}/lib' LIBS='-lnbcompat' $shprog ./configure --prefix=$prefix && ${prefix}/bin/bmake && ${prefix}/bin/bmake install)"
 	pkg_install_args="$pkg_install_args --with-mtree=$prefix/sbin/mtree"
 	;;
 *)	pkg_install_args="$pkg_install_args --with-mtree=$mtreeprog"
@@ -460,7 +460,7 @@
 if [ "$prefix" = "/usr" ]; then
 	pkg_install_mandir="$prefix/share/man"
 fi
-run_cmd "(cd pkg_install; env CPPFLAGS='-I../libnbcompat -I../../libnbcompat' LDFLAGS='-L../libnbcompat -L../../libnbcompat' LIBS='-lnbcompat' $shprog ./configure --prefix=$prefix --with-pkgdbdir=$pkgdbdir --mandir=$pkg_install_mandir $pkg_install_args && make && make install)"
+run_cmd "(cd pkg_install; env CPPFLAGS='-I${prefix}/include/nbcompat -I${prefix}/include' LDFLAGS='-L${prefix}/lib' LIBS='-lnbcompat' $shprog ./configure --prefix=$prefix --with-pkgdbdir=$pkgdbdir --mandir=$pkg_install_mandir $pkg_install_args && ${prefix}/bin/bmake && ${prefix}/bin/bmake install)"

 # all's ready, install the man page
 echo_msg "Installing packages(7) man page"




   Jeremy C. Reed
   http://bsd.reedmedia.net/