ref: bd6747ccd0aa564923460d27179592b4e185bfa1
parent: a041c90431c5987496ac1d5de4f330f70fd2966f
author: Ori Bernstein <[email protected]>
date: Sun Nov 22 06:36:23 EST 2020
upas/*: fix mkfile issues (thanks amavect) Fixes 3 issues in our upas mkfiles: - mk/mkfile and send/mkfile were rebuilding only the rfc822.tab.$O, even though the header also needed to be rebuilt. - CLEANFILES had a pattern that would not get expanded. - Third, ../upas/mkfile was being included in the wrong place and making the wrong rule default.
--- a/sys/src/cmd/upas/Mail/mkfile
+++ b/sys/src/cmd/upas/Mail/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=Mail
OFILES=\
@@ -16,6 +15,7 @@
BIN=$ABIN
</sys/src/cmd/mkone
+<../mkupas
$O.out: $OFILES
$LD -o $target $LDFLAGS $OFILES
--- a/sys/src/cmd/upas/alias/mkfile
+++ b/sys/src/cmd/upas/alias/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=aliasmail
LIB=../common/libcommon.a$O
@@ -9,4 +8,5 @@
../common/sys.h\
</sys/src/cmd/mkone
+<../mkupas
CFLAGS=$CFLAGS -I../common
--- a/sys/src/cmd/upas/bayes/mkfile
+++ b/sys/src/cmd/upas/bayes/mkfile
@@ -1,9 +1,9 @@
</$objtype/mkfile
-<../mkupas
TARG=addhash bayes msgtok
</sys/src/cmd/mkmany
+<../mkupas
# msg tokenizer
$O.regen: regcomp.$O dfa.$O
--- a/sys/src/cmd/upas/binscripts/mkfile
+++ b/sys/src/cmd/upas/binscripts/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
RCFILES=\
isspam\
@@ -27,3 +26,5 @@
$BIN/%: %.rc
cp $stem.rc $BIN/$stem
+
+<../mkupas
--- a/sys/src/cmd/upas/filterkit/mkfile
+++ b/sys/src/cmd/upas/filterkit/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=\
deliver\
@@ -11,4 +10,5 @@
OFILES=readaddrs.$O
</sys/src/cmd/mkmany
+<../mkupas
CFLAGS=$CFLAGS -I../common
--- a/sys/src/cmd/upas/fs/mkfile
+++ b/sys/src/cmd/upas/fs/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=fs
LIB=../common/libcommon.a$O
@@ -24,6 +23,7 @@
dat.h\
</sys/src/cmd/mkone
+<../mkupas
CFLAGS=$CFLAGS -I../common
acid:V:
--- a/sys/src/cmd/upas/imap4d/mkfile
+++ b/sys/src/cmd/upas/imap4d/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=imap4d
@@ -31,3 +30,4 @@
fns.h\
</sys/src/cmd/mkone
+<../mkupas
--- a/sys/src/cmd/upas/marshal/mkfile
+++ b/sys/src/cmd/upas/marshal/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=marshal
LIB=../common/libcommon.a$O
@@ -7,5 +6,6 @@
HFILES=../common/common.h
</sys/src/cmd/mkone
+<../mkupas
CFLAGS=$CFLAGS -I../common
--- a/sys/src/cmd/upas/ml/mkfile
+++ b/sys/src/cmd/upas/ml/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=\
ml\
@@ -17,6 +16,7 @@
../smtp/rfc822.tab.h\
</sys/src/cmd/mkmany
+<../mkupas
CFLAGS=$CFLAGS -I../common
$O.ml: ../smtp/rfc822.tab.$O
@@ -23,4 +23,4 @@
$O.mlowner: ../smtp/rfc822.tab.$O
../smtp/rfc822.tab.h ../smtp/rfc822.tab.$O: ../smtp/rfc822.y
- cd ../smtp && mk rfc822.tab.$O
+ cd ../smtp && mk rfc822.tab.h rfc822.tab.$O
--- a/sys/src/cmd/upas/ned/mkfile
+++ b/sys/src/cmd/upas/ned/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=nedmail
LIB=../common/libcommon.a$O
@@ -7,4 +6,5 @@
HFILES=../common/common.h
</sys/src/cmd/mkone
+<../mkupas
CFLAGS=$CFLAGS -I../common
--- a/sys/src/cmd/upas/pop3/mkfile
+++ b/sys/src/cmd/upas/pop3/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=pop3
LIB=../common/libcommon.a$O
@@ -6,4 +5,5 @@
OFILES=pop3.$O
</sys/src/cmd/mkone
+<../mkupas
CFLAGS=$CFLAGS -I../common
--- a/sys/src/cmd/upas/q/mkfile
+++ b/sys/src/cmd/upas/q/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=\
qer\
@@ -12,4 +11,5 @@
../common/sys.h\
</sys/src/cmd/mkmany
+<../mkupas
CFLAGS=$CFLAGS -I../common
--- a/sys/src/cmd/upas/qfrom/mkfile
+++ b/sys/src/cmd/upas/qfrom/mkfile
@@ -1,7 +1,7 @@
</$objtype/mkfile
-<../mkupas
TARG=qfrom
OFILES=qfrom.$O
</sys/src/cmd/mkone
+<../mkupas
--- a/sys/src/cmd/upas/scanmail/mkfile
+++ b/sys/src/cmd/upas/scanmail/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=\
scanmail\
@@ -14,6 +13,7 @@
../common/sys.h\
</sys/src/cmd/mkmany
+<../mkupas
CFLAGS=$CFLAGS -I../common
scanmail.$O: scanmail.c
--- a/sys/src/cmd/upas/send/mkfile
+++ b/sys/src/cmd/upas/send/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=\
send\
@@ -32,6 +31,7 @@
../common/sys.h\
</sys/src/cmd/mkmany
+<../mkupas
CFLAGS=$CFLAGS -I../common
$O.send: $SOBJ $OFILES
@@ -42,4 +42,4 @@
message.$O: ../smtp/rfc822.tab.h
../smtp/rfc822.tab.h ../smtp/rfc822.tab.$O: ../smtp/rfc822.y
- cd ../smtp && mk rfc822.tab.$O
+ cd ../smtp && mk rfc822.tab.h rfc822.tab.$O
--- a/sys/src/cmd/upas/smtp/mkfile
+++ b/sys/src/cmd/upas/smtp/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=\
smtpd\
@@ -16,9 +15,10 @@
TEST=parsetest
-CLEANFILES=*.tab.?
+CLEANFILES=rfc822.tab.h rfc822.tab.c smtpd.tab.c
</sys/src/cmd/mkmany
+<../mkupas
CFLAGS=$CFLAGS -I../common
$O.smtpd:\
--- a/sys/src/cmd/upas/spf/mkfile
+++ b/sys/src/cmd/upas/spf/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=spf
@@ -9,6 +8,7 @@
spf.$O\
</sys/src/cmd/mkone
+<../mkupas
mtest: dns.$O macro.$O mtest.$O
$LD $LDFLAGS -o $target $prereq
--- a/sys/src/cmd/upas/unesc/mkfile
+++ b/sys/src/cmd/upas/unesc/mkfile
@@ -1,7 +1,7 @@
</$objtype/mkfile
-<../mkupas
TARG=unesc
OFILES=unesc.$O
</sys/src/cmd/mkone
+<../mkupas
--- a/sys/src/cmd/upas/vf/mkfile
+++ b/sys/src/cmd/upas/vf/mkfile
@@ -1,5 +1,4 @@
</$objtype/mkfile
-<../mkupas
TARG=vf
LIB=../common/libcommon.a$O
@@ -9,4 +8,5 @@
../common/sys.h\
</sys/src/cmd/mkone
+<../mkupas
CFLAGS=$CFLAGS -I../common