From: Amavect <amavect@gmail.com>
To: 9front@9front.org
Subject: replica mkfile patch
Date: Sat, 18 Jul 2020 22:06:42 -0500 [thread overview]
Message-ID: <46ab125d-82ac-2c55-f00e-3239b2130c9d@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 545 bytes --]
description:
replica: fix mkfile script installation
The $SCRIPTS were added to $TARG, which complicates the all rule, as
each script's object file must be suppressed.
Fix by removing $SCRIPTS from $TARG, removing the script object file
suppression rule, and overriding the install rule.
The script bin install rule assumes that only one script install is
called at a time. Valid calls like 'mk -a /$objtype/replica/changes
/$objtype/replica/pull' will fail.
Fix by adding a for loop.
Remove the unused $UPDATE variable.
Thanks,
Amavect
[-- Attachment #2: replica.diff --]
[-- Type: text/plain, Size: 934 bytes --]
diff -r 38dcaeaa222c sys/src/cmd/replica/mkfile
--- a/sys/src/cmd/replica/mkfile Sun May 24 17:50:37 2020 +0200
+++ b/sys/src/cmd/replica/mkfile Sun Jul 19 02:36:32 2020 -0500
@@ -12,7 +12,6 @@
applylog\
compactdb\
updatedb\
- $SCRIPTS\
OFILES=\
db.$O\
@@ -20,29 +19,16 @@
HFILES=all.h
-UPDATE=\
- mkfile\
- /sys/man/1/replica\
- /sys/man/8/replica\
- ${OFILES:%.$O=%.c}\
- revproto.c\
- $HFILES\
- applychanges.c\
- updatedb.c\
- ${TARG:%=/386/bin/replica/%}\
- ${SCRIPTS:%=/rc/bin/replica/%}\
- /rc/bin/replica/defs\
-
-
BIN=/$objtype/bin/replica
</sys/src/cmd/mkmany
$O.applychanges: revproto.$O
${SCRIPTS:%=$BIN/%}:
- { echo '#!/bin/rc'; echo 'exec /rc/bin/replica/'^`{basename $target}^' $*' } >$target
+ for(i in $target){
+ echo '#!/bin/rc'
+ echo 'exec /rc/bin/replica/'^`{basename $i}^' $*'
+ } >$i
chmod +x $target
-${SCRIPTS:%=$O.%}:QV:
- ;
-
+install:V: ${TARG:%=$BIN/%} ${SCRIPTS:%=$BIN/%}
next reply other threads:[~2020-07-19 3:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-19 3:06 Amavect [this message]
2020-07-19 3:40 ` [9front] " ori
2020-07-21 0:26 ` Amavect
2020-07-21 1:59 ` ori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46ab125d-82ac-2c55-f00e-3239b2130c9d@gmail.com \
--to=amavect@gmail.com \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).