summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-07-15 20:15:23 +0000
committerjbj <devnull@localhost>1999-07-15 20:15:23 +0000
commitc3f62fe632456a58e60107f972692a9f5afe9f00 (patch)
treea2ea55daedd657b089a4f2238efe9b7d466782e1 /python
parentaa85d25a0e5e3b146f8f65c582c652d62109869c (diff)
downloadrpm-c3f62fe632456a58e60107f972692a9f5afe9f00.tar.gz
rpm-c3f62fe632456a58e60107f972692a9f5afe9f00.tar.bz2
rpm-c3f62fe632456a58e60107f972692a9f5afe9f00.zip
Automake to create python bindings.
CVS patchset: 3164 CVS date: 1999/07/15 20:15:23
Diffstat (limited to 'python')
-rw-r--r--python/.cvsignore6
-rw-r--r--python/Makefile16
-rw-r--r--python/Makefile.am36
3 files changed, 13 insertions, 45 deletions
diff --git a/python/.cvsignore b/python/.cvsignore
new file mode 100644
index 000000000..51f6a4ce4
--- /dev/null
+++ b/python/.cvsignore
@@ -0,0 +1,6 @@
+.deps
+Makefile
+Makefile.in
+.libs
+*.la
+*.lo
diff --git a/python/Makefile b/python/Makefile
deleted file mode 100644
index ec27a28a6..000000000
--- a/python/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-DESTDIR = $(TOPDIR)/RedHat/instimage/usr/lib/python1.5/site-packages
-
-CFLAGS += -I/usr/include/rpm -I/usr/include/python1.5 -g
-
-TARGET = rpmmodule.so
-
-all: $(TARGET)
-
-rpmmodule.so: rpmmodule.o
- gcc -shared -o $@ rpmmodule.o -lrpm -lz -ldb1
-
-clean:
- rm -f *.o $(TARGET)
-
-install: all
- cp $(TARGET) $(DESTDIR)
diff --git a/python/Makefile.am b/python/Makefile.am
index 45c82d32e..f6c769fe9 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -2,46 +2,24 @@
AUTOMAKE_OPTIONS = 1.4 foreign
-PYVER= @WITH_PYTHON_VERSION@
-
INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/lib \
- -I$(top_srcdir)/rpmdb \
- -I$(top_srcdir)/rpmio \
- -I$(top_srcdir)/beecrypt \
-I$(top_srcdir)/popt \
- -I/usr/include/python${PYVER} \
- @INCPATH@
-
-EXTRA_DIST = db-py.h hash.h header-py.h upgrade.h
+ -I/usr/include/python1.5 \
+ @INCPATH@
mylibs= \
$(top_builddir)/lib/librpm.la \
- $(top_builddir)/rpmdb/librpmdb.la \
- $(top_builddir)/rpmio/librpmio.la \
$(top_builddir)/popt/libpopt.la
-LDADD =
-
-pythondir = $(prefix)/lib/python${PYVER}/site-packages
-python_PROGRAMS = rpmmodule.so poptmodule.so
-rpmmodule_so_SOURCES =
-rpmmodule_so_LDFLAGS = $(mylibs) $(LIBS) -shared -Wl,-soname,rpmmodule.so
-
-poptmodule_so_SOURCES = poptmodule.c
-poptmodule_so_LDFLAGS = $(mylibs) $(LIBS) -shared -Wl,-soname,poptmodule.so
+pythondir = $(prefix)/lib/python1.5/site-packages
+python_PROGRAMS = rpmmodule.so
noinst_LTLIBRARIES = librpmmodule.la
-librpmmodule_la_SOURCES = rpmmodule.c hash.c upgrade.c header-py.c db-py.c
-
-rpmmodule.so$(EXEEXT): $(librpmmodule_la_OBJECTS)
- $(LINK) -o $@ $(librpmmodule_la_OBJECTS) $(rpmmodule_so_LDFLAGS)
+librpmmodule_la_SOURCES = rpmmodule.c
-poptmodule.so$(EXEEXT): $(poptmodule_so_OBJECTS)
- $(LINK) -o $@ $(poptmodule_so_OBJECTS) $(poptmodule_so_LDFLAGS)
+rpmmodule.so: rpmmodule.lo
+ gcc -shared rpmmodule.lo -ldb1 -L/usr/local/lib -lz -lc -o $@
-.PHONY: lclint
-lclint:
- lclint $(DEFS) $(INCLUDES) $(librpmmodule_la_SOURCES)