Finish `make source-dist` and update erlang.mk
This commit is contained in:
		
							parent
							
								
									0f3a9ac85d
								
							
						
					
					
						commit
						fe61400611
					
				
							
								
								
									
										103
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										103
									
								
								Makefile
								
								
								
								
							|  | @ -2,6 +2,14 @@ PROJECT = rabbit | ||||||
| 
 | 
 | ||||||
| DEPS = rabbit_common | DEPS = rabbit_common | ||||||
| 
 | 
 | ||||||
|  | SRCDIST_DEPS ?= rabbitmq_shovel | ||||||
|  | 
 | ||||||
|  | ifneq ($(IS_DEP),1) | ||||||
|  | ifneq ($(findstring source-dist,$(MAKECMDGOALS)),) | ||||||
|  | DEPS += $(SRCDIST_DEPS) | ||||||
|  | endif | ||||||
|  | endif | ||||||
|  | 
 | ||||||
| # For RabbitMQ repositories, we want to checkout branches which match
 | # For RabbitMQ repositories, we want to checkout branches which match
 | ||||||
| # the parent porject. For instance, if the parent project is on a
 | # the parent porject. For instance, if the parent project is on a
 | ||||||
| # release tag, dependencies must be on the same release tag. If the
 | # release tag, dependencies must be on the same release tag. If the
 | ||||||
|  | @ -19,6 +27,7 @@ export base_rmq_ref | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| dep_rabbit_common = git https://github.com/rabbitmq/rabbitmq-common.git $(current_rmq_ref) $(base_rmq_ref) | dep_rabbit_common = git https://github.com/rabbitmq/rabbitmq-common.git $(current_rmq_ref) $(base_rmq_ref) | ||||||
|  | dep_rabbitmq_shovel = git https://github.com/rabbitmq/rabbitmq-shovel.git $(current_rmq_ref) $(base_rmq_ref) | ||||||
| 
 | 
 | ||||||
| define usage_xml_to_erl | define usage_xml_to_erl | ||||||
| $(subst __,_,$(patsubst $(DOCS_DIR)/rabbitmq%.1.xml, src/rabbit_%_usage.erl, $(subst -,_,$(1)))) | $(subst __,_,$(patsubst $(DOCS_DIR)/rabbitmq%.1.xml, src/rabbit_%_usage.erl, $(subst -,_,$(1)))) | ||||||
|  | @ -45,8 +54,8 @@ DEP_PLUGINS = rabbit_common/mk/rabbitmq-run.mk | ||||||
| # FIXME: Use erlang.mk patched for RabbitMQ, while waiting for PRs to be
 | # FIXME: Use erlang.mk patched for RabbitMQ, while waiting for PRs to be
 | ||||||
| # reviewed and merged.
 | # reviewed and merged.
 | ||||||
| 
 | 
 | ||||||
| ERLANG_MK_GIT_REPOSITORY = https://github.com/rabbitmq/erlang.mk.git | ERLANG_MK_REPO = https://github.com/rabbitmq/erlang.mk.git | ||||||
| ERLANG_MK_GIT_REF = rabbitmq-tmp | ERLANG_MK_COMMIT = rabbitmq-tmp | ||||||
| 
 | 
 | ||||||
| include erlang.mk | include erlang.mk | ||||||
| 
 | 
 | ||||||
|  | @ -163,68 +172,72 @@ distclean-manpages:: | ||||||
| .PHONY: source-dist | .PHONY: source-dist | ||||||
| 
 | 
 | ||||||
| SOURCE_DIST_BASE ?= rabbitmq-server | SOURCE_DIST_BASE ?= rabbitmq-server | ||||||
| SOURCE_DIST_SUFFIXES ?= tar.xz | SOURCE_DIST_SUFFIXES ?= tar.xz zip | ||||||
| SOURCE_DIST ?= $(SOURCE_DIST_BASE)-$(VERSION) | SOURCE_DIST ?= $(SOURCE_DIST_BASE)-$(VERSION) | ||||||
| 
 | 
 | ||||||
| SOURCE_DIST_FILES = $(addprefix $(SOURCE_DIST).,$(SOURCE_DIST_SUFFIXES)) | SOURCE_DIST_FILES = $(addprefix $(SOURCE_DIST).,$(SOURCE_DIST_SUFFIXES)) | ||||||
| 
 | 
 | ||||||
| SRCDIST_DEPS ?= rabbitmq_shovel |  | ||||||
| 
 |  | ||||||
| dep_rabbitmq_shovel = git https://github.com/rabbitmq/rabbitmq-shovel.git $(current_rmq_ref) $(base_rmq_ref) |  | ||||||
| 
 |  | ||||||
| ALL_SRCDIST_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(SRCDIST_DEPS)) |  | ||||||
| 
 |  | ||||||
| $(foreach dep,$(SRCDIST_DEPS),$(eval $(call dep_target,$(dep)))) |  | ||||||
| 
 |  | ||||||
| .PHONY: $(SOURCE_DIST_FILES) | .PHONY: $(SOURCE_DIST_FILES) | ||||||
| 
 | 
 | ||||||
| source-dist: $(SOURCE_DIST_FILES) | source-dist: $(SOURCE_DIST_FILES) | ||||||
| 	@: | 	@: | ||||||
| 
 | 
 | ||||||
| TAR ?= tar | RSYNC ?= rsync | ||||||
| TAR_VERSION = $(shell $(TAR) --version) | RSYNC_V_0 = | ||||||
|  | RSYNC_V_1 = -v | ||||||
|  | RSYNC_V = $(RSYNC_V_$(V)) | ||||||
|  | RSYNC_FLAGS += -a $(RSYNC_V)		\
 | ||||||
|  | 	       --exclude '.sw?' --exclude '.*.sw?'	\
 | ||||||
|  | 	       --exclude '*.beam'			\
 | ||||||
|  | 	       --exclude '*.pyc'			\
 | ||||||
|  | 	       --exclude '.git*'			\
 | ||||||
|  | 	       --exclude '$(notdir $(ERLANG_MK_TMP))'	\
 | ||||||
|  | 	       --exclude '$(SOURCE_DIST_BASE)-*'	\
 | ||||||
|  | 	       --exclude 'ebin'				\
 | ||||||
|  | 	       --exclude 'packaging'			\
 | ||||||
|  | 	       --exclude 'erl_crash.dump'		\
 | ||||||
|  | 	       --exclude 'deps'				\
 | ||||||
|  | 	       --delete					\
 | ||||||
|  | 	       --delete-excluded | ||||||
| 
 | 
 | ||||||
|  | TAR ?= tar | ||||||
| TAR_V_0 = | TAR_V_0 = | ||||||
| TAR_V_1 = -v | TAR_V_1 = -v | ||||||
| TAR_V = $(TAR_V_$(V)) | TAR_V = $(TAR_V_$(V)) | ||||||
| TAR_FLAGS = $(TAR_V) -cf -				\
 |  | ||||||
| 	    --exclude '.sw?' --exclude '.*.sw?'		\
 |  | ||||||
| 	    --exclude '*.beam'				\
 |  | ||||||
| 	    --exclude '.git*'				\
 |  | ||||||
| 	    --exclude '$(notdir $(ERLANG_MK_TMP))'	\
 |  | ||||||
| 	    --exclude '$(SOURCE_DIST_BASE)-*'		\
 |  | ||||||
| 	    --exclude 'packaging' |  | ||||||
| 
 | 
 | ||||||
| ifneq (,$(findstring GNU tar,$(TAR_VERSION))) | GZIP ?= gzip | ||||||
| define tar_source_dist | BZIP2 ?= bzip2 | ||||||
| $(TAR) $(TAR_FLAGS) \ | XZ ?= xz | ||||||
| 	--transform 's/^\./$(SOURCE_DIST)/' \
 |  | ||||||
| 	--show-transformed \
 |  | ||||||
| 	. |  | ||||||
| endef |  | ||||||
| endif |  | ||||||
| 
 | 
 | ||||||
| ifneq (,$(findstring bsdtar,$(TAR_VERSION))) | ZIP ?= zip | ||||||
| define tar_source_dist | ZIP_V_0 = -q | ||||||
| $(TAR) $(TAR_FLAGS) \ | ZIP_V_1 = | ||||||
| 	-s '/^\./$(SOURCE_DIST)/' \
 | ZIP_V = $(ZIP_V_$(V)) | ||||||
| 	. |  | ||||||
| endef |  | ||||||
| endif |  | ||||||
| 
 | 
 | ||||||
| $(SOURCE_DIST).tar.gz: $(ALL_DEPS_DIRS) $(ALL_SRCDIST_DEPS_DIRS) | .PHONY: $(SOURCE_DIST) | ||||||
| 	$(gen_verbose) $(call tar_source_dist) \
 |  | ||||||
| 	| gzip --best > $@ |  | ||||||
| 
 | 
 | ||||||
| $(SOURCE_DIST).tar.bz2: $(ALL_DEPS_DIRS) $(ALL_SRCDIST_DEPS_DIRS) | $(SOURCE_DIST): $(ERLANG_MK_RECURSIVE_DEPS_LIST) | ||||||
| 	$(gen_verbose) $(call tar_source_dist) \
 | 	$(gen_verbose) $(RSYNC) $(RSYNC_FLAGS) ./ $(SOURCE_DIST)/ | ||||||
| 	| bzip2 > $@ | 	$(verbose) mkdir -p $(SOURCE_DIST)/deps | ||||||
|  | 	$(verbose) for dep in $$(cat $(ERLANG_MK_RECURSIVE_DEPS_LIST)); do \
 | ||||||
|  | 		$(RSYNC) $(RSYNC_FLAGS) \
 | ||||||
|  | 		 $$dep \
 | ||||||
|  | 		 $(SOURCE_DIST)/deps; \
 | ||||||
|  | 	done | ||||||
| 
 | 
 | ||||||
| $(SOURCE_DIST).tar.xz: $(ALL_DEPS_DIRS) $(ALL_SRCDIST_DEPS_DIRS) | $(SOURCE_DIST).tar.gz: $(SOURCE_DIST) | ||||||
| 	$(gen_verbose) $(call tar_source_dist) \
 | 	$(gen_verbose) $(TAR) -cf - $(TAR_V) $(SOURCE_DIST) | $(GZIP) --best > $@ | ||||||
| 	| xz > $@ | 
 | ||||||
|  | $(SOURCE_DIST).tar.bz2: $(SOURCE_DIST) | ||||||
|  | 	$(gen_verbose) $(TAR) -cf - $(TAR_V) $(SOURCE_DIST) | $(BZIP2) > $@ | ||||||
|  | 
 | ||||||
|  | $(SOURCE_DIST).tar.xz: $(SOURCE_DIST) | ||||||
|  | 	$(gen_verbose) $(TAR) -cf - $(TAR_V) $(SOURCE_DIST) | $(XZ) > $@ | ||||||
|  | 
 | ||||||
|  | $(SOURCE_DIST).zip: $(SOURCE_DIST) | ||||||
|  | 	$(gen_verbose) $(ZIP) -r $(ZIP_V) $@ $(SOURCE_DIST) | ||||||
| 
 | 
 | ||||||
| clean:: clean-source-dist | clean:: clean-source-dist | ||||||
| 
 | 
 | ||||||
| clean-source-dist: | clean-source-dist: | ||||||
| 	$(gen_verbose) rm -f $(SOURCE_DIST).* | 	$(gen_verbose) rm -rf -- $(SOURCE_DIST_BASE)-* | ||||||
|  |  | ||||||
|  | @ -16,7 +16,7 @@ | ||||||
| 
 | 
 | ||||||
| ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST))) | ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST))) | ||||||
| 
 | 
 | ||||||
| ERLANG_MK_VERSION = 1.2.0-700-g8140907-dirty | ERLANG_MK_VERSION = 1.2.0-738-gaac8996-dirty | ||||||
| 
 | 
 | ||||||
| # Core configuration.
 | # Core configuration.
 | ||||||
| 
 | 
 | ||||||
|  | @ -45,7 +45,6 @@ export ERLANG_MK_TMP | ||||||
| ERL = erl +A0 -noinput -boot start_clean | ERL = erl +A0 -noinput -boot start_clean | ||||||
| 
 | 
 | ||||||
| # Platform detection.
 | # Platform detection.
 | ||||||
| # @todo Add Windows/Cygwin detection eventually.
 |  | ||||||
| 
 | 
 | ||||||
| ifeq ($(PLATFORM),) | ifeq ($(PLATFORM),) | ||||||
| UNAME_S := $(shell uname -s) | UNAME_S := $(shell uname -s) | ||||||
|  | @ -64,6 +63,10 @@ else ifeq ($(UNAME_S),NetBSD) | ||||||
| PLATFORM = netbsd | PLATFORM = netbsd | ||||||
| else ifeq ($(UNAME_S),OpenBSD) | else ifeq ($(UNAME_S),OpenBSD) | ||||||
| PLATFORM = openbsd | PLATFORM = openbsd | ||||||
|  | else ifeq ($(UNAME_S),DragonFly) | ||||||
|  | PLATFORM = dragonfly | ||||||
|  | else ifeq ($(shell uname -o),Msys) | ||||||
|  | PLATFORM = msys2 | ||||||
| else | else | ||||||
| $(error Unable to detect platform. Please open a ticket with the output of uname -a.) | $(error Unable to detect platform. Please open a ticket with the output of uname -a.) | ||||||
| endif | endif | ||||||
|  | @ -90,7 +93,10 @@ ifneq ($(wildcard erl_crash.dump),) | ||||||
| 	$(gen_verbose) rm -f erl_crash.dump | 	$(gen_verbose) rm -f erl_crash.dump | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| distclean:: clean | distclean:: clean distclean-tmp | ||||||
|  | 
 | ||||||
|  | distclean-tmp: | ||||||
|  | 	$(gen_verbose) rm -rf $(ERLANG_MK_TMP) | ||||||
| 
 | 
 | ||||||
| help:: | help:: | ||||||
| 	$(verbose) printf "%s\n" \
 | 	$(verbose) printf "%s\n" \
 | ||||||
|  | @ -103,6 +109,8 @@ help:: | ||||||
| 		"  all           Run deps, app and rel targets in that order" \
 | 		"  all           Run deps, app and rel targets in that order" \
 | ||||||
| 		"  app           Compile the project" \
 | 		"  app           Compile the project" \
 | ||||||
| 		"  deps          Fetch dependencies (if needed) and compile them" \
 | 		"  deps          Fetch dependencies (if needed) and compile them" \
 | ||||||
|  | 		"  fetch-deps    Fetch dependencies (if needed) without compiling them" \
 | ||||||
|  | 		"  list-deps     Fetch dependencies (if needed) and list them" \
 | ||||||
| 		"  search q=...  Search for a package in the built-in index" \
 | 		"  search q=...  Search for a package in the built-in index" \
 | ||||||
| 		"  rel           Build a release for this project, if applicable" \
 | 		"  rel           Build a release for this project, if applicable" \
 | ||||||
| 		"  docs          Build the documentation for this project" \
 | 		"  docs          Build the documentation for this project" \
 | ||||||
|  | @ -171,15 +179,15 @@ core_ls = $(filter-out $(1),$(shell echo $(1))) | ||||||
| 
 | 
 | ||||||
| # Automated update.
 | # Automated update.
 | ||||||
| 
 | 
 | ||||||
| ERLANG_MK_GIT_REPOSITORY ?= https://github.com/ninenines/erlang.mk | ERLANG_MK_REPO ?= https://github.com/ninenines/erlang.mk | ||||||
| ERLANG_MK_GIT_REF ?= | ERLANG_MK_COMMIT ?= | ||||||
| ERLANG_MK_BUILD_CONFIG ?= build.config | ERLANG_MK_BUILD_CONFIG ?= build.config | ||||||
| ERLANG_MK_BUILD_DIR ?= .erlang.mk.build | ERLANG_MK_BUILD_DIR ?= .erlang.mk.build | ||||||
| 
 | 
 | ||||||
| erlang-mk: | erlang-mk: | ||||||
| 	git clone $(ERLANG_MK_GIT_REPOSITORY) $(ERLANG_MK_BUILD_DIR) | 	git clone $(ERLANG_MK_REPO) $(ERLANG_MK_BUILD_DIR) | ||||||
| 	if [ -f $(ERLANG_MK_BUILD_CONFIG) ]; then cp $(ERLANG_MK_BUILD_CONFIG) $(ERLANG_MK_BUILD_DIR)/build.config; fi | 	if [ -f $(ERLANG_MK_BUILD_CONFIG) ]; then cp $(ERLANG_MK_BUILD_CONFIG) $(ERLANG_MK_BUILD_DIR)/build.config; fi | ||||||
| 	cd $(ERLANG_MK_BUILD_DIR) && $(if $(ERLANG_MK_GIT_REF),git checkout $(ERLANG_MK_GIT_REF) &&) $(MAKE) | 	cd $(ERLANG_MK_BUILD_DIR) && $(if $(ERLANG_MK_COMMIT),git checkout $(ERLANG_MK_COMMIT) &&) $(MAKE) | ||||||
| 	cp $(ERLANG_MK_BUILD_DIR)/erlang.mk ./erlang.mk | 	cp $(ERLANG_MK_BUILD_DIR)/erlang.mk ./erlang.mk | ||||||
| 	rm -rf $(ERLANG_MK_BUILD_DIR) | 	rm -rf $(ERLANG_MK_BUILD_DIR) | ||||||
| 
 | 
 | ||||||
|  | @ -3976,7 +3984,7 @@ endif | ||||||
| # Copyright (c) 2013-2015, Loïc Hoguin <essen@ninenines.eu>
 | # Copyright (c) 2013-2015, Loïc Hoguin <essen@ninenines.eu>
 | ||||||
| # This file is part of erlang.mk and subject to the terms of the ISC License.
 | # This file is part of erlang.mk and subject to the terms of the ISC License.
 | ||||||
| 
 | 
 | ||||||
| .PHONY: distclean-deps distclean-pkg | .PHONY: fetch-deps list-deps distclean-deps distclean-pkg | ||||||
| 
 | 
 | ||||||
| # Configuration.
 | # Configuration.
 | ||||||
| 
 | 
 | ||||||
|  | @ -4006,6 +4014,26 @@ dep_verbose = $(dep_verbose_$(V)) | ||||||
| 
 | 
 | ||||||
| # Core targets.
 | # Core targets.
 | ||||||
| 
 | 
 | ||||||
|  | ifneq ($(SKIP_DEPS),) | ||||||
|  | fetch-deps: | ||||||
|  | else | ||||||
|  | fetch-deps: $(ALL_DEPS_DIRS) | ||||||
|  | ifneq ($(IS_DEP),1) | ||||||
|  | 	$(verbose) rm -f $(ERLANG_MK_TMP)/fetch-deps.log | ||||||
|  | endif | ||||||
|  | 	$(verbose) mkdir -p $(ERLANG_MK_TMP) | ||||||
|  | 	$(verbose) for dep in $(ALL_DEPS_DIRS) ; do \
 | ||||||
|  | 		if grep -qs ^$$dep$$ $(ERLANG_MK_TMP)/fetch-deps.log; then \
 | ||||||
|  | 			echo -n; \
 | ||||||
|  | 		else \
 | ||||||
|  | 			echo $$dep >> $(ERLANG_MK_TMP)/fetch-deps.log; \
 | ||||||
|  | 			if [ -f $$dep/erlang.mk ]; then \
 | ||||||
|  | 				$(MAKE) -C $$dep fetch-deps IS_DEP=1 || exit $$?; \
 | ||||||
|  | 			fi \
 | ||||||
|  | 		fi \
 | ||||||
|  | 	done | ||||||
|  | endif | ||||||
|  | 
 | ||||||
| ifneq ($(SKIP_DEPS),) | ifneq ($(SKIP_DEPS),) | ||||||
| deps:: | deps:: | ||||||
| else | else | ||||||
|  | @ -4029,6 +4057,29 @@ endif | ||||||
| 	done | 	done | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
|  | ERLANG_MK_RECURSIVE_DEPS_LIST = $(ERLANG_MK_TMP)/list-deps.log | ||||||
|  | 
 | ||||||
|  | $(ERLANG_MK_RECURSIVE_DEPS_LIST): fetch-deps | ||||||
|  | ifneq ($(IS_DEP),1) | ||||||
|  | 	$(verbose) rm -f $(ERLANG_MK_TMP)/list-deps.log.orig | ||||||
|  | endif | ||||||
|  | 	$(verbose) for dep in $(filter-out $(CURDIR),$(ALL_DEPS_DIRS)); do \
 | ||||||
|  | 		(test -f "$$dep/erlang.mk" && \
 | ||||||
|  | 		 $(MAKE) -C "$$dep" --no-print-directory \
 | ||||||
|  | 		  $(ERLANG_MK_RECURSIVE_DEPS_LIST) IS_DEP=1) || :; \
 | ||||||
|  | 	done | ||||||
|  | 	$(verbose) for dep in $(DEPS); do \
 | ||||||
|  | 		echo $(DEPS_DIR)/$$dep; \
 | ||||||
|  | 	done >> $(ERLANG_MK_TMP)/list-deps.log.orig | ||||||
|  | ifneq ($(IS_DEP),1) | ||||||
|  | 	$(verbose) sort < $(ERLANG_MK_TMP)/list-deps.log.orig \
 | ||||||
|  | 		| uniq > $(ERLANG_MK_TMP)/list-deps.log | ||||||
|  | 	$(verbose) rm -f $(ERLANG_MK_TMP)/list-deps.log.orig | ||||||
|  | endif | ||||||
|  | 
 | ||||||
|  | list-deps: $(ERLANG_MK_RECURSIVE_DEPS_LIST) | ||||||
|  | 	$(verbose) cat $(ERLANG_MK_TMP)/list-deps.log | ||||||
|  | 
 | ||||||
| distclean:: distclean-deps distclean-pkg | distclean:: distclean-deps distclean-pkg | ||||||
| 
 | 
 | ||||||
| # Deps related targets.
 | # Deps related targets.
 | ||||||
|  | @ -4648,21 +4699,15 @@ asn1_verbose = $(asn1_verbose_$(V)) | ||||||
| mib_verbose_0 = @echo " MIB   " $(filter %.bin %.mib,$(?F)); | mib_verbose_0 = @echo " MIB   " $(filter %.bin %.mib,$(?F)); | ||||||
| mib_verbose = $(mib_verbose_$(V)) | mib_verbose = $(mib_verbose_$(V)) | ||||||
| 
 | 
 | ||||||
|  | ifneq ($(wildcard src/),) | ||||||
|  | 
 | ||||||
| # Targets.
 | # Targets.
 | ||||||
| 
 | 
 | ||||||
| ifeq ($(wildcard ebin/test),) | ifeq ($(wildcard ebin/test),) | ||||||
| ifneq ($(wildcard src/),) |  | ||||||
| app:: $(PROJECT).d | app:: $(PROJECT).d | ||||||
| else |  | ||||||
| app:: |  | ||||||
| endif |  | ||||||
| 	$(verbose) $(MAKE) --no-print-directory app-build | 	$(verbose) $(MAKE) --no-print-directory app-build | ||||||
| else | else | ||||||
| ifneq ($(wildcard src/),) |  | ||||||
| app:: clean $(PROJECT).d | app:: clean $(PROJECT).d | ||||||
| else |  | ||||||
| app:: clean |  | ||||||
| endif |  | ||||||
| 	$(verbose) $(MAKE) --no-print-directory app-build | 	$(verbose) $(MAKE) --no-print-directory app-build | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
|  | @ -4691,15 +4736,11 @@ define app_file | ||||||
| endef | endef | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| ifneq ($(wildcard src/),) |  | ||||||
| app-build: ebin/$(PROJECT).app | app-build: ebin/$(PROJECT).app | ||||||
| endif | 	$(verbose) echo -n | ||||||
| 
 |  | ||||||
| app-build: ; @echo -n |  | ||||||
| 
 | 
 | ||||||
| # Source files.
 | # Source files.
 | ||||||
| 
 | 
 | ||||||
| ifneq ($(wildcard src/),) |  | ||||||
| ERL_FILES = $(sort $(call core_find,src/,*.erl)) | ERL_FILES = $(sort $(call core_find,src/,*.erl)) | ||||||
| CORE_FILES = $(sort $(call core_find,src/,*.core)) | CORE_FILES = $(sort $(call core_find,src/,*.core)) | ||||||
| 
 | 
 | ||||||
|  | @ -4816,7 +4857,8 @@ endef | ||||||
| ebin/$(PROJECT).app:: $(ERL_FILES) $(CORE_FILES) | ebin/$(PROJECT).app:: $(ERL_FILES) $(CORE_FILES) | ||||||
| 	$(if $(strip $?),$(call compile_erl,$?)) | 	$(if $(strip $?),$(call compile_erl,$?)) | ||||||
| 	$(eval GITDESCRIBE := $(shell git describe --dirty --abbrev=7 --tags --always --first-parent 2>/dev/null || true)) | 	$(eval GITDESCRIBE := $(shell git describe --dirty --abbrev=7 --tags --always --first-parent 2>/dev/null || true)) | ||||||
| 	$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename $(ERL_FILES) $(CORE_FILES)))))) | 	$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \
 | ||||||
|  | 		$(filter-out $(ERLC_EXCLUDE_PATHS),$(ERL_FILES) $(CORE_FILES))))))) | ||||||
| ifeq ($(wildcard src/$(PROJECT).app.src),) | ifeq ($(wildcard src/$(PROJECT).app.src),) | ||||||
| 	$(app_verbose) echo $(subst $(newline),,$(subst ",\",$(call app_file,$(GITDESCRIBE),$(MODULES)))) \
 | 	$(app_verbose) echo $(subst $(newline),,$(subst ",\",$(call app_file,$(GITDESCRIBE),$(MODULES)))) \
 | ||||||
| 		> ebin/$(PROJECT).app | 		> ebin/$(PROJECT).app | ||||||
|  | @ -4831,8 +4873,6 @@ else | ||||||
| 		> ebin/$(PROJECT).app | 		> ebin/$(PROJECT).app | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| endif |  | ||||||
| 
 |  | ||||||
| clean:: clean-app | clean:: clean-app | ||||||
| 
 | 
 | ||||||
| clean-app: | clean-app: | ||||||
|  | @ -4842,6 +4882,8 @@ clean-app: | ||||||
| 		$(addprefix include/,$(patsubst %.asn1,%.asn1db,$(notdir $(ASN1_FILES)))) \
 | 		$(addprefix include/,$(patsubst %.asn1,%.asn1db,$(notdir $(ASN1_FILES)))) \
 | ||||||
| 		$(addprefix src/,$(patsubst %.asn1,%.erl,$(notdir $(ASN1_FILES)))) | 		$(addprefix src/,$(patsubst %.asn1,%.erl,$(notdir $(ASN1_FILES)))) | ||||||
| 
 | 
 | ||||||
|  | endif | ||||||
|  | 
 | ||||||
| # Copyright (c) 2015, Viktor Söderqvist <viktor@zuiderkwast.se>
 | # Copyright (c) 2015, Viktor Söderqvist <viktor@zuiderkwast.se>
 | ||||||
| # This file is part of erlang.mk and subject to the terms of the ISC License.
 | # This file is part of erlang.mk and subject to the terms of the ISC License.
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue