1 # SPDX-FileCopyrightText: 2024 Lady <https://www.ladys.computer/about/#lady>
2 # SPDX-License-Identifier: MPL-2.0
6 # Copyright © 2024 Lady [@ Ladys Computer].
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/>.
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.
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´.
20 SHUSHEOPTS := SRCDIR='$(SRCDIR)' INCLUDEDIR='$(INCLUDEDIR)' BUILDDIR='$(BUILDDIR)' DESTDIR='$(DESTDIR)' EXTRATRANSFORMS="$(wildcard .transforms/*.xslt)" EXTRAFINDRULES="! '(' -name 'GNUmakefile' -o -name '$(DESTDIR)' -a -prune ')'"
23 YSEMEOPTS := DESTDIR='$(DESTDIR)' SERVERPATH='/srv/git/.DOCUMENTATION'
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)
30 prebuild : $(SHUSHE)/GNUmakefile
31 @$(MAKE) -f '$<' $(SHUSHEOPTS)
33 list : $(SHUSHE)/GNUmakefile
34 @$(MAKE) -f '$<' $@ $(SHUSHEOPTS)
36 $(BUILDDIR)/% $(DESTDIR)/% : $(SHUSHE)/GNUmakefile
37 @$(MAKE) -f '$<' $@ $(SHUSHEOPTS)
39 $(YSEME)/GNUmakefile : %/GNUmakefile : FORCE
40 git submodule update --init '$*'
42 dry-sync sync : $(YSEME)/GNUmakefile
43 $(MAKE) -f '$<' $@ $(YSEMEOPTS)
46 @for publicfile in $(patsubst %,"%",$(wildcard $(DESTDIR)/*)); do if git check-ignore -q "$$publicfile"; then rm -rf "$$publicfile"; fi; done
50 .PHONY : FORCE build dry-sync gone list prebuild sync ;