]> git.sur5r.net Git - openldap/blobdiff - include/setup.mak
Should be in releng
[openldap] / include / setup.mak
index ad8ddaa022226c787ddf1fccfffdc1a11f43bdbe..532acae501d9673482e0a224f0c2abe05935805e 100644 (file)
@@ -1,21 +1,55 @@
+# $OpenLDAP$
 #
-# Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+# Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
 # COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 #
 
+!include ../build/version.var
+
+!if "$(ol_patch)" != "X"
+ol_version=$(ol_major).$(ol_minor).$(ol_patch)
+ol_type=Release
+!elseif "$(ol_minor)" != "X"
+ol_version=$(ol_major).$(ol_minor).$(ol_patch)
+ol_type=Engineering
+!else
+ol_version=$(ol_major).$(ol_minor)
+ol_type=Devel
+!endif
+ol_string="$(ol_package) $(ol_version)-$(ol_type)"
+
+.SUFFIXES: .nt
+
+.nt.h:
+       copy $*.nt $*.h
+
 all: setup.txt
 
-setup.txt: lber_types.h ldap_config.h ldap_features.h portable.h
-        copy setup.mak setup.txt
+setup.txt: lber_types.h ldap_config.h ldap_features.h portable.h setup.mak
+       copy setup.mak setup.txt
+
+lber_types.h: lber_types.nt
+ldap_config.h: ldap_config.nt
+ldap_features.h: ldap_features.nt
 
-lber_types.h: lber_types.h.nt
-       copy lber_types.h.nt lber_types.h
+# note - the edlin script has non-printable characters:
+# you must use a Ctrl-C to terminate the (i)nput command
+portable.h: portable.nt
+       echo Setting up $(ol_string)...
+       copy portable.nt portable.h
+       edlin portable.h < <<
+1,#sOPENLDAP_PACKAGE
+d
+i
+#define OPENLDAP_PACKAGE "$(ol_package)"
+\ 3
 
-ldap_config.h: ldap_config.h.nt
-       copy ldap_config.h.nt ldap_config.h
+1,#sOPENLDAP_VERSION
+d
+i
+#define OPENLDAP_VERSION "$(ol_version)"
+\ 3
 
-ldap_features.h: ldap_features.h.nt
-       copy ldap_features.h.nt ldap_features.h
+e
+<<NOKEEP
 
-portable.h: portable.h.nt
-       copy portable.h.nt portable.h