Re: Make problem



"Tim" <Tim.Huetz@xxxxxxxxx> writes:

Hey guys,
I have a small problem with my makefile. This makefile contains the
following code and resists inside the root-directory of my project:

--- snip ---
blub-dirs += dir1/$(name_sub_dir) dir2

PHONY += $(blub-dirs)
$(blub-dirs):
$(Q)$(MAKE) -f $(CURDIR)/scripts/Makefile.build srcdir=$@ -C $@

.PHONY: $(PHONY)
--- snap ---

My problem is, that just the first directory in my "list" will be
handled. This means, that just one make call will be done for
"dir1/$(name_sub_dir)" but no one for "dir2". Has anybody an idea what
I'm doing wrong? Thanks.

If you say "make dir2" does it make the dir2 target?

By default, only the first target is made.
You may need a rule:

all: $(blub-dirs)

before the $(blub-dirs) rule.

I haven't tried what you coded.
.



Relevant Pages

  • [patch] Makefile: cancel implicit rules on included and top makefiles.
    ... Do not let make to do so, by canceling implicit rules on this files. ... +# We need some generic definitions from another makefile. ... # Declare the contents of the .PHONY variable as phony. ...
    (Linux-Kernel)
  • problem with .phony clean
    ... In my makefile i have the clean target and its phony but i don't ... Prev by Date: ...
    (comp.programming)
  • make and the cd command
    ... In the below makefile I am trying to cd to a directory and run the g++ command: ... ..PHONY: test ... What am I missing? ...
    (comp.unix.programmer)
  • Re: problem with .phony clean
    ... > In my makefile i have the clean target and its phony but i don't ... Prev by Date: ...
    (comp.programming)
  • Re: problem with .phony clean
    ... >> In my makefile i have the clean target and its phony but i don't ... > Man pages or help files depending on your system or compiler should be ... It usually removes the files the makefile is intended to build. ...
    (comp.programming)