diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.in | 35 | ||||
-rw-r--r-- | archtab/core-linux-eglibc/autoconf | 1 | ||||
-rw-r--r-- | archtab/core-linux-eglibc/kbuild | 2 | ||||
-rw-r--r-- | archtab/cortexa8-linux-eglibc/autoconf | 1 | ||||
-rw-r--r-- | archtab/cortexa8-linux-eglibc/kbuild | 1 | ||||
-rw-r--r-- | archtab/i686-kfreebsd-eglibc/autoconf | 1 | ||||
-rw-r--r-- | archtab/i686-kfreebsd-eglibc/kbuild | 2 | ||||
-rw-r--r-- | archtab/i686-linux-eglibc/autoconf | 1 | ||||
-rw-r--r-- | archtab/i686-linux-eglibc/kbuild | 2 | ||||
-rw-r--r-- | archtab/local.mk | 27 | ||||
-rwxr-xr-x | configure | 14 | ||||
-rw-r--r-- | mkarchtab.in | 79 |
13 files changed, 77 insertions, 90 deletions
@@ -6,7 +6,6 @@ Session.vim # Generated files Makefile -mkarchtab src/*[^.]?? lib/*.sm lib/*/*.sm diff --git a/Makefile.in b/Makefile.in index 3c9f2f7..a83098f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -32,12 +32,13 @@ datadir = @datadir@ mandir = @mandir@ man1dir = @man1dir@ localedir = @localedir@ +pkgdatadir = @pkgdatadir@ +archtabdir = @archtabdir@ libopkbuild_1 = @libopkbuild_1@ DESTDIR = / sh = @sh@ -archtab = @archtab@ pkglibbuildsystemdir = $(pkglibdir)/buildsystem @@ -46,12 +47,14 @@ include $(srcdir)/lib/local.mk include $(srcdir)/lib/buildsystem/local.mk include $(srcdir)/man/local.mk include $(srcdir)/locale/local.mk +include $(srcdir)/archtab/local.mk bin = $(bin_srcs:.sh=) pkglib = $(pkglib_srcs:.sh=.sm) pkglibbuildsystem = $(pkglibbuildsystem_srcs:.sh=.sm) man1 = $(man1_srcs:.1in=.1) locale = $(locale_srcs:.sh=.ms) +archtab = $(archtab_srcs) distdir = $(package_name)-$(package_version) distfiles = \ @@ -67,13 +70,16 @@ distfiles = \ lib/local.mk \ man/local.mk \ locale/local.mk \ + archtab/local.mk \ $(bin_srcs) \ $(pkglib_srcs) \ $(pkglibbuildsystem_srcs) \ $(man1_srcs) \ - $(locale_srcs) + $(locale_srcs) \ + $(archtab_srcs) # FIXME: libopkhelper is deprecated. Migrate code and remove this variable. +# FIXME: archtab is deprecated. Migrate code and remove this variable. script = \ s&@@PACKAGE_NAME@@&$(package_name)&;\ s&@@PACKAGE_VERSION@@&$(package_version)&;\ @@ -81,6 +87,8 @@ script = \ s&@@PKGLIBDIR@@&$(pkglibdir)&;\ s&@@LIBOPKHELPER@@&$(libopkhelper)&;\ s&@@LOCALEDIR@@&$(localedir)&;\ + s&@@ARCHTABDIR@@&$(archtabdir)&;\ + s&@@ARCHTAB@@&$(archtabdir)&;\ s&@@SH@@&$(sh)&; .SUFFIXES: @@ -161,7 +169,7 @@ install-pkglib: install-pkglibbuildsystem: @files='$(pkglibbuildsystem)'; dir='$(pkglibbuildsystemdir)'; \ mode='644'; $(install_cmds) -install-data: all-data install-man1 install-locale +install-data: all-data install-man1 install-locale install-archtab install-man1: @files='$(man1)'; dir='$(man1dir)'; mode='644'; $(install_cmds) install-locale: @@ -174,6 +182,15 @@ install-locale: cp "$${f}" "$(DESTDIR)/$(localedir)/$${ff}"; \ chmod 644 "$(DESTDIR)/$(localedir)/$${ff}"; \ done +install-archtab: + @mkdir -p '$(DESTDIR)/$(archtabdir)' + @set -e; for f in $(archtab); do \ + printf ' INSTALL %s\n' "$${f}"; \ + ff="$$(printf '%s' "$${f}" | sed 's|^[^/]*/||')"; \ + mkdir -p "$(DESTDIR)/$(archtabdir)/$${ff%/?*}"; \ + cp "$(srcdir)/$${f}" "$(DESTDIR)/$(archtabdir)/$${ff}"; \ + chmod 644 "$(DESTDIR)/$(archtabdir)/$${ff}"; \ + done uninstall_cmds = \ set -e; \ @@ -193,7 +210,7 @@ uninstall-pkglibbuildsystem: @files='$(pkglibbuildsystem)'; dir='$(pkglibbuildsystemdir)'; \ $(uninstall_cmds) @rmdir '$(DESTDIR)/$(pkglibbuildsystemdir)' -uninstall-data: uninstall-man1 uninstall-locale +uninstall-data: uninstall-man1 uninstall-locale uninstall-archtab uninstall-man1: @files='$(man1)'; dir='$(man1dir)'; $(uninstall_cmds) uninstall-locale: @@ -202,6 +219,16 @@ uninstall-locale: ff="$$(printf '%s' "$${f}" | sed 's|^[^/]*/||')"; \ rm -f "$(DESTDIR)/$(localedir)/$${ff}"; \ done +uninstall-archtab: + @set -e; for f in $(archtab); do \ + printf ' RM %s\n' "$${f}"; \ + ff="$$(printf '%s' "$${f}" | sed 's|^[^/]*/||')"; \ + rm -f "$(DESTDIR)/$(archtabdir)/$${ff}"; \ + rmdir "$(DESTDIR)/$(archtabdir)/$${ff%/?*}" 2>/dev/null || \ + true; \ + done + @rmdir '$(DESTDIR)/$(archtabdir)' + @rmdir '$(DESTDIR)/$(pkgdatadir)' $(distdir): @mkdir -p '$(distdir)' diff --git a/archtab/core-linux-eglibc/autoconf b/archtab/core-linux-eglibc/autoconf new file mode 100644 index 0000000..21696ec --- /dev/null +++ b/archtab/core-linux-eglibc/autoconf @@ -0,0 +1 @@ +x86_64-unknown-linux-gnu diff --git a/archtab/core-linux-eglibc/kbuild b/archtab/core-linux-eglibc/kbuild new file mode 100644 index 0000000..47e1d07 --- /dev/null +++ b/archtab/core-linux-eglibc/kbuild @@ -0,0 +1,2 @@ +x86_64 +x86 diff --git a/archtab/cortexa8-linux-eglibc/autoconf b/archtab/cortexa8-linux-eglibc/autoconf new file mode 100644 index 0000000..6d9da04 --- /dev/null +++ b/archtab/cortexa8-linux-eglibc/autoconf @@ -0,0 +1 @@ +arm-cortex_a8-linux-gnueabi diff --git a/archtab/cortexa8-linux-eglibc/kbuild b/archtab/cortexa8-linux-eglibc/kbuild new file mode 100644 index 0000000..fb05f39 --- /dev/null +++ b/archtab/cortexa8-linux-eglibc/kbuild @@ -0,0 +1 @@ +arm diff --git a/archtab/i686-kfreebsd-eglibc/autoconf b/archtab/i686-kfreebsd-eglibc/autoconf new file mode 100644 index 0000000..6321049 --- /dev/null +++ b/archtab/i686-kfreebsd-eglibc/autoconf @@ -0,0 +1 @@ +i686-unknown-freebsd9.0 diff --git a/archtab/i686-kfreebsd-eglibc/kbuild b/archtab/i686-kfreebsd-eglibc/kbuild new file mode 100644 index 0000000..541ac4a --- /dev/null +++ b/archtab/i686-kfreebsd-eglibc/kbuild @@ -0,0 +1,2 @@ +i386 +x86 diff --git a/archtab/i686-linux-eglibc/autoconf b/archtab/i686-linux-eglibc/autoconf new file mode 100644 index 0000000..d3d79ee --- /dev/null +++ b/archtab/i686-linux-eglibc/autoconf @@ -0,0 +1 @@ +i686-unknown-linux-gnu diff --git a/archtab/i686-linux-eglibc/kbuild b/archtab/i686-linux-eglibc/kbuild new file mode 100644 index 0000000..541ac4a --- /dev/null +++ b/archtab/i686-linux-eglibc/kbuild @@ -0,0 +1,2 @@ +i386 +x86 diff --git a/archtab/local.mk b/archtab/local.mk new file mode 100644 index 0000000..22f8436 --- /dev/null +++ b/archtab/local.mk @@ -0,0 +1,27 @@ +# opkhelper +# archtab/local.mk +# +# Copyright (C) 2013 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/>. + +archtab_srcs = \ + archtab/core-linux-eglibc/autoconf \ + archtab/core-linux-eglibc/kbuild \ + archtab/i686-linux-eglibc/autoconf \ + archtab/i686-linux-eglibc/kbuild \ + archtab/i686-kfreebsd-eglibc/autoconf \ + archtab/i686-kfreebsd-eglibc/kbuild \ + archtab/cortexa8-linux-eglibc/autoconf \ + archtab/cortexa8-linux-eglibc/kbuild @@ -35,6 +35,8 @@ datadir='${prefix}/share' mandir='${datadir}/man' man1dir='${mandir}/man1' localedir='${datadir}/locale' +pkgdatadir='${datadir}/${package_name}' +archtabdir='${pkgdatadir}/archtab' multiarch_libdir='false' quiet='false' @@ -45,7 +47,6 @@ make ' dep_libs=' libopkbuild.1 -archtab ' long_opts_with_args=' @@ -58,6 +59,8 @@ datadir mandir man1dir localedir +pkgdatadir +archtabdir ' features=" @@ -169,6 +172,10 @@ Installation directories: default: MANDIR/man1 --localedir=LOCALEDIR install locales in LOCALEDIR default: DATADIR/locale + --pkgdatadir=PKGDATADIR install package data in PKGDATADIR + default: DATADIR/${package_name} + --archtabdir=ARCHTABDIR install architecture table entries in ARCHTABDIR + default: PKGDATADIR/archtab Features: --with-multiarch-libdir=BOOL @@ -340,11 +347,6 @@ write_makefiles() _sed_script="${_sed_script}s&@${_var}@&$(eval echo \$\{"${_var}"\})&g;" done sed "${_sed_script}" "${srcdir}/Makefile.in" >'Makefile' - - # New and improved kludge to generate an architecture table for testing. - # TODO: Remove when no longer used. - sed "${_sed_script}" "${srcdir}/mkarchtab.in" >'mkarchtab' - chmod 755 'mkarchtab' } main "${@}" diff --git a/mkarchtab.in b/mkarchtab.in deleted file mode 100644 index b13479d..0000000 --- a/mkarchtab.in +++ /dev/null @@ -1,79 +0,0 @@ -#!@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_64\nx86\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 'i386\nx86\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 'i386\nx86\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' |