Просмотр исходного кода

dpkg-architecture(1): Fix debian/rules usage documentation

Only set the configure flags if they have not been previously set.
Call the configure script with a path prefix. Pass --build/--host or
--build to configure depending on whether we are cross-compiling.
Guillem Jover лет назад: 13
Родитель
Сommit
81d048b4cc
2 измененных файлов с 12 добавлено и 4 удалено
  1. 1 0
      debian/changelog
  2. 11 4
      man/dpkg-architecture.1

+ 1 - 0
debian/changelog

@@ -24,6 +24,7 @@ dpkg (1.17.0) UNRELEASED; urgency=low
     - Unify command-line options into a single OPTIONS section.
     - Mark programs, variables, fields and command-line options in bold.
     - Fold dpkg-architecture(1) DEBIAN/RULES section into EXAMPLES.
+    - Fix dpkg-architecture(1) debian/rules usage documentation.
   * Use colon instead of dot for user:group in dpkg debug output.
   * Remove support for obsolete DM-Upload-Allowed from Dpkg::Vendor::Debian.
   * Fix update-alternatives to use the current alternative link as the first

+ 11 - 4
man/dpkg-architecture.1

@@ -215,10 +215,17 @@ Retrieving the GNU system type and forwarding it to ./configure:
 .PP
 .RS 4
 .nf
-DEB_BUILD_GNU_TYPE := $(shell dpkg\-architecture \-qDEB_BUILD_GNU_TYPE)
-DEB_HOST_GNU_TYPE := $(shell dpkg\-architecture \-qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg\-architecture \-qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg\-architecture \-qDEB_HOST_GNU_TYPE)
 [...]
-configure \-\-build=$(DEB_BUILD_GNU_TYPE) \-\-host=$(DEB_HOST_GNU_TYPE)
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+  confflags += \-\-build=$(DEB_HOST_GNU_TYPE)
+else
+  confflags += \-\-build=$(DEB_BUILD_GNU_TYPE) \\
+               \-\-host=$(DEB_HOST_GNU_TYPE)
+endif
+[...]
+\&./configure $(confflags)
 .fi
 .RE
 .PP
@@ -226,7 +233,7 @@ Doing something only for a specific architecture:
 .PP
 .RS 4
 .nf
-DEB_HOST_ARCH := $(shell dpkg\-architecture \-qDEB_HOST_ARCH)
+DEB_HOST_ARCH ?= $(shell dpkg\-architecture \-qDEB_HOST_ARCH)
 
 ifeq ($(DEB_HOST_ARCH),alpha)
   [...]