]> git.proxmox.com Git - rustc.git/blame - debian/rules
Add/fix detection for sparc64
[rustc.git] / debian / rules
CommitLineData
be771b38
LB
1#!/usr/bin/make -f
2# -*- makefile -*-
3
b59979d9 4include /usr/share/dpkg/pkg-info.mk
6472c211 5include /usr/share/dpkg/vendor.mk
d75d48d6 6include /usr/share/dpkg/architecture.mk
b5dfb68c
XL
7SED_VERSION_SHORT := sed -re 's/([^.]+)\.([^.]+)\..*/\1.\2/'
8RUST_VERSION := $(shell echo '$(DEB_VERSION_UPSTREAM)' | $(SED_VERSION_SHORT))
9RUST_LONG_VERSION := $(shell echo '$(DEB_VERSION_UPSTREAM)' | sed -re 's/([^+]+).*/\1/')
10LIBSTD_PKG := libstd-rust-$(RUST_VERSION)
11# Sed expression that matches the "rustc" we have in our Build-Depends field
12SED_RUSTC_BUILDDEP := sed -ne "/^Build-Depends:/,/^[^[:space:]\#]/{/^ *rustc:native .*,/p}" debian/control
13
7d40d3e1 14include /usr/share/dpkg/buildflags.mk
4888e768 15# TODO: more correct to use `[build] rustflags = []` list syntax in Cargo.toml
9197bf09 16RUSTFLAGS = $(addprefix -C link-args=,$(LDFLAGS))
7d40d3e1 17export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS RUSTFLAGS
9197bf09
XL
18# set remap-path-prefix for reproducible builds; TODO: remove "if" after 1.20
19ifeq (0,$(shell dpkg --compare-versions "$$(rustc --version --verbose | sed -ne 's/^release: //p')" '>=' 1.19.0; echo $$?))
20RUSTFLAGS += -Zremap-path-prefix-from=$(CURDIR) -Zremap-path-prefix-to=/usr/src/rustc-$(RUST_LONG_VERSION)
21export RUSTC_BOOTSTRAP = 1
22endif
b59979d9 23
525ff0f9
AL
24# Defines DEB_*_RUST_TYPE triples
25include debian/architecture.mk
693daed7 26export DEB_HOST_RUST_TYPE
525ff0f9 27
be771b38
LB
28# Uncomment this to turn on verbose mode.
29#export DH_VERBOSE=1
30
c2a1d9e3
AL
31# src/rt/miniz.c (incorrectly) triggers -Wmisleading-indentation with
32# gcc-6. See bug #811573.
33CFLAGS += -Wno-misleading-indentation
34
d4357a26 35# Release type (one of beta, stable or nightly)
0f9154de 36RELEASE_CHANNEL := stable
6935ded2
XL
37# See also ./build-preview-dsc.sh for a script that builds a beta/nightly .dsc
38# out of this packaging. Furthermore, if the build breaks after importing a new
39# upstream stable release, check the do_temporary_fixup function in that file
40# to see if we already know what fix to make.
d4357a26 41
8354de7a 42DEB_DESTDIR := $(CURDIR)/debian/tmp
525ff0f9 43
01dc6ef4
XL
44# These are the normal build flags. Upstream is moving to debian/config.toml
45# but at the current version not all of these flags are available in that file.
3613a4e9
XL
46# Certain flags also need to be kept here *as well as* debian/config.toml.in
47# because of https://github.com/rust-lang/rust/issues/43295
8d2f297e 48DEB_CONFIGURE_FLAGS = --enable-llvm-link-shared --disable-dist-src --prefix=/usr --release-channel=$(RELEASE_CHANNEL) --disable-jemalloc --disable-debuginfo-only-std
be771b38 49
525ff0f9 50# Use system LLVM (comment out to use vendored LLVM)
666f0397
XL
51LLVM_VERSION = 4.0
52OLD_LLVM_VERSION = 3.9
2b7c35b5
XL
53# Make it easier to test against a custom LLVM
54ifneq (,$(LLVM_DESTDIR))
56548b60
XL
55LLVM_LIBRARY_PATH := $(LLVM_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH):$(LLVM_DESTDIR)/usr/lib
56LD_LIBRARY_PATH := $(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):$(LLVM_LIBRARY_PATH),$(LLVM_LIBRARY_PATH))
2b7c35b5
XL
57export LD_LIBRARY_PATH
58endif
59DEB_CONFIGURE_FLAGS += --llvm-root=$(LLVM_DESTDIR)/usr/lib/llvm-$(LLVM_VERSION)
60
8e396fda 61RUSTBUILD = RUST_BACKTRACE=1 ./x.py
3613a4e9 62RUSTBUILD_FLAGS = --config debian/config.toml -v --on-fail env
f1b4ffd3
XL
63# TODO: This should simply be "$(RUSTBUILD) test" but unfortunately this causes
64# an insane blow up in the time it takes to run tests. See upstream #37477 for
65# details. Upstream worked around it in #38984 but in Debian we can't take
66# advantage of that work-around, because we want as much debuginfo as possible
67# (so we set debuginfo-lines = true, debuginfo-only-std = false) so we have to
68# work around it instead by disabling backtrace when running tests.
69RUSTBUILD_TEST = ./x.py test
0d3674eb
XL
70# To run a specific test, run something like:
71# $ debian/rules override_dh_auto_test-arch \
72# RUSTBUILD_TEST_FLAGS="src/test/run-make --test-args extern-fn-struct"
73# See src/bootstrap/README.md for more options.
74RUSTBUILD_TEST_FLAGS =
1c8ac2b0 75
25f1c2fe
XL
76update-version:
77 oldver=$(shell $(SED_RUSTC_BUILDDEP) | sed -ne 's/.*(<= \(.*\)).*/\1/gp' | $(SED_VERSION_SHORT)); \
78 newver=$(RUST_VERSION); \
79 if [ $$oldver != $$newver ]; then debian/update-version.sh $$oldver $$newver; fi
80
427dce5b
XL
81# Below we detect how we're supposed to bootstrap the stage0 compiler. See
82# README.Debian for more details of the cases described below.
83#
427dce5b 84PRECONFIGURE_CHECK = :
75be2bb3 85HAVE_BINARY_TARBALL := $(shell ls -1 stage0/*/*$(DEB_HOST_RUST_TYPE)* 2>/dev/null | wc -l)
571f0d20
MK
86# allow not using the binary tarball although it exists
87#ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armhf i386 powerpc ppc64el s390x))
88# HAVE_BINARY_TARBALL := 0
89#endif
90ifeq (0,$(HAVE_BINARY_TARBALL))
16dfb283
XL
91 # Case A (Building from source): the extracted source tree does not include
92 # a bootstrapping tarball for the current architecture e.g. because the
93 # distro already has a rustc for this arch, or the uploader expects that
94 # this requirement be fulfilled in some other way.
427dce5b
XL
95 #
96 # Case A-1: the builder did not select the "pkg.rustc.dlstage0" build profile.
97 # In this case, we use the distro's rustc - either the previous or current version.
98 ifeq (,$(findstring pkg.rustc.dlstage0,$(DEB_BUILD_PROFILES)))
56548b60
XL
99 # Make it easier to test against a custom rustc
100 ifneq (,$(RUST_DESTDIR))
101 RUST_LIBRARY_PATH := $(RUST_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH):$(RUST_DESTDIR)/usr/lib
102 LD_LIBRARY_PATH := $(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):$(RUST_LIBRARY_PATH),$(RUST_LIBRARY_PATH))
103 export LD_LIBRARY_PATH
104 endif
105 DEB_CONFIGURE_FLAGS += --enable-local-rust --local-rust-root=$(RUST_DESTDIR)/usr
427dce5b
XL
106 endif
107 #
108 # Case A-2: the builder selected the "dlstage0" build profile.
75be2bb3 109 # In this case, the rust build scripts will download a stage0 into stage0/ and use that.
b9a40c91 110 # We don't need to do anything specific in this build file, so this case is empty.
427dce5b 111else
16dfb283
XL
112 # Case B (Bootstrapping a new distro): the extracted source tree does
113 # include a bootstrapping tarball for the current architecture; see the
75be2bb3 114 # `source_orig-stage0` target below on how to build this.
427dce5b
XL
115 #
116 # In this case, we'll bootstrap from the stage0 given in that tarball.
117 # To ensure the uploader of the .dsc didn't make a mistake, we first check
16dfb283 118 # that rustc isn't a Build-Depends for the current architecture.
25f1c2fe
XL
119 ifneq (,$(shell $(SED_RUSTC_BUILDDEP)))
120 ifeq (,$(shell $(SED_RUSTC_BUILDDEP) | grep '!$(DEB_HOST_ARCH)'))
75be2bb3 121 PRECONFIGURE_CHECK = $(error found matches for stage0/*/*$(DEB_HOST_RUST_TYPE)*, \
16dfb283
XL
122 but rustc might be a Build-Depends for $(DEB_HOST_ARCH))
123 endif
427dce5b 124 endif
1c8ac2b0
SL
125endif
126
127BUILD_DOCS = 1
120b4d47 128ifneq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
525ff0f9 129 DEB_CONFIGURE_FLAGS += --disable-docs
2e97839d 130 BUILD_DOCS =
1c8ac2b0
SL
131endif
132
133ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
525ff0f9 134 DEB_CONFIGURE_FLAGS += --disable-optimize --disable-optimize-cxx --disable-optimize-llvm
1c8ac2b0
SL
135endif
136
35329365
XL
137# Build products or non-source files in src/, that shouldn't go in rust-src
138SRC_CLEAN = src/rt/hoedown/src/html_blocks.c \
139 src/bootstrap/bootstrap.pyc \
35329365 140 src/etc/__pycache__/
1c8ac2b0 141
170f9149
XL
142# Workaround for linux #865549
143ifeq (0,$(shell test $$(uname -s) = "Linux" -a $$(getconf PAGESIZE) -gt 4096; echo $$?))
144 SYSTEM_WORKAROUNDS += ulimit -s $$(expr $$(getconf PAGESIZE) / 1024 '*' 256 + 8192);
145endif
146
be771b38 147%:
170f9149 148 $(SYSTEM_WORKAROUNDS) dh $@ --parallel
be771b38 149
04c12273
XL
150.PHONY: build
151build:
170f9149 152 $(SYSTEM_WORKAROUNDS) dh $@ --parallel
04c12273 153
de1de54b 154override_dh_clean:
cf0b146d
XL
155 # Upstream contains a lot of these
156 dh_clean -XCargo.toml.orig
de1de54b 157
b1076f25
XL
158debian/configure-upstream: debian/config.toml debian/rules
159 rm -f "$@"
160 echo '#!/bin/sh' >> "$@"
6a9e99e9 161 echo '# This script can be used to configure a mostly-clean upstream checkout' >> "$@"
b1076f25
XL
162 echo '# in case you need to test any differences between it and Debian' >> "$@"
163 echo 'set -e' >> "$@"
164 echo 'test -f ./configure' >> "$@"
165 echo 'cat > config.toml <<EOF' >> "$@"
166 cat debian/config.toml >> "$@"
167 echo 'EOF' >> "$@"
b5b6f08a 168 echo "./configure $(DEB_CONFIGURE_FLAGS) \"\$$@\"" >> "$@"
b1076f25
XL
169 chmod +x "$@"
170
01dc6ef4
XL
171debian/config.toml: debian/config.toml.in
172 m4 -DDEB_BUILD_RUST_TYPE="$(DEB_BUILD_RUST_TYPE)" \
173 -DDEB_HOST_RUST_TYPE="$(DEB_HOST_RUST_TYPE)" \
174 -DDEB_TARGET_RUST_TYPE="$(DEB_TARGET_RUST_TYPE)" \
175 -DRELEASE_CHANNEL="$(RELEASE_CHANNEL)" \
2b7c35b5 176 -DLLVM_DESTDIR="$(LLVM_DESTDIR)" \
666f0397 177 -DLLVM_VERSION="$(LLVM_VERSION)" \
01dc6ef4
XL
178 "$<" > "$@"
179
b5dfb68c
XL
180debian/rust-src.%: debian/rust-src.%.in
181 m4 -DRUST_LONG_VERSION="$(RUST_LONG_VERSION)" \
182 "$<" > "$@"
183
01dc6ef4 184override_dh_auto_configure: debian/config.toml
5617e1bd 185 # fail the build if we have any instances of OLD_LLVM_VERSION in debian, except for debian/changelog
666f0397 186 ! grep --color=always -i 'll...\?$(subst .,\.,$(OLD_LLVM_VERSION))' --exclude=changelog -R debian
427dce5b 187 $(PRECONFIGURE_CHECK)
75be2bb3 188 if [ -d stage0 ]; then mkdir -p build && ln -sfT ../stage0 build/cache; fi
3281855a
XL
189 # work around #842634
190 if test $$(grep "127.0.0.1\s*localhost" /etc/hosts | wc -l) -gt 1; then \
ed6f7eed 191 debian/ensure-patch -N debian/patches/d-host-duplicates.patch; fi
6b0d97fc 192 # We patched mdbook so have to rm the checksums
81fd74bc 193 debian/prune-checksums src/vendor/mdbook/.cargo-checksum.json
6b0d97fc
XL
194 # Unfortunately upstream uses a duplicate copy of libbacktrace and wants to
195 # compile it again for rust-installer, see #43449
196 ln -rsf src/libbacktrace -t src/vendor/backtrace-sys/src/
e9a8101d 197 debian/prune-checksums src/vendor/backtrace-sys/.cargo-checksum.json
6b0d97fc
XL
198 # Link against system liblzma, see https://github.com/alexcrichton/xz2-rs/issues/16
199 echo 'fn main() { println!("cargo:rustc-link-lib=lzma"); }' > src/vendor/lzma-sys/build.rs
e9a8101d 200 debian/prune-checksums src/vendor/lzma-sys/.cargo-checksum.json
30248d38 201 # We excluded some embedded libraries in d/copyright
e9a8101d 202 debian/prune-checksums src/vendor/dbghelp-sys/.cargo-checksum.json
4c9c2ccc
XL
203 # We patched this for sparc64 support
204 debian/prune-checksums src/vendor/gcc/.cargo-checksum.json
6b0d97fc 205 # Do the actual configure
2ff118e1 206 ./configure $(DEB_CONFIGURE_FLAGS)
1c8ac2b0 207
11c430be 208override_dh_auto_clean:
f40dfcc0 209 $(RM) -rf ./build ./tmp ./.cargo config.stamp config.mk Makefile
b5dfb68c 210 $(RM) -rf $(SRC_CLEAN) debian/config.toml debian/rust-src.install debian/rust-src.links
11c430be 211
ea192313
XL
212# upstream bundles this in the source, but in Debian we rebuild everything yo
213generate-sources:
214 $(MAKE) -C src/rt/hoedown src/html_blocks.c
1c8ac2b0 215
ea192313 216override_dh_auto_build-arch: generate-sources
04c12273 217 $(RUSTBUILD) build $(RUSTBUILD_FLAGS)
ea192313 218
e408bc2c
XL
219# note: this is only for buildds that want to do a separate arch:all build;
220# there is no point running this yourself "to save time" since it implicitly
221# depends on build-arch anyways.
ea192313 222override_dh_auto_build-indep: generate-sources
e408bc2c 223ifneq (,$(BUILD_DOCS))
1fd63ebe
XL
224# Rust has a weird way of configuring whether to build docs or not
225 sed -i -e 's/^docs = false/docs = true/' debian/config.toml
04c12273
XL
226 $(RUSTBUILD) doc $(RUSTBUILD_FLAGS)
227endif
228
3a774f0f
XL
229TEST_LOG = debian/rustc-tests.log
230FAILURES_ALLOWED = 5
231FAILED_TESTS = grep FAILED $(TEST_LOG) | grep -v '^test result'
7958f3db 232override_dh_auto_test-arch:
347f6206
XL
233# ensure that rustc_llvm is actually dynamically linked to libLLVM
234 set -e; find build/*/stage2/lib/rustlib/* -name '*rustc_llvm*.so' | \
235 while read x; do \
236 stat -c '%s %n' "$$x"; \
237 objdump -p "$$x" | grep -q "NEEDED.*LLVM"; \
238 test "$$(stat -c %s "$$x")" -lt 6000000; \
239 done
68e7eb97 240ifeq (, $(filter nocheck,$(DEB_BUILD_PROFILES)))
7958f3db 241ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS)))
3a774f0f
XL
242 $(RUSTBUILD_TEST) --no-fail-fast $(RUSTBUILD_FLAGS) $(RUSTBUILD_TEST_FLAGS) | tee $(TEST_LOG)
243 test -f $(TEST_LOG)
244 echo "Summary of specific test failures:"; \
245 $(FAILED_TESTS); \
246 num_failures=$$($(FAILED_TESTS) | wc -l); \
247 echo -n "$${num_failures} tests failed, $(FAILURES_ALLOWED) maximum allowed. "; \
248 if test "$${num_failures}" -le $(FAILURES_ALLOWED); then \
249 echo "Continuing..."; \
250 else \
251 echo "Aborting the build."; \
252 echo "Check the logs further above for details."; \
253 false; \
254 fi
0d3674eb
XL
255# don't continue if RUSTBUILD_TEST_FLAGS is non-empty
256 test -z "$(RUSTBUILD_TEST_FLAGS)"
e408bc2c 257endif
68e7eb97 258endif
becfe001 259
04c12273 260override_dh_auto_test-indep:
7958f3db 261ifneq (,$(BUILD_DOCS))
68e7eb97 262ifeq (, $(filter nocheck,$(DEB_BUILD_PROFILES)))
7958f3db
XL
263ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS)))
264 # Run all rules that test the docs, i.e. in step.rs that depend on default:doc
3a774f0f 265 $(RUSTBUILD_TEST) --no-fail-fast src/tools/linkchecker $(RUSTBUILD_FLAGS)
7958f3db
XL
266endif
267endif
68e7eb97 268endif
04c12273 269
bf52bd52
XL
270run_rustbuild:
271 DESTDIR=$(DEB_DESTDIR) $(RUSTBUILD) $(X_CMD) $(RUSTBUILD_FLAGS) $(X_FLAGS)
272
23d2674b 273override_dh_auto_install:
6a9e99e9 274 DESTDIR=$(DEB_DESTDIR) $(RUSTBUILD) install $(RUSTBUILD_FLAGS)
525ff0f9
AL
275
276 mkdir -p $(DEB_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/
277 mv $(DEB_DESTDIR)/usr/lib/lib*.so $(DEB_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/
6fce0a99 278
1261b4b3 279 # Replace duplicated compile-time/run-time dylibs with symlinks
525ff0f9
AL
280 @set -e; \
281 for f in $(DEB_DESTDIR)/usr/lib/rustlib/$(DEB_HOST_RUST_TYPE)/lib/lib*.so; do \
282 name=$${f##*/}; \
283 if [ -f "$(DEB_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/$$name" ]; then \
284 echo "ln -sf ../../../$(DEB_HOST_MULTIARCH)/$$name $$f"; \
285 ln -sf ../../../$(DEB_HOST_MULTIARCH)/$$name $$f; \
286 fi; \
1261b4b3
AL
287 done
288
525ff0f9 289ifneq (,$(BUILD_DOCS))
6fce0a99
SL
290 # Brute force to remove privacy-breach-logo lintian warning.
291 # We could have updated the upstream sources but it would complexify
292 # the rebase
b556761e
AL
293 @set -e; \
294 find $(DEB_DESTDIR)/usr/share/doc/rust/html -iname '*.html' | \
1add0b94 295 while read file; do \
b556761e 296 topdir=$$(echo "$$file" | sed 's,^$(DEB_DESTDIR)/usr/share/doc/rust/html/,,; s,/[^/]*$$,/,; s,^[^/]*$$,,; s,[^/]\+/,../,g'); \
92f6ea48 297 sed -i -e "s,https://doc.rust-lang.org/\(favicon.ico\|logos/rust-logo-32x32-blk.png\),$${topdir}rust-logo-32x32-blk.png," \
87a30969 298 -e "s,https://www.rust-lang.org/\(favicon.ico\|logos/rust-logo-32x32-blk.png\),$${topdir}rust-logo-32x32-blk.png," "$$file"; \
1add0b94 299 done
b125a683
MO
300 find $(DEB_DESTDIR) \( -iname '*.html' -empty -o -name .lock -o -name '*.inc' \) -delete;
301endif
302
cf9ecdde 303override_dh_install-arch:
6fce0a99 304 dh_install
525ff0f9 305 dh_install -p$(LIBSTD_PKG) usr/lib/$(DEB_HOST_MULTIARCH)/
cd17b70a 306 dh_install -plibstd-rust-dev usr/lib/rustlib/$(DEB_HOST_RUST_TYPE)/lib/
525ff0f9 307
b5dfb68c 308override_dh_install-indep: debian/rust-src.install debian/rust-src.links
a0022868 309 dh_install
525ff0f9
AL
310 chmod -x \
311 debian/rust-gdb/usr/share/rust-gdb/*.py \
312 debian/rust-lldb/usr/share/rust-lldb/*.py
b5dfb68c 313 $(RM) -rf $(SRC_CLEAN:%=debian/rust-src/usr/src/rustc-$(RUST_LONG_VERSION)/%)
f40dfcc0 314 # Get rid of lintian warnings
b5dfb68c 315 find debian/rust-src/usr/src/rustc-$(RUST_LONG_VERSION) \
f40dfcc0
XL
316 \( -name .gitignore \
317 -o -name 'LICENSE*' \
318 -o -name 'LICENCE' \
319 -o -name 'license' \
320 -o -name 'COPYING*' \
321 \) -delete
1c8ac2b0 322
bc0aa84e 323override_dh_installchangelogs:
646c45f9 324 dh_missing --list-missing || true
bc0aa84e
AL
325 dh_installchangelogs RELEASES.md
326
327override_dh_installdocs:
328 dh_installdocs -X.tex -X.aux -X.log -X.out -X.toc
329
eef1f4e3
AL
330override_dh_compress:
331 dh_compress -X.woff
332
d2456730
XL
333override_dh_strip:
334 # Work around #35733, #468333
335 find debian/libstd-rust-dev/ -name '*.rlib' -execdir mv '{}' '{}.a' \;
336 # This is expected to print out lots of "File format unrecognized" warnings about
337 # rust.metadata.bin and *.deflate but the .o files inside the rlibs should be stripped
338 # Some files are still omitted because of #875780 however.
339 dh_strip -v
340 find debian/libstd-rust-dev/ -name '*.rlib.a' -execdir sh -c 'mv "$$1" "$${1%.a}"' - '{}' \;
341
525ff0f9
AL
342override_dh_makeshlibs:
343 dh_makeshlibs -V
344
345 # dh_makeshlibs doesn't support our "libfoo-version.so" naming
346 # structure, so we have to do this ourselves.
347 install -o 0 -g 0 -d debian/$(LIBSTD_PKG)/DEBIAN
33766656 348 LC_ALL=C ls debian/$(LIBSTD_PKG)/usr/lib/$(DEB_HOST_MULTIARCH)/lib*.so | \
525ff0f9
AL
349 sed -n 's,^.*/\(lib.*\)-\(.\+\)\.so$$,\1 \2,p' | \
350 while read name version; do \
351 echo "$$name $$version $(LIBSTD_PKG) (>= $(DEB_VERSION_UPSTREAM))"; \
352 done > debian/$(LIBSTD_PKG)/DEBIAN/shlibs
353 chmod 644 debian/$(LIBSTD_PKG)/DEBIAN/shlibs
354 chown 0:0 debian/$(LIBSTD_PKG)/DEBIAN/shlibs
355
356override_dh_shlibdeps:
357 dh_shlibdeps -- -x$(LIBSTD_PKG)
427dce5b
XL
358
359QUILT_SPECIAL_SNOWFLAKE_RETURN_CODE = x=$$?; if [ $$x = 2 ]; then exit 0; else exit $$x; fi
75be2bb3 360source_orig-stage0:
16dfb283
XL
361 QUILT_PATCHES=debian/patches quilt push -aq; $(QUILT_SPECIAL_SNOWFLAKE_RETURN_CODE)
362 $(MAKE) -f debian/rules clean
75be2bb3 363 debian/make_orig-stage0_tarball.sh
16dfb283
XL
364 QUILT_PATCHES=debian/patches quilt pop -aq; $(QUILT_SPECIAL_SNOWFLAKE_RETURN_CODE)
365 rm -rf .pc
15ab0b38
XL
366
367debian/watch-beta: debian/watch-beta.in debian/rules
368 oldver=$(shell echo $(RUST_LONG_VERSION) | sed -e 's/\./\\./g'); \
369 newver=$(shell echo $(RUST_VERSION) | perl -lpe 's/(\d+)\.(\d+)/$$1 . "." . ($$2+1)/e'); \
370 m4 -DOLDVER="$$oldver" -DNEWVER="$$newver.0" "$<" > "$@"
371
372source_orig-beta: debian/watch-beta
373 uscan $(USCAN_OPTS) --watchfile "$<"