]> Lady’s Gitweb - Langdev/blob - GNUmakefile
Initial commit with docs/srcs for early langs
[Langdev] / GNUmakefile
1 # SPDX-FileCopyrightText: 2023, 2024 Lady <https://www.ladys.computer/about/#lady>
2 # SPDX-License-Identifier: MPL-2.0
3
4 SHELL = /bin/sh
5
6 # Copyright © 2023–2024 Lady [@ Lady’s Computer].
7 #
8 # This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
9 # If a copy of the M·P·L was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0/>.
10
11 # CAUDEX := .🪾📰
12 # LESML := .💄📝
13 SHUSHE := .⛩📰
14 YSEME := .👥📤
15
16 THISDIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
17 SRCDIR := site
18 INCLUDEDIR := data site/data
19 BUILDDIR := build
20 BUILDTARGET := .grass
21 DESTDIR := public
22
23 # SHUSHEOPTS := SRCDIR='$(SRCDIR)' INCLUDEDIR='$(INCLUDEDIR)' DESTDIR='$(DESTDIR)' EXTRAMAGIC='$(wildcard $(LESML)/magic/*) $(wildcard magic/*)' PARSERS='$(LESML)/parser.xslt $(SHUSHE)/parsers/record-jar.xslt $(SHUSHE)/parsers/tsv.xslt $(wildcard parsers/*.xslt)' EXTRATRANSFORMS='$(CAUDEX)/transform.xslt $(wildcard transforms/*.xslt)' EXTRAFINDRULES='-not -name '"'"'*.license'"'"''
24 SHUSHEOPTS := SRCDIR='$(SRCDIR)' INCLUDEDIR='$(INCLUDEDIR)' DESTDIR='$(DESTDIR)' EXTRAMAGIC='$(wildcard magic/*)' PARSERS='$(SHUSHE)/parsers/record-jar.xslt $(SHUSHE)/parsers/tsv.xslt $(wildcard parsers/*.xslt)' EXTRATRANSFORMS='$(wildcard transforms/*.xslt)' EXTRAFINDRULES='-not -name '"'"'*.license'"'"''
25
26 YSEMEOPTS := BUILDTARGET='$(BUILDTARGET)' DESTDIR='$(DESTDIR)' SERVERPATH='lady/langdev'
27
28 # ━ § Call out to ⛩📰 书社 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
29
30 # install : $(SHUSHE)/GNUmakefile $(LESML)/parser.xslt $(CAUDEX)/transform.xslt build
31 install : $(SHUSHE)/GNUmakefile build
32 @for publicfile in $(patsubst %,"%",$(wildcard $(DESTDIR)/*)); do if git check-ignore -q "$$publicfile"; then rm -rf "$$publicfile"; fi; done
33 @$(MAKE) -f '$<' install $(SHUSHEOPTS)
34 @touch '$(BUILDTARGET)'
35
36 build : $(SHUSHE)/GNUmakefile
37 @$(MAKE) -f '$<' $(SHUSHEOPTS)
38
39 clean list : $(SHUSHE)/GNUmakefile
40 @$(MAKE) -f '$<' $@ $(SHUSHEOPTS)
41
42 $(BUILDDIR)/% : $(SHUSHE)/GNUmakefile
43 @$(MAKE) -f '$<' $@ $(SHUSHEOPTS)
44
45 $(DESTDIR)/% : $(SHUSHE)/GNUmakefile
46 @$(MAKE) -f '$<' $@ $(SHUSHEOPTS)
47
48 # ━ § Call out to 👥📤 Yseme ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
49
50 dry-sync sync : $(YSEME)/GNUmakefile
51 $(MAKE) -f '$<' $@ $(YSEMEOPTS)
52
53 # ━ § Special targets ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
54
55 .PHONY : FORCE build clean dry-sync gone list prebuild sync uninstall ;
56
57 gone : clean uninstall ;
58
59 uninstall :
60 @for publicfile in $(patsubst %,"%",$(wildcard $(DESTDIR)/*)); do if git check-ignore -q "$$publicfile"; then rm -rf "$$publicfile"; fi; done
61
62 FORCE : ;
63
64 # ━ § Submodule targets ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
65
66 ifneq ($(filter $(abspath $(THISDIR))/%,$(abspath $(LESML))),)
67 $(LESML)/parser.xslt : %/GNUmakefile : FORCE
68 git submodule update --init '$*'
69 endif
70
71 ifneq ($(filter $(abspath $(THISDIR))/%,$(abspath $(CAUDEX))),)
72 $(CAUDEX)/transform.xslt : %/GNUmakefile : FORCE
73 git submodule update --init '$*'
74 endif
75
76 ifneq ($(filter $(abspath $(THISDIR))/%,$(abspath $(SHUSHE))),)
77 $(SHUSHE)/GNUmakefile : %/GNUmakefile : FORCE
78 git submodule update --init '$*'
79 endif
80
81 ifneq ($(filter $(abspath $(THISDIR))/%,$(abspath $(YSEME))),)
82 $(YSEME)/GNUmakefile : %/GNUmakefile : FORCE
83 git submodule update --init '$*'
84 endif
This page took 0.047336 seconds and 5 git commands to generate.