diff options
| author | Jean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr> | 2015-10-13 19:21:51 +0200 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr> | 2015-10-20 11:10:48 +0200 |
| commit | 4e7c8ea5683b23680f440040a8ff9d40b4ccd612 (patch) | |
| tree | 903a4f9adeab37551a1d1900b28799f07cbf2487 /erlang.mk | |
| parent | 768ac915ae402eed1a7f36f4c555971f3ed7ec2a (diff) | |
| download | rabbitmq-server-git-4e7c8ea5683b23680f440040a8ff9d40b4ccd612.tar.gz | |
Update erlang.mk
Diffstat (limited to 'erlang.mk')
| -rw-r--r-- | erlang.mk | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -16,7 +16,7 @@ ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST))) -ERLANG_MK_VERSION = 1.2.0-816-g7704617-dirty +ERLANG_MK_VERSION = 1.2.0-820-gb6b7035-dirty # Core configuration. @@ -4902,12 +4902,14 @@ endef ebin/$(PROJECT).app:: $(ERL_FILES) $(CORE_FILES) $(if $(strip $?),$(call compile_erl,$?)) + +ebin/$(PROJECT).app:: $(eval GITDESCRIBE := $(shell git describe --dirty --abbrev=7 --tags --always --first-parent 2>/dev/null || true)) $(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \ $(filter-out $(ERLC_EXCLUDE_PATHS),$(ERL_FILES) $(CORE_FILES) $(BEAM_FILES))))))) ifeq ($(wildcard src/$(PROJECT).app.src),) $(app_verbose) printf "$(subst $(newline),\n,$(subst ",\",$(call app_file,$(GITDESCRIBE),$(MODULES))))" \ - > ebin/$(PROJECT).app + > $@.new else $(verbose) if [ -z "$$(grep -E '^[^%]*{\s*modules\s*,' src/$(PROJECT).app.src)" ]; then \ echo "Empty modules entry not found in $(PROJECT).app.src. Please consult the erlang.mk README for instructions." >&2; \ @@ -4916,8 +4918,13 @@ else $(appsrc_verbose) cat src/$(PROJECT).app.src \ | sed "s/{[[:space:]]*modules[[:space:]]*,[[:space:]]*\[\]}/{modules, \[$(call comma_list,$(MODULES))\]}/" \ | sed "s/{id,[[:space:]]*\"git\"}/{id, \"$(GITDESCRIBE)\"}/" \ - > ebin/$(PROJECT).app + > $@.new endif + $(verbose) if test -f "$@" && cmp -s "$@" "$@.new"; then \ + rm $@.new; \ + else \ + mv $@.new $@; \ + fi clean:: clean-app |
