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?

Utku
  • 1,433
  • 1
    The Makefile (note the case) is usually in the same directory you run make in. – Bratchley Jun 04 '16 at 13:13
  • 1
    @Bratchley So does "makefile database" simply refer to the Makefile? – Utku Jun 04 '16 at 13:14
  • Yeah it would appear so. Kind of an unusual way of referring to it (although I guess technically correct) but reading the text the Makefile appears to be what they're describing. – Bratchley Jun 04 '16 at 13:16
  • 2
    Also "The information that tells make how to recompile a system comes from reading a data base called the makefile." – Bratchley Jun 04 '16 at 13:18
  • @Bratchley Would you like to put that in an answer? – Utku Jun 04 '16 at 13:19
  • 3
    Possibly the "database" means the Makefile combined with the hardcoded built-in rules. –  Jun 04 '16 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 04 '16 at 15:49
  • posting an answer probably isn't necessary, since this was a little too simple. All I did was read the text in your answer and then the text in the page you linked. You can post an answer and accept it if you want since you located the information. – Bratchley Jun 04 '16 at 15:50
  • From the GNU make manual: "The information that tells make how to recompile a system comes from reading a data base called the makefile." – Miscreant Sep 30 '18 at 15:01

1 Answers1

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).

Thomas Dickey
  • 76,765
  • 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 04 '16 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. – Thomas Dickey Jun 04 '16 at 17:34