summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Early <alexander.early@gmail.com>2018-06-03 13:25:29 -0700
committerAlexander Early <alexander.early@gmail.com>2018-06-03 13:25:29 -0700
commit1383717b653fba3d33c708ca1a3273ef2a7204e5 (patch)
treeedc0cff324a2b831c1dc79959baf1948f6ffe8a2
parent3e6aa9d3241541ee60420c277eaee3b926f87ea8 (diff)
downloadasync-1383717b653fba3d33c708ca1a3273ef2a7204e5.tar.gz
makefile debugging
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 812cd13..f9434e5 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,8 @@
# created here are checked in so people on all platforms can run npm scripts.
# This build should be run once per release.
+OLD_VARS := $(.VARIABLES)
+
SHELL=/bin/bash
export PATH := ./node_modules/.bin/:$(PATH):./bin/
@@ -32,19 +34,23 @@ $(shell cat $(SCRIPTS)/aliases.txt | grep "$(basename $(notdir $(1))) " | cut -d
endef
define COMPILE_ALIAS =
-$(A): lib/$(call ALIAS_SRC,$(A)).js
+SRC_$(A) := lib/$(call ALIAS_SRC,$(A)).js
+$(A): $$(SRC_$(A))
mkdir -p "$$(@D)"
node $$(SCRIPTS)/build/compile-module.js --file $$< --output $$@
endef
$(foreach A,$(ALIAS_CJS),$(eval $(COMPILE_ALIAS)))
define COPY_ES_ALIAS =
-$(A): lib/$(call ALIAS_SRC,$(A)).js
+SRC_$(A) := lib/$(call ALIAS_SRC,$(A)).js
+$(A): $$(SRC_$(A))
mkdir -p "$$(@D)"
cp $$< $$@
endef
$(foreach A,$(ALIAS_ES),$(eval $(COPY_ES_ALIAS)))
+$(foreach V,$(filter-out $(OLD_VARS), $(.VARIABLES)), $(info $(V): $($(V))))
+
all: clean lint build test
test: