mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
misc cleanup and fixes from rob browning
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1639 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
d78237cbbf
commit
40375e930f
@ -25,21 +25,25 @@ INDEP_SRCS := helperfuncs.c
|
|||||||
CLEAN_SUBDIRS := guile perl5
|
CLEAN_SUBDIRS := guile perl5
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
all: default
|
|
||||||
|
|
||||||
# This inclusion must come after the first target, and after the
|
# This inclusion must come after the first target, and after the
|
||||||
# definitions of *_SRCS, etc., but before the usage of *_OBJS.
|
# definitions of *_SRCS, etc., but before the usage of *_OBJS.
|
||||||
include @top_srcdir@/Makefile.common
|
include @top_srcdir@/Makefile.common
|
||||||
|
|
||||||
default: guile perl5
|
|
||||||
|
|
||||||
ifeq (${HAVE_PLOTUTILS},1)
|
ifeq (${HAVE_PLOTUTILS},1)
|
||||||
guile: plot.preproc.h ${OBJS}
|
plotutils: plot.preproc.h
|
||||||
else
|
else
|
||||||
guile: ${OBJS}
|
plotutils:
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
guile: plotutils ${OBJS}
|
||||||
@cd guile && $(MAKE) default
|
@cd guile && $(MAKE) default
|
||||||
|
|
||||||
|
gnome: plotutils ${OBJS} perl5
|
||||||
|
@cd guile && $(MAKE) gnome
|
||||||
|
|
||||||
|
motif: plotutils ${OBJS} perl5
|
||||||
|
@cd guile && $(MAKE) motif
|
||||||
|
|
||||||
DIST_TRASH += plot.preproc.h
|
DIST_TRASH += plot.preproc.h
|
||||||
|
|
||||||
plot.preproc.h: /usr/include/plot.h
|
plot.preproc.h: /usr/include/plot.h
|
||||||
@ -49,7 +53,7 @@ plot.preproc.h: /usr/include/plot.h
|
|||||||
perl5: ${OBJS} ../engine/libengine.a
|
perl5: ${OBJS} ../engine/libengine.a
|
||||||
@cd perl5 && $(MAKE) default
|
@cd perl5 && $(MAKE) default
|
||||||
|
|
||||||
.PHONY: default guile perl5
|
.PHONY: guile motif
|
||||||
|
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# tab-width: 2
|
# tab-width: 2
|
||||||
|
@ -23,6 +23,7 @@ INCLPATH = \
|
|||||||
-I. \
|
-I. \
|
||||||
-I@top_srcdir@/ \
|
-I@top_srcdir@/ \
|
||||||
-I@top_srcdir@/src \
|
-I@top_srcdir@/src \
|
||||||
|
-I@top_srcdir@/src/gnome \
|
||||||
-I@top_srcdir@/src/swig\
|
-I@top_srcdir@/src/swig\
|
||||||
-I@top_srcdir@/src/engine \
|
-I@top_srcdir@/src/engine \
|
||||||
-I@top_srcdir@/src/register \
|
-I@top_srcdir@/src/register \
|
||||||
@ -32,14 +33,15 @@ INCLPATH = \
|
|||||||
-I@top_srcdir@/lib/Xbae-4.6.2-linas \
|
-I@top_srcdir@/lib/Xbae-4.6.2-linas \
|
||||||
-I$(prefix)/include
|
-I$(prefix)/include
|
||||||
|
|
||||||
CFLAGS = @CFLAGS@ @X_CFLAGS@ -DCELL_WIDGETS=1 ${INCLPATH} -Wno-unused
|
CFLAGS := @CFLAGS@ @X_CFLAGS@ -DCELL_WIDGETS=1 ${INCLPATH} -Wno-unused
|
||||||
|
CFLAGS := $(filter-out -Werror,${CFLAGS})
|
||||||
|
|
||||||
SWIG_FLAGS := -stat -guile \
|
SWIG_FLAGS := -stat -guile ${INCLPATH}
|
||||||
-I.. -I@top_srcdir@/src/engine -I@top_srcdir@/src/guile
|
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# SEE Makefile.common for information about these variables.
|
# SEE Makefile.common for information about these variables.
|
||||||
INDEP_SRCS = gnucash-all-guile_wrap.c gnucash-engine-guile_wrap.c
|
INDEP_SRCS := gnucash-all-guile_wrap.c
|
||||||
|
GNOME_SRCS := gnucash-gnome-guile_wrap.c
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
# This inclusion must come after the first target, and after the
|
# This inclusion must come after the first target, and after the
|
||||||
@ -49,9 +51,15 @@ include @top_srcdir@/Makefile.common
|
|||||||
default: ${OBJS}
|
default: ${OBJS}
|
||||||
.PHONY: default
|
.PHONY: default
|
||||||
|
|
||||||
|
gnome: default ${GNOME_OBJS}
|
||||||
|
|
||||||
|
motif: default
|
||||||
|
|
||||||
SWIG_FILTER := %P.h %/util.h
|
SWIG_FILTER := %P.h %/util.h
|
||||||
|
|
||||||
SWIG_ENGINE_HDRS := \
|
SWIG_ENGINE_HDRS := \
|
||||||
$(filter-out ${SWIG_FILTER},$(wildcard @top_srcdir@/src/engine/*.h))
|
$(filter-out ${SWIG_FILTER},$(wildcard @top_srcdir@/src/engine/*.h))
|
||||||
|
|
||||||
SWIG_ALL_HDRS := \
|
SWIG_ALL_HDRS := \
|
||||||
${SWIG_ENGINE_HDRS} \
|
${SWIG_ENGINE_HDRS} \
|
||||||
../helperfuncs.h \
|
../helperfuncs.h \
|
||||||
@ -61,9 +69,13 @@ ifeq (${HAVE_PLOTUTILS},1)
|
|||||||
SWIG_ALL_HDRS += ../plot.preproc.h
|
SWIG_ALL_HDRS += ../plot.preproc.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
SWIG_GNOME_HDRS := ${SWIG_ALL_HDRS} \
|
||||||
|
$(wildcard @top_srcdir@/src/gnome/options-dialog.h)
|
||||||
|
|
||||||
# Because Swig's include mechanism is not too smart.
|
# Because Swig's include mechanism is not too smart.
|
||||||
SWIG_ENGINE_BASENAMES := $(notdir ${SWIG_ENGINE_HDRS})
|
SWIG_ENGINE_BASENAMES := $(notdir ${SWIG_ENGINE_HDRS})
|
||||||
SWIG_ALL_BASENAMES := $(notdir ${SWIG_ALL_HDRS})
|
SWIG_ALL_BASENAMES := $(notdir ${SWIG_ALL_HDRS})
|
||||||
|
SWIG_GNOME_BASENAMES := $(notdir ${SWIG_GNOME_HDRS})
|
||||||
|
|
||||||
# This is .PHONY because it has to be re-generated *every* time. Who
|
# This is .PHONY because it has to be re-generated *every* time. Who
|
||||||
# knows when headers are added to the engine dir?
|
# knows when headers are added to the engine dir?
|
||||||
@ -85,6 +97,15 @@ gnucash.all.i: guile_swig_annotations.i ${SWIG_ALL_HDRS}
|
|||||||
@($(foreach hdr,${SWIG_ALL_BASENAMES},echo %include ${hdr}; )) >> $@
|
@($(foreach hdr,${SWIG_ALL_BASENAMES},echo %include ${hdr}; )) >> $@
|
||||||
TRASH += gnucash.all.i gnucash.all_wrap.doc
|
TRASH += gnucash.all.i gnucash.all_wrap.doc
|
||||||
|
|
||||||
|
gnucash.gnome.i: guile_swig_annotations.i ${SWIG_GNOME_HDRS}
|
||||||
|
@echo "%module gnucash" > $@
|
||||||
|
@echo "%include \"guile_swig_annotations.i\"" >> $@
|
||||||
|
@echo "%{" >> $@
|
||||||
|
@($(foreach hdr,${SWIG_GNOME_BASENAMES},echo "#include <${hdr}>"; )) >> $@
|
||||||
|
@echo "%}" >> $@
|
||||||
|
@($(foreach hdr,${SWIG_GNOME_BASENAMES},echo %include \"${hdr}\"; )) >> $@
|
||||||
|
TRASH += gnucash.gnome.i gnucash.gnome_wrap.doc
|
||||||
|
|
||||||
gnucash-engine-guile_wrap.c: gnucash.engine.i
|
gnucash-engine-guile_wrap.c: gnucash.engine.i
|
||||||
${SWIG} ${SWIG_FLAGS} -o $@ $<
|
${SWIG} ${SWIG_FLAGS} -o $@ $<
|
||||||
${PERL} -pi -e 's/^void gnucash\(\)/void gnucash_swig_init\(\)/' $@
|
${PERL} -pi -e 's/^void gnucash\(\)/void gnucash_swig_init\(\)/' $@
|
||||||
@ -95,6 +116,11 @@ gnucash-all-guile_wrap.c: gnucash.all.i
|
|||||||
${PERL} -pi -e 's/^void gnucash\(\)/void gnucash_swig_init\(\)/' $@
|
${PERL} -pi -e 's/^void gnucash\(\)/void gnucash_swig_init\(\)/' $@
|
||||||
TRASH += gnucash-all-guile_wrap.c
|
TRASH += gnucash-all-guile_wrap.c
|
||||||
|
|
||||||
|
gnucash-gnome-guile_wrap.c: gnucash.gnome.i
|
||||||
|
swig ${SWIG_FLAGS} -o $@ $<
|
||||||
|
perl -pi -e 's/^void gnucash\(\)/void gnucash_swig_init\(\)/' $@
|
||||||
|
TRASH += gnucash-gnome-guile_wrap.c
|
||||||
|
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# tab-width: 2
|
# tab-width: 2
|
||||||
# End:
|
# End:
|
||||||
|
@ -1,5 +1,28 @@
|
|||||||
/* -*-c-*- */
|
/* -*-c-*- */
|
||||||
|
|
||||||
|
/* This tells SWIG to pass SCM values straight through. I'm not sure
|
||||||
|
how kosher this is, so we may have to watch it in future SWIG
|
||||||
|
releases, but it works for now. It's designed to allow you to have
|
||||||
|
something like this on the C side:
|
||||||
|
|
||||||
|
void foo(SCM f) {
|
||||||
|
gh_call0(f);
|
||||||
|
}
|
||||||
|
|
||||||
|
And call it from Guile like this:
|
||||||
|
|
||||||
|
(foo (lambda (x) (display "OK") (newline)))
|
||||||
|
*/
|
||||||
|
|
||||||
|
%typemap(guile,out) SCM {
|
||||||
|
$target = $source;
|
||||||
|
}
|
||||||
|
|
||||||
|
%typemap(guile,in) SCM* {
|
||||||
|
$target = &$source;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Treat time_t as a floating point number at the guile level. On
|
/* Treat time_t as a floating point number at the guile level. On
|
||||||
many of the common platforms it's just an integer, but there are
|
many of the common platforms it's just an integer, but there are
|
||||||
supposedly platforms (acording to the GNU libc info pages) where it
|
supposedly platforms (acording to the GNU libc info pages) where it
|
||||||
|
Loading…
Reference in New Issue
Block a user