### -*-makefile-*- ### ### Build script for SOD examples and tests ### ### (c) 2015 Straylight/Edgeware ### ###----- Licensing notice --------------------------------------------------- ### ### This file is part of the Sensible Object Design, an object system for C. ### ### SOD 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 2 of the License, or ### (at your option) any later version. ### ### SOD 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 SOD; if not, write to the Free Software Foundation, ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. include $(top_srcdir)/vars.am ###-------------------------------------------------------------------------- ### The silly Chimaera example. check_PROGRAMS += chimaera EXTRA_DIST += chimaera.sod chimaera.ref nodist_chimaera_SOURCES = chimaera.c chimaera.h BUILT_SOURCES += $(nodist_chimaera_SOURCES) check-local:: chimaera chimaera.ref ./chimaera >chimaera.out diff -u $(srcdir)/chimaera.ref chimaera.out -include chimaera.c-dep chimaera.h-dep CLEANFILES += chimaera.out ###-------------------------------------------------------------------------- ### Other tests. TESTS += test check_PROGRAMS += test EXTRA_DIST += test.sod nodist_test_SOURCES = test.c test.h BUILT_SOURCES += $(nodist_test_SOURCES) -include test.c-dep test.h-dep EXTRA_DIST += bad.sod bad.ref bad.out: bad.sod $(SOD) $(SOD) -tc $(srcdir)/bad.sod >bad.raw-out 2>bad.raw-err; rc=$$?; \ { sed 's/^/| /' bad.raw-out; \ sed 's/^/* /; s,$(srcdir)/,test/,' bad.raw-err; \ echo "; rc = $$rc"; } >$@.new && \ mv $@.new $@ check-local:: bad.out diff -u $(srcdir)/bad.ref bad.out CLEANFILES += bad.raw-out bad.raw-err bad.out check_PROGRAMS += kwtest EXTRA_DIST += kwtest.ref kwtest.out: kwtest$(EXEEXT) ./kwtest >kwtest.out check-local:: kwtest.out kwtest.ref diff -u $(srcdir)/kwtest.ref kwtest.out CLEANFILES += kwtest.out check_PROGRAMS += rat EXTRA_DIST += rat.sod rat.ref nodist_rat_SOURCES = rat.c rat.h BUILT_SOURCES += $(nodist_rat_SOURCES) rat.out: rat$(EXEEXT) ./rat >rat.out check-local:: rat.out rat.ref diff -u $(srcdir)/rat.ref rat.out -include rat.c-dep rat.h-dep CLEANFILES += rat.out check_PROGRAMS += kwbench kwbench_SOURCES = kwbench.c kwbench-back.c kwbench.h ###----- That's all, folks --------------------------------------------------