From: Yann Dirson Date: Sun, 9 Feb 2014 14:21:05 +0000 (+0100) Subject: Teach autogen.sh to generate *-pattern.inc, to allow easy crossbuild from git tree. X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=586cbf3d7b87b8bae3154695cc1f6dda396cca7e;p=gnushogi.git 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. --- 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)