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