summaryrefslogtreecommitdiff
path: root/pkgtools/bootstrap-mk-files
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2007-07-27 10:43:24 +0000
committerjoerg <joerg@pkgsrc.org>2007-07-27 10:43:24 +0000
commit07eedea6c2641e943a8e07a1d18209c08a916ef6 (patch)
treee94696aaf400fdeb6898914c670eebccd29e9df3 /pkgtools/bootstrap-mk-files
parent20911999c4335e5c6c73c55e649e0170fb961e2a (diff)
downloadpkgsrc-07eedea6c2641e943a8e07a1d18209c08a916ef6.tar.gz
Split bootstrap into two phases:
- phase one builds the essential tools in the bare minimal version needed by the infrastructure to run "make install". - phase two runs "make install" for all the bootstrap packages. Set WRKOBJDIR for the second phase, we never want to leave garbage around. This increases the time for running bootstrap, but gives more deterministic results. It also means that e.g. configuration files in pkg_install can be handled normally. It is a prerequirement to sanely allow pkg_install some more extended work like building its own libarchive without having to worry too much about limitations on some platforms. This fixes the expansion of @gzcat@ in the download-vulnerability-list script. Tested by tnn@ on Interix and myself on DragonFly.
Diffstat (limited to 'pkgtools/bootstrap-mk-files')
-rwxr-xr-xpkgtools/bootstrap-mk-files/files/bootstrap.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgtools/bootstrap-mk-files/files/bootstrap.sh b/pkgtools/bootstrap-mk-files/files/bootstrap.sh
new file mode 100755
index 00000000000..1084f656249
--- /dev/null
+++ b/pkgtools/bootstrap-mk-files/files/bootstrap.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Install mk-files for bootstrap.
+#
+# Expected environment:
+# - CP
+# - OPSYS
+# - MK_DST
+# - ROOT_GROUP
+# - ROOT_USER
+# - SED
+# - SYSCONFDIR
+#
+
+for file in bsd.README bsd.dep.mk bsd.depall.mk bsd.doc.mk bsd.files.mk \
+ bsd.hostprog.mk bsd.inc.mk bsd.info.mk bsd.kernobj.mk bsd.kinc.mk \
+ bsd.kmod.mk bsd.lib.mk bsd.links.mk bsd.man.mk bsd.nls.mk \
+ bsd.obj.mk bsd.prog.mk bsd.subdir.mk bsd.sys.mk sys.mk; do
+ if [ -f mods/${OPSYS}.${file} ]; then
+ ${CP} mods/${OPSYS}.${file} ${MK_DST}/${file}
+ else
+ ${CP} ${file} ${MK_DST}/${file}
+ fi
+done
+
+subst_pattern='s|@ROOT_GROUP@|'${ROOT_GROUP}'|g;s|@ROOT_USER@|'${ROOT_USER}'|g;s|@SYSCONFDIR@|'${SYSCONFDIR}'|g'
+
+if [ -f mods/${OPSYS}.own.mk.in ]; then
+ ${SED} -e "${subst_pattern}" mods/${OPSYS}.own.mk.in > ${MK_DST}/bsd.own.mk
+else
+ ${SED} -e "${subst_pattern}" mods/bsd.own.mk.in > ${MK_DST}/bsd.own.mk
+fi