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