fedora-comps/Makefile

34 lines
929 B
Makefile
Raw Normal View History

2006-02-26 20:30:25 +00:00
XMLINFILES=$(wildcard *.xml.in)
XMLFILES = $(patsubst %.xml.in,%.xml,$(XMLINFILES))
all: po $(XMLFILES) sort
2006-02-26 20:30:25 +00:00
po: $(XMLINFILES)
2006-11-23 20:24:39 +00:00
make -C po -f Makefile || exit 1
2006-02-26 20:30:25 +00:00
clean:
2008-04-10 17:45:23 +00:00
@rm -fv *~ *.xml
2006-02-26 20:30:25 +00:00
2008-09-10 22:54:29 +00:00
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
@RES=0; for f in $(XMLINFILES); do \
xsltproc --novalid -o $$f comps-cleanup.xsl $$f; \
RES=$$(($$RES + $$?)); \
done; exit $$RES
2006-02-26 20:30:25 +00:00
%.xml: %.xml.in
@xmllint --noout $<
2008-04-10 17:45:23 +00:00
@if test ".$(CLEANUP)" == .yes; then xsltproc --novalid -o $< comps-cleanup.xsl $<; fi
2006-02-26 20:30:25 +00:00
./update-comps $@
# Add an easy alias to generate a rawhide comps file
comps-rawhide.xml comps-rawhide: comps-f28.xml
@mv comps-f28.xml comps-rawhide.xml