MAKEPPINFO(1) | Makepp | MAKEPPINFO(1) |
makeppinfo -- What makepp knows about files
?: -?, A: -A,
--args-file,
--arguments-file, D: -d,
--dates,
--decode-dates, F: -f,
--force, H: -h,
--help, K: -k,
--keylist,
--keys,
M: $MAKEPPINFOFLAGS,
Q: -q,
--quiet, T: -t,
--traverse, U: -u,
--unremembered, V: -V,
--version
makeppinfo option [file ...]
mppi option [file ...]
Makepp remembers detailed information about the files it scanned and/or built. For the built files it remembers everything that was relevant, which includes their dependencies. This information is stored in the .makepp subdirectory along the file it pertains to. It has the form of key-value pairs. In some cases the value will again be a list of associated pairs, typically the signature and the file.
If both "ENV_DEPS" and "ENV_VALS" get displayed, they are merged into a two column table.
If both "DEP_SIGS" and "SORTED_DEPS" get displayed, they are merged into a two column table (in this order which gives a better layout). Each dependency has a "SIGNATURE" which is only "timestamp,size", used only to check if the file must be rescanned. For dangling symlinks, instead of the linkee's signature, the link's own signature is determined in this way, and a 0 prepended to mark this special case. The interesting information is stored in some other key, for the built in signatures as follows:
These signature lists are the most frequent reason for rebuilding a file, so you might like to check, whether the signature stored for a dependency matches the current "BUILD_SIGNATURE" of that file. If the signatures and everything else matches, that is the basis for getting a file from (one of) your repositories or build cache if it is found there. The details depend on the applicable build check method.
You will encounter two kinds of signatures: simple ones consist of two comma separated numbers, which are the timestamp in file system format (seconds since 1970) and the size. For some files makepp will additionally have the relevant smart signature which is a base64 encoded (letters, digits, slash and plus) MD5 sum of the plain or digested file contents.
This command is partially a makepp debug tool. The list of keys varies depending on which scanner, build check and signature was used. To fully understand the output, you may need to look at the source code. That said, there is also some generally interesting information to be gotten.
Valid options are:
--keys='COMMAND CWD' # How was this built and where (relative to file).
If you want only filenames (useful with "-t|--traverse") select an inexistent key like "none".
Giving this option twice will also go to far away directories which are not output relatively, like /usr/include.
Each build check method documents how to see what they base their decision on. Finding the paths of the dependencies is the same in all cases, so it is shown here. If you build to a different directory, finding the path of the inputs requires a translation relative to CWD. E.g. either short or long form:
makeppinfo --keys='CWD SORTED_DEPS' obj/b.o mppi -k'CWD SORTED_DEPS' obj/b.o obj/b.o: CWD=../src SORTED_DEPS= b.c inc/b.h /usr/bin/gcc
CWD is the directory relative to file, from where it was built. That directory is the one from where all relative paths in SORTED_DEPS start. This means that under the same directory we have inputs src/b.c and src/inc/b.h and an output obj/b.o. From the viewpoint of b.o, the inputs are ../src/b.c and ../src/inc/b.h. It does not matter that we gave a relative path for b.o, the information shown would be the same, had we first changed to obj.
In some cases makepp may be repeatedly rebuilding a seemingly up to date file. If "makepplog" does not help here, this command gives you the exact state of affairs:
makeppinfo --traverse somefile mppi -t somefile
When this reproducibly happens, issue this command before and after, and compare the outputs. The things that differ are the reason of the rebuild.
Sometimes you will change your Makefiles and wonder if they still do the same thing. Here's a command that tells you exactly how makepp built somefile:
makeppinfo --traverse --traverse --keys='CWD COMMAND' somefile mppi -ttk'CWD SORTED_DEPS' somefile
This will recursively traverse over all dependencies of somefile and tell you in which directory it issued which command. By running this after the old and after the new build and comparing the outputs, you can see what changed.
The same works for testing a new version of makepp, though some older versions would handle whitespace in command continuation lines differently, and there was a bug in sort order, which can make the files come out in a different order. If this is the case for you, let the Shell assemble the sorted arguments:
makeppinfo --keys='CWD COMMAND' `makeppinfo --traverse --traverse --keys=none somefile|tr -d :|sort` mppi -k'CWD SORTED_DEPS' `mppi -ttknone somefile|tr -d :|sort`
Makeppinfo looks at the following environment variable:
Daniel Pfeiffer (occitan@esperanto.org)
2016-11-28 | perl v5.24.1 |