
makepp_release_notes -- Major changes in each version of makepp

The items are roughly ordered by increasing age, so you need to read only the first parts if you've been using snapshots newer than 1.40.
override keyword if you want that.
There are new signature methods xml and xml-space.
The c_compilation_md5 signature can now also be invoked as C (because signatures pertain to files,
not actions).
It (and its subclasses) can now easily be extended to other suffixes as in C.ipp,tpp meaning that besides the built in suffixes it will also apply to files ending in .ipp or .tpp.
Thanks to this makeppreplay and embedded SQL/C now works more reliably.
Beware: this is not understood by older versions.
So don't call an older mpp on things built with this version,
which includes from a repository you built in.global can precede the build_cache,
build_check and signature statements and the define statement which now also allows export.
Therefore s_ subs now get a 4th parameter,
a hash reference with the encountered keywords as keys.include : or include = are now statements (no space: still rule or assignment.) This means that perl { qualified::name } no longer mysteriously dissapears (it used to be a useless rule.) Now variable names may contain whitespace.
This means that &preprocess --assignment will treat just about any equal sign as an assignment (replace them with $E from the funny assignment E==.)VPATH variable and vpath statement are now emulated.sub f_...) may now get their 1st parameter as a string reference.
In that case you are responsible for expanding your arguments.
Use the accessor functions &arg or args described in makepp extensions.
Until you get round to updating your functions,
you can turn this off by setting $Mpp::Makefile::legacy_functions = 1 either in your makefile (one per build system is enough,
as it's a perl variable) or patch it into your new makepp installation.
If you want your updated functions to work with both your old and this new makepp,
use ref $_[0] ?
&arg : $_[0] or ref $_[0] ?
args(...) : $_[0] in the transition phase.
Within $(call),
the special variables $0,
$1,
...,
$(11),
... are now expanded like any other make variable.
This causes slight differences to the previous work around.
The result is closer to gmake,
at least if makepp_simple_concatenation=1 is set.
esql_compilation for embedded SQL C,
now covers all databeses.
You must supply the rules,
however.New option --stop-after-loading gives makepp a headstart while you're still editing.
New options --rm-stale, --sandbox and --dont-read, for sandbox control when running multiple concurrent (possibly distributed) makepp commands.
Makepp will now also look for options in files called .makepprc. The option --args-file is now consistently available on all commands.
The environment variable MAKEPP_CASE_SENSITIVE_FILENAMES supercedes the options --case-sensitive-filenames and --no-case-sensitive-filenames.
Removed --keep-repository-links option,
the behaviour of which is now the default.
All utilities now also query an environment variable for presetting options.
Each one is called like the utility in upper case,
with FLAGS added,
e.g.
$MAKEPPCLEANFLAGS or $MAKEPPLOGFLAGS.
Short command line options may now be grouped in the Unix way,
so -k -j 4 may be given as -kj4.
In all long options the dash between words may now consistently be omitted or replaced with an underscore,
so that --no-log can be --nolog or --no_log.
Unknown options now cause an error.
makeppclean -l meant --leave-src-info,
but now the options have been extended and this one changed to -k|--keep-src-info.For advanced users: The new interface consists of the register_parser or register_command_parser statements,
the :parser rule option and the p_* parser factory functions which get aliased to their parser class as factory.
The misnamed register_scanner statement,
:scanner rule option and :scanner_* or :parser_* functions are deprecated.
Mpp:: so as to abide by CPAN rules,
and to avoid potential collision with any module you might load into your makefiles.
This is transparent to casual users of makepp.
In case you did Perl programming for your makefiles,
and you made use of some internals this would break your build.
Therefore there is a temporary backward compatibility feature,
to be removed in the future,
which you can activate during installation.
The new environment variable $MAKEPP_INSTALL_OLD_MODULES is checked for a list of old modules you want created as wrappers around the new ones.
Additionally if you have makefiles you can't quickly change,
which rely on these things being available without a use statement,
you must prefix those modules with a +,
to get them preloaded:
MAKEPP_INSTALL_OLD_MODULES='+Glob Rule +MakeEvent'
-j (parallel builds) for Cygwin and MinGW and smart recursive builds on Cygwin.--norc-substitution and --percent-subdirs and $(rc_substitution) and percent_subdirs. They are now to be given anywhere from target specific assignment to command line or environment vars makepp_simple_concatenation and makepp_percent_subdirs.&perl_function 'arg 1' arg2 ... and &external-perl-script 'arg 1' arg2 ... New Perl function run.
There are the following builtin commands: &chmod, &cp, &cut, &echo, &expr, &grep, &install, &ln, &mkdir, &mv, &perl, &preprocess, &printf, &rm, &sed, &sort, &template, &touch, &uninstall, &uniq and &yes, which can replace Unix commands of the same name, and more or less also the following: awk, chgrp, chown, head, m4, rmdir, tail and tr. They are also available stand-alone from the Shell. They can also be used as functions, e.g. $(&cat file), or as statements, or standalone.
Note that, unlike earlier CVS versions, &cut -f, &grep -v and &sort -r now behave as in Unix. Note that in earlier CVS versions of &template @@ was processed before @, but now lines are consistently handled front to back.
global statement for sharing variables accross makefiles. The assignment variant of export now works like a normal assignmant, so you may have to change to :=. Added the override modifier to assignments. The define var := statement now optionally allows specifying the kind of assignment. And the forms with immediate evaluation retain the newlines in $(shell ...) or $(&command). There are new assignment operators &= for prepending, and ;= which is a = when set, but automatically turns into a := when first used.Makeppfile.mk.RootMakeppfile or equivalently RootMakeppfile.mk. The presence of either of these gives your build tree a formal root, accesible through the new variable $(ROOT). The advantage is that this file is always loaded first, if present, allowing you to more easily create a build system where makepp can be called from anywhere, without telling it which makefile to start at.
The root of the file system is then automatically marked for --dont-build, so that makepp doesn't go messing into other directories you include or use libs from, just because they happen to have a Makefile or sources.
Usually this means that the root of your build system gets marked for --do-build. If, however, you say --do-build for something under your build system root, which doesn't inherit --dont-build, then instead your build system root gets marked for --dont-build.
makeppclient since we never managed to let builds start significantly faster. The option --stop-after-loading is more beneficial.-I$( $(DIRLIST)) will leave no lonely option when DIRLIST is empty.$((perl if( $a < 5 ) { ... })).c_compilation_md5 signature, which also allows adding whitespace where there was none and inversely. It also ignores whitespace and comments after the last token. This is useful for preventing a useless rebuild if your VC adds lines at a $Log$ tag when checking in.$? exactly as GNU make does. New long name $(changed_inputs) for it.$(error ...) and $(warning ...) as in GNU make.: build_check ignore_action to ignore changes to the action string.ifperl, ifmakeperl, iftrue, ifntrue, ifsys and ifnsys.ifxxx may now be grouped with and and or. When written on the same line after else, they create a branch of the same statement, rather than requiring nesting.:env rule option.makeppclean that efficiently removes generated files without loading makefiles.Thanks to Anders Johnson and Daniel Pfeiffer for major contributions of code to this release.
makeppclient that lets builds start faster. (Daniel Pfeiffer)define statement to define multi-line variable values.--keep-repository-links option to prevent makepp from deleting all the soft links it creates when making repositories.--assume-old, --assume-new, and --dont-build options, and support for the -n option.perl { ... } or makeperl { ... }. Added functions for evaluating Perl statements $(perl ... ) or $(makeperl ... ). Added statement makesub { ... }. (Daniel Pfeiffer)Special thanks to Matthew Lovell and Chris van Engelen for lots of suggestions and tracking down problems in the code.
$(origin ) function from GNU make is now supported.$(find_upwards ) and $(relative_filename ) (contributed by Matthew Lovell) and $(relative_to ).-I dir and -L dir are now supported and work just like -Idir and -Ldir.$(shell ) which caused it to return a null string occasionally (especially when the system was heavily loaded) was fixed.The most important change was support for the Cygwin build environment. You can now run makepp with the Cygwin version of perl; I do not think it will work properly with the native windows version of perl yet.
A few other bug fixes went into this release.
The most important change in this version is that makepp can accept a vastly larger number of makefiles without any command line options because of some changes to the implementation of recursive make. There are a few minor improvements in the GNU make compatibility, and a slight improvement in memory usage.
There are several user visible changes:
c_compilation_md5 is now the default signature method. This means that by default, makepp won't recompile C/C++ modules if only whitespace or comments have changed.md5 has been added, which runs an MD5 checksum on the file's contents. This is not enabled by default; makepp still uses its original method (exact_match) for any files other than C/C++ source files.Because of these changes, makepp will recompile everything the first time you run it.
In addition to bug-fixes, this version has one user-visible change. The --norc-substitution command line option was introduced to allow compatible handling of whitespace in makefiles.
In addition to numerous bug fixes, this version has several user-visible changes:
--traditional-recursive-make option can be used for legacy makefiles which use recursive invocations of make in a way that didn't work with makepp's default implementation.load_makefile statement and with recursive make.This version has several user-visible changes:
$(if ) function.% wildcard now matches only files within a directory; %.c is now equivalent to *.c, not **/*.c. The reason for this change was that rules almost never need to use the more complicated wildcard, and it often caused unnecessary directories to be searched. You can get the old behavior by specifying --percent-subdirs on the command line. (I'm curious how people feel about this change. Please let me know if you have good reasons for it being one way or the other.)load_makefile statements at all. If this causes you problems, you can turn off implicit loading of makefiles by adding --no-implicit-load to the command line. (I'm curious whether people like or dislike implicit loading of makefiles.)$(phony ) function, like this:
$(phony all): program_1 program_2
The $(phony ) function simply returns its arguments, but marks them as phony targets. You can still use the older syntax that looks like this:
all: program_1 program_2
.PHONY: all
The $(phony ) function is an attempt to improve the readability of makefiles. I'd welcome other suggestions, as I'm still not entirely happy with the syntax.
In order to support features like parallel make, most of the internals had to be reorganized or rewritten. The result is much cleaner and hopefully more reliable.
Bugs too numerous to mention have been fixed. In order to help ensure reliability, a test suite has been developed. It doesn't test absolutely everything yet, but it does test most things, and I hope to make it more extensive in the future. You can run it by typing makepp test in the makepp distribution directory. If an unmodified makepp fails the test suite, please let me know so I can fix it.
There are many new features:
-j option.sub statement and makepp_extending for details..makepp_log explaining why it rebuilt everything. This is extremely useful for debugging.-k option for continuing to build even when an error occurs is now supported.There are also (unfortunately) a few incompatibilities with previous versions:
-F switch is now unnecessary (and no longer documented).$(INFERRED_OBJS) is no longer supported (since it was not a well-designed interface anyway). Use the newer $(infer_objects) function instead.$_ is no longer supported. Use $(foreach) instead.-s, -n, and -q are no longer supported due to internal architecture changes. -n will probably be supported again in future releases.$(only_targets).