switch to autotools as build system
This commit is contained in:
parent
1d6613349e
commit
ec09073087
105
Makefile
105
Makefile
|
@ -1,105 +0,0 @@
|
||||||
# awesome
|
|
||||||
# © 2007-2008 Julien Danjou <julien@danjou.info>
|
|
||||||
|
|
||||||
include config.mk
|
|
||||||
|
|
||||||
SRC = focus.c client.c draw.c event.c layout.c awesome.c tag.c util.c xutil.c config.c screen.c statusbar.c uicb.c window.c rules.c mouse.c awesome-client-common.c widget.c ewmh.c
|
|
||||||
OBJ = ${SRC:.c=.o} ${LAYOUTS:.c=.o} ${WIDGETS:.c=.o}
|
|
||||||
DOCS = awesome.1.txt awesome-client.1.txt awesomerc.1.txt
|
|
||||||
|
|
||||||
SRCCLIENT = awesome-client.c awesome-client-common.c util.c
|
|
||||||
OBJCLIENT = ${SRCCLIENT:.c=.o}
|
|
||||||
|
|
||||||
all: options awesome awesome-client
|
|
||||||
|
|
||||||
options:
|
|
||||||
@echo awesome build options:
|
|
||||||
@echo "LAYOUTS = ${LAYOUTS}"
|
|
||||||
@echo "WIDGETS = ${WIDGETS}"
|
|
||||||
@echo "CFLAGS = ${CFLAGS}"
|
|
||||||
@echo "LDFLAGS = ${LDFLAGS}"
|
|
||||||
@echo "CC = ${CC}"
|
|
||||||
|
|
||||||
.c.o:
|
|
||||||
@echo -e "\t(CC) $<"
|
|
||||||
@${CC} -c ${CFLAGS} $< -o $@
|
|
||||||
|
|
||||||
${OBJ}: awesome.h config.mk
|
|
||||||
|
|
||||||
${OBJCLIENT}: config.mk
|
|
||||||
|
|
||||||
man: ${DOCS}
|
|
||||||
asciidoc -d manpage -b docbook awesome.1.txt
|
|
||||||
asciidoc -d manpage -b docbook awesome-client.1.txt
|
|
||||||
asciidoc -d manpage -b docbook awesomerc.1.txt
|
|
||||||
xmlto man awesome.1.xml
|
|
||||||
xmlto man awesome-client.1.xml
|
|
||||||
xmlto man awesomerc.1.xml
|
|
||||||
|
|
||||||
awesome-client: ${OBJCLIENT}
|
|
||||||
@echo -e "\t(CC) ${OBJCLIENT} -o $@"
|
|
||||||
@${CC} -o $@ ${OBJCLIENT} ${CLIENTLDFLAGS}
|
|
||||||
|
|
||||||
defconfig.h: awesomerc
|
|
||||||
@echo generating defconfig.h from awesomerc
|
|
||||||
@echo "#define AWESOME_DEFAULT_CONFIG \\" > defconfig.h
|
|
||||||
@echo -n "\"" >> defconfig.h
|
|
||||||
@sed 's,\\,\\\\,g;s/$$/ \\/;s/"/\\"/g' awesomerc >> defconfig.h
|
|
||||||
@echo "\"" >> defconfig.h
|
|
||||||
|
|
||||||
awesome: defconfig.h ${OBJ}
|
|
||||||
@echo -e "\t(CC) ${OBJ} -o $@"
|
|
||||||
@${CC} -o $@ ${OBJ} ${LDFLAGS}
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@echo cleaning
|
|
||||||
@rm -f awesome awesome-client defconfig.h ${DOCS:.txt=} ${DOCS:.txt=.xml} ${OBJCLIENT} ${OBJ} awesome-${VERSION}.tar.gz
|
|
||||||
@rm -rf doc
|
|
||||||
|
|
||||||
dist: clean
|
|
||||||
@echo creating dist tarball
|
|
||||||
@mkdir awesome-${VERSION}
|
|
||||||
@mkdir awesome-${VERSION}/layouts
|
|
||||||
@mkdir awesome-${VERSION}/widgets
|
|
||||||
@mkdir awesome-${VERSION}/icons
|
|
||||||
@mkdir awesome-${VERSION}/icons/layouts
|
|
||||||
@cp -fR STYLE LICENSE AUTHORS Makefile README awesomerc config.mk \
|
|
||||||
awesome-client.1.txt awesome.1.txt awesomerc.1.txt ${SRCCLIENT} ${SRCCLIENT:.c=.h} ${SRC} ${SRC:.c=.h} \
|
|
||||||
awesome-${VERSION} || true
|
|
||||||
@cp -R ${LAYOUTS} ${LAYOUTS:.c=.h} awesome-${VERSION}/layouts
|
|
||||||
@cp -R ${WIDGETS} awesome-${VERSION}/widgets
|
|
||||||
@cp -R icons/layouts/* awesome-${VERSION}/icons/layouts
|
|
||||||
@tar -cf awesome-${VERSION}.tar awesome-${VERSION}
|
|
||||||
@gzip -9 awesome-${VERSION}.tar
|
|
||||||
@rm -rf awesome-${VERSION}
|
|
||||||
|
|
||||||
strip: awesome awesome-client
|
|
||||||
strip awesome
|
|
||||||
strip awesome-client
|
|
||||||
|
|
||||||
install: strip install-unstrip
|
|
||||||
|
|
||||||
install-unstrip: awesome awesome-client man
|
|
||||||
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
|
|
||||||
@install -d ${DESTDIR}${PREFIX}/bin
|
|
||||||
@install -m 755 awesome awesome-client ${DESTDIR}${PREFIX}/bin
|
|
||||||
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
|
|
||||||
@install -d ${DESTDIR}${MANPREFIX}/man1
|
|
||||||
@install -m 644 ${DOCS:.txt=} ${DESTDIR}${MANPREFIX}/man1
|
|
||||||
@echo installing shared data to ${DESTDIR}${PREFIX}/share
|
|
||||||
@install -d ${DESTDIR}${PREFIX}/share/awesome/icons/layouts
|
|
||||||
@install icons/layouts/* ${DESTDIR}${PREFIX}/share/awesome/icons/layouts/
|
|
||||||
|
|
||||||
uninstall:
|
|
||||||
@echo removing executable file from ${DESTDIR}${PREFIX}/bin
|
|
||||||
@rm ${DESTDIR}${PREFIX}/bin/awesome ${DESTDIR}${PREFIX}/bin/awesome-client
|
|
||||||
@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
|
|
||||||
@rm ${DESTDIR}${MANPREFIX}/man1/awesome.1 ${DESTDIR}${MANPREFIX}/man1/awesome-client.1 ${DESTDIR}${MANPREFIX}/man1/awesomerc.1
|
|
||||||
@echo removing shared data from ${DESTDIR}${PREFIX}/share
|
|
||||||
@rm -rf ${DESTDIR}${PREFIX}/share/awesome
|
|
||||||
|
|
||||||
doc:
|
|
||||||
@echo generating documentation
|
|
||||||
@doxygen awesome.doxygen
|
|
||||||
|
|
||||||
.PHONY: all options clean dist install uninstall doc man
|
|
|
@ -0,0 +1,108 @@
|
||||||
|
BUILT_SOURCES =
|
||||||
|
CLEANFILES =
|
||||||
|
EXTRA_DIST =
|
||||||
|
SUFFIXES =
|
||||||
|
bin_PROGRAMS =
|
||||||
|
doc_DATA =
|
||||||
|
man_MANS =
|
||||||
|
|
||||||
|
LAYOUTS =
|
||||||
|
WIDGETS =
|
||||||
|
|
||||||
|
include layouts/Makefile-files
|
||||||
|
include widgets/Makefile-files
|
||||||
|
|
||||||
|
EXTRA_DIST += awesomerc
|
||||||
|
doc_DATA += awesomerc
|
||||||
|
|
||||||
|
doc_DATA += README
|
||||||
|
|
||||||
|
EXTRA_DIST += LICENSE
|
||||||
|
doc_DATA += LICENSE
|
||||||
|
|
||||||
|
EXTRA_DIST += STYLE
|
||||||
|
doc_DATA += STYLE
|
||||||
|
|
||||||
|
CLEANFILES += defconfig.h
|
||||||
|
BUILT_SOURCES += defconfig.h
|
||||||
|
defconfig.h: $(srcdir)/awesomerc
|
||||||
|
@echo "generating defconfig.h from $(srcdir)/awesomerc"
|
||||||
|
@echo "#define AWESOME_DEFAULT_CONFIG \\" > defconfig.h
|
||||||
|
@echo -n "\"" >> defconfig.h
|
||||||
|
@$(SED) 's,\\,\\\\,g;s/$$/ \\/;s/"/\\"/g' "$(srcdir)/awesomerc" >> defconfig.h
|
||||||
|
@echo "\"" >> defconfig.h
|
||||||
|
|
||||||
|
AM_CPPFLAGS = $(XFT_CFLAGS) $(X_CFLAGS) $(CAIRO_CFLAGS) $(CONFUSE_CFLAGS) $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS)
|
||||||
|
|
||||||
|
bin_PROGRAMS += awesome
|
||||||
|
awesome_SOURCES = \
|
||||||
|
client.c client.h \
|
||||||
|
focus.c focus.h \
|
||||||
|
draw.c draw.h \
|
||||||
|
event.c event.h \
|
||||||
|
layout.c layout.h \
|
||||||
|
awesome.c awesome.h \
|
||||||
|
tag.c tag.h \
|
||||||
|
util.c util.h \
|
||||||
|
xutil.c xutil.h \
|
||||||
|
config.c config.h \
|
||||||
|
screen.c screen.h \
|
||||||
|
statusbar.c statusbar.h \
|
||||||
|
uicb.c uicb.h \
|
||||||
|
window.c window.h \
|
||||||
|
rules.c rules.h \
|
||||||
|
mouse.c mouse.h \
|
||||||
|
awesome-client-common.c \
|
||||||
|
widget.c widget.h \
|
||||||
|
ewmh.c ewmh.h
|
||||||
|
awesome_SOURCES += $(LAYOUTS)
|
||||||
|
awesome_SOURCES += $(WIDGETS)
|
||||||
|
awesome_LDADD = $(XFT_LIBS) $(X_LIBS) $(CAIRO_LIBS) $(CONFUSE_LIBS) $(XRANDR_LIBS) $(XINERAMA_LIBS)
|
||||||
|
|
||||||
|
bin_PROGRAMS += awesome-client
|
||||||
|
awesome_client_SOURCES = \
|
||||||
|
awesome-client.c awesome-client.h \
|
||||||
|
awesome-client-common.c \
|
||||||
|
util.c util.h
|
||||||
|
|
||||||
|
EXTRA_DIST += awesome.1.txt
|
||||||
|
man_MANS += awesome.1
|
||||||
|
|
||||||
|
EXTRA_DIST += awesome-client.1.txt
|
||||||
|
man_MANS += awesome-client.1
|
||||||
|
|
||||||
|
EXTRA_DIST += awesomerc.1.txt
|
||||||
|
man_MANS += awesomerc.1
|
||||||
|
|
||||||
|
clean-local:
|
||||||
|
rm -f awesome*.1 awesome*.1.xml
|
||||||
|
|
||||||
|
SUFFIXES += .1.xml .1
|
||||||
|
if HAVE_XMLTO
|
||||||
|
.1.xml.1:
|
||||||
|
$(XMLTO) man $<
|
||||||
|
endif
|
||||||
|
|
||||||
|
SUFFIXES += .1.txt .1.xml
|
||||||
|
if HAVE_ASCIIDOC
|
||||||
|
.1.txt.1.xml:
|
||||||
|
$(ASCIIDOC) -d manpage -b docbook -o $@ $<
|
||||||
|
endif
|
||||||
|
|
||||||
|
EXTRA_DIST += awesome.doxygen.in
|
||||||
|
|
||||||
|
# Workaround for buggy pre-1.5.3 doxygen.
|
||||||
|
#
|
||||||
|
# Some pre-1.5.3 versions of doxygen segfault on reading these lines.
|
||||||
|
# Call make with DOXYGEN_SEGFAULT=-segfault as a workaround.
|
||||||
|
CLEANFILES += awesome.doxygen-segfault
|
||||||
|
awesome.doxygen-segfault: awesome.doxygen
|
||||||
|
$(SED) '/^QT_AUTOBRIEF/d; /^EXTRACT_ANON_NSPACES/d; /^HTML_DYNAMIC_SECTIONS/d' \
|
||||||
|
< awesome.doxygen > awesome.doxygen-segfault
|
||||||
|
|
||||||
|
if HAVE_DOXYGEN
|
||||||
|
doc: doc/html/index.html
|
||||||
|
|
||||||
|
doc/html/index.html: awesome.doxygen$(DOXYGEN_SEGFAULT) $(awesome_SOURCES) $(awesome_client_SOURCES)
|
||||||
|
$(DOXYGEN) awesome.doxygen$(DOXYGEN_SEGFAULT)
|
||||||
|
endif
|
14
README
14
README
|
@ -12,13 +12,17 @@ tools.
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
Edit config.mk to match your local setup (awesome is installed into
|
If building from git sources, run "autoreconf -vis .". When autoreconf has
|
||||||
the /usr/local namespace by default).
|
finished, you can follow the following instructions for building a dist
|
||||||
|
tarball.
|
||||||
|
|
||||||
Afterwards enter the following command to build and install awesome (if
|
After extracting the dist tarball, run "./configure --help" and figure out
|
||||||
necessary as root):
|
what you might want to adapt for your system. Then run ./configure with the
|
||||||
|
proper parameters, and build and install:
|
||||||
|
|
||||||
make install
|
./configure [...]
|
||||||
|
make
|
||||||
|
make install # might need root permissions
|
||||||
|
|
||||||
Running awesome
|
Running awesome
|
||||||
-----------
|
-----------
|
||||||
|
|
|
@ -80,7 +80,7 @@ WARN_LOGFILE =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to the input files
|
# configuration options related to the input files
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
INPUT = .
|
INPUT = @top_srcdir@ @top_builddir@
|
||||||
INPUT_ENCODING = UTF-8
|
INPUT_ENCODING = UTF-8
|
||||||
FILE_PATTERNS = *.c \
|
FILE_PATTERNS = *.c \
|
||||||
*.h \
|
*.h \
|
29
config.mk
29
config.mk
|
@ -1,29 +0,0 @@
|
||||||
# awesome version
|
|
||||||
VERSION = $$(git describe 2>/dev/null || echo devel)
|
|
||||||
RELEASE = "Productivity Breaker"
|
|
||||||
|
|
||||||
# Customize below to fit your system
|
|
||||||
|
|
||||||
# additional layouts
|
|
||||||
LAYOUTS = layouts/tile.c layouts/floating.c layouts/max.c layouts/fibonacci.c
|
|
||||||
# additional widgets
|
|
||||||
WIDGETS = widgets/taglist.c widgets/layoutinfo.c widgets/textbox.c widgets/focustitle.c widgets/iconbox.c widgets/netwmicon.c widgets/progressbar.c widgets/tasklist.c
|
|
||||||
|
|
||||||
# paths
|
|
||||||
PREFIX = /usr/local
|
|
||||||
MANPREFIX = ${PREFIX}/share/man
|
|
||||||
|
|
||||||
X11INC = /usr/include/X11
|
|
||||||
X11LIB = /usr/lib/X11
|
|
||||||
|
|
||||||
# includes and libs
|
|
||||||
INCS = -I. -I/usr/include -I${X11INC} `pkg-config --cflags libconfuse xft cairo`
|
|
||||||
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 `pkg-config --libs libconfuse xft cairo` -lXext -lXrandr -lXinerama
|
|
||||||
|
|
||||||
# flags
|
|
||||||
CFLAGS = -std=gnu99 -ggdb3 -pipe -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wsign-compare -Wunused -Winit-self -Wpointer-arith -Wredundant-decls -Wmissing-prototypes -Wmissing-format-attribute -Wmissing-noreturn -O3 ${INCS} -DVERSION=\"${VERSION}\" -DRELEASE=\"${RELEASE}\"
|
|
||||||
LDFLAGS = -ggdb3 ${LIBS}
|
|
||||||
CLIENTLDFLAGS = -ggdb3
|
|
||||||
|
|
||||||
# compiler and linker
|
|
||||||
CC = cc
|
|
|
@ -0,0 +1,79 @@
|
||||||
|
# -*- Autoconf -*-
|
||||||
|
# Process this file with autoreconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_PREREQ(2.61)
|
||||||
|
dnl Each time you want an updated version number for your build, you need to
|
||||||
|
dnl (re-)run autoreconf.
|
||||||
|
AC_INIT([awesome window manager],
|
||||||
|
[m4_esyscmd([{ git describe 2>/dev/null || echo devel; } | tr -d '\n'])],
|
||||||
|
[http://awesome.naquadah.org/bugs/],
|
||||||
|
[awesome])
|
||||||
|
AC_CONFIG_AUX_DIR([auto-aux])
|
||||||
|
AC_CONFIG_SRCDIR([awesome.c])
|
||||||
|
dnl The AC_CONFIG_HEADER and awesome's own config.h are different beasts
|
||||||
|
dnl AC_CONFIG_HEADER([config.h])
|
||||||
|
dnl Other options:
|
||||||
|
dnl check-news to check that NEWS has been adapted to current version
|
||||||
|
dnl std-options make sure shipped executables understand --help and --version
|
||||||
|
AM_INIT_AUTOMAKE([-Wall -Werror 1.10 dist-bzip2 foreign filename-length-max=99 foreign subdir-objects])
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED([RELEASE], ["Productivity Breaker"])
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
|
AC_PROG_SED
|
||||||
|
AC_PROG_CC
|
||||||
|
AM_PROG_CC_C_O
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
|
||||||
|
AC_ARG_VAR([ASCIIDOC], [asciidoc doc generation tool])
|
||||||
|
AC_ARG_VAR([XMLTO], [xmlto converter from xml to other formats])
|
||||||
|
AC_ARG_VAR([DOXYGEN], [doxygen source documentation system])
|
||||||
|
|
||||||
|
test "x$ASCIIDOC" = "x" && AC_PATH_PROG([ASCIIDOC], [asciidoc], [:])
|
||||||
|
test "x$XMLTO" = "x" && AC_PATH_PROG([XMLTO], [xmlto], [:])
|
||||||
|
test "x$DOXYGEN" = "x" && AC_PATH_PROG([DOXYGEN], [doxygen], [:])
|
||||||
|
|
||||||
|
test "x$ASCIIDOC" = "x:" && AC_MSG_WARN([awesome requires asciidoc])
|
||||||
|
test "x$XMLTO" = "x:" && AC_MSG_WARN([awesome requires xmlto])
|
||||||
|
test "x$DOXYGEN" = "x:" && AC_MSG_WARN([awesome requires doxygen])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([HAVE_ASCIIDOC], [test "x$ASCIIDOC" != "x:"])
|
||||||
|
AM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x:"])
|
||||||
|
AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$DOXYGEN" != "x:"])
|
||||||
|
|
||||||
|
# Checks for libraries.
|
||||||
|
AC_PATH_XTRA
|
||||||
|
PKG_CHECK_MODULES([CAIRO], [cairo],,
|
||||||
|
[AC_MSG_ERROR([awesome requires cairo.])])
|
||||||
|
PKG_CHECK_MODULES([CONFUSE], [libconfuse >= 2.6],,
|
||||||
|
[AC_MSG_ERROR([awesome requires libconfuse >= 2.6.])])
|
||||||
|
PKG_CHECK_MODULES([XFT], [xft],,
|
||||||
|
[AC_MSG_ERROR([awesome requires xft.])])
|
||||||
|
PKG_CHECK_MODULES([XINERAMA], [xinerama],,
|
||||||
|
[AC_MSG_ERROR([awesome requires Xinerama.])])
|
||||||
|
PKG_CHECK_MODULES([XRANDR], [xrandr],,
|
||||||
|
[AC_MSG_ERROR([awesome requires Xrandr.])])
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_PATH_X
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_HEADER_SYS_WAIT
|
||||||
|
AC_CHECK_HEADERS([fcntl.h limits.h locale.h stdlib.h string.h sys/socket.h unistd.h])
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_C_CONST
|
||||||
|
AC_C_INLINE
|
||||||
|
AC_TYPE_SIZE_T
|
||||||
|
AC_TYPE_SSIZE_T
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_FUNC_FORK
|
||||||
|
AC_FUNC_REALLOC
|
||||||
|
AC_FUNC_SELECT_ARGTYPES
|
||||||
|
AC_TYPE_SIGNAL
|
||||||
|
AC_FUNC_VPRINTF
|
||||||
|
AC_CHECK_FUNCS([memchr regcomp select setenv socket strchr strrchr strstr])
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([Makefile])
|
||||||
|
AC_CONFIG_FILES([awesome.doxygen])
|
||||||
|
AC_OUTPUT
|
|
@ -0,0 +1,13 @@
|
||||||
|
# -*- Makefile -*-
|
||||||
|
|
||||||
|
LAYOUTS += layouts/tile.c
|
||||||
|
LAYOUTS += layouts/tile.h
|
||||||
|
|
||||||
|
LAYOUTS += layouts/floating.c
|
||||||
|
LAYOUTS += layouts/floating.h
|
||||||
|
|
||||||
|
LAYOUTS += layouts/max.c
|
||||||
|
LAYOUTS += layouts/max.h
|
||||||
|
|
||||||
|
LAYOUTS += layouts/fibonacci.c
|
||||||
|
LAYOUTS += layouts/fibonacci.h
|
|
@ -0,0 +1,10 @@
|
||||||
|
# -*- Makefile -*-
|
||||||
|
|
||||||
|
WIDGETS += widgets/taglist.c
|
||||||
|
WIDGETS += widgets/layoutinfo.c
|
||||||
|
WIDGETS += widgets/textbox.c
|
||||||
|
WIDGETS += widgets/focustitle.c
|
||||||
|
WIDGETS += widgets/iconbox.c
|
||||||
|
WIDGETS += widgets/netwmicon.c
|
||||||
|
WIDGETS += widgets/progressbar.c
|
||||||
|
WIDGETS += widgets/tasklist.c
|
Loading…
Reference in New Issue