3 REVISION=$(shell git rev-parse --short master)
5 -include Makefile.config
7 bin_PROGRAMS=stuffkeeper
10 stuffkeeper-data-backend.gob \
11 stuffkeeper-data-boolean.gob \
12 stuffkeeper-data-date2.gob \
13 stuffkeeper-data-entry-config.gob \
14 stuffkeeper-data-entry.gob \
15 stuffkeeper-data-expander.gob \
16 stuffkeeper-data-image.gob \
17 stuffkeeper-data-item.gob \
18 stuffkeeper-data-item-search.gob \
19 stuffkeeper-data-label.gob \
20 stuffkeeper-data-link.gob \
21 stuffkeeper-data-list2.gob \
22 stuffkeeper-data-rating.gob \
23 stuffkeeper-data-schema.gob \
24 stuffkeeper-data-spinbutton-config.gob \
25 stuffkeeper-data-spinbutton.gob \
26 stuffkeeper-data-tag.gob \
27 stuffkeeper-data-taglist2.gob \
28 stuffkeeper-data-text.gob \
29 stuffkeeper-edit-schema.gob \
30 stuffkeeper-export-html.gob \
31 stuffkeeper-interface.gob \
32 stuffkeeper-item-view.gob \
33 stuffkeeper-item-window.gob \
34 stuffkeeper-plugin.gob \
35 stuffkeeper-plugin-manager.gob \
36 stuffkeeper-show-item.gob \
39 stuffkeeper_GOBSOURCES=\
40 $(stuffkeeper_GOBFILES:.gob=.c) \
41 $(stuffkeeper_GOBFILES:.gob=.h) \
42 $(stuffkeeper_GOBFILES:.gob=-private.h) \
45 stuffkeeper_GOBSTAMPS=\
46 $(stuffkeeper_GOBFILES:.gob=.gob.stamp) \
48 stuffkeeper_VALAFILES=\
49 stuffkeeper-data-files.vala\
50 stuffkeeper-data-boolean-config.vala \
51 stuffkeeper-data-rating-config.vala \
52 stuffkeeper-multiple-item-view.vala \
53 stuffkeeper-data-image-config.vala \
56 stuffkeeper_VALASOURCES=\
57 $(stuffkeeper_VALAFILES:.vala=.c) \
58 $(stuffkeeper_VALAFILES:.vala=.h) \
61 stuffkeeper_VALASTAMPS=\
62 $(stuffkeeper_VALAFILES:.vala=.vala.stamp) \
65 # These files should be compiled, but may _not_ be
68 nodist_stuffkeeper_SOURCES=\
69 $(stuffkeeper_GOBSOURCES) \
70 $(stuffkeeper_VALASOURCES) \
73 # Sources that should be in the distribution
88 $(stuffkeeper_VALASTAMPS) \
89 $(stuffkeeper_GOBSTAMPS) \
93 @GOB2@ --always-private-header $<
94 @touch $(top_builddir)/src/$@
96 #stuffkeeper.vala.stamp: $(stuffkeeper_VALAFILES)
97 # @rm -f stuffkeeper.vala.tmp
98 # @touch -f stuffkeeper.vala.tmp
99 # @VALAC@ -C --vapidir=$(top_srcdir)/vala/ --pkg=gtk+-2.0 --pkg=glib-2.0 \
100 # --pkg=gmodule-2.0 --pkg=stuffkeeper $^
101 # @mv -f stuffkeeper.vala.tmp $@
105 @VALAC@ -b $(top_builddir)/src/ -C --vapidir=$(top_srcdir)/vala/ --pkg=gtk+-2.0 --pkg=glib-2.0 --pkg=gio-2.0 \
106 --pkg=gmodule-2.0 --pkg=stuffkeeper --use-header $^ -H $(notdir $(^:.vala=.h))
111 # Handle the case where a vala file was deleted but not the stamp file
112 # This code avoids problems with parallel compilation by using an empty
113 # directory as a lock mechanism
114 #$(stuffkeeper_VALASOURCES): stuffkeeper.vala.stamp
115 # @if test -f $@; then :; else \
116 # trap 'rm -rf $<.lock $<' 1 2 13 15; \
117 # if mkdir $<.lock 2>/dev/null; then \
119 # $(MAKE) $(AM_MAKEFLAGS) $<; \
122 # while test -d $<.lock; do sleep 1; done; \
123 # test -f $<; exit $$?; \
129 @if test '$(REVISION)' != '$(CONF_VERSION)'; then\
130 echo "Writing new Makefile.config file";\
131 echo "CONF_VERSION=$(REVISION)" > Makefile.config;\
135 echo "static char *revision = \"$(REVISION)""\"; "> revision.h;
166 -DLOG_DOMAIN="\"StuffKeeper\""
167 -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\" \
169 -DPIXMAP_PATH=\""$(pkgdatadir)"\" \
170 -DGLADE_PATH=\""$(pkgdatadir)"\" \
171 -DVERSION=\"@VERSION@\" \
175 # Should be installed so plugins can be compiled
177 nodist_stuffkeeperinclude_HEADERS = \
179 stuffkeeper-data-item.h\
180 stuffkeeper-data-schema.h\
181 stuffkeeper-data-backend.h\
182 stuffkeeper-data-tag.h\
183 stuffkeeper-item-window.h\
184 stuffkeeper-plugin.h\
185 stuffkeeper-interface.h\
186 stuffkeeper-data-item-search.h\
189 stuffkeeperincludedir =$(includedir)/stuffkeeper/
192 # Extra files that should be shipped with the distributions.
193 # This include gob files and vala files
196 $(stuffkeeper_GOBFILES)\
197 $(stuffkeeper_VALAFILES)\
201 # Cleanup generated files
204 stuffkeeper.vala.stamp \
207 $(stuffkeeper_GOBSOURCES) \
208 $(stuffkeeper_VALASOURCES) \
209 $(stuffkeeper_GOBSTAMPS) \
210 $(stuffkeeper_VALASTAMPS)\