Skip to content

Commit deec8c6

Browse files
committed
Add Makefile
1 parent 0b0471d commit deec8c6

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!make
2+
3+
# Special-Targets #
4+
# https://www.gnu.org/software/make/manual/html_node/Special-Targets.html
5+
.DEFAULT_GOAL := install
6+
SUBDIRS := $(wildcard Sources/*)
7+
8+
.PHONY: force
9+
force:
10+
11+
Submodule: force
12+
git submodule update --recursive --remote
13+
git add $@
14+
git commit -m "Update $$(git submodule status Submodule/github/rest-api-description)" || true
15+
16+
OPENAPI_FILES := $(addsuffix /openapi.yml, $(SUBDIRS))
17+
Sources/%/openapi.yml: Submodule
18+
ln -sf ../../Submodule/github/rest-api-description/descriptions/api.github.com/api.github.com.yaml $@
19+
git add $@
20+
git commit -m "Relink $@" || true
21+
22+
.PHONY: install
23+
install: $(OPENAPI_FILES)

0 commit comments

Comments
 (0)