aboutsummaryrefslogtreecommitdiff
path: root/src/mkmany
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-11-23 18:10:54 +0000
committerrsc <devnull@localhost>2003-11-23 18:10:54 +0000
commit5c34ff9e1c19fd73ccc79c0f702f7c4b964840d1 (patch)
tree808a906913b9b82866dd9c9bf62434ecca5fe55d /src/mkmany
parentbc7cb1a15a67c859c8c71c4b52bb35fe9425a63d (diff)
downloadplan9port-5c34ff9e1c19fd73ccc79c0f702f7c4b964840d1.tar.gz
plan9port-5c34ff9e1c19fd73ccc79c0f702f7c4b964840d1.tar.bz2
plan9port-5c34ff9e1c19fd73ccc79c0f702f7c4b964840d1.zip
make -> mk
Diffstat (limited to 'src/mkmany')
-rw-r--r--src/mkmany73
1 files changed, 73 insertions, 0 deletions
diff --git a/src/mkmany b/src/mkmany
new file mode 100644
index 00000000..5b254dbf
--- /dev/null
+++ b/src/mkmany
@@ -0,0 +1,73 @@
+PROGS=${TARG:%=$O.%}
+
+none:VQ:
+ echo usage: mk all, install, installall, '$O'.cmd, cmd.install, or cmd.installall
+
+all:V: $PROGS
+
+$O.%: %.$O $OFILES $LIB
+ $LD -o $target $prereq $LDFLAGS
+
+%.$O: $HFILES # don't combine with following %.$O rules
+
+%.$O: %.c
+ $CC $CFLAGS $stem.c
+
+%.$O: %.s
+ $AS $AFLAGS $stem.s
+
+y.tab.h y.tab.c: $YFILES
+ $YACC $YFLAGS $prereq
+
+%.install:V: $BIN/%
+
+$BIN/%: $O.%
+ $INSTALL $O.$stem $BIN/$stem
+
+%.installall:V:
+ for (objtype in $CPUS)
+ mk $stem.install
+
+install:V:
+ # for (i in $TARG)
+ # mk $MKFLAGS $i.install
+ for i in $TARG
+ do
+ mk $MKFLAGS $i.install
+ done
+
+installall:V:
+ for(objtype in $CPUS)
+ mk $MKFLAGS install
+
+%.safeinstall:V:
+ mk $O.$stem
+ test -e $BIN/$stem && mv $BIN/$stem $BIN/_$stem
+ mk $stem.install
+
+%.safeinstallall:V:
+ for(objtype in $CPUS)
+ mk $MKFLAGS $stem.safeinstall
+
+safeinstall:V:
+ for(i in $TARG)
+ mk $MKFLAGS $i.safeinstall
+
+safeinstallall:V:
+ for (objtype in $CPUS)
+ mk safeinstall
+
+update:V:
+ update $UPDATEFLAGS $UPDATE
+
+nuke:V:
+ rm -f *.[$OS] y.tab.? y.debug y.output [$OS].* *.acid $TARG $NUKEFILES
+
+clean:V:
+ rm -f *.[$OS] y.tab.? y.debug y.output [$OS].* $TARG $CLEANFILES
+
+%.clean:V:
+ rm -f $stem.[$OS] [$OS].$stem $stem.acid $stem
+
+%.acid: %.$O $HFILES
+ $CC $CFLAGS -a $stem.c >$target