Module Name:    src
Committed By:   abs
Date:           Fri Sep 18 09:25:00 UTC 2009

Modified Files:
        src/distrib/amiga/floppies/inst-common: Makefile.inc
        src/distrib/bebox/floppies/bootfloppy-common: Makefile.inc
        src/distrib/bebox/floppies/ramdisk: Makefile Makefile.inc
        src/distrib/evbsh3/rom/ramdiskeb: Makefile
        src/distrib/evbsh3/rom/ramdiskel: Makefile
        src/distrib/vax/inst-common: Makefile.inc
Added Files:
        src/distrib/common: list2sh.awk runlist.sh
Removed Files:
        src/distrib/amiga/floppies: list2sh.awk runlist.sh
        src/distrib/bebox/floppies: list2sh.awk runlist.sh
        src/distrib/evbsh3/rom: list2sh.awk runlist.sh
        src/distrib/vax: list2sh.awk runlist.sh

Log Message:
Merge four separate copies of list2sh.awk runlist.sh (three identical
and one with slightly less options). Release build verified on amiga,
bebox and evbsh3. Vax build fails for unrelated reason.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/distrib/amiga/floppies/list2sh.awk \
    src/distrib/amiga/floppies/runlist.sh
cvs rdiff -u -r1.22 -r1.23 \
    src/distrib/amiga/floppies/inst-common/Makefile.inc
cvs rdiff -u -r1.1 -r0 src/distrib/bebox/floppies/list2sh.awk \
    src/distrib/bebox/floppies/runlist.sh
cvs rdiff -u -r1.11 -r1.12 \
    src/distrib/bebox/floppies/bootfloppy-common/Makefile.inc
cvs rdiff -u -r1.12 -r1.13 src/distrib/bebox/floppies/ramdisk/Makefile
cvs rdiff -u -r1.10 -r1.11 src/distrib/bebox/floppies/ramdisk/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/distrib/common/list2sh.awk \
    src/distrib/common/runlist.sh
cvs rdiff -u -r1.1 -r0 src/distrib/evbsh3/rom/list2sh.awk \
    src/distrib/evbsh3/rom/runlist.sh
cvs rdiff -u -r1.8 -r1.9 src/distrib/evbsh3/rom/ramdiskeb/Makefile
cvs rdiff -u -r1.8 -r1.9 src/distrib/evbsh3/rom/ramdiskel/Makefile
cvs rdiff -u -r1.3 -r0 src/distrib/vax/list2sh.awk
cvs rdiff -u -r1.2 -r0 src/distrib/vax/runlist.sh
cvs rdiff -u -r1.15 -r1.16 src/distrib/vax/inst-common/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/amiga/floppies/inst-common/Makefile.inc
diff -u src/distrib/amiga/floppies/inst-common/Makefile.inc:1.22 src/distrib/amiga/floppies/inst-common/Makefile.inc:1.23
--- src/distrib/amiga/floppies/inst-common/Makefile.inc:1.22	Sun Oct 26 07:25:33 2003
+++ src/distrib/amiga/floppies/inst-common/Makefile.inc	Fri Sep 18 09:24:59 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.22 2003/10/26 07:25:33 lukem Exp $
+#	$NetBSD: Makefile.inc,v 1.23 2009/09/18 09:24:59 abs Exp $
 
 # TOP is assumed to be defined by Makefile including this one.
 
@@ -26,8 +26,8 @@
 	mount -t ffs ${VND_DEV} ${MOUNT_POINT}
 	${TOOL_MTREE} -def ${MTREECONF} -p ${MOUNT_POINT}/ -u
 	TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
-	    KERNOBJDIR=${KERNOBJDIR} \
-	    TARGDIR=${MOUNT_POINT} ${HOST_SH} ${TOP}/runlist.sh ${LISTS}
+	    KERNOBJDIR=${KERNOBJDIR} TARGDIR=${MOUNT_POINT} ${HOST_SH} \
+	    ${NETBSDSRCDIR}/distrib/common/runlist.sh ${LISTS}
 	@echo ""
 	@df -i ${MOUNT_POINT}
 	@echo ""

Index: src/distrib/bebox/floppies/bootfloppy-common/Makefile.inc
diff -u src/distrib/bebox/floppies/bootfloppy-common/Makefile.inc:1.11 src/distrib/bebox/floppies/bootfloppy-common/Makefile.inc:1.12
--- src/distrib/bebox/floppies/bootfloppy-common/Makefile.inc:1.11	Fri Apr  3 22:36:34 2009
+++ src/distrib/bebox/floppies/bootfloppy-common/Makefile.inc	Fri Sep 18 09:24:59 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.11 2009/04/03 22:36:34 perry Exp $
+#	$NetBSD: Makefile.inc,v 1.12 2009/09/18 09:24:59 abs Exp $
 
 # TOP is assumed to be defined by Makefile including this one.
 
@@ -41,8 +41,8 @@
 	newfs -B be -m 0 -o space -i ${INO_BYTES} -c 80 ${VND_RDEV} ${DISKTYPE}
 	mount ${VND_DEV} ${MOUNT_POINT}
 	TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
-	    KERNOBJDIR=${KERNOBJDIR} \
-	    TARGDIR=${MOUNT_POINT} ${HOST_SH} ${TOP}/runlist.sh ${LISTS}
+	    KERNOBJDIR=${KERNOBJDIR} TARGDIR=${MOUNT_POINT} ${HOST_SH} \
+	    ${NETBSDSRCDIR}/distrib/common/runlist.sh ${LISTS}
 	@echo ""
 	@df -i ${MOUNT_POINT}
 	@echo ""

Index: src/distrib/bebox/floppies/ramdisk/Makefile
diff -u src/distrib/bebox/floppies/ramdisk/Makefile:1.12 src/distrib/bebox/floppies/ramdisk/Makefile:1.13
--- src/distrib/bebox/floppies/ramdisk/Makefile:1.12	Sat Oct 25 22:27:34 2008
+++ src/distrib/bebox/floppies/ramdisk/Makefile	Fri Sep 18 09:24:59 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12 2008/10/25 22:27:34 apb Exp $
+#	$NetBSD: Makefile,v 1.13 2009/09/18 09:24:59 abs Exp $
 
 TOP=		${.CURDIR}/..
 
@@ -43,8 +43,8 @@
 	mount ${VND_DEV} ${MOUNT_POINT}
 	${TOOL_MTREE} -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -u
 	TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
-	    KERNOBJDIR=${KERNOBJDIR} TARGDIR=${MOUNT_POINT} \
-	    ${HOST_SH} ${TOP}/runlist.sh ${.CURDIR}/${LISTS}
+	    KERNOBJDIR=${KERNOBJDIR} TARGDIR=${MOUNT_POINT} ${HOST_SH} \
+	    ${NETBSDSRCDIR}/distrib/common/runlist.sh ${LISTS}
 	@echo ""
 	@df -i ${MOUNT_POINT}
 	@echo ""

Index: src/distrib/bebox/floppies/ramdisk/Makefile.inc
diff -u src/distrib/bebox/floppies/ramdisk/Makefile.inc:1.10 src/distrib/bebox/floppies/ramdisk/Makefile.inc:1.11
--- src/distrib/bebox/floppies/ramdisk/Makefile.inc:1.10	Sun Oct 26 07:25:33 2003
+++ src/distrib/bebox/floppies/ramdisk/Makefile.inc	Fri Sep 18 09:24:59 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.10 2003/10/26 07:25:33 lukem Exp $
+#	$NetBSD: Makefile.inc,v 1.11 2009/09/18 09:24:59 abs Exp $
 
 # TOP is assumed to be defined by Makefile including this one.
 
@@ -28,8 +28,8 @@
 	mount ${VND_DEV} ${MOUNT_POINT}
 	${TOOL_MTREE} -def ${MTREECONF} -p ${MOUNT_POINT}/ -u
 	TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
-	    KERNOBJDIR=${KERNOBJDIR} \
-	    TARGDIR=${MOUNT_POINT} ${HOST_SH} ${TOP}/runlist.sh ${LISTS}
+	    KERNOBJDIR=${KERNOBJDIR} TARGDIR=${MOUNT_POINT} ${HOST_SH} \
+	    ${NETBSDSRCDIR}/distrib/common/runlist.sh ${LISTS}
 	@echo ""
 	@df -i ${MOUNT_POINT}
 	@echo ""

Index: src/distrib/evbsh3/rom/ramdiskeb/Makefile
diff -u src/distrib/evbsh3/rom/ramdiskeb/Makefile:1.8 src/distrib/evbsh3/rom/ramdiskeb/Makefile:1.9
--- src/distrib/evbsh3/rom/ramdiskeb/Makefile:1.8	Thu Jul 10 10:34:06 2003
+++ src/distrib/evbsh3/rom/ramdiskeb/Makefile	Fri Sep 18 09:24:59 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2003/07/10 10:34:06 lukem Exp $
+#	$NetBSD: Makefile,v 1.9 2009/09/18 09:24:59 abs Exp $
 
 TOP=		${.CURDIR}/..
 WARNS=1
@@ -25,7 +25,7 @@
 UMOUNT?=	umount
 VNCONFIG?=	vnconfig
 
-LISTS=		../ramdiskcommon/list
+LISTS=		${.CURDIR}/../ramdiskcommon/list
 CRUNCHCONF=	../ramdiskcommon/${CBIN}.conf
 MTREECONF=	../ramdiskcommon/mtree.conf
 
@@ -46,8 +46,8 @@
 	${MOUNT} ${VND_DEV} ${MOUNT_POINT}
 	${TOOL_MTREE} -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -U
 	TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
-		TARGDIR=${MOUNT_POINT} ${HOST_SH} ${TOP}/runlist.sh \
-		${.CURDIR}/${LISTS}
+	    KERNOBJDIR=${KERNOBJDIR} TARGDIR=${MOUNT_POINT} ${HOST_SH} \
+	    ${NETBSDSRCDIR}/distrib/common/runlist.sh ${LISTS}
 	@echo ""
 	@df -i ${MOUNT_POINT}
 	@echo ""

Index: src/distrib/evbsh3/rom/ramdiskel/Makefile
diff -u src/distrib/evbsh3/rom/ramdiskel/Makefile:1.8 src/distrib/evbsh3/rom/ramdiskel/Makefile:1.9
--- src/distrib/evbsh3/rom/ramdiskel/Makefile:1.8	Thu Jul 10 10:34:06 2003
+++ src/distrib/evbsh3/rom/ramdiskel/Makefile	Fri Sep 18 09:24:59 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2003/07/10 10:34:06 lukem Exp $
+#	$NetBSD: Makefile,v 1.9 2009/09/18 09:24:59 abs Exp $
 
 TOP=		${.CURDIR}/..
 WARNS=1
@@ -25,7 +25,7 @@
 UMOUNT?=	umount
 VNCONFIG?=	vnconfig
 
-LISTS=		../ramdiskcommon/list
+LISTS=		${.CURDIR}/../ramdiskcommon/list
 CRUNCHCONF=	../ramdiskcommon/${CBIN}.conf
 MTREECONF=	../ramdiskcommon/mtree.conf
 
@@ -46,8 +46,8 @@
 	${MOUNT} ${VND_DEV} ${MOUNT_POINT}
 	${TOOL_MTREE} -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -U
 	TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
-		TARGDIR=${MOUNT_POINT} ${HOST_SH} ${TOP}/runlist.sh \
-		${.CURDIR}/${LISTS}
+	    KERNOBJDIR=${KERNOBJDIR} TARGDIR=${MOUNT_POINT} ${HOST_SH} \
+	    ${NETBSDSRCDIR}/distrib/common/runlist.sh ${LISTS}
 	@echo ""
 	@df -i ${MOUNT_POINT}
 	@echo ""

Index: src/distrib/vax/inst-common/Makefile.inc
diff -u src/distrib/vax/inst-common/Makefile.inc:1.15 src/distrib/vax/inst-common/Makefile.inc:1.16
--- src/distrib/vax/inst-common/Makefile.inc:1.15	Sun Oct 26 07:25:34 2003
+++ src/distrib/vax/inst-common/Makefile.inc	Fri Sep 18 09:25:00 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.15 2003/10/26 07:25:34 lukem Exp $
+#	$NetBSD: Makefile.inc,v 1.16 2009/09/18 09:25:00 abs Exp $
 
 # TOP is assumed to be defined by Makefile including this one.
 
@@ -27,8 +27,8 @@
 	mount ${VND_DEV} ${MOUNT_POINT}
 	${TOOL_MTREE} -def ${MTREECONF} -p ${MOUNT_POINT}/ -u
 	TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
-	    KERNOBJDIR=${KERNOBJDIR} \
-	    TARGDIR=${MOUNT_POINT} ${HOST_SH} ${TOP}/runlist.sh ${LISTS}
+	    KERNOBJDIR=${KERNOBJDIR} TARGDIR=${MOUNT_POINT} ${HOST_SH} \
+	    ${NETBSDSRCDIR}/distrib/common/runlist.sh ${LISTS}
 	@echo ""
 	@df -i ${MOUNT_POINT}
 	@echo ""

Added files:

Index: src/distrib/common/list2sh.awk
diff -u /dev/null src/distrib/common/list2sh.awk:1.1
--- /dev/null	Fri Sep 18 09:25:00 2009
+++ src/distrib/common/list2sh.awk	Fri Sep 18 09:24:59 2009
@@ -0,0 +1,55 @@
+#	$NetBSD: list2sh.awk,v 1.1 2009/09/18 09:24:59 abs Exp $
+
+BEGIN {
+	printf("cd ${CURDIR}\n");
+	printf("\n");
+}
+/^$/ || /^#/ {
+	print $0;
+	next;
+}
+$1 == "COPY" {
+	printf("echo '%s'\n", $0);
+	printf("rm -f ${TARGDIR}/%s\n", $3);
+	printf("cp %s ${TARGDIR}/%s\n", $2, $3);
+	next;
+}
+$1 == "LINK" {
+	printf("echo '%s'\n", $0);
+	printf("rm -f ${TARGDIR}/%s\n", $3);
+	printf("(cd ${TARGDIR}; ln %s %s)\n", $2, $3);
+	next;
+}
+$1 == "SYMLINK" {
+	printf("echo '%s'\n", $0);
+	printf("rm -f ${TARGDIR}/%s\n", $3);
+	printf("(cd ${TARGDIR}; ln -s %s %s)\n", $2, $3);
+	next;
+}
+$1 == "COPYDIR" {
+	printf("echo '%s'\n", $0);
+	printf("(cd ${TARGDIR}/%s && find . ! -name . | xargs /bin/rm -rf)\n",
+	    $3);
+	printf("(cd %s && find . ! -name . | cpio -pdamu ${TARGDIR}/%s)\n", $2,
+	    $3);
+	next;
+}
+$1 == "SPECIAL" {
+	printf("echo '%s'\n", $0);
+	printf("(cd ${TARGDIR};");
+	for (i = 2; i <= NF; i++)
+		printf(" %s", $i);
+	printf(")\n");
+	next;
+}
+{
+	printf("echo '%s'\n", $0);
+	printf("echo 'Unknown keyword \"%s\" at line %d of input.'\n", $1, NR);
+	printf("exit 1\n");
+	exit 1;
+}
+END {
+	printf("\n");
+	printf("exit 0\n");
+	exit 0;
+}
Index: src/distrib/common/runlist.sh
diff -u /dev/null src/distrib/common/runlist.sh:1.1
--- /dev/null	Fri Sep 18 09:25:00 2009
+++ src/distrib/common/runlist.sh	Fri Sep 18 09:24:59 2009
@@ -0,0 +1,13 @@
+#	$NetBSD: runlist.sh,v 1.1 2009/09/18 09:24:59 abs Exp $
+
+if [ "X$1" = "X-d" ]; then
+	SHELLCMD=cat
+	shift
+else
+	SHELLCMD="sh -e"
+fi
+
+( while [ "X$1" != "X" ]; do
+	cat $1
+	shift
+done ) | awk -f ${NETBSDSRCDIR}/distrib/common/list2sh.awk | ${SHELLCMD}

Reply via email to