.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "MAKEPPREPLAY 1" .TH MAKEPPREPLAY 1 "2014-09-11" "perl v5.20.0" "Makepp" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" makeppreplay \-\- Fast repeater of selected makepp actions .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fB?:\fR\ \-?,\ \&\fBA:\fR\ \-A, \-\-args\-file, \-\-arguments\-file,\ \&\fBC:\fR\ \-C, \-c,\ \&\fBD:\fR\ \-\-directory, \-\-dry\-run,\ \&\fBH:\fR\ \-h, \-\-help,\ \&\fBI:\fR\ \-I, \-\-include, \-\-include\-dir,\ \&\fBJ:\fR\ \-\-just\-print,\ \&\fBK:\fR\ \-k, \-\-keep\-going,\ \&\fBL:\fR\ \-\-log, \-\-log\-file,\ \&\fBM:\fR\ \-M, \f(CW$MAKEPPREPLAYFLAGS\fR, \-\-module,\ \&\fBN:\fR\ \-n, \-\-no\-log, \-\-no\-print\-directory, \-\-no\-warn,\ \&\fBP:\fR\ \-\-profile,\ \&\fBR:\fR\ \-\-recon, \-\-root\-dir, \-\-root\-directory,\ \&\fBS:\fR\ \-s, \-\-sed,\ \&\fBT:\fR\ \-t, \-\-temporary,\ \&\fBV:\fR\ \-V, \-\-version .PP \&\fBmakeppreplay\fR [\ \fIoption\fR\ ...\ ] [\ \fIVAR=value\fR\ ] [\ \fItarget\fR\ ...\ ] .PP \&\fBmppr\fR [\ \fIoption\fR\ ...\ ] [\ \fIVAR=value\fR\ ] [\ \fItarget\fR\ ...\ ] .PP Makeppreplay tries to do the same things makepp did. It does this solely based on the remembered build info, saving much time by not reading makefiles, not parsing commands, not scanning files and not looking at every repository file, to see whether it fits. But unlike makepp it reuses all repository links it finds. .PP It does not know about phony or default targets, so you have to give it real files or directories, as a shortcut for all files makepp has built therein. By default it builds all files makepp built in the current or chosen directory. .PP This approach is only correct when there are no structural changes, i.e. no different modules to be linked, no moved files, no different \f(CW\*(C`#include\*(C'\fR statements, which should possibly have caused those files to be (re)built. After updating from version control, or when building against a repository, where others may have caused such changes, you should call makepp once after potential changes (e.g. in the morning after an overnight repository update), to be sure your build infos are up to date. .PP Not reading makefiles means, it will not know any subs (Perl functions) defined in them. For this you should put all your functions into an external module. It will also not know about any variable settings, which is only a problem if your Perl code accesses them (because in rule actions they have already been expanded). .SH "TODO" .IX Header "TODO" This is still experimental and imperfect. .IP "\(bu" 4 Build up a complete dependency tree starting from the given targets and decide which of them to build based on their build check methods. That requires the method to be remembered in the build info. .IP "\(bu" 4 After implementing the previous bullet item, accept more makepp opts, like \f(CW\*(C`\-j\*(C'\fR or \f(CW\*(C`\-\-dont\-build\*(C'\fR. .IP "\(bu" 4 Allow build cache with implicit \f(CW\*(C`\-\-no\-populate\-bc\*(C'\fR (because makeppreplay doesn't guarantee a correct build). Makepp might later publish to the build cache anything it retains. .IP "\(bu" 4 Have makepp remember build info for all failed commands and for those it didn't attempt because their dependencies failed. This is only partially possible, because dependencies may only be found out after building the files that require them. What should happen with (a has no build info): .Sp .Vb 3 \& a: b \& b: c \& cmd_producing_a_and_b .Ve .SH "OPTIONS" .IX Header "OPTIONS" Options include some of the makepp options, plus two new ones, for loading modules that would normally be loaded from a makefile. .IP "\-A \fIfilename\fR" 4 .IX Item "-A filename" .PD 0 .IP "\-\-args\-file=\fIfilename\fR" 4 .IX Item "--args-file=filename" .IP "\-\-arguments\-file=\fIfilename\fR" 4 .IX Item "--arguments-file=filename" .PD Read the file and parse it as possibly quoted whitespace\- and/or newline-separated options. .IP "\-C \fIdirectory\fR" 4 .IX Item "-C directory" .PD 0 .IP "\-\-directory=\fIdirectory\fR" 4 .IX Item "--directory=directory" .PD Cd to the given directory before loading the makefile and trying to build the targets. This is more or less equivalent to specifying a directory with \&\f(CW\*(C`\-F\*(C'\fR, except that subsequent \f(CW\*(C`\-C\*(C'\fR, \f(CW\*(C`\-f\*(C'\fR, \f(CW\*(C`\-F\*(C'\fR, \f(CW\*(C`\-I\*(C'\fR and \f(CW\*(C`\-R\*(C'\fR options are interpreted relative to the new directory, rather than the old one. .IP "\-c" 4 .IX Item "-c" .PD 0 .IP "\-\-root\-dir" 4 .IX Item "--root-dir" .IP "\-\-root\-directory" 4 .IX Item "--root-directory" .PD Cd up to the directory containing a RootMakeppfile. .IP "\-I \fIdirectory\fR" 4 .IX Item "-I directory" .PD 0 .IP "\-\-include=\fIdirectory\fR" 4 .IX Item "--include=directory" .IP "\-\-include\-dir=\fIdirectory\fR" 4 .IX Item "--include-dir=directory" .PD Add \fIdirectory\fR to Perl load path \f(CW@INC\fR. .IP "\-?" 4 .PD 0 .IP "\-h" 4 .IX Item "-h" .IP "\-\-help" 4 .IX Item "--help" .PD Print out a brief summary of the options. .IP "\-k" 4 .IX Item "-k" .PD 0 .IP "\-\-keep\-going" 4 .IX Item "--keep-going" .PD Build as many files as possible, even if some of them have errors. By default, makepp stops when it encounters the first error, even if there are other files that need to be built that don't depend on the erroneous file. .IP "\-\-log=\fIlogfilename\fR" 4 .IX Item "--log=logfilename" .PD 0 .IP "\-\-log\-file=\fIlogfilename\fR" 4 .IX Item "--log-file=logfilename" .PD Changes the name of the log file to the indicated name. By default, the log file is called \fI.makepp/log\fR. This file is readable with makepplog, mppl. .IP "\-M \fImodule[=arg,...]\fR" 4 .IX Item "-M module[=arg,...]" .PD 0 .IP "\-\-module=\fImodule[=arg,...]\fR" 4 .IX Item "--module=module[=arg,...]" .PD Load module and import any functions it exports. .IP "\-n" 4 .IX Item "-n" .PD 0 .IP "\-\-dry\-run" 4 .IX Item "--dry-run" .IP "\-\-just\-print" 4 .IX Item "--just-print" .IP "\-\-recon" 4 .IX Item "--recon" .PD Print out commands without actually executing them. .IP "\-\-no\-log" 4 .IX Item "--no-log" Don't bother writing a detailed description of what was done to the log file. .IP "\-\-no\-print\-directory" 4 .IX Item "--no-print-directory" Turn off the entering or leaving directory messages. .IP "\-\-profile" 4 .IX Item "--profile" Output raw timestamps before and after each action. .IP "\-s \fIperl-expression\fR" 4 .IX Item "-s perl-expression" .PD 0 .IP "\-\-sed=\fIperl-expression\fR" 4 .IX Item "--sed=perl-expression" .PD Run the perl expression against the command before running it, like for preprocessor \f(CW\*(C`\-s \*(Aqs/ \-c / \-E /; s/\e.o\eb/.i/g\*(Aq\*(C'\fR. This would transform a compilation command (\f(CW\*(C`\-c\*(C'\fR) into a preprocessor (\f(CW\*(C`\-E\*(C'\fR) invocation, changing the \fI.o\fR suffix to \fI.i\fR, which is a conventional suffix for preprocessed C. Or you might want to add some debug output to your linker. If you have only one command in the rule, you can do this by substituting it into the first space: \f(CW\*(C`\-s \*(Aqs/ / \-Wl,\-t /\*(Aq\*(C'\fR. .Sp When the command is altered, nothing is remembered about this, i.e. makepp will think you have manually modified the file, causing a rebuild. .Sp Note that (unlike makepp) makeppreplay does not parse the command, so it won't notice that the target filename was changed. So you must still request the \&\fI.o\fR target, even though a \fI.i\fR will be built. And makeppclean won't know to remove it. .IP "\-t" 4 .IX Item "-t" .PD 0 .IP "\-\-temporary" 4 .IX Item "--temporary" .PD Makeppreplay modifies the build info of all files it touched and of all dependencies it found modified. It marks them in such a way that makepp nevertheless knows that it needs to rescan these files. But with this option you can prevent these modifications, so that makepp will simply consider all files makeppreplay created as incorrect. .IP "\-V" 4 .IX Item "-V" .PD 0 .IP "\-\-version" 4 .IX Item "--version" .PD Print out the version number. .IP "\-\-no\-warn" 4 .IX Item "--no-warn" Don't print any warning messages. .SH "EXAMPLES" .IX Header "EXAMPLES" Probably the most common use is relinking either a program or a library after editing a source file: .PP .Vb 2 \& makeppreplay subdir/foo.o bin/bar \& mppr subdir/foo.o lib/libbar.so .Ve .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" Makeppreplay looks at the following environment variable: .ie n .IP "$MAKEPPREPLAYFLAGS" 4 .el .IP "\f(CW$MAKEPPREPLAYFLAGS\fR" 4 .IX Item "$MAKEPPREPLAYFLAGS" Any options you may want to always pass. .SH "AUTHOR" .IX Header "AUTHOR" Daniel Pfeiffer (occitan@esperanto.org)