]> granicus.if.org Git - strace/commitdiff
2004-10-19 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Tue, 19 Oct 2004 23:23:34 +0000 (23:23 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 19 Oct 2004 23:23:34 +0000 (23:23 +0000)
* debian/rules (DEB_BUILD_GNU_TYPE, CONFIG_OPTS): New variables.
[$(DEB_HOST_GNU_TYPE) == s390-linux] (build64, HOST64, CC64): Set them.
(build/Makefile): Use $(CONFIG_OPTS).
(build64/Makefile): Pass --host as well as --build.
From Steve Langasek <vorlon@debian.org>.
Fixes Debian bug #271500.

debian/rules

index 17624305046280c732ab6020930d33736e46dd64..633a5a60e0a4ddd6006f07e402ce5127ba292999 100755 (executable)
@@ -3,6 +3,7 @@
 # Debian package information
 package                = strace
 
+DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
 ifeq ($(DEB_HOST_GNU_TYPE),sparc-linux)
@@ -11,10 +12,22 @@ ifeq ($(DEB_HOST_GNU_TYPE),sparc-linux)
   CC64 = gcc -m64
 endif
 
+ifeq ($(DEB_HOST_GNU_TYPE),s390-linux)
+  build64 = yes
+  HOST64 = s390x-linux
+  CC64 = gcc -m64
+endif
+
 ifeq ($(build64),yes)
    extra_build_targets += stamp-build64
 endif
 
+ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+  CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE)
+else
+  CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+endif
+
 all build: stamp-build
 
 stamp-%: %/Makefile
@@ -23,11 +36,11 @@ stamp-%: %/Makefile
 
 build/Makefile:
        mkdir -p $(@D)
-       cd $(@D); sh ../configure --prefix=/usr
+       cd $(@D); sh ../configure --prefix=/usr $(CONFIG_OPTS)
 
 build64/Makefile:
        mkdir -p $(@D)
-       cd $(@D); CC="$(CC64)" sh ../configure --prefix=/usr --build=$(HOST64)
+       cd $(@D); CC="$(CC64)" sh ../configure --prefix=/usr --build=$(DEB_BUILD_GNU_TYPE) --host=$(HOST64)
 
 clean:
        rm -rf debian/tmp debian/substvars debian/files