@@ -16,32 +16,52 @@ prepare:
1616 git config core.hooksPath .hooks
1717
1818.PHONY : setup
19- setup : prepare clean $(PXT )
19+ setup : deepclean $(PXT ) $(PXT_INSTALL_LIBRARIES ) build-pxt-core
20+ @echo " Setup makecode-steami"
2021
2122.PHONY : clean
2223clean : ;@$(call _clean)
2324
25+ .PHONY : clean-pxt-core
26+ clean-pxt-core : ;@$(call _clean_pxt_core)
27+
28+ .PHONY : clean-pxt-common-packages
29+ clean-pxt-common-packages : ;@$(call _clean_pxt_common_packages)
30+
2431.PHONY : clean-local-certificates
25- clean-local-certificates : ;@$(call _clean_pxt_steami_backend_certificates)
32+ clean-local-certificates : ;@$(call _clean_pxt_steami_backend_certificates)
2633
2734.PHONY : deepclean
2835deepclean : ;@$(call _deepclean)
2936
3037# Create make rule for each PXT command
3138$(foreach command,$(PXT_COMMANDS),$(eval $(call _call_pxt_command_template,$(command),$(command),$(PXT))))
3239
33- # Create install rules for each node package
34- $(eval $(call _install_node_package_template,makecode-steami,.))
40+ # Create install rules for each pxt package
3541$(foreach target,$(PXT_LIBRARIES),$(eval $(call _install_node_package_template,$(target),$(target))))
3642
43+ .PHONY : install-makecode-steami
44+ install-makecode-steami : node_modules/.package-lock.json package-lock.json
45+
46+ node_modules/.package-lock.json package-lock.json :
47+ @$(call install_node_package,.)
48+
3749# Install pxt CLI
38- $(PXT ) : | install-makecode-steami $(addprefix install-,$(PXT_LIBRARIES ) ) pxt/built/target.json
50+ $(PXT ) : install-makecode-steami
51+
52+ .NOTPARALLEL : $(PXT ) setup
3953
4054# Build pxt cli
4155pxt/built/target.json : pxt/node_modules/.package-lock.json
4256 @echo " Build pxt core"
43- cd pxt || exit
44- npm run build
57+ @$(call _build_pxt_core)
58+
59+ .PHONY : build-pxt-core
60+ build-pxt-core : install-pxt
61+ @echo " Building pxt core ..."
62+ $(call _build_pxt_core)
63+ @echo " pxt core built"
64+
4565
4666# Create build rule by aliasing pxt buildtarget command
4767.PHONY : build
0 commit comments