summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2005-01-25 13:11:28 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2005-01-25 13:11:28 +0000
commit2392ec65df730b4db690b7963891533b93103698 (patch)
tree7294c4ee49eb672379878de94a72e087f2423dd1
parentaf7b4c580675334a8c29b079a4db3a9734b8f714 (diff)
downloadmultiarch-utils-2392ec65df730b4db690b7963891533b93103698.tar
multiarch-utils-2392ec65df730b4db690b7963891533b93103698.tar.gz
multiarch-utils-2392ec65df730b4db690b7963891533b93103698.tar.bz2
multiarch-utils-2392ec65df730b4db690b7963891533b93103698.tar.xz
multiarch-utils-2392ec65df730b4db690b7963891533b93103698.zip
%multiarch_{bin,include}dir aliases, better OS independence
-rwxr-xr-xcheck-multiarch-files2
-rw-r--r--macros.multiarch3
-rw-r--r--multiarch-dispatch.h6
-rwxr-xr-xmultiarch-platform6
4 files changed, 14 insertions, 3 deletions
diff --git a/check-multiarch-files b/check-multiarch-files
index 5b556fb..8092426 100755
--- a/check-multiarch-files
+++ b/check-multiarch-files
@@ -17,7 +17,7 @@ while (<STDIN>) {
# File must be located in the usual development directories
-f $_ or next;
/\/usr(\/X11R6)?\/(bin|include)\// or next;
- /\/multiarch-.*-linux\// and next;
+ /\/multiarch-.+-\w+\// and next;
/\/include\/asm/ and next;
my $multiarch = 0;
diff --git a/macros.multiarch b/macros.multiarch
index f4cba2f..9ceaac1 100644
--- a/macros.multiarch
+++ b/macros.multiarch
@@ -1,3 +1,6 @@
+%multiarch_bindir %{_bindir}/multiarch-%{_arch}-%{_target_os}
+%multiarch_includedir %{_includedir}/multiarch-%{_arch}-%{_target_os}
+
%multiarch_distro 1020
%multiarch_binaries() \
diff --git a/multiarch-dispatch.h b/multiarch-dispatch.h
index 75f6a50..215cff8 100644
--- a/multiarch-dispatch.h
+++ b/multiarch-dispatch.h
@@ -13,7 +13,10 @@
#endif
/* Dispatch arch dependent header */
-#define _MULTIARCH_MAKE_HEADER(arch,header) <multiarch-arch-linux/header>
+#if defined(__linux__)
+#define _MULTIARCH_OS linux
+#endif
+#define _MULTIARCH_MAKE_HEADER(arch,header) <multiarch-arch-_MULTIARCH_OS/header>
#if defined(__x86_64__)
#include _MULTIARCH_MAKE_HEADER(x86_64,_MULTIARCH_HEADER)
#elif defined(__i386__)
@@ -36,6 +39,7 @@
#include _MULTIARCH_MAKE_HEADER(alpha,_MULTIARCH_HEADER)
#endif
#undef _MULTIARCH_MAKE_HEADER
+#undef _MULTIARCH_OS
#undef _MULTIARCH_HEADER
/* Redefine built-ins */
diff --git a/multiarch-platform b/multiarch-platform
index 8cf6038..e9e2da5 100755
--- a/multiarch-platform
+++ b/multiarch-platform
@@ -3,4 +3,8 @@ arch=`uname -m`
case $arch in
i?86) arch=i386;;
esac
-echo multiarch-$arch-linux
+os=`uname -s`
+case $os in
+Linux*) os=linux;;
+esac
+echo multiarch-$arch-$os