diff options
author | Loïc Hoguin <[email protected]> | 2015-09-09 19:41:15 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-09-09 19:41:15 +0200 |
commit | 5c5c92862e673025172d73133976d896e6f9a332 (patch) | |
tree | a4dca9990b055b88d27a4d36111ed61fbc510a2f | |
parent | e019242f5a3a9a9809184fd41b35f70d7bcd7edf (diff) | |
parent | 4191bf78c25cd947facc199d18321b3fcac736d7 (diff) | |
download | erlang.mk-5c5c92862e673025172d73133976d896e6f9a332.tar.gz erlang.mk-5c5c92862e673025172d73133976d896e6f9a332.tar.bz2 erlang.mk-5c5c92862e673025172d73133976d896e6f9a332.zip |
Merge branch 'fix-no-erlang-app-support' of https://github.com/rabbitmq/erlang.mk
-rw-r--r-- | core/erlc.mk | 7 | ||||
-rw-r--r-- | test/Makefile | 13 |
2 files changed, 16 insertions, 4 deletions
diff --git a/core/erlc.mk b/core/erlc.mk index c69060c..ad67856 100644 --- a/core/erlc.mk +++ b/core/erlc.mk @@ -40,6 +40,8 @@ asn1_verbose = $(asn1_verbose_$(V)) mib_verbose_0 = @echo " MIB " $(filter %.bin %.mib,$(?F)); mib_verbose = $(mib_verbose_$(V)) +ifneq ($(wildcard src/),) + # Targets. ifeq ($(wildcard ebin/test),) @@ -79,7 +81,6 @@ app-build: ebin/$(PROJECT).app ; @echo -n # Source files. -ifneq ($(wildcard src/),) ERL_FILES = $(sort $(call core_find,src/,*.erl)) CORE_FILES = $(sort $(call core_find,src/,*.core)) @@ -211,8 +212,6 @@ else > ebin/$(PROJECT).app endif -endif - clean:: clean-app clean-app: @@ -221,3 +220,5 @@ clean-app: $(addprefix include/,$(patsubst %.asn1,%.hrl,$(notdir $(ASN1_FILES)))) \ $(addprefix include/,$(patsubst %.asn1,%.asn1db,$(notdir $(ASN1_FILES)))) \ $(addprefix src/,$(patsubst %.asn1,%.erl,$(notdir $(ASN1_FILES)))) + +endif diff --git a/test/Makefile b/test/Makefile index 3e27d15..78942e5 100644 --- a/test/Makefile +++ b/test/Makefile @@ -77,7 +77,7 @@ clean-core: clean-core-app clean-core-upgrade # Core: Building applications. -CORE_APP_CASES = asn1 error generate-erl generate-erl-include generate-erl-prepend help hrl hrl-recursive mib no-makedep xrl xrl-include yrl yrl-include +CORE_APP_CASES = asn1 error generate-erl generate-erl-include generate-erl-prepend help hrl hrl-recursive mib no-app no-makedep xrl xrl-include yrl yrl-include CORE_APP_TARGETS = $(addprefix core-app-,$(CORE_APP_CASES)) CORE_APP_CLEAN_TARGETS = $(addprefix clean-,$(CORE_APP_TARGETS)) @@ -772,6 +772,17 @@ core-app-mib: build clean-core-app-mib [{module, M} = code:load_file(M) || M <- Mods], \ halt()" +core-app-no-app: build clean-core-app-no-app + + $i "Bootstrap a project without an OTP library" + $t mkdir $(APP)/ + $t cp ../erlang.mk $(APP)/ + $t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v + $t rm -rf $(APP)/src + + $i "Build the project" + $t $(MAKE) -C $(APP) $v + core-app-no-makedep: build clean-core-app-no-makedep $i "Bootstrap a new OTP library named $(APP)" |