nt-kit revision 70e5a7403f0e0a3bd292b8287c5fed5772c15270
87N/A# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") 87N/A# Copyright (C) 1999-2001 Internet Software Consortium. 87N/A# Permission to use, copy, modify, and/or distribute this software for any 87N/A# purpose with or without fee is hereby granted, provided that the above 87N/A# copyright notice and this permission notice appear in all copies. 87N/A# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 87N/A# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 87N/A# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 87N/A# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 87N/A# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 87N/A# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 87N/A# PERFORMANCE OF THIS SOFTWARE. 87N/A# $Id: nt-kit,v 1.9 2007/06/19 23:47:24 tbox Exp $ 87N/A# XXX no command line options at all. especially useful would be a way 87N/A# to specify the target directory on the NT machine, since it is needed 87N/A# XXX long term something different clearly needs to be done, so someone 87N/A# without any Unix boxes at all could download the source kit and compile. 87N/A# it'll happen; it has been a higher priority just to try to work 87N/A# on the code issues. 87N/A echo "usage: $0 rmtdir [dstdir]" >&
2 87N/A echo "$0: must be run in bind9 top level directory" >&2 87N/A# Try to make an effort to not wipe out current directory or non-bind directory 87N/A echo "$0: dstdir must not be current directory" >&2 87N/A echo "$0: existing dstdir must be a bind9 source directory" >&2 87N/A# Start with a clean slate. This is not done in the source tree before 87N/A# the copy so as not to disturb things there. 87N/A# XXX header files that (currently) need to be built on Unix 87N/A# XXX Need a better way 87N/A# Adjust Makefiles to have NT paths and nmake-compatible variable expansion. 87N/A s%(-I.*)unix%$1win32%; 87N/A s%(-I.*)pthreads.*?(\\?)$%$2%; 87N/A s%(\$\(ARFLAGS\)) \$@%$1 /out:\$@%; 87N/A s%\$\(UNIXOBJS\)%\$(WIN32OBJS)%; 87N/A s%\$\(PTHREADOBJS\)%%; 87N/A s%^(SUBDIRS.*)(pthreads)(.*)%$1$3%; 87N/A s%^(SUBDIRS.*)(unix)(.*)%$1win32$3%; 87N/A s%rm -f%-del /q /f%; 87N/A s%rm -rf%-rd /q /s%; 87N/A # /K is specified in MAKEDEFS *YUCK* because nmake 87N/A # for some BRAINDAMAGED REASON does not put K 87N/A # in MAKEFLAGS (confirm with "nmake /PKN foo"; 87N/A # only P and N are in Makeflags.) However ... doing 87N/A # things this way ends up putting /K when you might not 87N/A # want it. Thanks, Microsoft. 87N/A 'print "MAKEDEFS = /nologo /K\$(MAKEFLAGS)\n" 87N/A s%rm -f%-del /q /f%; 87N/A s%rm -rf%-rd /q /s%; 87N/A /for %i in (\$(ALL_SUBDIRS)) do \\/x; 87N/A /\@if NOT $1=="nulldir" \\/x; 87N/A s/^.*echo "making .* in .*\n//; 87N/A s/\(cd\ (\S+);\ (.*)\);\ \\ 87N/A /pushd $1 && cd && $2 && popd || popd/x; 87N/A# Copy win32 special files 87N/A # 9 = highest compression