diff options
Diffstat (limited to 'lib/diameter/src/Makefile')
-rw-r--r-- | lib/diameter/src/Makefile | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/diameter/src/Makefile b/lib/diameter/src/Makefile index 060659bce9..a08c204a23 100644 --- a/lib/diameter/src/Makefile +++ b/lib/diameter/src/Makefile @@ -104,7 +104,7 @@ endif ERL_COMPILE_FLAGS += \ +'{parse_transform,sys_pre_attributes}' \ - +'{attribute,insert,app_vsn,$(APP_VSN)}' \ + +'{attribute,insert,app_vsn,"$(APP_VSN)"}' \ +warn_export_vars \ +warn_unused_vars \ -pa $(ABS_EBIN) \ @@ -119,26 +119,34 @@ ERL_COMPILE_FLAGS += \ # erl/hrl from dictionary file. gen/diameter_gen_%.erl gen/diameter_gen_%.hrl: dict/%.dia - ../bin/diameterc -o gen -i $(EBIN) $< + $(dia_verbose)../bin/diameterc -o gen -i $(EBIN) $< opt: $(TARGET_FILES) +# Build unofficial patches with some degree of traceability. Refuse to +# build if there are diffs from HEAD since that defeats the purpose. +patch: + git diff --exit-code HEAD + $(MAKE) opt PRE_VSN="-$(shell git rev-list --max-count=1 HEAD | cut -c 1-8)" + debug: @$(MAKE) TYPE=debug opt # The dictionary parser. gen/$(DICT_YRL).erl: compiler/$(DICT_YRL).yrl - $(ERLC) -Werror -o $(@D) $< + $(yecc_verbose)$(ERLC) -Werror -o $(@D) $< # Generate the app file. $(APP_TARGET): $(APP_SRC) ../vsn.mk modules.mk - M=`echo $(notdir $(APP_MODULES)) | tr ' ' ,`; \ + $(gen_verbose)M=`echo $(notdir $(APP_MODULES)) | tr ' ' ,`; \ + R=`echo $(REGISTERED) | tr ' ' ,`; \ sed -e 's;%VSN%;$(VSN);' \ -e "s;%MODULES%;$$M;" \ + -e "s;%REGISTERED%;$$R;" \ $< > $@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk - sed -e 's;%VSN%;$(VSN);' $< > $@ + $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@ app: $(APP_TARGET) $(APPUP_TARGET) dict: $(DICT_ERLS) @@ -254,7 +262,7 @@ depend: depend.mk # Generate dependencies makefile. depend.mk: depend.sed $(MODULES:%=%.erl) Makefile - (for f in $(MODULES); do \ + $(gen_verbose)(for f in $(MODULES); do \ (echo $$f; cat $$f.erl) | sed -f $<; \ done) \ > $@ @@ -265,7 +273,7 @@ depend.mk: depend.sed $(MODULES:%=%.erl) Makefile .PHONY: debug opt release_docs_spec release_spec .PHONY: $(TARGET_DIRS:%/=%) $(TARGET_DIRS:%/=release_src_%) .PHONY: $(EXAMPLE_DIRS:%/=release_examples_%) -.PHONY: plt dialyze +.PHONY: plt dialyze patch # Keep intermediate files. .SECONDARY: $(DICT_ERLS) $(DICT_HRLS) gen/$(DICT_YRL:%=%.erl) |