]> Lady’s Gitweb - Shushe/blob - DOCUMENTATION/GNUmakefile
Set up DOCUMENTATION
[Shushe] / DOCUMENTATION / GNUmakefile
1 # SPDX-FileCopyrightText: 2024 Lady <https://www.ladys.computer/about/#lady>
2 # SPDX-License-Identifier: MPL-2.0
3
4 SHELL = /bin/sh
5
6 # Copyright © 2024 Lady [@ Ladys 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 # Using the current directory as `SRCDIR´ is generally not advisable, but it does help to keep things a bit cleaner for a documentation directory nested in another repository.
12 #
13 # Since `find´ will be searching this entire directory for files, it’s necessary to give anything which isn’t a source an inelligible name or else manually exclude it with `EXTRAFINDRULES´.
14 SRCDIR := .
15 INCLUDEDIR :=
16 BUILDDIR := .build
17 DESTDIR := >WWW
18
19 SHUSHE := ..
20 SHUSHEOPTS := SRCDIR='$(SRCDIR)' INCLUDEDIR='$(INCLUDEDIR)' BUILDDIR='$(BUILDDIR)' DESTDIR='$(DESTDIR)' EXTRATRANSFORMS="$(wildcard .transforms/*.xslt)" EXTRAFINDRULES="! '(' -name 'GNUmakefile' -o -name '$(DESTDIR)' -a -prune ')'"
21
22 YSEME := .👥📤
23 YSEMEOPTS := DESTDIR='$(DESTDIR)' SERVERPATH='/srv/git/.DOCUMENTATION'
24
25 build : $(SHUSHE)/GNUmakefile prebuild
26 @for publicfile in $(patsubst %,"%",$(wildcard $(DESTDIR)/*)); do if git check-ignore -q "$$publicfile"; then rm -rf "$$publicfile"; fi; done
27 @$(MAKE) -f '$<' install $(SHUSHEOPTS)
28 touch .grass
29
30 prebuild : $(SHUSHE)/GNUmakefile
31 @$(MAKE) -f '$<' $(SHUSHEOPTS)
32
33 list : $(SHUSHE)/GNUmakefile
34 @$(MAKE) -f '$<' $@ $(SHUSHEOPTS)
35
36 $(BUILDDIR)/% $(DESTDIR)/% : $(SHUSHE)/GNUmakefile
37 @$(MAKE) -f '$<' $@ $(SHUSHEOPTS)
38
39 $(YSEME)/GNUmakefile : %/GNUmakefile : FORCE
40 git submodule update --init '$*'
41
42 dry-sync sync : $(YSEME)/GNUmakefile
43 $(MAKE) -f '$<' $@ $(YSEMEOPTS)
44
45 gone :
46 @for publicfile in $(patsubst %,"%",$(wildcard $(DESTDIR)/*)); do if git check-ignore -q "$$publicfile"; then rm -rf "$$publicfile"; fi; done
47
48 FORCE : ;
49
50 .PHONY : FORCE build dry-sync gone list prebuild sync ;
This page took 0.050686 seconds and 5 git commands to generate.