mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-22 17:06:36 -06:00
9ce424e31f
Keith Refson's Solaris fixes. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2302 57a11ea4-9604-0410-9ed3-97b8803252fd
254 lines
8.3 KiB
Makefile
254 lines
8.3 KiB
Makefile
# Makefile -- makefile for gnucash
|
|
# @configure_input@
|
|
# Copyright (C) 1997 Robin Clark
|
|
# Copyright (C) 1998 Rob Browning <rlb@cs.utexas.edu>
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License as
|
|
# published by the Free Software Foundation; either version 2 of
|
|
# the License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, contact:
|
|
#
|
|
# Free Software Foundation Voice: +1-617-542-5942
|
|
# 59 Temple Place - Suite 330 Fax: +1-617-542-2652
|
|
# Boston, MA 02111-1307, USA gnu@gnu.org
|
|
|
|
include @top_srcdir@/Makefile.init
|
|
|
|
######################################################################
|
|
# Description of targets:
|
|
#
|
|
# default -- make the application
|
|
# depend -- generate the dependencies
|
|
# clean -- remove *.a, *.o, *.bak, and *~
|
|
# distclean -- get rid of config files too...
|
|
# install -- installs everything
|
|
|
|
default:
|
|
@echo " "
|
|
@echo "Please choose one of the following targets:"
|
|
@echo "gnome gnome/gtk version"
|
|
@echo "gnome-static gnome/gtk statically linked version"
|
|
@echo "motif motif version (unfinished)"
|
|
@echo "motif-static motif statically linked version (unfinished)"
|
|
@echo "qt kde/qt version (unfinished)"
|
|
@echo "qt-static kde/qt statically linked version (unfinished)"
|
|
@echo " "
|
|
@echo "The motif and qt versions do not compile!"
|
|
@echo " "
|
|
|
|
# This inclusion must come after the first target, and after the
|
|
# definitions of *_SRCS, etc., but before the usage of *_OBJS.
|
|
include @top_srcdir@/Makefile.common
|
|
|
|
# Aliases
|
|
motif-static: motif.static
|
|
gnome-static: gnome.static
|
|
qt-static: qt.static
|
|
|
|
## We borrow guile's convention and use @-...-@ as the substitution
|
|
## brackets here, instead of the usual @...@. This prevents autoconf
|
|
## from substituting the values directly into the left-hand sides of
|
|
## the sed substitutions.
|
|
make-gnucash-patch: make-gnucash-patch.in
|
|
rm -f $@.tmp
|
|
sed < $@.in > $@.tmp \
|
|
-e 's:@-PERL-@:${PERL}:g'
|
|
chmod +x $@.tmp
|
|
mv $@.tmp $@
|
|
|
|
build-flavor: config.status make-gnucash-patch
|
|
@cd rpm && ${MAKE} default
|
|
@cd lib && ${MAKE} ${FLAVOR}
|
|
@cd src && ${MAKE} ${FLAVOR}
|
|
ln -sf gnucash.${FLAVOR} gnucash.bin
|
|
(cd share && rm -f scm && ln -sf ../src/scm scm)
|
|
|
|
motif:
|
|
${MAKE} FLAVOR=motif build-flavor
|
|
|
|
motif.static:
|
|
${MAKE} FLAVOR=motif.static build-flavor
|
|
|
|
gnome:
|
|
${MAKE} @GNOME_TARGET@
|
|
|
|
gnome.static:
|
|
${MAKE} @GNOME_STATIC_TARGET@
|
|
|
|
gnome.real:
|
|
${MAKE} FLAVOR=gnome build-flavor
|
|
|
|
gnome.static.real:
|
|
${MAKE} FLAVOR=gnome.static build-flavor
|
|
|
|
#GNOME_TARGET if gnome build disabled due to missing libraries
|
|
|
|
gnome.disable:
|
|
echo "Gnome build disabled - see configure.log for details"
|
|
false
|
|
|
|
qt:
|
|
${MAKE} @QT_TARGET@
|
|
|
|
qt.static:
|
|
${MAKE} @QT_STATIC_TARGET@
|
|
|
|
qt.real:
|
|
${MAKE} FLAVOR=qt build-flavor
|
|
|
|
qt.static.real:
|
|
${MAKE} FLAVOR=qt.static build-flavor
|
|
|
|
#QT_TARGET if qt build disabled by configure
|
|
|
|
qt.disable:
|
|
echo "Qt build disabled by configure. Try configure --enable-qt"
|
|
false
|
|
|
|
.PHONY: all
|
|
|
|
depend:
|
|
@echo make depend is now superfluous.
|
|
|
|
configure: configure.in
|
|
autoconf
|
|
|
|
config.status: configure
|
|
if [ -f ./config.status ]; then \
|
|
./config.status --recheck; \
|
|
else \
|
|
echo "======> You need to run configure!"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
CLEAN_SUBDIRS += lib src po rpm
|
|
TRASH += TAGS *~ *.o *.bak
|
|
|
|
DIST_TRASH += Makefile *~ *.o *.bak share/scm gnucash.bin
|
|
DIST_TRASH += gnucash.motif gnucash.motif.static
|
|
DIST_TRASH += gnucash.gnome gnucash.gnome.static
|
|
DIST_TRASH += gnucash.qt gnucash.qt.static gnucash-shell
|
|
DIST_TRASH += config.cache config.log config.status config.h
|
|
|
|
tagsfiles := $(shell find . -name "*.[ch]" -print)
|
|
|
|
TAGS: ${tagsfiles}
|
|
etags ${tagsfiles}
|
|
|
|
install-bin: gnucash.${FLAVOR}
|
|
$(INSTALL) gnucash.${FLAVOR} ${GNC_BINDIR}/gnucash.${FLAVOR}
|
|
(cd ${GNC_BINDIR} && ln -sf gnucash.${FLAVOR} gnucash)
|
|
|
|
install:
|
|
$(INSTALL) -d ${GNC_BINDIR} ${GNC_LIBDIR}
|
|
$(INSTALL) -d ${GNC_DOCDIR} ${GNC_CONFIGDIR}
|
|
$(INSTALL) -d ${GNC_DOCDIR}/examples ${GNC_MANDIR}/man1
|
|
$(INSTALL) -d ${GNC_SHAREDIR} ${GNC_SHAREDIR}/html
|
|
$(INSTALL) -d ${GNC_SHAREDIR}/html/C ${GNC_SHAREDIR}/html/C/pix
|
|
$(INSTALL) -d ${GNC_SHAREDIR}/html/fr ${GNC_SHAREDIR}/html/fr/pix
|
|
$(INSTALL) -d ${GNC_SHAREDIR}/html/logos
|
|
|
|
# Put these in the opposite order of precedence. Final bin/gnucash link will
|
|
# point to the last one that exists...
|
|
-[ -f gnucash.qt.static ] && \
|
|
${MAKE} FLAVOR=qt.static GNC_BINDIR=${GNC_BINDIR} install-bin
|
|
-[ -f gnucash.qt ] && ${MAKE} FLAVOR=qt GNC_BINDIR=${GNC_BINDIR} install-bin
|
|
-[ -f gnucash.motif.static ] && \
|
|
${MAKE} FLAVOR=motif.static GNC_BINDIR=${GNC_BINDIR} install-bin
|
|
-[ -f gnucash.motif ] && ${MAKE} FLAVOR=motif GNC_BINDIR=${GNC_BINDIR} install-bin
|
|
-[ -f gnucash.gnome.static ] && \
|
|
${MAKE} FLAVOR=gnome.static GNC_BINDIR=${GNC_BINDIR} install-bin
|
|
-[ -f gnucash.gnome ] && ${MAKE} FLAVOR=gnome GNC_BINDIR=${GNC_BINDIR} install-bin
|
|
|
|
# Make sure at least one succeeded
|
|
[ \
|
|
-f ${GNC_BINDIR}/gnucash.motif -o \
|
|
-f ${GNC_BINDIR}/gnucash.motif.static -o \
|
|
-f ${GNC_BINDIR}/gnucash.gnome -o \
|
|
-f ${GNC_BINDIR}/gnucash.gnome.static -o \
|
|
-f ${GNC_BINDIR}/gnucash.qt -o \
|
|
-f ${GNC_BINDIR}/gnucash.qt.static \
|
|
]
|
|
$(INSTALL) src/quotes/gnc-prices ${GNC_BINDIR}
|
|
|
|
$(INSTALL_DATA) src/swig/perl5/gnucash.pm ${GNC_LIBDIR}
|
|
$(INSTALL) src/swig/perl5/gnucash.so ${GNC_LIBDIR}
|
|
$(INSTALL_DATA) src/quotes/Quote.pm ${GNC_LIBDIR}
|
|
|
|
$(INSTALL_DATA) doc/README* ${GNC_DOCDIR}
|
|
$(INSTALL_DATA) doc/*.txt ${GNC_DOCDIR}
|
|
$(INSTALL_DATA) doc/INSTALL ${GNC_DOCDIR}
|
|
$(INSTALL_DATA) TODO ${GNC_DOCDIR}
|
|
$(INSTALL_DATA) NEWS ${GNC_DOCDIR}
|
|
|
|
$(INSTALL_DATA) doc/examples/*.xac ${GNC_DOCDIR}/examples
|
|
$(INSTALL_DATA) doc/examples/*.qif ${GNC_DOCDIR}/examples
|
|
$(INSTALL_DATA) doc/examples/README ${GNC_DOCDIR}/examples
|
|
|
|
$(INSTALL_DATA) man/gnucash.1 ${GNC_MANDIR}/man1
|
|
$(INSTALL_DATA) man/gnc-prices.1 ${GNC_MANDIR}/man1
|
|
|
|
# Share directory
|
|
# Try to do this in a platform independent way...
|
|
# Directories
|
|
for dir in `find share/scm/ -type d -follow`; do \
|
|
dest=`echo $$dir | cut -c 11-` ;\
|
|
mkdir -p ${GNC_SHAREDIR}/scm/$$dest; \
|
|
done
|
|
|
|
# Files
|
|
for file in `find share/scm/ -name "*.scm" -follow`; do \
|
|
dest=`echo $$file | cut -c 11-` ;\
|
|
${INSTALL_DATA} $$file ${GNC_SHAREDIR}/scm/$$dest; \
|
|
done
|
|
|
|
$(INSTALL_DATA) doc/html/C/*.html ${GNC_SHAREDIR}/html/C
|
|
$(INSTALL_DATA) doc/html/fr/*.html ${GNC_SHAREDIR}/html/fr
|
|
$(INSTALL_DATA) doc/html/C/pix/*.* ${GNC_SHAREDIR}/html/C/pix
|
|
$(INSTALL_DATA) doc/html/fr/pix/*.* ${GNC_SHAREDIR}/html/fr/pix
|
|
$(INSTALL_DATA) doc/html/*.css ${GNC_SHAREDIR}/html
|
|
$(INSTALL_DATA) doc/html/logos/*.* ${GNC_SHAREDIR}/html/logos
|
|
|
|
# ------------------------------------------------------------------
|
|
# hack alert -- the config dir stuff is messed up in configure.in as well
|
|
# as in the scheme search paths. For example, the configure script tries
|
|
# to put config files into /usr/etc/gnucash/config which is a butt-stupid
|
|
# place for this stuff ... For now, we will simply touch the one file that
|
|
# the scheme initialization is looking for, and punt on the rest ...
|
|
|
|
$(INSTALL_DATA) etc/conf* ${GNC_CONFIGDIR}
|
|
|
|
$(MAKE) -C po install
|
|
|
|
-$(INSTALL) -d $(datadir)/gnome/apps/Applications && \
|
|
$(INSTALL_DATA) gnucash.desktop $(datadir)/gnome/apps/Applications
|
|
|
|
# # Config directory
|
|
# @mkdir -p ${GNC_CONFIGDIR}
|
|
#
|
|
# # Directories
|
|
# for dir in `find etc/ -type d`; do \
|
|
# dest=`echo $$dir | cut -c 5-` ; \
|
|
# mkdir -p ${GNC_CONFIGDIR}/$$dest; \
|
|
# done
|
|
#
|
|
# # Files
|
|
# for file in `find etc/ -type f`; do \
|
|
# dest=`echo $$file | cut -c 5-` ; \
|
|
# ${INSTALL_DATA} $$file ${GNC_CONFIGDIR}/$$dest; \
|
|
# done
|
|
|
|
.PHONY: default install-bin install
|
|
.PHONY: motif motif-static motif.static
|
|
.PHONY: gnome gnome-static gnome.static
|
|
.PHONY: qt qt-static qt.static
|
|
.PHONY: depend dist clean distclean
|