From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 23210 invoked from network); 24 Aug 2021 23:08:05 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 24 Aug 2021 23:08:05 -0000 Received: from mail-io1-f52.google.com ([209.85.166.52]) by 1ess; Tue Aug 24 18:48:04 -0400 2021 Received: by mail-io1-f52.google.com with SMTP id a13so28349954iol.5 for <9front@9front.org>; Tue, 24 Aug 2021 15:47:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:organization:mime-version; bh=ME612HjEJnConskMUVo+2cforOEZ62vV6ZJbfgnu50U=; b=rOfLxVJNThl4sPGJXoScZi/eJIq2AoE6uRJjroGQB7yDOiwQpGT6yl4Wvfzbaifw4h nLHjUqK54o4daVwuC0++HY0/xq7nekX39kxDwQml602iGPRH27ZQtBA3/+DjWkPENnl0 Rr3dPbBX1oTOoYJ40Pu0MNHasbzgkuJLTdy8c2fVNbZDNYMbQHtn6R5To4OShcIiQ/Yz W0oChdm+eFWXG1bmgilUopuovZxHfTdQCk+qoZm9E/pl2lLJds67aUtT7nFuB5EOcWPv XY79VUjF7hCKk+1Nr5mM2QTskWZQf0LoNlNMwPz9mWamnpo9j1R25xYYjx2Eo7Lc9amE dKrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:organization :mime-version; bh=ME612HjEJnConskMUVo+2cforOEZ62vV6ZJbfgnu50U=; b=NoPt5gbFiy7U9J4cdhJuJpcBhNUlXn0kdGfkZGm+gyPfyAHKRtrjuxeuHcfkNx4Xxp CuqTfyzx8bNgmMLseNhB7uGyDZfEHAWNH8fCPZ8UoarAw/NpXjZOI8hDUJaB3burOvJI KU1zB6DLsu6G8auqSX7RG15794R3BpP4kDDiytxXqPo+cgDY0/AA9rNd96OgH2uc71ot fo2/WuORkIoXJjeRQq9b2r+43uiQvwWQSzYWjKM+RCpfQbwSKAcYZwFBLWYyioMHxIE8 qW3kXW8VlyaAtatlEGYsQYwEXNa1JaghxTC26Zv6O7FR3tlZzz8dtg0MJFh5inRpyVjd vrHQ== X-Gm-Message-State: AOAM530nsp5RpkxGL+mcRHxDHrvSJvLj1IhmM6gx30dMZkvnc0lrTH24 lXzRXbmlEntFml/VH+q9962iMZ3MHuw= X-Google-Smtp-Source: ABdhPJzi1TThrd28eRoFA4tfKW8694S4Wrf+ZCbVP3gcusABnzO07FZqhcngo8JRYbVQdJ9yvMCBlg== X-Received: by 2002:a05:6638:328d:: with SMTP id f13mr7758521jav.105.1629845275122; Tue, 24 Aug 2021 15:47:55 -0700 (PDT) Return-Path: Received: from spruce.localdomain ([2601:246:4e03:dc20::b5e8]) by smtp.gmail.com with ESMTPSA id t15sm3345001ioi.7.2021.08.24.15.47.54 for <9front@9front.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Aug 2021 15:47:54 -0700 (PDT) Date: Tue, 24 Aug 2021 17:47:45 -0500 From: Amavect To: 9front@9front.org Message-ID: <20210824174745.48c6aa87@spruce.localdomain> Organization: Amavect Industries X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/5tSDZuTMP/.3MI8GyNKLnX/" List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: immutable content-driven-aware realtime singleton session-scale out-scaling plugin Subject: [9front] [PATCH] cmd/mkfile: major cleanup Reply-To: 9front@9front.org Precedence: bulk --MP_/5tSDZuTMP/.3MI8GyNKLnX/ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm pinging this patch again, wondering if there is interest. Thanks Amavect From: Amavect Date: Sat, 21 Aug 2021 18:41:01 +0000 Subject: [PATCH] cmd/mkfile: major cleanup Target generation is revised, split into $YTARG and $TARG. $PROGS is inlined to the cmd target. %.cpus is added to allow chaining: mk all.cpus $POWERLESS is added, since dtracy doesn't build yet on ppc. $cpuobjtype is replaced with cp's recipe for copying itself on $cputype. $APEDIRS is removed. The none target is renamed to usage, since it prints out usage. The ape target is removed. The dirs target is replaced by all.dirs %.directories is replaced by %.dirs The all target serializes directories after cmds to match the install target recipe. All regexp rules are replaced with nonregexp versions for clarity. The &:n: rule is removed. Just build the $O.$cmd file. .y files now build .c files, not .tab.c files, and remove (bc|units|mpc|pc).c:R: All safeinstall rules are removed. The cleanfiles rule is renamed to cleancmds and simplified. %.clean is removed. Just use mk cleancmds. The install rule serializes cp and yacc before building anything else, avoiding races. The installall recipe is simplified with the install.cpus prereq. %.installall is removed. Just use mk $cmd.install.cpus The $O.cj, %.update, and compilers rules are removed. --- diff 8c796bf8b9c10a0845717c47af908e47dfe14482 0e7549936b6b628ff6d1600628726f316d5301d2 --- a/sys/src/cmd/mkfile Thu Aug 19 23:07:37 2021 +++ b/sys/src/cmd/mkfile Sat Aug 21 13:41:01 2021 @@ -1,137 +1,75 @@ $target -$BIN/%: $O.% $cpuobjtype._cp - ./$cpuobjtype._cp $O.$stem $BIN/$stem +%.cpus:V: + for(objtype in $CPUS) mk $MKFLAGS $stem -%.directories:V: +%.dirs:V: for(i in $DIRS) @{ cd $i echo mk $i mk $MKFLAGS $stem } -clean:V: cleanfiles clean.directories - -nuke:V: cleanfiles nuke.directories - -directories:V: install.directories +cmds:V: $O.cp $O.yacc ${TARG:%=$O.%} -cleanfiles:V: - rm -f [$OS].out *.[$OS] y.tab.? y.debug y.output [$OS].$TARG [$OS].units.tab $TARG bc.c bc.tab.h units.tab.h units.c mpc.c mpc.tab.h [$OS]._cp +all:V: cmds + mk $MKFLAGS all.dirs -%.clean:V: - rm -f [$OS].$stem $stem.[$OS] +%.install:V: $BIN/% -install:V: - test -e $cpuobjtype._cp || cp /bin/cp $cpuobjtype._cp +install:V: cp.install + mk $MKFLAGS yacc.install mk $MKFLAGS $TARG.install - mk $MKFLAGS directories - -installall:V: - for(objtype in $CPUS) - mk $MKFLAGS install - -%.installall: %.c - test -e $cpuobjtype._cp || cp /bin/cp $cpuobjtype._cp - for (objtype in $CPUS) { - rfork e - mk $stem.install & - } - wait - rm -f $stem.[$OS] y.tab.? $stem.tab.? y.debug y.output [$OS].$stem bc.c bc.tab.h units.c mpc.c - -%.acid: %.$O $HFILES - $CC $CFLAGS -a $stem.c >$target + mk $MKFLAGS install.dirs -(bc|units|mpc|pc).c:R: \1.tab.c - mv $stem1.tab.c $stem1.c +installall:V: install.cpus -$BIN/init: $O.init - cp $prereq /$objtype/init +cleancmds:V: + rm -f *.[$OS] [$OS].* y.tab.? y.debug y.output $YTARG.c *.tab.h -$O.cj: cj.$O - $LD $LDFLAGS -o $O.cj cj.$O /$objtype/lib/libjpg.a +clean:V: cleancmds clean.dirs -%.update:V: - update $stem.c /386/bin/$stem - -compilers:V: - for(i in ?c) - if(! ~ $i cc rc) @{ - cd $i - mk clean - objtype=$cputype mk install - mk clean - } - for(i in ?c) - if(! ~ $i cc rc) @{ - cd $i - mk clean - mk installall - mk clean - } +nuke:V: cleancmds nuke.dirs + rm -f *.acid --MP_/5tSDZuTMP/.3MI8GyNKLnX/ Content-Type: multipart/mixed; boundary="upas-ndeiazlnhrjzsqjcnexydfvwdc" Content-Disposition: inline This is a multi-part message in MIME format. --upas-ndeiazlnhrjzsqjcnexydfvwdc Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit from postmaster@1ess: The following attachment had content that we can't prove to be harmless. To avoid possible automatic execution, we changed the content headers. The original header was: Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=cmdmkfile.diff --upas-ndeiazlnhrjzsqjcnexydfvwdc Content-Type: application/octet-stream Content-Disposition: attachment; filename="cmdmkfile.diff.suspect" From: Amavect Date: Sat, 21 Aug 2021 18:41:01 +0000 Subject: [PATCH] cmd/mkfile: major cleanup Target generation is revised, split into $YTARG and $TARG. $PROGS is inlined to the cmd target. %.cpus is added to allow chaining: mk all.cpus $POWERLESS is added, since dtracy doesn't build yet on ppc. $cpuobjtype is replaced with cp's recipe for copying itself on $cputype. $APEDIRS is removed. The none target is renamed to usage, since it prints out usage. The ape target is removed. The dirs target is replaced by all.dirs %.directories is replaced by %.dirs The all target serializes directories after cmds to match the install target recipe. All regexp rules are replaced with nonregexp versions for clarity. The &:n: rule is removed. Just build the $O.$cmd file. .y files now build .c files, not .tab.c files, and remove (bc|units|mpc|pc).c:R: All safeinstall rules are removed. The cleanfiles rule is renamed to cleancmds and simplified. %.clean is removed. Just use mk cleancmds. The install rule serializes cp and yacc before building anything else, avoiding races. The installall recipe is simplified with the install.cpus prereq. %.installall is removed. Just use mk $cmd.install.cpus The $O.cj, %.update, and compilers rules are removed. --- diff 8c796bf8b9c10a0845717c47af908e47dfe14482 0e7549936b6b628ff6d1600628726f316d5301d2 --- a/sys/src/cmd/mkfile Thu Aug 19 23:07:37 2021 +++ b/sys/src/cmd/mkfile Sat Aug 21 13:41:01 2021 @@ -1,137 +1,75 @@ $target -$BIN/%: $O.% $cpuobjtype._cp - ./$cpuobjtype._cp $O.$stem $BIN/$stem +%.cpus:V: + for(objtype in $CPUS) mk $MKFLAGS $stem -%.directories:V: +%.dirs:V: for(i in $DIRS) @{ cd $i echo mk $i mk $MKFLAGS $stem } -clean:V: cleanfiles clean.directories - -nuke:V: cleanfiles nuke.directories - -directories:V: install.directories +cmds:V: $O.cp $O.yacc ${TARG:%=$O.%} -cleanfiles:V: - rm -f [$OS].out *.[$OS] y.tab.? y.debug y.output [$OS].$TARG [$OS].units.tab $TARG bc.c bc.tab.h units.tab.h units.c mpc.c mpc.tab.h [$OS]._cp +all:V: cmds + mk $MKFLAGS all.dirs -%.clean:V: - rm -f [$OS].$stem $stem.[$OS] +%.install:V: $BIN/% -install:V: - test -e $cpuobjtype._cp || cp /bin/cp $cpuobjtype._cp +install:V: cp.install + mk $MKFLAGS yacc.install mk $MKFLAGS $TARG.install - mk $MKFLAGS directories - -installall:V: - for(objtype in $CPUS) - mk $MKFLAGS install - -%.installall: %.c - test -e $cpuobjtype._cp || cp /bin/cp $cpuobjtype._cp - for (objtype in $CPUS) { - rfork e - mk $stem.install & - } - wait - rm -f $stem.[$OS] y.tab.? $stem.tab.? y.debug y.output [$OS].$stem bc.c bc.tab.h units.c mpc.c - -%.acid: %.$O $HFILES - $CC $CFLAGS -a $stem.c >$target + mk $MKFLAGS install.dirs -(bc|units|mpc|pc).c:R: \1.tab.c - mv $stem1.tab.c $stem1.c +installall:V: install.cpus -$BIN/init: $O.init - cp $prereq /$objtype/init +cleancmds:V: + rm -f *.[$OS] [$OS].* y.tab.? y.debug y.output $YTARG.c *.tab.h -$O.cj: cj.$O - $LD $LDFLAGS -o $O.cj cj.$O /$objtype/lib/libjpg.a +clean:V: cleancmds clean.dirs -%.update:V: - update $stem.c /386/bin/$stem - -compilers:V: - for(i in ?c) - if(! ~ $i cc rc) @{ - cd $i - mk clean - objtype=$cputype mk install - mk clean - } - for(i in ?c) - if(! ~ $i cc rc) @{ - cd $i - mk clean - mk installall - mk clean - } +nuke:V: cleancmds nuke.dirs + rm -f *.acid --upas-ndeiazlnhrjzsqjcnexydfvwdc-- --MP_/5tSDZuTMP/.3MI8GyNKLnX/--