comparison Makefile @ 22:b18c70b2a6ca

add dist target to Makefile
author Guido Berhoerster <guido@berhoerster.name>
date Sat, 22 Oct 2011 10:15:09 +0200
parents 7af115023d5a
children 6d0f1f6c22e8
comparison
equal deleted inserted replaced
21:6b7f2c8b90ec 22:b18c70b2a6ca
1 INSTALL := install 1 INSTALL := install
2 INSTALL.exec := $(INSTALL) -D -m 0755 2 INSTALL.exec := $(INSTALL) -D -m 0755
3 INSTALL.data := $(INSTALL) -D -m 0644 3 INSTALL.data := $(INSTALL) -D -m 0644
4 TAR := tar
5 GZIP := gzip
4 SED := sed 6 SED := sed
5 MSGFMT := msgfmt 7 MSGFMT := msgfmt
6 INTLTOOL_UPDATE := intltool-update 8 INTLTOOL_UPDATE := intltool-update
7 INTLTOOL_MERGE := intltool-merge 9 INTLTOOL_MERGE := intltool-merge
8 10
16 xdgautostartdir ?= $(sysconfdir)/xdg/autostart 18 xdgautostartdir ?= $(sysconfdir)/xdg/autostart
17 19
18 PACKAGE = pk-update-icon 20 PACKAGE = pk-update-icon
19 APP_NAME = org.opensuse.pk-update-icon 21 APP_NAME = org.opensuse.pk-update-icon
20 VERSION = 0.1 22 VERSION = 0.1
23 DISTNAME := $(PACKAGE)-$(VERSION)
21 OBJS = main.o pkui-icon.o pkui-backend.o 24 OBJS = main.o pkui-icon.o pkui-backend.o
22 AUTOSTART_FILE = $(PACKAGE).desktop 25 AUTOSTART_FILE = $(PACKAGE).desktop
23 MOFILES := $(patsubst %.po,%.mo,$(wildcard po/*.po)) 26 MOFILES := $(patsubst %.po,%.mo,$(wildcard po/*.po))
24 POTFILE = po/$(PACKAGE).pot 27 POTFILE = po/$(PACKAGE).pot
25 CPPFLAGS := $(shell pkg-config --cflags gtk+-2.0 unique-1.0 libnotify packagekit-glib2) \ 28 CPPFLAGS := $(shell pkg-config --cflags gtk+-2.0 unique-1.0 libnotify packagekit-glib2) \
30 -DLOCALEDIR="\"$(localedir)\"" 33 -DLOCALEDIR="\"$(localedir)\""
31 LDLIBS := $(shell pkg-config --libs gtk+-2.0 unique-1.0 libnotify packagekit-glib2) 34 LDLIBS := $(shell pkg-config --libs gtk+-2.0 unique-1.0 libnotify packagekit-glib2)
32 35
33 .DEFAULT_TARGET = all 36 .DEFAULT_TARGET = all
34 37
35 .PHONY: all clean clobber install 38 .PHONY: all clean clobber dist install
36 39
37 all: $(PACKAGE) $(MOFILES) $(AUTOSTART_FILE) 40 all: $(PACKAGE) $(MOFILES) $(AUTOSTART_FILE)
38 41
39 $(PACKAGE): $(OBJS) 42 $(PACKAGE): $(OBJS)
40 $(LINK.o) $^ $(LDLIBS) -o $@ 43 $(LINK.o) $^ $(LDLIBS) -o $@
78 rm -f $(PACKAGE) $(OBJS) $(POTFILE) $(MOFILES) $(AUTOSTART_FILE) 81 rm -f $(PACKAGE) $(OBJS) $(POTFILE) $(MOFILES) $(AUTOSTART_FILE)
79 82
80 clobber: clean 83 clobber: clean
81 rm -f *.P 84 rm -f *.P
82 85
86 dist: clobber
87 rm -f $(DISTNAME)
88 ln -s -f . $(DISTNAME)
89 $(TAR) cv $(DISTNAME)/* | $(GZIP) > $(DISTNAME).tar.gz
90
83 -include $(patsubst %.o,%.P,$(OBJS)) 91 -include $(patsubst %.o,%.P,$(OBJS))