summaryrefslogtreecommitdiff
path: root/win32utils
diff options
context:
space:
mode:
authorInternet Software Consortium, Inc <@isc.org>2013-06-12 10:31:11 -0600
committerInternet Software Consortium, Inc <@isc.org>2013-06-12 10:31:11 -0600
commitdb1583066debb94bbcfcece40e8d9ecbdb96aae4 (patch)
tree3180cdf98dcf6ad532f798ee2e80e4d4d5a8f2a7 /win32utils
parente543ab31adedea509ac1d5c51215976fb85f1342 (diff)
downloadbind9-db1583066debb94bbcfcece40e8d9ecbdb96aae4.tar.gz
9.9.3b1
Diffstat (limited to 'win32utils')
-rw-r--r--win32utils/BuildSetup.bat4
-rw-r--r--win32utils/makesrcid.pl81
2 files changed, 84 insertions, 1 deletions
diff --git a/win32utils/BuildSetup.bat b/win32utils/BuildSetup.bat
index 5e371453..055b0261 100644
--- a/win32utils/BuildSetup.bat
+++ b/win32utils/BuildSetup.bat
@@ -31,8 +31,10 @@ perl updatelibxml2.pl
rem Generate the version information
perl makeversion.pl
-rem Generate header files for lib/dns
+rem Generate the SRCID information
+perl makesrcid.pl
+rem Generate header files for lib/dns
call dnsheadergen.bat
rem Make sure that the Build directories are there.
diff --git a/win32utils/makesrcid.pl b/win32utils/makesrcid.pl
new file mode 100644
index 00000000..f46fe472
--- /dev/null
+++ b/win32utils/makesrcid.pl
@@ -0,0 +1,81 @@
+#!/usr/bin/perl
+#
+# Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+# $Id$
+
+# This script converts the SRCID information in ../srcid into a srcid.h
+# file, defining SRCID, which can be included by config.h.
+
+open (SRCIDH, ">../srcid.h") or die "cannot open srcid.h: $!";
+
+my $srcid = "unset";
+
+if (open (SRCIDFILE, "../srcid")) {
+ LOOP: while (<SRCIDFILE>) {
+ chomp;
+ ($data) = split(/\#/);
+ if($data) {
+ ($name, $value) = split(/=/,$data);
+ ($name) = split(/\s+/, $name);
+ ($value) = split(/\s+/, $value);
+ next LOOP if ($name != "SRCID");
+ $srcid = $value;
+ }
+ }
+ close(SRCIDFILE);
+}
+
+# Now set up the output version file
+
+$ThisDate = scalar localtime();
+
+#Standard Header
+
+print SRCIDH '/*
+ * Copyright (C) 2012 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+';
+
+print SRCIDH "/*\n";
+print SRCIDH " * srcid.h";
+print SRCIDH " * Generated automatically by makesrcid.pl.\n";
+print SRCIDH " * Date generated: $ThisDate\n";
+print SRCIDH " */\n\n";
+
+print SRCIDH '
+#ifndef SRCID_H
+#define SRCID_H 1
+';
+
+print "BIND SRCID: $srcid\n";
+
+print SRCIDH "#define SRCID\t\"$srcid\"\n";
+print SRCIDH "#endif /* SRCID_H */\n";
+close SRCIDH;