diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2018-03-27 09:53:42 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2018-03-27 09:53:42 +0900 |
commit | efc4769339d42a4a399c040c146cf4a29c02ea4f (patch) | |
tree | 62f6120bef46fc436a0b28c0151d2bbf45794fa5 /doc | |
parent | 157130befaacfcc417ddfc98d8f0238f6756b2cc (diff) | |
download | libgpg-error-efc4769339d42a4a399c040c146cf4a29c02ea4f.tar.gz |
doc: Support cross compilation for yat2m.
* configure.ac (HAVE_YAT2M): New.
* doc/Makefile.am [CROSS_COMPILING]: Supported.
--
Makefile portability is also improved.
Fixes-commit: 4dc6d4d2067c726cdb13593bf151637319ff65e6
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Makefile.am | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am index 328089a..d1b494d 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -37,15 +37,32 @@ myman_pages = gpg-error-config.1 man_MANS = $(myman_pages) +if HAVE_YAT2M +YAT2M_CMD = $(YAT2M) +YAT2M_DEP = $(YAT2M)$(EXEEXT) +else +if CROSS_COMPILING +YAT2M_CMD = ./yat2m-for-build +YAT2M_DEP = yat2m-for-build$(EXEEXT) +CLEANFILES += yat2m-for-build$(EXEEXT) + +yat2m-for-build$(EXEEXT): yat2m.c + $(CC_FOR_BUILD) -o $@ $(srcdir)/yat2m.c +else +YAT2M_CMD = ./yat2m +YAT2M_DEP = yat2m$(EXEEXT) +endif +endif + yat2m-stamp: $(myman_sources) @rm -f yat2m-stamp.tmp @touch yat2m-stamp.tmp for file in $(myman_sources) ; do \ - $(YAT2M) $(YAT2M_OPTIONS) --store \ + $(YAT2M_CMD) $(YAT2M_OPTIONS) --store \ `test -f '$$file' || echo '$(srcdir)/'`$$file ; done @mv -f yat2m-stamp.tmp $@ -yat2m-stamp: $(YAT2M) +yat2m-stamp: $(YAT2M_DEP) $(myman_pages) : yat2m-stamp @if test -f $@; then :; else \ |