diff options
author | Anders Svensson <[email protected]> | 2012-12-04 11:18:00 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2013-01-23 16:59:57 +0100 |
commit | 83afc2bb71622957c062bd2545d76e86fceccf39 (patch) | |
tree | ed6afeb6bbd308b11273d3c4b18b8ebac4f1d535 /lib | |
parent | 4c97cddddbe7c193953dbb58c342069330e3324c (diff) | |
download | otp-83afc2bb71622957c062bd2545d76e86fceccf39.tar.gz otp-83afc2bb71622957c062bd2545d76e86fceccf39.tar.bz2 otp-83afc2bb71622957c062bd2545d76e86fceccf39.zip |
Add patch target to makefile
For building unofficial patches.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/diameter/src/Makefile | 10 | ||||
-rw-r--r-- | lib/diameter/vsn.mk | 5 |
2 files changed, 9 insertions, 6 deletions
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) diff --git a/lib/diameter/vsn.mk b/lib/diameter/vsn.mk index 7b2208137b..0ae1a5cf45 100644 --- a/lib/diameter/vsn.mk +++ b/lib/diameter/vsn.mk @@ -19,7 +19,4 @@ APPLICATION = diameter DIAMETER_VSN = 1.3.1 -PRE_VSN = -APP_VSN = "$(APPLICATION)-$(DIAMETER_VSN)$(PRE_VSN)" - -TICKETS = +APP_VSN = $(APPLICATION)-$(DIAMETER_VSN)$(PRE_VSN) |