diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2011-10-24 20:11:08 +0200 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2011-10-24 20:11:08 +0200 |
commit | 4db59035f3be86dde60c201d4288b952c4512ae1 (patch) | |
tree | 3315cf765f48ba925d0630af3a92af1a5d5b9be6 /Makefile.am | |
parent | 16f369724e2b09020980eea39b21b51ef047bbca (diff) | |
parent | 774a9f26d8e2adfd3e4851e149302a2fe2976de8 (diff) |
Merge branch 'syncevolution-1-2-branch'
Conflicts:
Makefile.am
Conflict due to $(AM_V_GEN) introduced as part of non-recursive
Automake.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am index 5de1e225..bfb7304d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -238,24 +238,39 @@ toplevel_so_check: done endif -# patch README.rst properties on-the-fly with sed expressions -PATCH_README = -e "s/^:Version: .*/:Version: $(VERSION)/" -e "s/:Date: .*/:Date: `date +%Y-%m-%d`/" +# patch README.rst properties on-the-fly +README.patched.rst: README.rst src/syncevolution + $(AM_V_GEN)perl -e '$$syncfound=0; $$sourcefound=0; $$res=0;' \ + -e 'sub run { $$cmd = shift; $$buffer = `$$cmd`; die if $$?; return $$buffer; }' \ + -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 '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 'exit $$res;' \ + $< >$@ +CLEANFILES += README.patched.rst # produce man pages -syncevolution.1: README.rst - $(AM_V_GEN)sed $(PATCH_README) $< | $(RST2MAN) --exit-status=3 - >$@ +syncevolution.1: README.patched.rst + $(AM_V_GEN)$(RST2MAN) --exit-status=3 $< >$@ CLEANFILES += syncevolution.1 # README is the traditional name in the distribution, # continue using it instead of README.rst. -README: README.rst - $(AM_V_GEN)sed $(PATCH_README) $< >$@ +# TODO: replace some of the RST syntax +README: README.patched.rst + $(AM_V_GEN)cp $< $@ CLEANFILES += README # The README.html is also used on syncevolution.org as "Usage" page, # therefore we must use <h3> headers and lower to fit into the page. -README.html: README.rst - $(AM_V_GEN)sed $(PATCH_README) $< | $(RST2HTML) --initial-header-level=3 --exit-status=3 - >$@ +README.html: README.patched.rst + $(AM_V_GEN)$(RST2HTML) --initial-header-level=3 --exit-status=3 $< >$@ CLEANFILES += README.html .PHONY: $(all_phonies) ; |