From b72fcad4c7887b588853fd36d568f09aca086e71 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Mon, 11 Apr 2016 15:25:43 -0700 Subject: [PATCH] Have make clean not delete builds/; introduce make cleanall for that. --- Gruntfile.coffee | 2 +- Makefile | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index f0a6acce0..9adde0509 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -24,7 +24,7 @@ module.exports = (grunt) -> command: 'make -j' full: command: """ - make clean + make cleanall make -j all """.split('\n').join('&&') clean: diff --git a/Makefile b/Makefile index 9fcdaedcc..3af122d32 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,12 @@ name := 4chan-X ifeq "$(OS)" "Windows_NT" BIN := $(subst /,\,node_modules/.bin/) + RMDIR := -rmdir /s /q + RM := -del else BIN := node_modules/.bin/ + RMDIR := rm -rf + RM := rm -rf endif coffee := $(BIN)coffee -c --no-header @@ -179,16 +183,14 @@ install.json : .SECONDARY : -.PHONY: default all clean testbuilds builds jshint install +.PHONY: default all clean cleanall testbuilds builds jshint install -ifeq "$(OS)" "Windows_NT" - clean : - -rmdir /s /q tmp testbuilds builds .events - -del .jshintrc .tests_enabled -else - clean : - rm -rf tmp testbuilds builds .events .jshintrc .tests_enabled -endif +clean : + $(RMDIR) tmp testbuilds .events + $(RM) .jshintrc .tests_enabled + +cleanall : clean + $(RMDIR) builds testbuilds : $(testbuilds)