diff options
author | Ori Bernstein <ori@eigenstate.org> | 2020-07-20 18:58:52 -0700 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2020-07-20 18:58:52 -0700 |
commit | ea98dafce5b5657cfd65a3a5210c46bcda367525 (patch) | |
tree | 9ebfba7c1aa9ff7840e8dd451aa97bdd8317a7d3 | |
parent | 2d59d75e3a4faa51bfc146f70aea7734cd8bb9ef (diff) |
replica: fix mkfile script installation (thanks Amavect)
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.
-rw-r--r-- | sys/src/cmd/replica/mkfile | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/sys/src/cmd/replica/mkfile b/sys/src/cmd/replica/mkfile index 61f83d965..7cc5c4b0c 100644 --- a/sys/src/cmd/replica/mkfile +++ b/sys/src/cmd/replica/mkfile @@ -12,7 +12,6 @@ TARG=\ applylog\ compactdb\ updatedb\ - $SCRIPTS\ OFILES=\ db.$O\ @@ -20,29 +19,16 @@ OFILES=\ 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/%} |