3

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?

  • 1
    The Makefile (note the case) is usually in the same directory you run make in. – Bratchley Jun 4 '16 at 13:13
  • 1
    @Bratchley So does "makefile database" simply refer to the Makefile? – Utku Jun 4 '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 4 '16 at 13:16
  • 1
    Also "The information that tells make how to recompile a system comes from reading a data base called the makefile." – Bratchley Jun 4 '16 at 13:18
  • 2
    Possibly the "database" means the Makefile combined with the hardcoded built-in rules. – Wumpus Q. Wumbley Jun 4 '16 at 13:49
1

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

  • 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 '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 4 '16 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.