Skip to content

Commit

Permalink
autotools: Simplify geanyvc and geanyprj test setup
Browse files Browse the repository at this point in the history
As both plugins actually rebuild source files differently for the
tests, put the test controller in the same directory.
  • Loading branch information
b4n committed Mar 5, 2015
1 parent bd20c63 commit 7c45d27
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 36 deletions.
1 change: 0 additions & 1 deletion build/geanyprj.m4
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ AC_DEFUN([GP_CHECK_GEANYPRJ],
AC_CONFIG_FILES([
geanyprj/Makefile
geanyprj/src/Makefile
geanyprj/tests/Makefile
])
])
1 change: 0 additions & 1 deletion build/geanyvc.m4
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ AC_DEFUN([GP_CHECK_GEANYVC],
AC_CONFIG_FILES([
geanyvc/Makefile
geanyvc/src/Makefile
geanyvc/tests/Makefile
])
])
2 changes: 1 addition & 1 deletion geanyprj/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include $(top_srcdir)/build/vars.auxfiles.mk

SUBDIRS = src tests
SUBDIRS = src
plugin = geanyprj
14 changes: 7 additions & 7 deletions geanyprj/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ geanyprj_la_SOURCES = geanyprj.c \
geanyprj_la_CFLAGS = $(AM_CFLAGS)
geanyprj_la_LIBADD = $(COMMONLIBS)

check_LTLIBRARIES = libgeanyprj-test.la

libgeanyprj_test_la_SOURCES = \
utils.c
libgeanyprj_test_la_CPPFLAGS = $(AM_CFLAGS) -DUNITTESTS
libgeanyprj_test_la_LDFLAGS = -avoid-version $(GP_LDFLAGS)
libgeanyprj_test_la_LIBADD = $(COMMONLIBS)
if UNITTESTS
TESTS = unittests
check_PROGRAMS = unittests
unittests_SOURCES = unittests.c utils.c
unittests_CFLAGS = $(GEANY_CFLAGS) -DUNITTESTS
unittests_LDADD = @GEANY_LIBS@ $(INTLLIBS) @CHECK_LIBS@
endif

AM_CPPCHECKFLAGS = --suppress='constStatement:*'
AM_CPPCHECKFLAGS += --suppress='memleak:utils.c:72'
Expand Down
File renamed without changes.
9 changes: 0 additions & 9 deletions geanyprj/tests/Makefile.am

This file was deleted.

2 changes: 1 addition & 1 deletion geanyvc/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include $(top_srcdir)/build/vars.auxfiles.mk

SUBDIRS = src tests
SUBDIRS = src
plugin = geanyvc
14 changes: 7 additions & 7 deletions geanyvc/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ geanyvc_la_LIBADD = \
$(GTKSPELL_LIBS) \
$(COMMONLIBS)

check_LTLIBRARIES = libgeanyvc-test.la

libgeanyvc_test_la_SOURCES = \
utils.c
libgeanyvc_test_la_CFLAGS = $(AM_CFLAGS) -DUNITTESTS
libgeanyvc_test_la_LDFLAGS = -avoid-version $(GP_LDFLAGS)
libgeanyvc_test_la_LIBADD = $(COMMONLIBS)
if UNITTESTS
TESTS = unittests
check_PROGRAMS = unittests
unittests_SOURCES = unittests.c utils.c
unittests_CFLAGS = $(GEANY_CFLAGS) -DUNITTESTS
unittests_LDADD = @GEANY_LIBS@ $(INTLLIBS) @CHECK_LIBS@
endif

include $(top_srcdir)/build/cppcheck.mk
File renamed without changes.
9 changes: 0 additions & 9 deletions geanyvc/tests/Makefile.am

This file was deleted.

0 comments on commit 7c45d27

Please sign in to comment.