From 586cbf3d7b87b8bae3154695cc1f6dda396cca7e Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Sun, 9 Feb 2014 15:21:05 +0100 Subject: [PATCH] Teach autogen.sh to generate *-pattern.inc, to allow easy crossbuild from git tree. Since this requires to build pat2inc on the host, we do a quick configure and make, and cleanup afterwards. Proper support from automake for native tools in a cross setup would be the correct way do to things, but we don't have it yet. --- autogen.sh | 4 ++++ gnushogi/Makefile.am | 4 ++++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/autogen.sh b/autogen.sh index 5735df7..5b88c9f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,9 @@ #!/bin/bash autoreconf -f -i +# generate files that cannot be made in a cross-build setup yet +./configure +make -C gnushogi gnushogi_bootstrap +make distclean echo "You may now run ./configure" diff --git a/gnushogi/Makefile.am b/gnushogi/Makefile.am index 8c64111..acfac5c 100644 --- a/gnushogi/Makefile.am +++ b/gnushogi/Makefile.am @@ -122,6 +122,10 @@ gnushogi-pattern.inc: $(top_srcdir)/misc/gnushogi.pat pat2inc$(EXEEXT) gnuminishogi-pattern.inc: $(top_srcdir)/misc/gnuminishogi.pat pat2inc$(EXEEXT) ./pat2inc $< $@ +# just get *.inc generated +gnushogi_bootstrap: $(BUILTHEADERS) + : + # optional support for prebuilding a bbk gnushogi.bbk: $(top_srcdir)/misc/gnushogi.tbk gnushogi$(EXEEXT) -- 1.7.0.4