7

I don't know why Google searches aren't showing anything. From documentation:

The make program uses the makefile data base and the last-modification times of the files to decide which of the files need to be updated.

So, where is this database located? Or am I missing something?

9
  • 1
    The Makefile (note the case) is usually in the same directory you run make in.
    – Bratchley
    Jun 4, 2016 at 13:13
  • 1
    @Bratchley So does "makefile database" simply refer to the Makefile?
    – Utku
    Jun 4, 2016 at 13:14
  • 2
    Also "The information that tells make how to recompile a system comes from reading a data base called the makefile."
    – Bratchley
    Jun 4, 2016 at 13:18
  • 3
    Possibly the "database" means the Makefile combined with the hardcoded built-in rules.
    – user41515
    Jun 4, 2016 at 13:49
  • 1
    @WumpusQ.Wumbley I think they're just referring to "database" in the sense that it's structured data capable of having fields extracted from it. In the most basic sense, that's what a database is. Still weird to phrase it that way.
    – Bratchley
    Jun 4, 2016 at 15:49

1 Answer 1

2

The "data base" referred to is the set of rules (or "recipes"). The documentation says this:

For each of those files, it issues the recipes recorded in the data base.

While these are normally compiled-in (embedded) in GNU make, it is common to provide these rules also (or, instead) as a separate text file. GNU make has a command-line option --print-data-base to show the rules in effect. POSIX make defines a set of standard rules; most implementations extend those rules.

For example, some systems use the (finally...) standardized "include" feature to incorporate extra rules beyond the user-supplied makefile. The GNU documentation considers your makefile to also be part of the make database (whether that is a prevalent interpretation is debatable: POSIX does not use that terminology).

2
  • 1
    I would not say that rules are "normally compiled-in (embedded) in GNU make". While there are indeed some built-in basic rules (e.g. how to build a simple %.o with no other dependencies from its %.c), most projects using make definitely depend on project-specified rules.
    – Celada
    Jun 4, 2016 at 17:31
  • There's three cases (user-supplied text files, system-supplied text files and system-supplied compiled-in). Whether you consider the user-supplied files to be part of the make database, depends on whether you're using a regular build system, or not. Jun 4, 2016 at 17:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .