https://github.com/matveyt/dbdeps
GNU Make dependency database
https://github.com/matveyt/dbdeps
dependencies gmake make plugin
Last synced: over 1 year ago
JSON representation
GNU Make dependency database
- Host: GitHub
- URL: https://github.com/matveyt/dbdeps
- Owner: matveyt
- License: bsd-2-clause
- Created: 2019-03-10T14:39:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-27T18:51:44.000Z (over 7 years ago)
- Last Synced: 2025-01-29T22:17:57.370Z (over 1 year ago)
- Topics: dependencies, gmake, make, plugin
- Language: C
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
dbdeps
======
GNU Make dependency database plugin
-----------------------------------
This is a _GNU Make_ dependency database plugin inspired by a similar functionality in _Ninja_ (cf. `.ninja_deps`). It can reduce the startup time of the projects consisting of an extremely large number of source files by merging all `.d` files into a single database.
An example usage:
```
ifneq (,$(filter load,$(.FEATURES))) # load supported
DEPDIR := .deps # output directory
CPPFLAGS += -MMD -MP # compiler flags to generate dependencies
load dbdeps.dll # load plugin
$(dbdeps $(DEPDIR)) # read in all dependencies
all : $(DEPDIR)/data.mdb # mark database as a target for update
# the rules to update database from .d files
# note: double colon is needed for splitting a single rule into several ones
$(DEPDIR)/data.mdb :: $(objects1) ;@updbdeps --remove $(?:.o=.d) -d $(@D)
$(DEPDIR)/data.mdb :: $(objects2) ;@updbdeps --remove $(?:.o=.d) -d $(@D)
endif
```