medit/tests/Makefile.incl

219 lines
4.9 KiB
Makefile

EXTRA_PROGRAMS += \
testhtml testtext medit mterm \
markup termbuffer testfileview \
testpaned testpanedfileview \
miniglade langparser testobject \
testfold ms
bin_PROGRAMS =
all-tests: $(EXTRA_PROGRAMS)
EXTRA_DIST += \
tests/pyapp.py.in \
tests/medit-ui.xml \
tests/medit-app.opag\
tests/medit.win
BUILT_SOURCES += medit-ui.h
medit-ui.h: tests/medit-ui.xml
sh $(srcdir)/moo/mooutils/xml2h.sh MEDIT_UI $(srcdir)/tests/medit-ui.xml > medit-ui.h
tests/medit-app.c: tests/medit-app.opag medit-ui.h
if test -z $(OPAG); then \
touch $(srcdir)/tests/medit-app.c; \
else \
$(OPAG) -f _medit_parse_options -O _medit_opt_ -A _medit_arg_ $(srcdir)/tests/medit-app.opag $(srcdir)/tests/medit-app.c; \
fi
if MOO_OS_MINGW
medit.win: tests/medit.win
cp $(srcdir)/tests/medit.win medit
chmod +x medit
endif
all-am: tests/pyapp.py
if MOO_BUILD_APP
medit = medit
endif
if MOO_BUILD_EDIT
medit = medit
# noinst_PROGRAMS += testtext
endif
if MOO_BUILD_TERM
if !MOO_OS_CYGWIN
if !MOO_BUILD_APP
noinst_PROGRAMS += mterm #termbuffer
endif
endif
endif
if MOO_BUILD_UTILS
if !MOO_BUILD_EDIT
if !MOO_BUILD_TERM
if !MOO_OS_CYGWIN
noinst_PROGRAMS += testfileview
endif
endif
endif
endif
if !MOO_BUILD_LIB
bin_PROGRAMS += $(medit)
else
noinst_PROGRAMS += $(medit)
endif
ldflags = -export-dynamic
ldadd = \
$(MOO_LIBS) \
$(PYTHON_LDFLAGS) \
$(PYTHON_EXTRA_LIBS)
if MOO_BUILD_LIB
ldadd += libmoo.la
endif
if MOO_OS_MINGW
ldflags += -mwindows
endif MOO_OS_MINGW
##############################################################################
## medit
##
medit_LDFLAGS = $(ldflags)
medit_LDADD = $(ldadd)
medit_SOURCES = medit-ui.h
nodist_medit_SOURCES =
EXTRA_DIST += tests/medit.rc.in
if !MOO_BUILD_LIB
medit_SOURCES += $(libmoo_sources)
nodist_medit_SOURCES += $(nodist_libmoo_sources)
endif
if MOO_BUILD_APP
medit_SOURCES += tests/medit-app.c
else
medit_SOURCES += tests/medit.c
endif
nodist_medit_SOURCES += tests/medit.res
CLEANFILES += tests/medit.res
if MOO_OS_MINGW
tests/medit.res: tests/medit.rc
$(WINDRES) -i tests/medit.rc --input-format=rc -o tests/medit.res -O coff
medit_SOURCES += tests/medit.res
medit_LDADD += tests/medit.res
else ! MOO_OS_MINGW
tests/medit.res: tests/medit.rc
touch tests/medit.res
endif ! MOO_OS_MINGW
testfold_LDFLAGS = $(ldflags)
testfold_LDADD = $(ldadd)
testfold_SOURCES = tests/testfold.c
if !MOO_BUILD_LIB
nodist_testfold_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
endif
testtext_LDFLAGS = $(ldflags)
testtext_LDADD = $(ldadd)
testtext_SOURCES = tests/testtext.c
if !MOO_BUILD_LIB
nodist_testtext_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
endif
langparser_LDFLAGS = $(ldflags)
langparser_LDADD = $(ldadd)
langparser_SOURCES = tests/testparser.c
if !MOO_BUILD_LIB
nodist_langparser_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
endif
ms_LDFLAGS = $(ldflags)
ms_LDADD = $(ldadd) -lreadline
ms_SOURCES = tests/mscript.c
if !MOO_BUILD_LIB
nodist_ms_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
endif
testhtml_LDFLAGS = $(ldflags)
testhtml_LDADD = $(ldadd)
testhtml_SOURCES = tests/testhtml.c
if !MOO_BUILD_LIB
nodist_testhtml_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
endif
mterm_LDFLAGS = $(ldflags)
mterm_LDADD = $(ldadd)
mterm_SOURCES = tests/mterm.c
if !MOO_BUILD_LIB
nodist_mterm_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
endif
termbuffer_LDFLAGS = $(ldflags)
termbuffer_LDADD = $(ldadd)
termbuffer_SOURCES = tests/termbuffer.c
if !MOO_BUILD_LIB
nodist_termbuffer_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
endif
##############################################################################
## markup
##
markup_LDFLAGS = $(ldflags)
markup_LDADD = $(ldadd)
markup_SOURCES = tests/markup.c
if !MOO_BUILD_LIB
nodist_markup_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
endif
##############################################################################
## miniglade
##
miniglade_LDFLAGS = $(ldflags)
miniglade_LDADD = $(ldadd)
miniglade_SOURCES = tests/miniglade.c
if !MOO_BUILD_LIB
nodist_miniglade_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
endif
##############################################################################
testpaned_LDFLAGS = $(ldflags)
testpaned_LDADD = $(ldadd)
testpaned_SOURCES = tests/testpaned.c
testfileview_LDFLAGS = $(ldflags)
testfileview_LDADD = $(ldadd)
testfileview_SOURCES = tests/testfileview.c
testpanedfileview_LDFLAGS = $(ldflags)
testpanedfileview_LDADD = $(ldadd)
testpanedfileview_SOURCES = tests/testpanedfileview.c
testobject_LDFLAGS = $(ldflags)
testobject_LDADD = $(ldadd)
testobject_SOURCES = tests/testobject.c
if !MOO_BUILD_LIB
nodist_testpaned_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
nodist_testfileview_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
nodist_testpanedfileview_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
nodist_testobject_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
endif