From f15fb39b204ef2d30cbed43139a467671718b307 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Mon, 15 Jun 2015 19:27:12 +0200 Subject: [PATCH] Properly fix Lex/Yacc dependency following Ingo's advice * By setting HDRGRIST to match SOURCE_GRIST in MultiArchDirSetup, the include scanning in Jam will work properly: the generated header will have the same grist as what the include scan looks for. * Remove the now unneeded workaround from netresolv Jamfile. --- build/jam/ArchitectureRules | 5 ++++- src/kits/network/netresolv/Jamfile | 15 ++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules index fe3f7630a0..42a0159a1e 100644 --- a/build/jam/ArchitectureRules +++ b/build/jam/ArchitectureRules @@ -739,10 +739,13 @@ rule MultiArchSubDirSetup architectures $(var) on $(architectureObject) = $($(var)) ; } - # adjust SOURCE_GRIST + # adjust SOURCE_GRIST and HDRGRIST SOURCE_GRIST on $(architectureObject) = $(SOURCE_GRIST:E=)!$(architecture) ; + HDRGRIST on $(architectureObject) + = $(HDRGRIST:E=)!$(architecture) ; + # Adjust the subdir's object dirs that are architecture dependent. To # avoid duplicating the code from SetupObjectsDir, we call it. Since it # sets global variables, we set these variables on our object, call diff --git a/src/kits/network/netresolv/Jamfile b/src/kits/network/netresolv/Jamfile index 34627eeae2..0a4a4ec117 100644 --- a/src/kits/network/netresolv/Jamfile +++ b/src/kits/network/netresolv/Jamfile @@ -5,10 +5,15 @@ for architectureObject in [ MultiArchSubDirSetup ] { on $(architectureObject) { local architecture = $(TARGET_PACKAGING_ARCH) ; +#HDRGRIST = [ FGrist $(SUBDIR_TOKENS) $(architecture) ] ; + UseHeaders [ FDirName $(SUBDIR) include ] : true ; UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ] : true ; UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ; + UseHeaders [ FDirName + $(TARGET_COMMON_DEBUG_OBJECT_DIR_$(TARGET_PACKAGING_ARCHS[1])) + kits network netresolv ] ; SubDirSysHdrs $(SUBDIR) ; # private sources for this port @@ -24,18 +29,14 @@ for architectureObject in [ MultiArchSubDirSetup ] { SEARCH_SOURCE += [ FDirName $(SUBDIR) resolv ] ; { - # we want to have the xxx_r functions, too + # we want to have the xxx_r functions, IPv6, and md5 implementation + # we also need to use our BSD compatibility functions local defines = _REENTRANT=1 USE_MD5=1 _BSD_SOURCE ; defines = [ FDefines $(defines) ] ; SubDirCcFlags $(defines) ; SubDirC++Flags $(defines) ; } - # the header doesn't appear to get the architecture gristed, so - # make the dependency explicit - Includes nslexer.l - : nsparser.h ; - MergeObject netresolv.o : # dst dst_api.c @@ -79,8 +80,8 @@ for architectureObject in [ MultiArchSubDirSetup ] { getservent_r.c hesiod.c nsdispatch.c - nsparser.y nslexer.l + nsparser.y sethostent.c vars6.c