Replace GNC_CONFIGURE(2) with configure_file

This commit is contained in:
Geert Janssens 2017-12-21 17:54:49 +01:00
parent 19412de221
commit f11eab36d9
38 changed files with 139 additions and 238 deletions

View File

@ -42,7 +42,6 @@ INCLUDE (MacroAddSourceFileCompileFlags)
INCLUDE (GncAddSwigCommand)
INCLUDE (CheckIncludeFiles)
INCLUDE (GncAddSchemeTargets)
INCLUDE (GncConfigure)
INCLUDE (GncAddGSchemaTargets)
INCLUDE (GncAddTest)
INCLUDE (MakeDistFiles)

View File

@ -110,15 +110,11 @@ EXTRA_DIST = \
util/gnc-vcs-info \
util/CMakeLists.txt
## 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-potfiles: make-gnucash-potfiles.in Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
-e 's:@-SRCDIR-@:${srcdir}:g' \
-e 's:@-PERL-@:${PERL}:g'
-e 's:[@]SRCDIR[@]:${srcdir}:g' \
-e 's:[@]PERL[@]:${PERL}:g'
chmod +x $@.tmp
mv $@.tmp $@

View File

@ -23,16 +23,11 @@ TESTS_ENVIRONMENT = \
PYTHONPATH=$$PYTHONPATH:$(top_srcdir)/common/test-core/ \
PYTHONPATH=$$PYTHONPATH:$(top_builddir)/common/test-core/.libs \
$(shell ${abs_top_srcdir}/common/gnc-test-env.pl --noexports ${GNC_TEST_DEPS})
## We borrow guile's convention and use @-...-@ as the substitution
## brackets below, instead of the usual @...@. This prevents autoconf
## from substituting the values directly into the left-hand sides of
## the sed substitutions. *sigh*
runTests.py: runTests.py.in ${top_builddir}/config.status Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
-e 's#@-PYTHON-@#${PYTHON}#'
-e 's#[@]PYTHON[@]#${PYTHON}#'
mv $@.tmp $@
chmod u+x $@

View File

@ -1,4 +1,4 @@
#!@-PYTHON-@
#!@PYTHON@
import unittest
import os

View File

@ -8,31 +8,4 @@ IF (APPLE)
ENDIF(APPLE)
SET(CMAKE_COMMAND_TMP "")
IF (${CMAKE_VERSION} VERSION_GREATER 3.1)
SET(CMAKE_COMMAND_TMP ${CMAKE_COMMAND} -E env)
ENDIF()
SET(schema-targets csv-exp-gschema csv-imp-gschema
generic-import-gschema gnome-gschema gnome-utils-gschema qif-imp-gschema)
IF (WITH_AQBANKING)
LIST(APPEND schema-targets aqb-gschema)
ENDIF (WITH_AQBANKING)
IF (WITH_OFX)
LIST(APPEND schema-targets ofx-gschema)
ENDIF (WITH_OFX)
SET(SCHEMA_BUILD_DIR ${DATADIR_BUILD}/glib-2.0/schemas)
ADD_CUSTOM_COMMAND(
OUTPUT ${SCHEMA_BUILD_DIR}/gschemas.compiled
COMMAND ${CMAKE_COMMAND_TMP} ${GLIB_COMPILE_SCHEMAS} ${SCHEMA_BUILD_DIR}
DEPENDS ${schema-targets}
)
ADD_CUSTOM_TARGET(compiled-schemas ALL DEPENDS ${SCHEMA_BUILD_DIR}/gschemas.compiled)
INSTALL(FILES ${SCHEMA_BUILD_DIR}/gschemas.compiled DESTINATION ${CMAKE_INSTALL_DATADIR}/glib-2.0/schemas)
SET_DIST_LIST(cmake_DIST CMakeLists.txt README_CMAKE.txt cmake_uninstall.cmake.in)

View File

@ -30,7 +30,6 @@ EXTRA_DIST = \
cmake_modules/MakeDistFiles.cmake \
cmake_modules/MacroAddSourceFileCompileFlags.cmake \
cmake_modules/MakeDistCheck.cmake \
cmake_modules/GncConfigure.cmake \
cmake_modules/GncAddSchemeTargets.cmake \
cmake_modules/GncAddGSchemaTargets.cmake \
cmake_modules/GncFindPkgConfig.cmake \

View File

@ -1,6 +1,6 @@
SET(cmake_FILES GncAddGSchemaTargets.cmake GncAddSchemeTargets.cmake GncAddSwigCommand.cmake GncAddTest.cmake
GncConfigure.cmake GncFindPkgConfig.cmake MacroAddSourceFileCompileFlags.cmake MacroAppendForeach.cmake
GncFindPkgConfig.cmake MacroAddSourceFileCompileFlags.cmake MacroAppendForeach.cmake
MakeDist.cmake MakeDistFiles.cmake MakeDistCheck.cmake)
SET_DIST_LIST(cmake_modules_DIST CMakeLists.txt COPYING-CMAKE-SCRIPTS.txt ${cmake_FILES})
SET_DIST_LIST(cmake_modules_DIST CMakeLists.txt COPYING-CMAKE-SCRIPTS.txt ${cmake_FILES})

View File

@ -1,7 +1,6 @@
MACRO(ADD_GSCHEMA_TARGETS _TARGET _gschema_INPUTS)
macro(add_gschema_targets _gschema_INPUTS)
SET(_gschema_OUTPUTS "")
SET(_gschema_VALIDS "")
SET(_gschema_BUILDS "")
set(local_depends ${gschema_depends})
# FIXME: I have no idea of I'm using the right options here for intltool-merge for Windows.
SET(INITTOOL_OPTIONS "--no-translations")
IF(WIN32)
@ -12,27 +11,22 @@ MACRO(ADD_GSCHEMA_TARGETS _TARGET _gschema_INPUTS)
SET(CMAKE_COMMAND_TMP ${CMAKE_COMMAND} -E env)
ENDIF()
FOREACH(file ${_gschema_INPUTS})
GNC_CONFIGURE2(${file}-target ${file}.in.in ${file}.in)
STRING(REPLACE ".xml" ".valid" file_no_xml ${file})
SET(_OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${file})
SET(_BUILD_FILE ${DATADIR_BUILD}/glib-2.0/schemas/${file})
SET(_VALID_FILE ${CMAKE_CURRENT_BINARY_DIR}/${file_no_xml})
LIST(APPEND _gschema_OUTPUTS ${_OUTPUT_FILE})
LIST(APPEND _gschema_VALIDS ${_VALID_FILE})
LIST(APPEND _gschema_BUILDS ${_BUILD_FILE})
configure_file(${file}.in.in ${file}.in @ONLY)
set(_OUTPUT_FILE ${DATADIR_BUILD}/glib-2.0/schemas/${file})
ADD_CUSTOM_COMMAND(
OUTPUT ${_OUTPUT_FILE}
COMMAND ${CMAKE_COMMAND_TMP}
LC_ALL=C
${PERL_EXECUTABLE} ${INTLTOOL_MERGE} -x -u ${INITTOOL_OPTIONS} ${CMAKE_CURRENT_BINARY_DIR}/${file}.in ${CMAKE_CURRENT_BINARY_DIR}/${file}
${PERL_EXECUTABLE} ${INTLTOOL_MERGE} -x -u ${INITTOOL_OPTIONS} ${CMAKE_CURRENT_BINARY_DIR}/${file}.in ${_OUTPUT_FILE}
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${file}.in
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${file}.in.in
)
ADD_CUSTOM_COMMAND(
OUTPUT ${_BUILD_FILE}
COMMAND ${CMAKE_COMMAND} -E copy ${_OUTPUT_FILE} ${_BUILD_FILE}
DEPENDS ${_OUTPUT_FILE}
)
list(APPEND _gschema_OUTPUTS ${_OUTPUT_FILE})
string(REPLACE ".xml" ".valid" file_no_xml ${file})
set(_VALID_FILE ${CMAKE_CURRENT_BINARY_DIR}/${file_no_xml})
list(APPEND _gschema_VALIDS ${_VALID_FILE})
ADD_CUSTOM_COMMAND(
OUTPUT ${_VALID_FILE}
COMMAND ${CMAKE_COMMAND_TMP}
@ -40,10 +34,18 @@ MACRO(ADD_GSCHEMA_TARGETS _TARGET _gschema_INPUTS)
COMMAND ${CMAKE_COMMAND} -E touch ${_VALID_FILE}
DEPENDS ${_OUTPUT_FILE}
)
add_custom_target(${file_no_xml}-target DEPENDS ${_VALID_FILE})
# Add both a target and a file level dependency for the valid target/file
# to the gschemas.compiled target (local_depends will be propagated to that target)
# The target level one is to ensure a link between two targets in different directories (required for the make build chain)
# The file level one is to ensure gschemas.compiled will be rebuilt if any of the
# dependencies changes.
list(APPEND local_depends ${file_no_xml}-target ${_VALID_FILE})
ENDFOREACH(file)
ADD_CUSTOM_TARGET(${_TARGET} DEPENDS ${_gschema_OUTPUTS} ${_gschema_VALIDS} ${_gschema_BUILDS})
set(gschema_depends ${local_depends} CACHE INTERNAL "gschemas.compiled dependencies")
INSTALL(FILES ${_gschema_OUTPUTS} DESTINATION share/glib-2.0/schemas)
ENDMACRO()
endmacro()

View File

@ -1,44 +0,0 @@
MACRO (GNC_CONFIGURE _INPUT _OUTPUT)
FILE(READ ${_INPUT} FILE_CONTENTS_IN_IN)
SET(FILE_CONTENTS_IN "${FILE_CONTENTS_IN_IN}")
STRING(REGEX REPLACE "@-|-@" "@" _TMP2 "${FILE_CONTENTS_IN}")
STRING(CONFIGURE "${_TMP2}" FILE_CONTENTS @ONLY)
SET(_OUTPUT_FILE ${_OUTPUT})
IF (NOT IS_ABSOLUTE ${_OUTPUT})
SET(_OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_OUTPUT})
ENDIF()
FILE(WRITE ${_OUTPUT_FILE} "${FILE_CONTENTS}")
ENDMACRO()
MACRO (GNC_CONFIGURE2 _TARGET _INPUT _OUTPUT)
SET(_TMPDIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
FILE(READ ${_INPUT} FILE_CONTENTS_IN_IN)
SET(FILE_CONTENTS_IN "${FILE_CONTENTS_IN_IN}")
STRING(REGEX REPLACE "@-|-@" "@" _TMP2 "${FILE_CONTENTS_IN}")
FILE(WRITE ${_TMPDIR}/${_INPUT}.tmp "${_TMP2}")
FILE(WRITE ${_TMPDIR}/${_INPUT}.cmake
"SET(PERL ${PERL_EXECUTABLE})
SET(VERSION ${VERSION})
SET(GNC_HELPDIR \"${GNC_HELPDIR}\")
SET(GETTEXT_PACKAGE ${GETTEXT_PACKAGE})
CONFIGURE_FILE(\${SRC} \${DST} @ONLY)")
SET(_OUTPUT_FILE ${_OUTPUT})
IF (NOT IS_ABSOLUTE ${_OUTPUT})
SET(_OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_OUTPUT})
ENDIF()
ADD_CUSTOM_COMMAND(
OUTPUT ${_OUTPUT_FILE}
COMMAND ${CMAKE_COMMAND} -D SRC=${_TMPDIR}/${_INPUT}.tmp
-D DST=${_OUTPUT_FILE}
-P ${_TMPDIR}/${_INPUT}.cmake
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_INPUT}
)
ADD_CUSTOM_TARGET(${_TARGET} DEPENDS ${_OUTPUT_FILE})
ENDMACRO()

View File

@ -38,33 +38,25 @@ EXTRA_DIST = \
tip_of_the_day.list.in \
CMakeLists.txt
gnucash.1: gnucash.1.in Makefile
rm -f $@.tmp
if BUILDING_FROM_VCS
GNC_VCS_REV_Y_M=`perl -ne 'print if $$_=~s/.*GNC_VCS_REV_Y_M "(.*)"/$$1/' ${top_builddir}/libgnucash/core-utils/gnc-vcs-info.h` ; \
${SED} < $< > $@.tmp \
-e 's:$${VERSION}:${VERSION}:g' \
-e 's:$${DATE}:'$${GNC_VCS_REV_Y_M}':g'
chmod +x $@.tmp
mv $@.tmp $@
top_basedir = $(top_builddir)
else
GNC_VCS_REV_Y_M=`perl -ne 'print if $$_=~s/.*GNC_VCS_REV_Y_M "(.*)"/$$1/' ${top_srcdir}/libgnucash/core-utils/gnc-vcs-info.h` ; \
${SED} < $< > $@.tmp \
-e 's:$${VERSION}:${VERSION}:g' \
-e 's:$${DATE}:'$${GNC_VCS_REV_Y_M}':g'
chmod +x $@.tmp
mv $@.tmp $@
top_basedir = $(top_srcdir)
endif
## 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.
gnucash.1: gnucash.1.in Makefile
rm -f $@.tmp
GNC_VCS_REV_Y_M=`perl -ne 'print if $$_=~s/.*GNC_VCS_REV_Y_M "(.*)"/$$1/' ${top_basedir}/libgnucash/core-utils/gnc-vcs-info.h` ; \
${SED} < $< > $@.tmp \
-e 's:[@]VERSION[@]:${VERSION}:g' \
-e 's:[@]DATE[@]:'$${GNC_VCS_REV_Y_M}':g'
chmod +x $@.tmp
mv $@.tmp $@
tip_of_the_day.list: tip_of_the_day.list.in Makefile
${CC} -E -P -x c -D'N_(x)=x' -o $@.tmp $<
cat -s $@.tmp | ${SED} -e 's/^ *"//' \
-e 's/"* *[|] */|/' \
-e 's:@-GNUCASH_LATEST_STABLE_SERIES-@:${GNUCASH_LATEST_STABLE_SERIES}:g' > $@
-e 's/"* *[|] */|/' > $@
rm -f $@.tmp
if PLATFORM_WIN32
perl -pi.bak -e 's/" *$$//' $@

View File

@ -42,16 +42,12 @@ exceptions) manually with sed. For example, we have
src/scm/bootstrap.scm.in which is processed in src/scm/Makefile.in
according to the following rule:
## 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. *sigh*
bootstrap.scm: bootstrap.scm.in
rm -f $@.tmp
sed < $@.in > $@.tmp \
-e 's:@-VERSION-@:${VERSION}:g' \
-e 's:@-GNC_CONFIGDIR-@:${GNC_SHAREDIR}:g' \
-e 's:@-GNC_SHAREDIR-@:${GNC_CONFIGDIR}:g'
-e 's:[@]VERSION[@]:${VERSION}:g' \
-e 's:[@]GNC_CONFIGDIR[@]:${GNC_SHAREDIR}:g' \
-e 's:[@]GNC_SHAREDIR[@]:${GNC_CONFIGDIR}:g'
chmod +x $@.tmp
mv $@.tmp $@

View File

@ -2,7 +2,7 @@
.\" Process this file with
.\" groff -man -Tascii foo.1
.\"
.TH GNUCASH 1 "${DATE}" Version "${VERSION}"
.TH GNUCASH 1 "@DATE@" Version "@VERSION@"
.SH NAME
gnucash \- personal finance manager
.SH SYNOPSIS

View File

@ -1,5 +1,10 @@
# CMakeLists.txt for gnucash/
# Preparations for macro add_gschema_targets and gschemas.compiled target
set(SCHEMADIR_BUILD ${DATADIR_BUILD}/glib-2.0/schemas)
file(MAKE_DIRECTORY ${SCHEMADIR_BUILD})
unset(gschema_depends CACHE)
# The subdirectories
ADD_SUBDIRECTORY (gnome)
ADD_SUBDIRECTORY (gnome-utils)
@ -93,7 +98,7 @@ 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)
configure_file(gnucash-valgrind.in ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/gnucash-valgrind @ONLY)
FILE(COPY ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/gnucash-valgrind
DESTINATION ${VALGRIND_OUTDIR}
@ -107,10 +112,9 @@ 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")
STRING(REPLACE ";" "\;" line2 "${line}")
IF(NOT "${line2}" MATCHES "@NOTE")
LIST(APPEND ENV_STRINGS_LIST "${line2}\n")
ENDIF()
ENDFOREACH()
@ -219,6 +223,24 @@ IF (WIN32)
INSTALL(PROGRAMS ${CMD_FILE} DESTINATION ${CMAKE_INSTALL_BINDIR})
ENDIF(WIN32)
# Handle gschemas.compiled
set(CMAKE_COMMAND_TMP "")
if (${CMAKE_VERSION} VERSION_GREATER 3.1)
set(CMAKE_COMMAND_TMP ${CMAKE_COMMAND} -E env)
endif()
add_custom_command(
OUTPUT ${SCHEMADIR_BUILD}/gschemas.compiled
COMMAND ${CMAKE_COMMAND_TMP} ${GLIB_COMPILE_SCHEMAS} ${SCHEMADIR_BUILD}
DEPENDS ${gschema_depends}
)
add_custom_target(compiled-schemas ALL DEPENDS ${SCHEMADIR_BUILD}/gschemas.compiled)
install(FILES ${SCHEMADIR_BUILD}/gschemas.compiled DESTINATION ${CMAKE_INSTALL_DATADIR}/glib-2.0/schemas)
# The GResource Files are absolute paths but SET_LOCAL_DIST requires
# relative paths.
FOREACH(gres_file ${gresource_files})

View File

@ -81,16 +81,16 @@ 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"
-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"
-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

View File

@ -1,6 +1,6 @@
@-NOTE If you make any changes here, you should probably -@
@-NOTE also verify that modifications performed in -@
@-NOTE - gnucash-on-windows.git:gnucash.iss don't conflict. -@
@NOTE If you make any changes here, you should probably @
@NOTE also verify that modifications performed in @
@NOTE - gnucash-on-windows.git:gnucash.iss don't conflict. @
# environment
#
# This configuration file defines a number of environment variables to set/alter
@ -64,7 +64,7 @@ GUILE_LOAD_PATH={GNC_DATA}/scm;{GUILE_LIBS};{GUILE_LOAD_PATH}
# On Windows {GNC_LIB} points to {GNC_HOME}/bin because that's where the DLLs
# are. It's not where the compiled scheme files are so we use {SYS_LIB} here.
GUILE_LOAD_COMPILED_PATH={SYS_LIB}/guile/@-GUILE_EFFECTIVE_VERSION-@/ccache;{SYS_LIB}/gnucash/scm/ccache/@-GUILE_EFFECTIVE_VERSION-@;{GUILE_COMPILED_LIBS};{GUILE_LOAD_COMPILED_PATH}
GUILE_LOAD_COMPILED_PATH={SYS_LIB}/guile/@GUILE_EFFECTIVE_VERSION@/ccache;{SYS_LIB}/gnucash/scm/ccache/@GUILE_EFFECTIVE_VERSION@;{GUILE_COMPILED_LIBS};{GUILE_LOAD_COMPILED_PATH}
# Tell Guile where to find GnuCash specific shared libraries
GNC_LIBRARY_PATH={SYS_LIB};{GNC_LIB}

View File

@ -1,7 +1,7 @@
SET(gnome_utils_GSCHEMA org.gnucash.history.gschema.xml org.gnucash.warnings.gschema.xml)
ADD_GSCHEMA_TARGETS(gnome-utils-gschema "${gnome_utils_GSCHEMA}")
add_gschema_targets("${gnome_utils_GSCHEMA}")
SET_DIST_LIST(gnome_utils_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.history.gschema.xml.in.in
org.gnucash.warnings.gschema.xml.in.in)
org.gnucash.warnings.gschema.xml.in.in)

View File

@ -12,12 +12,7 @@ SET(gnome_GSCHEMA
org.gnucash.window.pages.gschema.xml
)
# If you edit one of the above files, you need to rerun cmake.
# When we can use CONFIGURE_FILE() instead of GNC_CONFIGURE()
# this issue will go away.
ADD_GSCHEMA_TARGETS(gnome-gschema "${gnome_GSCHEMA}")
add_gschema_targets("${gnome_GSCHEMA}")
SET(gnome_gschema_DIST_local "")
FOREACH(file ${gnome_GSCHEMA})

View File

@ -4,7 +4,7 @@ BIN_DIR=$(dirname $0)
[ -e ${BIN_DIR}/gnucash-setup-env ] && \
. ${BIN_DIR}/gnucash-setup-env
TOP_SRC_DIR="@-TOP_SRC_DIR-@"
TOP_SRC_DIR="@TOP_SRC_DIR@"
#
# Other potentially useful options, particularly for valgrind-2.x:
# --tool=memcheck --trace-children=yes
@ -21,4 +21,4 @@ exec valgrind -v \
--error-limit=no \
--tool=memcheck \
--leak-check=full \
${BIN_DIR}/@-GNUCASH_BIN_INSTALL_NAME-@ "$@"
${BIN_DIR}/@GNUCASH_BIN_INSTALL_NAME@ "$@"

View File

@ -1,7 +1,8 @@
IF (WITH_AQBANKING)
SET(aqb_GSCHEMA org.gnucash.dialogs.import.hbci.gschema.xml)
ADD_GSCHEMA_TARGETS(aqb-gschema "${aqb_GSCHEMA}")
ENDIF(WITH_AQBANKING)
SET_DIST_LIST(aqbanking_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.hbci.gschema.xml.in.in)
add_gschema_targets("${aqb_GSCHEMA}")
ENDIF(WITH_AQBANKING)
SET_DIST_LIST(aqbanking_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.hbci.gschema.xml.in.in)

View File

@ -1,6 +1,6 @@
SET(csv_exp_GSCHEMA org.gnucash.dialogs.export.csv.gschema.xml)
ADD_GSCHEMA_TARGETS(csv-exp-gschema "${csv_exp_GSCHEMA}")
add_gschema_targets("${csv_exp_GSCHEMA}")
SET_DIST_LIST(csv_exp_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.export.csv.gschema.xml.in.in)
SET_DIST_LIST(csv_exp_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.export.csv.gschema.xml.in.in)

View File

@ -1,5 +1,5 @@
SET(csv_imp_GSCHEMA org.gnucash.dialogs.import.csv.gschema.xml)
ADD_GSCHEMA_TARGETS(csv-imp-gschema "${csv_imp_GSCHEMA}")
add_gschema_targets("${csv_imp_GSCHEMA}")
SET_DIST_LIST(csv_import_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.csv.gschema.xml.in.in)
SET_DIST_LIST(csv_import_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.csv.gschema.xml.in.in)

View File

@ -1,6 +1,6 @@
SET(generic_import_GSCHEMA org.gnucash.dialogs.import.generic.gschema.xml)
ADD_GSCHEMA_TARGETS(generic-import-gschema "${generic_import_GSCHEMA}")
add_gschema_targets("${generic_import_GSCHEMA}")
SET_DIST_LIST(generic_import_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.generic.gschema.xml.in.in)
SET_DIST_LIST(generic_import_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.generic.gschema.xml.in.in)

View File

@ -2,7 +2,7 @@
IF (WITH_OFX)
set(ofx_GSCHEMA org.gnucash.dialogs.import.ofx.gschema.xml)
ADD_GSCHEMA_TARGETS(ofx-gschema "${ofx_GSCHEMA}")
add_gschema_targets("${ofx_GSCHEMA}")
ENDIF (WITH_OFX)
SET_DIST_LIST(ofx_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.ofx.gschema.xml.in.in)
SET_DIST_LIST(ofx_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.ofx.gschema.xml.in.in)

View File

@ -1,6 +1,6 @@
set(qif_imp_GSCHEMA org.gnucash.dialogs.import.qif.gschema.xml)
ADD_GSCHEMA_TARGETS(qif-imp-gschema "${qif_imp_GSCHEMA}")
add_gschema_targets("${qif_imp_GSCHEMA}")
SET_DIST_LIST(qif_import_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.qif.gschema.xml.in.in)
SET_DIST_LIST(qif_import_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.qif.gschema.xml.in.in)

View File

@ -56,7 +56,7 @@ else()
SET(sysconfdir ${CMAKE_INSTALL_FULL_SYSCONFDIR})
SET(localedir "${CMAKE_INSTALL_FULL_DATAROOTDIR}/locale")
endif()
GNC_CONFIGURE(gncla-dir.h.in gncla-dir.h)
configure_file(gncla-dir.h.in gncla-dir.h)
### Create gnc-version.h ###

View File

@ -134,18 +134,14 @@ AM_CPPFLAGS += -DG_LOG_DOMAIN=\"gnc.core-utils\" -DGNC_SCM_INSTALL_DIR="\"${GNC_
gncla-dir.h: gncla-dir.h.in ${top_builddir}/config.status Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
-e 's#@-DATADIRNAME-@#${DATADIRNAME}#g' \
-e 's#@-libdir-@#${libdir}#g' \
-e 's#@-bindir-@#${bindir}#g' \
-e 's#@-sysconfdir-@#${sysconfdir}#g' \
-e 's#@-datadir-@#${datadir}#g' \
-e 's#@-prefix-@#${prefix}#g'
-e 's#[@]DATADIRNAME[@]#${DATADIRNAME}#g' \
-e 's#[@]libdir[@]#${libdir}#g' \
-e 's#[@]bindir[@]#${bindir}#g' \
-e 's#[@]sysconfdir[@]#${sysconfdir}#g' \
-e 's#[@]datadir[@]#${datadir}#g' \
-e 's#[@]prefix[@]#${prefix}#g'
mv $@.tmp $@
## 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.
gnc-version.h: _gnc-version.h
-if [ ! -f gnc-version.h ]; then cp _gnc-version.h gnc-version.h; fi
-cmp -s _gnc-version.h gnc-version.h || cp _gnc-version.h gnc-version.h

View File

@ -23,11 +23,11 @@
* 02110-1301, USA.
*/
#define PREFIX "@-prefix-@"
#define DATADIR "@-datadir-@"
#define SYSCONFDIR "@-sysconfdir-@"
#define PREFIX "@prefix@"
#define DATADIR "@datadir@"
#define SYSCONFDIR "@sysconfdir@"
#define BINDIR "@-bindir-@"
#define LIBDIR "@-libdir-@"
#define BINDIR "@bindir@"
#define LIBDIR "@libdir@"
#define LOCALEDIR "@-localedir-@"
#define LOCALEDIR "@localedir@"

View File

@ -50,13 +50,9 @@ maintainer-clean-local:
uninstall-hook:
rm -rf ${docdir}/html
## 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.
doxygen.cfg: doxygen.cfg.in Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
-e 's:@-top_srcdir-@:${top_srcdir}:g; s:@-VERSION-@:${VERSION}:g'
-e 's:[@]top_srcdir[@]:${top_srcdir}:g; s:[@]VERSION[@]:${VERSION}:g'
mv $@.tmp $@

View File

@ -32,7 +32,7 @@ PROJECT_NAME = GnuCash
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = @-VERSION-@
PROJECT_NUMBER = @VERSION@
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
@ -652,8 +652,8 @@ WARN_LOGFILE = doxygen.log
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = @-top_srcdir-@/libgnucash \
@-top_srcdir-@/libgnucash/engine/
INPUT = @top_srcdir@/libgnucash \
@top_srcdir@/libgnucash/engine/
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@ -1548,7 +1548,7 @@ SEARCH_INCLUDES = YES
# contain include files that are not input files but should be processed by
# the preprocessor.
INCLUDE_PATH = @-top_srcdir-@/libgnucash/engine/
INCLUDE_PATH = @top_srcdir@/libgnucash/engine/
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the

View File

@ -12,15 +12,15 @@ FILE(WRITE ${_TMPDIR}/copy_with_perms.cmake
SET(_BIN_FILES "")
FOREACH(file gnc-fq-check.in gnc-fq-helper.in gnc-fq-update.in gnc-fq-dump)
STRING(REPLACE ".in" "" _OUTPUT_FILE_NAME ${file})
GNC_CONFIGURE2(${file}-target ${file} ${_OUTPUT_FILE_NAME})
SET(_ABS_OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_OUTPUT_FILE_NAME})
SET(_ABS_OUTPUT_FILE ${BINDIR_BUILD}/${_OUTPUT_FILE_NAME})
configure_file( ${file} ${_OUTPUT_FILE_NAME} @ONLY)
LIST(APPEND _BIN_FILES ${_ABS_OUTPUT_FILE})
ADD_CUSTOM_COMMAND(
OUTPUT ${_ABS_OUTPUT_FILE}
APPEND
COMMAND ${CMAKE_COMMAND} -D SRC=${_ABS_OUTPUT_FILE}
COMMAND ${CMAKE_COMMAND} -D SRC=${CMAKE_CURRENT_BINARY_DIR}/${_OUTPUT_FILE_NAME}
-D DST=${BINDIR_BUILD}
-P ${_TMPDIR}/copy_with_perms.cmake
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_OUTPUT_FILE_NAME}
)
ENDFOREACH(file)
@ -45,7 +45,7 @@ ENDFOREACH(file)
ADD_CUSTOM_TARGET(quotes-man ALL DEPENDS ${_MAN_FILES})
ADD_CUSTOM_TARGET(quotes-bin ALL DEPENDS gnc-fq-check gnc-fq-update)
ADD_CUSTOM_TARGET(quotes-bin ALL DEPENDS ${_BIN_FILES})
INSTALL(FILES ${_MAN_FILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
INSTALL(PROGRAMS ${_BIN_FILES} DESTINATION ${CMAKE_INSTALL_BINDIR})

View File

@ -13,31 +13,27 @@ EXTRA_DIST = \
gnc-value-portfolio \
CMakeLists.txt
## 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.
gnc-fq-helper: gnc-fq-helper.in Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
-e 's:@-PERL-@:${PERL}:g' \
-e 's:@-PERLINCL-@:${PERLINCL}:g'
-e 's:[@]PERL[@]:${PERL}:g' \
-e 's:[@]PERLINCL[@]:${PERLINCL}:g'
chmod +x $@.tmp
mv $@.tmp $@
gnc-fq-check: gnc-fq-check.in Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
-e 's:@-PERL-@:${PERL}:g' \
-e 's:@-PERLINCL-@:${PERLINCL}:g'
-e 's:[@]PERL[@]:${PERL}:g' \
-e 's:[@]PERLINCL[@]:${PERLINCL}:g'
chmod +x $@.tmp
mv $@.tmp $@
gnc-fq-update: gnc-fq-update.in Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
-e 's:@-PERL-@:${PERL}:g' \
-e 's:@-PERLINCL-@:${PERLINCL}:g'
-e 's:[@]PERL[@]:${PERL}:g' \
-e 's:[@]PERLINCL[@]:${PERLINCL}:g'
chmod +x $@.tmp
mv $@.tmp $@

View File

@ -1,4 +1,4 @@
#!@-PERL-@ -w
#!@PERL@ -w
######################################################################
### gnc-fq-check - check for the presence of Finance::Quote
### From gnc-fq-helper.

View File

@ -1,4 +1,4 @@
#!@-PERL-@ -w
#!@PERL@ -w
######################################################################
### gnc-fq-helper - present a scheme interface to Finance::Quote
### Copyright 2001 Rob Browning <rlb@cs.utexas.edu>

View File

@ -1,4 +1,4 @@
#!@-PERL-@ -w
#!@PERL@ -w
######################################################################
### gnc-fq-update - presents a scheme interface to Finance::Quote
### Copyright 2001 Gnumatic, Inc.

View File

@ -7,16 +7,7 @@ SET (scm_SCHEME_4
xml-generator.scm
)
# We need to replace a couple of variables in build-config.scm. Normally, I
# would use CONFIGURE_FILE to do this. But this scheme files is using a different
# replacement marking scheme ("@-", "-@") than the usual one with just "@"
# that CONFIGURE_FILE expects.
# FIXME: ${BUILD_CONFIG_SCM} needs a rule to cause it to be generated, I think.
GNC_CONFIGURE2(build-config-scm build-config.scm.in build-config.scm)
# CONFIGURE_FILE(build-config.scm.in ${BUILD_CONFIG_SCM})
configure_file(build-config.scm.in ${BUILD_CONFIG_SCM})
SET(GUILE_DEPENDS scm-core-utils scm-gnc-module)

View File

@ -70,15 +70,11 @@ EXTRA_DIST = \
${SCM_FILES} \
CMakeLists.txt
## 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. *sigh*
build-config.scm: ${srcdir}/build-config.scm.in Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
-e 's#@-VERSION-@#${VERSION}#' \
-e 's#@-GNC_HELPDIR-@#${GNC_HELPDIR}#'
-e 's#[@]VERSION[@]#${VERSION}#' \
-e 's#[@]GNC_HELPDIR[@]#${GNC_HELPDIR}#'
mv $@.tmp $@
CLEANFILES = .scm-links ${gncscmmodcache_DATA} ${gncscmcache_DATA}

View File

@ -1,6 +1,6 @@
(define gnc:version "@-VERSION-@")
(define gnc:version "@VERSION@")
;; Automatically generated defaults (don't use these directly --
;; they're used during actual initialization elsewhere)
(define gnc:_install-doc-path_ '("@-GNC_HELPDIR-@"))
(define gnc:_install-doc-path_ '("@GNC_HELPDIR@"))

View File

@ -1,4 +1,4 @@
#!@-PERL-@ -w
#!@PERL@ -w
# -*- perl -*-
#
# This perl script is used to make po/POTFILES.in, the list
@ -15,12 +15,12 @@ use File::Basename;
# Note: These are perl regexp patterns, *not* normal shell wildcards!
my @ignorepatterns = ('gw-', 'test', 'experimental', 'python-bindings', 'swig-.*\.c');
my (@skipped_files, @ignored_files);
open(IN, "< @-SRCDIR-@/po/POTFILES.skip");
open(IN, "< @SRCDIR@/po/POTFILES.skip");
while (<IN>) {
push @skipped_files, $_ unless $_ =~ /^\#/;
}
close IN;
open(IN, "< @-SRCDIR-@/po/POTFILES.ignore");
open(IN, "< @SRCDIR@/po/POTFILES.ignore");
while (<IN>) {
push @ignored_files, $_ unless $_ =~ /^\#/;
}
@ -36,7 +36,7 @@ close IN;
# This sort function has been extracted into a separate file (util/elegant-sort.pl)
# in order to use the same algorithm in both cmake and autools based builds
my @possible_files = `cd @-SRCDIR-@ && \\
my @possible_files = `cd @SRCDIR@ && \\
find bindings borrowed common libgnucash gnucash -name '*.c' \\
-o -name '*.cpp' -o -name '*.glade' \\
-o -name '*.desktop.in' -o -name '*.keys.in' \\
@ -65,7 +65,7 @@ foreach my $file (@possible_files) {
next if $ignores{$path . $name};
# Ignore unreadable files, e.g. dangling symlinks
next unless (-r "@-SRCDIR-@/" . $path . $name);
next unless (-r "@SRCDIR@/" . $path . $name);
# Force parse type for gsettings files
my $type = "";