diff options
-rw-r--r-- | Makefile.am | 20 | ||||
-rw-r--r-- | README.rst | 4 | ||||
-rw-r--r-- | configure-post.in | 3 |
3 files changed, 20 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am index 2608842c..e8916cc7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -232,20 +232,30 @@ installcheck-local: done endif +# Be strict about running 'syncevolution' only when not doing +# cross-compilation: in that case, if running 'syncevolution' fails, +# abort the build process. Otherwise proceed with the fallback below, +# which is to keep the "see --sync/source-property ?" placeholders in +# the README. +if COND_CROSS_COMPILING +RUN_SYNCEVOLUTION_CHECK=if ($$?) { return ""; } else { return $$buffer; } +else +RUN_SYNCEVOLUTION_CHECK=die if $$?; return $$buffer; +endif # patch README.rst properties on-the-fly README.patched.rst: README.rst src/syncevolution perl -e '$$syncfound=0; $$sourcefound=0; $$res=0;' \ - -e 'sub run { $$cmd = shift; $$buffer = `$$cmd`; die if $$?; return $$buffer; }' \ + -e 'sub run { $$cmd = shift; $$buffer = `$$cmd`; $(RUN_SYNCEVOLUTION_CHECK) }' \ -e 'while (<>) {' \ -e 's/^:Version: .*/:Version: $(VERSION)/;' \ -e 's/:Date: .*/":Date: " . `date +%Y-%m-%d`/e;' \ - -e 'if (s;<<insert sync-property>>\n;run("src/syncevolution --daemon=no --sync-property ?");e) { $$syncfound=1; }' \ - -e 'if (s;<<insert source-property>>\n;run("src/syncevolution --daemon=no --source-property ?");e) { $$sourcefound=1; }' \ + -e 'if (s;(<< see "syncevolution --sync-property ." >>\n);run("src/syncevolution --daemon=no --sync-property ?") || $$1;e) { $$syncfound=1; }' \ + -e 'if (s;(<< see "syncevolution --source-property ." >>\n);run("src/syncevolution --daemon=no --source-property ?") || $$1;e) { $$sourcefound=1; }' \ -e 'print;' \ -e '}' \ - -e 'die "<<insert sync-property>> not in README.rst?!" unless $$syncfound;' \ - -e 'die "<<insert source-property>> not in README.rst?!" unless $$sourcefound;' \ + -e 'die "<<sync-property>> tag not in README.rst?!" unless $$syncfound;' \ + -e 'die "<<source-property>> tag not in README.rst?!" unless $$sourcefound;' \ -e 'exit $$res;' \ $< >$@ CLEANFILES += README.patched.rst @@ -662,11 +662,11 @@ defined, which is marked with the word `required`. Sync properties --------------- -<<insert sync-property>> +<< see "syncevolution --sync-property ?" >> Source properties ----------------- -<<insert source-property>> +<< see "syncevolution --source-property ?" >> EXAMPLES diff --git a/configure-post.in b/configure-post.in index c51ab4b7..c8b77f53 100644 --- a/configure-post.in +++ b/configure-post.in @@ -158,6 +158,9 @@ SYNCEVOLUTION_LIBS=`pwd`/src/syncevo/libsyncevolution.la AC_SUBST(SYNCEVOLUTION_CFLAGS) AC_SUBST(SYNCEVOLUTION_LIBS) +# invoking syncevolution binary is allowed to fail when cross-compiling +AM_CONDITIONAL([COND_CROSS_COMPILING], [test "$cross_compiling" = "yes"]) + AC_CONFIG_FILES(Makefile src/dbus/interfaces/Makefile src/gdbus/Makefile src/dbus/Makefile src/dbus/glib/Makefile src/Makefile src/syncevo/Makefile src/syncevo/syncevolution.pc src/syncevo/configs/Makefile src/synthesis-includes/Makefile src/gtk-ui/Makefile po/Makefile.in test/Makefile src/dbus/glib/syncevo-dbus.pc) AC_OUTPUT |