Add new script for setting up p11-kit for a maintainer
authorStef Walter <stefw@gnome.org>
Wed, 3 Apr 2013 08:30:25 +0000 (10:30 +0200)
committerStef Walter <stefw@gnome.org>
Wed, 3 Apr 2013 08:30:25 +0000 (10:30 +0200)
Add win32 cross build, and build out of tree

.gitignore
automaint.sh [new file with mode: 0755]

index ea159a27854e1994fe044a904673eac84fc885f0..2fe4e8bd9c4668d6fcade34b459dd3c0ea3e3f2d 100644 (file)
@@ -50,14 +50,20 @@ stamp-h1
 temp.txt
 test-driver
 
+local
+x86_64-w64-mingw32
+
 /*/tests/test-*
 !/*/tests/test-*.[ch]
 /*/tests/frob-*
 !/*/tests/frob-*.[ch]
 
+/x86_64_w64-mingw32/
+
 /build/m4/*.m4
 /build/coverage
 /build/coverage.info
+/local
 
 /common/tests/hash-test
 
diff --git a/automaint.sh b/automaint.sh
new file mode 100755 (executable)
index 0000000..975556d
--- /dev/null
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+NOCONFIGURE=1 ./autogen.sh
+
+ARGS="--enable-strict --enable-debug"
+CROSS="x86_64-w64-mingw32"
+
+configure()
+(
+       build=$1
+       shift
+
+       pwd=$(pwd)
+       mkdir -p $build
+       cd $build
+       echo "Configuring for: $build" >&2
+       echo $pwd/configure "$@" >&2
+       $pwd/configure "$@"
+)
+
+# Configure the local build. To control which arguments are used create a
+# CONFIG_SITE script as directed in the autoconf documentation:
+# http://www.gnu.org/software/autoconf/manual/autoconf.html#Site-Defaults
+configure ./local --prefix=/usr --enable-doc --enable-coverage $ARGS "$@"
+
+# Configure the cross builds
+for cross in $CROSS; do
+       configure ./$cross --prefix=/opt/$cross --host=$cross $ARGS "$@"
+done
+
+# B
+
+(
+       echo "CROSS = $CROSS"
+
+       for target in all check clean distclean; do
+               echo "$target:"
+               echo '  $(MAKE) -C ./local' $target
+               echo '  @for dir in $(CROSS); do \'
+               echo '          $(MAKE) -C ./$$dir' $target '; \'
+               echo '  done'
+       done
+
+       for target in distcheck memcheck leakcheck install upload-coverage \
+               coverage upload-doc upload-release transifex; do
+               echo "$target:"
+               echo '  $(MAKE) -C ./local' $target
+       done
+
+) > ./makefile