You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2018/03/19 16:56:40 UTC
[cordova-docs] branch master updated: CB-13964: Fixed make clean
for windows (#806)
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-docs.git
The following commit(s) were added to refs/heads/master by this push:
new c3d73c8 CB-13964: Fixed make clean for windows (#806)
c3d73c8 is described below
commit c3d73c8446397a18afa7b3396febf848e27495dc
Author: Gandhirajan <ga...@gmail.com>
AuthorDate: Mon Mar 19 22:26:38 2018 +0530
CB-13964: Fixed make clean for windows (#806)
* fixed make clean for windows
* fixed make clean for windows
* implemented review comments
* implemented rm and rmdir changes in all occurences
---
Makefile | 35 ++++++++++++++++++++++-------------
1 file changed, 22 insertions(+), 13 deletions(-)
diff --git a/Makefile b/Makefile
index 8d84829..43e95a2 100644
--- a/Makefile
+++ b/Makefile
@@ -50,6 +50,14 @@ else
printfile = cat $(1)
endif
+ifdef WINDOWS
+RM = cmd /C del /Q /F $(subst /,\,$(1))
+RMDIR = cmd /C rmdir /S /Q $(subst /,\,$(1))
+else
+RM = rm -f $(1)
+RMDIR = rm -rf $(1)
+endif
+
# constants
EMPTY =
SPACE = $(EMPTY) $(EMPTY)
@@ -152,7 +160,7 @@ NEXT_DOCS_TOCS = $(addprefix $(TOC_DIR)/,$(addsuffix _$(NEXT_DOCS_VERSION_SLUG)-
JEKYLL_CONFIGS = $(MAIN_CONFIG) $(DEFAULTS_CONFIG) $(VERSION_CONFIG)
JEKYLL_FLAGS =
-BUILD_DATA = $(DOCS_VERSION_DATA) $(DOCS_PAGE_LIST) $(TOC_FILES)
+BUILD_DATA = $(TOC_FILES) $(DOCS_VERSION_DATA) $(DOCS_PAGE_LIST)
# convenience targets
help usage default:
@@ -288,18 +296,19 @@ $(CSS_DEST_DIR)/%.css: $(CSS_SRC_DIR)/%.css
# maintenance
clean:
- $(RM) $(VERSION_CONFIG)
- $(RM) $(DEFAULTS_CONFIG)
- $(RM) $(DOCS_PAGE_LIST)
- $(RM) $(DOCS_VERSION_DATA)
- $(RM) -r $(PROD_DIR) $(DEV_DIR)
- $(RM) $(TOC_FILES)
- $(RM) $(PLUGINS_APP)
- $(RM) -r $(CSS_DEST_DIR)
- $(RM) $(FETCHED_FILES)
+ $(call RM, $(VERSION_CONFIG))
+ $(call RM, $(DEFAULTS_CONFIG))
+ $(call RM, $(DOCS_PAGE_LIST))
+ $(call RM, $(DOCS_VERSION_DATA))
+ $(call RM, $(TOC_FILES))
+ $(call RM, $(PLUGINS_APP))
+ $(call RM, $(FETCHED_FILES))
+ -$(call RMDIR, $(CSS_DEST_DIR))
+ -$(call RMDIR, $(PROD_DIR))
+ -$(call RMDIR, $(DEV_DIR))
nuke: clean
- $(RM) -r node_modules
- $(RM) Gemfile.lock
+ $(call RMDIR, node_modules)
+ $(call RM, Gemfile.lock)
-.PHONY: clean usage help default build fetch $(DEV_DOCS)
+.PHONY: clean usage help default build fetch $(DEV_DOCS)
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org