debian/rules: Replace debian-clean with SCM_DEBIAN_CLEAN.
authorMatt Birkholz <matt@birchwood-abbey.net>
Tue, 8 Jan 2019 21:12:24 +0000 (14:12 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Tue, 8 Jan 2019 21:12:24 +0000 (14:12 -0700)
The debian-clean target, in a parallelized built, may be "built"
first.  Ensure the cleanup happens last; make it part of "install".

debian/rules
doc/Makefile.in
src/Makefile.in

index 922731f2cd99794cff7870609d9613b71f136b2d..3cc9d35a866cd5719aef1a63c47ad9034b9b7c6b 100755 (executable)
@@ -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' \
index d81e3239a580f3da5a959d539e968fad244d9181..ffe1a681254dfe4e9d278f1a61d9e56a8345696f 100644 (file)
@@ -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' < $< > $@
 
index eaf45898f8b74a5c1d393ea632e6192602c49495..3ac5557d5e110323cb70545528c321fec34966f4 100644 (file)
@@ -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