summaryrefslogtreecommitdiffstats
path: root/ntversion.pl
diff options
context:
space:
mode:
authorcvsadm <cvsadm>2005-01-21 00:44:34 +0000
committercvsadm <cvsadm>2005-01-21 00:44:34 +0000
commitb2093e3016027d6b5cf06b3f91f30769bfc099e2 (patch)
treecf58939393a9032182c4fbc4441164a9456e82f8 /ntversion.pl
downloadds-b2093e3016027d6b5cf06b3f91f30769bfc099e2.tar.gz
ds-b2093e3016027d6b5cf06b3f91f30769bfc099e2.tar.xz
ds-b2093e3016027d6b5cf06b3f91f30769bfc099e2.zip
Moving NSCP Directory Server from DirectoryBranch to TRUNK, initial drop. (foxworth)ldapserver7x
Diffstat (limited to 'ntversion.pl')
-rw-r--r--ntversion.pl34
1 files changed, 34 insertions, 0 deletions
diff --git a/ntversion.pl b/ntversion.pl
new file mode 100644
index 00000000..ced691e2
--- /dev/null
+++ b/ntversion.pl
@@ -0,0 +1,34 @@
+#
+# BEGIN COPYRIGHT BLOCK
+# Copyright 2001 Sun Microsystems, Inc.
+# Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+#
+@date = localtime();
+$FILEVERSION = &doubleDigit( $date[5] ) . ',' . # year
+ &doubleDigit( $date[4] + 1 ) . ',' . # month
+ &doubleDigit( $date[3] ) . ',' . # date
+ &doubleDigit( $date[2] );
+$FILEVERSIONTEXT = '"' . &doubleDigit( $date[4] ) . '/' . # month
+ &doubleDigit( $date[3] ) . '/' . # date
+ &doubleDigit( $date[5] ) . ' ' . # year
+ &doubleDigit( $date[2] ) . ':' . # hour
+ &doubleDigit( $date[1] ) . '"'; # minute
+$MAJORVERSION=$ARGV[1];
+$MINORVERSION=$ARGV[2];
+
+open(VERSIONFILE, ">$ARGV[0]/ldapserver/include/nt/ntversion.h");
+print VERSIONFILE "// This file is automatically generated.\r\n";
+print VERSIONFILE "// Please do not edit this file manually.\r\n";
+print VERSIONFILE "// It contains the version number of this build.\r\n";
+print VERSIONFILE "\r\n";
+print VERSIONFILE "#define VERSION $FILEVERSION\r\n";
+print VERSIONFILE "#define PRODUCT $MAJORVERSION,0,0,$MINORVERSION\r\n";
+print VERSIONFILE "#define VERSIONTEXT $FILEVERSIONTEXT\r\n";
+print VERSIONFILE "#define PRODUCTTEXT \"$MAJORVERSION.$MINORVERSION\"\r\n";
+close( VERSIONFILE );
+
+sub doubleDigit {
+ $_[0] > 9 ? $_[0] : '0' . $_[0];
+}