]> Lady’s Gitweb - Fortune/blob - GNUmakefile
Wrap <cit> contents in <quote>
[Fortune] / GNUmakefile
1 # SPDX-FileCopyrightText: 2024 Lady <https://www.ladys.computer/about/#lady>
2 # SPDX-License-Identifier: MPL-2.0
3
4 SHELL = 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 xmls := $(wildcard data/*/bibl) $(wildcard data/*/info) $(wildcard data/*/fortunes/*)
12
13 lint : $(foreach xml,$(xmls),lint][$(xml)) ;
14
15 $(foreach xml,$(xmls),lint][$(xml)) : lint][% :
16 @xmllint --valid --noout '$*'
17 @$(if $(findstring /fortunes/,$*),if ! xmllint --xpath '//*[local-name()="seg" and namespace-uri()="http://www.tei-c.org/ns/1.0" and @type="callout"]' '$*' >/dev/null 2>/dev/null; then printf '%s\n' 'No callout in file <$*>'; false; fi; if xmllint --xpath '//*[local-name()="seg" and namespace-uri()="http://www.tei-c.org/ns/1.0" and @type="callout"][2]' '$*' >/dev/null 2>/dev/null; then printf '%s\n' 'Multiple callouts in file <$*>'; false; fi,:)
18
19 .IGNORE : $(foreach xml,$(xmls),lint][$(xml)) ;
20
21 .PHONY : lint $(foreach xml,$(xmls),lint][$(xml)) ;
This page took 0.089764 seconds and 5 git commands to generate.