redblobgames / helloworld-sdl2-opengl-emscripten

Basic program that uses SDL2+OpenGL, compiling both locally and via emscripten

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Makefile breaks when a header file is removed

redblobgames opened this issue · comments

To reproduce:

  1. touch dummy.h
  2. Add to font.h: #include "dummy.h"
  3. Run make. This should work fine.
  4. rm touch.h
  5. Remove the #include from font.h
  6. Run make.

Expected behavior: make runs, and updates the build/*.d files to no longer reference dummy.h.

Actual behavior: make fails with an error message, and doesn't update build/*.d. The only way out of this situation is to run make clean and start again.

*** No rule to make target `dummy.h', needed by `build/main.o'.  Stop.