From b8becc64eaa94290e8f325116fc16f62736141c5 Mon Sep 17 00:00:00 2001 From: Klas Johansson Date: Wed, 11 Jan 2017 23:15:04 +0100 Subject: Set ASN.1 compilation options using ERLC_ASN1_OPTS `ERLC_ASN1_OPTS` can be used to pass compiler options when compiling ASN.1 files. By default, Erlang.mk will leave this empty, but it can be redefined in a Makefile. --- test/core_app.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test') diff --git a/test/core_app.mk b/test/core_app.mk index ae09e7c..da15782 100644 --- a/test/core_app.mk +++ b/test/core_app.mk @@ -149,6 +149,21 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" + $i "Clean the application" + $t $(MAKE) -C $(APP) clean $v + + $i "Build the application with ERLC_ASN1_OPTS set" + $t echo "ERLC_ASN1_OPTS += +'{record_name_prefix,\"FOO-\"}'" >> $(APP)/Makefile + $t $(MAKE) -C $(APP) $v + + $i "Check that the application was built with ERLC_ASN1_OPTS set" + $t $(ERL) -pa $(APP)/ebin/ -eval " \ + Attrs = 'Def':module_info(attributes), \ + Asn1Info = proplists:get_value(asn1_info, Attrs), \ + Opts = proplists:get_value(options, Asn1Info), \ + true = lists:member({record_name_prefix, \"FOO-\"}, Opts), \ + halt()" + core-app-auto-git-id: build clean $i "Bootstrap a new OTP library named $(APP)" -- cgit v1.2.3