about summary refs log tree commit diff
path: root/sunrpc
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2012-05-12 08:40:20 +0200
committerAndreas Schwab <schwab@linux-m68k.org>2012-05-16 14:09:23 +0200
commit656416c96528437f54b345b1470aaa40f145ed30 (patch)
treef408ddead3661f88e1e51646c1d26999a78d0bc7 /sunrpc
parenta46f2169d30470c810411cb7f223713d46065651 (diff)
downloadglibc-656416c96528437f54b345b1470aaa40f145ed30.tar.gz
glibc-656416c96528437f54b345b1470aaa40f145ed30.tar.xz
glibc-656416c96528437f54b345b1470aaa40f145ed30.zip
Fix dependency tracking on cross-rpcgen-objs
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/Makefile8
1 files changed, 3 insertions, 5 deletions
diff --git a/sunrpc/Makefile b/sunrpc/Makefile
index 3b79dcdb72..48a458a0c0 100644
--- a/sunrpc/Makefile
+++ b/sunrpc/Makefile
@@ -91,7 +91,7 @@ install-bin := rpcgen
 rpcgen-objs = rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o \
 	      rpc_scan.o rpc_util.o rpc_svcout.o rpc_clntout.o \
 	      rpc_tblout.o rpc_sample.o
-extra-objs = $(rpcgen-objs)
+extra-objs = $(rpcgen-objs) $(addprefix cross-,$(rpcgen-objs))
 others += rpcgen
 
 all: # Make this the default target; it will be defined in Rules.
@@ -157,15 +157,13 @@ $(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
+		$(OUTPUT_OPTION) $(native-compile-mkdep-flags) -c
 
 $(objpfx)cross-rpcgen: $(cross-rpcgen-objs)
 	$(BUILD_CC) $^ $(BUILD_LDFLAGS) -o $@