/config/Make-test.mk

https://code.google.com/ · Makefile · 29 lines · 27 code · 2 blank · 0 comment · 6 complexity · 2562ef4f4f15034ddcdd5f0c7ccc874e MD5 · raw file

  1. DEJATOOL = `pwd`/$(PROJECT)
  2. RUNTESTFLAGS =
  3. RUNTESTDEFAULTFLAGS = --all --tool $(PROJECT) --srcdir $$srcdir/testsuite
  4. EXPECT = /usr/bin/expect
  5. RUNTEST = /usr/bin/runtest
  6. srcdir = $(top_srcdir)
  7. check: site.exp
  8. @srcdir=`cd $(srcdir) && pwd`; export srcdir; \
  9. EXPECT=$(EXPECT); export EXPECT; \
  10. if [ -x $(RUNTEST) ]; then \
  11. $(RUNTEST) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); exit 0; \
  12. else \
  13. echo "Could not find $(RUNTEST). Is dejagnu installed?" 1>&2; :;\
  14. fi
  15. site.exp: Makefile
  16. @echo 'Making a new site.exp file...'
  17. @test ! -f site.bak || rm -f site.bak
  18. @echo '## these variables are automatically generated by make ##' > $@-t
  19. @echo '# Do not edit here. If you wish to override these values' >> $@-t
  20. @echo '# edit the last section' >> $@-t
  21. @echo 'set tool $(DEJATOOL)' >> $@-t
  22. @echo 'set srcdir $(srcdir)' >> $@-t
  23. @echo 'set objdir' `pwd` >> $@-t
  24. @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
  25. @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
  26. @test ! -f site.exp || mv site.exp site.bak
  27. @mv $@-t site.exp