[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: generate dependency files problem
From: |
Bram Kuijper |
Subject: |
Re: generate dependency files problem |
Date: |
Mon, 25 Jun 2007 13:45:41 +0200 |
User-agent: |
Thunderbird 2.0.0.4 (X11/20070618) |
1. Nicely written Makefile! I like it.
credits to Robert Mecklenburg, copied it to a large extent from his book
2. Are you sure the .d files are not created?
Here is a directory listing after I ran "make libraries", dependency
files should now have been created, but they aren't:
address@hidden:~/Varsity/C++/Simulation_classes/Gene$ ls -aln
total 36
drwxr-xr-x 3 1000 1000 4096 2007-06-25 13:32 .
drwxr-xr-x 13 1000 1000 4096 2007-06-25 13:35 ..
-rw-r--r-- 1 1000 1000 400 2007-06-21 11:28 gene.cpp
-rw-r--r-- 1 1000 1000 126 2007-06-20 16:48 gene.ih
-rw-r--r-- 1 1000 1000 3464 2007-06-25 13:32 gene.o
-rw-r--r-- 1 1000 1000 262 2007-06-21 17:41 makefile
-rw-r--r-- 1 1000 1000 748 2007-05-22 14:56 mutate.cpp
-rw-r--r-- 1 1000 1000 3588 2007-06-25 13:32 mutate.o
drwxr-xr-x 6 1000 1000 4096 2007-06-21 18:48 .svn
3. Why do you do the $(MV) address@hidden $@ and not write directly to
address@hidden
good question, since I copied it from the book I don't know. Maybe to
prevent writing *.d files if there were errors in the *.tmp file?
Mecklenburg doesn't explain this practice in his book.
Since that's a bad explanation, I removed the $(MV) part and now write
directly to $@, which makes no difference.
4. Can you reply with the actual value of $(dependencies) from one of
your real runs that doesn't work? (And do the same for $(sources))
These are the contents of the $(dependencies) variable
/home/bram/Varsity/C++/Simulation_classes/Gene/gene.d
/home/bram/Varsity/C++/Simulation_classes/Gene/mutate.d
/home/bram/Varsity/C++/Simulation_classes/Individual/individual.d
/home/bram/Varsity/C++/Simulation_classes/Individual/inherit.d
/home/bram/Varsity/C++/Simulation_classes/Individual/initpointervector.d
/home/bram/Varsity/C++/Simulation_classes/Individual/operator=.d
/home/bram/Varsity/C++/Simulation_classes/Individual/ploidy_survival.d
/home/bram/Varsity/C++/Simulation_classes/Individual/transmitendosymbiont.d
/home/bram/Varsity/C++/Simulation_classes/Parameters/parameters.d
/home/bram/Varsity/C++/Simulation_classes/Parameters/print.d
/home/bram/Varsity/C++/Simulation_classes/Patch/clear_adults.d
/home/bram/Varsity/C++/Simulation_classes/Patch/create_kids.d
/home/bram/Varsity/C++/Simulation_classes/Patch/findmale.d
/home/bram/Varsity/C++/Simulation_classes/Patch/patch.d
/home/bram/Varsity/C++/Simulation_classes/Patch/reproduceinpatch.d
/home/bram/Varsity/C++/Simulation_classes/Simulation/run.d
/home/bram/Varsity/C++/Simulation_classes/Simulation/simulation.d
/home/bram/Varsity/C++/Simulation_classes/Trait/express.d
/home/bram/Varsity/C++/Simulation_classes/Trait/inherit.d
/home/bram/Varsity/C++/Simulation_classes/Trait/reset.d
/home/bram/Varsity/C++/Simulation_classes/Trait/trait.d
/home/bram/Varsity/C++/Simulation_classes/World/disperse.d
/home/bram/Varsity/C++/Simulation_classes/World/first_generation.d
/home/bram/Varsity/C++/Simulation_classes/World/lay_eggs.d
/home/bram/Varsity/C++/Simulation_classes/World/output.d
/home/bram/Varsity/C++/Simulation_classes/World/redistribute_resources.d
/home/bram/Varsity/C++/Simulation_classes/World/redistribute_resources_kin_group.d
/home/bram/Varsity/C++/Simulation_classes/World/resource_based_survival.d
/home/bram/Varsity/C++/Simulation_classes/World/world.d
These are the contents of the $(sources) variable:
/home/bram/Varsity/C++/Simulation_classes/Gene/gene.cpp
/home/bram/Varsity/C++/Simulation_classes/Gene/mutate.cpp
/home/bram/Varsity/C++/Simulation_classes/Individual/individual.cpp
/home/bram/Varsity/C++/Simulation_classes/Individual/inherit.cpp
/home/bram/Varsity/C++/Simulation_classes/Individual/initpointervector.cpp
/home/bram/Varsity/C++/Simulation_classes/Individual/operator=.cpp
/home/bram/Varsity/C++/Simulation_classes/Individual/ploidy_survival.cpp
/home/bram/Varsity/C++/Simulation_classes/Individual/transmitendosymbiont.cpp
/home/bram/Varsity/C++/Simulation_classes/Parameters/parameters.cpp
/home/bram/Varsity/C++/Simulation_classes/Parameters/print.cpp
/home/bram/Varsity/C++/Simulation_classes/Patch/clear_adults.cpp
/home/bram/Varsity/C++/Simulation_classes/Patch/create_kids.cpp
/home/bram/Varsity/C++/Simulation_classes/Patch/findmale.cpp
/home/bram/Varsity/C++/Simulation_classes/Patch/patch.cpp
/home/bram/Varsity/C++/Simulation_classes/Patch/reproduceinpatch.cpp
/home/bram/Varsity/C++/Simulation_classes/Simulation/run.cpp
/home/bram/Varsity/C++/Simulation_classes/Simulation/simulation.cpp
/home/bram/Varsity/C++/Simulation_classes/Trait/express.cpp
/home/bram/Varsity/C++/Simulation_classes/Trait/inherit.cpp
/home/bram/Varsity/C++/Simulation_classes/Trait/reset.cpp
/home/bram/Varsity/C++/Simulation_classes/Trait/trait.cpp
/home/bram/Varsity/C++/Simulation_classes/World/disperse.cpp
/home/bram/Varsity/C++/Simulation_classes/World/first_generation.cpp
/home/bram/Varsity/C++/Simulation_classes/World/lay_eggs.cpp
/home/bram/Varsity/C++/Simulation_classes/World/output.cpp
/home/bram/Varsity/C++/Simulation_classes/World/redistribute_resources.cpp
/home/bram/Varsity/C++/Simulation_classes/World/redistribute_resources_kin_group.cpp
/home/bram/Varsity/C++/Simulation_classes/World/resource_based_survival.cpp
/home/bram/Varsity/C++/Simulation_classes/World/world.cpp