GNU make - "file has not been updated" but it definitely has

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

GNU make - "file has not been updated" but it definitely has

Adrian Muresan
I'm building my `make` project using `--print-data-base` and then parsing the output database for use in another step.

The database contains ALL targets defined in the makefile even if one or more were not built.

Thankfully, in the database section of `make` output, whether a given target was built or not is denoted by this line:

    #  File has not been updated.


    #  File has been updated.

or so I thought . . .

Now, I've come up against a target that absolutely was built but its database entry says `File has not been updated`.<br/>
**Is it because the target is a directory?**

Database entry:

    #  Implicit rule search has not been done.
    #  Modification time never checked.
    #  File has not been updated.
    #  recipe to execute (from 'C:/Users/mureadr/Desktop/A/HMI_FORGF/src/../../HMI/cfg/', line 92):
    -mkdir -p $(@)

Makefile entry:

    # Building necessary directories
    build_dirs: $(BUILD_DIRS)

    -mkdir -p $(@)

`make` output:

              Considering target file 'C:/Users/mureadr/Desktop/A/HMI_FORGF/src/../bin/armle-v7/release/'.
               File 'C:/Users/mureadr/Desktop/A/HMI_FORGF/src/../bin/armle-v7/release/' does not exist.
               Finished prerequisites of target file 'C:/Users/mureadr/Desktop/A/HMI_FORGF/src/../bin/armle-v7/release/'.
              Must remake target 'C:/Users/mureadr/Desktop/A/HMI_FORGF/src/../bin/armle-v7/release/'.
    C:/Users/mureadr/Desktop/A/HMI_FORGF/src/../../HMI/cfg/ target 'C:/Users/mureadr/Desktop/A/HMI_FORGF/src/../bin/armle-v7/release/' does not exist
    mkdir -p C:/Users/mureadr/Desktop/A/HMI_FORGF/src/../bin/armle-v7/release/
              Successfully remade target file 'C:/Users/mureadr/Desktop/A/HMI_FORGF/src/../bin/armle-v7/release/'.

So obviously it's being built!

Why does its database entry say "file has **not** been updated?<br/>
Is there a special case for directories?<br/>
If so, are there any other special cases, with respect to "file has (not)? been updated" that I need to know about?<br/>
If directories are a special case, why were they made special?

Help-make mailing list
[hidden email]