| summaryrefslogtreecommitdiff | 
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2017-11-28 17:14:02 +0100 | 
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2017-11-28 17:14:02 +0100 | 
| commit | f539b7072c357339328d9bfd54f1f1ed51828586 (patch) | |
| tree | b6205dd79c78090831e812aceac177d2a9f35d28 /Makefile | |
| parent | 80358376b9300a0d73cb8b62dfa9fdd65240ca66 (diff) | |
Trying to tidy up this mess.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 13 | 
1 files changed, 11 insertions, 2 deletions
| @@ -3,7 +3,7 @@ SRC_DIR ?= src  BIN_DIR ?= ebin  CONF_DIR ?= conf -YAWS_CONF = $(CONF_DIR)/yaws.conf +YAWS_CONF ?= $(CONF_DIR)/yaws.conf  ## Binaries  YAWS ?= yaws @@ -11,9 +11,18 @@ ERLC ?= erlc  ################################################################################  SRC_FILES = $(wildcard $(SRC_DIR)/*.erl) -MODULES = $(patsubst $(SRC_DIR)/%.erl,%,$(SRC_FILES)) +MODULES = $(patsubst %.erl,%,$(SRC_FILES)) +SUB_DIRS = $(filter-out $(MODULES),$(sort $(dir $(wildcard $(SRC_DIR)/*/))))  BIN_FILES = $(patsubst $(SRC_DIR)/%.erl,$(BIN_DIR)/%.beam,$(SRC_FILES)) + +export  ################################################################################ +all: +	for subdir in $(SUB_DIRS) ; do \ +		echo "Building dir $$subdir" ; \ +		$(MAKE) build SRC_DIR=$$subdir || exit 1;\ +	done +  build: $(BIN_DIR) $(BIN_FILES)  run: $(BIN_FILES) | 


