KDE_OPTIONS = qtonly

INCLUDES = $(all_includes)

EXTRA_PROGRAMS = sortthem

sortthem_SOURCES = sortthem.cpp
sortthem_LDFLAGS = $(all_libraries) $(LIB_QT)

printers.cpp: sortthem
	: > printers.cpp
	for i in `find /usr/share/cups/model -type f`; do perl $(srcdir)/readppd < $$i >> printers.cpp; done
	for i in `find /usr/share/cups/model -type f -name '*.gz'`; do \
		gzip -cd $$i | perl $(srcdir)/readppd >> printers.cpp; done
	iconv -flatin1 -tutf-8 printers.cpp > printers.new
	mv printers.new printers.cpp
	./sortthem < printers.cpp > printers.new && mv printers.new printers.cpp

messages:
	$(XGETTEXT) --no-location printers.cpp -o $(podir)/../ppdtranslations.pot

.PHONY: printers.cpp

