This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cross-rpcgen patch, version 6


"Joseph S. Myers" <joseph@codesourcery.com> writes:

> @@ -147,13 +146,30 @@ $(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so
>  
>  $(objpfx)rpcgen: $(addprefix $(objpfx),$(rpcgen-objs))
>  
> +cross-rpcgen-objs := $(addprefix $(objpfx)cross-,$(rpcgen-objs))
> +extra-objs += $(cross-rpcgen-objs)

extra-objs is only effective before include ../Rules, and doesn't
include $(objpfx).

> +# When generic makefile support for build system programs is
> +# available, it should replace this code.  See
> +# <http://sourceware.org/bugzilla/show_bug.cgi?id=14087>.
> +$(cross-rpcgen-objs): $(objpfx)cross-%.o: %.c
> +	$(make-target-directory)

$(before-compile) takes care of creating $(objpfx).

Andreas.

	* sunrpc/Makefile (cross-rpcgen-objs): Move before include ../Rules.
	(extra-objs): Likewise.  Don't prepend $(objpfx).
	($(cross-rpcgen-objs)): Depend on $(before-compile).  Don't run
	$(make-target-directory).
---
 sunrpc/Makefile |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sunrpc/Makefile b/sunrpc/Makefile
index 3b79dcd..3955728 100644
--- a/sunrpc/Makefile
+++ b/sunrpc/Makefile
@@ -117,6 +117,9 @@ rpc-compat-routines.os = $(addprefix $(objpfx), \
 extra-objs += $(addsuffix .os,$(rpc-compat-routines))
 endif
 
+cross-rpcgen-objs := $(addprefix $(objpfx)cross-,$(rpcgen-objs))
+extra-objs += $(addprefix cross-, $(rpcgen-objs))
+
 include ../Rules
 
 ifeq (yes,$(build-shared))
@@ -156,14 +159,10 @@ $(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so
 
 $(objpfx)rpcgen: $(addprefix $(objpfx),$(rpcgen-objs))
 
-cross-rpcgen-objs := $(addprefix $(objpfx)cross-,$(rpcgen-objs))
-extra-objs += $(cross-rpcgen-objs)
-
 # When generic makefile support for build system programs is
 # available, it should replace this code.  See
 # <http://sourceware.org/bugzilla/show_bug.cgi?id=14087>.
-$(cross-rpcgen-objs): $(objpfx)cross-%.o: %.c
-	$(make-target-directory)
+$(cross-rpcgen-objs): $(objpfx)cross-%.o: %.c $(before-compile)
 	$(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) $< \
 		$(OUTPUT_OPTION) $(compile-mkdep-flags) -c
 
-- 
1.7.10.1


-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]