-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
94 lines (67 loc) · 2.77 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#/
# @license Apache-2.0
#
# Copyright (c) 2019 The Stdlib Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#/
# VARIABLES #
# Determine the filename:
this_file := $(lastword $(MAKEFILE_LIST))
# Determine the absolute path of the Makefile (see http://blog.jgc.org/2007/01/what-makefile-am-i-in.html):
this_dir := $(dir $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
# Remove the trailing slash:
this_dir := $(patsubst %/,%,$(this_dir))
# Define the root project directory:
ROOT_DIR ?= $(this_dir)
# Define the root tools directory:
TOOLS_DIR ?= $(ROOT_DIR)/tools
# Define the directory containing the entry point for Makefile dependencies:
TOOLS_MAKE_DIR ?= $(TOOLS_DIR)/make
# Define the subdirectory containing Makefile dependencies:
TOOLS_MAKE_LIB_DIR ?= $(TOOLS_MAKE_DIR)/lib
# Define the root build directory:
BUILD_DIR ?= $(ROOT_DIR)/build
# Define the directory for writing reports:
REPORTS_DIR ?= $(ROOT_DIR)/reports
# Define the root directory for storing temporary files:
TMP_DIR ?= $(ROOT_DIR)/tmp
# Define the root configuration directory:
CONFIG_DIR ?= $(ROOT_DIR)/etc
# Define the root directory for documentation:
DOCS_DIR ?= $(ROOT_DIR)/docs
# Define the directory for public WWW assets:
WWW_DIR ?= $(ROOT_DIR)/public
# Define the top-level directory containing executables:
LOCAL_BIN_DIR ?= $(ROOT_DIR)/bin
# Define the top-level directory containing node module dependencies:
NODE_MODULES ?= $(ROOT_DIR)/node_modules
# Define the top-level directory containing node module executables:
BIN_DIR ?= $(NODE_MODULES)/.bin
# Define the folder name convention for executables:
BIN_FOLDER ?= bin
# Define the folder name convention for documentation files:
DOCUMENTATION_FOLDER ?= docs
# Define the folder name convention for configuration files:
CONFIG_FOLDER ?= etc
# Define the folder name convention for build artifacts:
BUILD_FOLDER ?= build
# Define the folder name convention for temporary files:
TMP_FOLDER ?= tmp
# Define filename extension conventions (keep in alphabetical order):
CSS_FILENAME_EXT ?= css
HTML_FILENAME_EXT ?= html
# Define Node paths: (WARNING: we cannot use an absolute path here because of Webpack which only allows relative paths)
NODE_PATH ?= ./node_modules/@stdlib/stdlib/lib/node_modules
# DEPENDENCIES #
include $(TOOLS_MAKE_DIR)/Makefile