9front - general discussion about 9front
 help / color / mirror / Atom feed
* upas: mkfile cleanup patch
@ 2020-11-17  1:23 Amavect
  2020-11-18  0:14 ` [9front] " ori
  0 siblings, 1 reply; 4+ messages in thread
From: Amavect @ 2020-11-17  1:23 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 371 bytes --]

All,

Cleanup in aisle upas. See attached.


Description:
upas: mkfile cleanup (thanks Amavect)

Changeset 8035 broke the libcommon rule in mkupas.
Deleting the 'mk clean' in the recipe fixes this.

Cleanup includes deleting UPDATE vars from all mkfiles,
reorganization of vars in TARG,LIB,OFILE,HFILE order,
and deletion of extra vars used for UPDATE.


Thanks,
Amavect

[-- Attachment #2: upasmkfiles.diff --]
[-- Type: text/plain, Size: 12270 bytes --]

diff -r c6e94385ea0f sys/src/cmd/upas/Mail/mkfile
--- a/sys/src/cmd/upas/Mail/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/Mail/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -2,25 +2,18 @@
 <../mkupas
 
 TARG=Mail
-OFILES=\
-		html.$O\
-		mail.$O\
-		mesg.$O\
-		reply.$O\
-		util.$O\
-		win.$O
+OFILES=html.$O\
+	mail.$O\
+	mesg.$O\
+	reply.$O\
+	util.$O\
+	win.$O\
 
 HFILES=dat.h
-LIB=
 
 # BIN=/acme/bin/$objtype
 BIN=$ABIN
 
-UPDATE=\
-	mkfile\
-	$HFILES\
-	${OFILES:%.$O=%.c}\
-
 </sys/src/cmd/mkone
 
 $O.out: $OFILES
diff -r c6e94385ea0f sys/src/cmd/upas/alias/mkfile
--- a/sys/src/cmd/upas/alias/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/alias/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -2,19 +2,10 @@
 <../mkupas
 
 TARG=aliasmail
-
-OFILES=aliasmail.$O\
-
-LIB=../common/libcommon.a$O\
-
+LIB=../common/libcommon.a$O
+OFILES=aliasmail.$O
 HFILES=../common/common.h\
 	 ../common/sys.h\
 
-
-UPDATE=\
-	mkfile\
-	$HFILES\
-	${OFILES:%.$O=%.c}\
-
 </sys/src/cmd/mkone
 CFLAGS=$CFLAGS -I../common
diff -r c6e94385ea0f sys/src/cmd/upas/bayes/mkfile
--- a/sys/src/cmd/upas/bayes/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/bayes/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -1,11 +1,8 @@
 </$objtype/mkfile
+<../mkupas
 
 TARG=addhash bayes msgtok
-HFILES=
-OFILES=
-LIB=
 
-BIN=/$objtype/bin/upas
 </sys/src/cmd/mkmany
 
 # msg tokenizer
diff -r c6e94385ea0f sys/src/cmd/upas/binscripts/mkfile
--- a/sys/src/cmd/upas/binscripts/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/binscripts/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -24,11 +24,5 @@
 nuke:V:
 	rm $BIN/^($RCFILES)
 
-UPDATE=$RCFILES
-
-update:V:
-	update $UPDATEFLAGS $UPDATE
-
 $BIN/%: %.rc
 	cp $stem.rc $BIN/$stem
-
diff -r c6e94385ea0f sys/src/cmd/upas/binscripts/mkfile.rc
--- a/sys/src/cmd/upas/binscripts/mkfile.rc	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/binscripts/mkfile.rc	Mon Nov 16 19:14:22 2020 -0600
@@ -1,5 +1,5 @@
 
-RCFILES=mail.rc\
+RCFILES=mail.rc
 
 all:Q:
 	;
@@ -20,19 +20,3 @@
 	;
 nuke:V:
 	rm /rc/bin/mail
-
-UPDATE=\
-	gone.fishing\
-	gone.msg\
-	mail.rc\
-	mail.sh\
-	makefile\
-	mkfile\
-	namefiles\
-	omail.rc\
-	qmail\
-	remotemail\
-	rewrite\
-
-update:V:
-	update $UPDATEFLAGS $UPDATE
diff -r c6e94385ea0f sys/src/cmd/upas/common/mkfile
--- a/sys/src/cmd/upas/common/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/common/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -1,8 +1,7 @@
 </$objtype/mkfile
 
 LIB=libcommon.a$O
-OFILES=\
-	aux.$O\
+OFILES=aux.$O\
 	become.$O\
 	config.$O\
 	folder.$O\
diff -r c6e94385ea0f sys/src/cmd/upas/filterkit/mkfile
--- a/sys/src/cmd/upas/filterkit/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/filterkit/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -1,22 +1,13 @@
 </$objtype/mkfile
 <../mkupas
 
-TARG=\
-	deliver\
+TARG=deliver\
 	list\
 	mbappend\
 	token\
 
-LIB=../common/libcommon.a$O\
-
+LIB=../common/libcommon.a$O
 OFILES=readaddrs.$O
-UPDATE=\
-	mkfile\
-	${TARG:%=%.c}\
-	pipeto.sample\
-	pipefrom.sample\
-	pipeto.sample-hold\
 
 </sys/src/cmd/mkmany
 CFLAGS=$CFLAGS -I../common
-
diff -r c6e94385ea0f sys/src/cmd/upas/fs/mkfile
--- a/sys/src/cmd/upas/fs/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/fs/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -1,9 +1,9 @@
 </$objtype/mkfile
+<../mkupas
 
 TARG=fs
-
-OFILES=\
-	cache.$O\
+LIB=../common/libcommon.a$O
+OFILES=cache.$O\
 	fs.$O\
 	header.$O\
 	idx.$O\
@@ -18,21 +18,11 @@
 	strtotm.$O\
 	tls.$O\
 
-LIB=../common/libcommon.a$O\
-
-HFILES= ../common/common.h\
+HFILES=../common/common.h\
 	dat.h
 
-UPDATE=\
-	mkfile\
-	$HFILES\
-	${TARG:%=%.c}\
-	${OFILES:%.$O=%.c}\
-
 </sys/src/cmd/mkone
 CFLAGS=$CFLAGS  -I../common
 
-<../mkupas
-
 acid:V:
 	$CC -a $CFLAGS fs.c>a$O
diff -r c6e94385ea0f sys/src/cmd/upas/imap4d/mkfile
--- a/sys/src/cmd/upas/imap4d/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/imap4d/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -1,7 +1,9 @@
 </$objtype/mkfile
+<../mkupas
 
-OFILES=\
-	auth.$O\
+TARG=imap4d
+
+OFILES=auth.$O\
 	copy.$O\
 	csquery.$O\
 	date.$O\
@@ -26,13 +28,4 @@
 HFILES=imap4d.h\
 	fns.h\
 
-TARG=imap4d
-
-UPDATE=\
-	mkfile\
-	$HFILES\
-	${OFILES:%.$O=%.c}\
-
 </sys/src/cmd/mkone
-
-<../mkupas
diff -r c6e94385ea0f sys/src/cmd/upas/marshal/mkfile
--- a/sys/src/cmd/upas/marshal/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/marshal/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -2,18 +2,10 @@
 <../mkupas
 
 TARG=marshal
+LIB=../common/libcommon.a$O
+OFILES=marshal.$O
+HFILES=../common/common.h
 
-LIB=../common/libcommon.a$O\
-
-HFILES=	../common/common.h\
-
-OFILES= marshal.$O
-
-UPDATE=\
-	mkfile\
-	$HFILES\
-	${OFILES:%.$O=%.c}\
-	
 </sys/src/cmd/mkone
 CFLAGS=$CFLAGS -I../common
 
diff -r c6e94385ea0f sys/src/cmd/upas/mkfile
--- a/sys/src/cmd/upas/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -1,8 +1,7 @@
 </$objtype/mkfile
 
 LIBS=common
-PROGS=\
-	Mail\
+PROGS=Mail\
 	alias\
 	bayes\
 	binscripts\
@@ -24,46 +23,10 @@
 #libs must be made first
 DIRS=$LIBS $PROGS
 
-UPDATE=\
-	mkfile\
-	/sys/man/1/mail\
-
-all:V:
+all install installall clean nuke:V:
 	for (i in $DIRS) @{
 		cd $i
-		mk all
-	}
-
-clean:V:
-	for (i in $DIRS) @{
-		cd $i
-		mk clean
-	}
-
-nuke:V:
-	for (i in $LIBS) @{
-		cd $i
-		mk nuke
-	}
-	for (i in $PROGS) @{
-		cd $i
-		mk clean
-	}
-
-install:V:
-	for (i in $DIRS) @{
-		cd $i
-		mk install
-	}
-
-installall:V:
-	for (i in $DIRS) @{
-		cd $i
-		mk installall
-	}
-	for (i in $DIRS) @{
-		cd $i
-		mk clean
+		mk $target
 	}
 
 safeinstallall:V:
@@ -75,15 +38,3 @@
 		cd $i
 		mk safeinstallall
 	}
-	for (i in $DIRS) @{
-		cd $i
-		mk clean
-	}
-
-update:V:
-	update $UPDATEFLAGS $UPDATE
-	for (i in $DIRS) @{
-		cd $i
-		echo '>>>>>>>>>>' `{pwd} '<<<<<<<<<<<'
-		mk $MKFLAGS 'UPDATEFLAGS='$"UPDATEFLAGS update
-	}
diff -r c6e94385ea0f sys/src/cmd/upas/ml/mkfile
--- a/sys/src/cmd/upas/ml/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/ml/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -5,27 +5,15 @@
 	mlowner\
 	mlmgr\
 
-OFILES=\
-	common.$O\
+LIB=../common/libcommon.a$O
 
-LIB=../common/libcommon.a$O\
+OFILES=common.$O
 
-UHFILES= ../common/common.h\
+HFILES=../common/common.h\
 	../common/sys.h\
 	dat.h\
-
-HFILES=$UHFILES\
 	../smtp/y.tab.h\
 
-LIB=../common/libcommon.a$O\
-
-UPDATE=\
-	mkfile\
-	$UHFILES\
-	${TARG:%=%.c}\
-	${OFILES:%.$O=%.c}\
-	../smtp/rfc822.y\
-
 </sys/src/cmd/mkmany
 CFLAGS=$CFLAGS -I../common
 
diff -r c6e94385ea0f sys/src/cmd/upas/ned/mkfile
--- a/sys/src/cmd/upas/ned/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/ned/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -1,19 +1,10 @@
 </$objtype/mkfile
+<../mkupas
 
 TARG=nedmail
-
-LIB=../common/libcommon.a$O\
-
-HFILES=	../common/common.h\
-
+LIB=../common/libcommon.a$O
 OFILES=nedmail.$O
-
-UPDATE=\
-	mkfile\
-	${OFILES:%.$O=%.c}\
-	$HFILES\
+HFILES=../common/common.h
 
 </sys/src/cmd/mkone
 CFLAGS=$CFLAGS -I../common
-
-<../mkupas
diff -r c6e94385ea0f sys/src/cmd/upas/pop3/mkfile
--- a/sys/src/cmd/upas/pop3/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/pop3/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -2,15 +2,8 @@
 <../mkupas
 
 TARG=pop3
-
+LIB=../common/libcommon.a$O
 OFILES=pop3.$O
 
-LIB=../common/libcommon.a$O
-
-UPDATE=\
-	mkfile\
-	${OFILES:%.$O=%.c}\
-
 </sys/src/cmd/mkone
-
 CFLAGS=$CFLAGS -I../common
diff -r c6e94385ea0f sys/src/cmd/upas/q/mkfile
--- a/sys/src/cmd/upas/q/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/q/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -1,21 +1,13 @@
 </$objtype/mkfile
 <../mkupas
 
-TARG = qer\
+TARG=qer\
 	runq\
 
+LIB=../common/libcommon.a$O
 OFILES=
-
 HFILES=../common/common.h\
 	../common/sys.h\
 
-LIB=../common/libcommon.a$O\
-
-UPDATE=\
-	mkfile\
-	$HFILES\
-	${OFILES:%.$O=%.c}\
-	${TARG:%=%.c}\
-
 </sys/src/cmd/mkmany
 CFLAGS=$CFLAGS -I../common
diff -r c6e94385ea0f sys/src/cmd/upas/qfrom/mkfile
--- a/sys/src/cmd/upas/qfrom/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/qfrom/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -1,13 +1,7 @@
 </$objtype/mkfile
+<../mkupas
 
 TARG=qfrom
-OFILES=qfrom.$O\
-
-BIN=/$objtype/bin/upas
-
-UPDATE=\
-	mkfile\
-	$HFILES\
-	${OFILES:%.$O=%.c}\
+OFILES=qfrom.$O
 
 </sys/src/cmd/mkone
diff -r c6e94385ea0f sys/src/cmd/upas/scanmail/mkfile
--- a/sys/src/cmd/upas/scanmail/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/scanmail/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -1,25 +1,18 @@
 </$objtype/mkfile
+<../mkupas
 
 TARG=scanmail\
 	testscan
 
-OFILES=	common.$O
+LIB=../common/libcommon.a$O
 
-HFILES=	spam.h\
+OFILES=common.$O
+
+HFILES=spam.h\
 	../common/sys.h\
 
-LIB=	../common/libcommon.a$O\
-
-UPDATE=\
-	mkfile\
-	$HFILES\
-	${OFILES:%.$O=%.c}\
-	${TARG:%=%.c}\
-
 </sys/src/cmd/mkmany
 CFLAGS=$CFLAGS -I../common
 
-<../mkupas
-
 scanmail.$O:	scanmail.c
 	$CC $CFLAGS scanmail.c
diff -r c6e94385ea0f sys/src/cmd/upas/send/mkfile
--- a/sys/src/cmd/upas/send/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/send/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -4,17 +4,15 @@
 TARG=send\
 	filter
 
-UOFILES=message.$O\
+LIB=../common/libcommon.a$O
+
+OFILES=message.$O\
 	dest.$O\
 	log.$O\
 	skipequiv.$O\
-
-OFILES=\
-	$UOFILES\
 	../smtp/rfc822.tab.$O\
 
-SOBJ=\
-	authorize.$O\
+SOBJ=authorize.$O\
 	bind.$O\
 	cat_mail.$O\
 	gateway.$O\
@@ -23,23 +21,12 @@
 	rewrite.$O\
 	translate.$O\
 
-FOBJ=\
-	cat_mail.$O\
-
+FOBJ=cat_mail.$O
 
 HFILES=send.h\
 	../common/common.h\
 	../common/sys.h\
 
-LIB=../common/libcommon.a$O\
-
-UPDATE=\
-	mkfile\
-	$HFILES\
-	${UOFILES:%.$O=%.c}\
-	${SOBJ:%.$O=%.c}\
-	${TARG:%=%.c}\
-
 </sys/src/cmd/mkmany
 CFLAGS=$CFLAGS -I../common
 
diff -r c6e94385ea0f sys/src/cmd/upas/smtp/mkfile
--- a/sys/src/cmd/upas/smtp/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/smtp/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -1,41 +1,28 @@
 </$objtype/mkfile
 
-TARG = smtpd\
+TARG=smtpd\
 	smtp\
 
-TEST=\
-	parsetest
+LIB=../common/libcommon.a$O
 
 OFILES=
 
-LIB=../common/libcommon.a$O\
-
 HFILES=../common/common.h\
 	../common/sys.h\
 	smtpd.h\
 	smtp.h\
 
-UPDATE=\
-	greylist.c\
-	mkfile\
-	mxdial.c\
-	rfc822.y\
-	smtpd.y\
-	spam.c\
-	$HFILES\
-	${OFILES:%.$O=%.c}\
-	${TARG:%=%.c}\
+TEST=parsetest
 
 </sys/src/cmd/mkmany
 CFLAGS=$CFLAGS -I../common
 
-$O.smtpd:\
-	smtpd.tab.$O\
+$O.smtpd: smtpd.tab.$O\
 	spam.$O\
 	rfc822.tab.$O\
 	greylist.$O\
 
-$O.smtp:	rfc822.tab.$O mxdial.$O
+$O.smtp: rfc822.tab.$O mxdial.$O
 
 smtpd.tab.c: smtpd.y
 	yacc -o xxx smtpd.y
diff -r c6e94385ea0f sys/src/cmd/upas/spf/mkfile
--- a/sys/src/cmd/upas/spf/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/spf/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -3,8 +3,7 @@
 
 TARG=spf
 
-OFILES=\
-	dns.$O\
+OFILES=dns.$O\
 	macro.$O\
 	spf.$O\
 
diff -r c6e94385ea0f sys/src/cmd/upas/unesc/mkfile
--- a/sys/src/cmd/upas/unesc/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/unesc/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -2,11 +2,6 @@
 <../mkupas
 
 TARG=unesc
-OFILES=unesc.$O\
-
-UPDATE=\
-	mkfile\
-	$HFILES\
-	${OFILES:%.$O=%.c}\
+OFILES=unesc.$O
 
 </sys/src/cmd/mkone
diff -r c6e94385ea0f sys/src/cmd/upas/vf/mkfile
--- a/sys/src/cmd/upas/vf/mkfile	Sun Nov 15 22:47:45 2020 +0100
+++ b/sys/src/cmd/upas/vf/mkfile	Mon Nov 16 19:14:22 2020 -0600
@@ -2,18 +2,10 @@
 <../mkupas
 
 TARG=vf
-
-OFILES=vf.$O\
-
-LIB=../common/libcommon.a$O\
-
+LIB=../common/libcommon.a$O
+OFILES=vf.$O
 HFILES=../common/common.h\
 	 ../common/sys.h\
 
-UPDATE=\
-	mkfile\
-	$HFILES\
-	${OFILES:%.$O=%.c}\
-
 </sys/src/cmd/mkone
 CFLAGS=$CFLAGS -I../common

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-18  2:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17  1:23 upas: mkfile cleanup patch Amavect
2020-11-18  0:14 ` [9front] " ori
2020-11-18  2:03   ` Amavect
2020-11-18  2:39     ` ori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).