|
14 | 14 | endif |
15 | 15 |
|
16 | 16 | # Determine the filename: |
17 | | -THIS_FILE := $(lastword $(MAKEFILE_LIST)) |
| 17 | +this_file := $(lastword $(MAKEFILE_LIST)) |
18 | 18 |
|
19 | 19 | # Determine the absolute path of the Makefile (see http://blog.jgc.org/2007/01/what-makefile-am-i-in.html): |
20 | | -THIS_DIR := $(dir $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) |
| 20 | +this_dir := $(dir $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) |
21 | 21 |
|
22 | 22 | # Remove the trailing slash: |
23 | | -THIS_DIR := $(patsubst %/,%,$(THIS_DIR)) |
| 23 | +this_dir := $(patsubst %/,%,$(this_dir)) |
24 | 24 |
|
25 | 25 | # Define the root project directory: |
26 | | -ROOT ?= $(THIS_DIR) |
| 26 | +ROOT_DIR ?= $(this_dir) |
27 | 27 |
|
28 | 28 | # Define the root tools directory: |
29 | | -TOOLS_DIR ?= $(ROOT)/tools |
| 29 | +TOOLS_DIR ?= $(ROOT_DIR)/tools |
30 | 30 |
|
31 | | -# Define the directory containing Makefile dependencies: |
| 31 | +# Define the directory containing the entry point for Makefile dependencies: |
32 | 32 | TOOLS_MAKE_DIR ?= $(TOOLS_DIR)/make |
33 | 33 |
|
| 34 | +# Define the subdirectory containing Makefile dependencies: |
| 35 | +TOOLS_MAKE_LIB_DIR ?= $(TOOLS_MAKE_DIR)/lib |
| 36 | + |
34 | 37 | # Define the root build directory: |
35 | | -BUILD_DIR ?= $(ROOT)/build |
| 38 | +BUILD_DIR ?= $(ROOT_DIR)/build |
36 | 39 |
|
37 | 40 | # Define the root configuration directory: |
38 | | -CONFIG_DIR ?= $(ROOT)/etc |
| 41 | +CONFIG_DIR ?= $(ROOT_DIR)/etc |
39 | 42 |
|
40 | 43 | # Define the directory for writing reports, including code coverage: |
41 | | -REPORTS_DIR ?= $(ROOT)/reports |
| 44 | +REPORTS_DIR ?= $(ROOT_DIR)/reports |
42 | 45 | COVERAGE_DIR ?= $(REPORTS_DIR)/coverage |
43 | 46 |
|
44 | 47 | # Define the directory for documentation: |
45 | | -DOCS_DIR ?= $(ROOT)/docs |
| 48 | +DOCS_DIR ?= $(ROOT_DIR)/docs |
46 | 49 |
|
47 | 50 | # Define the top-level directory containing executables: |
48 | | -BIN_DIR ?= $(ROOT)/bin |
| 51 | +LOCAL_BIN_DIR ?= $(ROOT_DIR)/bin |
49 | 52 |
|
50 | 53 | # Define the top-level directory containing node module dependencies: |
51 | | -NODE_MODULES ?= $(ROOT)/node_modules |
| 54 | +NODE_MODULES ?= $(ROOT_DIR)/node_modules |
52 | 55 |
|
53 | 56 | # Define the top-level directory containing node module executables: |
54 | | -BIN ?= $(NODE_MODULES)/.bin |
| 57 | +BIN_DIR ?= $(NODE_MODULES)/.bin |
55 | 58 |
|
56 | | -# Define the top-level directory containing source files: |
57 | | -SOURCE_DIR ?= lib |
| 59 | +# Define the top-level folder name containing source files: |
| 60 | +SOURCE_FOLDER ?= lib |
58 | 61 |
|
59 | | -# Define the directory name for test files: |
60 | | -TESTS_DIR ?= test |
| 62 | +# Define the folder name for test files: |
| 63 | +TESTS_FOLDER ?= test |
61 | 64 |
|
62 | | -# Define the directory name for test fixtures: |
63 | | -TESTS_FIXTURES_DIR ?= test/fixtures |
| 65 | +# Define the folder name for test fixtures: |
| 66 | +TESTS_FIXTURES_FOLDER ?= test/fixtures |
64 | 67 |
|
65 | | -# Define the directory name for examples files: |
66 | | -EXAMPLES_DIR ?= examples |
| 68 | +# Define the folder name for examples files: |
| 69 | +EXAMPLES_FOLDER ?= examples |
67 | 70 |
|
68 | 71 | # Define whether delete operations should be safe (i.e., deleted items are sent to trash, rather than permanently deleted): |
69 | 72 | SAFE_DELETE ?= false |
70 | 73 |
|
71 | 74 | # Define the delete command: |
72 | 75 | ifeq ($(SAFE_DELETE), true) |
73 | 76 | # FIXME: -rm -rf |
74 | | - DELETE_CMD := -rm -rf |
| 77 | + DELETE := -rm |
| 78 | + DELETE_FLAGS := rf |
75 | 79 | else |
76 | | - DELETE_CMD ?= -rm -rf |
| 80 | + DELETE ?= -rm -rf |
| 81 | + DELETE_FLAGS ?= -rf |
77 | 82 | endif |
78 | 83 |
|
79 | 84 |
|
|
0 commit comments