python: remove /$objtype/lib/ape/libpython.a, track graminit.h dependencies, remove graminit.c
This commit is contained in:
parent
8f00b7096e
commit
8f5d831e9e
6 changed files with 34 additions and 2187 deletions
|
@ -1,7 +1,7 @@
|
|||
APE=/sys/src/ape
|
||||
<$APE/config
|
||||
|
||||
LIB=/$objtype/lib/ape/libpython.a
|
||||
LIB=../libpython.a$O
|
||||
|
||||
OFILES=\
|
||||
_bisectmodule.$O\
|
||||
|
@ -117,20 +117,14 @@ OFILES=\
|
|||
|
||||
CFLAGS=-c -I. -I.. -I../Include -DT$objtype -DNDEBUG
|
||||
|
||||
%.$O: expat/%.c
|
||||
%.$O:D: expat/%.c
|
||||
$CC $CFLAGS -DHAVE_EXPAT_CONFIG_H'=1' -DUSE_PYEXPAT_CAPI expat/$stem.c
|
||||
|
||||
%.$O: cjkcodecs/%.c
|
||||
%.$O:D: cjkcodecs/%.c
|
||||
$CC $CFLAGS cjkcodecs/$stem.c
|
||||
|
||||
_elementtree.$O: _elementtree.c
|
||||
_elementtree.$O:D: _elementtree.c
|
||||
$CC $CFLAGS -Iexpat _elementtree.c
|
||||
|
||||
pyexpat.$O: pyexpat.c
|
||||
pyexpat.$O:D: pyexpat.c
|
||||
$CC $CFLAGS -Iexpat pyexpat.c
|
||||
|
||||
_hashopenssl.$O: _hashopenssl.c
|
||||
$CC $CFLAGS -DPLAN9 _hashopenssl.c
|
||||
|
||||
_ssl.$O: _ssl.c
|
||||
$CC $CFLAGS -DPLAN9 _ssl.c
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
APE=/sys/src/ape
|
||||
<$APE/config
|
||||
|
||||
LIB=/$objtype/lib/ape/libpython.a
|
||||
LIB=../libpython.a$O
|
||||
|
||||
OFILES=\
|
||||
abstract.$O\
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
APE=/sys/src/ape
|
||||
<$APE/config
|
||||
|
||||
LIB=/$objtype/lib/ape/libpython.a
|
||||
LIB=../libpython.a$O
|
||||
|
||||
OFILES=\
|
||||
acceler.$O\
|
||||
|
@ -16,7 +16,7 @@ OFILES=\
|
|||
parsetok.$O\
|
||||
tokenizer.$O\
|
||||
|
||||
CLEANFILES=$O.pgen
|
||||
CLEANFILES=pgen.$objtype
|
||||
|
||||
</sys/src/cmd/mksyslib
|
||||
|
||||
|
@ -28,6 +28,8 @@ obmalloc.$O: ../Objects/obmalloc.c
|
|||
mysnprintf.$O: ../Python/mysnprintf.c
|
||||
$CC $CFLAGS $prereq
|
||||
|
||||
parsetok.$O: ../Include/graminit.h
|
||||
|
||||
PGENOFILES=\
|
||||
acceler.$O\
|
||||
bitset.$O\
|
||||
|
@ -46,6 +48,6 @@ PGENOFILES=\
|
|||
obmalloc.$O\
|
||||
mysnprintf.$O\
|
||||
|
||||
$O.pgen: $PGENOFILES
|
||||
pgen.$objtype: $PGENOFILES
|
||||
$LD -o $target $prereq
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,9 +1,8 @@
|
|||
</$cputype/mkfile
|
||||
cpuO=$O
|
||||
APE=/sys/src/ape
|
||||
<$APE/config
|
||||
|
||||
LIB=/$objtype/lib/ape/libpython.a
|
||||
LIB=../libpython.a$O
|
||||
|
||||
OFILES=\
|
||||
Python-ast.$O\
|
||||
|
@ -45,20 +44,19 @@ OFILES=\
|
|||
traceback.$O\
|
||||
graminit.$O\
|
||||
|
||||
CLEANFILES=graminit.c graminit.h
|
||||
|
||||
</sys/src/cmd/mksyslib
|
||||
|
||||
CFLAGS=-c -I.. -I../Include -DT$objtype -DPy_BUILD_CORE -DNDEBUG
|
||||
|
||||
graminit.c ../Include/graminit.h:V: ../Parser/$cpuO.pgen
|
||||
../Parser/$cpuO.pgen ../Grammar/Grammar graminit.h graminit.c
|
||||
mv graminit.h ../Include
|
||||
ast.$O future.$O: ../Include/graminit.h
|
||||
|
||||
../Include/graminit.h: graminit.h
|
||||
cp graminit.h ../Include/graminit.h
|
||||
|
||||
# when cputype!=objtype, $PGENO causes unnecessary object files to be created.
|
||||
# but when cputype==objtype, it keeps this mkfile from fighting with mkfile.pgen
|
||||
# over creating some of these.
|
||||
../Parser/$cpuO.pgen:V: $PGENO
|
||||
@{
|
||||
cd ../Parser
|
||||
objtype=$cputype mk $cpuO.pgen
|
||||
}
|
||||
graminit.c graminit.h:D: ../Grammar/Grammar ../Parser/pgen.$cputype
|
||||
../Parser/pgen.$cputype ../Grammar/Grammar graminit.h graminit.c
|
||||
|
||||
../Parser/pgen.$cputype:D:
|
||||
@{cd ../Parser && objtype=$cputype mk pgen.$cputype}
|
||||
|
|
|
@ -10,44 +10,26 @@ TARG=\
|
|||
OFILES=\
|
||||
config.$O\
|
||||
plan9.$O\
|
||||
libpython.a$O\
|
||||
libextra.a$O\
|
||||
|
||||
LIB= \
|
||||
/$objtype/lib/ape/libpython.a\
|
||||
|
||||
LIBDIRS=Modules Objects Parser Python
|
||||
LIBDIRS=Python Parser Modules Objects Extra
|
||||
|
||||
</sys/src/cmd/mkone
|
||||
|
||||
CFLAGS=-c -I. -IInclude -DT$objtype -DPy_BUILD_CORE -DNDEBUG
|
||||
|
||||
/$objtype/lib/ape/libpython.a:
|
||||
for (i in $LIBDIRS) @{
|
||||
cd $i
|
||||
mk
|
||||
}
|
||||
libpython.a$O libextra.a$O:D:
|
||||
for (i in $LIBDIRS) @{cd $i && mk}
|
||||
|
||||
libextra.a$O:
|
||||
@{
|
||||
cd Extra
|
||||
mk
|
||||
}
|
||||
config.c:D: Modules/config Extra/config mkconfig
|
||||
./mkconfig Modules/config Extra/config > $target
|
||||
|
||||
Extra/config:
|
||||
for(i in `{du -a Extra | grep '.c$' | awk '{print $2}' | sed 's/..$//'})
|
||||
echo `{basename $i} >> Extra/config
|
||||
Extra/config:D:
|
||||
du -a Extra | awk '/\.c$/{print $2}' | sed 's!.*/!!g; s!\.c$!!g' > $target
|
||||
|
||||
config.c: Modules/config Extra/config mkconfig
|
||||
./mkconfig Modules/config Extra/config >config.c
|
||||
|
||||
clean:V:
|
||||
for(i in $LIBDIRS Extra)@{
|
||||
cd $i
|
||||
mk $target
|
||||
}
|
||||
clean nuke:V:
|
||||
for(i in $LIBDIRS) @{cd $i && mk $target}
|
||||
rm -f *.[$OS] [$OS].out y.tab.? y.debug y.output $OFILES
|
||||
rm -f Extra/config config.c
|
||||
|
||||
nuke:V:
|
||||
mk clean
|
||||
rm -f /$objtype/lib/ape/libpython.a
|
||||
rm -f libpython.a[$OS] libextra.a[$OS] /$objtype/lib/ape/libpython.a
|
||||
rm -f config.c Extra/config
|
||||
|
|
Loading…
Reference in a new issue