avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] make depend


From: Theodore A. Roth
Subject: Re: [avrdude-dev] make depend
Date: Tue, 11 Feb 2003 14:25:29 -0800 (PST)


On Tue, 11 Feb 2003, Brian Dean wrote:

:) On Tue, Feb 11, 2003 at 12:09:23PM -0800, Theodore A. Roth wrote:
:)
:) > I think that we still need to use the include .depend mechanism. The
:) > reason is that when you use gcc to find the depends on one system,
:) > they may be different when run on another system.
:)
:) address@hidden:/avrdude- make
:) "Makefile", line 115: Need an operator
:) make: fatal errors encountered -- cannot continue
:)
:) FreeBSD make doesn't grok this.  I was having trouble getting
:) something that worked both with make and gmake and that's when I just
:) included the results inline in the Makefile.  Surely there is an
:) 'include' syntax that is compatible with both FreeBSD make and gmake?

I think we're SOL until I get autotools going.

There is this ugly hack I just barfed up though (kinda what makedeps
from the XFree86 project does):

Index: Makefile
===================================================================
RCS file: /cvsroot/avrdude/avrdude/Makefile,v
retrieving revision 1.34
diff -u -r1.34 Makefile
--- Makefile    11 Feb 2003 21:01:02 -0000      1.34
+++ Makefile    11 Feb 2003 22:15:44 -0000
@@ -107,10 +107,11 @@
 .l.c:
        ${LEX} -t $< > $@

-depend :
+depend:
        @if [ ! -f y.tab.h ]; then touch y.tab.h; fi
        @${MAKE} config_gram.c lexer.c
-       @${CC} ${CFLAGS} -MM ${SRCS} > .depend
-
--include .depend
+       @awk '//,/^# Do not delete/' Makefile > Makefile.tmp
+       @${CC} ${CFLAGS} -MM ${SRCS} >> Makefile.tmp
+       @mv Makefile.tmp Makefile

+# Do not delete this line. Do not add anything after this list.


For now though, I'd suggest just using 'include .depend' and for those
using gnumake, just be sure to 'touch .depend && make depend' before
you get to play.

Ted





reply via email to

[Prev in Thread] Current Thread [Next in Thread]