diff options
author | Jean-Sébastien Pédron <[email protected]> | 2016-08-29 15:28:44 +0200 |
---|---|---|
committer | Jean-Sébastien Pédron <[email protected]> | 2016-09-08 13:46:15 +0200 |
commit | 6c546accfcb2ad6264c16f62e74d35367dabb72c (patch) | |
tree | f0c332430ef385489946bde4107fed92e953e6d1 /test | |
parent | 8a20b423784a7ccf223dbabe4d78daa675823664 (diff) | |
download | erlang.mk-6c546accfcb2ad6264c16f62e74d35367dabb72c.tar.gz erlang.mk-6c546accfcb2ad6264c16f62e74d35367dabb72c.tar.bz2 erlang.mk-6c546accfcb2ad6264c16f62e74d35367dabb72c.zip |
dialyzer.mk: Use the shell to parse command line args
Splitting arguments on `-` was dangerous: if a path contained such a
character, it would be split and the second half thrown away by the
filtering.
Now, `$(ERLC_OPTS)` is passed to erl(1) after `-extra`. Thus
arguments parsing is done by the shell and we only have to call
init:get_plain_arguments/0 to get them as a list.
Diffstat (limited to 'test')
-rw-r--r-- | test/plugin_dialyzer.mk | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/plugin_dialyzer.mk b/test/plugin_dialyzer.mk index 3143319..2f6f9db 100644 --- a/test/plugin_dialyzer.mk +++ b/test/plugin_dialyzer.mk @@ -166,18 +166,18 @@ dialyzer-erlc-opts: build clean $t $(MAKE) -C $(APP) -f erlang.mk bootstrap $v $i "Create a header file in a non-standard directory" - $t mkdir $(APP)/exotic/ - $t touch $(APP)/exotic/dialyze.hrl + $t mkdir $(APP)/exotic-include-path/ + $t touch $(APP)/exotic-include-path/dialyze.hrl $i "Create a module that includes this header" $t printf "%s\n" \ "-module(no_warn)." \ "-export([doit/0])." \ "-include(\"dialyze.hrl\")." \ - "doit() -> ok." > $(APP)/src/no_warn.erl + "doit() -> ?OK." > $(APP)/src/no_warn.erl $i "Point ERLC_OPTS to the non-standard include directory" - $t perl -ni.bak -e 'print;if ($$.==1) {print "ERLC_OPTS += -I exotic\n"}' $(APP)/Makefile + $t perl -ni.bak -e 'print;if ($$.==1) {print "ERLC_OPTS += -I exotic-include-path -DOK=ok\n"}' $(APP)/Makefile $i "Run Dialyzer" $t $(DIALYZER_MUTEX) $(MAKE) -C $(APP) dialyze $v |