| tmore tomfoolery. i bet mk can't read the mac os or sun os archives. - plan9port - [fork] Plan 9 from user space |
| git clone git://src.adamsgaard.dk/plan9port |
| Log |
| Files |
| Refs |
| README |
| LICENSE |
| --- |
| commit 6b17c8f11be7556af7ae454b12dc37c9fb264a48 |
| parent d946e4dc5df1c0fb9a06e6d94013613848c5df16 |
| Author: rsc |
| Date: Wed, 21 Apr 2004 06:53:59 +0000
more tomfoolery.
i bet mk can't read the mac os or sun os archives.
Diffstat:
A bin/membername | 7 +++++++
M src/libmp/port/reduce | 11 ++++++++---
M src/libsec/port/mkfile | 1 -
M src/mksyslib | 8 ++++++--
4 files changed, 21 insertions(+), 6 deletions(-)
--- |
| diff --git a/bin/membername b/bin/membername |
| t@@ -0,0 +1,7 @@
+#!/bin/sh
+
+for i
+do
+ # This works whether sed uses \(\) or () for grouping.
+ echo $i | sed 's/.*\((.*)\).*/\1/' | tr -d '()'
+done |
| diff --git a/src/libmp/port/reduce b/src/libmp/port/reduce |
| t@@ -5,6 +5,11 @@ shift
nl='
'
-reduce="("`ls -p ../$objtype/*.[cs] 2>/dev/null | sed 's/..$//' | sed 's/^.*\///' | tr "$nl" '|' | sed 's/.$//'`")"
-
-echo $* | tr ' ' "$nl" | egrep -v $reduce | tr "$nl" ' '
+for i in $*
+do
+ j=`echo $i | sed 's/\.o//'`
+ if test ! -f ../$objtype/$j.c -a ! -f ../$objtype/$j.s -a ! -f ../$objtype/$j.spp
+ then
+ echo $i
+ fi
+done |
| diff --git a/src/libsec/port/mkfile b/src/libsec/port/mkfile |
| t@@ -55,7 +55,6 @@ ALLOFILES=\
x509.$O\
OFILES=`{sh ./reduce $O $OBJTYPE $ALLOFILES}
-
HFILES=$PLAN9/include/libsec.h
<$PLAN9/src/mksyslib |
| diff --git a/src/mksyslib b/src/mksyslib |
| t@@ -1,7 +1,11 @@
default:V: $PLAN9/lib/$LIB
-$PLAN9/lib/$LIB: $OFILES
- $AR rvc $PLAN9/lib/$LIB $newprereq
+# $PLAN9/lib/$LIB: $OFILES
+# $AR rvc $PLAN9/lib/$LIB $newprereq
+
+$PLAN9/lib/$LIB(%):N: %
+$PLAN9/lib/$LIB: ${OFILES:%=$PLAN9/lib/$LIB(%)}
+ ar rvc $PLAN9/lib/$LIB `membername $newprereq`
&:n: &.$O
$AR rvc $PLAN9/lib/$LIB $stem.$O |