From 4ccf7f20ec1f4c02fab80057b9cbeecab91427ba Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Tue, 8 Jan 2019 14:12:24 -0700 Subject: [PATCH] debian/rules: Replace debian-clean with SCM_DEBIAN_CLEAN. The debian-clean target, in a parallelized built, may be "built" first. Ensure the cleanup happens last; make it part of "install". --- debian/rules | 6 +++--- doc/Makefile.in | 7 +++---- src/Makefile.in | 6 ++---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/debian/rules b/debian/rules index 922731f2c..3cc9d35a8 100755 --- a/debian/rules +++ b/debian/rules @@ -16,9 +16,9 @@ override_dh_auto_configure: dh_auto_configure --sourcedirectory=doc -- $(CONF_FLAGS) override_dh_auto_install: - dh_auto_install --sourcedirectory=src -- debian-clean - dh_auto_install --sourcedirectory=doc \ - -- install-html install-pdf debian-clean + dh_auto_install --sourcedirectory=src -- SCM_DEBIAN_CLEAN=yes + dh_auto_install --sourcedirectory=doc -- SCM_DEBIAN_CLEAN=yes \ + install-html install-pdf debian/%: debian/%.in sed -e 's|@SCMDOCDIR@|/usr/share/doc/mit-scheme-pucked|g' \ diff --git a/doc/Makefile.in b/doc/Makefile.in index d81e3239a..ffe1a6812 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -116,6 +116,9 @@ install: install-info-gz install-man install-html $(INST_TARGETS) echo " \"$(DESTDIR)$(libdir)/$(PROJECT)\""; \ echo " \"$(DESTDIR)$(docdir)\")" \ ) | mit-scheme-pucked --batch-mode + if test "${SCM_DEBIAN_CLEAN}" = "yes"; then \ + rm -f $(DESTDIR)$(infodir)/dir*; \ + rm -f $(DESTDIR)$(docdir)/plugins.scm; fi install-info-gz install-info: $(PROJECT).info $(mkinstalldirs) $(DESTDIR)$(infodir) @@ -128,10 +131,6 @@ install-info-gz install-info: $(PROJECT).info ( cd $${D} && $(MAKE) $@ ) || exit 1;\ done -debian-clean: - rm -f $(DESTDIR)$(infodir)/dir* - rm -f $(DESTDIR)$(docdir)/plugins.scm - $(PROJECT).info: $(PROJECT).info.in sed -e 's|@SCMDOCDIR@|$(docdir)|g' < $< > $@ diff --git a/src/Makefile.in b/src/Makefile.in index eaf45898f..3ac5557d5 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -816,10 +816,6 @@ clean-boot-root: rm -rf boot-root rm -f stamp_* -.PHONY: debian-clean -debian-clean: - rm -f $(DESTDIR)$(AUXDIR)/plugins.scm - .PHONY: tags TAGS tags TAGS: $(top_srcdir)/Tags.sh $(SUBDIRS) @@ -830,6 +826,8 @@ subdir-list: .PHONY: install install: install-standard @INSTALL_LIARC_BUNDLES@ + if test "${SCM_DEBIAN_CLEAN}" = "yes"; then \ + rm -f $(DESTDIR)$(AUXDIR)/plugins.scm; fi .PHONY: install-standard install-standard: install-auxdir-top -- 2.25.1