Hello make experts. I decided to write this letter again since I forgot about
topic.
I'm trying to use Auto-Dependency Generation form this article - Auto-Dependency
GenerationThe article is very nice but i'm stuck. dependencies are generated in
.d folder correctly as written in the a
On 2009-08-02 18:09Z, Greg Chicares wrote:
>
> Set preprocessor flags for generating autodependencies the same
> way you would for compiling. For example:
>
> foo.c: CPPFLAGS += -DLINUX
Sorry, I meant '.o', not '.c':
foo.o: CPPFLAGS += -DLINUX
___
H
On 2009-08-02 16:40Z, mwnn wrote:
> Hi all,
> The "Auto dependecy generation" mechanism can be used to generation
> dependency list for a target automatically. For a C file this can be
> done by invoking gcc with the -MM switch. So in a make file we normally
> have the following rule to gene
Hi all,
The "Auto dependecy generation" mechanism can be used to generation
dependency list for a target automatically. For a C file this can be
done by invoking gcc with the -MM switch. So in a make file we normally
have the following rule to generate dependency files and later include them
On Tue, Dec 2, 2008 at 11:59 AM, Garrett Cooper <[EMAIL PROTECTED]> wrote:
> On Mon, Dec 1, 2008 at 10:06 PM, Paul Smith <[EMAIL PROTECTED]> wrote:
>> On Mon, 2008-12-01 at 18:51 -0800, Garrett Cooper wrote:
>>> Another issue is ncurses and how it does it's echo'ing (see the
>>> following line from
On Mon, Dec 1, 2008 at 10:06 PM, Paul Smith <[EMAIL PROTECTED]> wrote:
> On Mon, 2008-12-01 at 18:51 -0800, Garrett Cooper wrote:
>> Another issue is ncurses and how it does it's echo'ing (see the
>> following line from progs/Makefile.in):
>>
>> transform.h :
>> echo "#define PROG_CAPTOINFO
On Mon, 2008-12-01 at 18:51 -0800, Garrett Cooper wrote:
> Another issue is ncurses and how it does it's echo'ing (see the
> following line from progs/Makefile.in):
>
> transform.h :
> echo "#define PROG_CAPTOINFO \"$(define_captoinfo)\"" >$@
> echo "#define PROG_INFOTOCAP \"$(defi
On Mon, Dec 1, 2008 at 6:51 PM, Garrett Cooper <[EMAIL PROTECTED]> wrote:
> On Mon, Dec 1, 2008 at 6:30 AM, Philip Guenther <[EMAIL PROTECTED]> wrote:
>> On Sun, Nov 30, 2008 at 12:17 AM, Josh Davidson <[EMAIL PROTECTED]> wrote:
>>> However, I'm wondering if the use of sed in creating the dependenc
On Mon, Dec 1, 2008 at 6:30 AM, Philip Guenther <[EMAIL PROTECTED]> wrote:
> On Sun, Nov 30, 2008 at 12:17 AM, Josh Davidson <[EMAIL PROTECTED]> wrote:
>> However, I'm wondering if the use of sed in creating the dependency files
>> could create potential problems under parallel builds (-j).
> ...
>
On Sun, Nov 30, 2008 at 12:17 AM, Josh Davidson <[EMAIL PROTECTED]> wrote:
> However, I'm wondering if the use of sed in creating the dependency files
> could create potential problems under parallel builds (-j).
...
> "Another problem is that two processes cannot both take input from the same
> de
On Sun, 2008-11-30 at 22:53 -0700, Josh Davidson wrote:
> I must be missing something:
> sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
> -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
>
> How is the "< $*.d >> $*.P" not redirecting STDIN to $*.d?
It is redirectin
h
-Original Message-
From: Paul Smith [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 30, 2008 12:53 PM
To: Josh Davidson
Cc: help-make@gnu.org
Subject: Re: Advanced Auto-Dependency Generation and Parallel Execution
On Sun, 2008-11-30 at 01:17 -0700, Josh Davidson wrote:
> Since sed i
On Sun, 2008-11-30 at 01:17 -0700, Josh Davidson wrote:
> Since sed is reading from STDIN to generate the dependency problem,
> doesn’t it violate the rule above?
sed is not reading from the terminal. It's reading from the output of
the previous command, through the pipe. So, there is no worry h
I've been using Paul D. Smith's dependency approach detailed in his article
Advanced Auto-Dependency Generation (
http://make.paulandlesley.org/autodep.html ) for a while now. However, I'm
wondering if the use of sed in creating the dependency files could create
potential
On Wed, Feb 01, 2006 at 04:01:13AM +, Greg Chicares wrote:
>
> A similar idea is presented here:
> http://lists.gnu.org/archive/html/help-make/2004-01/msg00058.html
> and you might be interested in the ensuing discussion.
>
I read the discussion. Among other things they seem to suggest that
On 2006-2-1 0:07 UTC, Nick Patavalis wrote:
>
> http://make.paulandlesley.org/autodep.html
>
> There is, though, a minor glitch. With the proposed implementation, if
> a dependency file somehow gets deleted while the corresponding object
> file remains standing, in this case, dependency track
Hi,
I just read the excellent article `Advanced Auto-Dependency
Generation`_ by Paul D. Smith. The proposed technique of generating
dependency lists when compiling the sources, and using the dependency
lists created by the *previous build*, is truly ingenious.
.._Advanced Auto-Dependency
Philip Guenther <[EMAIL PROTECTED]> writes:
> # Require that the .tab.h file(s) exist before any .o files are built
> %.o: | ${YACC_FILES:.y=.tab.h}
>
> endif
FYI, this does not have any effect in GNU make.
-boris
___
Help-make mailing list
Help-mak
On 1/30/06, Boris Kolpackov <[EMAIL PROTECTED]> wrote:
> Philip Guenther <[EMAIL PROTECTED]> writes:
>
> > # Require that the .tab.h file(s) exist before any .o files are built
> > %.o: | ${YACC_FILES:.y=.tab.h}
>
> FYI, this does not have any effect in GNU make.
Oops, right. You'll need to actua
James P Williams writes:
>In my case, however, I'm trying to implement this in a general way
>that can be #included by Makefiles from many different applications.
>Also, files other than lex.c files can #include yacc.h. So the
>dependency graph could look like this.
>
> prog.exe: goo.o
On 1/26/06, Williams, James P <[EMAIL PROTECTED]> wrote:
>
>
> I'm trying to implement automatic dependency generation using the excellent
> idea posted here.
>
>http://make.paulandlesley.org/autodep.html
>
> The following email seems to describe the problem I'm having.
>
>
> http://lists.gnu.o
Title: "Advanced Auto-Dependency Generation" and lex/yacc (again)
I'm trying to implement automatic dependency generation using the excellent idea posted here.
http://make.paulandlesley.org/autodep.html
The following email seems to describe the problem I'
%% "Angel Tsankov" <[EMAIL PROTECTED]> writes:
>> BTW, I don't need to @echo in the %.d rule. An empty command line
>> (tab) was sufficient for my make version.
at> I supposed it would do, but I'd already implemented the @echo
at> version which I had tested and it worked.
Note that an em
Your suggested method seems to work just fine! In your first reply I
thought you just referred to the method recommended in the GNU Make
Manual, but this is quite elegant!
Nice to hear that:)
BTW, I don't need to @echo in the %.d rule. An empty command line
(tab)
was sufficient for my make ve
hanks!
Anna
- Original Message -
Re: "Advanced Auto-Dependency Generation" question
From:
Angel Tsankov
Subject:
Re: "Advanced Auto-Dependency Generation" question
Date:
Tue, 16 Aug 2005 23:58:47 +0300
Hi,I don't re
Hi,
I don't recall many details, but...
Angel Tsankov wrote:
You also need to add each dependency
file on the list of prerequisites of the respective .o file. This
will
trigger rebuild of the object and dependency file if the depenency
file is missing...
you might get a situation where unne
Hi,
I don't recall many details, but...
Angel Tsankov wrote:
You also need to add each dependency
file on the list of prerequisites of the respective .o file. This will
trigger rebuild of the object and dependency file if the depenency
file is missing...
you might get a situation where unnece
- Original Message -
From: "Anna Olsson" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, August 16, 2005 11:28 AM
Subject: "Advanced Auto-Dependency Generation" question
I've read the "Advanced Auto-Dependency Generation" article - but I'm
wonde
- Original Message -
From: "Anna Olsson" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, August 16, 2005 11:28 AM
Subject: "Advanced Auto-Dependency Generation" question
I've read the "Advanced Auto-Dependency Generation" article - but
I'm
wonderi
On 2005-8-16 8:28 UTC, Anna Olsson wrote:
> I've read the "Advanced Auto-Dependency Generation" article - but I'm
> wondering about this:
>
> The solution to the second problem (make reports an error when the
> dependecy file does not exist) is to make m
I've read the
"Advanced Auto-Dependency Generation" article - but I'm wondering about
this:
The solution to the
second problem (make reports an error when the dependecy file does not
exist) is to make make not care about whether or not dependency files exist. But
I decided to err on the side of paranoia. I replaced the existing find
command which removed empty dependency files with a perl script that
removes empty dependency files and removes objects for which no
dependency file exists.
It takes just a split second once the directories are cached.
Again,
makefile (and thus the dep files).
Having two instances of make running with the same makefile at the same
time is bound to be a big problem, REGARDLESS of auto-dependency
generation.
Maybe you can elaborate on the problems
Hi,
> From: Paul Smith [mailto:[EMAIL PROTECTED] Behalf Of ext Paul D. Smith
> >> Also what I dislike about the trick listed in "Advanced
> >> Auto-Dependencies" is that it doesn't work for parallel builds:
> >> there is no rule for .P files. A process includes a .P file while
> >> it is
%% Alexey Neyman <[EMAIL PROTECTED]> writes:
an> I think the following Makefile does just what you want:
an> %.d %.o: %.c
an> gcc -c -MT '$*.o $*.d' -MD -MF $*.d -o $*.o $<
One of the key points of the advanced auto-dependency method is that you
CANNOT have rules that build .d files.
Hi,
I think the following Makefile does just what you want:
FILES = a.c b.c
OBJS= $(addsuffix .o,$(basename $(FILES)))
DEPS= $(addsuffix .d,$(basename $(FILES)))
%.d %.o: %.c
gcc -c -MT '$*.o $*.d' -MD -MF $*.d -o $*.o $<
prog: $(OBJS)
gcc -o $@ $^
al
Hi,
I'm not a gmake expert at all and often struggle to understand it.
But my suggestion is: if you want so much, that the .d (actually .P)
files get regenerated in cases they get deleted - then you obviously
need a rule for them, like the one listed in "Basic Auto-Dependencies".
Also what I d
I have a step left over from the earlier make environment which does
something similar in that it removes empty dependency files, which got
created some times (not sure why). I could modify this to perform what
you suggest.
At least I now know I'm not doing something wrong in my implementation.
I
All objects and dependency files are in a separate directory hierarchy
which mirrors the source hierarchy.
As I mentioned in my other reply, I'm still not sure if I'll do anything
further to protect against this.
Thanks, Greg.
On Tue, 2005-04-12 at 10:50, Noel Yap wrote:
> IMHO, dependency file
IMHO, dependency files, as with other generated files, ought to be built in a directory structure separate from the source directories. If this were done, one /would/ protect against _accidental_ erasure of the dependency files (no mortal should be
meddling in the build directories).
HTH,
Noel
G
On 2005-04-12 12:36 PM, Greg Kilfoyle wrote:
I have implemented dependency generation based on the information from
this web page: http://make.paulandlesley.org/autodep.html
[...]
Let's say I have just done a complete build and everything is up-to-
date. I then manually remove a dependency file for
The rule listed shows commas after -MD and -MT which should not be there
... sorry.
Cheers, Greg.
On Tue, 2005-04-12 at 09:36, Greg Kilfoyle wrote:
> Hi,
>
> I have implemented dependency generation based on the information from
> this web page: http://make.paulandlesley.org/autodep.html
>
> I
Hi,
I have implemented dependency generation based on the information from
this web page: http://make.paulandlesley.org/autodep.html
It works great, but my implementation has one serious drawback that I
don't see covered ... maybe I just missed something.
Let's say I have just done a complete bu
Hi,
[EMAIL PROTECTED] wrote:
Hi Paul,
So what is the advantage of using the Advanced Auto-Dependency Generation.
Would gmake rebuild the list of prerequisites during the compilation of
the source code.
Yes, it would, and most efficiently.
Most environments I've seen, use a special targe
Hi Paul,
So what is the advantage of using the
Advanced Auto-Dependency Generation. Would gmake rebuild the list of prerequisites
during the compilation of the source code.
Thanks in advance.
Thanks & Regards,
Bhaskar G
=
Technical Leader
Phi
%% [EMAIL PROTECTED] writes:
bg> According to make manual all the included files would be read and
bg> processed before make starts building. Now said that how would the
bg> include statement at the end would affect build as the file that
bg> was generated in my earlier build would have be
Hi,
Advanced Dependency Generation is mentioned
in the URL: http://make.paulandlesley.org/autodep.html.
I had one quick question on this.
SRCS = foo.c bar.c ...
%.o : %.c
@$(MAKEDEPEND)
$(COMPILE.c) -o $@ $<
-include $(SRCS:.c=.P)
According to make manual all the
%% Jason Elbaum <[EMAIL PROTECTED]> writes:
je> I have one problem, though: handling lex and yacc correctly. Typically,
je> yacc takes a .y file as input and builds two files: a .c file and a .h
je> file. Then, lex reads a .l file and builds a .c file. Usually, though,
je> lex also #inclu
48 matches
Mail list logo