From 2e97839d6b6bee572f05265a8cd87400155833e5 Mon Sep 17 00:00:00 2001 From: Angus Lees Date: Wed, 15 Apr 2015 18:08:46 +1000 Subject: [PATCH] override_dh_install: Use make conditionals rather than shell Either make syntax or shell syntax is fine, but the use of $(BUILD_DOCS) needs to be consistent with that in override_dh_auto_build-indep. In particular, make's $(if ...) considers '0' to be true (empty string is false). This change switches to make syntax (empty string is false), which is a bit more surprising but has the advantage that we can drop all the "; \" nonsense at end of line (and gain `set -e` behaviour). --- debian/rules | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/debian/rules b/debian/rules index 065479ced7..4418f6c3ab 100755 --- a/debian/rules +++ b/debian/rules @@ -61,7 +61,7 @@ endif BUILD_DOCS = 1 ifneq (,$(findstring nodoc,$(DEB_BUILD_PROFILES))) DEB_CONFIGURE_EXTRA_FLAGS += --disable-docs - BUILD_DOCS = 0 + BUILD_DOCS = endif ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) @@ -122,12 +122,11 @@ override_dh_install: # Brute force to remove privacy-breach-logo lintian warning. # We could have updated the upstream sources but it would complexify # the rebase - if test "$(BUILD_DOCS)" = "1"; then \ - sed -i '/rel="shortcut icon" href="http:\/\/www.rust-lang.org\/favicon.ico"/d' `find $(DEB_DESTDIR) -iname '*.html'`; \ - rm -f `find $(DEB_DESTDIR) -iname '*.html' -empty` $(DEB_DESTDIR)/usr/share/doc/rust-doc/html/.lock; \ - cd $(DEB_DESTDIR)/usr/lib/*/rust/*/share/doc/rust/html/ && rm -f jquery.js && \ - ln -s /usr/share/javascript/jquery/jquery.js; \ - fi +ifneq (,$(BUILD_DOCS)) + sed -i '/rel="shortcut icon" href="http:\/\/www.rust-lang.org\/favicon.ico"/d' `find $(DEB_DESTDIR) -iname '*.html'` + rm -f `find $(DEB_DESTDIR) -iname '*.html' -empty` $(DEB_DESTDIR)/usr/share/doc/rust-doc/html/.lock + ln -sf /usr/share/javascript/jquery/jquery.js $(DEB_DESTDIR)/usr/lib/*/rust/*/share/doc/rust/html/jquery.js +endif dh_install override_dh_installchangelogs: