* Depfiles fix for sunrpc
@ 2003-06-09 19:20 Andreas Schwab
2003-06-10 2:26 ` Ulrich Drepper
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Schwab @ 2003-06-09 19:20 UTC (permalink / raw)
To: libc-hacker
This makes sunrpc/Makefile use the *.dt files for the librpcsvc
objects, which are already generated anyway.
Andreas.
2003-06-09 Andreas Schwab <schwab@suse.de>
* sunrpc/Makefile (generated): Remove rpc-proto.c, rpc-proto.d.
($(rpcsvc:%.x=$(objpfx)x%$o)): Don't depend on
$(objpfx)rpc-proto.d.
(rpcsvc-dt-files, rpcsvc-depfiles): Define. Include
$(rpcsvc-depfiles) instead of $(objpfx)rpc-proto.d.
($(objpfx)rpc-proto.d, $(objpfx)rpc-proto.c): Remove rules.
--- sunrpc/Makefile.~1.76.~ 2003-05-05 22:25:21.000000000 +0200
+++ sunrpc/Makefile 2003-06-09 16:40:15.000000000 +0200
@@ -54,7 +54,7 @@ headers = $(addprefix rpc/,auth.h auth_u
$(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
install-others = $(inst_sysconfdir)/rpc
generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
- $(rpcsvc:%.x=rpcsvc/%.stmp) rpc-proto.c rpc-proto.d rpcgen
+ $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
generated-dirs := rpcsvc
routines := auth_none auth_unix authuxprot bindrsvprt \
@@ -168,26 +168,20 @@ $(objpfx)x%.stmp: rpcsvc/%.x $(objpfx)rp
# Gratuitous dependency on generated .c file here just gets it mentioned to
# avoid being an intermediate file and getting removed.
define o-iterator-doit
-$(rpcsvc:%.x=$(objpfx)x%$o): $(objpfx)x%$o: $(objpfx)x%.c $(objpfx)rpcsvc/%.h \
- $(objpfx)rpc-proto.d
+$(rpcsvc:%.x=$(objpfx)x%$o): $(objpfx)x%$o: $(objpfx)x%.c $(objpfx)rpcsvc/%.h
endef
object-suffixes-left = $(filter-out $(librpcsvc-inhibit-o),$(object-suffixes))
include $(o-iterator)
-ifndef no_deps
--include $(objpfx)rpc-proto.d
+rpcsvc-dt-files := $(foreach o,$(filter-out $(librpcsvc-inhibit-o),\
+ $(object-suffixes)),\
+ $(rpcsvc:%.x=$(objpfx)x%$o.dt))
+rpcsvc-depfiles := $(patsubst %.dt,%.d,$(wildcard $(rpcsvc-dt-files))) \
+ $(wildcard $(rpcsvc-dt-files:.dt=.d))
+ifdef rpcsvc-depfiles
+ifneq ($(no_deps),t)
+-include $(rpcsvc-depfiles)
+endif
endif
-
-$(objpfx)rpc-proto.d: $(objpfx)%.d: $(objpfx)%.c
- $(+make-deps)
-# Special file to generate dependencies for the RPC service objects.
-# Collect all include directives from the source files.
-$(objpfx)rpc-proto.c: $(rpcsvc:%=rpcsvc/%)
- $(make-target-directory)
- { echo '#include <rpc/types.h>'; \
- echo '#include <rpc/xdr.h>'; \
- echo '#include <rpc/rpc.h>'; \
- sed -n '/^%#include/s/%//p' $^; } > $@T
- mv -f $@T $@
$(objpfx)thrsvc: $(shared-thread-library)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Depfiles fix for sunrpc
2003-06-09 19:20 Depfiles fix for sunrpc Andreas Schwab
@ 2003-06-10 2:26 ` Ulrich Drepper
0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2003-06-10 2:26 UTC (permalink / raw)
To: Andreas Schwab; +Cc: libc-hacker
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andreas Schwab wrote:
> This makes sunrpc/Makefile use the *.dt files for the librpcsvc
> objects, which are already generated anyway.
I've applied the patch. Thanks,
- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+5UGQ2ijCOnn/RHQRAkAVAKDLxQ1069KjveCHoPdLfQzOBPt8CACfbngl
EwLupqyE6UBbI847d5EabP0=
=l33w
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-06-10 2:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-09 19:20 Depfiles fix for sunrpc Andreas Schwab
2003-06-10 2:26 ` Ulrich Drepper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).