mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
Autotools cleanup
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
parent
591429fb58
commit
4c11da91f5
2 changed files with 98 additions and 94 deletions
87
Makefile.am
87
Makefile.am
|
@ -8,28 +8,6 @@ bin_PROGRAMS=rofi
|
|||
|
||||
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=\
|
||||
source/rofi.c\
|
||||
source/view.c\
|
||||
|
@ -79,10 +57,33 @@ rofi_SOURCES=\
|
|||
include/dialogs/window.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
|
||||
##
|
||||
man1_MANS=\
|
||||
dist_man1_MANS=\
|
||||
doc/rofi.1\
|
||||
doc/rofi-sensible-terminal.1
|
||||
|
||||
|
@ -107,18 +108,17 @@ README.html: README.md
|
|||
##
|
||||
# config directory
|
||||
##
|
||||
${top_builddir}/config/config.c: ${top_srcdir}/config/config.def.c
|
||||
cp ${top_srcdir}/config/config.def.c $@
|
||||
$(top_builddir)/config/config.c: $(top_srcdir)/config/config.def.c
|
||||
cp $(top_srcdir)/config/config.def.c $@
|
||||
|
||||
##
|
||||
# Extra DIST
|
||||
##
|
||||
EXTRA_DIST=\
|
||||
$(man1_MANS)\
|
||||
$(markdown_FILES)\
|
||||
$(markdown_SC_FILES)\
|
||||
Examples/i3_switch_workspaces.sh\
|
||||
${top_srcdir}/config/config.def.c\
|
||||
$(top_srcdir)/config/config.def.c\
|
||||
INSTALL.md\
|
||||
AUTHORS\
|
||||
doc/rofi.doxy.in\
|
||||
|
@ -129,13 +129,13 @@ EXTRA_DIST=\
|
|||
##
|
||||
|
||||
|
||||
update-manpage: ${top_srcdir}/doc/rofi-manpage.markdown
|
||||
ronn --roff --pipe $^ > ${top_srcdir}/doc/rofi.1
|
||||
update-manpage: $(top_srcdir)/doc/rofi-manpage.markdown
|
||||
ronn --roff --pipe $^ > $(top_srcdir)/doc/rofi.1
|
||||
|
||||
##
|
||||
# Rofi test program
|
||||
##
|
||||
noinst_PROGRAMS=rofi_test textbox_test helper_test
|
||||
check_PROGRAMS=rofi_test textbox_test helper_test
|
||||
|
||||
|
||||
rofi_test_SOURCES=\
|
||||
|
@ -180,13 +180,12 @@ helper_test_SOURCES=\
|
|||
source/xrmoptions.c\
|
||||
test/helper-test.c
|
||||
|
||||
.PHONY: test
|
||||
test: ${bin_PROGRAMS} ${noinst_PROGRAMS}
|
||||
./rofi_test
|
||||
./helper_test
|
||||
TESTS=\
|
||||
rofi_test\
|
||||
helper_test
|
||||
|
||||
.PHONY: test-x
|
||||
test-x: ${bin_PROGRAMS}
|
||||
test-x: $(bin_PROGRAMS)
|
||||
echo "Test 1"
|
||||
$(top_srcdir)/test/run_test.sh 123 $(top_builddir)/textbox_test $(top_builddir)
|
||||
echo "Test 2"
|
||||
|
@ -230,7 +229,7 @@ test-x: ${bin_PROGRAMS}
|
|||
echo "Test issue 333"
|
||||
$(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"
|
||||
$(top_srcdir)/test/run_test.sh 219 $(top_srcdir)/test/run_dmenu_normal_window_test.sh $(top_builddir)
|
||||
echo "Test window"
|
||||
|
@ -239,19 +238,19 @@ test-x1: ${bin_PROGRAMS}
|
|||
|
||||
|
||||
.PHONY: indent
|
||||
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 $^
|
||||
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 $^
|
||||
|
||||
.PHONY: cppcheck
|
||||
|
||||
cppcheck: ${rofi_SOURCES}
|
||||
cppcheck --std=c99 --platform=unix64 --enable=all -Uerror_dialog -I ${top_srcdir}/include/ $^
|
||||
cppcheck: $(rofi_SOURCES)
|
||||
cppcheck --std=c99 --platform=unix64 --enable=all -Uerror_dialog -I $(top_srcdir)/include/ $^
|
||||
|
||||
.PHONY: ohcount
|
||||
|
||||
ohcount: ${rofi_SOURCES}
|
||||
ohcount -i ${top_srcdir}/source/ ${top_srcdir}/include/
|
||||
ohcount: $(rofi_SOURCES)
|
||||
ohcount -i $(top_srcdir)/source/ $(top_srcdir)/include/
|
||||
|
||||
doxy: doc/rofi.doxy ${rofi_SOURCES}
|
||||
doxygen ${top_builddir}/doc/rofi.doxy
|
||||
doxy: doc/rofi.doxy $(rofi_SOURCES)
|
||||
doxygen $(top_builddir)/doc/rofi.doxy
|
||||
|
||||
|
|
|
@ -30,13 +30,18 @@ dnl System extensions
|
|||
dnl ---------------------------------------------------------------------
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
dnl ---------------------------------------------------------------------
|
||||
dnl Base CFLAGS
|
||||
dnl ---------------------------------------------------------------------
|
||||
AM_CFLAGS="-Wall -Wextra -Wparentheses -Winline -pedantic"
|
||||
|
||||
dnl ---------------------------------------------------------------------
|
||||
dnl Enable source code coverage reporting for GCC
|
||||
dnl ---------------------------------------------------------------------
|
||||
|
||||
AC_ARG_ENABLE(gcov,
|
||||
[ --enable-gcov Enable source code coverage testing using gcov],
|
||||
[CFLAGS="$CFLAGS -coverage"])
|
||||
[AM_CFLAGS="${AM_CFLAGS} -coverage"])
|
||||
dnl ---------------------------------------------------------------------
|
||||
dnl Disable window mode
|
||||
dnl ---------------------------------------------------------------------
|
||||
|
@ -82,7 +87,7 @@ PKG_CHECK_MODULES([libsn], [libstartup-notification-1.0])
|
|||
dnl ---------------------------------------------------------------------
|
||||
dnl Add extra compiler flags
|
||||
dnl ---------------------------------------------------------------------
|
||||
AC_SUBST([EXTRA_CFLAGS], ["-Wall -Wextra -Wparentheses -Winline -pedantic"])
|
||||
AC_SUBST([AM_CFLAGS])
|
||||
|
||||
AC_CONFIG_FILES([Makefile doc/rofi.doxy])
|
||||
AC_OUTPUT
|
||||
|
|
Loading…
Reference in a new issue