From a2d9a1e3d15db032daf20bc1d40fc8080f2ccbad Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Wed, 9 Sep 1998 05:43:16 +0000 Subject: [PATCH] fixes from Rob Browning git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1121 57a11ea4-9604-0410-9ed3-97b8803252fd --- Makefile.common | 1 + Makefile.in | 78 ++++++++++++++++++++++++++++++++++++------------- src/Makefile.in | 13 ++++++--- xacc.in | 10 +++++-- 4 files changed, 76 insertions(+), 26 deletions(-) diff --git a/Makefile.common b/Makefile.common index 684fdde292..e7c0b743b7 100644 --- a/Makefile.common +++ b/Makefile.common @@ -68,6 +68,7 @@ clean: $(foreach dir,${CLEAN_SUBDIRS},(cd ${dir} && $(MAKE) clean);) rm -f *~ *.bak \#* $(TRASH) rm -rf obj + -rm -rf ${TRASH} distclean: $(foreach dir,${CLEAN_SUBDIRS},(cd ${dir} && $(MAKE) distclean);) diff --git a/Makefile.in b/Makefile.in index d939045d1c..137dbe5c7c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -24,11 +24,15 @@ srcdir = @srcdir@ VPATH = @srcdir@ -PREFIX = @prefix@ +prefix=@prefix@ +datadir=@datadir@ +VARDIR=@localstatedir@ +CONFIGDIR=@sysconfdir@ + INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ TARGET = xacc -DOCDIR = share/xacc/Docs +DOCDIR = ${datadir}/Docs CPU = @target_cpu@ LIBS=@LIBS@ @@ -90,24 +94,58 @@ TAGS: ${tagsfiles} etags ${tagsfiles} install: $(TARGET) - @mkdir -p $(PREFIX)/bin - $(INSTALL) $(TARGET) $(PREFIX)/bin/$(TARGET) - $(INSTALL) $(TARGET).bin $(PREFIX)/bin/$(TARGET).bin - $(INSTALL) $(TARGET).gtk.bin $(PREFIX)/bin/$(TARGET).gtk.bin - $(INSTALL) $(TARGET).qt.bin $(PREFIX)/bin/$(TARGET).qt.bin - $(INSTALL) $(TARGET).static.bin $(PREFIX)/bin/$(TARGET).static.bin -# @mkdir -p $(PREFIX)/toolbar -# $(INSTALL_DATA) toolbar/*.xpm $(PREFIX)/toolbar - @mkdir -p $(PREFIX)/$(DOCDIR) - $(INSTALL_DATA) Docs/*.html $(PREFIX)/$(DOCDIR) - $(INSTALL_DATA) Docs/*.gif $(PREFIX)/$(DOCDIR) -# $(INSTALL_DATA) Docs/*.jpg $(PREFIX)/$(DOCDIR) - $(INSTALL_DATA) Docs/*.xpm $(PREFIX)/$(DOCDIR) - @mkdir -p $(PREFIX)/$(DOCDIR)/logos - $(INSTALL_DATA) Docs/logos/*.* $(PREFIX)/$(DOCDIR)/logos - @mkdir -p $(PREFIX)/share/gnucash - $(INSTALL_DATA) src/prefs/*.scm $(PREFIX)/share/gnucash - + @mkdir -p $(prefix)/bin + $(INSTALL) $(TARGET) $(prefix)/bin/$(TARGET) + -$(INSTALL) $(TARGET).bin $(prefix)/bin/$(TARGET).bin + -$(INSTALL) $(TARGET).gtk.bin $(prefix)/bin/$(TARGET).gtk.bin + -$(INSTALL) $(TARGET).qt.bin $(prefix)/bin/$(TARGET).qt.bin + -$(INSTALL) $(TARGET).static.bin $(prefix)/bin/$(TARGET).static.bin + + # Make sure at least one succeeded + [ -e ${TARGET}.bin -o -${TARGET}.gtk.bin -o -${TARGET}.qt.bin \ + -o -${TARGET}.static.bin ] + +# @mkdir -p $(prefix)/toolbar +# $(INSTALL_DATA) toolbar/*.xpm $(prefix)/toolbar + @mkdir -p $(DOCDIR) + $(INSTALL_DATA) Docs/*.html $(DOCDIR) + $(INSTALL_DATA) Docs/*.gif $(DOCDIR) +# $(INSTALL_DATA) Docs/*.jpg $(DOCDIR) + $(INSTALL_DATA) Docs/*.xpm $(DOCDIR) + @mkdir -p $(DOCDIR)/logos + $(INSTALL_DATA) Docs/logos/*.* $(DOCDIR)/logos + + # Config directory + @mkdir -p ${CONFIGDIR} + + # Try to do this in a platform independent way... + # Directories + for dir in `find etc/ -type d`; do \ + dest=`echo $$dir | cut -c 5-` \ + mkdir -p ${CONFIGDIR}/$$dest; \ + done + + # Files + for file in `find etc/ -type f`; do \ + dest=`echo $$file | cut -c 5-` \ + ${INSTALL_DATA} $$file ${CONFIGDIR}/$$dest; \ + done + + # Share directory + @mkdir -p ${datadir} + + # Try to do this in a platform independent way... + # Directories + for dir in `find share/scm/ -type d`; do \ + dest=`echo $$dir | cut -c 11-` \ + mkdir -p ${datadir}/scm/$$dest; \ + done + + # Files + for file in `find share/scm/ -name "*.scm"`; do \ + dest=`echo $$file | cut -c 11-` \ + ${INSTALL_DATA} $$file ${datadir}/scm/$$dest; \ + done # Local Variables: # tab-width: 2 diff --git a/src/Makefile.in b/src/Makefile.in index 69d4fe1691..fa15b2d33f 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -34,7 +34,7 @@ CFLAGS = @CFLAGS@ @X_CFLAGS@ ${INCLPATH} ###################################################################### # See Makefile.common for information about these variables. COMMON_SRCS := SplitLedger.c MultiLedger.c -CLEAN_SUBDIRS := engine gnome motif register guile qt +CLEAN_SUBDIRS := engine gnome motif register guile swig qt ###################################################################### all: default @@ -48,18 +48,23 @@ default: $(OBJS) motif: ${MOTIF_OBJS} @cd engine; $(MAKE) default @cd register; $(MAKE) motif + @cd guile; $(MAKE) path-defaults.h + @cd swig; $(MAKE) guile + @cd guile; $(MAKE) default @cd motif; $(MAKE) motif gnome: ${GNOME_OBJS} @cd engine; $(MAKE) default @cd register; $(MAKE) gnome + @cd guile; $(MAKE) path-defaults.h + @cd swig; $(MAKE) guile @cd guile; $(MAKE) default @cd gnome; $(MAKE) gnome qt: $(QT_OBJS) - @cd engine; $(MAKE) default - @cd register; $(MAKE) qt - @cd qt; $(MAKE) qt + @cd engine; $(MAKE) default + @cd register; $(MAKE) qt + @cd qt; $(MAKE) qt .PHONY: default qt gnome motif all diff --git a/xacc.in b/xacc.in index c186711a24..d79c431142 100644 --- a/xacc.in +++ b/xacc.in @@ -1,6 +1,12 @@ #! /bin/sh # @configure_input@ +GNC_ARGS="${GNC_ARGS} --debug" +GNC_ARGS="${GNC_ARGS} --startup-file ./share/scm/startup.scm" +GNC_ARGS="${GNC_ARGS} --share-dir ./share" +GNC_ARGS="${GNC_ARGS} --config-dir ./etc" +GNC_ARGS="${GNC_ARGS} --load-path (\"(./share/scm)\")" + XACC_HELP=${XACC_HELP}:./Docs:@prefix@/share/xacc/Docs export XACC_HELP @@ -8,7 +14,7 @@ export XACC_HELP # the motif library. We should also do something to auto-detect # and load the gtk version. if [ -f /usr/X11R6/lib/libXm.so -o -L /usr/X11R6/lib/libXm.so ]; then - exec xacc.bin $@ + exec xacc.bin ${GNC_ARGS} $@ else - exec xacc-static.bin $@ + exec xacc-static.bin ${GNC_ARGS} $@ fi