Autotools cleanup

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
Quentin Glidic 2016-02-16 11:12:58 +01:00 committed by Dave Davenport
parent 591429fb58
commit 4c11da91f5
2 changed files with 98 additions and 94 deletions

View file

@ -8,28 +8,6 @@ bin_PROGRAMS=rofi
dist_bin_SCRIPTS=script/rofi-sensible-terminal dist_bin_SCRIPTS=script/rofi-sensible-terminal
LIBS=\
@glib_LIBS@\
@x11_LIBS@\
@xinerama_LIBS@\
@libsn_LIBS@\
@pango_LIBS@\
@cairo_LIBS@
AM_CFLAGS=\
@EXTRA_CFLAGS@\
@glib_CFLAGS@\
@x11_CFLAGS@\
@xinerama_CFLAGS@\
@pango_CFLAGS@\
@libsn_CFLAGS@\
@cairo_CFLAGS@\
-DMANPAGE_PATH="\"$(mandir)/\""\
-I$(top_srcdir)/include/\
-I$(top_srcdir)/config/\
-I$(top_builddir)/\
-Werror=missing-prototypes
rofi_SOURCES=\ rofi_SOURCES=\
source/rofi.c\ source/rofi.c\
source/view.c\ source/view.c\
@ -79,10 +57,33 @@ rofi_SOURCES=\
include/dialogs/window.h\ include/dialogs/window.h\
include/dialogs/dialogs.h include/dialogs/dialogs.h
rofi_CFLAGS=\
$(AM_CFLAGS)\
$(glib_CFLAGS)\
$(x11_CFLAGS)\
$(xinerama_CFLAGS)\
$(pango_CFLAGS)\
$(libsn_CFLAGS)\
$(cairo_CFLAGS)\
-DMANPAGE_PATH="\"$(mandir)/\""\
-I$(top_srcdir)/include/\
-I$(top_srcdir)/config/\
-I$(top_builddir)/\
-Werror=missing-prototypes
rofi_LDADD=\
$(glib_LIBS)\
$(x11_LIBS)\
$(xinerama_LIBS)\
$(libsn_LIBS)\
$(pango_LIBS)\
$(cairo_LIBS)\
$(LIBS)
## ##
# Manpage # Manpage
## ##
man1_MANS=\ dist_man1_MANS=\
doc/rofi.1\ doc/rofi.1\
doc/rofi-sensible-terminal.1 doc/rofi-sensible-terminal.1
@ -107,18 +108,17 @@ README.html: README.md
## ##
# config directory # config directory
## ##
${top_builddir}/config/config.c: ${top_srcdir}/config/config.def.c $(top_builddir)/config/config.c: $(top_srcdir)/config/config.def.c
cp ${top_srcdir}/config/config.def.c $@ cp $(top_srcdir)/config/config.def.c $@
## ##
# Extra DIST # Extra DIST
## ##
EXTRA_DIST=\ EXTRA_DIST=\
$(man1_MANS)\
$(markdown_FILES)\ $(markdown_FILES)\
$(markdown_SC_FILES)\ $(markdown_SC_FILES)\
Examples/i3_switch_workspaces.sh\ Examples/i3_switch_workspaces.sh\
${top_srcdir}/config/config.def.c\ $(top_srcdir)/config/config.def.c\
INSTALL.md\ INSTALL.md\
AUTHORS\ AUTHORS\
doc/rofi.doxy.in\ doc/rofi.doxy.in\
@ -129,13 +129,13 @@ EXTRA_DIST=\
## ##
update-manpage: ${top_srcdir}/doc/rofi-manpage.markdown update-manpage: $(top_srcdir)/doc/rofi-manpage.markdown
ronn --roff --pipe $^ > ${top_srcdir}/doc/rofi.1 ronn --roff --pipe $^ > $(top_srcdir)/doc/rofi.1
## ##
# Rofi test program # Rofi test program
## ##
noinst_PROGRAMS=rofi_test textbox_test helper_test check_PROGRAMS=rofi_test textbox_test helper_test
rofi_test_SOURCES=\ rofi_test_SOURCES=\
@ -180,13 +180,12 @@ helper_test_SOURCES=\
source/xrmoptions.c\ source/xrmoptions.c\
test/helper-test.c test/helper-test.c
.PHONY: test TESTS=\
test: ${bin_PROGRAMS} ${noinst_PROGRAMS} rofi_test\
./rofi_test helper_test
./helper_test
.PHONY: test-x .PHONY: test-x
test-x: ${bin_PROGRAMS} test-x: $(bin_PROGRAMS)
echo "Test 1" echo "Test 1"
$(top_srcdir)/test/run_test.sh 123 $(top_builddir)/textbox_test $(top_builddir) $(top_srcdir)/test/run_test.sh 123 $(top_builddir)/textbox_test $(top_builddir)
echo "Test 2" echo "Test 2"
@ -230,7 +229,7 @@ test-x: ${bin_PROGRAMS}
echo "Test issue 333" echo "Test issue 333"
$(top_srcdir)/test/run_test.sh 221 $(top_srcdir)/test/run_issue333_test.sh $(top_builddir) $(top_srcdir)/test/run_test.sh 221 $(top_srcdir)/test/run_issue333_test.sh $(top_builddir)
test-x1: ${bin_PROGRAMS} test-x1: $(bin_PROGRAMS)
echo "Test dmenu-normal-window" echo "Test dmenu-normal-window"
$(top_srcdir)/test/run_test.sh 219 $(top_srcdir)/test/run_dmenu_normal_window_test.sh $(top_builddir) $(top_srcdir)/test/run_test.sh 219 $(top_srcdir)/test/run_dmenu_normal_window_test.sh $(top_builddir)
echo "Test window" echo "Test window"
@ -239,19 +238,19 @@ test-x1: ${bin_PROGRAMS}
.PHONY: indent .PHONY: indent
indent: ${rofi_SOURCES} ${top_srcdir}/config/config.def.c ${helper_test_SOURCES} ${textbox_test_SOURCES} ${rofi_test_SOURCES} indent: $(rofi_SOURCES) $(top_srcdir)/config/config.def.c $(helper_test_SOURCES) $(textbox_test_SOURCES) $(rofi_test_SOURCES)
uncrustify -c ${top_srcdir}/data/uncrustify.cfg --replace $^ uncrustify -c $(top_srcdir)/data/uncrustify.cfg --replace $^
.PHONY: cppcheck .PHONY: cppcheck
cppcheck: ${rofi_SOURCES} cppcheck: $(rofi_SOURCES)
cppcheck --std=c99 --platform=unix64 --enable=all -Uerror_dialog -I ${top_srcdir}/include/ $^ cppcheck --std=c99 --platform=unix64 --enable=all -Uerror_dialog -I $(top_srcdir)/include/ $^
.PHONY: ohcount .PHONY: ohcount
ohcount: ${rofi_SOURCES} ohcount: $(rofi_SOURCES)
ohcount -i ${top_srcdir}/source/ ${top_srcdir}/include/ ohcount -i $(top_srcdir)/source/ $(top_srcdir)/include/
doxy: doc/rofi.doxy ${rofi_SOURCES} doxy: doc/rofi.doxy $(rofi_SOURCES)
doxygen ${top_builddir}/doc/rofi.doxy doxygen $(top_builddir)/doc/rofi.doxy

View file

@ -30,13 +30,18 @@ dnl System extensions
dnl --------------------------------------------------------------------- dnl ---------------------------------------------------------------------
AC_USE_SYSTEM_EXTENSIONS AC_USE_SYSTEM_EXTENSIONS
dnl ---------------------------------------------------------------------
dnl Base CFLAGS
dnl ---------------------------------------------------------------------
AM_CFLAGS="-Wall -Wextra -Wparentheses -Winline -pedantic"
dnl --------------------------------------------------------------------- dnl ---------------------------------------------------------------------
dnl Enable source code coverage reporting for GCC dnl Enable source code coverage reporting for GCC
dnl --------------------------------------------------------------------- dnl ---------------------------------------------------------------------
AC_ARG_ENABLE(gcov, AC_ARG_ENABLE(gcov,
[ --enable-gcov Enable source code coverage testing using gcov], [ --enable-gcov Enable source code coverage testing using gcov],
[CFLAGS="$CFLAGS -coverage"]) [AM_CFLAGS="${AM_CFLAGS} -coverage"])
dnl --------------------------------------------------------------------- dnl ---------------------------------------------------------------------
dnl Disable window mode dnl Disable window mode
dnl --------------------------------------------------------------------- dnl ---------------------------------------------------------------------
@ -82,7 +87,7 @@ PKG_CHECK_MODULES([libsn], [libstartup-notification-1.0])
dnl --------------------------------------------------------------------- dnl ---------------------------------------------------------------------
dnl Add extra compiler flags dnl Add extra compiler flags
dnl --------------------------------------------------------------------- dnl ---------------------------------------------------------------------
AC_SUBST([EXTRA_CFLAGS], ["-Wall -Wextra -Wparentheses -Winline -pedantic"]) AC_SUBST([AM_CFLAGS])
AC_CONFIG_FILES([Makefile doc/rofi.doxy]) AC_CONFIG_FILES([Makefile doc/rofi.doxy])
AC_OUTPUT AC_OUTPUT