annotate Makefile @ 16:f088694c1c32

Fix wrong command name in the manpage synopsis
author Thomas Koch <thomas@koch.ro>
date Tue, 11 Aug 2015 19:21:38 +0200
parents 129f316b99aa
children 48caa69c609d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
1 #
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
2 # Copyright (C) 2011 Guido Berhoerster <guido+xwrited@berhoerster.name>
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
3 #
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
4 # Permission is hereby granted, free of charge, to any person obtaining
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
5 # a copy of this software and associated documentation files (the
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
6 # "Software"), to deal in the Software without restriction, including
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
7 # without limitation the rights to use, copy, modify, merge, publish,
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
8 # distribute, sublicense, and/or sell copies of the Software, and to
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
9 # permit persons to whom the Software is furnished to do so, subject to
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
10 # the following conditions:
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
11 #
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
12 # The above copyright notice and this permission notice shall be included
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
13 # in all copies or substantial portions of the Software.
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
14 #
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
16 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
17 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
18 # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
19 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
20 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
21 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
22 #
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
23
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
24 PACKAGE = xwrited
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
25 APP_NAME = org.guido-berhoerster.code.xwrited
14
129f316b99aa Release version 2
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 5
diff changeset
26 VERSION = 2
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
27 DISTNAME := $(PACKAGE)-$(VERSION)
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
28
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
29 # gcc, clang, icc
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
30 MAKEDEPEND.c = $(CC) -MM $(CFLAGS) $(CPPFLAGS)
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
31 # Sun/Solaris Studio
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
32 #MAKEDEPEND.c = $(CC) -xM1 $(CFLAGS) $(CPPFLAGS)
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
33 # X makedepend
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
34 #MAKEDEPEND.c = makedepend -f- -Y -- $(CFLAGS) $(CPPFLAGS) --
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
35 INSTALL := install
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
36 INSTALL.exec := $(INSTALL) -D -m 0755
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
37 INSTALL.data := $(INSTALL) -D -m 0644
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
38 PAX := pax
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
39 GZIP := gzip
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
40 SED := sed
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
41 PASTE := paste
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
42 MSGFMT := msgfmt
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
43 INTLTOOL_UPDATE := intltool-update
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
44 INTLTOOL_MERGE := intltool-merge
5
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
45 XSLTPROC := xsltproc
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
46 DOCBOOK5_MANPAGES_STYLESHEET = http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
47
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
48 define generate-manpage-rule =
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
49 %.$(1): %.$(1).xml
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
50 $$(XSLTPROC) \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
51 --xinclude \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
52 --stringparam package $$(PACKAGE) \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
53 --stringparam version $$(VERSION)\
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
54 data/docbook-update-source-data.xsl $$< | \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
55 $$(XSLTPROC) \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
56 --xinclude \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
57 $$(DOCBOOK5_MANPAGES_FLAGS) \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
58 --output $$@ \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
59 $$(DOCBOOK5_MANPAGES_STYLESHEET) \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
60 -
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
61 endef
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
62
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
63 DESTDIR ?=
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
64 prefix ?= /usr/local
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
65 bindir ?= $(prefix)/bin
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
66 datadir ?= $(prefix)/share
5
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
67 mandir ?= $(datadir)/man
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
68 localedir ?= $(datadir)/locale
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
69 sysconfdir ?= /etc
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
70 xdgautostartdir ?= $(sysconfdir)/xdg/autostart
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
71
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
72 OS_NAME := $(shell uname -s)
3
6e2d746b06ae Support FreeBSD > 9.0
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 2
diff changeset
73 OS_RELEASE := $(shell uname -r)
6e2d746b06ae Support FreeBSD > 9.0
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 2
diff changeset
74
6e2d746b06ae Support FreeBSD > 9.0
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 2
diff changeset
75 is_in = $(if $(filter $2, $1),true,false)
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
76
2
c53bcdabbba7 Make use of GDBus for glib >= 2.25.5
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 0
diff changeset
77 PKGCONFIG_LIBS := dbus-1 glib-2.0 libnotify
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
78 EXTRA_LIBS :=
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
79
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
80 ifeq ($(OS_NAME),Linux)
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
81 OBJS_UTMP := xwrited-utmp-utempter.o
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
82 EXTRA_LIBS += -lutempter
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
83 else ifeq ($(OS_NAME),FreeBSD)
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
84 OBJS_UTMP := xwrited-utmp-utempter.o
3
6e2d746b06ae Support FreeBSD > 9.0
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 2
diff changeset
85 FREEBSD_RELEASE_MAJOR := $(firstword $(subst ., ,$(OS_RELEASE)))
6e2d746b06ae Support FreeBSD > 9.0
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 2
diff changeset
86 # FreeBSD < 9.0 needs libutempter
6e2d746b06ae Support FreeBSD > 9.0
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 2
diff changeset
87 ifeq ($(call is_in, $(OS_RELEASE_MAJOR), 7 8), true)
6e2d746b06ae Support FreeBSD > 9.0
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 2
diff changeset
88 EXTRA_LIBS += -lutempter
6e2d746b06ae Support FreeBSD > 9.0
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 2
diff changeset
89 else
6e2d746b06ae Support FreeBSD > 9.0
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 2
diff changeset
90 EXTRA_LIBS += -lulog
6e2d746b06ae Support FreeBSD > 9.0
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 2
diff changeset
91 endif
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
92 else
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
93 OBJS_UTMP := xwrited-utmp-utmpx.o
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
94 endif
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
95
2
c53bcdabbba7 Make use of GDBus for glib >= 2.25.5
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 0
diff changeset
96 ifeq ($(shell pkg-config --exists 'glib-2.0 >= 2.25.5' && printf "true"), true)
c53bcdabbba7 Make use of GDBus for glib >= 2.25.5
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 0
diff changeset
97 CPPFLAGS_EXTRA := -DHAVE_GLIB_GDBUS
c53bcdabbba7 Make use of GDBus for glib >= 2.25.5
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 0
diff changeset
98 else
c53bcdabbba7 Make use of GDBus for glib >= 2.25.5
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 0
diff changeset
99 PKGCONFIG_LIBS += dbus-glib-1
c53bcdabbba7 Make use of GDBus for glib >= 2.25.5
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 0
diff changeset
100 endif
c53bcdabbba7 Make use of GDBus for glib >= 2.25.5
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 0
diff changeset
101
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
102 OBJS = main.o xwrited-debug.o xwrited-unique.o $(OBJS_UTMP)
5
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
103 MANPAGES = data/$(PACKAGE).1
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
104 AUTOSTART_FILE = data/$(PACKAGE).desktop
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
105 MOFILES := $(patsubst %.po,%.mo,$(wildcard po/*.po))
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
106 POTFILE = po/$(PACKAGE).pot
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
107 POSRCS := $(shell $(SED) -e 's/\#.*//' -e '/^[ \t]*$$/d' \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
108 -e 's/^\[[^]]*\]//' po/POTFILES.in | $(PASTE) -s -d ' ')
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
109 CPPFLAGS := $(CPPFLAGS_EXTRA) \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
110 $(CPPFLAGS_LIBUTEMPTER) \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
111 $(shell pkg-config --cflags $(PKGCONFIG_LIBS)) \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
112 -DPACKAGE="\"$(PACKAGE)\"" \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
113 -DAPP_NAME=\"$(APP_NAME)\" \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
114 -DVERSION=\"$(VERSION)\" \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
115 -DLOCALEDIR="\"$(localedir)\"" \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
116 -DG_LOG_DOMAIN=\"$(PACKAGE)\"
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
117 LDLIBS := $(EXTRA_LIBS) \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
118 $(shell pkg-config --libs $(PKGCONFIG_LIBS))
5
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
119 DOCBOOK5_MANPAGES_FLAGS = --stringparam man.authors.section.enabled 0 \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
120 --stringparam man.copyright.section.enabled 0
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
121
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
122 .DEFAULT_TARGET = all
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
123
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
124 .PHONY: all clean clobber dist install
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
125
5
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
126 all: $(PACKAGE) $(MANPAGES) $(MOFILES) $(AUTOSTART_FILE)
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
127
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
128 $(PACKAGE): $(OBJS)
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
129 $(LINK.o) $^ $(LDLIBS) -o $@
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
130
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
131 $(POTFILE): po/POTFILES.in $(POSRCS)
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
132 cd po/ && $(INTLTOOL_UPDATE) --pot --gettext-package="$(PACKAGE)"
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
133
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
134 pot: $(POTFILE)
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
135
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
136 update-po: $(POTFILE)
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
137 cd po/ && for lang in $(patsubst po/%.mo,%,$(MOFILES)); do \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
138 $(INTLTOOL_UPDATE) --dist --gettext-package="$(PACKAGE)" \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
139 $${lang}; \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
140 done
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
141
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
142 %.o: %.c
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
143 $(MAKEDEPEND.c) $< | $(SED) -f deps.sed >$*.d
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
144 $(COMPILE.c) -o $@ $<
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
145
5
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
146 $(foreach section,1 2 3 4 5 6 7 8 9,$(eval $(call generate-manpage-rule,$(section))))
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
147
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
148 %.desktop: %.desktop.in $(MOFILES)
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
149 $(INTLTOOL_MERGE) --desktop-style --utf8 po $< $@
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
150
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
151 %.mo: %.po
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
152 $(MSGFMT) -o $@ $<
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
153
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
154 install:
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
155 $(INSTALL.exec) $(PACKAGE) "$(DESTDIR)$(bindir)/$(PACKAGE)"
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
156 for lang in $(patsubst po/%.mo,%,$(MOFILES)); do \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
157 $(INSTALL.data) po/$${lang}.mo \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
158 "$(DESTDIR)$(localedir)/$${lang}/LC_MESSAGES/$(PACKAGE).mo"; \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
159 done
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
160 $(INSTALL.data) $(AUTOSTART_FILE) \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
161 "$(DESTDIR)$(xdgautostartdir)/$(notdir $(AUTOSTART_FILE))"
5
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
162 $(INSTALL.data) data/$(PACKAGE).1 \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
163 "$(DESTDIR)$(mandir)/man1/$(PACKAGE).1"
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
164
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
165 clean:
5
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
166 rm -f $(PACKAGE) $(OBJS) $(POTFILE) $(MOFILES) $(MANPAGES) $(AUTOSTART_FILE)
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
167
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
168 clobber: clean
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
169 rm -f $(patsubst %.o,%.d,$(OBJS))
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
170
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
171 dist: clobber
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
172 $(PAX) -w -x ustar -s ',.*/\..*,,' -s ',./[^/]*\.tar\.gz,,' \
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
173 -s ',\./,$(DISTNAME)/,' . | $(GZIP) > $(DISTNAME).tar.gz
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
174
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
175 -include $(patsubst %.o,%.d,$(OBJS))