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,52 +8,30 @@ 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\
source/mode.c\ source/mode.c\
source/keyb.c\ source/keyb.c\
config/config.c\ config/config.c\
source/helper.c\ source/helper.c\
source/widget.c\ source/widget.c\
source/textbox.c\ source/textbox.c\
source/timings.c\ source/timings.c\
source/history.c\ source/history.c\
source/scrollbar.c\ source/scrollbar.c\
source/i3-support.c\ source/i3-support.c\
source/xrmoptions.c\ source/xrmoptions.c\
source/x11-helper.c\ source/x11-helper.c\
source/x11-event-source.c\ source/x11-event-source.c\
source/dialogs/run.c\ source/dialogs/run.c\
source/dialogs/ssh.c\ source/dialogs/ssh.c\
source/dialogs/drun.c\ source/dialogs/drun.c\
source/dialogs/dmenu.c\ source/dialogs/dmenu.c\
source/dialogs/combi.c\ source/dialogs/combi.c\
source/dialogs/window.c\ source/dialogs/window.c\
source/dialogs/script.c\ source/dialogs/script.c\
include/rofi.h\ include/rofi.h\
include/mode.h\ include/mode.h\
include/mode-private.h\ include/mode-private.h\
include/settings.h\ include/settings.h\
@ -62,35 +40,58 @@ rofi_SOURCES=\
include/view-internal.h\ include/view-internal.h\
include/helper.h\ include/helper.h\
include/timings.h\ include/timings.h\
include/history.h\ include/history.h\
include/widget.h\ include/widget.h\
include/textbox.h\ include/textbox.h\
include/scrollbar.h\ include/scrollbar.h\
include/xrmoptions.h\ include/xrmoptions.h\
include/i3-support.h\ include/i3-support.h\
include/x11-helper.h\ include/x11-helper.h\
include/x11-event-source.h\ include/x11-event-source.h\
include/dialogs/ssh.h\ include/dialogs/ssh.h\
include/dialogs/run.h\ include/dialogs/run.h\
include/dialogs/drun.h\ include/dialogs/drun.h\
include/dialogs/dmenu.h\ include/dialogs/dmenu.h\
include/dialogs/combi.h\ include/dialogs/combi.h\
include/dialogs/script.h\ include/dialogs/script.h\
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
## ##
# Readme.md # Readme.md
## ##
markdown_SC_FILES=\ markdown_SC_FILES=\
README.md README.md
# want the html to show up in release. # want the html to show up in release.
md_verbose = $(md_verbose_@AM_V@) md_verbose = $(md_verbose_@AM_V@)
@ -98,7 +99,7 @@ md_verbose_ = $(md_verbose_@AM_DEFAULT_V@)
md_verbose_0 = @echo " MD" $@; md_verbose_0 = @echo " MD" $@;
markdown_FILES=\ markdown_FILES=\
README.html README.html
README.html: README.md README.html: README.md
$(md_verbose) markdown $< > $@ $(md_verbose) markdown $< > $@
@ -107,19 +108,18 @@ 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\
Changelog Changelog
@ -129,40 +129,40 @@ 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=\
source/history.c\ source/history.c\
config/config.c\ config/config.c\
include/rofi.h\ include/rofi.h\
include/mode.h\ include/mode.h\
include/mode-private.h\ include/mode-private.h\
include/settings.h\ include/settings.h\
include/history.h\ include/history.h\
test/history-test.c test/history-test.c
textbox_test_SOURCES=\ textbox_test_SOURCES=\
source/widget.c\ source/widget.c\
source/textbox.c\ source/textbox.c\
config/config.c\ config/config.c\
source/keyb.c\ source/keyb.c\
source/x11-helper.c\ source/x11-helper.c\
source/xrmoptions.c\ source/xrmoptions.c\
source/helper.c\ source/helper.c\
include/keyb.h\ include/keyb.h\
include/rofi.h\ include/rofi.h\
include/mode.h\ include/mode.h\
include/mode-private.h\ include/mode-private.h\
include/settings.h\ include/settings.h\
include/widget.h\ include/widget.h\
include/textbox.h\ include/textbox.h\
include/widget.h\ include/widget.h\
include/x11-helper.h\ include/x11-helper.h\
include/xrmoptions.h\ include/xrmoptions.h\
@ -170,23 +170,22 @@ textbox_test_SOURCES=\
test/textbox-test.c test/textbox-test.c
helper_test_SOURCES=\ helper_test_SOURCES=\
config/config.c\ config/config.c\
include/rofi.h\ include/rofi.h\
include/mode.h\ include/mode.h\
include/mode-private.h\ include/mode-private.h\
source/helper.c\ source/helper.c\
include/helper.h\ include/helper.h\
include/xrmoptions.h\ include/xrmoptions.h\
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,28 +229,28 @@ 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"
$(top_srcdir)/test/run_test.sh 220 $(top_srcdir)/test/run_window_test.sh $(top_builddir) $(top_srcdir) $(top_srcdir)/test/run_test.sh 220 $(top_srcdir)/test/run_window_test.sh $(top_builddir) $(top_srcdir)
echo "End tests" echo "End tests"
.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