File: Makefile

package info (click to toggle)
dctrl2xml 0.24
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 184 kB
  • sloc: xml: 320; python: 304; makefile: 34; sh: 11
file content (28 lines) | stat: -rw-r--r-- 623 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
SCRIPT  := ../dctrl2xml
SOURCES := $(wildcard *.in)
OBJECTS := $(SOURCES:.in=.xml_) \
           $(SOURCES:.in=.json_)

all: $(OBJECTS)

compare = cmp $(1) $(patsubst %_,%,$(1))

%.xml_: %.in
	$(SCRIPT) --xml -f "$<" | xmllint --format - | \
	  sed 's/dctrl2xml\/[0-9]\+\.[0-9]\+/dctrl2xml/' > "$@"
	$(call compare,$@)

%.json_: %.in
	$(SCRIPT) --json -f "$<" > "$@"
	$(call compare,$@)

stress-test:
	ERRF=`mktemp`; \
	$(SCRIPT) -f /var/lib/dpkg/available 2> $$ERRF | xmllint --format -; \
	apt-cache dumpavail | $(SCRIPT) 2> $$ERRF | xmllint --format -; \
	cat $$ERRF

clean:
	rm -f $(OBJECTS)

.PHONY: clean stress-test