Differences between version 58 and predecessor to the previous major change of MakefileHowto.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 58 | Last edited on Thursday, January 13, 2005 2:34:59 pm | by AristotlePagaltzis | Revert |
Older page: | version 50 | Last edited on Saturday, October 2, 2004 12:20:41 am | by FlorianKonnertz | Revert |
@@ -295,18 +295,39 @@
----
!!Requests
-I'd like to know something about makedepend and such things. Maybe some links to other or "official" make HOWTOs would be useful as well. Thanks.
+I'd like to know something about makedepend and such things. Maybe some links to other or "official" make HOWTOs would be useful as well. Thanks. -- Someone
+Dear Someone,
+Take a look at [the make manual | http://www.gnu.org/software/make/manual/html_chapter/make.html], especially [section 4.14 | http://www.gnu.org/software/make/manual/html_chapter/make_4.html#SEC51]. Basically 'make depend' is not really needed anymore.
+
+----
I cannot find info about the meaning of '@AMDEP_TRUE@' variables in a Makefile. At the moment i get the error:
make: AMDEP_TRUE@: Kommando nicht gefunden
- make: *** [arandom.lo] Fehler 127
+ make: *** [
[arandom.lo] Fehler 127
+thx, !FlorianKonnertz
+
+This isn't really anything to do with make. The autoconf/configure methods that many projects use take a template file (such as Makefile.in) and use that to create a makefile. autoconf uses things like @CXXFLAGS@ for its variables, and should replace @...@ vars with something that makes sense to make. If you have a makefile that still has @...@ variables in it, then it's a bug and there is a bug in the package.
+
+----
+
+I have a question. I have a directory called src. Within this directory, a group publishes designs inside directories:
+
+
+ Release_010405
+ Release_010505
+ Release_010605
+ Release_032304
+ Release_082903
+
+
+If there is a file called baja.c inside one of these directories that is newer than baja.o, I want to compile. I was able to make a list of all the baja.c files within the Release directories using wildcard:
+
+ NEWSOURCES = $(wildcard Release_*/baja.c)
-related lines in my Makefile are:
- @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/aerr
.Plo $(DEPDIR)/aio
.Plo \
- @AMDEP_TRUE@ $(DEPDIR)/aiod.Po $(DEPDIR)/aios.Plo \
- @AMDEP_TRUE@ $(DEPDIR)/arandom.Plo $(DEPDIR)/arena.Plo \
+However, I don't know how to tell Make which is the latest file
. The following grabs the first of the list
.
-no tab/space at the beginning
+ baja.local: $(NEWSOURCES)
+ cp $< .
-The whole makefile is here: http://flo
.cobuero
.net/Makefile
+''You could try using __$?__ which gives you the names of the prerequisites which are newer than the target
. If there can be several of those and you only need the latest, though, you have to do it in the recipe, using shell tools
.'' --AristotlePagaltzis