summaryrefslogtreecommitdiffstats
path: root/mkarchtab.in
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-11-07 20:00:42 (EST)
committer P. J. McDermott <pjm@nac.net>2012-11-07 20:00:42 (EST)
commitbcc1d7910f668b76c53606df892b27b39522fdaa (patch)
tree92c60a8e7d6b1b37b179222ba4c406790f4985da /mkarchtab.in
parente77b32854807af6ce6b532996380d2a6a09d1ba3 (diff)
parent02ff44fe4d963f290347568833846b7d8b5db854 (diff)
Merge branch 'feature/build-sys-arches'.
Diffstat (limited to 'mkarchtab.in')
-rw-r--r--mkarchtab.in79
1 files changed, 79 insertions, 0 deletions
diff --git a/mkarchtab.in b/mkarchtab.in
new file mode 100644
index 0000000..a31a8e3
--- /dev/null
+++ b/mkarchtab.in
@@ -0,0 +1,79 @@
+#!@make@ -f
+# opkhelper
+# mkarchtab.in
+# Input makefile to generate an architecture table for testing.
+#
+# Copyright (C) 2012 Patrick "P. J." McDermott
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+package_name = @package_name@
+package_version= @package_version@
+
+srcdir = @srcdir@
+prefix = @prefix@
+bindir = @bindir@
+libdir = @libdir@
+datadir = @datadir@
+mandir = @mandir@
+libopkhelper = @libopkhelper@
+libopkbuild_1 = @libopkbuild_1@
+
+DESTDIR = /
+
+archtab = @archtab@
+
+# New and improved kludge to generate an architecture table for testing.
+# Now 10% less horrible!
+default:
+ @printf 'Generating build system architecture data...\n'
+ @mkdir -p '${archtab}' || \
+ { printf 'Error: Cannot make architecture table directory\n'; exit 1;}
+ @# core-linux-eglibc
+ @mkdir -p '${archtab}/core-linux-eglibc' || \
+ { printf 'Error: Cannot make architecture table directory\n'; exit 1;}
+ @printf 'x86_64-unknown-linux-gnu\n' \
+ >'${archtab}/core-linux-eglibc/autoconf' || \
+ { printf 'Error: Cannot write architecture data\n'; exit 1;}
+ @printf 'x86\ni386\n' \
+ >'${archtab}/core-linux-eglibc/kbuild' || \
+ { printf 'Error: Cannot write architecture data\n'; exit 1;}
+ @# i686-linux-eglibc
+ @mkdir -p '${archtab}/i686-linux-eglibc' || \
+ { printf 'Error: Cannot make architecture table directory\n'; exit 1;}
+ @printf 'i686-unknown-linux-gnu\n' \
+ >'${archtab}/i686-linux-eglibc/autoconf' || \
+ { printf 'Error: Cannot write architecture data\n'; exit 1;}
+ @printf 'x86\ni386\n' \
+ >'${archtab}/i686-linux-eglibc/kbuild' || \
+ { printf 'Error: Cannot write architecture data\n'; exit 1;}
+ @# i686-kfreebsd-eglibc
+ @mkdir -p '${archtab}/i686-kfreebsd-eglibc' || \
+ { printf 'Error: Cannot make architecture table directory\n'; exit 1;}
+ @printf 'i686-unknown-freebsd9.0\n' \
+ >'${archtab}/i686-kfreebsd-eglibc/autoconf' || \
+ { printf 'Error: Cannot write architecture data\n'; exit 1;}
+ @printf 'x86\ni386\n' \
+ >'${archtab}/i686-kfreebsd-eglibc/kbuild' || \
+ { printf 'Error: Cannot write architecture data\n'; exit 1;}
+ @# cortexa8-linux-eglibc
+ @mkdir -p '${archtab}/cortexa8-linux-eglibc' || \
+ { printf 'Error: Cannot make architecture table directory\n'; exit 1;}
+ @printf 'arm-cortex_a8-linux-gnueabi\n' \
+ >'${archtab}/cortexa8-linux-eglibc/autoconf' || \
+ { printf 'Error: Cannot write architecture data\n'; exit 1;}
+ @printf 'arm\n' \
+ >'${archtab}/cortexa8-linux-eglibc/kbuild' || \
+ { printf 'Error: Cannot write architecture data\n'; exit 1;}
+ @printf 'Done!\n'