BUILD isn't defined, and the old way gave errors like:
$ make -j17 all_bin
mkdir build
notangle -Rk-model-utils.c src/sawsim.nw > build/k_model_utils.c
/bin/sh: cannot create build/k_model_utils.c: Directory nonexistent
make: *** [build/k_model_utils.c] Error 2
make: *** Waiting for unfinished jobs....
You'd only have seen this error with parallel builds, otherwise
BUILD_DIR would have already have been created as a dependency of
another file by the time k_model_utils.c needed it.
K_MODEL_MODS = k_model parse string_eval
K_MODEL_SRC = $(BUILD_DIR)/k_model_utils.c $(BUILD_DIR)/global.h \
$(K_MODEL_MODS:%=$(BUILD_DIR)/%.c) $(K_MODEL_MODS:%=$(BUILD_DIR)/%.h)
-$(BUILD_DIR)/k_model_utils.c : $(SRC_DIR)/sawsim.nw | $(BUILD)
+$(BUILD_DIR)/k_model_utils.c : $(SRC_DIR)/sawsim.nw | $(BUILD_DIR)
notangle -Rk-model-utils.c $< > $@
$(BIN_DIR)/k_model_utils : $(K_MODEL_SRC) | $(BIN_DIR)
$(CC) $(CFLAGS) $(LDFLAGS) -g -o $@ $< $(K_MODEL_MODS:%=$(BUILD_DIR)/%.c) $(LIBS:%=-l%)