ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/ermyth/test/Makefile.in
Revision: 1.3
Committed: Sat Jul 21 15:17:53 2007 UTC (19 years, 3 months ago) by pippijn
Branch: MAIN
Changes since 1.2: +5 -1 lines
Log Message:
hopefully fixed non-absolute-path builds

File Contents

# User Rev Content
1 pippijn 1.1 PERL = @PERL@
2     CXX = @CXX@
3     RM = @RM@
4     CP = @CP@
5     INSTALL = @INSTALL@
6     MKDEP = @MKDEP@
7     CXXFLAGS = @CXXFLAGS@ -I../include -DBINDIR=\"$(bindir)\"
8    
9     # Want absolute paths?
10     SRCDIR = .
11     @ABSPATHS@SRCDIR= @SRCDIR@/test
12    
13     TESTCOUNT = 200
14    
15     default: build
16    
17     SRCS = \
18     ${SRCDIR}/metadata.C \
19     # ${SRCDIR}/server.C \
20    
21     .SUFFIXES: .t
22    
23     OBJS = ${SRCS:.C=.t}
24    
25     build: ${SRCDIR}/unit/runtest.h ${OBJS}
26    
27     .C.t:
28     @echo " LD $@"
29     @${CXX} -L${SRCDIR}/../src -l@PACKAGE_NAME@ ${CPPFLAGS} ${CXXFLAGS} $< -o $@
30    
31     install:
32    
33     test: ${OBJS}
34     @LD_LIBRARY_PATH=${SRCDIR}/../src; \
35     for i in ${OBJS}; do \
36     echo "[$@] ==> $$i"; \
37     $$i; \
38     done
39    
40     $(SRCDIR)/unit/runtest.h: $(SRCDIR)/unit/runtest.h.in
41     @echo "Generating $@"
42 pippijn 1.3 @if [ "@ABSPATHS@" = "#" ]; then \
43     ${PERL} ${SRCDIR}/test/unit/gentests ${TESTCOUNT} $< > $@; \
44     else \
45     ${PERL} ${SRCDIR}/unit/gentests ${TESTCOUNT} $< > $@; \
46     fi
47 pippijn 1.1
48     .PHONY: depend clean distclean
49    
50     # This sed command sucks but I don't know a better way -- jilles
51     depend: ${SRCDIR}/unit/runtest.h
52     @${MKDEP} ${PICFLAGS} ${CPPFLAGS} ${CXXFLAGS} ${SRCS} | sed -e 's|\([^.]*\.o\):|$(SRCDIR)/\1:|' > .depend
53    
54     clean:
55     @${RM} -f *.o *.t *~ ${SRCDIR}/unit/runtest.h
56    
57     distclean: clean
58     @${RM} -f Makefile .depend
59    
60 pippijn 1.2 maintainer-clean: distclean
61    
62 pippijn 1.1 include .depend