Skip to content

Commit d58ed45

Browse files
committed
Add recipe for inserting a link into the link database
1 parent 8e4781e commit d58ed45

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

tools/make/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ include $(TOOLS_MAKE_LIB_DIR)/docs/Makefile
1919
include $(TOOLS_MAKE_LIB_DIR)/examples/Makefile
2020
include $(TOOLS_MAKE_LIB_DIR)/install/Makefile
2121
include $(TOOLS_MAKE_LIB_DIR)/licenses/Makefile
22+
include $(TOOLS_MAKE_LIB_DIR)/links/Makefile
2223
include $(TOOLS_MAKE_LIB_DIR)/lint/Makefile
2324
include $(TOOLS_MAKE_LIB_DIR)/ls/Makefile
2425
include $(TOOLS_MAKE_LIB_DIR)/markdown-equations/Makefile

tools/make/lib/links/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
# DEPENDENCIES #
3+
4+
include $(TOOLS_MAKE_LIB_DIR)/links/links.mk

tools/make/lib/links/links.mk

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
# VARIABLES #
3+
4+
# Define the command for returning a citation reference:
5+
INSERT_LINK ?= $(NODE) $(TOOLS_DIR)/links/create/bin/cli
6+
7+
# Define the command-line options to be used when executing the command:
8+
INSERT_LINK_FLAGS ?= \
9+
--database $(ROOT_DIR)/docs/links/database.json
10+
11+
12+
# TARGETS #
13+
14+
# Create a link entry.
15+
#
16+
# This target creates a link entry in the link database.
17+
18+
links-insert: $(NODE_MODULES)
19+
$(QUIET) $(INSERT_LINK) $(INSERT_LINK_FLAGS)
20+
21+
.PHONY: links-insert

0 commit comments

Comments
 (0)