@@ -72,6 +72,12 @@ ifdef LOCALES_FILE
72
72
REBUILD=1
73
73
endif
74
74
75
+ # Switching XPCShell/Node.js build runner
76
+ BUILD_RUNNER =run-js-command
77
+ ifeq ($(RUN_ON_NODE ) , 1)
78
+ BUILD_RUNNER =run-node-command
79
+ endif
80
+
75
81
-include local.mk
76
82
77
83
# Headless bot does not need the full output of wget
@@ -562,11 +568,11 @@ LANG=POSIX # Avoiding sort order differences between OSes
562
568
563
569
.PHONY : app
564
570
app : b2g_sdk profile-dir
565
- @$(call run-js-command ,app)
571
+ @$(call $( BUILD_RUNNER ) ,app)
566
572
567
573
.PHONY : pre-app
568
574
pre-app : b2g_sdk profile-dir
569
- @$(call run-js-command ,pre-app)
575
+ @$(call $( BUILD_RUNNER ) ,pre-app)
570
576
571
577
# Keep old targets just for people/scripts still using it
572
578
.PHONY : post-manifest
@@ -584,7 +590,7 @@ webapp-zip: app
584
590
# Get additional extensions
585
591
$(STAGE_DIR ) /additional-extensions/downloaded.json : build/config/additional-extensions.json $(wildcard .build/config/custom-extensions.json)
586
592
ifeq ($(DESKTOP ) ,1)
587
- @$(call run-js-command ,additional-extensions)
593
+ @$(call $(BUILD_RUNNER) ,additional-extensions)
588
594
endif
589
595
590
596
profile-dir :
@@ -671,7 +677,7 @@ endif # USE_LOCAL_XULRUNNER_SDK
671
677
672
678
# Generate profile/prefs.js
673
679
preferences : profile-dir b2g_sdk
674
- @$(call run-js-command ,preferences)
680
+ @$(call $( BUILD_RUNNER ) ,preferences)
675
681
676
682
# Generate profile/settings.json
677
683
settings : pre-app
@@ -933,10 +939,10 @@ hint: node_modules/.bin/jshint
933
939
@./node_modules/.bin/jshint $(JSHINT_ARGS ) $(JSHINTED_PATH ) $(LINTED_FILES ) || (echo Please consult https://github.com/mozilla-b2g/gaia/tree/master/build/jshint/README.md to get some information about how to fix jshint issues. && exit 1)
934
940
935
941
csslint : b2g_sdk
936
- @$(call run-js-command ,csslint)
942
+ @$(call $( BUILD_RUNNER ) ,csslint)
937
943
938
944
jsonlint : b2g_sdk
939
- @$(call run-js-command ,jsonlint)
945
+ @$(call $( BUILD_RUNNER ) ,jsonlint)
940
946
941
947
# Erase all the indexedDB databases on the phone, so apps have to rebuild them.
942
948
delete-databases :
@@ -974,7 +980,7 @@ install-gaia: $(PROFILE_FOLDER) push
974
980
# push target to update the gaia files and reboot b2g
975
981
.PHONY : push
976
982
push : b2g_sdk
977
- @$(call run-js-command ,push-to-device)
983
+ @$(call $( BUILD_RUNNER ) ,push-to-device)
978
984
979
985
# Copy demo media to the sdcard.
980
986
# If we've got old style directories on the phone, rename them first.
@@ -1045,10 +1051,10 @@ really-clean: clean
1045
1051
test -d .git && cp tools/pre-commit .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit || true
1046
1052
1047
1053
build-test-unit : b2g_sdk $(NPM_INSTALLED_PROGRAMS )
1048
- @$(call run-js-command ,build-test,TEST_TYPE=unit REPORTER=$(REPORTER ) TRY_ENV=$(TRY_ENV ) TEST_FILES="$(TEST_FILES ) ")
1054
+ @$(call $( BUILD_RUNNER ) ,build-test,TEST_TYPE=unit REPORTER=$(REPORTER ) TRY_ENV=$(TRY_ENV ) TEST_FILES="$(TEST_FILES ) ")
1049
1055
1050
1056
build-test-integration : b2g_sdk $(NPM_INSTALLED_PROGRAMS )
1051
- @$(call run-js-command ,build-test,TEST_TYPE=integration REPORTER=$(REPORTER ) TRY_ENV=$(TRY_ENV ) TEST_FILES="$(TEST_FILES ) ")
1057
+ @$(call $( BUILD_RUNNER ) ,build-test,TEST_TYPE=integration REPORTER=$(REPORTER ) TRY_ENV=$(TRY_ENV ) TEST_FILES="$(TEST_FILES ) ")
1052
1058
1053
1059
build-test-unit-coverage : $(NPM_INSTALLED_PROGRAMS )
1054
1060
@$(call run-build-coverage,build/test/unit)
0 commit comments