mirror of
https://github.com/python/cpython
synced 2024-09-16 00:27:20 +00:00
New test for generic Makefile.pre.in
This commit is contained in:
parent
a955967a5b
commit
661aebcbde
16
Demo/extend/README
Normal file
16
Demo/extend/README
Normal file
|
@ -0,0 +1,16 @@
|
|||
This directory contains a test and demonstration of the power of the
|
||||
generic Makefile.pre.in from the Misc directory. There are three
|
||||
shell scripts. Study the source of the scripts to find out how they
|
||||
work (it's really easy).
|
||||
|
||||
./make_static Make a static python binary with the xx module
|
||||
linked in. To test this, run ./python and try to
|
||||
import xx.
|
||||
|
||||
./make_shared Make a shared module xx. To test this, run the
|
||||
standard python interpreter in this directory and try
|
||||
to import xx.
|
||||
|
||||
./make_clean Clean up after either of the above. Note that each
|
||||
scripts starts by calling this script, to begin with a
|
||||
clean slate.
|
5
Demo/extend/make_clean
Executable file
5
Demo/extend/make_clean
Executable file
|
@ -0,0 +1,5 @@
|
|||
#! /bin/sh
|
||||
|
||||
# Reset the directory contents.
|
||||
|
||||
rm -f Setup* Makefile* *.c *.o *.a *.so *~ python sedscript
|
16
Demo/extend/make_shared
Executable file
16
Demo/extend/make_shared
Executable file
|
@ -0,0 +1,16 @@
|
|||
#! /bin/sh
|
||||
|
||||
# This script tests and demonstrates the mechanism for building a
|
||||
# shared library for an additional extension module using the
|
||||
# generic Makefile.pre.in from the Misc directory.
|
||||
|
||||
./make_clean
|
||||
|
||||
cp ../../Misc/Makefile.pre.in .
|
||||
cp ../../Modules/xxmodule.c .
|
||||
echo '*shared*' >Setup.in
|
||||
echo xx xxmodule.c >>Setup.in
|
||||
|
||||
make -f Makefile.pre.in boot
|
||||
make Makefile
|
||||
make
|
15
Demo/extend/make_static
Executable file
15
Demo/extend/make_static
Executable file
|
@ -0,0 +1,15 @@
|
|||
#! /bin/sh
|
||||
|
||||
# This script tests and demonstrates the mechanism for building a
|
||||
# static Python binary with an additional extension module using the
|
||||
# generic Makefile.pre.in from the Misc directory.
|
||||
|
||||
./make_clean
|
||||
|
||||
cp ../../Misc/Makefile.pre.in .
|
||||
cp ../../Modules/xxmodule.c .
|
||||
echo xx xxmodule.c >Setup.in
|
||||
|
||||
make -f Makefile.pre.in boot
|
||||
make Makefile
|
||||
make static
|
Loading…
Reference in a new issue