Rake task to build website including source dist and binaries.
diff --git a/.gitignore b/.gitignore
index 96cd289..06c87dd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,6 @@
*.o
*~
-build
jq
jq.1
@@ -22,4 +21,5 @@
config.status
autom4te.cache
config.h
-Makefile
\ No newline at end of file
+Makefile
+jq-*.tar.gz
\ No newline at end of file
diff --git a/build/.gitignore b/build/.gitignore
new file mode 100644
index 0000000..f59ec20
--- /dev/null
+++ b/build/.gitignore
@@ -0,0 +1 @@
+*
\ No newline at end of file
diff --git a/docs/Rakefile b/docs/Rakefile
index 6ef83d0..4ca5752 100644
--- a/docs/Rakefile
+++ b/docs/Rakefile
@@ -75,7 +75,7 @@
$BINARIES.each do |name, args|
file "../build/#{name}" do |t|
- sh "MAKEFLAGS=-j4 ../build/compile #{name} #{args}"
+ sh "MAKEFLAGS=-j4 ../scripts/crosscompile #{name} #{args}"
end
task :binaries => ["../build/#{name}"]
end
@@ -139,7 +139,7 @@
directory "output/download/source"
task :tarball => ["output/download/source"] do
- sh "cd ..; make dist"
+ sh "cd ..; ./configure && make dist && make distclean"
sh "cp ../jq-*.tar.gz output/download/source"
end
diff --git a/build/compile b/scripts/crosscompile
similarity index 95%
rename from build/compile
rename to scripts/crosscompile
index 7cfa94d..7ee086b 100755
--- a/build/compile
+++ b/scripts/crosscompile
@@ -11,7 +11,7 @@
# e.g. $0 win32 --host=i686-w64-mingw32
set -e
-cd `dirname "$0"`
+cd `dirname "$0"`/../build
plat="$1"
[ -z "$plat" ] && exit 1