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 (GncAddSwigCommand)
INCLUDE (CheckIncludeFiles) INCLUDE (CheckIncludeFiles)
INCLUDE (GncAddSchemeTargets) INCLUDE (GncAddSchemeTargets)
INCLUDE (GncConfigure)
INCLUDE (GncAddGSchemaTargets) INCLUDE (GncAddGSchemaTargets)
INCLUDE (GncAddTest) INCLUDE (GncAddTest)
INCLUDE (MakeDistFiles) INCLUDE (MakeDistFiles)

View File

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

View File

@@ -24,15 +24,10 @@ TESTS_ENVIRONMENT = \
PYTHONPATH=$$PYTHONPATH:$(top_builddir)/common/test-core/.libs \ PYTHONPATH=$$PYTHONPATH:$(top_builddir)/common/test-core/.libs \
$(shell ${abs_top_srcdir}/common/gnc-test-env.pl --noexports ${GNC_TEST_DEPS}) $(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 runTests.py: runTests.py.in ${top_builddir}/config.status Makefile
rm -f $@.tmp rm -f $@.tmp
sed < $< > $@.tmp \ sed < $< > $@.tmp \
-e 's#@-PYTHON-@#${PYTHON}#' -e 's#[@]PYTHON[@]#${PYTHON}#'
mv $@.tmp $@ mv $@.tmp $@
chmod u+x $@ chmod u+x $@

View File

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

View File

@@ -8,31 +8,4 @@ IF (APPLE)
ENDIF(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) 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/MakeDistFiles.cmake \
cmake_modules/MacroAddSourceFileCompileFlags.cmake \ cmake_modules/MacroAddSourceFileCompileFlags.cmake \
cmake_modules/MakeDistCheck.cmake \ cmake_modules/MakeDistCheck.cmake \
cmake_modules/GncConfigure.cmake \
cmake_modules/GncAddSchemeTargets.cmake \ cmake_modules/GncAddSchemeTargets.cmake \
cmake_modules/GncAddGSchemaTargets.cmake \ cmake_modules/GncAddGSchemaTargets.cmake \
cmake_modules/GncFindPkgConfig.cmake \ cmake_modules/GncFindPkgConfig.cmake \

View File

@@ -1,6 +1,6 @@
SET(cmake_FILES GncAddGSchemaTargets.cmake GncAddSchemeTargets.cmake GncAddSwigCommand.cmake GncAddTest.cmake 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) 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_OUTPUTS "")
SET(_gschema_VALIDS "") set(local_depends ${gschema_depends})
SET(_gschema_BUILDS "")
# FIXME: I have no idea of I'm using the right options here for intltool-merge for Windows. # FIXME: I have no idea of I'm using the right options here for intltool-merge for Windows.
SET(INITTOOL_OPTIONS "--no-translations") SET(INITTOOL_OPTIONS "--no-translations")
IF(WIN32) IF(WIN32)
@@ -12,27 +11,22 @@ MACRO(ADD_GSCHEMA_TARGETS _TARGET _gschema_INPUTS)
SET(CMAKE_COMMAND_TMP ${CMAKE_COMMAND} -E env) SET(CMAKE_COMMAND_TMP ${CMAKE_COMMAND} -E env)
ENDIF() ENDIF()
FOREACH(file ${_gschema_INPUTS}) FOREACH(file ${_gschema_INPUTS})
GNC_CONFIGURE2(${file}-target ${file}.in.in ${file}.in) configure_file(${file}.in.in ${file}.in @ONLY)
STRING(REPLACE ".xml" ".valid" file_no_xml ${file})
SET(_OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${file}) set(_OUTPUT_FILE ${DATADIR_BUILD}/glib-2.0/schemas/${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})
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
OUTPUT ${_OUTPUT_FILE} OUTPUT ${_OUTPUT_FILE}
COMMAND ${CMAKE_COMMAND_TMP} COMMAND ${CMAKE_COMMAND_TMP}
LC_ALL=C 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 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${file}.in
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${file}.in.in MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${file}.in.in
) )
ADD_CUSTOM_COMMAND( list(APPEND _gschema_OUTPUTS ${_OUTPUT_FILE})
OUTPUT ${_BUILD_FILE}
COMMAND ${CMAKE_COMMAND} -E copy ${_OUTPUT_FILE} ${_BUILD_FILE} string(REPLACE ".xml" ".valid" file_no_xml ${file})
DEPENDS ${_OUTPUT_FILE} set(_VALID_FILE ${CMAKE_CURRENT_BINARY_DIR}/${file_no_xml})
) list(APPEND _gschema_VALIDS ${_VALID_FILE})
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
OUTPUT ${_VALID_FILE} OUTPUT ${_VALID_FILE}
COMMAND ${CMAKE_COMMAND_TMP} COMMAND ${CMAKE_COMMAND_TMP}
@@ -40,10 +34,18 @@ MACRO(ADD_GSCHEMA_TARGETS _TARGET _gschema_INPUTS)
COMMAND ${CMAKE_COMMAND} -E touch ${_VALID_FILE} COMMAND ${CMAKE_COMMAND} -E touch ${_VALID_FILE}
DEPENDS ${_OUTPUT_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) 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) 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 \ tip_of_the_day.list.in \
CMakeLists.txt CMakeLists.txt
gnucash.1: gnucash.1.in Makefile
rm -f $@.tmp
if BUILDING_FROM_VCS 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` ; \ top_basedir = $(top_builddir)
${SED} < $< > $@.tmp \
-e 's:$${VERSION}:${VERSION}:g' \
-e 's:$${DATE}:'$${GNC_VCS_REV_Y_M}':g'
chmod +x $@.tmp
mv $@.tmp $@
else 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)
${SED} < $< > $@.tmp \
-e 's:$${VERSION}:${VERSION}:g' \
-e 's:$${DATE}:'$${GNC_VCS_REV_Y_M}':g'
chmod +x $@.tmp
mv $@.tmp $@
endif endif
## We borrow guile's convention and use @-...-@ as the substitution gnucash.1: gnucash.1.in Makefile
## brackets here, instead of the usual @...@. This prevents autoconf rm -f $@.tmp
## from substituting the values directly into the left-hand sides of 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` ; \
## the sed substitutions. ${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 tip_of_the_day.list: tip_of_the_day.list.in Makefile
${CC} -E -P -x c -D'N_(x)=x' -o $@.tmp $< ${CC} -E -P -x c -D'N_(x)=x' -o $@.tmp $<
cat -s $@.tmp | ${SED} -e 's/^ *"//' \ cat -s $@.tmp | ${SED} -e 's/^ *"//' \
-e 's/"* *[|] */|/' \ -e 's/"* *[|] */|/' > $@
-e 's:@-GNUCASH_LATEST_STABLE_SERIES-@:${GNUCASH_LATEST_STABLE_SERIES}:g' > $@
rm -f $@.tmp rm -f $@.tmp
if PLATFORM_WIN32 if PLATFORM_WIN32
perl -pi.bak -e 's/" *$$//' $@ 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 src/scm/bootstrap.scm.in which is processed in src/scm/Makefile.in
according to the following rule: 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 bootstrap.scm: bootstrap.scm.in
rm -f $@.tmp rm -f $@.tmp
sed < $@.in > $@.tmp \ sed < $@.in > $@.tmp \
-e 's:@-VERSION-@:${VERSION}:g' \ -e 's:[@]VERSION[@]:${VERSION}:g' \
-e 's:@-GNC_CONFIGDIR-@:${GNC_SHAREDIR}:g' \ -e 's:[@]GNC_CONFIGDIR[@]:${GNC_SHAREDIR}:g' \
-e 's:@-GNC_SHAREDIR-@:${GNC_CONFIGDIR}:g' -e 's:[@]GNC_SHAREDIR[@]:${GNC_CONFIGDIR}:g'
chmod +x $@.tmp chmod +x $@.tmp
mv $@.tmp $@ mv $@.tmp $@

View File

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

View File

@@ -1,5 +1,10 @@
# CMakeLists.txt for gnucash/ # 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 # The subdirectories
ADD_SUBDIRECTORY (gnome) ADD_SUBDIRECTORY (gnome)
ADD_SUBDIRECTORY (gnome-utils) ADD_SUBDIRECTORY (gnome-utils)
@@ -93,7 +98,7 @@ SET(GNUCASH_BIN_INSTALL_NAME "gnucash")
SET(VALGRIND_OUTDIR ${BINDIR_BUILD}) SET(VALGRIND_OUTDIR ${BINDIR_BUILD})
CONFIGURE_FILE(gnucash.rc.in gnucash.rc @ONLY NEWLINE_STYLE WIN32) 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 FILE(COPY ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/gnucash-valgrind
DESTINATION ${VALGRIND_OUTDIR} DESTINATION ${VALGRIND_OUTDIR}
@@ -107,10 +112,9 @@ FILE(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/environment.in ENV_STRINGS_IN)
SET(ENV_STRINGS_LIST "") SET(ENV_STRINGS_LIST "")
FOREACH(line ${ENV_STRINGS_IN}) FOREACH(line ${ENV_STRINGS_IN})
STRING(REGEX REPLACE "@-|-@" "@" line2 "${line}") STRING(REPLACE ";" "\;" line2 "${line}")
STRING(REPLACE ";" "\;" line3 "${line2}") IF(NOT "${line2}" MATCHES "@NOTE")
IF(NOT "${line3}" MATCHES "@NOTE") LIST(APPEND ENV_STRINGS_LIST "${line2}\n")
LIST(APPEND ENV_STRINGS_LIST "${line3}\n")
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
@@ -219,6 +223,24 @@ IF (WIN32)
INSTALL(PROGRAMS ${CMD_FILE} DESTINATION ${CMAKE_INSTALL_BINDIR}) INSTALL(PROGRAMS ${CMD_FILE} DESTINATION ${CMAKE_INSTALL_BINDIR})
ENDIF(WIN32) 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 # The GResource Files are absolute paths but SET_LOCAL_DIST requires
# relative paths. # relative paths.
FOREACH(gres_file ${gresource_files}) 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 gnucash-valgrind: gnucash-valgrind.in ${top_builddir}/config.status Makefile
rm -f $@.tmp rm -f $@.tmp
sed < $< > $@.tmp \ sed < $< > $@.tmp \
-e "s#@-TOP_SRC_DIR-@#${abs_top_srcdir}#g" \ -e "s#[@]TOP_SRC_DIR[@]#${abs_top_srcdir}#g" \
-e "s#@-GNUCASH_BIN_INSTALL_NAME-@#${GNUCASH_BIN_INSTALL_NAME}#g" -e "s#[@]GNUCASH_BIN_INSTALL_NAME[@]#${GNUCASH_BIN_INSTALL_NAME}#g"
mv $@.tmp $@ mv $@.tmp $@
chmod u+x $@ chmod u+x $@
environment: environment.in ${top_builddir}/config.status Makefile environment: environment.in ${top_builddir}/config.status Makefile
rm -f $@.tmp rm -f $@.tmp
sed < $< > $@.tmp \ sed < $< > $@.tmp \
-e '/@-NOTE.*-@/ D' \ -e '/[@]NOTE.*[@]/ D' \
-e "s#@-GUILE_EFFECTIVE_VERSION-@#@GUILE_EFFECTIVE_VERSION@#g" -e "s#[@]GUILE_EFFECTIVE_VERSION[@]#@GUILE_EFFECTIVE_VERSION@#g"
if CUSTOM_GNC_DBD_DIR if CUSTOM_GNC_DBD_DIR
echo 'GNC_DBD_DIR=@GNC_DBD_DIR@' >> $@.tmp echo 'GNC_DBD_DIR=@GNC_DBD_DIR@' >> $@.tmp
endif endif

View File

@@ -1,6 +1,6 @@
@-NOTE If you make any changes here, you should probably -@ @NOTE If you make any changes here, you should probably @
@-NOTE also verify that modifications performed in -@ @NOTE also verify that modifications performed in @
@-NOTE - gnucash-on-windows.git:gnucash.iss don't conflict. -@ @NOTE - gnucash-on-windows.git:gnucash.iss don't conflict. @
# environment # environment
# #
# This configuration file defines a number of environment variables to set/alter # 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 # 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. # 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 # Tell Guile where to find GnuCash specific shared libraries
GNC_LIBRARY_PATH={SYS_LIB};{GNC_LIB} 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) 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 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 org.gnucash.window.pages.gschema.xml
) )
# If you edit one of the above files, you need to rerun cmake. add_gschema_targets("${gnome_GSCHEMA}")
# When we can use CONFIGURE_FILE() instead of GNC_CONFIGURE()
# this issue will go away.
ADD_GSCHEMA_TARGETS(gnome-gschema "${gnome_GSCHEMA}")
SET(gnome_gschema_DIST_local "") SET(gnome_gschema_DIST_local "")
FOREACH(file ${gnome_GSCHEMA}) FOREACH(file ${gnome_GSCHEMA})

View File

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

View File

@@ -1,7 +1,8 @@
IF (WITH_AQBANKING) IF (WITH_AQBANKING)
SET(aqb_GSCHEMA org.gnucash.dialogs.import.hbci.gschema.xml) SET(aqb_GSCHEMA org.gnucash.dialogs.import.hbci.gschema.xml)
ADD_GSCHEMA_TARGETS(aqb-gschema "${aqb_GSCHEMA}")
add_gschema_targets("${aqb_GSCHEMA}")
ENDIF(WITH_AQBANKING) ENDIF(WITH_AQBANKING)
SET_DIST_LIST(aqbanking_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.hbci.gschema.xml.in.in) 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) 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) 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) 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) IF (WITH_OFX)
set(ofx_GSCHEMA org.gnucash.dialogs.import.ofx.gschema.xml) 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) 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) 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(sysconfdir ${CMAKE_INSTALL_FULL_SYSCONFDIR})
SET(localedir "${CMAKE_INSTALL_FULL_DATAROOTDIR}/locale") SET(localedir "${CMAKE_INSTALL_FULL_DATAROOTDIR}/locale")
endif() endif()
GNC_CONFIGURE(gncla-dir.h.in gncla-dir.h) configure_file(gncla-dir.h.in gncla-dir.h)
### Create gnc-version.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 gncla-dir.h: gncla-dir.h.in ${top_builddir}/config.status Makefile
rm -f $@.tmp rm -f $@.tmp
sed < $< > $@.tmp \ sed < $< > $@.tmp \
-e 's#@-DATADIRNAME-@#${DATADIRNAME}#g' \ -e 's#[@]DATADIRNAME[@]#${DATADIRNAME}#g' \
-e 's#@-libdir-@#${libdir}#g' \ -e 's#[@]libdir[@]#${libdir}#g' \
-e 's#@-bindir-@#${bindir}#g' \ -e 's#[@]bindir[@]#${bindir}#g' \
-e 's#@-sysconfdir-@#${sysconfdir}#g' \ -e 's#[@]sysconfdir[@]#${sysconfdir}#g' \
-e 's#@-datadir-@#${datadir}#g' \ -e 's#[@]datadir[@]#${datadir}#g' \
-e 's#@-prefix-@#${prefix}#g' -e 's#[@]prefix[@]#${prefix}#g'
mv $@.tmp $@ 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 gnc-version.h: _gnc-version.h
-if [ ! -f gnc-version.h ]; then cp _gnc-version.h gnc-version.h; fi -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 -cmp -s _gnc-version.h gnc-version.h || cp _gnc-version.h gnc-version.h

View File

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

View File

@@ -50,13 +50,9 @@ maintainer-clean-local:
uninstall-hook: uninstall-hook:
rm -rf ${docdir}/html 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 doxygen.cfg: doxygen.cfg.in Makefile
rm -f $@.tmp rm -f $@.tmp
sed < $< > $@.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 $@ mv $@.tmp $@

View File

@@ -32,7 +32,7 @@ PROJECT_NAME = GnuCash
# This could be handy for archiving the generated documentation or # This could be handy for archiving the generated documentation or
# if some version control system is used. # 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 # 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 # 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 # directories like "/usr/src/myproject". Separate the files or directories
# with spaces. # with spaces.
INPUT = @-top_srcdir-@/libgnucash \ INPUT = @top_srcdir@/libgnucash \
@-top_srcdir-@/libgnucash/engine/ @top_srcdir@/libgnucash/engine/
# This tag can be used to specify the character encoding of the source files # 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 # 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 # contain include files that are not input files but should be processed by
# the preprocessor. # 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 # 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 # 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 "") SET(_BIN_FILES "")
FOREACH(file gnc-fq-check.in gnc-fq-helper.in gnc-fq-update.in gnc-fq-dump) FOREACH(file gnc-fq-check.in gnc-fq-helper.in gnc-fq-update.in gnc-fq-dump)
STRING(REPLACE ".in" "" _OUTPUT_FILE_NAME ${file}) STRING(REPLACE ".in" "" _OUTPUT_FILE_NAME ${file})
GNC_CONFIGURE2(${file}-target ${file} ${_OUTPUT_FILE_NAME}) SET(_ABS_OUTPUT_FILE ${BINDIR_BUILD}/${_OUTPUT_FILE_NAME})
SET(_ABS_OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_OUTPUT_FILE_NAME}) configure_file( ${file} ${_OUTPUT_FILE_NAME} @ONLY)
LIST(APPEND _BIN_FILES ${_ABS_OUTPUT_FILE}) LIST(APPEND _BIN_FILES ${_ABS_OUTPUT_FILE})
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
OUTPUT ${_ABS_OUTPUT_FILE} OUTPUT ${_ABS_OUTPUT_FILE}
APPEND COMMAND ${CMAKE_COMMAND} -D SRC=${CMAKE_CURRENT_BINARY_DIR}/${_OUTPUT_FILE_NAME}
COMMAND ${CMAKE_COMMAND} -D SRC=${_ABS_OUTPUT_FILE}
-D DST=${BINDIR_BUILD} -D DST=${BINDIR_BUILD}
-P ${_TMPDIR}/copy_with_perms.cmake -P ${_TMPDIR}/copy_with_perms.cmake
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_OUTPUT_FILE_NAME}
) )
ENDFOREACH(file) ENDFOREACH(file)
@@ -45,7 +45,7 @@ ENDFOREACH(file)
ADD_CUSTOM_TARGET(quotes-man ALL DEPENDS ${_MAN_FILES}) 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(FILES ${_MAN_FILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
INSTALL(PROGRAMS ${_BIN_FILES} DESTINATION ${CMAKE_INSTALL_BINDIR}) INSTALL(PROGRAMS ${_BIN_FILES} DESTINATION ${CMAKE_INSTALL_BINDIR})

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
#!@-PERL-@ -w #!@PERL@ -w
###################################################################### ######################################################################
### gnc-fq-helper - present a scheme interface to Finance::Quote ### gnc-fq-helper - present a scheme interface to Finance::Quote
### Copyright 2001 Rob Browning <rlb@cs.utexas.edu> ### 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 ### gnc-fq-update - presents a scheme interface to Finance::Quote
### Copyright 2001 Gnumatic, Inc. ### Copyright 2001 Gnumatic, Inc.

View File

@@ -7,16 +7,7 @@ SET (scm_SCHEME_4
xml-generator.scm xml-generator.scm
) )
# We need to replace a couple of variables in build-config.scm. Normally, I configure_file(build-config.scm.in ${BUILD_CONFIG_SCM})
# 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})
SET(GUILE_DEPENDS scm-core-utils scm-gnc-module) SET(GUILE_DEPENDS scm-core-utils scm-gnc-module)

View File

@@ -70,15 +70,11 @@ EXTRA_DIST = \
${SCM_FILES} \ ${SCM_FILES} \
CMakeLists.txt 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 build-config.scm: ${srcdir}/build-config.scm.in Makefile
rm -f $@.tmp rm -f $@.tmp
sed < $< > $@.tmp \ sed < $< > $@.tmp \
-e 's#@-VERSION-@#${VERSION}#' \ -e 's#[@]VERSION[@]#${VERSION}#' \
-e 's#@-GNC_HELPDIR-@#${GNC_HELPDIR}#' -e 's#[@]GNC_HELPDIR[@]#${GNC_HELPDIR}#'
mv $@.tmp $@ mv $@.tmp $@
CLEANFILES = .scm-links ${gncscmmodcache_DATA} ${gncscmcache_DATA} 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 -- ;; Automatically generated defaults (don't use these directly --
;; they're used during actual initialization elsewhere) ;; 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 -*- # -*- perl -*-
# #
# This perl script is used to make po/POTFILES.in, the list # 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! # Note: These are perl regexp patterns, *not* normal shell wildcards!
my @ignorepatterns = ('gw-', 'test', 'experimental', 'python-bindings', 'swig-.*\.c'); my @ignorepatterns = ('gw-', 'test', 'experimental', 'python-bindings', 'swig-.*\.c');
my (@skipped_files, @ignored_files); my (@skipped_files, @ignored_files);
open(IN, "< @-SRCDIR-@/po/POTFILES.skip"); open(IN, "< @SRCDIR@/po/POTFILES.skip");
while (<IN>) { while (<IN>) {
push @skipped_files, $_ unless $_ =~ /^\#/; push @skipped_files, $_ unless $_ =~ /^\#/;
} }
close IN; close IN;
open(IN, "< @-SRCDIR-@/po/POTFILES.ignore"); open(IN, "< @SRCDIR@/po/POTFILES.ignore");
while (<IN>) { while (<IN>) {
push @ignored_files, $_ unless $_ =~ /^\#/; push @ignored_files, $_ unless $_ =~ /^\#/;
} }
@@ -36,7 +36,7 @@ close IN;
# This sort function has been extracted into a separate file (util/elegant-sort.pl) # 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 # 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' \\ find bindings borrowed common libgnucash gnucash -name '*.c' \\
-o -name '*.cpp' -o -name '*.glade' \\ -o -name '*.cpp' -o -name '*.glade' \\
-o -name '*.desktop.in' -o -name '*.keys.in' \\ -o -name '*.desktop.in' -o -name '*.keys.in' \\
@@ -65,7 +65,7 @@ foreach my $file (@possible_files) {
next if $ignores{$path . $name}; next if $ignores{$path . $name};
# Ignore unreadable files, e.g. dangling symlinks # 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 # Force parse type for gsettings files
my $type = ""; my $type = "";