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.
This commit is contained in:
parent
2d59d75e3a
commit
ea98dafce5
|
@ -12,7 +12,6 @@ TARG=\
|
||||||
applylog\
|
applylog\
|
||||||
compactdb\
|
compactdb\
|
||||||
updatedb\
|
updatedb\
|
||||||
$SCRIPTS\
|
|
||||||
|
|
||||||
OFILES=\
|
OFILES=\
|
||||||
db.$O\
|
db.$O\
|
||||||
|
@ -20,29 +19,16 @@ OFILES=\
|
||||||
|
|
||||||
HFILES=all.h
|
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
|
BIN=/$objtype/bin/replica
|
||||||
</sys/src/cmd/mkmany
|
</sys/src/cmd/mkmany
|
||||||
|
|
||||||
$O.applychanges: revproto.$O
|
$O.applychanges: revproto.$O
|
||||||
|
|
||||||
${SCRIPTS:%=$BIN/%}:
|
${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
|
chmod +x $target
|
||||||
|
|
||||||
${SCRIPTS:%=$O.%}:QV:
|
install:V: ${TARG:%=$BIN/%} ${SCRIPTS:%=$BIN/%}
|
||||||
;
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue