Skip to content

Commit

Permalink
buildsys: compute DEPDIRS dynamically
Browse files Browse the repository at this point in the history
... instead of hardcoding it
  • Loading branch information
fingolfin authored and markuspf committed Feb 17, 2018
1 parent 0be7c3d commit b6d4e8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,10 @@ endif
# Name of subdirectories in which the generated dependencies are stored.
DEPDIRNAME := .deps

# List of all dependency directories. For now, we hardcode this list.
# TODO: derive this from the value of the SOURCES variable, so that
# adding new src/ subdirectories works
DEPDIRS = $(addsuffix /$(DEPDIRNAME),obj obj/hpc gen gen/hpc)
# List of all (potential) dependency directories, derived from OBJS
# and SOURCES (the latter for generated sources, which may also involve
# dependency tracking)
DEPDIRS = $(addsuffix $(DEPDIRNAME),$(sort $(dir $(SOURCES) $(OBJS))))

# Include the dependency tracking files.
-include $(wildcard $(addsuffix /*.d,$(DEPDIRS)))
Expand Down

0 comments on commit b6d4e8e

Please sign in to comment.