use a built-in module to replace libswigpy
authorDana Jansens <danakj@orodu.net>
Mon, 27 Jan 2003 14:10:49 +0000 (14:10 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 27 Jan 2003 14:10:49 +0000 (14:10 +0000)
README.CVS
src/Makefile.am
src/swigruntime.i [new file with mode: 0644]

index 64a45bf..0712dc2 100644 (file)
@@ -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
-<optional touch commands from above if you don't have SWIG>
 % 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'.
index 0b35f72..154791d 100644 (file)
@@ -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 (file)
index 0000000..d812c7e
--- /dev/null
@@ -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