From: Howard Chu Date: Fri, 28 Mar 2003 20:37:51 +0000 (+0000) Subject: Add rules to patch current package name & version number into portable.h X-Git-Tag: NO_SLAP_OP_BLOCKS~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5a1eb936bc8286ef74110d3601601ba874fe03d5;p=openldap Add rules to patch current package name & version number into portable.h --- diff --git a/include/setup.mak b/include/setup.mak index 0a2c1ccf66..cbedb7b0df 100644 --- a/include/setup.mak +++ b/include/setup.mak @@ -4,6 +4,20 @@ # 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: @@ -17,7 +31,27 @@ setup.txt: lber_types.h ldap_config.h ldap_features.h portable.h setup.mak lber_types.h: lber_types.nt ldap_config.h: ldap_config.nt ldap_features.h: ldap_features.nt + +# 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)" + + +1,#sOPENLDAP_VERSION +d +i +#define OPENLDAP_VERSION "$(ol_version)" + + +e +< $@