r14957 - gnucash/branches/swig-redo/src/gnome - Setup the gnome module for swig instead of gwrap.
Chris Shoemaker
chris at cvs.gnucash.org
Mon Oct 9 19:52:47 EDT 2006
Author: chris
Date: 2006-10-09 19:52:46 -0400 (Mon, 09 Oct 2006)
New Revision: 14957
Trac: http://svn.gnucash.org/trac/changeset/14957
Added:
gnucash/branches/swig-redo/src/gnome/gnome.i
Modified:
gnucash/branches/swig-redo/src/gnome/Makefile.am
Log:
Setup the gnome module for swig instead of gwrap.
Modified: gnucash/branches/swig-redo/src/gnome/Makefile.am
===================================================================
--- gnucash/branches/swig-redo/src/gnome/Makefile.am 2006-10-09 23:51:59 UTC (rev 14956)
+++ gnucash/branches/swig-redo/src/gnome/Makefile.am 2006-10-09 23:52:46 UTC (rev 14957)
@@ -1,11 +1,7 @@
SUBDIRS = glade schemas ui
-lib_LTLIBRARIES = libgncgnome.la libgw-gnc.la
+lib_LTLIBRARIES = libgncgnome.la
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = gw-gnc-spec.scm
-nodist_gwmod_DATA = gw-gnc.scm
-
libgncgnome_la_LIBADD = \
${top_builddir}/src/register/ledger-core/libgncmod-ledger-core.la \
${top_builddir}/src/register/register-gnome/libgncmod-register-gnome.la \
@@ -24,13 +20,8 @@
${G_WRAP_LINK_ARGS} \
${GUILE_LIBS} ${GNOME_LIBS} ${GLIB_LIBS} ${QOF_LIBS}
-nodist_libgw_gnc_la_SOURCES = gw-gnc.c
-
-libgw_gnc_la_LDFLAGS = \
- ${G_WRAP_LINK_ARGS} ${GLIB_LIBS}
-libgw_gnc_la_LIBADD = libgncgnome.la
-
libgncgnome_la_SOURCES = \
+ swig-gnome.c \
dialog-chart-export.c \
dialog-commodities.c \
dialog-fincalc.c \
@@ -99,11 +90,13 @@
top-level.h \
window-reconcile.h
+swig-gnome.c: gnome.i ${noinst_HEADERS}
+ swig -guile $(SWIG_ARGS) -Linkage module \
+ -I${top_srcdir}/src/engine -o $@ $<
+
EXTRA_DIST = \
- gnucash.desktop.in \
- ${gwmod_DATA}
+ gnucash.desktop.in
-
AM_CFLAGS = \
-I${top_srcdir}/src \
-I${top_srcdir}/src/core-utils \
@@ -138,15 +131,9 @@
noinst_DATA = .scm-links
-if GNUCASH_SEPARATE_BUILDDIR
-#For compiling
-SCM_FILE_LINKS = gw-gnc-spec.scm
-endif
-
.scm-links:
- rm -f gnucash g-wrapped
+ rm -f gnucash
$(LN_S) -f . gnucash
- $(LN_S) -f . g-wrapped
if GNUCASH_SEPARATE_BUILDDIR
for X in ${SCM_FILE_LINKS} ; do \
$(LN_S) -f ${srcdir}/$$X . ; \
@@ -154,16 +141,6 @@
endif
touch .scm-links
-gw-gnc.scm gw-gnc.h gw-gnc.c gw-gnc.html: \
- gw-gnc-spec.scm .scm-links ${top_builddir}/config.status Makefile
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (set! %load-path (cons \"../engine\" %load-path)) \
- (set! %load-path (cons \"../app-utils\" %load-path)) \
- (set! %load-path (cons \"../gnome-utils\" %load-path)) \
- (set! %load-path (cons \"../report/report-gnome\" %load-path)) \
- (primitive-load \"./gw-gnc-spec.scm\") \
- (gw:generate-wrapset \"gw-gnc\")"
-BUILT_SOURCES = gw-gnc.scm gw-gnc.h gw-gnc.c
+BUILT_SOURCES = swig-gnome.c
CLEANFILES = $(BUILT_SOURCES) gnucash.desktop \
- gnucash g-wrapped .scm-links ${SCM_FILE_LINKS} gw-gnc.html
+ gnucash .scm-links ${SCM_FILE_LINKS}
Added: gnucash/branches/swig-redo/src/gnome/gnome.i
===================================================================
--- gnucash/branches/swig-redo/src/gnome/gnome.i 2006-10-09 23:51:59 UTC (rev 14956)
+++ gnucash/branches/swig-redo/src/gnome/gnome.i 2006-10-09 23:52:46 UTC (rev 14957)
@@ -0,0 +1,16 @@
+%module sw_gnome
+%{
+/* Includes the header in the wrapper code */
+#include <config.h>
+#include <gtk/gtk.h>
+#include <dialog-progress.h>
+%}
+
+// Temporary SWIG<->G-wrap converters for engine types
+%typemap(in) gboolean "$1 = SCM_NFALSEP($input) ? TRUE : FALSE;"
+%typemap(out) gboolean "$result = $1 ? SCM_BOOL_T : SCM_BOOL_F;"
+// End of temporary typemaps.
+
+/* Parse the header file to generate wrappers */
+%include <dialog-progress.h>
+
More information about the gnucash-changes
mailing list