tolerate newlines in the list variables, and clean up the config files

to match.  no more ridiculously long lines, now!
This commit is contained in:
cgd 2000-02-03 19:16:47 +00:00
parent b89812ff7f
commit ff6ae74e98
3 changed files with 97 additions and 19 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: do_subst.sh,v 1.1 2000/01/12 02:33:54 cgd Exp $
# $NetBSD: do_subst.sh,v 1.2 2000/02/03 19:16:47 cgd Exp $
#
# Copyright (c) 1999, 2000 Christopher G. Demetriou. All rights reserved.
#
@ -60,8 +60,11 @@ BEGIN {
NAME=ENVIRON["NAME"]
SRCFILES=""
sz = split(ENVIRON["SRCFILE_LIST"], a);
sz = split(ENVIRON["SRCFILE_LIST"], a, "[ \t\n]+");
for (i = 1; i <= sz; i++) {
if (a[i] == "") {
continue
}
if (SRCFILES != "") {
SRCFILES=SRCFILES "\n"
}
@ -72,15 +75,21 @@ BEGIN {
}
CPPDEFS=""
sz = split(ENVIRON["STD_CPPDEF_LIST"], a);
sz = split(ENVIRON["STD_CPPDEF_LIST"], a, "[ \t\n]+");
for (i = 1; i <= sz; i++) {
if (a[i] == "") {
continue
}
if (CPPDEFS != "") {
CPPDEFS=CPPDEFS " "
}
CPPDEFS=CPPDEFS "/D \"" a[i] "\""
}
sz = split(ENVIRON["CPPDEF_LIST"], a);
sz = split(ENVIRON["CPPDEF_LIST"], a, "[ \t\n]+");
for (i = 1; i <= sz; i++) {
if (a[i] == "") {
continue
}
if (CPPDEFS != "") {
CPPDEFS=CPPDEFS " "
}
@ -88,22 +97,31 @@ BEGIN {
}
INCDIRS=""
sz = split(ENVIRON["STD_INCDIR_LIST"], a);
sz = split(ENVIRON["STD_INCDIR_LIST"], a, "[ \t\n]+");
for (i = 1; i <= sz; i++) {
if (a[i] == "") {
continue
}
if (INCDIRS != "") {
INCDIRS=INCDIRS " "
}
INCDIRS=INCDIRS "/I \"" a[i] "\""
}
sz = split(ENVIRON["INCDIR_LIST"], a);
sz = split(ENVIRON["INCDIR_LIST"], a, "[ \t\n]+");
for (i = 1; i <= sz; i++) {
if (a[i] == "") {
continue
}
if (INCDIRS != "") {
INCDIRS=INCDIRS " "
}
INCDIRS=INCDIRS "/I \"" a[i] "\""
}
sz = split(ENVIRON["LIBDEP_LIST"], a);
sz = split(ENVIRON["LIBDEP_LIST"], a, "[ \t\n]+");
for (i = 1; i <= sz; i++) {
if (a[i] == "") {
continue
}
if (INCDIRS != "") {
INCDIRS=INCDIRS " "
}
@ -111,32 +129,44 @@ BEGIN {
}
LIBRARIES=""
sz = split(ENVIRON["STD_LIBRARY_LIST"], a);
sz = split(ENVIRON["STD_LIBRARY_LIST"], a, "[ \t\n]+");
for (i = 1; i <= sz; i++) {
if (a[i] == "") {
continue
}
if (LIBRARIES != "") {
LIBRARIES=LIBRARIES " "
}
LIBRARIES=LIBRARIES a[i] ".lib"
}
sz = split(ENVIRON["LIBRARY_LIST"], a);
sz = split(ENVIRON["LIBRARY_LIST"], a, "[ \t\n]+");
for (i = 1; i <= sz; i++) {
if (a[i] == "") {
continue
}
if (LIBRARIES != "") {
LIBRARIES=LIBRARIES " "
}
LIBRARIES=LIBRARIES a[i] ".lib"
}
sz = split(ENVIRON["LIBDEP_LIST"], a);
sz = split(ENVIRON["LIBDEP_LIST"], a, "[ \t\n]+");
for (i = 1; i <= sz; i++) {
if (a[i] == "") {
continue
}
if (LIBRARIES != "") {
LIBRARIES=LIBRARIES " "
}
LIBRARIES=LIBRARIES a[i] ".lib"
}
sz = split(ENVIRON["LIBDEP_LIST"], a);
sz = split(ENVIRON["LIBDEP_LIST"], a, "[ \t\n]+");
DEBUG_LIBPATH=""
RELEASE_LIBPATH=""
for (i = 1; i <= sz; i++) {
if (a[i] == "") {
continue
}
if (i > 1) {
DEBUG_LIBPATH=DEBUG_LIBPATH " "
RELEASE_LIBPATH=RELEASE_LIBPATH " "

View File

@ -1,14 +1,37 @@
#!/bin/sh
# $NetBSD: libsa.config,v 1.2 2000/02/03 03:19:11 cgd Exp $
# $NetBSD: libsa.config,v 1.3 2000/02/03 19:16:48 cgd Exp $
# config file/script to generate project file (.dsp) for libsa
TYPE=static_library_WCE_MIPS
NAME='libsa'
SRCFILE_LIST='alloc.c bcopy.c bzero.c close.c devopen.c dkcksum.c lseek.c open.c printf.c read.c subr_prf.c twiddle.c ufs.c winblk.c winfs.c'
CPPDEF_LIST='_STANDALONE __STDC__'
INCDIR_LIST='. ../include ../../../..'
SRCFILE_LIST='
alloc.c
bcopy.c
bzero.c
close.c
devopen.c
dkcksum.c
lseek.c
open.c
printf.c
read.c
subr_prf.c
twiddle.c
ufs.c
winblk.c
winfs.c
'
CPPDEF_LIST='
_STANDALONE
__STDC__
'
INCDIR_LIST='
.
../include
../../../..
'
LIBDEP_LIST=''
LIBRARY_LIST=''

View File

@ -1,14 +1,39 @@
#!/bin/sh
# $NetBSD: pbsdboot.config,v 1.2 2000/02/03 03:20:33 cgd Exp $
# $NetBSD: pbsdboot.config,v 1.3 2000/02/03 19:16:48 cgd Exp $
# config file/script to generate project file (.dsp) for pbsdboot
TYPE=application_WCE_MIPS
NAME='pbsdboot'
SRCFILE_LIST='disptest.c elf.c layout.c main.c mips.c pbsdboot.c res\pbsdboot.rc platid.c platid_mask.c preference.c print.c systeminfo.c tx39xx.c vmem.c vr41xx.c res\pbsd.bmp res\pbsd.ico'
CPPDEF_LIST='_STANDALONE __STDC__'
INCDIR_LIST='. ../include ../../../..'
SRCFILE_LIST='
disptest.c
elf.c
layout.c
main.c
mips.c
pbsdboot.c
res\pbsdboot.rc
platid.c
platid_mask.c
preference.c
print.c
systeminfo.c
tx39xx.c
vmem.c
vr41xx.c
res\pbsd.bmp
res\pbsd.ico
'
CPPDEF_LIST='
_STANDALONE
__STDC__
'
INCDIR_LIST='
.
../include
../../../..
'
LIBDEP_LIST='libsa'
LIBRARY_LIST=''