From: Pietro Cerutti Date: Thu, 19 Oct 2017 12:28:00 +0000 (+0000) Subject: Use host compiler to build the documentation X-Git-Tag: neomutt-20171027~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1964f3990f8dc965296e85fd4fe3a1fa6b22be70;p=neomutt Use host compiler to build the documentation Issue #870 --- diff --git a/Makefile.autosetup b/Makefile.autosetup index 9fc445ece..e25eaab13 100644 --- a/Makefile.autosetup +++ b/Makefile.autosetup @@ -7,6 +7,7 @@ PACKAGE_VERSION=@PACKAGE_VERSION@ PWD= @PWD@ AR= @AR@ CC= @CC@ +CC_FOR_BUILD= @CC_FOR_BUILD@ CPP= @CPP@ CFLAGS= @CPPFLAGS@ @CFLAGS@ -I. -I@top_srcdir@ -Wall $(EXTRA_CFLAGS) LDFLAGS= @LDFLAGS@ $(EXTRA_LDFLAGS) diff --git a/auto.def b/auto.def index 39db97c95..74e8ffc3d 100644 --- a/auto.def +++ b/auto.def @@ -838,6 +838,7 @@ set str_rep { # Use ccache - don't do it earlier than here if {[get-define CCACHE] ne {none}} { define CC "[get-define CCACHE] [get-define CC]" + define CC_FOR_BUILD "[get-define CCACHE] [get-define CC_FOR_BUILD]" } ############################################################################### diff --git a/doc/Makefile.autosetup b/doc/Makefile.autosetup index 93b8b8f74..8d63c0133 100644 --- a/doc/Makefile.autosetup +++ b/doc/Makefile.autosetup @@ -1,4 +1,7 @@ -MAKEDOC_CPP = $(CPP) $(CPPFLAGS) -D_MAKEDOC -C -I. +MAKEDOC_CPP = $(CC_FOR_BUILD) $(CPPFLAGS) -D_MAKEDOC -E -C -I. + +doc/makedoc$(EXEEXT): doc/makedoc.c + $(CC_FOR_BUILD) $(CPPFLAGS) $(CFLAGS) -o $@ doc/makedoc.c doc/neomuttrc: $(SRCDIR)/init.h doc/makedoc$(EXEEXT) $(SRCDIR)/doc/neomuttrc.head sed -e 's,@docdir@,$(docdir),' $(SRCDIR)/doc/neomuttrc.head \