Mercurial > projects > package-update-indicator
annotate Makefile @ 0:6884bb8130ca
Initial revision
author | Guido Berhoerster <guido+pui@berhoerster.name> |
---|---|
date | Sun, 20 May 2018 11:32:57 +0200 |
parents | |
children | 2f04ec9e0506 |
rev | line source |
---|---|
0
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
1 # |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
2 # Copyright (C) 2018 Guido Berhoerster <guido+pui@berhoerster.name> |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
3 # |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
4 # Permission is hereby granted, free of charge, to any person obtaining |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
5 # a copy of this software and associated documentation files (the |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
6 # "Software"), to deal in the Software without restriction, including |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
7 # without limitation the rights to use, copy, modify, merge, publish, |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
8 # distribute, sublicense, and/or sell copies of the Software, and to |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
9 # permit persons to whom the Software is furnished to do so, subject to |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
10 # the following conditions: |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
11 # |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
12 # The above copyright notice and this permission notice shall be included |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
13 # in all copies or substantial portions of the Software. |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
14 # |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
16 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
17 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
18 # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
19 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
20 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
21 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
22 # |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
23 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
24 PACKAGE = package-update-indicator |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
25 APPLICATION_ID = org.guido-berhoerster.code.package-update-indicator |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
26 VERSION = 1 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
27 DISTNAME = $(PACKAGE)-$(VERSION) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
28 AUTHOR = Guido Berhoerster |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
29 BUG_ADDRESS = guido+pui@berhoerster.name |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
30 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
31 # gcc, clang, icc, Sun/Solaris Studio |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
32 CC := $(CC) -std=c99 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
33 COMPILE.c = $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS) $(TARGET_ARCH) -c |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
34 # gcc, clang, icc |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
35 MAKEDEPEND.c = $(CC) -MM $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
36 # Sun/Solaris Studio |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
37 #MAKEDEPEND.c = $(CC) -xM1 $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
38 # X makedepend |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
39 #MAKEDEPEND.c = makedepend -f- -Y -- $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS) -- |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
40 LINK.c = $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS) $(LDFLAGS) $(XLDFLAGS) $(TARGET_ARCH) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
41 LINK.o = $(CC) $(LDFLAGS) $(XLDFLAGS) $(TARGET_ARCH) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
42 CP := cp |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
43 INSTALL := install |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
44 INSTALL.exec := $(INSTALL) -D -m 0755 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
45 INSTALL.data := $(INSTALL) -D -m 0644 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
46 INSTALL.link := $(CP) -f -P |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
47 PAX := pax |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
48 GZIP := gzip |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
49 SED := sed |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
50 GLIB_COMPILE_SCHEMAS := $(shell pkg-config --variable=glib_compile_schemas gio-2.0) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
51 XSLTPROC := xsltproc |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
52 DOCBOOK5_MANPAGES_STYLESHEET = http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
53 DOCBOOK5_MANPAGES_FLAGS = --stringparam man.authors.section.enabled 0 \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
54 --stringparam man.copyright.section.enabled 0 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
55 MSGFMT = msgfmt |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
56 MSGMERGE = msgmerge |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
57 XGETTEXT = xgettext |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
58 XGETTEXT_OPTIONS = --copyright-holder "$(AUTHOR)" \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
59 --package-name '$(PACKAGE)' \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
60 --package-version '$(VERSION)' \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
61 --msgid-bugs-address '$(BUG_ADDRESS)' \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
62 --default-domain '$(PACKAGE)' \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
63 --from-code UTF-8 \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
64 --keyword=_ \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
65 --keyword=N_ \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
66 --keyword=C_:1c,2 \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
67 --keyword=NC_:1c,2 \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
68 --keyword=g_dngettext:2,3 \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
69 --add-comments |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
70 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
71 define generate-manpage-rule = |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
72 %.$1: %.$(addsuffix .xml,$1) docbook-update-source-data.xsl |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
73 $$(XSLTPROC) \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
74 --xinclude \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
75 --stringparam package $$(PACKAGE) \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
76 --stringparam version $$(VERSION) \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
77 docbook-update-source-data.xsl $$< | \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
78 $$(XSLTPROC) \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
79 --xinclude \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
80 --output $$@ \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
81 $$(DOCBOOK5_MANPAGES_FLAGS) \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
82 $$(DOCBOOK5_MANPAGES_STYLESHEET) \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
83 - |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
84 endef |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
85 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
86 DESTDIR ?= |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
87 prefix ?= /usr/local |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
88 bindir ?= $(prefix)/bin |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
89 datadir ?= $(prefix)/share |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
90 mandir ?= $(datadir)/man |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
91 localedir ?= $(datadir)/locale |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
92 sysconfdir ?= /etc |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
93 xdgautostartdir ?= $(sysconfdir)/xdg/autostart |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
94 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
95 OS_NAME := $(shell uname -s) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
96 OS_RELEASE := $(shell uname -r) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
97 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
98 OBJS = package-update-indicator.o \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
99 pui-application.o \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
100 pui-backend.o \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
101 pui-get-updates.o \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
102 pui-types.o |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
103 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
104 GSETTINGS_SCHEMAS = $(APPLICATION_ID).gschema.xml |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
105 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
106 AUTOSTART_FILES = $(APPLICATION_ID).desktop |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
107 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
108 LINGUAS := $(shell sed 's/\#.*//' po/LINGUAS) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
109 MOFILES := $(patsubst %,po/%.mo,$(LINGUAS)) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
110 POTFILES_IN := $(shell sed 's/\#.*//' po/POTFILES.in) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
111 POTFILE = po/$(PACKAGE).pot |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
112 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
113 MANPAGES = $(PACKAGE).1 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
114 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
115 .DEFAULT_TARGET = all |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
116 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
117 .PHONY: all pot update-po clean clobber dist install |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
118 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
119 all: $(PACKAGE) $(AUTOSTART_FILES) $(MOFILES) $(MANPAGES) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
120 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
121 $(PACKAGE): XCPPFLAGS = -DPACKAGE=\"$(PACKAGE)\" \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
122 -DAPPLICATION_ID=\"$(APPLICATION_ID)\" \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
123 -DVERSION=\"$(VERSION)\" \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
124 -DG_LOG_DOMAIN=\"$(PACKAGE)\" \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
125 -DPACKAGE_LOCALE_DIR="\"$(localedir)\"" \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
126 -DGETTEXT_PACKAGE=\"$(PACKAGE)\" \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
127 -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
128 $(PACKAGE): XCFLAGS = $(shell pkg-config --cflags gtk+-3.0 \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
129 appindicator3-0.1 packagekit-glib2) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
130 $(PACKAGE): LDLIBS = $(shell pkg-config --libs gtk+-3.0 \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
131 appindicator3-0.1 packagekit-glib2) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
132 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
133 ifneq ($(findstring $(OS_NAME),FreeBSD DragonFly OpenBSD),) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
134 $(PACKAGE): XCPPFLAGS += -I/usr/local/include |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
135 $(PACKAGE): XLDFLAGS += -L/usr/local/lib |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
136 else ifeq ($(OS_NAME),NetBSD) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
137 $(PACKAGE): XCPPFLAGS += -I/usr/pkg/include |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
138 $(PACKAGE): XLDFLAGS += -L/usr/pkg/lib |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
139 endif |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
140 ifeq ($(findstring $(OS_NAME),FreeBSD DragonFly NetBSD OpenBSD),) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
141 $(PACKAGE): XCPPFLAGS += -D_XOPEN_SOURCE=600 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
142 endif |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
143 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
144 $(PACKAGE): $(OBJS) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
145 $(LINK.o) $^ $(LDLIBS) -o $@ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
146 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
147 $(POTFILE): po/POTFILES.in $(POTFILES_IN) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
148 $(XGETTEXT) $(XGETTEXT_OPTIONS) --files-from $< --output $@ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
149 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
150 pot: $(POTFILE) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
151 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
152 update-po: $(POTFILE) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
153 for pofile in $(patsubst %.mo,%.po,$(MOFILES)); do \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
154 $(MSGMERGE) --update --backup off $$pofile $<; \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
155 done |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
156 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
157 %.mo: %.po |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
158 $(MSGFMT) --output $@ $< |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
159 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
160 %.desktop: %.desktop.in |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
161 $(MSGFMT) --desktop --template $< -d po --output $@ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
162 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
163 $(foreach section,1 2 3 4 5 6 7 8 9,$(eval $(call generate-manpage-rule,$(section)))) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
164 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
165 %.o: %.c |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
166 $(MAKEDEPEND.c) $< | $(SED) -f deps.sed >$*.d |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
167 $(COMPILE.c) -o $@ $< |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
168 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
169 install: all |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
170 $(INSTALL.exec) $(PACKAGE) "$(DESTDIR)$(bindir)/$(PACKAGE)" |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
171 for schema in $(GSETTINGS_SCHEMAS); do \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
172 $(INSTALL.data) $${schema} \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
173 $(DESTDIR)$(datadir)/glib-2.0/schemas/$${schema}; \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
174 done |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
175 [ -n "$(GSETTINGS_SCHEMAS)" ] && \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
176 $(GLIB_COMPILE_SCHEMAS) $(datadir)/glib-2.0/schemas |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
177 for desktop_file in $(AUTOSTART_FILES); do \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
178 $(INSTALL.data) $${desktop_file} \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
179 $(DESTDIR)$(xdgautostartdir)/$${desktop_file}; \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
180 done |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
181 for lang in $(LINGUAS); do \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
182 $(INSTALL.data) po/$${lang}.mo \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
183 $(DESTDIR)$(localedir)/$${lang}/LC_MESSAGES/$(PACKAGE).mo; \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
184 done |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
185 for manpage in $(MANPAGES); do \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
186 $(INSTALL.data) $${manpage} \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
187 "$(DESTDIR)$(mandir)/man$${manpage##*.}/$${manpage##*/}"; \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
188 done |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
189 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
190 clean: |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
191 rm -f $(PACKAGE) $(OBJS) $(AUTOSTART_FILES) $(POTFILE) $(MOFILES) \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
192 $(MANPAGES) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
193 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
194 clobber: clean |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
195 rm -f $(patsubst %.o,%.d,$(OBJS)) |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
196 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
197 dist: clobber |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
198 $(PAX) -w -x ustar -s ',.*/\..*,,' -s ',./[^/]*\.tar\.gz,,' \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
199 -s ',^\.$$,,' -s ',\./,$(DISTNAME)/,' . | \ |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
200 $(GZIP) > $(DISTNAME).tar.gz |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
201 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
202 -include local.mk |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
203 |
6884bb8130ca
Initial revision
Guido Berhoerster <guido+pui@berhoerster.name>
parents:
diff
changeset
|
204 -include $(patsubst %.o,%.d,$(OBJS)) |