The swig wrappers don't really depend on git (but rather on swig) and there can be
situations the builder wants to generate the wrappers also from a tar ball.
- add simple target called 'pot' so translators can run 'make pot'
- make gnucash.pot depend on all files with translatable strings. So whenever
one of these files is changed the potfile will automatically be regenerated
(if the current target depends on it, like 'pot' or 'dist')
Note the default target (make without anything) does not depend on gnucash.pot
so the potfile will not automatically be (re)generated when building that target.
- the two dist_add_... macros now both take a list of file names
as argument so more files can be added at once to the dist tarball.
- dist_add_generated now creates the right target by itself. There's
no need to pass one any more
- make the swig generated *.py module files explicit output files
- change a couple of custom_targets into custom_commands. The only
reason they were defined as targets was to ensure they got built
before the dist tarball. This is now properly handled by the
dist_add_... macros.
- correctly handle dependency on swig-runtime.h (using OBJECT_DEPENDS
was not the way to do it according to that property's help page)
cmake with unix makefiles fails to resolve dist dependencies
added from COPY_FROM_BUILD if these dependencies aren't built yet.
This commit replaces the COPY_FROM_BUILD based logic with two new functions
'dist_add_configured' and 'dist_add_generated' to indicate which files should
be included in the dist tarball. The latter also adds a target level dependency
to the dist tarball custom command. Hence the former should
be used for files that get generated during a cmake run while the latter
should be used for files generated as the result of a 'make/ninja-build' run
(like files for which an add_custom_command rule exists).
Note: this commit also temporarily disables the dist target when building
from a tarball (and hence it won't be tested in distcheck either). This
will be handled in a future commit.
This includes removal of the now unused make-gnucash-potfiles.in,
checking for CMakeLists.txt rather than Makefile.am in gnc-vcs-info,
upating the HACKING file,
and generally updating references to autotools.
I have kept "Makefile.*" exclude patterns in our CMakeLists.txt files
because they may still be lingering in the source directory from
previous autogen.sh runs. At some point these should probably be
removed as well still, together with the gitignore references to them.
Rsovled conflicts:
po/es.po
- all conflicts related to goffice strings were resolved in favor or the goffice translation
- all other conflicts were resolved in favor of the TP po file
Resolved conflicts:
gnucash/gnome-search/dialog-search.c
gnucash/gnome-utils/gnc-splash.c
gnucash/import-export/aqb/gnc-plugin-aqbanking.c
gnucash/import-export/import-account-matcher.c
po/de.po
src/report/standard-reports/budget-barchart.scm
src/report/standard-reports/budget.scm
Note the de.po conflict was resolved by dropping all changes
and merging the file again with gnucash.pot (generated after
the merge but before committing).
Resolved conflicts:
po/de.po
Note: it took several attempts to get this merge right. In the end I used
git mergetool (with kdiff3 as backend), then chose to take the remote end
(C in kdiff3) for all changes (conflicting or not) and then went back to
the goffice strings and changed each resolved conflict in the goffice strings
to the HEAD version (B in kdiff3). This worked because both Mechtilde's po
file and the one in unstable were merged against the same po file and I
was only interested in overriding goffice translations where Mechtilde's
translation differed from the one imported before by script. And even then
I had one more error to fix in line 430 (where msgstring appeared on two
consecutive rows). I'm mainly adding this info a reference in case we
see similar merge conflicts from future translations.
Since Account.c is now Account.cpp, the function signatures look a bit
different internally. The tests rely on function signatures in error
messages. Instead of trying to figure out what the exact
function signature might be, I use a substring matching strategy to
ensure that the correct error was issued.
I.e., remove the shell invocation and with it the need to set the shebang.
Surprisingly this required some build-system modifications particularly
for cmake in order to correctly set the environment.
This effectively replaces the use of GNUCASH_BUILD_DATE with GNUCASH_SCM_REV_DATE.
The latter is extracted from the current commit if building from some kind of vcs
(currently only works correctly for svn and git). The info extracted while building
from vcs is then also added to the dist tarball so it's available when building
from tarball as well (via the file libgnucash/core-utils/gnc-vcs-info.h).
The same date is also used to set the date in gnucash' man page document.
A practical detail: I have changed the substitution variables in the man page template
from @- -@ to ${} so we could leverage CONFIGURE_FILE in cmake. The necessary
related adjustments have also been made to Makefile.am's substitution rules.
intltool-update should be run from the build directory, not the source directory.
If run from the source directory it will omit glade messages that have a context attribute
so all msgids with a msgctxt comment would be missing.
While it doesn't fully fix the python bindings, gnucash
now at least doesn't segfault on start up if built with
python bindings enabled. There are still issues to fix though.