From 83afc2bb71622957c062bd2545d76e86fceccf39 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Tue, 4 Dec 2012 11:18:00 +0100 Subject: Add patch target to makefile For building unofficial patches. --- lib/diameter/src/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/diameter/src/Makefile') diff --git a/lib/diameter/src/Makefile b/lib/diameter/src/Makefile index 3cbcbf536e..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) \ @@ -123,6 +123,12 @@ gen/diameter_gen_%.erl gen/diameter_gen_%.hrl: dict/%.dia 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 @@ -267,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) -- cgit v1.2.3