gnucash unstable: Multiple changes pushed
Geert Janssens
gjanssens at code.gnucash.org
Sat Dec 23 08:27:41 EST 2017
Updated via https://github.com/Gnucash/gnucash/commit/ddfd38d8 (commit)
via https://github.com/Gnucash/gnucash/commit/f11eab36 (commit)
from https://github.com/Gnucash/gnucash/commit/19412de2 (commit)
commit ddfd38d8c3bb0fa04bd7d88fce49b09dd30b8767
Author: Geert Janssens <geert at kobaltwit.be>
Date: Fri Dec 22 20:31:35 2017 +0100
Remove cmake hoop to change file permissions
As we are using cmake's own configure_file command, it will just copy
the permissions of the input file, which is what we want here.
diff --git a/libgnucash/quotes/CMakeLists.txt b/libgnucash/quotes/CMakeLists.txt
index e42ec9c..91bd518 100644
--- a/libgnucash/quotes/CMakeLists.txt
+++ b/libgnucash/quotes/CMakeLists.txt
@@ -1,27 +1,10 @@
-
-
-SET(PERL ${PERL_EXECUTABLE})
-
-SET(_TMPDIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
-FILE(WRITE ${_TMPDIR}/copy_with_perms.cmake
- "FILE(COPY \${SRC} DESTINATION \${DST}
- FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)"
-)
-
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})
SET(_ABS_OUTPUT_FILE ${BINDIR_BUILD}/${_OUTPUT_FILE_NAME})
- configure_file( ${file} ${_OUTPUT_FILE_NAME} @ONLY)
+ configure_file( ${file} ${_ABS_OUTPUT_FILE} @ONLY)
LIST(APPEND _BIN_FILES ${_ABS_OUTPUT_FILE})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${_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)
SET(CMAKE_COMMAND_TMP "")
@@ -32,7 +15,7 @@ ENDIF()
SET(_MAN_FILES "")
FOREACH(file gnc-fq-dump gnc-fq-helper)
- SET(_POD_INPUT ${CMAKE_CURRENT_BINARY_DIR}/${file})
+ SET(_POD_INPUT ${BINDIR_BUILD}/${file})
SET(_MAN_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${file}.1)
LIST(APPEND _MAN_FILES ${_MAN_OUTPUT})
ADD_CUSTOM_COMMAND(
commit f11eab36d9a2e9d844a549e8a64cf356c8b4858f
Author: Geert Janssens <geert at kobaltwit.be>
Date: Thu Dec 21 17:54:49 2017 +0100
Replace GNC_CONFIGURE(2) with configure_file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0a021a7..5378340 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,7 +42,6 @@ INCLUDE (MacroAddSourceFileCompileFlags)
INCLUDE (GncAddSwigCommand)
INCLUDE (CheckIncludeFiles)
INCLUDE (GncAddSchemeTargets)
-INCLUDE (GncConfigure)
INCLUDE (GncAddGSchemaTargets)
INCLUDE (GncAddTest)
INCLUDE (MakeDistFiles)
diff --git a/Makefile.am b/Makefile.am
index 2823a0a..ce7ffae 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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 @... at . 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 $@
diff --git a/bindings/python/tests/Makefile.am b/bindings/python/tests/Makefile.am
index 62c50cb..f965265 100644
--- a/bindings/python/tests/Makefile.am
+++ b/bindings/python/tests/Makefile.am
@@ -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 @... at . 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 $@
diff --git a/bindings/python/tests/runTests.py.in b/bindings/python/tests/runTests.py.in
index 60d040f..6028c81 100755
--- a/bindings/python/tests/runTests.py.in
+++ b/bindings/python/tests/runTests.py.in
@@ -1,4 +1,4 @@
-#!@-PYTHON-@
+#!@PYTHON@
import unittest
import os
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 211daff..f7dbab7 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -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)
diff --git a/common/Makefile.am b/common/Makefile.am
index 29c5b8e..f5a7625 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -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 \
diff --git a/common/cmake_modules/CMakeLists.txt b/common/cmake_modules/CMakeLists.txt
index 2a014b3..19922a1 100644
--- a/common/cmake_modules/CMakeLists.txt
+++ b/common/cmake_modules/CMakeLists.txt
@@ -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})
\ No newline at end of file
+SET_DIST_LIST(cmake_modules_DIST CMakeLists.txt COPYING-CMAKE-SCRIPTS.txt ${cmake_FILES})
diff --git a/common/cmake_modules/GncAddGSchemaTargets.cmake b/common/cmake_modules/GncAddGSchemaTargets.cmake
index dbe2c9d..8c519f9 100644
--- a/common/cmake_modules/GncAddGSchemaTargets.cmake
+++ b/common/cmake_modules/GncAddGSchemaTargets.cmake
@@ -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()
diff --git a/common/cmake_modules/GncConfigure.cmake b/common/cmake_modules/GncConfigure.cmake
deleted file mode 100644
index 5c566b2..0000000
--- a/common/cmake_modules/GncConfigure.cmake
+++ /dev/null
@@ -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()
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 2959220..5d06e8a 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -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` ; \
+top_basedir = $(top_srcdir)
+endif
+
+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'
+ -e 's:[@]VERSION[@]:${VERSION}:g' \
+ -e 's:[@]DATE[@]:'$${GNC_VCS_REV_Y_M}':g'
chmod +x $@.tmp
mv $@.tmp $@
-endif
-## We borrow guile's convention and use @-...-@ as the substitution
-## brackets here, instead of the usual @... at . This prevents autoconf
-## from substituting the values directly into the left-hand sides of
-## the sed substitutions.
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/" *$$//' $@
diff --git a/doc/README.build-system b/doc/README.build-system
index 6321e05..dc3dfb3 100644
--- a/doc/README.build-system
+++ b/doc/README.build-system
@@ -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 @... at . 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 $@
diff --git a/doc/gnucash.1.in b/doc/gnucash.1.in
index 9c4f68b..a1cc1e9 100644
--- a/doc/gnucash.1.in
+++ b/doc/gnucash.1.in
@@ -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
diff --git a/gnucash/CMakeLists.txt b/gnucash/CMakeLists.txt
index b4c33f9..29784aa 100644
--- a/gnucash/CMakeLists.txt
+++ b/gnucash/CMakeLists.txt
@@ -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})
diff --git a/gnucash/Makefile.am b/gnucash/Makefile.am
index 9e77444..0c0e125 100644
--- a/gnucash/Makefile.am
+++ b/gnucash/Makefile.am
@@ -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
diff --git a/gnucash/environment.in b/gnucash/environment.in
index eb582e2..8c903ac 100644
--- a/gnucash/environment.in
+++ b/gnucash/environment.in
@@ -1,6 +1,6 @@
- at -NOTE If you make any changes here, you should probably -@
- at -NOTE also verify that modifications performed in -@
- at -NOTE - gnucash-on-windows.git:gnucash.iss don't conflict. -@
+ at NOTE If you make any changes here, you should probably @
+ at NOTE also verify that modifications performed in @
+ at 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}
diff --git a/gnucash/gnome-utils/gschemas/CMakeLists.txt b/gnucash/gnome-utils/gschemas/CMakeLists.txt
index 7deac7e..3275cd3 100644
--- a/gnucash/gnome-utils/gschemas/CMakeLists.txt
+++ b/gnucash/gnome-utils/gschemas/CMakeLists.txt
@@ -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)
\ No newline at end of file
+ org.gnucash.warnings.gschema.xml.in.in)
diff --git a/gnucash/gnome/gschemas/CMakeLists.txt b/gnucash/gnome/gschemas/CMakeLists.txt
index 4e1f417..1337e8b 100644
--- a/gnucash/gnome/gschemas/CMakeLists.txt
+++ b/gnucash/gnome/gschemas/CMakeLists.txt
@@ -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})
diff --git a/gnucash/gnucash-valgrind.in b/gnucash/gnucash-valgrind.in
index a10a874..d62fda0 100644
--- a/gnucash/gnucash-valgrind.in
+++ b/gnucash/gnucash-valgrind.in
@@ -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@ "$@"
diff --git a/gnucash/import-export/aqb/gschemas/CMakeLists.txt b/gnucash/import-export/aqb/gschemas/CMakeLists.txt
index dce9c13..a16fdad 100644
--- a/gnucash/import-export/aqb/gschemas/CMakeLists.txt
+++ b/gnucash/import-export/aqb/gschemas/CMakeLists.txt
@@ -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)
\ No newline at end of file
+ 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)
diff --git a/gnucash/import-export/csv-exp/gschemas/CMakeLists.txt b/gnucash/import-export/csv-exp/gschemas/CMakeLists.txt
index a2e472c..d5cfcf1 100644
--- a/gnucash/import-export/csv-exp/gschemas/CMakeLists.txt
+++ b/gnucash/import-export/csv-exp/gschemas/CMakeLists.txt
@@ -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)
\ No newline at end of file
+SET_DIST_LIST(csv_exp_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.export.csv.gschema.xml.in.in)
diff --git a/gnucash/import-export/csv-imp/gschemas/CMakeLists.txt b/gnucash/import-export/csv-imp/gschemas/CMakeLists.txt
index 066ae60..509ee81 100644
--- a/gnucash/import-export/csv-imp/gschemas/CMakeLists.txt
+++ b/gnucash/import-export/csv-imp/gschemas/CMakeLists.txt
@@ -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)
\ No newline at end of file
+SET_DIST_LIST(csv_import_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.csv.gschema.xml.in.in)
diff --git a/gnucash/import-export/gschemas/CMakeLists.txt b/gnucash/import-export/gschemas/CMakeLists.txt
index faf7c00..f674503 100644
--- a/gnucash/import-export/gschemas/CMakeLists.txt
+++ b/gnucash/import-export/gschemas/CMakeLists.txt
@@ -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)
\ No newline at end of file
+SET_DIST_LIST(generic_import_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.generic.gschema.xml.in.in)
diff --git a/gnucash/import-export/ofx/gschemas/CMakeLists.txt b/gnucash/import-export/ofx/gschemas/CMakeLists.txt
index c48c5b6..ff8a3f9 100644
--- a/gnucash/import-export/ofx/gschemas/CMakeLists.txt
+++ b/gnucash/import-export/ofx/gschemas/CMakeLists.txt
@@ -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)
\ No newline at end of file
+SET_DIST_LIST(ofx_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.ofx.gschema.xml.in.in)
diff --git a/gnucash/import-export/qif-imp/gschemas/CMakeLists.txt b/gnucash/import-export/qif-imp/gschemas/CMakeLists.txt
index dbf8f53..0715558 100644
--- a/gnucash/import-export/qif-imp/gschemas/CMakeLists.txt
+++ b/gnucash/import-export/qif-imp/gschemas/CMakeLists.txt
@@ -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)
\ No newline at end of file
+SET_DIST_LIST(qif_import_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.qif.gschema.xml.in.in)
diff --git a/libgnucash/core-utils/CMakeLists.txt b/libgnucash/core-utils/CMakeLists.txt
index a6f1c7b..80dd76b 100644
--- a/libgnucash/core-utils/CMakeLists.txt
+++ b/libgnucash/core-utils/CMakeLists.txt
@@ -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 ###
diff --git a/libgnucash/core-utils/Makefile.am b/libgnucash/core-utils/Makefile.am
index 51f07fa..f59f7a2 100644
--- a/libgnucash/core-utils/Makefile.am
+++ b/libgnucash/core-utils/Makefile.am
@@ -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 @... at . 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
diff --git a/libgnucash/core-utils/gncla-dir.h.in b/libgnucash/core-utils/gncla-dir.h.in
index a55d90f..d15dce7 100644
--- a/libgnucash/core-utils/gncla-dir.h.in
+++ b/libgnucash/core-utils/gncla-dir.h.in
@@ -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@"
diff --git a/libgnucash/doc/Makefile.am b/libgnucash/doc/Makefile.am
index 4c6124d..2827224 100644
--- a/libgnucash/doc/Makefile.am
+++ b/libgnucash/doc/Makefile.am
@@ -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 @... at . 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 $@
diff --git a/libgnucash/doc/doxygen.cfg.in b/libgnucash/doc/doxygen.cfg.in
index cde836c..8663366 100644
--- a/libgnucash/doc/doxygen.cfg.in
+++ b/libgnucash/doc/doxygen.cfg.in
@@ -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
diff --git a/libgnucash/quotes/CMakeLists.txt b/libgnucash/quotes/CMakeLists.txt
index aa7477e..e42ec9c 100644
--- a/libgnucash/quotes/CMakeLists.txt
+++ b/libgnucash/quotes/CMakeLists.txt
@@ -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})
diff --git a/libgnucash/quotes/Makefile.am b/libgnucash/quotes/Makefile.am
index 5ba58cb..d507eaf 100644
--- a/libgnucash/quotes/Makefile.am
+++ b/libgnucash/quotes/Makefile.am
@@ -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 @... at . 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 $@
diff --git a/libgnucash/quotes/gnc-fq-check.in b/libgnucash/quotes/gnc-fq-check.in
index 48f31e6..6b76829 100755
--- a/libgnucash/quotes/gnc-fq-check.in
+++ b/libgnucash/quotes/gnc-fq-check.in
@@ -1,4 +1,4 @@
-#!@-PERL-@ -w
+#!@PERL@ -w
######################################################################
### gnc-fq-check - check for the presence of Finance::Quote
### From gnc-fq-helper.
diff --git a/libgnucash/quotes/gnc-fq-helper.in b/libgnucash/quotes/gnc-fq-helper.in
index 79d8515..75ce578 100755
--- a/libgnucash/quotes/gnc-fq-helper.in
+++ b/libgnucash/quotes/gnc-fq-helper.in
@@ -1,4 +1,4 @@
-#!@-PERL-@ -w
+#!@PERL@ -w
######################################################################
### gnc-fq-helper - present a scheme interface to Finance::Quote
### Copyright 2001 Rob Browning <rlb at cs.utexas.edu>
diff --git a/libgnucash/quotes/gnc-fq-update.in b/libgnucash/quotes/gnc-fq-update.in
index 2002086..797a6d1 100755
--- a/libgnucash/quotes/gnc-fq-update.in
+++ b/libgnucash/quotes/gnc-fq-update.in
@@ -1,4 +1,4 @@
-#!@-PERL-@ -w
+#!@PERL@ -w
######################################################################
### gnc-fq-update - presents a scheme interface to Finance::Quote
### Copyright 2001 Gnumatic, Inc.
diff --git a/libgnucash/scm/CMakeLists.txt b/libgnucash/scm/CMakeLists.txt
index f11cc81..d79a645 100644
--- a/libgnucash/scm/CMakeLists.txt
+++ b/libgnucash/scm/CMakeLists.txt
@@ -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)
diff --git a/libgnucash/scm/Makefile.am b/libgnucash/scm/Makefile.am
index 2d69f08..5148c1d 100644
--- a/libgnucash/scm/Makefile.am
+++ b/libgnucash/scm/Makefile.am
@@ -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 @... at . 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}
diff --git a/libgnucash/scm/build-config.scm.in b/libgnucash/scm/build-config.scm.in
index 13687ed..f906a33 100644
--- a/libgnucash/scm/build-config.scm.in
+++ b/libgnucash/scm/build-config.scm.in
@@ -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@"))
diff --git a/make-gnucash-potfiles.in b/make-gnucash-potfiles.in
index 6571fe5..feed1f5 100644
--- a/make-gnucash-potfiles.in
+++ b/make-gnucash-potfiles.in
@@ -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 = "";
Summary of changes:
CMakeLists.txt | 1 -
Makefile.am | 8 +---
bindings/python/tests/Makefile.am | 7 +---
bindings/python/tests/runTests.py.in | 2 +-
cmake/CMakeLists.txt | 27 -------------
common/Makefile.am | 1 -
common/cmake_modules/CMakeLists.txt | 4 +-
common/cmake_modules/GncAddGSchemaTargets.cmake | 40 ++++++++++----------
common/cmake_modules/GncConfigure.cmake | 44 ----------------------
doc/Makefile.am | 28 +++++---------
doc/README.build-system | 10 ++---
doc/gnucash.1.in | 2 +-
gnucash/CMakeLists.txt | 32 +++++++++++++---
gnucash/Makefile.am | 8 ++--
gnucash/environment.in | 8 ++--
gnucash/gnome-utils/gschemas/CMakeLists.txt | 4 +-
gnucash/gnome/gschemas/CMakeLists.txt | 7 +---
gnucash/gnucash-valgrind.in | 4 +-
gnucash/import-export/aqb/gschemas/CMakeLists.txt | 7 ++--
.../import-export/csv-exp/gschemas/CMakeLists.txt | 4 +-
.../import-export/csv-imp/gschemas/CMakeLists.txt | 4 +-
gnucash/import-export/gschemas/CMakeLists.txt | 4 +-
gnucash/import-export/ofx/gschemas/CMakeLists.txt | 4 +-
.../import-export/qif-imp/gschemas/CMakeLists.txt | 4 +-
libgnucash/core-utils/CMakeLists.txt | 2 +-
libgnucash/core-utils/Makefile.am | 16 +++-----
libgnucash/core-utils/gncla-dir.h.in | 12 +++---
libgnucash/doc/Makefile.am | 6 +--
libgnucash/doc/doxygen.cfg.in | 8 ++--
libgnucash/quotes/CMakeLists.txt | 25 ++----------
libgnucash/quotes/Makefile.am | 16 +++-----
libgnucash/quotes/gnc-fq-check.in | 2 +-
libgnucash/quotes/gnc-fq-helper.in | 2 +-
libgnucash/quotes/gnc-fq-update.in | 2 +-
libgnucash/scm/CMakeLists.txt | 11 +-----
libgnucash/scm/Makefile.am | 8 +---
libgnucash/scm/build-config.scm.in | 4 +-
make-gnucash-potfiles.in | 10 ++---
38 files changed, 136 insertions(+), 252 deletions(-)
delete mode 100644 common/cmake_modules/GncConfigure.cmake
More information about the gnucash-changes
mailing list