forked from technion-csl/mosmodel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
44 lines (33 loc) · 1.03 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
MODULE_NAME := all
$(MODULE_NAME):
SHELL := /bin/bash
# all commands in a recipe are passed to a single invocation of the shell
.ONESHELL:
export ROOT_DIR := $(PWD)
export HOST_NAME := $(shell hostname)
LOG_FILE := $(ROOT_DIR)/log
# global auxiliary functions
comma := ,
empty :=
space := $(empty) $(empty)
define array_to_comma_separated
$(subst $(space),$(comma),$(strip $1))
endef
SCRIPTS_ROOT_DIR := $(ROOT_DIR)/scripts
# the following list should preserve a topological ordering, i.e., if module B
# uses variables defined in module A, than module A should come before module B
SUBMODULES := experiments analysis
include benchmark.mk
include $(ROOT_DIR)/common.mk
# a top-level "clean" target, which calls all/clean
.PHONY: clean
clean: all/clean
rm -f $(LOG_FILE)
# a generic pattern rule for deleting files
.PHONY: %/delete
%/delete:
rm -rf $*
# empty recipes to prevent make from remaking the makefile and include files
# https://www.gnu.org/software/make/manual/html_node/Remaking-Makefiles.html
makefile: ;
$(ROOT_DIR)/common.mk: ;