title: make: unable to locate user-defined header file that is included?
body: <p>When I run make, I get the following error: </p>
  
  <p><code>make: *** No rule to make target Menu.h', needed by Menu.o'.  Stop.</code></p>
  
  <p>Here is my Makefile:</p>
  
  <pre><code>PROG = sim
  CURR_PATH = ~/Projects/restaurant/cpp/
  CC = g++
  CPPFLAGS = -g -v -Wall $(LOCAL_INCLUDES) -I$(BOOST_ROOT)
  ODIR = ./bin
  SDIR = ./src
  LOCAL_INCLUDES = $(patsubst %,-I$(CURR_PATH)src/%,$(PKG_DIRS))
  PKG_DIRS = $(shell ls $(SDIR))
  FIND_SRC_FILES = $(notdir $(wildcard $(SDIR)/$(pkg)/*.cpp))
  SRC_FILES = $(foreach pkg,$(PKG_DIRS),$(FIND_SRC_FILES))
  OBJ_FILES = $(patsubst %.cpp,%.o,$(SRC_FILES))
  MAIN_OBJ = main.o
  
  .PHONY : prog
  
  prog : $(PROG)
  
  all : ; $(info $$CPPFLAGS is [${CPPFLAGS}])@echo Hello world
  
  $(PROG) : $(OBJ_FILES)
      $(CC) $(CPPFLAGS) -o $(PROG) $(MAIN_OBJ)
  %.o : %.cpp
      $(CC) $(CPPFLAGS) -c $&lt; -o $@
  $(OBJ_FILES) : %.o : %.h
      $(CC) $(CPPFLAGS) -c $(patsubst %.h,%.cpp,$&lt;) -o $@
  </code></pre>
  
  <p>BTW, in case you're wondering what LOCAL_INCLUDES looks like, the output for the 'all' recipe is the following:</p>
  
  <pre><code>$CPPFLAGS is [-g -v -Wall -I~/Projects/restaurant/cpp/src/concurrent -I~/Projects/restaurant/cpp/src/containers -I~/Projects/restaurant/cpp/src/data -I~/Projects/restaurant/cpp/src/loader -I~/Projects/restaurant/cpp/src/main -I~/Projects/restaurant/cpp/src/people -I~/Projects/restaurant/cpp/src/sim -I/usr/local/boost_1_72_0]
  Hello world
  </code></pre>
  
  <p>Sorry for the single line output, I am unaware of how to format in a more readable fashion. But as you can see, the directory <strong>data</strong>, which contains <code>Menu.h</code>, is being properly included. But for some reason, make is unable to find it. What could possibly be going wrong here?</p>
  
  <p>Let me know if you need more information.</p>
  
  <p>Cheers</p>