mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-10 22:39:58 -04:00
Make multiple build directories work again
This commit is contained in:
parent
dd3d17d365
commit
6d5dcd0dc9
7 changed files with 44 additions and 22 deletions
|
|
@ -7,6 +7,7 @@ CINCLUDES = -I${srcdir}/../../lib/isc/unix/include \
|
|||
-I${srcdir}/../../lib/isc/pthreads/include \
|
||||
-I${srcdir}/../../lib/isc/include \
|
||||
-I${srcdir}/../../lib/dns/include \
|
||||
-I../../lib/dns/include \
|
||||
-I${srcdir}/../.. \
|
||||
-I${srcdir}
|
||||
|
||||
|
|
@ -19,7 +20,6 @@ DEPLIBS = ../../lib/dns/libdns.a \
|
|||
|
||||
LIBS = ${DEPLIBS} \
|
||||
@LIBS@
|
||||
# -ly -ll
|
||||
|
||||
TARGETS = named
|
||||
|
||||
|
|
@ -28,8 +28,9 @@ OBJS = server.o udpclient.o tcpclient.o wire_debug.o wire_test.o
|
|||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
wire_test.o: ../tests/wire_test.c
|
||||
${CC} -c -o wire_test.o -DNOMAIN ${CINCLUDES} ${CFLAGS} ../tests/wire_test.c
|
||||
wire_test.o: ${srcdir}/../tests/wire_test.c
|
||||
${CC} -c -o wire_test.o -DNOMAIN ${ALL_CFLAGS} \
|
||||
${srcdir}/../tests/wire_test.c
|
||||
|
||||
named: ${OBJS} ${DEPLIBS}
|
||||
${CC} -o $@ ${OBJS} ${LIBS}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ top_srcdir = @top_srcdir@
|
|||
CINCLUDES = -I${srcdir}/../../lib/isc/unix/include \
|
||||
-I${srcdir}/../../lib/isc/pthreads/include \
|
||||
-I${srcdir}/../../lib/isc/include \
|
||||
-I${srcdir}/../../lib/dns/include
|
||||
-I${srcdir}/../../lib/dns/include \
|
||||
-I../../lib/dns/include
|
||||
|
||||
CDEFINES =
|
||||
CWARNINGS =
|
||||
|
||||
|
|
|
|||
8
configure
vendored
8
configure
vendored
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
|
||||
# From configure.in Revision: 1.16
|
||||
# From configure.in Revision: 1.18
|
||||
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated automatically using autoconf version 2.12
|
||||
|
|
@ -1717,7 +1717,10 @@ EOF
|
|||
esac
|
||||
|
||||
|
||||
BIND9_MAKE_RULES=$srcdir/make/rules
|
||||
BIND9_TOP_BUILDDIR=`pwd`
|
||||
|
||||
|
||||
BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
|
||||
|
||||
|
||||
BIND9_VERSION=$srcdir/version
|
||||
|
|
@ -1887,6 +1890,7 @@ s%@INSTALL_DATA@%$INSTALL_DATA%g
|
|||
s%@STD_CINCLUDES@%$STD_CINCLUDES%g
|
||||
s%@STD_CDEFINES@%$STD_CDEFINES%g
|
||||
s%@STD_CWARNINGS@%$STD_CWARNINGS%g
|
||||
s%@BIND9_TOP_BUILDDIR@%$BIND9_TOP_BUILDDIR%g
|
||||
/@BIND9_MAKE_RULES@/r $BIND9_MAKE_RULES
|
||||
s%@BIND9_MAKE_RULES@%%g
|
||||
/@BIND9_VERSION@/r $BIND9_VERSION
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
AC_REVISION($Revision: 1.17 $)
|
||||
AC_REVISION($Revision: 1.18 $)
|
||||
|
||||
AC_INIT(lib/dns/name.c)
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
|
@ -124,8 +124,11 @@ case "$host" in
|
|||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(BIND9_TOP_BUILDDIR)
|
||||
BIND9_TOP_BUILDDIR=`pwd`
|
||||
|
||||
AC_SUBST_FILE(BIND9_MAKE_RULES)
|
||||
BIND9_MAKE_RULES=$srcdir/make/rules
|
||||
BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
|
||||
|
||||
AC_SUBST_FILE(BIND9_VERSION)
|
||||
BIND9_VERSION=$srcdir/version
|
||||
|
|
|
|||
|
|
@ -8,7 +8,11 @@ top_srcdir = @top_srcdir@
|
|||
CINCLUDES = -I${srcdir}/../isc/unix/include \
|
||||
-I${srcdir}/../isc/pthreads/include \
|
||||
-I${srcdir}/../isc/include \
|
||||
-I${srcdir}/include
|
||||
-I${srcdir}/include \
|
||||
-I${srcdir} \
|
||||
-I./include \
|
||||
-I.
|
||||
|
||||
CDEFINES =
|
||||
CWARNINGS =
|
||||
|
||||
|
|
@ -45,13 +49,13 @@ clean distclean::
|
|||
rdata.o: code.h
|
||||
|
||||
include/dns/enumtype.h: gen
|
||||
./gen -t > $@
|
||||
./gen -s ${srcdir} -t > $@
|
||||
|
||||
include/dns/enumclass.h: gen
|
||||
./gen -c > $@
|
||||
./gen -s ${srcdir} -c > $@
|
||||
|
||||
code.h: gen
|
||||
./gen > code.h
|
||||
./gen -s ${srcdir} > code.h
|
||||
|
||||
gen: gen.c
|
||||
${CC} ${ALL_CFLAGS} -o $@ $?
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: gen.c,v 1.13 1999/02/04 06:38:41 marka Exp $ */
|
||||
/* $Id: gen.c,v 1.14 1999/02/18 01:24:31 halley Exp $ */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ struct tt {
|
|||
int type;
|
||||
char classname[11];
|
||||
char typename[11];
|
||||
char dirname[sizeof "rdata/0123456789_65535" ];
|
||||
char dirname[256]; /* XXX Should be max path length */
|
||||
} *types;
|
||||
|
||||
char * upper(char *);
|
||||
|
|
@ -221,7 +221,6 @@ add(int class, char *classname, int type, char *typename, char *dirname) {
|
|||
struct cc *newcc;
|
||||
struct cc *cc, *oldcc;
|
||||
|
||||
|
||||
if (newtt == NULL)
|
||||
exit(1);
|
||||
|
||||
|
|
@ -313,7 +312,8 @@ sd(int class, char *classname, char *dir) {
|
|||
int
|
||||
main(int argc, char **argv) {
|
||||
DIR *d;
|
||||
char buf[sizeof "rdata/0123456789_65535" ];
|
||||
char buf[256]; /* XXX Should be max path length */
|
||||
char srcdir[256]; /* XXX Should be max path length */
|
||||
int class;
|
||||
char classname[11];
|
||||
struct dirent *dp;
|
||||
|
|
@ -329,7 +329,8 @@ main(int argc, char **argv) {
|
|||
int c;
|
||||
char buf1[11];
|
||||
|
||||
while ((c = getopt(argc, argv, "ct")) != -1)
|
||||
strcpy(srcdir, "");
|
||||
while ((c = getopt(argc, argv, "cts:")) != -1)
|
||||
switch (c) {
|
||||
case 'c':
|
||||
code = 0;
|
||||
|
|
@ -341,11 +342,15 @@ main(int argc, char **argv) {
|
|||
class_enum = 0;
|
||||
type_enum = 1;
|
||||
break;
|
||||
case 's':
|
||||
sprintf(srcdir, "%s/", optarg);
|
||||
break;
|
||||
case '?':
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((d = opendir("rdata")) == NULL)
|
||||
sprintf(buf, "%srdata", srcdir);
|
||||
if ((d = opendir(buf)) == NULL)
|
||||
exit(1);
|
||||
|
||||
while ((dp = readdir(d)) != NULL) {
|
||||
|
|
@ -355,12 +360,13 @@ main(int argc, char **argv) {
|
|||
if ((class > 65535) || (class < 0))
|
||||
continue;
|
||||
|
||||
sprintf(buf, "rdata/%s_%d", classname, class);
|
||||
if (strcmp(buf + 6, dp->d_name) != 0)
|
||||
sprintf(buf, "%srdata/%s_%d", srcdir, classname, class);
|
||||
if (strcmp(buf + 6 + strlen(srcdir), dp->d_name) != 0)
|
||||
continue;
|
||||
sd(class, classname, buf);
|
||||
}
|
||||
sd(0, "", "rdata/generic");
|
||||
sprintf(buf, "%srdata/generic", srcdir);
|
||||
sd(0, "", buf);
|
||||
closedir(d);
|
||||
|
||||
if (time(&now) != -1) {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ libdir = @libdir@
|
|||
|
||||
@SET_MAKE@
|
||||
|
||||
top_builddir = @BIND9_TOP_BUILDDIR@
|
||||
|
||||
###
|
||||
### All
|
||||
###
|
||||
|
|
@ -69,7 +71,7 @@ STD_CWARNINGS = @STD_CWARNINGS@
|
|||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
ALWAYS_INCLUDES = -I${top_srcdir}
|
||||
ALWAYS_INCLUDES = -I${top_builddir}
|
||||
ALWAYS_DEFINES = -D_REENTRANT
|
||||
ALWAYS_WARNINGS =
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue