Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 661aebc

Browse files
committed
New test for generic Makefile.pre.in
1 parent a955967 commit 661aebc

4 files changed

Lines changed: 52 additions & 0 deletions

File tree

Demo/extend/README

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
This directory contains a test and demonstration of the power of the
2+
generic Makefile.pre.in from the Misc directory. There are three
3+
shell scripts. Study the source of the scripts to find out how they
4+
work (it's really easy).
5+
6+
./make_static Make a static python binary with the xx module
7+
linked in. To test this, run ./python and try to
8+
import xx.
9+
10+
./make_shared Make a shared module xx. To test this, run the
11+
standard python interpreter in this directory and try
12+
to import xx.
13+
14+
./make_clean Clean up after either of the above. Note that each
15+
scripts starts by calling this script, to begin with a
16+
clean slate.

Demo/extend/make_clean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#! /bin/sh
2+
3+
# Reset the directory contents.
4+
5+
rm -f Setup* Makefile* *.c *.o *.a *.so *~ python sedscript

Demo/extend/make_shared

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#! /bin/sh
2+
3+
# This script tests and demonstrates the mechanism for building a
4+
# shared library for an additional extension module using the
5+
# generic Makefile.pre.in from the Misc directory.
6+
7+
./make_clean
8+
9+
cp ../../Misc/Makefile.pre.in .
10+
cp ../../Modules/xxmodule.c .
11+
echo '*shared*' >Setup.in
12+
echo xx xxmodule.c >>Setup.in
13+
14+
make -f Makefile.pre.in boot
15+
make Makefile
16+
make

Demo/extend/make_static

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#! /bin/sh
2+
3+
# This script tests and demonstrates the mechanism for building a
4+
# static Python binary with an additional extension module using the
5+
# generic Makefile.pre.in from the Misc directory.
6+
7+
./make_clean
8+
9+
cp ../../Misc/Makefile.pre.in .
10+
cp ../../Modules/xxmodule.c .
11+
echo xx xxmodule.c >Setup.in
12+
13+
make -f Makefile.pre.in boot
14+
make Makefile
15+
make static

0 commit comments

Comments
 (0)