BUILD/MEDIUM: rebuild everything when an include file is changed
authorWilly Tarreau <w@1wt.eu>
Mon, 30 May 2016 11:39:32 +0000 (13:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 Jun 2016 12:45:44 +0000 (14:45 +0200)
commitb26835db3b46def3aee2dc6f25ea4f3195122571
tree96e55ef91e95c631b974565b4e111783846588d7
parent6fc340ff07171bb85d11d835fa4158bbdef240a0
BUILD/MEDIUM: rebuild everything when an include file is changed

Some users tend to get caught by incorrect builds when they try patches
that modify some include file after they forget to run "make clean".
While we can't blame users who are not developers, forcing developers
to rely on a painful autodepend is not nice either and will cause them
to test their changes less often. Here we propose a reasonable tradeoff.
This patch introduces a new "INCLUDES" variable which enumerates all
the ".h" files and sets them as a build dependency for all ".o" files.
This list is then copied into a "DEP" variable which can safely be
overridden if desired. This way by default all .c files are rebuilt if
any include file changes. This is the safe method for all users. And
developers can simply add "DEP=" to their quick build scripts to keep
the old fast and efficient behaviour.
Makefile