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

Skip to content

Commit 1442177

Browse files
committed
Some new files...
1 parent 14a6e3d commit 1442177

5 files changed

Lines changed: 100 additions & 1 deletion

File tree

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ John Redford
6666
Timothy Roscoe
6767
Jim Roskind
6868
Kevin Samborn
69+
Michael Scharf
6970
Fred Sells
7071
Denis Severson
7172
Michael Shiplett

Misc/HPUX-NOTES

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Subject: Dynamic Linking under HP-UX
2+
From: "C. Derek Fields" <[email protected]>
3+
Date: Thu, 08 Sep 94 14:14:07 -0400
4+
5+
There are two important points. First, the python executable must be
6+
linked with the -E option to explicitly export all symbols. This
7+
works with the vanilla interpreter, but I am not sure how friendly it
8+
will be when I try to embed the interpreter in a larger application.
9+
It may be necessary to hand tune the exports using the -e option.
10+
Anyway, the additional flag to $(CC) is "-Wl,-E", which passes the -E
11+
flag to the compiler. My link line (from an actual run) looks like
12+
this:
13+
14+
cc config.o -Wl,-E libModules.a ../Python/libPython.a ../Objects/libObjects.a ../Parser/libParser.a -lm -ldld -o python
15+
16+
Second, the dynamic module must be compiled with the +z option to make
17+
it position independent and then linked into a shared library:
18+
19+
ld -b -o <modName>module.sl <object list>
20+
21+
The -b tells the linker to produce a shared library.

Misc/README

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,17 @@ COPYRIGHT The Python copyright notice
1717
FAQ Frequently Asked Questions about Python (and answers)
1818
Fixcprt.py Fix the copyright message (a yearly chore :-)
1919
HISTORY News from previous releases -- oldest last
20+
HPUX-NOTES Notes about dynamic loading under HP-UX
21+
HYPE More hype about Python
2022
Makefile Used for administrative chores like cleaning up
2123
NEWS News for this release
2224
README The file you're reading now
2325
RFD Request For Discussion about a Python newsgroup
2426
cheatsheet Quick summary of Python by Ken Mannheimer
27+
dlMakefile Generic Makefile for dynamically loadable modules by Ken M.
2528
fixfuncptrs.sh Shell script to fix function pointer initializers
29+
indent.pro GNU indent profile approximating my C style (by Steen Lumholt)
2630
python-mode.el Emacs mode for editing Python programs (thanks, Tim!)
27-
python.gif 4-level grayscale image of a Python (snake)
31+
python.gif 4-level grayscale image of a Python snake
2832
python.man UNIX man page for the python interpreter
2933
renumber.py Script to renumber the sections in the FAQ

Misc/dlMakefile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Makefile to do general-coverage creation of dynamic-load libraries
2+
# from python C-module sources.
3+
4+
# $Id$
5+
# Created by Ken Manheimer, Jul-1994. [email protected], 301 975-3539
6+
7+
# To configure for your site, select the appropriate SOURCES and macro
8+
# def and assign the right path to the prefix macro.
9+
10+
ARCH= sun4
11+
prefix= /depot/sundry
12+
DESTLIB= $(prefix)/lib/python/$(ARCH)
13+
14+
### For Sun Make; tested in v 1.0, under both SunOS 4.1.3 and SunOS 5.3:
15+
#SOURCES:sh= echo *.c
16+
### For Gnu Make; works at least for v 3.59:
17+
SOURCES= $(wildcard *.c)
18+
19+
# To configure for a new module:
20+
# - put the module in the current directory
21+
# - if it doesn't require any special compile or load options, that's it.
22+
# - if it does require special compile or load options, create a macro
23+
# composed of the (full) module name, sans suffix, plus 'CFLAGS' or
24+
# 'LDFLAGS', depending on the compile phase in question.
25+
metalbasemoduleCFLAGS= -I$(prefix)/include/mbase51 -DNO_TIMEB -DNO_USHORT -DNO_ENCRYPT
26+
metalbasemoduleLDFLAGS= -L/depot/sundry/plat/lib -lmb
27+
cursesmoduleCFLAGS= -I/usr/5include
28+
cursesmoduleLDFLAGS= -L/usr/5lib -lcurses -ltermcap
29+
30+
OBJS= $(SOURCES:.c=.so)
31+
32+
CC= gcc
33+
OPT= -g -O
34+
DEFS= -DHAVE_CONFIG_H
35+
INCLDIR= $(prefix)/include/python
36+
CFLAGS= $(OPT) -I$(INCLDIR) -I.. $(DEFS)
37+
LD= ld
38+
39+
all: $(OBJS)
40+
41+
%.o: %.c
42+
$(CC) -c $(CFLAGS) $(CPPFLAGS) $($*CFLAGS) -o $@ $<
43+
44+
%.so: %.o
45+
$(LD) $(LDFLAGS) -o $@ $< $($*LDFLAGS) $(LOADLIBES)
46+
47+
PHONY: echo # For testing derivation of $(OBJS).
48+
echo:
49+
@echo "(Set SOURCES def if you don't see a '.so' for each '.c' between the brackets)"
50+
@echo :$(OBJS):
51+
52+
PHONY : install
53+
install: $(OBJS)
54+
ls $(OBJS) | cpio -pm $(DESTLIB)
55+
56+
PHONY : clean
57+
clean:
58+
rm -f *.o *.so

Misc/indent.pro

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
-sob
2+
-nbad
3+
-bap
4+
-br
5+
-nce
6+
-ncs
7+
-npcs
8+
-i8
9+
-ip8
10+
-c25
11+
-T PyObject
12+
13+
14+
15+

0 commit comments

Comments
 (0)