1 # regress/Makefile[.in] - regression test Makefile
3 # This file is part of adns, which is
4 # Copyright (C) 1997-2000,2003,2006 Ian Jackson
5 # Copyright (C) 1999-2000,2003,2006 Tony Finch
6 # Copyright (C) 1991 Massachusetts Institute of Technology
7 # (See the file INSTALL for full details.)
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software Foundation,
21 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 PROGS_SYSDEP
= @PROGS_HAVE_TSEARCH@
28 CLIENTS
= adnstest adnshost adnslogres
$(PROGS_SYSDEP
)
29 AUTOCHDRS
= harness.h hsyscalls.h hredirect.h
30 AUTOCSRCS
= hrecord.c hplayback.c hcommon.c
31 include ..
/settings.make
32 include $(srcdir)/..
/src
/adns.make
34 DIRCFLAGS
= -I..
/src
-I
$(srcdir) -I
$(srcdir)/..
/src
36 HCPPFLAGS
= -DADNS_REGRESS_TEST
-I.
38 REDIRLIBOBJS
= $(addsuffix _d.o
, $(basename $(LIBOBJS
)))
39 HARNLOBJS
= hcommon.o
$(REDIRLIBOBJS
)
40 TARGETS
= $(addsuffix _record
, $(CLIENTS
)) $(addsuffix _playback
, $(CLIENTS
))
41 ADH_OBJS
= adh-main_c.o adh-opts_c.o adh-query_c.o
42 ALL_OBJS
= $(HARNLOBJS
) dtest.o hrecord.o hplayback.o
44 .PRECIOUS
: $(AUTOCSRCS
) $(AUTOCHDRS
)
46 all install uninstall: $(TARGETS
)
49 srcdir=$(srcdir) $(srcdir)/checkall
51 LINK_CMD
= $(CC
) $(LDFLAGS
) $^
$(LDLIBS
) -o
$@
53 %_record
: %_c.o hrecord.o
$(HARNLOBJS
)
56 %_playback
: %_c.o hplayback.o
$(HARNLOBJS
)
59 .SECONDARY
: $(addsuffix _c.o
, $(CLIENTS
))
60 # Without this, make will remove <client>_c.o after building <client>.
61 # This wastes effort. (Debian bug #4073.)
63 # Also, it exposes us to a bug (in make 3.81, at least) which can
64 # cause make to run the rule for building <client> without building
65 # <client>_c.o! (Debian #756123.)
67 # See also Savannah #29620, http://savannah.gnu.org/bugs/index.php?29620
69 adnshost_
%: $(ADH_OBJS
) h
%.o
$(HARNLOBJS
)
72 %_d.o
: $(srcdir)/..
/src
/%.c hredirect.h
73 $(CC
) $(CFLAGS
) $(HCPPFLAGS
) -c
-g
-o
$@
$<
75 %_c.o
: $(srcdir)/..
/client
/%.c hredirect.h
76 $(CC
) $(CFLAGS
) $(HCPPFLAGS
) -I
$(srcdir)/..
/src
-c
-g
-o
$@
$<
78 $(ALL_OBJS
): $(srcdir)/..
/src
/adns.h
$(srcdir)/..
/src
/internal.h
79 $(ALL_OBJS
): harness.h hsyscalls.h
80 $(ADH_OBJS
): $(srcdir)/..
/client
/adnshost.h
82 %:: %.m4 hmacros.i4 hsyscalls.i4
83 $(M4
) -P
-I
$(srcdir) $< >$@
-a.new
84 sed
-e
's/hm_comma/,/g; s/hm_squote/'\''/g; /^[ ]*$$/d' <$@
-a.new
>$@
-b.new
85 @mv
-f
$@
-b.new
$(srcdir)/$@
; rm -f
$@
-a.new