title: How can I force make to exit if compiling one dependency fails?
body: <p>I've posted the relevant bits of my makefile. When I run <code>make all</code> on this makefile, there's a compilation error when compiling <code>debugosd.o</code>. However, because make found a previously built <code>debugosd.o</code>, it just continues on to build <code>dialup.otz</code>. </p>
  
  <p>Without deleting all the .o's, how can I force <code>debugosd.o</code> to become out-of-date - and so force <code>make</code> to stop as soon as it hits the compilation error in <code>debugosd.o</code>? </p>
  
  <p>The rule to build .o files is:</p>
  
  <pre><code>%.o: %.c
      $(TITLE)
      $(CC) $(COMPILE) $(C_OPTIONS) -c $&lt;
  </code></pre>
  
  <p>And the makefile snippet is:</p>
  
  <pre><code>all: shared0.flw shared1.flw shared2.flw shared3.flw
  
  debugosd.o: debugosd.c debugosd.h
  xdialler_interface_new.o: xdialler_interface.h
  dialup.ooo: xdialler_interface_new.o debugosd.o xDialler.a
      $(TITLE)
      $(MAKE_OOO)
  
  dialup.otz: dialup.ooo  
      $(BIN)opress $&lt; 
  
  shared1.dir: dialup.otz 
      $(TITLE)
      $(BIN)dirbuild $(SHAREDDIR1_OPTIONS)
  
  shared1.flw: shared1.dir 
      $(TITLE)
      $(BIN)flwbuild $(SHAREDFLW_OPTIONS1)
  </code></pre>
  
  <p>Actually, I figured out what the problem was. I was forcing the rebuild of <code>shared1.flw</code> using a phony target. I think this was then forcing <code>make</code> to continue regardless of errors.</p>