diff --git a/examples/data-generators/idash2017-logistic-regression-generator/Makefile b/examples/data-generators/idash2017-logistic-regression-generator/Makefile index ffd25c2a2..57d787d19 100644 --- a/examples/data-generators/idash2017-logistic-regression-generator/Makefile +++ b/examples/data-generators/idash2017-logistic-regression-generator/Makefile @@ -19,13 +19,13 @@ GAMMA_UP = 1 GAMMA_DOWN = -1 INDICE_SUFFIX = $(addprefix -data-,$(addsuffix .dat,$(shell seq 0 $(shell expr $(FOLD) - 1)))) TARGET_DATS = $(foreach base_name,$(basename $(SOURCE_FILES)),$(addprefix $(base_name),$(INDICE_SUFFIX)) ) -TARGET_DIR = ../../datasets/idash2017/ -TARGET_DIR_DATS = $(addprefix $(TARGET_DIR),$(TARGET_DATS)) +TARGET_DIR = ../../datasets/idash2017 +TARGET_DIR_DATS = $(addprefix $(TARGET_DIR)/,$(TARGET_DATS)) GENERATED_DATA_FILE_PREFIX = generate GENERATED_DATA_ROW ?= 200 GENERATED_DATA_COL ?= 20 GENERATED_DATA_TARGET_DATS = $(addprefix $(GENERATED_DATA_FILE_PREFIX),$(INDICE_SUFFIX)) -GENERATED_DATA_TARGET_DIR_DATS = $(addprefix $(TARGET_DIR),$(GENERATED_DATA_TARGET_DATS)) +GENERATED_DATA_TARGET_DIR_DATS = $(addprefix $(TARGET_DIR)/,$(GENERATED_DATA_TARGET_DATS)) SEED = 0 COMMON_CONFIG = --fold=$(FOLD) --num_of_iter=$(NUM_ITER) --sigmoid=$(SIGMOID) --gamma_up=$(GAMMA_UP) --gamma_down=$(GAMMA_DOWN) --seed=$(SEED) RUN_COMMAND ?= cargo run -- @@ -34,9 +34,10 @@ RUN_COMMAND ?= cargo run -- all: $(GENERATED_DATA_TARGET_DIR_DATS) -.SECONDEXPANSION: -$(GENERATED_DATA_TARGET_DIR_DATS): %.dat : $$(notdir $$@) - mkdir -p $(TARGET_DIR) +$(TARGET_DIR): + mkdir -p $@ + +$(GENERATED_DATA_TARGET_DIR_DATS): $(TARGET_DIR)/%.dat : %.dat | $(TARGET_DIR) cp $< $@ $(GENERATED_DATA_TARGET_DATS) : %.dat : @@ -48,8 +49,7 @@ $(GENERATED_DATA_TARGET_DATS) : %.dat : # which can be found in https://github.com/kimandrik/IDASH2017/tree/master/IDASH2017/data external: $(TARGET_DIR_DATS) -.SECONDEXPANSION: -$(TARGET_DIR_DATS): %.dat : $$(notdir $$@) $(TARGET_DIR) +$(TARGET_DIR_DATS): $(TARGET_DIR)/%.dat: %.dat | $(TARGET_DIR) cp $< $@ $(TARGET_DATS) : %.dat : $(SOURCE_FILES)