aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile11
-rw-r--r--appveyor.yml3
-rw-r--r--circle.yml4
-rw-r--r--core/erlc.mk4
-rw-r--r--plugins/bootstrap.mk6
-rw-r--r--test/core_app.mk22
-rw-r--r--test/plugin_bootstrap.mk6
7 files changed, 48 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 3e7364a..5eff5d6 100644
--- a/Makefile
+++ b/Makefile
@@ -24,12 +24,17 @@ all:
awk 'FNR==1 && NR!=1{print ""}1' $(patsubst %,%.mk,$(BUILD_CONFIG)) \
| sed 's/^ERLANG_MK_VERSION = .*/ERLANG_MK_VERSION = $(ERLANG_MK_VERSION)/' > $(ERLANG_MK)
-ifeq ($(p),)
+ifdef p
check:
- $(MAKE) -C test
+ $(MAKE) -C test pkg-$p
else
+ifdef c
check:
- $(MAKE) -C test pkg-$(p)
+ $(MAKE) -C test $c LEGACY=$(LEGACY)
+else
+check:
+ $(MAKE) -C test LEGACY=$(LEGACY)
+endif
endif
clean:
diff --git a/appveyor.yml b/appveyor.yml
index 20a6947..5e8e5af 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -3,4 +3,5 @@ build_script:
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Sy"
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S git make"
test_script:
-- C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER && make -k check"
+- C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER && make -j 32 -k check"
+- C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER && make -j 32 -k check LEGACY=1"
diff --git a/circle.yml b/circle.yml
index 73b087e..25e1f13 100644
--- a/circle.yml
+++ b/circle.yml
@@ -17,5 +17,5 @@ dependencies:
test:
override:
- - source $HOME/erlang/OTP-18.0.2/activate && make check:
- timeout: 7200
+ - source $HOME/erlang/OTP-18.0.2/activate && make -j 32 -k check:
+ - source $HOME/erlang/OTP-18.0.2/activate && make -j 32 -k check LEGACY=1:
diff --git a/core/erlc.mk b/core/erlc.mk
index 1a73698..fbba7ae 100644
--- a/core/erlc.mk
+++ b/core/erlc.mk
@@ -57,7 +57,7 @@ define app_file
{application, $(PROJECT), [
{description, "$(PROJECT_DESCRIPTION)"},
{vsn, "$(PROJECT_VERSION)"},
- $(if $(IS_DEP),{id, "$(1)"},)
+ $(if $(IS_DEP),{id$(comma)$(space)"$(1)"}$(comma))
{modules, [$(call comma_list,$(2))]},
{registered, []},
{applications, [$(call comma_list,kernel stdlib $(OTP_DEPS) $(DEPS))]}
@@ -201,7 +201,7 @@ ebin/$(PROJECT).app:: $(ERL_FILES) $(CORE_FILES)
$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \
$(filter-out $(ERLC_EXCLUDE_PATHS),$(ERL_FILES) $(CORE_FILES)))))))
ifeq ($(wildcard src/$(PROJECT).app.src),)
- $(app_verbose) echo $(subst $(newline),,$(subst ",\",$(call app_file,$(GITDESCRIBE),$(MODULES)))) \
+ $(app_verbose) echo "$(subst $(newline),,$(subst ",\",$(call app_file,$(GITDESCRIBE),$(MODULES))))" \
> ebin/$(PROJECT).app
else
$(verbose) if [ -z "$$(grep -E '^[^%]*{\s*modules\s*,' src/$(PROJECT).app.src)" ]; then \
diff --git a/plugins/bootstrap.mk b/plugins/bootstrap.mk
index 7f8331e..44f10ea 100644
--- a/plugins/bootstrap.mk
+++ b/plugins/bootstrap.mk
@@ -49,6 +49,8 @@ endef
ifdef SP
define bs_Makefile
PROJECT = $(PROJECT)
+PROJECT_DESCRIPTION = New project
+PROJECT_VERSION = 0.0.1
# Whitespace to be used when creating files from templates.
SP = $(SP)
@@ -355,7 +357,9 @@ ifneq ($(wildcard src/),)
endif
$(call render_template,bs_Makefile,Makefile)
$(verbose) mkdir src/
+ifdef LEGACY
$(call render_template,bs_appsrc,src/$(PROJECT).app.src)
+endif
$(call render_template,bs_app,src/$(PROJECT)_app.erl)
$(eval n := $(PROJECT)_sup)
$(call render_template,tpl_supervisor,src/$(PROJECT)_sup.erl)
@@ -366,7 +370,9 @@ ifneq ($(wildcard src/),)
endif
$(call render_template,bs_Makefile,Makefile)
$(verbose) mkdir src/
+ifdef LEGACY
$(call render_template,bs_appsrc_lib,src/$(PROJECT).app.src)
+endif
bootstrap-rel:
ifneq ($(wildcard relx.config),)
diff --git a/test/core_app.mk b/test/core_app.mk
index a782e65..1acaef1 100644
--- a/test/core_app.mk
+++ b/test/core_app.mk
@@ -91,7 +91,9 @@ core-app-asn1: build clean-core-app-asn1
$t test -f $(APP)/asn1/CAP.asn1
$t test -f $(APP)/asn1/Def.asn1
$t test -f $(APP)/include/unrelated.hrl
+ifdef LEGACY
$t test -f $(APP)/src/$(APP).app.src
+endif
$t test -f $(APP)/src/use_cap.erl
$t test -f $(APP)/src/use_def.erl
@@ -292,7 +294,9 @@ core-app-generate-erl: build clean-core-app-generate-erl
$t test -f $(APP)/Makefile
$t test -f $(APP)/erlang.mk
$t test -f $(APP)/script.sh
+ifdef LEGACY
$t test -f $(APP)/src/$(APP).app.src
+endif
$t test -f $(APP)/src/boy.erl
$t test -f $(APP)/src/girl.erl
@@ -457,7 +461,9 @@ core-app-generate-erl-prepend: build clean-core-app-generate-erl-prepend
$t test -f $(APP)/Makefile
$t test -f $(APP)/erlang.mk
$t test -f $(APP)/script.sh
+ifdef LEGACY
$t test -f $(APP)/src/$(APP).app.src
+endif
$t test -f $(APP)/src/boy.erl
$t test -f $(APP)/src/girl.erl
@@ -556,7 +562,9 @@ core-app-hrl: build clean-core-app-hrl
$t test -f $(APP)/erlang.mk
$t test -f $(APP)/include/blue.hrl
$t test -f $(APP)/include/red.hrl
+ifdef LEGACY
$t test -f $(APP)/src/$(APP).app.src
+endif
$t test -f $(APP)/src/use_blue.erl
$t test -f $(APP)/src/use_red.erl
@@ -643,7 +651,9 @@ core-app-hrl-recursive: build clean-core-app-hrl-recursive
$t test -f $(APP)/include/blue.hrl
$t test -f $(APP)/include/pill.hrl
$t test -f $(APP)/include/red.hrl
+ifdef LEGACY
$t test -f $(APP)/src/$(APP).app.src
+endif
$t test -f $(APP)/src/use_blue.erl
$t test -f $(APP)/src/use_red.erl
@@ -740,7 +750,9 @@ core-app-mib: build clean-core-app-mib
$t test -f $(APP)/include/unrelated.hrl
$t test -f $(APP)/mibs/EX1-MIB.mib
$t test -f $(APP)/mibs/OTP-REG.mib
+ifdef LEGACY
$t test -f $(APP)/src/$(APP).app.src
+endif
$t test -f $(APP)/src/use_v1.erl
$t test -f $(APP)/src/use_v2.erl
@@ -867,7 +879,9 @@ NO_MAKEDEP ?= 1\
$t test -f $(APP)/erlang.mk
$t test -f $(APP)/include/blue.hrl
$t test -f $(APP)/include/red.hrl
+ifdef LEGACY
$t test -f $(APP)/src/$(APP).app.src
+endif
$t test -f $(APP)/src/use_blue.erl
$t test -f $(APP)/src/use_red.erl
@@ -956,7 +970,9 @@ core-app-xrl: build clean-core-app-xrl
$i "Check that source files still exist"
$t test -f $(APP)/Makefile
$t test -f $(APP)/erlang.mk
+ifdef LEGACY
$t test -f $(APP)/src/$(APP).app.src
+endif
$t test -f $(APP)/src/boy.erl
$t test -f $(APP)/src/erlang_scan.xrl
$t test -f $(APP)/src/girl.erl
@@ -1092,7 +1108,9 @@ core-app-xrl-include: build clean-core-app-xrl-include
$i "Check that source files still exist"
$t test -f $(APP)/Makefile
$t test -f $(APP)/erlang.mk
+ifdef LEGACY
$t test -f $(APP)/src/$(APP).app.src
+endif
$t test -f $(APP)/src/boy.erl
$t test -f $(APP)/src/girl.erl
$t test -f $(APP)/src/errvals.hrl
@@ -1186,7 +1204,9 @@ core-app-yrl: build clean-core-app-yrl
$i "Check that source files still exist"
$t test -f $(APP)/Makefile
$t test -f $(APP)/erlang.mk
+ifdef LEGACY
$t test -f $(APP)/src/$(APP).app.src
+endif
$t test -f $(APP)/src/boy.erl
$t test -f $(APP)/src/girl.erl
$t test -f $(APP)/src/xmerl_xpath_parse.yrl
@@ -1297,7 +1317,9 @@ core-app-yrl-include: build clean-core-app-yrl-include
$i "Check that source files still exist"
$t test -f $(APP)/Makefile
$t test -f $(APP)/erlang.mk
+ifdef LEGACY
$t test -f $(APP)/src/$(APP).app.src
+endif
$t test -f $(APP)/src/boy.erl
$t test -f $(APP)/src/core_parse.hrl
$t test -f $(APP)/src/core_parse.yrl
diff --git a/test/plugin_bootstrap.mk b/test/plugin_bootstrap.mk
index b927a92..16bfb58 100644
--- a/test/plugin_bootstrap.mk
+++ b/test/plugin_bootstrap.mk
@@ -22,7 +22,9 @@ bootstrap-app: build clean-bootstrap-app
$i "Check that all bootstrapped files exist"
$t test -f $(APP)/Makefile
+ifdef LEGACY
$t test -f $(APP)/src/$(APP).app.src
+endif
$t test -f $(APP)/src/$(APP)_app.erl
$t test -f $(APP)/src/$(APP)_sup.erl
@@ -51,7 +53,9 @@ bootstrap-lib: build clean-bootstrap-lib
$i "Check that all bootstrapped files exist"
$t test -f $(APP)/Makefile
+ifdef LEGACY
$t test -f $(APP)/src/$(APP).app.src
+endif
$i "Build the application"
$t $(MAKE) -C $(APP) $v
@@ -77,7 +81,9 @@ bootstrap-rel: build clean-bootstrap-rel
$t test -f $(APP)/relx.config
$t test -f $(APP)/rel/sys.config
$t test -f $(APP)/rel/vm.args
+ifdef LEGACY
$t test -f $(APP)/src/$(APP).app.src
+endif
$t test -f $(APP)/src/$(APP)_app.erl
$t test -f $(APP)/src/$(APP)_sup.erl