Eliminate the separate bin directory

Instead its content is moved to gnucash directly, making the gnucash directory
more meaningful.
This commit is contained in:
Geert Janssens 2017-08-13 12:39:45 +02:00
parent 53736e0842
commit 2a7f2f891a
23 changed files with 356 additions and 181 deletions

26
.gitignore vendored
View File

@ -179,19 +179,19 @@ libgnucash/scm/build-config.scm
libgnucash/scm/gnucash
libgnucash/tax/us/gnucash
libgnucash/tax/us/test/test-link-module
gnucash/bin/environment
gnucash/bin/gnucash
gnucash/bin/gnucash-bin
gnucash/bin/gnucash-ddd
gnucash/bin/gnucash-env
gnucash/bin/gnucash-gdb
gnucash/bin/gnucash-launcher
gnucash/bin/gnucash-make-guids
gnucash/bin/gnucash-setup-env
gnucash/bin/gnucash-valgrind
gnucash/bin/overrides/gnucash-build-env
gnucash/bin/overrides/gnucash-env
gnucash/bin/overrides/guile
gnucash/environment
gnucash/gnucash
gnucash/gnucash-bin
gnucash/gnucash-ddd
gnucash/gnucash-env
gnucash/gnucash-gdb
gnucash/gnucash-launcher
gnucash/gnucash-make-guids
gnucash/gnucash-setup-env
gnucash/gnucash-valgrind
gnucash/overrides/gnucash-build-env
gnucash/overrides/gnucash-env
gnucash/overrides/guile
gnucash/gnome/gnucash
gnucash/gnome/gnucash.desktop
gnucash/gnome/gnucash.desktop.in

View File

@ -45,9 +45,9 @@ SET(COPY_FROM_BUILD
libgnucash/app-utils/swig-app-utils-python.c
libgnucash/app-utils/test/test-load-module
libgnucash/backend/xml/test/test-real-data.sh
gnucash/bin/gnucash.rc
gnucash/bin/overrides/gnucash-make-guids
gnucash/bin/test/test-version
gnucash/gnucash.rc
gnucash/overrides/gnucash-make-guids
gnucash/test/test-version
libgnucash/core-utils/gnc-vcs-info.h
libgnucash/core-utils/swig-core-utils-guile.c
libgnucash/core-utils/swig-core-utils-python.c

View File

@ -1587,7 +1587,7 @@ AC_MSG_RESULT($warnFLAGS)
### makefiles, so that we don't have an opportunity to adjust them
### there.
chmod u+x ${srcdir}/gnucash/bin/generate-gnc-script
chmod u+x ${srcdir}/gnucash/generate-gnc-script
### --------------------------------------------------------------------------
### Makefile creation
@ -1650,9 +1650,8 @@ AC_CONFIG_FILES(
doc/Makefile
doc/examples/Makefile
gnucash/Makefile
gnucash/bin/Makefile
gnucash/bin/overrides/Makefile
gnucash/bin/test/Makefile
gnucash/overrides/Makefile
gnucash/test/Makefile
gnucash/gnome/Makefile
gnucash/gnome/gtkbuilder/Makefile
gnucash/gnome/gschemas/Makefile
@ -1751,7 +1750,7 @@ AC_CONFIG_FILES(
libgnucash/tax/us/Makefile
libgnucash/tax/us/test/Makefile
dnl # non-makefiles
gnucash/bin/gnucash.rc
gnucash/gnucash.rc
libgnucash/app-utils/migratable-prefs.xml
gnucash/gnome/gnucash.desktop.in
dnl # GSettings schema files
@ -1782,8 +1781,8 @@ AC_CONFIG_FILES([libgnucash/app-utils/test/test-load-module],
[chmod +x libgnucash/app-utils/test/test-load-module])
AC_CONFIG_FILES([libgnucash/backend/xml/test/test-real-data.sh],
[chmod +x libgnucash/backend/xml/test/test-real-data.sh])
AC_CONFIG_FILES([gnucash/bin/test/test-version],
[chmod +x gnucash/bin/test/test-version])
AC_CONFIG_FILES([gnucash/test/test-version],
[chmod +x gnucash/test/test-version])
AC_CONFIG_FILES([libgnucash/engine/test/test-create-account],
[chmod +x libgnucash/engine/test/test-create-account])
AC_CONFIG_FILES([libgnucash/engine/test/test-scm-query-import],
@ -1816,7 +1815,7 @@ AC_CONFIG_FILES([libgnucash/tax/us/test/test-load-module],
[chmod +x libgnucash/tax/us/test/test-load-module])
# A few files need extra actions at creation time
AC_CONFIG_FILES([gnucash/bin/overrides/gnucash-make-guids], [chmod u+x gnucash/bin/overrides/gnucash-make-guids])
AC_CONFIG_FILES([gnucash/overrides/gnucash-make-guids], [chmod u+x gnucash/overrides/gnucash-make-guids])
#Link (copy on Windows) test data files:
AC_CONFIG_LINKS([gnucash/import-export/csv-imp/test/sample1.csv:gnucash/import-export/csv-imp/test/sample1.csv])
LDFLAGS="${LDFLAGS} ${NOUNDEF}"

View File

@ -1,7 +1,6 @@
# CMakeLists.txt for gnucash/
# The subdirectories
ADD_SUBDIRECTORY (bin)
ADD_SUBDIRECTORY (gnome)
ADD_SUBDIRECTORY (gnome-utils)
ADD_SUBDIRECTORY (gnome-search)
@ -10,12 +9,190 @@ ADD_SUBDIRECTORY (import-export)
ADD_SUBDIRECTORY (plugins)
ADD_SUBDIRECTORY (python)
ADD_SUBDIRECTORY (register)
ADD_SUBDIRECTORY(report)
ADD_SUBDIRECTORY (report)
ADD_SUBDIRECTORY (overrides)
ADD_SUBDIRECTORY (test)
ADD_DEFINITIONS (-DHAVE_CONFIG_H)
SET_LOCAL_DIST(gnucash_DIST_local CMakeLists.txt Makefile.am ${gnucash_EXTRA_DIST})
# Some settings are platform dependent. Let's define them per platform.
IF (WIN32)
# Windows specific settings go here:
SET (GNUCASH_RESOURCE_FILE gnucash.rc)
SET(gnucash_DIST ${gnucash_DIST_local} ${bin_DIST} ${gnome_DIST} ${gnome_search_DIST}
${gnome_utils_DIST} ${html_DIST} ${import_export_DIST} ${plugins_DIST} ${python_DIST}
${register_DIST} ${report_DIST} PARENT_SCOPE)
ELSE (WIN32)
# All other platforms use these settings:
SET (PLATFORM_FILES gnucash-valgrind)
ENDIF (WIN32)
SET (gnucash_SOURCES
gnucash-bin.c
${GNUCASH_RESOURCE_FILE}
)
ADD_EXECUTABLE (gnucash
${gnucash_SOURCES}
)
TARGET_COMPILE_DEFINITIONS(gnucash PRIVATE -DG_LOG_DOMAIN=\"gnc.bin\")
TARGET_LINK_LIBRARIES (gnucash
gncmod-ledger-core gncmod-report-gnome gnc-gnome gncmod-gnome-utils gncmod-app-utils
gncmod-engine gnc-module gnc-core-utils gncmod-report-system
${GUILE_LDFLAGS} ${GLIB2_LDFLAGS} ${GTK3_LDFLAGS} ${GTK_MAC_LDFLAGS}
)
IF (MAC_INTEGRATION)
TARGET_COMPILE_OPTIONS(gnucash PRIVATE ${OSX_EXTRA_COMPILE_FLAGS})
TARGET_LINK_LIBRARIES(gnucash ${OSX_EXTRA_LIBRARIES})
ENDIF(MAC_INTEGRATION)
INSTALL(TARGETS gnucash DESTINATION bin)
# No headers to install.
# Generate the gnucash-env script
SET(SCRIPT_LIST "")
SET(SCRIPT_OUTPUT_DIR ${BINDIR_BUILD})
FOREACH (script gnucash-env gnucash-make-guids)
SET (GNUCASH_ENV_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${script})
LIST(APPEND SCRIPT_LIST ${SCRIPT_OUTPUT_DIR}/${script})
SET (GNC_OVERRIDES_DIR ${CMAKE_INSTALL_PREFIX}/libexec/gnucash/overrides)
FILE(WRITE ${GNUCASH_ENV_SCRIPT} "#!/bin/sh\n")
FILE(APPEND ${GNUCASH_ENV_SCRIPT} "PATH=\"${GNC_OVERRIDES_DIR}:\${PATH}\"\n")
FILE(APPEND ${GNUCASH_ENV_SCRIPT} "export PATH\n")
FILE(APPEND ${GNUCASH_ENV_SCRIPT} "\nGUILE_WARN_DEPRECATED=\"no\"\n")
FILE(APPEND ${GNUCASH_ENV_SCRIPT} "export GUILE_WARN_DEPRECATED\n")
FILE(APPEND ${GNUCASH_ENV_SCRIPT} "\nexec \"${script}\" \"\$@\"\n")
FILE(COPY ${GNUCASH_ENV_SCRIPT}
DESTINATION ${SCRIPT_OUTPUT_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
ENDFOREACH(script)
SET(TOP_SRC_DIR ${CMAKE_SOURCE_DIR})
SET(GNUCASH_BIN_INSTALL_NAME "gnucash")
SET(VALGRIND_OUTDIR ${BINDIR_BUILD})
CONFIGURE_FILE(gnucash.rc.in gnucash.rc @ONLY NEWLINE_STYLE WIN32)
GNC_CONFIGURE(gnucash-valgrind.in ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/gnucash-valgrind)
FILE(COPY ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/gnucash-valgrind
DESTINATION ${VALGRIND_OUTDIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
## Create the environment file
FILE(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/environment.in ENV_STRINGS_IN)
SET(ENV_STRINGS_LIST "")
FOREACH(line ${ENV_STRINGS_IN})
STRING(REGEX REPLACE "@-|-@" "@" line2 "${line}")
STRING(REPLACE ";" "\;" line3 "${line2}")
IF(NOT "${line3}" MATCHES "@NOTE")
LIST(APPEND ENV_STRINGS_LIST "${line3}\n")
ENDIF()
ENDFOREACH()
STRING(CONCAT ENV_STRINGS ${ENV_STRINGS_LIST})
STRING(CONFIGURE "${ENV_STRINGS}" ENV_STRINGS_CONF @ONLY)
SET(ENV_FILE_OUT ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/environment)
SET(BUILD_ENV_FILE_OUT ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/environment.build)
FILE(WRITE ${ENV_FILE_OUT} "${ENV_STRINGS_CONF}")
FILE(WRITE ${BUILD_ENV_FILE_OUT} "${ENV_STRINGS_CONF}")
SET(XDG_TEXT "
# GnuCash was not installed in the default location.
# XDG_DATA_DIRS will be set so that our documentation
# and gsettings schema are found.\n"
)
IF (NOT(${GNC_DBD_DIR} STREQUAL "${CMAKE_PREFIX_PATH}/lib/dbd"))
FILE(APPEND ${ENV_FILE_OUT} "GNC_DBD_DIR=${GNC_DBD_DIR}")
ENDIF()
IF (NOT(${DATADIR} STREQUAL "/usr/share") AND NOT(${DATADIR} STREQUAL "/usr/local/share"))
FILE(APPEND ${ENV_FILE_OUT} ${XDG_TEXT})
FILE(APPEND ${ENV_FILE_OUT} "XDG_DATA_DIRS=${DATADIR};{XDG_DATA_DIRS}" "${GNC_SYSTEM_XDG_DATA_DIRS}\n")
ENDIF()
FILE(APPEND ${BUILD_ENV_FILE_OUT} "GNC_DBD_DIR=${LIBDBI_DRIVERS_DIR}/dbd")
FILE(APPEND ${BUILD_ENV_FILE_OUT} ${XDG_TEXT})
FILE(APPEND ${BUILD_ENV_FILE_OUT} "XDG_DATA_DIRS=${DATADIR_BUILD};{XDG_DATA_DIRS};" "${GNC_SYSTEM_XDG_DATA_DIRS}\n")
FILE(COPY ${BUILD_ENV_FILE_OUT}
DESTINATION ${SYSCONFDIR_BUILD}/gnucash
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
FILE(RENAME
${SYSCONFDIR_BUILD}/gnucash/environment.build
${SYSCONFDIR_BUILD}/gnucash/environment
)
SET(ENVIRONMENT_FILE_DIR ${CMAKE_CURRENT_BINARY_DIR})
FILE(COPY ${ENV_FILE_OUT}
DESTINATION ${ENVIRONMENT_FILE_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
INSTALL(FILES ${SCRIPT_LIST} ${VALGRIND_OUTDIR}/gnucash-valgrind DESTINATION bin)
INSTALL(FILES ${ENVIRONMENT_FILE_DIR}/environment DESTINATION etc/gnucash)
IF (WIN32)
# Write out a command script for windows
SET(lib_directories boost enchant libsoup mysql pgsql libxslt)
SET(bin_directories mingw gnutls goffice libgsf pcre gnome guile webkit regex aqbanking gwenhywfar libofx opensp
libdbi sqlite3 mysql pgsql enchant libsoup libxslt)
SET(CMD_LINES "")
SET(BUILD_CMD_LINES "")
FOREACH(dir bin lib lib/gnucash)
FILE(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/${dir} INSTALL_PATH_ITEM)
FILE(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/${dir} BUILD_PATH_ITEM)
LIST(APPEND CMD_LINES "set PATH=${INSTALL_PATH_ITEM}\;%PATH%\n")
LIST(APPEND BUILD_CMD_LINES "set PATH=${BUILD_PATH_ITEM}\;%PATH%\n")
ENDFOREACH(dir)
IF (NOT ${MINGW64})
FOREACH(dir ${lib_directories})
FILE(TO_NATIVE_PATH ${CMAKE_PREFIX_PATH}/${dir}/lib PATH_ITEM)
LIST(APPEND CMD_LINES "set PATH=${PATH_ITEM}\;%PATH%\n")
ENDFOREACH(dir)
FOREACH(dir ${bin_directories})
FILE(TO_NATIVE_PATH ${CMAKE_PREFIX_PATH}/${dir}/bin PATH_ITEM)
LIST(APPEND CMD_LINES "set PATH=${PATH_ITEM}\;%PATH%\n")
ENDFOREACH(dir)
ENDIF (NOT ${MINGW64})
SET(CMD_FILE ${CMAKE_CURRENT_BINARY_DIR}/gnucash-launcher.cmd)
FILE(WRITE ${CMD_FILE} "@echo off\nsetlocal\n\n")
FOREACH(line ${CMD_LINES})
FILE(APPEND ${CMD_FILE} "${line}")
ENDFOREACH(line)
FILE(APPEND ${CMD_FILE} "\nstart gnucash %*\n")
SET(BUILD_CMD_FILE ${CMAKE_BINARY_DIR}/bin/gnucash-launcher.cmd)
FILE(WRITE ${BUILD_CMD_FILE} "@echo off\nsetlocal\n\n")
FOREACH(line ${CMD_LINES})
FILE(APPEND ${BUILD_CMD_FILE} "${line}")
ENDFOREACH(line)
FILE(APPEND ${BUILD_CMD_FILE} "\nstart gnucash %*\n")
INSTALL(PROGRAMS ${CMD_FILE} DESTINATION bin)
ENDIF(WIN32)
SET_LOCAL_DIST(gnucash_DIST_local CMakeLists.txt environment.in generate-gnc-script
gnucash-bin.c gnucash.rc.in gnucash-valgrind.in
Makefile.am ${gnucash_EXTRA_DIST})
SET(gnucash_DIST ${gnucash_DIST_local} ${gnome_DIST} ${gnome_search_DIST}
${gnome_utils_DIST} ${html_DIST} ${import_export_DIST} ${plugins_DIST} ${python_DIST} ${register_DIST} ${report_DIST}
${overrides_DIST} ${test_bin_DIST} PARENT_SCOPE)

View File

@ -1,7 +1,10 @@
if WITH_PYTHON
PYTHON_DIR = python
endif
if !PLATFORM_WIN32
OVERRIDES_DIR = overrides
endif
# Order is important here.
SUBDIRS = \
${PYTHON_DIR} \
gnome-utils \
@ -12,4 +15,148 @@ SUBDIRS = \
gnome \
import-export \
plugins \
bin
. \
${OVERRIDES_DIR} \
test
AM_CPPFLAGS = -I${top_builddir} ${GLIB_CFLAGS} ${GNOME_CFLAGS} ${GTK_CFLAGS} \
-DPKGSYSCONFDIR=\"${GNC_CONFIGDIR}\" \
-DPKGDATADIR=\"${GNC_SHAREDIR}\" \
-I${top_srcdir}/common \
-I${top_builddir}/common \
-I${top_srcdir}/libgnucash/core-utils \
-I${top_srcdir}/libgnucash/app-utils \
-I${top_srcdir}/gnucash/gnome-utils \
-I${top_srcdir}/libgnucash/engine \
-I${top_srcdir}/gnucash/gnome \
-I${top_builddir}/common \
-I${top_builddir}/libgnucash/core-utils \
-I${top_srcdir}/libgnucash/gnc-module \
-I${top_srcdir}/gnucash/report/report-system \
${GUILE_CFLAGS} \
${GTK_MAC_CFLAGS}
SUFFIXES = .rc
config_DATA = environment
configdir = ${GNC_CONFIGDIR}
# Some settings are platform dependent. Let's define them per platform.
if PLATFORM_WIN32
# Windows specific settings go here:
GNUCASH_RESOURCE_FILE = gnucash.rc
dist_noinst_DATA = gnucash.rc
.rc.o:
$(AM_V_GEN)$(RC) -I${top_srcdir}/data/pixmaps -i '$<' --input-format=rc -o '$@' -O coff
else !PLATFORM_WIN32
# All other platforms use these settings:
PLATFORM_FILES = gnucash-valgrind
endif !PLATFORM_WIN32
BIN_NAME = gnucash
bin_PROGRAMS = ${BIN_NAME}
gnucash_SOURCES = gnucash-bin.c ${GNUCASH_RESOURCE_FILE}
gnucash_LDADD = \
${top_builddir}/gnucash/register/ledger-core/libgncmod-ledger-core.la \
${top_builddir}/gnucash/report/report-gnome/libgncmod-report-gnome.la \
${top_builddir}/gnucash/gnome/libgnc-gnome.la \
${top_builddir}/gnucash/gnome-utils/libgncmod-gnome-utils.la \
${top_builddir}/libgnucash/app-utils/libgncmod-app-utils.la \
${top_builddir}/libgnucash/engine/libgncmod-engine.la \
${top_builddir}/libgnucash/gnc-module/libgnc-module.la \
${top_builddir}/libgnucash/core-utils/libgnc-core-utils.la \
${top_builddir}/gnucash/report/report-system/libgncmod-report-system.la \
${GUILE_LIBS} \
${GLIB_LIBS} \
${GTK_LIBS}
if WITH_GOOGLE_PROFILER
gnucash_LDADD += -lprofiler
endif
GNUCASH_BIN_INSTALL_NAME=`echo ${BIN_NAME} | sed -e '$(transform)'`
gnucash-valgrind: gnucash-valgrind.in ${top_builddir}/config.status Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
-e "s#@-TOP_SRC_DIR-@#${abs_top_srcdir}#g" \
-e "s#@-GNUCASH_BIN_INSTALL_NAME-@#${GNUCASH_BIN_INSTALL_NAME}#g"
mv $@.tmp $@
chmod u+x $@
environment: environment.in ${top_builddir}/config.status Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
-e '/@-NOTE.*-@/ D' \
-e "s#@-GUILE_EFFECTIVE_VERSION-@#@GUILE_EFFECTIVE_VERSION@#g"
if CUSTOM_GNC_DBD_DIR
echo 'GNC_DBD_DIR=@GNC_DBD_DIR@' >> $@.tmp
endif
# Set XDG_DATA_DIRS if necessary. The three components of the search path are the
# directory used by GnuCash, whatever was specified in the environment at run time, and
# the default value specified via configure.
if [ "a$(datadir)" != "a/usr/share" ] && [ "a$(datadir)" != "a/usr/local/share" ]; \
then \
echo >> $@.tmp; \
echo "# GnuCash was not installed in the default location" >> $@.tmp; \
echo "# XDG_DATA_DIRS will be set so that our documentation" >> $@.tmp; \
echo "# and gsettings schemas are found." >> $@.tmp; \
echo "XDG_DATA_DIRS=$(datadir);{XDG_DATA_DIRS};${GNC_SYSTEM_XDG_DATA_DIRS}" >> $@.tmp; \
fi
if WITH_PYTHON
if [ "${PYTHON_SITE_PKG}" != "${pyexecdir}" ]; \
then \
echo >> $@.tmp; \
echo "# Define PYTHONPATH for non default installation path." >> $@.tmp; \
echo "PYTHONPATH=${pyexecdir};{PYTHONPATH}" >> $@.tmp; \
fi
endif
mv $@.tmp $@
CLEANFILES = $(BUILT_SOURCES) ${config_DATA} ${PLATFORM_FILES}
if !PLATFORM_WIN32
# The gnucash scripts don't make sense on Windows, so will only be
# generated and included on the other platforms.
# We handle gnucash scripts in a somewhat unexpected way, but we do
# this so that a user who doesn't necessarily have the right
# directories in their path can still invoke these commands via their
# full path, say /some/dir/not/in/path/gnucash and still have the
# right thing happen (i.e. they'll still get the right guile, and the
# right scripts if they sub-exec anything from their scripts). If you
# want to add another gnucash script, please add the name here (which
# will cause the bindir wrapper to be created, and then put the actual
# code in a script of the same name in ./overrides. Oh, and don't
# forget to add your script to configure.in's "Adjustments" section if
# you need to.
#
# For testing and other reasons, overrides/* scripts should not modify
# the path to re-insert the overrides dir. This should only be done
# by these top-level "common" scripts.
gnc_common_scripts = gnucash-env gnucash-make-guids
bin_SCRIPTS = \
${gnc_common_scripts} \
${PLATFORM_FILES}
# if you change gncoverridedir, make sure you change ./overrides/Makefile.am too.
gncoverridesdir = ${GNC_LIBEXECDIR}/overrides
## Gnucash scripts -- real code is in overrides, these just get you there.
${gnc_common_scripts}: generate-gnc-script ${top_builddir}/config.status
${srcdir}/generate-gnc-script $@ "${gncoverridesdir}"
CLEANFILES += ${gnc_common_scripts}
endif
EXTRA_DIST = \
generate-gnc-script \
gnucash-valgrind.in \
environment.in \
CMakeLists.txt
AM_CPPFLAGS += -DG_LOG_DOMAIN=\"gnc.bin\"

View File

@ -1,148 +0,0 @@
# Order is important here.
if !PLATFORM_WIN32
SUBDIRS = . overrides test
else
SUBDIRS = . test
endif
AM_CPPFLAGS = -I${top_builddir} ${GLIB_CFLAGS} ${GNOME_CFLAGS} ${GTK_CFLAGS} \
-DPKGSYSCONFDIR=\"${GNC_CONFIGDIR}\" \
-DPKGDATADIR=\"${GNC_SHAREDIR}\" \
-I${top_srcdir}/common \
-I${top_builddir}/common \
-I${top_srcdir}/libgnucash/core-utils \
-I${top_srcdir}/libgnucash/app-utils \
-I${top_srcdir}/gnucash/gnome-utils \
-I${top_srcdir}/libgnucash/engine \
-I${top_srcdir}/gnucash/gnome \
-I${top_builddir}/common \
-I${top_builddir}/libgnucash/core-utils \
-I${top_srcdir}/libgnucash/gnc-module \
-I${top_srcdir}/gnucash/report/report-system \
${GUILE_CFLAGS} \
${GTK_MAC_CFLAGS}
SUFFIXES = .rc
config_DATA = environment
configdir = ${GNC_CONFIGDIR}
# Some settings are platform dependent. Let's define them per platform.
if PLATFORM_WIN32
# Windows specific settings go here:
GNUCASH_RESOURCE_FILE = gnucash.rc
dist_noinst_DATA = gnucash.rc
.rc.o:
$(AM_V_GEN)$(RC) -I${top_srcdir}/data/pixmaps -i '$<' --input-format=rc -o '$@' -O coff
else !PLATFORM_WIN32
# All other platforms use these settings:
PLATFORM_FILES = gnucash-valgrind
endif !PLATFORM_WIN32
BIN_NAME = gnucash
bin_PROGRAMS = ${BIN_NAME}
gnucash_SOURCES = gnucash-bin.c ${GNUCASH_RESOURCE_FILE}
gnucash_LDADD = \
${top_builddir}/gnucash/register/ledger-core/libgncmod-ledger-core.la \
${top_builddir}/gnucash/report/report-gnome/libgncmod-report-gnome.la \
${top_builddir}/gnucash/gnome/libgnc-gnome.la \
${top_builddir}/gnucash/gnome-utils/libgncmod-gnome-utils.la \
${top_builddir}/libgnucash/app-utils/libgncmod-app-utils.la \
${top_builddir}/libgnucash/engine/libgncmod-engine.la \
${top_builddir}/libgnucash/gnc-module/libgnc-module.la \
${top_builddir}/libgnucash/core-utils/libgnc-core-utils.la \
${top_builddir}/gnucash/report/report-system/libgncmod-report-system.la \
${GUILE_LIBS} \
${GLIB_LIBS} \
${GTK_LIBS}
if WITH_GOOGLE_PROFILER
gnucash_LDADD += -lprofiler
endif
GNUCASH_BIN_INSTALL_NAME=`echo ${BIN_NAME} | sed -e '$(transform)'`
gnucash-valgrind: gnucash-valgrind.in ${top_builddir}/config.status Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
-e "s#@-TOP_SRC_DIR-@#${abs_top_srcdir}#g" \
-e "s#@-GNUCASH_BIN_INSTALL_NAME-@#${GNUCASH_BIN_INSTALL_NAME}#g"
mv $@.tmp $@
chmod u+x $@
environment: environment.in ${top_builddir}/config.status Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
-e '/@-NOTE.*-@/ D' \
-e "s#@-GUILE_EFFECTIVE_VERSION-@#@GUILE_EFFECTIVE_VERSION@#g"
if CUSTOM_GNC_DBD_DIR
echo 'GNC_DBD_DIR=@GNC_DBD_DIR@' >> $@.tmp
endif
# Set XDG_DATA_DIRS if necessary. The three components of the search path are the
# directory used by GnuCash, whatever was specified in the environment at run time, and
# the default value specified via configure.
if [ "a$(datadir)" != "a/usr/share" ] && [ "a$(datadir)" != "a/usr/local/share" ]; \
then \
echo >> $@.tmp; \
echo "# GnuCash was not installed in the default location" >> $@.tmp; \
echo "# XDG_DATA_DIRS will be set so that our documentation" >> $@.tmp; \
echo "# and gsettings schemas are found." >> $@.tmp; \
echo "XDG_DATA_DIRS=$(datadir);{XDG_DATA_DIRS};${GNC_SYSTEM_XDG_DATA_DIRS}" >> $@.tmp; \
fi
if WITH_PYTHON
if [ "${PYTHON_SITE_PKG}" != "${pyexecdir}" ]; \
then \
echo >> $@.tmp; \
echo "# Define PYTHONPATH for non default installation path." >> $@.tmp; \
echo "PYTHONPATH=${pyexecdir};{PYTHONPATH}" >> $@.tmp; \
fi
endif
mv $@.tmp $@
CLEANFILES = $(BUILT_SOURCES) ${config_DATA} ${PLATFORM_FILES}
if !PLATFORM_WIN32
# The gnucash scripts don't make sense on Windows, so will only be
# generated and included on the other platforms.
# We handle gnucash scripts in a somewhat unexpected way, but we do
# this so that a user who doesn't necessarily have the right
# directories in their path can still invoke these commands via their
# full path, say /some/dir/not/in/path/gnucash and still have the
# right thing happen (i.e. they'll still get the right guile, and the
# right scripts if they sub-exec anything from their scripts). If you
# want to add another gnucash script, please add the name here (which
# will cause the bindir wrapper to be created, and then put the actual
# code in a script of the same name in ./overrides. Oh, and don't
# forget to add your script to configure.in's "Adjustments" section if
# you need to.
#
# For testing and other reasons, overrides/* scripts should not modify
# the path to re-insert the overrides dir. This should only be done
# by these top-level "common" scripts.
gnc_common_scripts = gnucash-env gnucash-make-guids
bin_SCRIPTS = \
${gnc_common_scripts} \
${PLATFORM_FILES}
# if you change gncoverridedir, make sure you change ./overrides/Makefile.am too.
gncoverridesdir = ${GNC_LIBEXECDIR}/overrides
## Gnucash scripts -- real code is in overrides, these just get you there.
${gnc_common_scripts}: generate-gnc-script ${top_builddir}/config.status
${srcdir}/generate-gnc-script $@ "${gncoverridesdir}"
CLEANFILES += ${gnc_common_scripts}
endif
EXTRA_DIST = \
generate-gnc-script \
gnucash-valgrind.in \
environment.in \
CMakeLists.txt
AM_CPPFLAGS += -DG_LOG_DOMAIN=\"gnc.bin\"

View File

@ -1,6 +1,5 @@
# This is a list of files which contain translatable strings.
# This file was generated by ../make-gnucash-potfiles.
gnucash/bin/gnucash-bin.c
gnucash/gnome/assistant-acct-period.c
gnucash/gnome/assistant-hierarchy.c
gnucash/gnome/assistant-loan.c
@ -217,6 +216,7 @@ gnucash/gnome-utils/print-session.c
gnucash/gnome-utils/search-param.c
gnucash/gnome-utils/tree-view-utils.c
gnucash/gnome-utils/window-main-summarybar.c
gnucash/gnucash-bin.c
gnucash/html/gnc-html.c
gnucash/html/gnc-html-factory.c
gnucash/html/gnc-html-history.c