title: Make: why do I get error saying "no such file or directory"
body: <p>When I tried my makefile, I got error saying that No such file or directory, but my directory is right there, what do I do wrong? Thanks. </p>
  
  <p>my project structure :</p>
  
  <pre><code>dev |--- ev
      |--- display
      |--- install ( makefile is here, try to call makefiles in ev and display folder)
  </code></pre>
  
  <p>My makefile :</p>
  
  <pre><code> MODULES :=ev display 
   SRC_DIR   :=$(addprefix ../, $(MODULES))
   BUILD_DIR:=$(addsuffix /build, $(SRC_DIR))
   x:=../ev                               ------&gt; add temporarily just for test, 
                                          ------&gt; the same error if x:=$(HOME)/dev/ev
  
   INSTALL_DIR:=EX Frameworks Add-ons
   INSTALL_DIR:=$(addprefix $(HOME)/EX/, $(INSTALL_DIR))
  
  
   vpath %.cpp %.java $(SRC_DIR)
  
   .PHONY: all clean
  
   checkdirs: $(INSTALL_DIR)
  
   $(INSTALL_DIR):
        @echo "INSTALL DIR"
        @mkdir -p $@ 
  
  
   define make-goal
   $1:
        @echo "start building each part"
        cd $@ &amp;&amp; make -f Makefile_new.osx clean
        cd $@ &amp;&amp; make -f Makefile_new.osx package
   endef
  
  
   clean:
       @echo "clean up"
  
       @echo "BUILD_DIR IS $(BUILD_DIR)"
       @rm -rf $(BUILD_DIR)
  
  
     all:
       @echo "start build subdirectory"
       @echo "SRC_DIR IS $(SRC_DIR)"
  
       @echo "x is $(x)"
       $(call make-goal, $(x)))   ----&gt; when it comes to here, I got error message
  </code></pre>
  
  <p>The error messages:</p>
  
  <pre><code>x is ../ev
  ../x:
  make: ../ev:: No such file or directory.
  </code></pre>
  
  <p>I guess it is about relative path, because I call this makefile from Install folder, then $(x) can't be found from Install folder, but when I tried to make a folder named ev (Install/ev), I still got the same error. </p>
  
  <p>I think it must be something basic I missed here, but what it is.</p>
  
  <p>Thanks.</p>
  
  <p>Update: </p>
  
  <p>I am trying to build a project which includes several sub-projects. the structure is: </p>
  
  <pre><code>dev |---- ev
      |---- edf
      |----- dt
      |------af 
      |------Install
  </code></pre>
  
  <p>Inside of Install, I have a makefile, which is at the top level. The makefile in Install folder will call makefiles in other folders to build different subjects, </p>
  
  <p>Ideally, I want to build every sub projects without touching sources. My sources include c++ and java code.  </p>