From 49394f1edf60c87b4ebbf60b7bb8d5b6302b9a2f Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 27 Jan 2003 14:10:49 +0000 Subject: [PATCH] use a built-in module to replace libswigpy --- README.CVS | 16 ++-------------- src/Makefile.am | 10 +++++++--- src/swigruntime.i | 9 +++++++++ 3 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 src/swigruntime.i diff --git a/README.CVS b/README.CVS index 64a45bff..0712dc28 100644 --- a/README.CVS +++ b/README.CVS @@ -8,18 +8,7 @@ GNU Libtool Xft2 library/headers (devel package) (http://www.fontconfig.org) Xlib library/headers (devel package) Python library/headers (devel package) (http://www.python.org) - -Optional: SWIG 1.3.17+ (http://www.swig.org) - *** If you don't want to get swig, thats fine, unless you're going to be - *** editing stuff. - *** Without SWIG, before you build CVS _every time you update_ you need to: - *** - *** % touch src/openbox.i - *** % touch src/openbox_wrap.cc - *** - *** This is because of how CVS deals with timestamps. - I recommend the latest version of all these packages. @@ -27,10 +16,9 @@ Do the following to build and install Openbox in CVS: % ./bootstrap % ./configure - % make all install -Don't try building it and running it from the src/ directory, it won't work. It -needs to be installed. +Don't try running it from the src/ directory without installing, it won't work. +It needs to be installed before it is run. The installed binary is 'openbox3'. diff --git a/src/Makefile.am b/src/Makefile.am index 0b35f72a..154791dd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,7 +7,8 @@ CXXFLAGS=$(XFT_CFLAGS) $(PYTHON_CFLAGS) @CXXFLAGS@ \ -DDEFAULTMENU=\"$(DEFAULT_MENU)\" \ -DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\" \ -DLOCALEDIR=\"$(localedir)\" \ --DSCRIPTDIR=\"$(scriptdir)\" +-DSCRIPTDIR=\"$(scriptdir)\" -DSWIG_GLOBAL +# -DSWIG_GLOBAL is for the swigruntime.cc (see swigruntime.i for explanation) LIBS=$(XFT_LIBS) $(PYTHON_LIBS) @LIBS@ @@ -15,12 +16,12 @@ INCLUDES= -I.. bin_PROGRAMS= openbox3 -openbox3_LDADD=-L../otk -lotk -lswigpy @LIBINTL@ +openbox3_LDADD=-L../otk -lotk @LIBINTL@ openbox3_SOURCES= actions.cc client.cc frame.cc openbox.cc screen.cc \ main.cc backgroundwidget.cc labelwidget.cc \ buttonwidget.cc python.cc bindings.cc \ - openbox_wrap.cc + swigruntime.cc openbox_wrap.cc openbox3_LDFLAGS= $(PYTHON_LDFLAGS) script_DATA = ob.py @@ -38,4 +39,7 @@ openbox.i: openbox.hh screen.hh client.hh python.hh frame.hh %_wrap.cc: %.i swig -c -I../otk $(filter -I%,$(CXXFLAGS)) -python -shadow -c++ -nodefault -o $@ $< +swigruntime.cc: swigruntime.i + swig -python -c++ -o $@ $< + # local dependencies diff --git a/src/swigruntime.i b/src/swigruntime.i new file mode 100644 index 00000000..d812c7ee --- /dev/null +++ b/src/swigruntime.i @@ -0,0 +1,9 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +/* + This module exists just to link in the stuff that libswigpy would normally + provide. This way you don't need swig to compile this package from + distributed source tarballs. +*/ + +%module swigruntime -- 2.39.2