BUILD/MEDIUM: force a full rebuild if some build options change
authorWilly Tarreau <w@1wt.eu>
Mon, 30 May 2016 13:16:10 +0000 (15:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 Jun 2016 12:45:44 +0000 (14:45 +0200)
commit8225bb45779e4cc1bc64169d3a1ab2ff3d2b6af8
tree3459bddd8965d28a7eb66c8ee4484572a3591876
parentb26835db3b46def3aee2dc6f25ea4f3195122571
BUILD/MEDIUM: force a full rebuild if some build options change

We now instrument the makefile to keep a copy of previous build options.
The goal is to ensure that we'll rebuild everything when build options
change. The options that are watched are TARGET, VERBOSE_CFLAGS, and
BUILD_OPTIONS. These ones are copied into a file ".build_opts" and
compared to the new ones upon each build. This file is referenced in
the DEP variable which all .o files depend on, and it depends on the
code which updates it only upon changes. This ensures that a new file
is regenerated and detected upon change and that everything is rebuilt.
Makefile