"Fossies" - the Fresh Open Source Software Archive

Member "statist-1.4.2/tests/Makefile" (22 Nov 2006, 1945 Bytes) of package /linux/privat/old/statist-1.4.2.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # Language default (options override)
    2 LANG=C
    3 LC_ALL=C
    4 
    5 TESTS = test_4_1.sh
    6 
    7 # Comment the following line if you don't have "awk", "join", or "sed"
    8 # We are testing not only xcols, but the instructions in the user manual.
    9 TESTS += test_xcols.sh
   10 
   11 HASCHECK = $(shell if [ -f /usr/include/check.h ]; then echo -n "yes"; else if [ -f /usr/local/include/check.h ]; then echo -n "yes"; fi; fi)
   12 
   13 ifeq ("$(HASCHECK)", "yes")
   14 TESTS += check_memory_handling
   15 CHECKMSG =''
   16 else
   17 CHECKMSG ="NOTE: You can run an additional test if you install the check library."
   18 endif
   19 
   20 TESTS_ENVIRONMENT=LANG=$(LANG)
   21 
   22 CHECK_PREFIX=../../check
   23 
   24 .POSIX:
   25 
   26 check:: check-TESTS check-Message
   27 
   28 
   29 # section inspired by a Makefile from check 
   30 # which was generated by autoconf, automake
   31 check-TESTS: $(TESTS)
   32 	@failed=0; all=0; \
   33         for tst in $(TESTS); do \
   34           if $(TESTS_ENVIRONMENT) ./$$tst; then \
   35             all=`expr $$all + 1`; \
   36             echo "PASS: $$tst"; \
   37           elif test $$? -ne 77; then \
   38             all=`expr $$all + 1`; \
   39             failed=`expr $$failed + 1`; \
   40             echo "FAIL: $$tst"; \
   41           fi; \
   42         done; \
   43         if test "$$failed" -eq 0; then \
   44           banner="All $$all tests passed"; \
   45         else \
   46           banner="$$failed of $$all tests failed"; \
   47         fi; \
   48         dashes=`echo "$$banner" | sed s/./=/g`; \
   49         echo "$$dashes"; \
   50         echo "$$banner"; \
   51         echo "$$dashes"; \
   52         test "$$failed" -eq 0
   53 
   54 check-Message:
   55 	@echo $(CHECKMSG)
   56 
   57 CPPFLAGS= -I../src/ -I$(CHECK_PREFIX)/include
   58 CFLAGS=-Wall -pedantic
   59 LDFLAGS=-L$(CHECK_PREFIX)/lib 
   60 
   61 COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) 
   62 LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
   63 
   64 .c.o:
   65 	- $(COMPILE) -c $<
   66 
   67 
   68 
   69 
   70 check_memory_handling: statist_check_dummies.o check_memory_handling.o ../src/memory_handling.o 
   71 	@rm -f check_memory_handling
   72 	- $(LINK) $+ -lcheck
   73 
   74 CLEANFILES=*.o check_memory_handling
   75 
   76 clean:
   77 	-test -z "$(CLEANFILES)" || rm $(CLEANFILES)
   78