apply patches from rob, this is what should have been

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1338 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1998-10-21 04:27:08 +00:00
parent 8149a0e314
commit 68c3629534

View File

@ -41,6 +41,19 @@ CPU = @target_cpu@
LIBS=@LIBS@
OPT_STYLE_INSTALL=@OPT_STYLE_INSTALL@
ifeq (${OPT_STYLE_INSTALL},0)
export GNC_DOCDIR=${prefix}/doc/gnucash
export GNC_BINDIR=${prefix}/bin
export GNC_CONFIGDIR=${sysconfdir}/gnucash
export GNC_SHAREDIR=${datadir}/gnucash
else
export GNC_DOCDIR=${prefix}/doc
export GNC_BINDIR=${prefix}/bin
export GNC_CONFIGDIR=${sysconfdir}
export GNC_SHAREDIR=${datadir}
endif
######################################################################
# Description of targets:
#
@ -68,6 +81,7 @@ build-flavor:
@cd lib; $(MAKE) ${FLAVOR}
@cd src; $(MAKE) ${FLAVOR}
ln -sf gnucash.${FLAVOR} gnucash.bin
ln -sf gnucash.${FLAVOR} gnucash-shell
(cd share && ln -sf ../src/scm scm)
motif:
@ -96,9 +110,8 @@ clean:
distclean: clean
rm -f Makefile *~ *.o *.bak share/scm gnucash.bin
rm -f gnucash.motif gnucash.motif.static \
gnucash.gnome gnucash.gnome.static gnucash.qt
gnucash.gnome gnucash.gnome.static gnucash.qt gnucash-shell
rm -f config.cache config.log config.status config.h
rm -f src/guile/path-defaults.h
@cd lib; $(MAKE) distclean
@cd src; $(MAKE) distclean
@ -107,104 +120,73 @@ tagsfiles := $(shell find -name "*.[ch]")
TAGS: ${tagsfiles}
etags ${tagsfiles}
install:
${MAKE} \
DOCDIR=${prefix}/doc/gnucash \
BINDIR=${prefix}/bin \
CONFIGDIR=${sysconfdir}/gnucash \
SHAREDIR=${datadir}/gnucash \
install-private
install-opt:
${MAKE} \
DOCDIR=${prefix}/doc \
BINDIR=${prefix}/bin \
CONFIGDIR=${sysconfdir} \
SHAREDIR=${datadir} \
install-private
# We have to re-build the binary here to pick up any modifications to
# the ./configure configuration and to accomodate install vs
# install-opt. The other option would be to always use a wrapper
# script, even in the install tree, but that's IMO uglier.
# We could get rid of some redundant rebuilds with a
# stamp-install-opt-build, but that's somewhat messy too.
gnucash.motif gnucash.motif.static gnucash.gnome gnucash.gnome.static:
@echo Rebuilding binary to handle install site specific dependencies.
rm -f gnucash.${FLAVOR} src/guile/path-defaults.h
${MAKE} DOCDIR=${DOCDIR} BINDIR=${BINDIR} CONFIGDIR=${CONFIGDIR} \
SHAREDIR=${SHAREDIR} ${FLAVOR}
.PHONY: gnucash.motif gnucash.motif.static gnucash.gnome gnucash.gnome.static
install-bin: gnucash.${FLAVOR}
$(INSTALL) gnucash.${FLAVOR} ${BINDIR}/gnucash.${FLAVOR}
(cd ${BINDIR} && ln -sf gnucash.${FLAVOR} gnucash)
$(INSTALL) gnucash.${FLAVOR} ${GNC_BINDIR}/gnucash.${FLAVOR}
(cd ${GNC_BINDIR} && ln -sf gnucash.${FLAVOR} gnucash)
install-private:
@mkdir -p ${BINDIR}
install:
@mkdir -p ${GNC_BINDIR}
# Put these in the opposite order of precedence. Final bin/gnucash link will
# point to the last one that exists...
-[ -e gnucash.qt ] && ${MAKE} FLAVOR=qt BINDIR=${BINDIR} install-bin
-[ -e gnucash.qt ] && ${MAKE} FLAVOR=qt GNC_BINDIR=${GNC_BINDIR} install-bin
-[ -e gnucash.gnome.static ] && \
${MAKE} FLAVOR=gnome.static BINDIR=${BINDIR} install-bin
-[ -e gnucash.gnome ] && ${MAKE} FLAVOR=gnome BINDIR=${BINDIR} install-bin
${MAKE} FLAVOR=gnome.static GNC_BINDIR=${GNC_BINDIR} install-bin
-[ -e gnucash.gnome ] && ${MAKE} FLAVOR=gnome GNC_BINDIR=${GNC_BINDIR} install-bin
-[ -e gnucash.motif.static ] && \
${MAKE} FLAVOR=motif.static BINDIR=${BINDIR} install-bin
-[ -e gnucash.motif ] && ${MAKE} FLAVOR=motif BINDIR=${BINDIR} install-bin
${MAKE} FLAVOR=motif.static GNC_BINDIR=${GNC_BINDIR} install-bin
-[ -e gnucash.motif ] && ${MAKE} FLAVOR=motif GNC_BINDIR=${GNC_BINDIR} install-bin
# Make sure at least one succeeded
[ \
-e ${BINDIR}/gnucash.motif -o \
-e ${BINDIR}/gnucash.motif.static -o \
-e ${BINDIR}/gnucash.gnome -o \
-e ${BINDIR}/gnucash.gnome.static -o \
-e ${BINDIR}/gnucash.qt \
-e ${GNC_BINDIR}/gnucash.motif -o \
-e ${GNC_BINDIR}/gnucash.motif.static -o \
-e ${GNC_BINDIR}/gnucash.gnome -o \
-e ${GNC_BINDIR}/gnucash.gnome.static -o \
-e ${GNC_BINDIR}/gnucash.qt \
]
# @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
@mkdir -p ${GNC_DOCDIR}
$(INSTALL_DATA) Docs/*.html ${GNC_DOCDIR}
$(INSTALL_DATA) Docs/*.gif ${GNC_DOCDIR}
# $(INSTALL_DATA) Docs/*.jpg ${GNC_DOCDIR}
$(INSTALL_DATA) Docs/*.xpm ${GNC_DOCDIR}
@mkdir -p ${GNC_DOCDIR}/logos
$(INSTALL_DATA) Docs/logos/*.* ${GNC_DOCDIR}/logos
# Config directory
@mkdir -p ${CONFIGDIR}
@mkdir -p ${GNC_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; \
mkdir -p ${GNC_CONFIGDIR}/$$dest; \
done
# Files
for file in `find etc/ -type f`; do \
dest=`echo $$file | cut -c 5-` \
${INSTALL_DATA} $$file ${CONFIGDIR}/$$dest; \
${INSTALL_DATA} $$file ${GNC_CONFIGDIR}/$$dest; \
done
# Share directory
@mkdir -p ${SHAREDIR}
@mkdir -p ${GNC_SHAREDIR}
# 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 ${SHAREDIR}/scm/$$dest; \
mkdir -p ${GNC_SHAREDIR}/scm/$$dest; \
done
# Files
for file in `find share/scm/ -name "*.scm"`; do \
dest=`echo $$file | cut -c 11-` \
${INSTALL_DATA} $$file ${SHAREDIR}/scm/$$dest; \
${INSTALL_DATA} $$file ${GNC_SHAREDIR}/scm/$$dest; \
done
.PHONY: default install-private install motif motif-static gnome gnome-static qt