From: Alexandra Ellwood Date: Thu, 6 Mar 2003 18:54:12 +0000 (+0000) Subject: Scripts to build KfM headers and error tables and a script to run the krb5 build... X-Git-Tag: krb5-1.3-alpha1~36 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=70e0ffb03f3799121c4cb47eeea7037d17ea458d;p=krb5.git Scripts to build KfM headers and error tables and a script to run the krb5 build system git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15241 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/mac/MacOSX/Scripts/Kerberos5Errors.jam b/src/mac/MacOSX/Scripts/Kerberos5Errors.jam new file mode 100644 index 000000000..9f7ce57dd --- /dev/null +++ b/src/mac/MacOSX/Scripts/Kerberos5Errors.jam @@ -0,0 +1,96 @@ +include "$(SRCROOT)/../../KerberosErrors/Scripts/compile_et.jam" ; + +Intermediates = "$(BUILT_PRODUCTS_DIR)/Kerberos5.intermediates" ; +IntermediateErrorTables = "$(Intermediates)/ErrorTables" ; + +compile_et "$(IntermediateErrorTables)/prof_err.h" + "$(IntermediateErrorTables)/prof_err.c" + "$(IntermediateErrorTables)/prof_err.strings" : + "$(SRCROOT)/../Sources/util/profile/prof_err.et" ; + +compile_et "$(IntermediateErrorTables)/krb_err.h" + "$(IntermediateErrorTables)/krb_err.c" + "$(IntermediateErrorTables)/krb_err.strings" : + "$(SRCROOT)/../Sources/lib/krb4/krb_err.et" ; + +compile_et "$(IntermediateErrorTables)/kadm_err.h" + "$(IntermediateErrorTables)/kadm_err.c" + "$(IntermediateErrorTables)/kadm_err.strings" : + "$(SRCROOT)/../Sources/lib/krb4/kadm_err.et" ; + +compile_et "$(IntermediateErrorTables)/krb524_err.h" + "$(IntermediateErrorTables)/krb524_err.c" + "$(IntermediateErrorTables)/krb524_err.strings" : + "$(SRCROOT)/../Sources/krb524/krb524_err.et" ; + +compile_et "$(IntermediateErrorTables)/asn1_err.h" + "$(IntermediateErrorTables)/asn1_err.c" + "$(IntermediateErrorTables)/asn1_err.strings" : + "$(SRCROOT)/../Sources/lib/krb5/error_tables/asn1_err.et" ; + +compile_et "$(IntermediateErrorTables)/kdb5_err.h" + "$(IntermediateErrorTables)/kdb5_err.c" + "$(IntermediateErrorTables)/kdb5_err.strings" : + "$(SRCROOT)/../Sources/lib/krb5/error_tables/kdb5_err.et" ; + +compile_et "$(IntermediateErrorTables)/krb5_err.h" + "$(IntermediateErrorTables)/krb5_err.c" + "$(IntermediateErrorTables)/krb5_err.strings" : + "$(SRCROOT)/../Sources/lib/krb5/error_tables/krb5_err.et" ; + +compile_et "$(IntermediateErrorTables)/kv5m_err.h" + "$(IntermediateErrorTables)/kv5m_err.c" + "$(IntermediateErrorTables)/kv5m_err.strings" : + "$(SRCROOT)/../Sources/lib/krb5/error_tables/kv5m_err.et" ; + +compile_et "$(IntermediateErrorTables)/gssapi_err_generic.h" + "$(IntermediateErrorTables)/gssapi_err_generic.c" + "$(IntermediateErrorTables)/gssapi_err_generic.strings" : + "$(SRCROOT)/../Sources/lib/gssapi/generic/gssapi_err_generic.et" ; + +compile_et "$(IntermediateErrorTables)/gssapi_err_krb5.h" + "$(IntermediateErrorTables)/gssapi_err_krb5.c" + "$(IntermediateErrorTables)/gssapi_err_krb5.strings" : + "$(SRCROOT)/../Sources/lib/gssapi/krb5/gssapi_err_krb5.et" ; + +DEPENDS all : "$(IntermediateErrorTables)/prof_err.h" + "$(IntermediateErrorTables)/prof_err.c" + "$(IntermediateErrorTables)/prof_err.strings" + + "$(IntermediateErrorTables)/krb_err.h" + "$(IntermediateErrorTables)/krb_err.c" + "$(IntermediateErrorTables)/krb_err.strings" + + "$(IntermediateErrorTables)/kadm_err.h" + "$(IntermediateErrorTables)/kadm_err.c" + "$(IntermediateErrorTables)/kadm_err.strings" + + "$(IntermediateErrorTables)/krb524_err.h" + "$(IntermediateErrorTables)/krb524_err.c" + "$(IntermediateErrorTables)/krb524_err.strings" + + "$(IntermediateErrorTables)/asn1_err.h" + "$(IntermediateErrorTables)/asn1_err.c" + "$(IntermediateErrorTables)/asn1_err.strings" + + "$(IntermediateErrorTables)/kdb5_err.h" + "$(IntermediateErrorTables)/kdb5_err.c" + "$(IntermediateErrorTables)/kdb5_err.strings" + + "$(IntermediateErrorTables)/krb5_err.h" + "$(IntermediateErrorTables)/krb5_err.c" + "$(IntermediateErrorTables)/krb5_err.strings" + + "$(IntermediateErrorTables)/kv5m_err.h" + "$(IntermediateErrorTables)/kv5m_err.c" + "$(IntermediateErrorTables)/kv5m_err.strings" + + "$(IntermediateErrorTables)/gssapi_err_generic.h" + "$(IntermediateErrorTables)/gssapi_err_generic.c" + "$(IntermediateErrorTables)/gssapi_err_generic.strings" + + "$(IntermediateErrorTables)/gssapi_err_krb5.h" + "$(IntermediateErrorTables)/gssapi_err_krb5.c" + "$(IntermediateErrorTables)/gssapi_err_krb5.strings" ; +DEPENDS install : all ; +DEPENDS installhdrs : all ; diff --git a/src/mac/MacOSX/Scripts/Kerberos5Headers.jam b/src/mac/MacOSX/Scripts/Kerberos5Headers.jam new file mode 100644 index 000000000..02bc57a06 --- /dev/null +++ b/src/mac/MacOSX/Scripts/Kerberos5Headers.jam @@ -0,0 +1,155 @@ +ErrorTableRegexp = "/^\\s*#define\\s+\\w+\(\\s+\\(-?\\d+L\\)\)|\(initialize_\\w+_error_table\\(\\)\)\\s*$/" ; +ExtractErrorCodes = "perl -e 'while () { if ($(ErrorTableRegexp)) { print; } }'" ; + +Intermediates = "$(BUILT_PRODUCTS_DIR)/Kerberos5.intermediates" ; +IntermediateErrorTables = "$(Intermediates)/ErrorTables" ; +IntermediateIncludes = "$(Intermediates)/include" ; +IntermediateV5Includes = "$(IntermediateIncludes)/krb5" ; +IntermediateV4Includes = "$(IntermediateIncludes)/kerberosIV" ; +IntermediateGSSIncludes = "$(IntermediateIncludes)/gssapi" ; +IntermediateFrameworkHeaders = "$(Intermediates)/Kerberos" ; +IntermediateBuild = "$(Intermediates)/build" ; + +AutoconfH = "$(IntermediateV5Includes)/autoconf.h" ; +OsconfH = "$(IntermediateV5Includes)/osconf.h" ; + +# CatHeader
: +rule CatHeader +{ + NOTFILE "$(2[1])" ; + DEPENDS "$(1)" : "$(2[2-])" "$(AutoconfH)" ; + Clean.Remove clean : "$(1)" ; +} +actions CatHeader +{ + mkdir -p "$(1:D)" + echo "/*" > "$(1)" + echo " * This file is auto generated." >> "$(1)" + echo " * Please do not edit it." >> "$(1)" + echo " */" >> "$(1)" + echo "" >> "$(1)" + echo "#ifndef $(2[1])" >> "$(1)" + echo "#define $(2[1])" >> "$(1)" + echo "" >> "$(1)" + echo "/* Environment dependent macros */" >> "$(1)" + grep SIZEOF "$(AutoconfH)" >> "$(1)" + echo "" >> "$(1)" + for header in "$(2[3-])" ; do + base=`basename "${header}"` + echo "" >> "$(1)" + echo "/* Error tables from ${base} */" >> "$(1)" + cat "${header}" | $(ExtractErrorCodes) >> "$(1)" + done + echo "" >> "$(1)" + cat "$(2[2])" >> "$(1)" + echo "#endif /* $(2[1]) */" >> "$(1)" +} + +rule MakeFrameworkHeader +{ + DEPENDS "$(1)" : "$(2)" ; + Clean.Remove clean : "$(1)" ; +} +actions MakeFrameworkHeader +{ + mkdir -p "$(1:D)" + $(SED) -e 's:::' \ + -e 's:::' \ + -e 's:::' \ + -e 's:::' \ + -e 's:::' \ + -e 's:::' \ + -e 's:::' \ + -e 's:::' \ + -e 's:::' \ + -e 's:::' \ + -e 's:::' \ + "$(2)" > "$(1)" +} + +rule CopyHeader +{ + DEPENDS "$(1)" : "$(2)" ; + Clean.Remove clean : "$(1)" ; +} +actions CopyHeader +{ + mkdir -p "$(1:D)" + cp -fRP "$(2)" "$(1)" +} + + +MakeFrameworkHeader "$(IntermediateFrameworkHeaders)/com_err.h" : "$(SRCROOT)/../../KerberosErrors/Headers/Kerberos/com_err.h" ; +CopyHeader "$(IntermediateIncludes)/com_err.h" : "$(SRCROOT)/../../KerberosErrors/Headers/Kerberos/com_err.h" ; + +CopyHeader "$(IntermediateV4Includes)/des.h" : "$(SRCROOT)/../Sources/include/kerberosIV/des.h" ; +MakeFrameworkHeader "$(IntermediateFrameworkHeaders)/des.h" : "$(IntermediateV4Includes)/des.h" ; + +CopyHeader "$(IntermediateV4Includes)/krb.h" : "$(SRCROOT)/../Sources/include/kerberosIV/krb.h" ; +CopyHeader "$(IntermediateV4Includes)/krb_err.h" : "$(IntermediateErrorTables)/krb_err.h" ; +MakeFrameworkHeader "$(IntermediateFrameworkHeaders)/krb.h" : "$(IntermediateV4Includes)/krb.h" ; +MakeFrameworkHeader "$(IntermediateFrameworkHeaders)/krb_err.h" : "$(IntermediateV4Includes)/krb_err.h" ; + +CatHeader "$(IntermediateIncludes)/profile.h" : "__KERBEROSPROFILE__" + "$(SRCROOT)/../Sources/util/profile/profile.hin" + "$(IntermediateErrorTables)/prof_err.h" ; +MakeFrameworkHeader "$(IntermediateFrameworkHeaders)/profile.h" : "$(IntermediateIncludes)/profile.h" ; + +CatHeader "$(IntermediateIncludes)/krb5.h" : "__KERBEROS5__" + "$(SRCROOT)/../Sources/include/krb5.hin" + "$(IntermediateErrorTables)/asn1_err.h" + "$(IntermediateErrorTables)/kdb5_err.h" + "$(IntermediateErrorTables)/krb5_err.h" + "$(IntermediateErrorTables)/kv5m_err.h" ; +CopyHeader "$(IntermediateIncludes)/krb524.h" : "$(SRCROOT)/../Sources/krb524/krb524.h" ; +CopyHeader "$(IntermediateIncludes)/krb524_err.h" : "$(IntermediateErrorTables)/krb524_err.h" ; +MakeFrameworkHeader "$(IntermediateFrameworkHeaders)/krb5.h" : "$(IntermediateIncludes)/krb5.h" ; +MakeFrameworkHeader "$(IntermediateFrameworkHeaders)/krb524.h" : "$(IntermediateIncludes)/krb524.h" ; +MakeFrameworkHeader "$(IntermediateFrameworkHeaders)/krb524_err.h" : "$(IntermediateIncludes)/krb524_err.h" ; + +CatHeader "$(IntermediateGSSIncludes)/gssapi.h" : "__GSSAPI__" + "$(SRCROOT)/../Sources/lib/gssapi/generic/gssapi.hin" + "$(IntermediateErrorTables)/gssapi_err_generic.h" + "$(IntermediateErrorTables)/gssapi_err_krb5.h" ; +CopyHeader "$(IntermediateGSSIncludes)/gssapi_generic.h" : "$(SRCROOT)/../Sources/lib/gssapi/generic/gssapi_generic.h" ; +CopyHeader "$(IntermediateGSSIncludes)/gssapi_krb5.h" : "$(SRCROOT)/../Sources/lib/gssapi/krb5/gssapi_krb5.h" ; +MakeFrameworkHeader "$(IntermediateFrameworkHeaders)/gssapi.h" : "$(IntermediateGSSIncludes)/gssapi.h" ; +MakeFrameworkHeader "$(IntermediateFrameworkHeaders)/gssapi_generic.h" : "$(IntermediateGSSIncludes)/gssapi_generic.h" ; +MakeFrameworkHeader "$(IntermediateFrameworkHeaders)/gssapi_krb5.h" : "$(IntermediateGSSIncludes)/gssapi_krb5.h" ; + +CopyHeader "$(AutoconfH)" : "$(IntermediateBuild)/include/krb5/autoconf.h" ; +CopyHeader "$(OsconfH)" : "$(IntermediateBuild)/include/krb5/osconf.h" ; + +DEPENDS all : "$(IntermediateIncludes)/com_err.h" + "$(IntermediateFrameworkHeaders)/com_err.h" + + "$(IntermediateV4Includes)/des.h" + "$(IntermediateFrameworkHeaders)/des.h" + + "$(IntermediateV4Includes)/krb.h" + "$(IntermediateV4Includes)/krb_err.h" + "$(IntermediateFrameworkHeaders)/krb.h" + "$(IntermediateFrameworkHeaders)/krb_err.h" + + "$(IntermediateIncludes)/profile.h" + "$(IntermediateFrameworkHeaders)/profile.h" + + "$(IntermediateIncludes)/krb5.h" + "$(IntermediateIncludes)/krb524.h" + "$(IntermediateIncludes)/krb524_err.h" + "$(IntermediateFrameworkHeaders)/krb5.h" + "$(IntermediateFrameworkHeaders)/krb524.h" + "$(IntermediateFrameworkHeaders)/krb524_err.h" + + "$(IntermediateGSSIncludes)/gssapi.h" + "$(IntermediateGSSIncludes)/gssapi_generic.h" + "$(IntermediateGSSIncludes)/gssapi_krb5.h" + "$(IntermediateFrameworkHeaders)/gssapi.h" + "$(IntermediateFrameworkHeaders)/gssapi_generic.h" + "$(IntermediateFrameworkHeaders)/gssapi_krb5.h" + + "$(AutoconfH)" + "$(OsconfH)" ; + +DEPENDS install : all ; +DEPENDS installhdrs : all ; diff --git a/src/mac/MacOSX/Scripts/Kerberos5ServerBuild.jam b/src/mac/MacOSX/Scripts/Kerberos5ServerBuild.jam new file mode 100644 index 000000000..9969720be --- /dev/null +++ b/src/mac/MacOSX/Scripts/Kerberos5ServerBuild.jam @@ -0,0 +1,55 @@ +Intermediates = "$(BUILT_PRODUCTS_DIR)/Kerberos5.intermediates" ; +IntermediateBuild = "$(Intermediates)/build" ; +Sources = "$(SRCROOT)/../Sources" ; + +Reconf = "$(Sources)/util/reconf" ; +Configure = "$(Sources)/configure" ; +Makefile = "$(IntermediateBuild)/Makefile" ; + +# +# Note: in this jam script we have separated the dependency tree from the +# actual scripts. This is so that CVS checkouts trigger a rebuild but the jam +# script doesn't need to know how the reconf and configure scripts work. +# + +# Reconf : +rule Reconf +{ + DEPENDS "$(1)" : "$(1).in" "$(Reconf)" ; +} +actions Reconf +{ + cd "$(Sources)" && /bin/sh "$(Reconf)" -f +} + +# Configure : +rule Configure +{ + DEPENDS "$(1)" : "$(2)" ; + Reconf "$(2)" : "$(2).in" ; + Clean.Remove clean "$(1:D)" ; +} +actions Configure +{ + mkdir -p "$(1:D)" + cd "$(1:D)" && /bin/sh "$(2)" --prefix=/usr CFLAGS="-fno-common" || rm -f "$(1)" +} + +# Make : +rule Make +{ + DEPENDS "$(1)" : "$(2)" ; + Configure "$(2)" : "$(Configure)" ; + Clean.Remove clean "$(1)" ; +} +actions Make +{ + mkdir -p "$(1:D)" + cd "$(1:D)" && make && touch "$(1)" && echo "### HAPPINESS ###" +} + +Make "$(IntermediateBuild)/make.stamp" : "$(Makefile)" ; + +DEPENDS all : "$(IntermediateBuild)/make.stamp" ; +DEPENDS install : all ; +DEPENDS installhdrs : all ;