Mercurial > projects > pk-update-icon
comparison Makefile @ 37:7e44a0a8dc2c
Convert the manpage to DocBook V5.0
author | Guido Berhoerster <gber@opensuse.org> |
---|---|
date | Fri, 07 Feb 2014 18:10:41 +0100 |
parents | 82a31628a26d |
children | ccbbb9f3d7fc |
comparison
equal
deleted
inserted
replaced
36:82a31628a26d | 37:7e44a0a8dc2c |
---|---|
36 GZIP := gzip | 36 GZIP := gzip |
37 SED := sed | 37 SED := sed |
38 MSGFMT := msgfmt | 38 MSGFMT := msgfmt |
39 INTLTOOL_UPDATE := intltool-update | 39 INTLTOOL_UPDATE := intltool-update |
40 INTLTOOL_MERGE := intltool-merge | 40 INTLTOOL_MERGE := intltool-merge |
41 XSLTPROC := xsltproc | |
42 DOCBOOK5_MANPAGES_STYLESHEET = http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl | |
43 | |
44 define generate-manpage-rule = | |
45 %.$(1): %.$(1).xml | |
46 $$(XSLTPROC) \ | |
47 --xinclude \ | |
48 --stringparam package $$(PACKAGE) \ | |
49 --stringparam version $$(VERSION)\ | |
50 docbook-update-source-data.xsl $$< | \ | |
51 $$(XSLTPROC) \ | |
52 --xinclude \ | |
53 $$(DOCBOOK5_MANPAGES_FLAGS) \ | |
54 --output $$@ \ | |
55 $$(DOCBOOK5_MANPAGES_STYLESHEET) \ | |
56 - | |
57 endef | |
41 | 58 |
42 DESTDIR ?= | 59 DESTDIR ?= |
43 prefix ?= /usr/local | 60 prefix ?= /usr/local |
44 bindir ?= $(prefix)/bin | 61 bindir ?= $(prefix)/bin |
45 datadir ?= $(prefix)/share | 62 datadir ?= $(prefix)/share |
47 localedir ?= $(datadir)/locale | 64 localedir ?= $(datadir)/locale |
48 sysconfdir ?= /etc | 65 sysconfdir ?= /etc |
49 xdgautostartdir ?= $(sysconfdir)/xdg/autostart | 66 xdgautostartdir ?= $(sysconfdir)/xdg/autostart |
50 | 67 |
51 OBJS = main.o pkui-icon.o pkui-backend.o | 68 OBJS = main.o pkui-icon.o pkui-backend.o |
69 MANPAGES = $(PACKAGE).1 | |
52 AUTOSTART_FILE = $(PACKAGE).desktop | 70 AUTOSTART_FILE = $(PACKAGE).desktop |
53 MOFILES := $(patsubst %.po,%.mo,$(wildcard po/*.po)) | 71 MOFILES := $(patsubst %.po,%.mo,$(wildcard po/*.po)) |
54 POTFILE = po/$(PACKAGE).pot | 72 POTFILE = po/$(PACKAGE).pot |
55 CPPFLAGS := $(shell pkg-config --cflags gtk+-2.0 unique-1.0 libnotify packagekit-glib2) \ | 73 CPPFLAGS := $(shell pkg-config --cflags gtk+-2.0 unique-1.0 libnotify packagekit-glib2) \ |
56 -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE \ | 74 -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE \ |
57 -DPACKAGE="\"$(PACKAGE)\"" \ | 75 -DPACKAGE="\"$(PACKAGE)\"" \ |
58 -DAPP_NAME=\"$(APP_NAME)\" \ | 76 -DAPP_NAME=\"$(APP_NAME)\" \ |
59 -DVERSION=\"$(VERSION)\" \ | 77 -DVERSION=\"$(VERSION)\" \ |
60 -DLOCALEDIR="\"$(localedir)\"" | 78 -DLOCALEDIR="\"$(localedir)\"" |
61 LDLIBS := $(shell pkg-config --libs gtk+-2.0 unique-1.0 libnotify packagekit-glib2) | 79 LDLIBS := $(shell pkg-config --libs gtk+-2.0 unique-1.0 libnotify packagekit-glib2) |
80 DOCBOOK5_MANPAGES_FLAGS = --stringparam man.authors.section.enabled 0 \ | |
81 --stringparam man.copyright.section.enabled 0 | |
62 | 82 |
63 .DEFAULT_TARGET = all | 83 .DEFAULT_TARGET = all |
64 | 84 |
65 .PHONY: all clean clobber dist install | 85 .PHONY: all clean clobber dist install |
66 | 86 |
67 all: $(PACKAGE) $(MOFILES) $(AUTOSTART_FILE) | 87 all: $(PACKAGE) $(MANPAGES) $(MOFILES) $(AUTOSTART_FILE) |
68 | 88 |
69 $(PACKAGE): $(OBJS) | 89 $(PACKAGE): $(OBJS) |
70 $(LINK.o) $^ $(LDLIBS) -o $@ | 90 $(LINK.o) $^ $(LDLIBS) -o $@ |
71 | 91 |
72 $(POTFILE): po/POTFILES.in | 92 $(POTFILE): po/POTFILES.in |
82 | 102 |
83 %.o: %.c | 103 %.o: %.c |
84 $(MAKEDEPEND.c) $< | $(SED) -f deps.sed >$*.d | 104 $(MAKEDEPEND.c) $< | $(SED) -f deps.sed >$*.d |
85 $(COMPILE.c) -o $@ $< | 105 $(COMPILE.c) -o $@ $< |
86 | 106 |
107 $(foreach section,1 2 3 4 5 6 7 8 9,$(eval $(call generate-manpage-rule,$(section)))) | |
108 | |
87 %.desktop: %.desktop.in $(MOFILES) | 109 %.desktop: %.desktop.in $(MOFILES) |
88 $(INTLTOOL_MERGE) --desktop-style --utf8 po $< $@ | 110 $(INTLTOOL_MERGE) --desktop-style --utf8 po $< $@ |
89 | 111 |
90 %.mo: %.po | 112 %.mo: %.po |
91 $(MSGFMT) -o $@ $< | 113 $(MSGFMT) -o $@ $< |
100 done | 122 done |
101 $(INSTALL.data) $(PACKAGE).1 \ | 123 $(INSTALL.data) $(PACKAGE).1 \ |
102 $(DESTDIR)$(mandir)/man1/$(PACKAGE).1 | 124 $(DESTDIR)$(mandir)/man1/$(PACKAGE).1 |
103 | 125 |
104 clean: | 126 clean: |
105 rm -f $(PACKAGE) $(OBJS) $(POTFILE) $(MOFILES) $(AUTOSTART_FILE) | 127 rm -f $(PACKAGE) $(OBJS) $(POTFILE) $(MOFILES) $(MANPAGES) $(AUTOSTART_FILE) |
106 | 128 |
107 clobber: clean | 129 clobber: clean |
108 rm -f $(patsubst %.o,%.d,$(OBJS)) | 130 rm -f $(patsubst %.o,%.d,$(OBJS)) |
109 | 131 |
110 dist: clobber | 132 dist: clobber |