Skip to content

Commit 87334fb

Browse files
dmskialexcrichton
authored andcommitted
Made 'make install' include libs for additional targets
1 parent 22b6325 commit 87334fb

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

mk/dist.mk

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -203,19 +203,17 @@ distcheck-osx: dist-osx
203203
# Unix binary installer tarballs
204204
######################################################################
205205

206-
define DEF_INSTALLER
207-
208-
$$(eval $$(call DEF_PREPARE,dir-$(1)))
209-
210-
dist-install-dir-$(1): PREPARE_HOST=$(1)
211-
dist-install-dir-$(1): PREPARE_TARGETS=$(1)
212-
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME)-$(1)
213-
dist-install-dir-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
214-
dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
215-
dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
216-
dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
217-
dist-install-dir-$(1): PREPARE_CLEAN=true
218-
dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
206+
define DEF_PREPARE_DIST_DIR
207+
208+
dist-install-dir-$(1)$(3): PREPARE_HOST=$(1)
209+
dist-install-dir-$(1)$(3): PREPARE_TARGETS=$(2)
210+
dist-install-dir-$(1)$(3): PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME)-$(1)
211+
dist-install-dir-$(1)$(3): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
212+
dist-install-dir-$(1)$(3): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
213+
dist-install-dir-$(1)$(3): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
214+
dist-install-dir-$(1)$(3): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
215+
dist-install-dir-$(1)$(3): PREPARE_CLEAN=true
216+
dist-install-dir-$(1)$(3): prepare-base-dir-$(1) docs compiler-docs
219217
$$(Q)(cd $$(PREPARE_DEST_DIR)/ && find . -type f | sed 's/^\.\///') \
220218
> tmp/dist/manifest-$(1).in
221219
$$(Q)mv tmp/dist/manifest-$(1).in $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest.in
@@ -227,6 +225,16 @@ dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
227225
$$(Q)cp -r doc $$(PREPARE_DEST_DIR)
228226
$$(Q)$$(PREPARE_BIN_CMD) $$(S)src/etc/install.sh $$(PREPARE_DEST_DIR)
229227

228+
endef
229+
230+
define DEF_INSTALLER
231+
232+
$$(eval $$(call DEF_PREPARE,dir-$(1)))
233+
234+
$$(eval $$(call DEF_PREPARE_DIST_DIR,$(1),$(1),))
235+
236+
$$(eval $$(call DEF_PREPARE_DIST_DIR,$(1),$(CFG_TARGET),-with-target-libs))
237+
230238
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)
231239
@$(call E, build: $$@)
232240
$$(Q)tar -czf dist/$$(PKG_NAME)-$(1).tar.gz -C tmp/dist $$(PKG_NAME)-$(1)

mk/install.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ else
1414
MAYBE_DISABLE_VERIFY=
1515
endif
1616

17-
install: dist-install-dir-$(CFG_BUILD)
17+
install: dist-install-dir-$(CFG_BUILD)-with-target-libs
1818
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" "$(MAYBE_DISABLE_VERIFY)"
1919
# Remove tmp files while we can because they may have been created under sudo
2020
$(Q)rm -R tmp/dist
2121

22-
uninstall: dist-install-dir-$(CFG_BUILD)
22+
uninstall: dist-install-dir-$(CFG_BUILD)-with-target-libs
2323
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
2424
# Remove tmp files while we can because they may have been created under sudo
2525
$(Q)rm -R tmp/dist

0 commit comments

Comments
 (0)