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).
This commit is contained in:
Angus Lees 2015-04-15 18:08:46 +10:00
parent 1261b4b365
commit 2e97839d6b

13
debian/rules vendored
View File

@ -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: