# $Id: Makefile.am,v 1.44 2002/09/09 10:28:49 ceder Exp $ # Copyright (C) 1998-2002 Lysator Academic Computer Association. # # This file is part of the LysKOM server. # # LysKOM is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 1, or (at your option) # any later version. # # LysKOM is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License # along with LysKOM; see the file COPYING. If not, write to # Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN, # or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, # MA 02139, USA. # # Please mail bug reports to bug-lyskom@lysator.liu.se. # SUBDIRS = config lyskomd.0 RM = rm -f check_PROGRAMS = test-l2g bignum noinst_DATA = site.exp .gdbinit valgrind.wrap EXTRA_DIST = .cvsignore \ l2g.0/00.exp l2g.0/01.exp l2g.0/02.exp l2g.0/03.exp \ l2g.0/04.exp l2g.0/05.exp l2g.0/06.exp l2g.0/07.exp \ l2g.0/08.exp l2g.0/09.exp l2g.0/10.exp l2g.0/11.exp \ l2g.0/12.exp \ leaks.0/leaks00.exp \ leaks.0/leaks01.exp \ leaks.0/leaks02.exp \ leaks.0/leaks03.exp \ leaks.0/leaks04.exp \ leaks.0/leaks05.exp \ leaks.0/leaks06.exp \ leaks.0/leaks07.exp \ leaks.0/leaks08.exp \ leaks.0/leaks09.exp \ leaks.0/leaks10.exp \ leaks.0/lots-aux-items.conf \ leaks.0/no-aux-items.conf \ locksuite.py \ lyskomd.supp \ renumber.el \ tcpconnect.py \ leaks.0/leaks99.exp MOSTLYCLEANFILES = .gdbinit site.exp *.sum *.log usage-base.tmp usage.all \ lyskomd.*.usage lyskomd.*.base *.da *.bb *.gcov *.bbg \ valgrind-*.log valgrind.log valgrind.wrap mostlyclean-local: $(RM) -r -f db etc test_l2g_SOURCES = test-l2g.c test_l2g_LDADD = ../libcheck.a $(LDADD) bignum_SOURCES = bignum.c ../libcheck.a: (cd .. && $(MAKE) libcheck.a) ../lyskomd: (cd .. && $(MAKE) lyskomd) INCLUDES = -I$(srcdir)/.. \ -I$(srcdir)/../../include \ -I$(srcdir)/../../libraries/libmisc \ -I$(srcdir)/../../libraries/libisc-new/src \ -I$(srcdir)/../../libraries/regex \ -I$(srcdir)/../../libraries/libcommon LDADD = ../../libraries/libisc-new/src/libisc.a \ ../../libraries/libmisc/libmisc.a \ ../../libraries/libcommon/liblyskom-server.a \ ../../libraries/regex/libregex.a \ ../../libraries/libansi/libansi.a top_srcdir = @top_srcdir@ .gdbinit: Makefile $(RM) -f .gdbinit echo dir $(top_srcdir)/src/libraries/libcommon >.gdbinit echo dir $(top_srcdir)/src/libraries/libansi >>.gdbinit echo dir $(top_srcdir)/src/libraries/libisc-new >>.gdbinit echo dir $(top_srcdir)/src/libraries/libmisc >>.gdbinit check: check-l2g check-lyskomd check-leaks check-l2g: test-l2g site.exp valgrind.wrap runtest --tool l2g --srcdir $(srcdir) check-lyskomd: site.exp ../lyskomd valgrind.wrap bignum runtest --tool lyskomd --srcdir $(srcdir) \ 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- # We need to build all test cases in lyskomd.0 before running check-lyskomd. # I have found no better way to express that check-lyskomd depends on # "make check" in lyskomd.0. check-lyskomd: check-recursive check-leaks: site.exp ../lyskomd valgrind.wrap runtest --tool leaks --srcdir $(srcdir) \ 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- site.exp: Makefile echo "# this file is automatically generated" > site.exp echo "set l2g ./test-l2g" >> site.exp echo "set top_srcdir $(top_srcdir)" >> site.exp if [ "$(VALGRIND)" ] ; \ then \ echo "set valgrind \"$(VALGRIND)\"" >> site.exp ; \ else \ echo "set valgrind \"\"" >> site.exp ; \ fi valgrind.wrap: Makefile $(RM) $@ $@.tmp echo "#!/bin/sh" > $@.tmp echo "# This file is generated by Makefile. Do not edit." >> $@.tmp ## If you change the "25", you also have to change config/unix.exp. echo 'exec 25>$$1' >> $@.tmp echo 'shift' >> $@.tmp echo 'echo $(VALGRIND) "$$@" >&25' >> $@.tmp echo 'exec $(VALGRIND) "$$@"' >> $@.tmp chmod 555 $@.tmp mv $@.tmp $@