Move playerX.[vs]lo.in to player0.[vs]lo

This adds make warnings, which are hopefully always reacted upon as they are in my version of GNU make, so it does the correct thing and not try to replace player0.[vs]lo with itself or do other crap...
make: Circular player0.slo <- player0.slo dependency dropped.
make: Circular player0.vlo <- player0.vlo dependency dropped.
Also: Add clean target


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3851 4a71c877-e1ca-e34f-864e-861f7616d084
master
Dennis Schridde 2008-02-20 18:46:23 +00:00
parent f37984a87c
commit 8485224b12
3 changed files with 11 additions and 8 deletions

View File

@ -1,11 +1,14 @@
player%.slo:: playerX.slo.in
player%.slo:: player0.slo
cp -p $< $@
player%.vlo:: playerX.vlo.in
player%.vlo:: player0.vlo
cp -p $< $@
sed -r -i "s/script\s+\"playerX\.slo\"/script \"$(@:%.vlo=%.slo)\"/" $@
sed -r -i "s/player\s+INT\s+X/player INT $(@:player%.vlo=%)/" $@
@if [ ! `grep -c -P "script\s+\"playerX\.slo\"" $@` -eq 0 -o ! `grep -c -P "script\s+\"$(@:%.vlo=%.slo)\"" $@` -eq 1 ] ; then echo "Template script wrong?!" ; exit 1 ; fi
@if [ ! `grep -c -P "player\s+INT\s+X" $@` -eq 0 -o ! `grep -c -P "player\s+INT\s+$(@:player%.vlo=%)" $@` -eq 1 ] ; then echo "Template script wrong?!" ; exit 1 ; fi
sed -r -i "s/script\s+\"player0\.slo\"/script \"$(@:%.vlo=%.slo)\"/" $@
sed -r -i "s/player\s+INT\s+0/player INT $(@:player%.vlo=%)/" $@
@if [ ! `grep -c -P "script\s+\"player0\.slo\"" $@` -eq 0 -o ! `grep -c -P "script\s+\"$(@:%.vlo=%.slo)\"" $@` -eq 1 ] ; then echo "Template script wrong?!" ; exit 1 ; fi
@if [ ! `grep -c -P "player\s+INT\s+0" $@` -eq 0 -o ! `grep -c -P "player\s+INT\s+$(@:player%.vlo=%)" $@` -eq 1 ] ; then echo "Template script wrong?!" ; exit 1 ; fi
all: player0.slo player1.slo player2.slo player3.slo player4.slo player5.slo player6.slo player7.slo player0.vlo player1.vlo player2.vlo player3.vlo player4.vlo player5.vlo player6.vlo player7.vlo
clean:
rm -f player[1234567].[vs]lo

View File

@ -1,7 +1,7 @@
script "playerX.slo"
script "player0.slo"
run
{
player INT X
player INT 0
derrick STRUCTURESTAT "A0ResourceExtractor"