stop raising like dumb
[awesome.git] / Makefile.am
blob4ab74cffdd0af6998da7ba92308f104ae63e09ba
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
42 EXTRA_DIST += UPGRADE
44 EXTRA_DIST += STYLE
45 doc_DATA   += STYLE
48 EXTRA_DIST    += awesomerc.in
49 CLEANFILES    += awesomerc
50 BUILT_SOURCES += awesomerc
51 doc_DATA      += awesomerc
52 awesomerc: $(srcdir)/awesomerc.in
53         $(SED) -e "s|[@]iconslayoutsdir@|$(iconslayoutsdir)|" \
54                 < $(srcdir)/awesomerc.in > awesomerc
57 CLEANFILES    += defconfig.h
58 BUILT_SOURCES += defconfig.h
59 defconfig.h: awesomerc
60         @echo "generating defconfig.h from awesomerc"
61         @echo "#define AWESOME_DEFAULT_CONFIG \\" > defconfig.h
62         @echo -n "\"" >> defconfig.h
63         @$(SED) 's,\\,\\\\,g;s/$$/ \\/;s/"/\\"/g' "awesomerc" >> defconfig.h
64         @echo "\"" >> defconfig.h
66 CLEANFILES    += uicbgen.h
67 BUILT_SOURCES += uicbgen.h
68 EXTRA_DIST    += build-utils/uicbgen.sh
69 uicbgen.h: $(awesome_SOURCES)
70         @echo "generating uicbgen.h from headers file"
71         $(top_srcdir)/build-utils/uicbgen.sh "$(top_srcdir)" > uicbgen.h
73 CLEANFILES    += layoutgen.h
74 BUILT_SOURCES += layoutgen.h
75 EXTRA_DIST    += build-utils/layoutgen.sh
76 layoutgen.h: $(awesome_SOURCES)
77         @echo "generating layoutgen.h from layouts headers file"
78         $(top_srcdir)/build-utils/layoutgen.sh "$(top_srcdir)" > layoutgen.h
80 CLEANFILES    += widgetgen.h
81 BUILT_SOURCES += widgetgen.h
82 EXTRA_DIST    += build-utils/widgetgen.sh
83 widgetgen.h: widget.h
84         @echo "generating widgetgen.h from widget.h"
85         $(top_srcdir)/build-utils/widgetgen.sh "$(top_srcdir)" > widgetgen.h
87 A_V = awesome-version-internal
88 CLEANFILES    += $(A_V).h
89 BUILT_SOURCES += $(A_V).h.stamp
90 $(A_V).h.stamp:
91         @current_ver=`$(SHELL) $(top_srcdir)/build-utils/package-version $(top_srcdir) version-stamp`; \
92         { echo '#ifndef AWESOME_VERSION_INTERNAL_H'; \
93           echo "#define AWESOME_VERSION_INTERNAL \"$${current_ver}\""; \
94           echo "#endif"; } > "$(A_V).h.new"
95         @if test -f "$(A_V).h" \
96         && cmp "$(A_V).h.new" "$(A_V).h"; then :; \
97         else cat "$(A_V).h.new" > "$(A_V).h"; fi; \
98         rm -f "$(A_V).h.new"
100 if USING_GCC
101 # If you are using gcc, and want to deactivate this default set of
102 # compile flags, run make with AWESOME_CFLAGS="".
103 AWESOME_CFLAGS = -std=gnu99 -pipe \
104                  -Wall -Wextra \
105                  -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wsign-compare \
106                  -Wunused -Winit-self -Wpointer-arith -Wredundant-decls \
107                  -Wmissing-prototypes -Wmissing-format-attribute -Wmissing-noreturn
108 endif
109 AM_CPPFLAGS = $(XFT_CFLAGS) $(X_CFLAGS) $(CAIRO_CFLAGS) $(CONFUSE_CFLAGS) $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) $(AWESOME_CFLAGS)
111 bin_PROGRAMS += awesome
112 awesome_SOURCES = \
113         client.c client.h \
114         common/awesome-version.c common/awesome-version.h \
115         focus.c focus.h \
116         common/draw.c common/draw.h \
117         event.c event.h \
118         layout.c layout.h \
119         awesome.c awesome.h \
120         tag.c tag.h \
121         common/util.c common/util.h \
122         xutil.c xutil.h \
123         config.c config.h \
124         screen.c screen.h \
125         statusbar.c statusbar.h \
126         uicb.c uicb.h \
127         window.c window.h \
128         rules.c rules.h \
129         mouse.c mouse.h \
130         common/awclient.c \
131         common/swindow.c common/swindow.h \
132         widget.c widget.h \
133         ewmh.c ewmh.h \
134         common/list.h structs.h \
135         common/awclient.h \
136         common/configopts.h common/configopts.c
137 awesome_SOURCES += $(LAYOUTS)
138 awesome_SOURCES += $(WIDGETS)
139 awesome_LDADD = $(XFT_LIBS) $(X_LIBS) $(CAIRO_LIBS) $(CONFUSE_LIBS) $(XRANDR_LIBS) $(XINERAMA_LIBS)
141 bin_PROGRAMS += awesome-client
142 awesome_client_SOURCES = \
143         awesome-client.c common/awclient.h \
144         common/awesome-version.c common/awesome-version.h \
145         common/awclient.c \
146         common/util.c common/util.h
148 bin_PROGRAMS += awesome-message
149 awesome_message_SOURCES = \
150         common/swindow.c common/swindow.h \
151         common/draw.c common/draw.h \
152         common/util.h common/util.c \
153         common/awesome-version.h common/awesome-version.c \
154         common/configopts.h common/configopts.c \
155         awesome-message.c
157 awesome_message_LDADD = $(XFT_LIBS) $(X_LIBS) $(CAIRO_LIBS) $(CONFUSE_LIBS)
159 EXTRA_DIST += awesome.1.txt
160 man_MANS   += awesome.1
162 EXTRA_DIST += awesome-client.1.txt
163 man_MANS   += awesome-client.1
165 EXTRA_DIST += awesomerc.1.txt
166 man_MANS   += awesomerc.1
168 dist_iconslayouts_DATA += icons/layouts/dwindle.png
169 dist_iconslayouts_DATA += icons/layouts/dwindlew.png
170 dist_iconslayouts_DATA += icons/layouts/floating.png
171 dist_iconslayouts_DATA += icons/layouts/floatingw.png
172 dist_iconslayouts_DATA += icons/layouts/max.png
173 dist_iconslayouts_DATA += icons/layouts/maxw.png
174 dist_iconslayouts_DATA += icons/layouts/spiral.png
175 dist_iconslayouts_DATA += icons/layouts/spiralw.png
176 dist_iconslayouts_DATA += icons/layouts/tile.png
177 dist_iconslayouts_DATA += icons/layouts/tilebottom.png
178 dist_iconslayouts_DATA += icons/layouts/tilebottomw.png
179 dist_iconslayouts_DATA += icons/layouts/tileleft.png
180 dist_iconslayouts_DATA += icons/layouts/tileleftw.png
181 dist_iconslayouts_DATA += icons/layouts/tiletop.png
182 dist_iconslayouts_DATA += icons/layouts/tiletopw.png
183 dist_iconslayouts_DATA += icons/layouts/tilew.png
185 clean-local:
186         rm -f awesome*.1 awesome*.1.xml
188 SUFFIXES += .1.xml .1
189 if HAVE_XMLTO
190 .1.xml.1:
191         $(XMLTO) man $<
192 endif
194 SUFFIXES += .1.txt .1.xml
195 if HAVE_ASCIIDOC
196 .1.txt.1.xml:
197         $(ASCIIDOC) -d manpage -b docbook -o $@ $<
198 endif
201 # Check that package version matches git version before creating dist tarballs
202 dist-hook: git-version-check
203 distcheck-hook: git-version-check
205 # Note: We cannot run autogen.sh from here, because we would need some way to
206 #       restart the whole dist process from the start and there is none.
207 EXTRA_DIST += build-utils/package-version
208 git-version-check:
209         @git_ver=`$(top_srcdir)/build-utils/package-version $(top_srcdir) version-stamp`; \
210         if test "x$${git_ver}" = "x$(PACKAGE_VERSION)"; then :; else \
211                 echo "ERROR: PACKAGE_VERSION and 'git describe' version do not match:"; \
212                 echo "         current 'git describe' version: $${git_ver}"; \
213                 echo "         current PACKAGE_VERSION:        $(PACKAGE_VERSION)"; \
214                 echo "Update PACKAGE_VERSION by running $(top_srcdir)/autogen.sh."; \
215                 exit 1; \
216         fi
218 # Version stamp files can only exist in tarball source trees.
220 # So there is no need to generate them anywhere else or to clean them
221 # up anywhere.
222 dist-hook:
223         echo "$(PACKAGE_VERSION)" > "$(distdir)/version-stamp"
225 EXTRA_DIST += awesome.doxygen.in
227 # Workaround for buggy pre-1.5.3 doxygen.
229 # Some pre-1.5.3 versions of doxygen segfault on reading these lines.
230 # Call make with DOXYGEN_SEGFAULT=-segfault as a workaround.
231 CLEANFILES += awesome.doxygen-segfault
232 awesome.doxygen-segfault: awesome.doxygen
233         $(SED) '/^QT_AUTOBRIEF/d; /^EXTRACT_ANON_NSPACES/d; /^HTML_DYNAMIC_SECTIONS/d' \
234                 < awesome.doxygen > awesome.doxygen-segfault
236 if HAVE_DOXYGEN
237 doc: doc/html/index.html
239 doc/html/index.html: awesome.doxygen$(DOXYGEN_SEGFAULT) $(awesome_SOURCES) $(awesome_client_SOURCES)
240         $(DOXYGEN) awesome.doxygen$(DOXYGEN_SEGFAULT)
241 endif