Skip to content

Commit 2fd2de8

Browse files
committed
Generate header dependency info for makefile
1 parent ddb36e0 commit 2fd2de8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# The binaries that we want to build
22
PGMS := bin/lists bin/section_data bin/toc_diff bin/list_issues bin/set_status
33
CXXFLAGS := -std=c++17 -Wall -g -O2 -D_GLIBCXX_ASSERTIONS
4+
CPPFLAGS := -MMD
45

56
# Running 'make debug' is equivalent to 'make DEBUG=1'
67
ifeq "$(MAKECMDGOALS)" "debug"
@@ -10,7 +11,7 @@ endif
1011
# Running 'make DEBUG=blah' rebuilds all binaries with debug settings
1112
ifdef DEBUG
1213
debug: pgms
13-
CPPFLAGS := -DDEBUG_SUPPORT -D_GLIBCXX_DEBUG
14+
CPPFLAGS += -DDEBUG_SUPPORT -D_GLIBCXX_DEBUG
1415
CXXFLAGS += -O0
1516
ifdef LOGGING
1617
CPPFLAGS += -DDEBUG_LOGGING
@@ -32,6 +33,8 @@ all: pgms
3233

3334
pgms: $(PGMS)
3435

36+
-include src/*.d
37+
3538
bin/lists: src/date.o src/issues.o src/status.o src/sections.o src/mailing_info.o src/report_generator.o src/lists.o src/metadata.o
3639

3740
bin/section_data: src/section_data.o
@@ -46,7 +49,7 @@ $(PGMS):
4649
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
4750

4851
clean:
49-
rm -f $(PGMS) src/*.o
52+
rm -f $(PGMS) src/*.o src/*.d
5053

5154
# Remove everything.
5255
# Caution: Regenerating meta-data/dates will take about 30 minutes.

0 commit comments

Comments
 (0)