1 # Directory with files to process
4 TMPDIR = $(wildcard tmp)
6 this_makefile := $(lastword $(MAKEFILE_LIST))
7 datadir := $(dir $(this_makefile))
9 SUBDIRS := $(wildcard */)
12 FONT_TARGET_ROOTS := $(subst .rfo.fonts.info,.rfo,$(shell find $(TMPDIR) -name "*\.rfo\.fonts\.info"))
14 FONT_EXTS := fontlint unicover fc-query fonts
15 add_font_ext = $(foreach file, $(FONT_TARGET_ROOTS),$(file).$(ext))
16 FONT_TARGETS := $(foreach ext, $(FONT_EXTS), $(add_font_ext))
18 CORE_FONT_TARGETS := $(subst .rfo.core-fonts.info,.rfo.core-fonts,$(shell find $(TMPDIR) -name "*\.rfo\.core-fonts\.info"))
21 ifneq ($(wildcard font-links.txt),)
22 LINK_TARGETS := processed-font-links.txt
25 TARGETS := $(FONT_TARGETS) $(CORE_FONT_TARGETS) $(LINK_TARGETS)
28 TARGETS := $(TARGETS) rpmlint.txt
31 .PHONY: $(SUBDIRS) all rfo
36 $(MAKE) -C $@ rfo -f $(this_makefile)
41 rfo : ; @echo "$(shell pwd): nothing to do!"
44 $(TMPDIR)/%.rfo.fonts : rpm-info.txt \
47 $(TMPDIR)/%.rfo.fonts.info \
48 $(TMPDIR)/%.rfo.fontlint \
49 $(TMPDIR)/%.rfo.unicover \
50 $(TMPDIR)/%.rfo.fc-query.report \
51 $(TMPDIR)/%.rfo.fc-query
52 $(datadir)/fonts-report $^ > $@
55 $(TMPDIR)/%.rfo.unicover : $(SRCDIR)/%
58 $(TMPDIR)/%.rfo.fontlint : $(SRCDIR)/%
59 LANG=C fontlint $(CURDIR)/$< > $@ 2>&1 || :
61 $(TMPDIR)/%.rfo.fc-query $(TMPDIR)/%.rfo.fc-query.report : $(SRCDIR)/%
62 $(datadir)/process-fc-query $< $(TMPDIR)/$*.rfo.fc-query > $(TMPDIR)/$*.rfo.fc-query.report
64 $(TMPDIR)/%.rfo.core-fonts : rpm-info.txt \
67 $(TMPDIR)/%.rfo.core-fonts.info
68 $(datadir)/core-fonts-report $^ > $@
71 rpmlint.txt rpmlint.score :
72 rpmlint -i "*.rpm" > rpmlint.txt 2>&1 \
73 && touch rpmlint.score || echo "$$?" > rpmlint.score
75 processed-font-links.txt : rpm-info.txt \
78 $(datadir)/font-links-report $^ > $@