Pass architecture environment to krb5 build system
authorAlexandra Ellwood <lxs@mit.edu>
Fri, 14 May 2004 21:14:22 +0000 (21:14 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Fri, 14 May 2004 21:14:22 +0000 (21:14 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16336 dc483132-0cff-0310-8789-dd5450dbe970

src/mac/MacOSX/Scripts/Kerberos5ServerBuild.jam

index 77c8f79c127d5cd4f85e46f0ba0b69e564c42ef4..24e8944e1c90c47772c94cd93f449a4df16feb51 100644 (file)
@@ -7,17 +7,18 @@ Configure = "$(Sources)/configure" ;
 Makefile = "$(IntermediateBuild)/Makefile" ;
 MakeStamp = "$(IntermediateBuild)/make.stamp" ;
 
-if $(KerberosCFLAGS) != "" { 
-    KerberosCFLAGS = "CFLAGS=$(CFLAGS) -fno-common -include /usr/include/TargetConditionals.h -DUSE_PASSWORD_SERVER" ; 
-} else {
-    KerberosCFLAGS = "CFLAGS=-fno-common -include /usr/include/TargetConditionals.h -DUSE_PASSWORD_SERVER" ;
-}
+# Assemble CFLAGS
+CONFIGURE_CFLAGS = "-fno-common -include /usr/include/TargetConditionals.h -DUSE_PASSWORD_SERVER" ;
+if $(RC_CFLAGS)      != "" { CONFIGURE_CFLAGS = "$(CONFIGURE_CFLAGS) $(RC_CFLAGS)" ;      }
+if $(CFLAGS)         != "" { CONFIGURE_CFLAGS = "$(CONFIGURE_CFLAGS) $(CFLAGS)" ;         }
+if $(OTHER_CFLAGS)   != "" { CONFIGURE_CFLAGS = "$(CONFIGURE_CFLAGS) $(OTHER_CFLAGS)" ;   }
+if $(WARNING_CFLAGS) != "" { CONFIGURE_CFLAGS = "$(CONFIGURE_CFLAGS) $(WARNING_CFLAGS)" ; }
+CONFIGURE_CFLAGS = "CFLAGS=$(CONFIGURE_CFLAGS)" ;
 
-if $(KerberosLDFLAGS) != "" { 
-    KerberosLDFLAGS = "LDFLAGS=$(LDFLAGS) -Wl,-search_paths_first" ; 
-} else {
-    KerberosLDFLAGS = "LDFLAGS=-Wl,-search_paths_first" ;
-}
+# Assemble LDFLAGS
+CONFIGURE_LDFLAGS = "-Wl,-search_paths_first" ;
+if $(LDFLAGS) != "" { CONFIGURE_LDFLAGS = "$(LDFLAGS) $(CONFIGURE_LDFLAGS)" ;  }
+CONFIGURE_LDFLAGS = "LDFLAGS=$(CONFIGURE_LDFLAGS:)" ;
 
 #
 # Note: in this jam script we have separated the dependency tree from the 
@@ -45,7 +46,7 @@ rule Configure
 actions Configure
 {
     mkdir -p "$(1:D)"
-    cd "$(1:D)" && /bin/sh "$(2)" --prefix=/usr --localstatedir=/var/db "$(KerberosCFLAGS)" "$(KerberosLDFLAGS)" || rm -f "$(1)"
+    cd "$(1:D)" && /bin/sh "$(2)" --prefix=/usr --localstatedir=/var/db "$(CONFIGURE_CFLAGS)" "$(CONFIGURE_LDFLAGS)" || rm -f "$(1)"
 }
 
 # Make <stamp file> : <makefile>