awesome-run use awesome config file
[awesome.git] / Makefile.am
blobd91acc09bd29e8805be523263098621a57c28fe2
1 BUILT_SOURCES =
2 CLEANFILES =
3 EXTRA_DIST =
4 SUFFIXES =
5 bin_PROGRAMS =
6 doc_DATA =
7 man_MANS =
8 iconslayoutsdir = $(pkgdatadir)/icons/layouts
9 dist_iconslayouts_DATA =
11 LAYOUTS =
13 LAYOUTS += layouts/tile.c
14 LAYOUTS += layouts/tile.h
16 LAYOUTS += layouts/floating.c
17 LAYOUTS += layouts/floating.h
19 LAYOUTS += layouts/max.c
20 LAYOUTS += layouts/max.h
22 LAYOUTS += layouts/fibonacci.c
23 LAYOUTS += layouts/fibonacci.h
26 WIDGETS =
27 WIDGETS += widgets/taglist.c
28 WIDGETS += widgets/layoutinfo.c
29 WIDGETS += widgets/textbox.c
30 WIDGETS += widgets/focustitle.c
31 WIDGETS += widgets/iconbox.c
32 WIDGETS += widgets/netwmicon.c
33 WIDGETS += widgets/progressbar.c
34 WIDGETS += widgets/tasklist.c
35 WIDGETS += widgets/graph.c
38 doc_DATA   += README
39 doc_DATA   += UPGRADE
41 EXTRA_DIST += LICENSE
43 EXTRA_DIST += STYLE
44 doc_DATA   += STYLE
47 EXTRA_DIST    += awesomerc.in
48 CLEANFILES    += awesomerc
49 BUILT_SOURCES += awesomerc
50 doc_DATA      += awesomerc
51 awesomerc: $(srcdir)/awesomerc.in
52         $(SED) -e "s|[@]iconslayoutsdir@|$(iconslayoutsdir)|" \
53                 < $(srcdir)/awesomerc.in > awesomerc
56 CLEANFILES    += defconfig.h
57 BUILT_SOURCES += defconfig.h
58 defconfig.h: awesomerc
59         @echo "generating defconfig.h from awesomerc"
60         @echo "#define AWESOME_DEFAULT_CONFIG \\" > defconfig.h
61         @echo -n "\"" >> defconfig.h
62         @$(SED) 's,\\,\\\\,g;s/$$/ \\/;s/"/\\"/g' "awesomerc" >> defconfig.h
63         @echo "\"" >> defconfig.h
65 CLEANFILES    += uicbgen.h
66 BUILT_SOURCES += uicbgen.h
67 EXTRA_DIST    += build-utils/uicbgen.sh
68 uicbgen.h: $(awesome_SOURCES)
69         @echo "generating uicbgen.h from headers file"
70         $(top_srcdir)/build-utils/uicbgen.sh "$(top_srcdir)" > uicbgen.h
72 CLEANFILES    += layoutgen.h
73 BUILT_SOURCES += layoutgen.h
74 EXTRA_DIST    += build-utils/layoutgen.sh
75 layoutgen.h: $(awesome_SOURCES)
76         @echo "generating layoutgen.h from layouts headers file"
77         $(top_srcdir)/build-utils/layoutgen.sh "$(top_srcdir)" > layoutgen.h
79 CLEANFILES    += widgetgen.h
80 BUILT_SOURCES += widgetgen.h
81 EXTRA_DIST    += build-utils/widgetgen.sh
82 widgetgen.h: widget.h
83         @echo "generating widgetgen.h from widget.h"
84         $(top_srcdir)/build-utils/widgetgen.sh "$(top_srcdir)" > widgetgen.h
86 A_V = awesome-version-internal
87 CLEANFILES    += $(A_V).h
88 BUILT_SOURCES += $(A_V).h.stamp
89 $(A_V).h.stamp:
90         @current_ver=`$(SHELL) $(top_srcdir)/build-utils/package-version $(top_srcdir) version-stamp`; \
91         { echo '#ifndef AWESOME_VERSION_INTERNAL_H'; \
92           echo "#define AWESOME_VERSION_INTERNAL \"$${current_ver}\""; \
93           echo "#endif"; } > "$(A_V).h.new"
94         @if test -f "$(A_V).h" \
95         && cmp "$(A_V).h.new" "$(A_V).h"; then :; \
96         else cat "$(A_V).h.new" > "$(A_V).h"; fi; \
97         rm -f "$(A_V).h.new"
99 if USING_GCC
100 # If you are using gcc, and want to deactivate this default set of
101 # compile flags, run make with AWESOME_CFLAGS="".
102 AWESOME_CFLAGS = -std=gnu99 -pipe \
103                  -Wall -Wextra \
104                  -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wsign-compare \
105                  -Wunused -Winit-self -Wpointer-arith -Wredundant-decls \
106                  -Wmissing-prototypes -Wmissing-format-attribute -Wmissing-noreturn
107 endif
108 AM_CPPFLAGS = $(XFT_CFLAGS) $(X_CFLAGS) $(CAIRO_CFLAGS) $(CONFUSE_CFLAGS) $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) $(AWESOME_CFLAGS)
110 bin_PROGRAMS += awesome
111 awesome_SOURCES = \
112         client.c client.h \
113         common/awesome-version.c common/awesome-version.h \
114         focus.c focus.h \
115         common/draw.c common/draw.h \
116         event.c event.h \
117         layout.c layout.h \
118         awesome.c awesome.h \
119         tag.c tag.h \
120         common/util.c common/util.h \
121         xutil.c xutil.h \
122         config.c config.h \
123         screen.c screen.h \
124         statusbar.c statusbar.h \
125         uicb.c uicb.h \
126         window.c window.h \
127         rules.c rules.h \
128         mouse.c mouse.h \
129         common/awclient.c \
130         common/swindow.c common/swindow.h \
131         widget.c widget.h \
132         ewmh.c ewmh.h \
133         common/list.h structs.h \
134         common/awclient.h \
135         common/configopts.h common/configopts.c
136 awesome_SOURCES += $(LAYOUTS)
137 awesome_SOURCES += $(WIDGETS)
138 awesome_LDADD = $(XFT_LIBS) $(X_LIBS) $(CAIRO_LIBS) $(CONFUSE_LIBS) $(XRANDR_LIBS) $(XINERAMA_LIBS)
140 bin_PROGRAMS += awesome-client
141 awesome_client_SOURCES = \
142         awesome-client.c common/awclient.h \
143         common/awesome-version.c common/awesome-version.h \
144         common/awclient.c \
145         common/util.c common/util.h
147 bin_PROGRAMS += awesome-message
148 awesome_message_SOURCES = \
149         common/swindow.c common/swindow.h \
150         common/draw.c common/draw.h \
151         common/util.h common/util.c \
152         common/awesome-version.h common/awesome-version.c \
153         common/configopts.h common/configopts.c \
154         awesome-message.c
156 awesome_message_LDADD = $(XFT_LIBS) $(X_LIBS) $(CAIRO_LIBS) $(CONFUSE_LIBS)
158 EXTRA_DIST += awesome.1.txt
159 man_MANS   += awesome.1
161 EXTRA_DIST += awesome-client.1.txt
162 man_MANS   += awesome-client.1
164 EXTRA_DIST += awesomerc.1.txt
165 man_MANS   += awesomerc.1
167 dist_iconslayouts_DATA += icons/layouts/dwindle.png
168 dist_iconslayouts_DATA += icons/layouts/dwindlew.png
169 dist_iconslayouts_DATA += icons/layouts/floating.png
170 dist_iconslayouts_DATA += icons/layouts/floatingw.png
171 dist_iconslayouts_DATA += icons/layouts/max.png
172 dist_iconslayouts_DATA += icons/layouts/maxw.png
173 dist_iconslayouts_DATA += icons/layouts/spiral.png
174 dist_iconslayouts_DATA += icons/layouts/spiralw.png
175 dist_iconslayouts_DATA += icons/layouts/tile.png
176 dist_iconslayouts_DATA += icons/layouts/tilebottom.png
177 dist_iconslayouts_DATA += icons/layouts/tilebottomw.png
178 dist_iconslayouts_DATA += icons/layouts/tileleft.png
179 dist_iconslayouts_DATA += icons/layouts/tileleftw.png
180 dist_iconslayouts_DATA += icons/layouts/tiletop.png
181 dist_iconslayouts_DATA += icons/layouts/tiletopw.png
182 dist_iconslayouts_DATA += icons/layouts/tilew.png
184 clean-local:
185         rm -f awesome*.1 awesome*.1.xml
187 SUFFIXES += .1.xml .1
188 if HAVE_XMLTO
189 .1.xml.1:
190         $(XMLTO) man $<
191 endif
193 SUFFIXES += .1.txt .1.xml
194 if HAVE_ASCIIDOC
195 .1.txt.1.xml:
196         $(ASCIIDOC) -d manpage -b docbook -o $@ $<
197 endif
200 # Check that package version matches git version before creating dist tarballs
201 dist-hook: git-version-check
202 distcheck-hook: git-version-check
204 # Note: We cannot run autogen.sh from here, because we would need some way to
205 #       restart the whole dist process from the start and there is none.
206 EXTRA_DIST += build-utils/package-version
207 git-version-check:
208         @git_ver=`$(top_srcdir)/build-utils/package-version $(top_srcdir) version-stamp`; \
209         if test "x$${git_ver}" = "x$(PACKAGE_VERSION)"; then :; else \
210                 echo "ERROR: PACKAGE_VERSION and 'git describe' version do not match:"; \
211                 echo "         current 'git describe' version: $${git_ver}"; \
212                 echo "         current PACKAGE_VERSION:        $(PACKAGE_VERSION)"; \
213                 echo "Update PACKAGE_VERSION by running $(top_srcdir)/autogen.sh."; \
214                 exit 1; \
215         fi
217 # Version stamp files can only exist in tarball source trees.
219 # So there is no need to generate them anywhere else or to clean them
220 # up anywhere.
221 dist-hook:
222         echo "$(PACKAGE_VERSION)" > "$(distdir)/version-stamp"
224 EXTRA_DIST += awesome.doxygen.in
226 # Workaround for buggy pre-1.5.3 doxygen.
228 # Some pre-1.5.3 versions of doxygen segfault on reading these lines.
229 # Call make with DOXYGEN_SEGFAULT=-segfault as a workaround.
230 CLEANFILES += awesome.doxygen-segfault
231 awesome.doxygen-segfault: awesome.doxygen
232         $(SED) '/^QT_AUTOBRIEF/d; /^EXTRACT_ANON_NSPACES/d; /^HTML_DYNAMIC_SECTIONS/d' \
233                 < awesome.doxygen > awesome.doxygen-segfault
235 if HAVE_DOXYGEN
236 doc: doc/html/index.html
238 doc/html/index.html: awesome.doxygen$(DOXYGEN_SEGFAULT) $(awesome_SOURCES) $(awesome_client_SOURCES)
239         $(DOXYGEN) awesome.doxygen$(DOXYGEN_SEGFAULT)
240 endif