From da05859f4bef76b8b933c65ee764c48a97b4baf5 Mon Sep 17 00:00:00 2001 From: nevar Date: Mon, 8 Aug 2016 14:23:16 +0700 Subject: Escape % in app_file template --- test/core_app.mk | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'test/core_app.mk') diff --git a/test/core_app.mk b/test/core_app.mk index e568947..0276390 100644 --- a/test/core_app.mk +++ b/test/core_app.mk @@ -1,6 +1,6 @@ # Core: Building applications. -CORE_APP_CASES = appsrc-change asn1 auto-git-id env erlc-exclude erlc-opts erlc-opts-filter error generate-erl generate-erl-include generate-erl-prepend hrl hrl-recursive makefile-change mib no-app no-makedep project-mod pt pt-erlc-opts xrl xrl-include yrl yrl-header yrl-include +CORE_APP_CASES = appsrc-change asn1 auto-git-id env erlc-exclude erlc-opts erlc-opts-filter error generate-erl generate-erl-include generate-erl-prepend hrl hrl-recursive makefile-change mib name-special-char no-app no-makedep project-mod pt pt-erlc-opts xrl xrl-include yrl yrl-header yrl-include CORE_APP_TARGETS = $(addprefix core-app-,$(CORE_APP_CASES)) .PHONY: core-app $(CORE_APP_TARGETS) @@ -920,6 +920,27 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" +ifndef LEGACY +core-app-name-special-char: build clean + + $i "Bootstrap a new OTP library named $(APP)" + $t mkdir $(APP)/ + $t cp ../erlang.mk $(APP)/ + $t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v + + $i "Set PROJECT_DESCRIPTION = test % in the Makefile" + $t echo "PROJECT_DESCRIPTION = test %" >> $(APP)/Makefile + + $i "Build the application" + $t $(MAKE) -C $(APP) $v + + $i "Check that the application was compiled correctly" + $t $(ERL) -pa $(APP)/ebin/ -eval " \ + ok = application:load($(APP)), \ + {ok,\"test %\"} = application:get_key($(APP), description), \ + halt()" +endif + core-app-no-app: build clean $i "Bootstrap a project without an OTP library" -- cgit v1.2.3