summaryrefslogtreecommitdiff
path: root/mk/targets.mk
diff options
context:
space:
mode:
authorS├ębastien Delafond <sdelafond@gmail.com>2016-11-07 10:41:54 +0100
committerS├ębastien Delafond <sdelafond@gmail.com>2016-11-07 10:41:54 +0100
commit1a7cd65ca362047cd97d4127d49108994baebc6c (patch)
treef18735f3b77120ef2e91043f2f662b03e47ccbb0 /mk/targets.mk
parent55074078ca876273e3fa58ee6838cba90d2b6100 (diff)
parentec84430cf4e09ba25ec675debdf802bc28111e06 (diff)
Merge tag 'upstream/9.0'
Upstream version 9.0
Diffstat (limited to 'mk/targets.mk')
-rw-r--r--mk/targets.mk16
1 files changed, 11 insertions, 5 deletions
diff --git a/mk/targets.mk b/mk/targets.mk
index d390fdb..0ccb6ea 100644
--- a/mk/targets.mk
+++ b/mk/targets.mk
@@ -37,7 +37,7 @@ endif
CONF_BASE = EMACS DESTDIR ORGCM ORG_MAKE_DOC
CONF_DEST = lispdir infodir datadir testdir
CONF_TEST = BTEST_PRE BTEST_POST BTEST_OB_LANGUAGES BTEST_EXTRA BTEST_RE
-CONF_EXEC = CP MKDIR RM RMR FIND SUDO PDFTEX TEXI2PDF TEXI2HTML MAKEINFO INSTALL_INFO
+CONF_EXEC = CP MKDIR RM RMR FIND CHMOD SUDO PDFTEX TEXI2PDF TEXI2HTML MAKEINFO INSTALL_INFO
CONF_CALL = BATCH BATCHL ELC ELCDIR NOBATCH BTEST MAKE_LOCAL_MK MAKE_ORG_INSTALL MAKE_ORG_VERSION
config-eol:: EOL = \#
config-eol:: config-all
@@ -137,11 +137,11 @@ cleandirs:
clean: cleanlisp cleandoc
cleanall: cleandirs cleantest cleanaddcontrib
- -$(FIND) . \( -name \*~ -o -name \*# -o -name .#\* \) -exec $(RM) {} \;
- -$(FIND) $(CLEANDIRS) \( -name \*~ -o -name \*.elc \) -exec $(RM) {} \;
+ -$(FIND) . \( -name \*~ -o -name \*# -o -name .#\* \) -exec $(RM) {} +
+ -$(FIND) $(CLEANDIRS) \( -name \*~ -o -name \*.elc \) -exec $(RM) {} +
$(CLEANDIRS:%=clean%):
- -$(FIND) $(@:clean%=%) \( -name \*~ -o -name \*.elc \) -exec $(RM) {} \;
+ -$(FIND) $(@:clean%=%) \( -name \*~ -o -name \*.elc \) -exec $(RM) {} +
cleanelc:
$(MAKE) -C lisp $@
@@ -158,4 +158,10 @@ cleandocs:
-$(FIND) doc -name \*~ -exec $(RM) {} \;
cleantest:
- $(RMR) $(testdir)
+# git-annex creates non-writable directories so that the files within
+# them can't be removed; if rm fails, try to recover by making all
+# directories writable
+ -$(RMR) $(testdir) || { \
+ $(FIND) $(testdir) -type d -exec $(CHMOD) u+w {} + && \
+ $(RMR) $(testdir) ; \
+ }