fedora-comps/Makefile
Kevin Fenzi 89b366c20e Revert "Revert "Ensure that ELN comps are regenerated""
This reverts commit 5193274282.

We now have the needed package installed, so lets try this again.
2023-10-02 10:48:07 -07:00

43 lines
1.2 KiB
Makefile

XMLINFILES=$(wildcard *.xml.in)
XMLFILES = $(patsubst %.xml.in,%.xml,$(XMLINFILES))
all: comps-eln.xml.in po $(XMLFILES) comps-eln.xml sort
po: $(XMLINFILES)
make -C po -f Makefile || exit 1
clean:
@rm -fv *~ *.xml
validate: $(XMLFILES) comps.rng
# Run xmllint on each file and exit with non-zero if any validation fails
RES=0; for f in $(XMLFILES); do \
xmllint --noout --relaxng comps.rng $$f; \
RES=$$(($$RES + $$?)); \
done; exit $$RES
sort:
@# Run xsltproc on each xml.in file and exit with non-zero if any sorting fails
@# The comps-eln.xml.in is not sorted alphabetically but manually
@# based on the need needs of Fedora ELN SIG.
@RES=0; for f in $(XMLINFILES); do \
if [[ "$$f" == 'comps-eln.xml.in' ]]; then \
continue; \
fi; \
xsltproc --novalid -o $$f comps-cleanup.xsl $$f; \
RES=$$(($$RES + $$?)); \
done; exit $$RES
.PHONY: comps-eln.xml.in
comps-eln.xml.in: comps-eln.xml.in.in
./update-eln-extras-comps comps-eln.xml.in.in comps-eln.xml.in
%.xml: %.xml.in
@xmllint --noout $<
@if test ".$(CLEANUP)" == .yes; then xsltproc --novalid -o $< comps-cleanup.xsl $<; fi
./update-comps $@
# Add an easy alias to generate a rawhide comps file
comps-rawhide.xml comps-rawhide: comps-f40.xml
@mv comps-f40.xml comps-rawhide.xml