[Swan] dependencies in Makefiles

Antony Antony antony at phenome.org
Sun Mar 24 09:03:05 EET 2013


Hi,
I was looking at the Makefile and notice an odd $GCC. Here is a fix for the target depend, change the $GCC to $CC .

diff --git a/programs/pluto/Makefile b/programs/pluto/Makefile
index a5f7b7b..14d7488 100644
--- a/programs/pluto/Makefile
+++ b/programs/pluto/Makefile
@@ -284,7 +284,7 @@ checkprograms:

 # Gather dependencies caused by explicit #includes within .c files
 depend:
-       @(ls $(DISTSRC) | grep '\.c' | xargs $(GCC) -MM ${COPTS} ${PORTINCLUDE} ${ALLFLAGS} ) | sed -e 's,${LIBRESWANSRCDIR},../..,g' >Makefile.depend.${OSDEP}
+       @(ls $(DISTSRC) | grep '\.c' | xargs $(CC) -MM ${COPTS} ${PORTINCLUDE} ${ALLFLAGS} ) | sed -e 's,${LIBRESWANSRCDIR},../..,g' >Makefile.depend.${OSDEP}

and  run "make depend " in programs/pluto 

regards,
-antony



On Sun, Feb 10, 2013 at 11:33:13AM -0500, D. Hugh Redelmeier wrote:
> | From: Paul Wouters <paul at nohats.ca>
> 
> | On Sun, 10 Feb 2013, D. Hugh Redelmeier wrote:
> | 
> | > How are dependencies updated for libreswan's Makefiles?
> | 
> | AFAIK, only manually :(
> 
> How?
> 
> I tried
> 	make depend
> and it said
> 	make: *** No rule to make target `depend'.  Stop.
> 
> I went to the pluto directory and said
> 	make depend
> and got:
>     xargs: invalid option -- 'M'
>     Usage: xargs [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]
> 	   [-E eof-str] [-e[eof-str]]  [--eof[=eof-str]]
> 	   [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]
> 	   [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]
> 	   [-n max-args] [--max-args=max-args]
> 	   [-s max-chars] [--max-chars=max-chars]
> 	   [-P max-procs]  [--max-procs=max-procs] [--show-limits]
> 	   [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]
> 	   [--version] [--help] [command [initial-arguments]]
> 
>     Report bugs to <bug-findutils at gnu.org>.
> 
> As a side-effect, programs/pluto/Makefile.depend.linux became empty.
> 
> Is there a way to run Pluto's Makefile's depend code with a better
> context?
> 
> | > Perhaps these files are relevant.  But something's wrong: 0 isn't a
> | > reasonable size.
> | >
> | > $ du -a | grep depend
> | > 0       ./programs/pluto/Makefile.depend.linux
> | 
> | Not on my tree:
> 
> Yeah, a side-effect of my fumbled testing.
> _______________________________________________
> Swan mailing list
> Swan at lists.libreswan.org
> https://lists.libreswan.org/mailman/listinfo/swan
> 


More information about the Swan mailing list