Fix mkdir on Windows.

This commit is contained in:
ccd0 2016-04-12 01:34:52 -07:00
parent 917f48b569
commit 2d26fcc528

View File

@ -5,11 +5,13 @@ ifeq "$(OS)" "Windows_NT"
RMDIR := -rmdir /s /q RMDIR := -rmdir /s /q
RM := -del RM := -del
CP = copy /y $(subst /,\,$<) $(subst /,\,$@) CP = copy /y $(subst /,\,$<) $(subst /,\,$@)
MKDIR = mkdir $(subst /,\,$@)
else else
BIN := node_modules/.bin/ BIN := node_modules/.bin/
RMDIR := rm -rf RMDIR := rm -rf
RM := rm -rf RM := rm -rf
CP = cp $< $@ CP = cp $< $@
MKDIR = mkdir $@
endif endif
coffee := $(BIN)coffee -c --no-header coffee := $(BIN)coffee -c --no-header
@ -93,8 +95,8 @@ default : install
all : bds install all : bds install
.events : .events tmp testbuilds builds :
mkdir $@ $(MKDIR)
.events/npm : npm-shrinkwrap.json | .events .events/npm : npm-shrinkwrap.json | .events
npm install npm install
@ -106,9 +108,6 @@ node_modules/%/package.json : .events/npm
.tests_enabled : .tests_enabled :
echo false> .tests_enabled echo false> .tests_enabled
tmp :
mkdir $@
tmp/script.coffee : $(sources) $(cat_deps) | tmp tmp/script.coffee : $(sources) $(cat_deps) | tmp
$(cat) $(sources) $@ $(cat) $(sources) $@
@ -121,13 +120,10 @@ tmp/script-%.js : tmp/script-%.coffee $(coffee_deps)
tmp/eventPage.js : src/General/eventPage.coffee $(coffee_deps) | tmp tmp/eventPage.js : src/General/eventPage.coffee $(coffee_deps) | tmp
$(coffee) -o tmp src/General/eventPage.coffee $(coffee) -o tmp src/General/eventPage.coffee
testbuilds :
mkdir $@
define rules_channel define rules_channel
testbuilds/crx$1 : | testbuilds testbuilds/crx$1 : | testbuilds
mkdir $$@ $$(MKDIR)
testbuilds/crx$1/script.js : src/meta/botproc.js LICENSE src/meta/usestrict.js tmp/script-crx.js $(cat_deps) | testbuilds/crx$1 testbuilds/crx$1/script.js : src/meta/botproc.js LICENSE src/meta/usestrict.js tmp/script-crx.js $(cat_deps) | testbuilds/crx$1
$(cat) src/meta/botproc.js LICENSE src/meta/usestrict.js tmp/script-crx.js $$@ $(cat) src/meta/botproc.js LICENSE src/meta/usestrict.js tmp/script-crx.js $$@
@ -167,9 +163,6 @@ $(eval $(call rules_channel,-noupdate))
testbuilds/$(name).zip : testbuilds/$(name)-noupdate.crx.zip testbuilds/$(name).zip : testbuilds/$(name)-noupdate.crx.zip
$(CP) $(CP)
builds :
mkdir $@
builds/% : testbuilds/% $(jshint) | builds builds/% : testbuilds/% $(jshint) | builds
$(CP) $(CP)