pc, pc64: properly track dependencies for mem.h on autogenerated apbootstrap.h and reboot.h targets

This commit is contained in:
cinap_lenrek 2019-01-04 02:51:29 +01:00
parent c88ed6488f
commit d0f824edc2
2 changed files with 9 additions and 7 deletions

View file

@ -8,8 +8,9 @@ objtype=386
p=9
# must match mem.h
APBOOTSTRAP=0xF0007000
KTZERO=0xF0100020
APBOOTSTRAP=0xF0007000
REBOOTADDR=0x11000
DEVS=`{rc ../port/mkdevlist $CONF}
@ -143,15 +144,15 @@ init.h:D: ../port/initcode.c init9.c
sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
echo '};'} > init.h
reboot.h:D: rebootcode.s
reboot.h:D: rebootcode.s mem.h
$AS rebootcode.s
$LD -l -s -T0x11000 -R4 -o reboot.out rebootcode.$O
$LD -l -s -T$REBOOTADDR -R4 -o reboot.out rebootcode.$O
{echo 'uchar rebootcode[]={'
xd -1x reboot.out |
sed -e '1,2d' -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
echo '};'} > reboot.h
apbootstrap.h: apbootstrap.s mem.h
apbootstrap.h:D: apbootstrap.s mem.h
$AS $prereq
$LD -o apbootstrap.out -T$APBOOTSTRAP -R4 -l -s apbootstrap.$O
{echo 'uchar apbootstrap[]={'

View file

@ -5,6 +5,7 @@ objtype=amd64
</$objtype/mkfile
p=9
# must match mem.h
KTZERO=0xffffffff80110000
APBOOTSTRAP=0xffffffff80007000
REBOOTADDR=0x11000
@ -99,7 +100,7 @@ REPCC=`{../port/mkfilelist ../pc}
<../port/portmkfile
<|../port/mkbootrules $CONF
l.$O apbootstrap.$O: mem.h
l.$O: mem.h
$ETHER: ../port/etherif.h ../port/netif.h
$AUDIO: ../port/audioif.h
@ -144,7 +145,7 @@ init.h:D: ../port/initcode.c ../pc/init9.c
sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
echo '};'} > init.h
reboot.h: rebootcode.s
reboot.h:D: rebootcode.s mem.h
$AS rebootcode.s
$LD -l -R1 -s -o reboot.out -T$REBOOTADDR rebootcode.$O
{echo 'uchar rebootcode[]={'
@ -153,7 +154,7 @@ reboot.h: rebootcode.s
sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
echo '};'} > $target
apbootstrap.h: apbootstrap.s
apbootstrap.h:D: apbootstrap.s mem.h
$AS apbootstrap.s
$LD -l -R1 -s -o apbootstrap.out -T$APBOOTSTRAP apbootstrap.$O
{echo 'uchar apbootstrap[]={'