-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
142 lines (110 loc) · 4.25 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#/
# @license MIT
#
# Copyright (c) 2020 Python Data APIs Consortium.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#/
# 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 directory for documentation:
DOCS_DIR ?= $(ROOT_DIR)/docs
# Define the directory for data:
DATA_DIR ?= $(ROOT_DIR)/data
# Define the directory for scripts:
SCRIPTS_DIR ?= $(ROOT_DIR)/scripts
# 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 path to the root `package.json`:
ROOT_PACKAGE_JSON ?= $(ROOT_DIR)/package.json
# Define the top-level directory containing node module dependencies:
NODE_MODULES ?= $(ROOT_DIR)/node_modules
# RULES #
#/
# Default target.
#
# @example
# make
#
# @example
# make all
#/
all: install docs
.PHONY: all
#/
# Installs project dependencies.
#
# @example
# make install
#/
install: install-node
.PHONY: install
#/
# Generates API documentation.
#
# @example
# make docs
#/
docs: join intersection intersection-ranks common-apis common-apis-ranks complement common-complement lib-top-k-common method-join method-intersection method-common-apis method-complement method-common-complement
.PHONY: docs
#/
# Opens API HTML tables in a web browser.
#
# @example
# make view-docs
#/
view-docs: view-join view-intersection view-intersection-ranks view-common-apis view-common-apis-ranks view-complement view-common-complement view-lib-top-k-common view-method-join view-method-intersection view-method-common-apis view-method-complement view-method-common-complement
.PHONY: view-docs
#/
# Runs the project's cleanup sequence.
#
# @example
# make clean
#/
clean: clean-node clean-data clean-docs
.PHONY: clean
#/
# Removes generated datasets.
#
# @example
# make clean-data
#/
clean-data: clean-join-data clean-intersection-data clean-intersection-ranks-data clean-common-apis-data clean-common-apis-ranks-data clean-complement-data clean-common-complement-data clean-lib-top-k-common-data clean-lib-top-k-complement-data clean-lib-top-k-common-complement-data clean-method-join-data clean-method-intersection-data clean-method-common-apis-data clean-method-complement-data clean-method-common-complement-data
.PHONY: clean-data
#/
# Removes generated documentation.
#
# @example
# make clean-docs
#/
clean-docs: clean-join-docs clean-intersection-docs clean-intersection-ranks-docs clean-complement-docs clean-common-apis-docs clean-common-complement-docs clean-common-apis-ranks-docs clean-lib-top-k-common-docs clean-lib-top-k-complement-docs clean-lib-top-k-common-complement-docs clean-method-join-docs clean-method-intersection-docs clean-method-common-apis-docs clean-method-complement-docs clean-method-common-complement-docs
.PHONY: clean-docs
# DEPENDENCIES #
include $(TOOLS_MAKE_DIR)/Makefile