=head1 NAME

makepp_release_notes -- Major changes in each version of makepp

=for vc $Id: makepp_release_notes.pod,v 1.88 2014/08/03 21:10:36 pfeiffer Exp $

=head1 DESCRIPTION

=head2 Version 2.1 (under development)

=over 4

=item *

Warning and error messages switched to GNU style.

=item *

=item *

Pattern rules can pick up phony dependencies (gmake compatibility), rule option :no-phony prevents that.

=item *

Builtin L<&template|makepp_builtins/template_option_macro_definition_filename>
mini-language documentation rewritten.  It now has an
C<@include(I<filename>)@> macro.

=item *

C Scanner now takes into account compiler specific path variables like
C<C_INCLUDE_PATH> or C<LIB>.

=item *

Parens now nest as in GNU make or Shell: C<$(name ...()...)>

=item *

New environment variable C<MAKEPP_DEBUG>.

=item *

Installation defaults for html-doc and man have changed slightly.

=item *

The new option C<--loop> is the successor to C<--stop-after-loading>, which it
enhances to get the head start for every edit compile cycle in an endless
loop.

=item *

The C<include> statements and the functions C<find-first-upwards> and
C<find-upwards> will no longer search higher than a F<RootMakeppfile>, if one
is present.

=item *

The gmake style of putting the rule to make an include file after the include
statement is not recommended, but now supported.  Thus the option
C<--defer-include> has been removed.

=item *

All pre-2.0 features which issued deprecated-warnings are eliminated, as are
C<$Mpp::Makefile::legacy_functions> and C<$MAKEPP_INSTALL_OLD_MODULES>.

=item *

You can use the new L<makeppinfo, mppi|makeppinfo> option C<--unremembered> to
spot no longer needed files.

=item *

You can use the new L<makeppreplay, mppr|makeppreplay> option C<--sed> to
replay a command differently, e.g. to stop after preprocessing or to add
debugging options to the linker.

=item *

There was an undocumented (and slightly buggy) feature whereby making
F<.makepp/log> unwritable would suppress logging.  Now instead it falls back
to C<--verbose>, so you must pass C<--no-log> if you want that.  This option
and a few others were also already available for L<makeppreplay,
mppr|makeppreplay>, but not documented.

=item *

At least Perl 5.8 is required.

=back



=head2 Version 2.0 (March 2012)

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.

=over 4

=item *

The signature statement no longer overrides the method found by command
parsers -- now you must provide the C<override> keyword if you want that.
There are new signature methods C<xml> and C<xml-space>.  The
C<c_compilation_md5> signature can now also be invoked as C<C> (because
signatures pertain to files, not actions).  It (and its subclasses) can now
easily be extended to other suffixes as in C<C.ipp,tpp> meaning that besides
the built in suffixes it will also apply to files ending in F<.ipp> or
F<.tpp>.  Thanks to this makeppreplay and embedded SQL/C now works more
reliably.  B<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.>

=item *

The keyword C<global> can precede the C<build_cache>, C<build_check> and
C<signature> statements and the C<define> statement which now also allows
C<export>.  Therefore s_ subs now get a 4th parameter, a hash reference with
the encountered keywords as keys.

=item *

Makefiles are now parsed with the same priority as in gmake.  Hence C<include
:> or C<include => are now statements (no space: still rule or assignment.)  This
means that C<perl { qualified::name }> no longer mysteriously disapears (it
used to be a useless rule.)  Now variable names may contain whitespace.  This
means that C<&preprocess --assignment> will treat just about any equal sign as
an assignment (replace them with C<$E> from the funny assignment C<E==>.)

=item *

If you have a federated build cache over several disks, and some of them are
preferred, you must edit their build_cache_options.pl and change PREFERRED to
xPREFERRED.  (This reflects a general change in names where we now prefix by
'x' all xATTRIBUTES which are are true iff they exist).

=item *

The C<VPATH> variable and C<vpath> statement are now emulated.

=item *

Makefile functions (C<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 C<&arg> or C<args> described in L<makepp
extensions|makepp_extending>.  Until you get round to updating your functions,
you can turn this off by setting C<$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 C<ref
$_[0] ? &arg : $_[0]> or C<ref $_[0] ? args(...) : $_[0]> in the transition
phase.

Within C<$(call)>, the special variables C<$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
C<makepp_simple_concatenation=1> is set.

=item *

CMake generated makefiles no longer lead to deep recursion.

=item *

New scanner C<esql_compilation> for embedded SQL C, now covers all databases.
You must supply the rules, however.

=item *

New option L<--hybrid-recursive-make|makepp_command/hybrid> (follow each
option link, to see shorter forms) as a smarter alternative to
L<--traditional-recursive-make|makepp_command/traditional>.

New option L<--stop-after-loading|makepp_command/stop> gives makepp a
headstart while you're still editing.

New options L<--rm-stale|makepp_command/rm_stale>,
L<--sandbox|makepp_command/sandbox_directory> and
L<--dont-read|makepp_command/dont_read_filename>, for sandbox control when
running multiple concurrent (possibly distributed) makepp commands.

Makepp will now also look for options in files called F<.makepprc>.  The
option L<--args-file|makepp_command/a_filename> 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 C<--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. C<$MAKEPPCLEANFLAGS> or C<$MAKEPPLOGFLAGS>.

Short command line options may now be grouped in the Unix way, so C<-k -j 4>
may be given as C<-kj4>.  In all long options the dash between words may now
consistently be omitted or replaced with an underscore, so that C<--no-log>
can be C<--nolog> or C<--no_log>.  Unknown options now cause an error.

=item *

Originally C<makeppclean> C<-l> meant C<--leave-src-info>, but now the options
have been extended and this one changed to C<-k|--keep-src-info>.

=item *

L<Scanning|makepp_scanning> terminology has been cleaned up (and the page
rewritten) to finally match a redesign that happened a few years ago.  There
are now 3 separate terms, the lexer (which users don't need to worry about),
the (command) parsers and the (file) scanners.

For advanced users: The new interface consists of the L<C<register_parser> or
C<register_command_parser>|/register_command_parser_command_word_parser>
statements, the C<:parser> rule option and the C<p_*> parser factory functions
which get aliased to their parser class as C<factory>.  The misnamed
C<register_scanner> statement, C<:scanner> rule option and C<:scanner_*> or
C<:parser_*> functions are deprecated.

=item *

New variable MAKEPP_VERSION.

=item *

All internal classes have been moved to the new package C<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
C<$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
C<use> statement, you must prefix those modules with a C<+>, to get them
preloaded:

    MAKEPP_INSTALL_OLD_MODULES='+Glob Rule +MakeEvent'

=item *

New L<makeppreplay, mppr|makeppreplay> utility to repeat some of makepp's
actions very fast.  New L<makepplog, mppl|makepplog> utility to see the log
data readably, needed due to a changed file format.  New L<makeppgraph,
mppg|makeppgraph> utility to graphically analyze dependencies, includes and
partially the reasons for a rebuild.  New L<makeppinfo, mppi|makeppinfo>
utility to see somewhat cryptically what makepp knows about some file.

=item *

Ported to IBM z/OS Unix System Services.  Only smart recursive make doesn't
work.

=item *

Makepp has become noticeably faster.

=item *

Abolish the undocumented fancy renaming of only '.' to '_dot_' in variable and
function names.

=item *

New variable $/ for portable directory separator.  Lots of Windows fixes,
including C<-j> (parallel builds) for Cygwin and MinGW and smart recursive
builds on Cygwin.

=item *

Also install abbreviations consisting of 'mpp' plus the first letter of every
following word, e.g. 'mppc' for L<makeppclean|makeppclean>.

=item *

New `:build_check only_action' for commands that don't depend on the contents
of their dependencies, like symlink creation, where it is used automatically.

=item *

Removed C<--norc-substitution> and C<--percent-subdirs> and
C<$(rc_substitution)> and C<percent_subdirs>.  They are now to be given
anywhere from target specific assignment to command line or environment vars
C<makepp_simple_concatenation> and C<makepp_percent_subdirs>.

=item *

New action syntax C<&perl_function 'arg 1' arg2 ...> and
C<&external-perl-script 'arg 1' arg2 ...>  New Perl function C<run>.

There are the following L<builtin commands|makepp_builtins>: C<&chmod>,
C<&cp>, C<&cut>, C<&echo>, C<&expr>, C<&grep>, C<&install>, C<&ln>, C<&mkdir>,
C<&mv>, C<&perl>, C<&preprocess>, C<&printf>, C<&rm>, C<&sed>, C<&sort>,
C<&template>, C<&touch>, C<&uninstall>, C<&uniq> and C<&yes>, which can
replace Unix commands of the same name, and more or less also the following:
C<awk>, C<chgrp>, C<chown>, C<head>, C<m4>, C<rmdir>, C<tail> and C<tr>.  They
are also available L<stand-alone|makeppbuiltin> from the Shell.  They can also
be used as functions, e.g. C<$(&cat file)>, or as
L<statements|makepp_statements/Commands>, or standalone.

Note that, unlike earlier CVS versions, C<&cut -f>, C<&grep -v> and C<&sort
-r> now behave as in Unix.  Note that in earlier CVS versions of C<&template>
C<@@> was processed before C<@>, but now lines are consistently handled front
to back.

=item *

Added a C<global> statement for sharing variables across makefiles.  The
assignment variant of C<export> now works like a normal assignment, so you may
have to change to C<:=>.  Added the C<override> modifier to assignments.  The
C<define var :=> statement now optionally allows specifying the kind of
assignment.  And the forms with immediate evaluation retain the newlines in
C<$(shell ...)> or C<$(&command)>.  There are new assignment operators C<&=>
for prepending, and C<;=> which is a C<=> when set, but automatically turns
into a C<:=> when first used.

=item *

A makefile is now also found if it is called C<Makeppfile.mk>.

=item *

There are two new possible filenames for makefiles: C<RootMakeppfile> or
equivalently C<RootMakeppfile.mk>.  The presence of either of these gives your
build tree a formal root, accessible through the new variable C<$(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 C<--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
C<--do-build>.  If, however, you say C<--do-build> for something under your
build system root, which doesn't inherit C<--dont-build>, then instead your
build system root gets marked for C<--dont-build>.

=item *

Removed command C<makeppclient> since we never managed to let builds start
significantly faster.  The option C<--stop-after-loading> is more beneficial.

=item *

Interface definition files for SWIG (.i files) are now scanned for
includes.  Makepp now understands swig invocations.  (SWIG stands for
Simplified Wrapper and Interface Generator.  It automatically generates
all the wrapper functions to link your C or C++ code to a variety of
other languages such as Perl, Python, Tcl, Ruby, OCaml, C#, etc.  See
http://www.swig.org/.)

=item *

GNU Emacs 22 now has a standard makefile-makepp-mode, which is the default
when visiting F<Makeppfile>.

=item *

$[VARIABLE] or $[function ...] is evaluated when reading a makefile line, so
the variable may contain makepp syntax.

=item *

$( ...) is now always a list in rc-style substitution, so that C<-I$(
$(DIRLIST))> will leave no lonely option when DIRLIST is empty.

=item *

You can now double-paren functions and multi-line lists, allowing things like
S<C<$((perl if( $a < 5 ) { ... }))>>.

=item *

New C<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 C<$>C<Log$> tag when checking in.

=item *

Implement C<$?> exactly as GNU make does.  New long name C<$(changed_inputs)>
for it.

=item *

Implement C<$(error ...)> and C<$(warning ...)> as in GNU make.

=item *

New method C<: build_check ignore_action> to ignore changes to the action
string.

=item *

New statements C<ifperl>, C<ifmakeperl>, C<iftrue>, C<ifntrue>, C<ifsys> and C<ifnsys>.

=item *

Conditionals C<ifxxx> may now be grouped with C<and> and C<or>.  When written
on the same line after C<else>, they create a branch of the same statement,
rather than requiring nesting.

=item *

Added support for dependencies on environment variables, using the
C<:env> rule option.

=item *

Various signal handling fixes.

=item *

New command C<makeppclean> that efficiently removes generated files
without loading makefiles.

=item *

Ported to MinGW.

=item *

New build caches, to cache files that are identical.  This means that if you
change a file and revert, then you can have makepp drop back to the
immediately preceding .o file without rebuilding.  Or you can share builds of
identical files between separate source trees.  Newly added grouping of build
caches for big setups, possibly spanning several machines.

=item *

At least Perl 5.6 is required.

=back

=head2 Version 1.40 (December 2004)

Thanks to Anders Johnson and Daniel Pfeiffer for major contributions of
code to this release.

=over 4

=item *

Too many bug fixes to list individually.  Probably the most salient
fixes are to make it work significantly more reliably on Cygwin, but
there were also fixes to variable expansion, scanning, repositories,
etc.

=item *

Rewritten command parser and file scanner architecture so that it is
more easily extensible.  Makepp now supports Verilog (a language used
for chip design) in addition to C++ and Fortran.  It should be
relatively straightforward to support additional languages.  I<(Anders
Johnson)>

=item *

New command C<makeppclient> that lets builds start faster.  I<(Daniel
Pfeiffer)>

=item *

If you have Perl 5.6.0 or higher, HTML documentation now comes with the new
working camel logo and syntax highlighting in the examples.
I<(Daniel Pfeiffer)>

=item *

Numerous corrections and improvements to the documentation.  I<(Mostly
Anders Johnson)>

=item *

Support for GNU make's C<define> statement to define multi-line variable
values.

=item *

$(PWD) and $(CURDIR) now work as in GNU make.

=item *

New C<--keep-repository-links> option to prevent makepp from deleting
all the soft links it creates when making repositories.

=item *

New C<--assume-old>, C<--assume-new>, and C<--dont-build> options, and
support for the C<-n> option.

=item *

Support for double colon rules has slightly improved, so that we can
handle makefiles produced by MakeMaker without much trouble.

=item *

Added syntax for performing Perl code as a statement and in rules C<perl { ...
}> or C<makeperl { ...  }>.  Added functions for evaluating Perl statements
C<$(perl ... )> or C<$(makeperl ... )>.  Added statement C<makesub { ... }>.
I<(Daniel Pfeiffer)>

=item *

Short options can now be directly followed by argument as in -j4.  Documented
options --jobs, --keep-going, --makefile, --what-if, --assume-new, --new-file,
--assume-old & --old-file are now really accepted.
I<(Daniel Pfeiffer)>

=back

=head2 Version 1.19 (July 2003)

Special thanks to Matthew Lovell and Chris van Engelen for lots of suggestions
and tracking down problems in the code.

=over 4

=item *

Documentation was reorganized so that man pages as well as HTML pages can be
produced, and a cookbook/FAQ was added (see L<makepp_cookbook>).

=item *

A "configure" script was added so installation is more like other software
products from the user point of view.

=item *

The S<C<$(origin )>> function from GNU make is now supported.

=item *

L<Target-specific variables|makepp_variables/Target-specific
assignments> are now supported as in GNU make, except that they do not
propagate their values to dependencies.

=item *

New functions S<C<$(find_upwards )>> and S<C<$(relative_filename )>>
(contributed by Matthew Lovell) and S<C<$(relative_to )>>.

=item *

In compilation commands, S<C<-I dir>> and S<C<-L dir>> are now supported
and work just like C<-Idir> and C<-Ldir>.

=item *

Recompilation of C files will now occur if a multi-line comment was
inserted, or if the line numbering changed in any way.  Previously it
ignored newlines in computing the checksum, which meant that a change
that affected debugger info might not force a recompilation.

=item *

A bug in S<C<$(shell )>> which caused it to return a null string occasionally
(especially when the system was heavily loaded) was fixed.

=item *

Unreadable files or directories suppress importing from repositories but are
not matched by wildcards.

=item *

A few other minor bugs were fixed.

=back

=head2 Version 1.18 (January 2002)

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.

=head2 Version 1.10 (February 2001)

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:

=over 4

=item *

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

=item *

A new signature method C<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 (C<exact_match>) for any files other than C/C++
source files.

=back

Because of these changes, makepp will recompile everything the first
time you run it.

=head2 Version 1.05

In addition to bug-fixes, this version has one user-visible change.  The
C<--norc-substitution> command line option was introduced to allow
compatible handling of whitespace in makefiles.

=head2 Version 0.99 (January 2001)

In addition to numerous bug fixes, this version has several user-visible
changes:

=over 4

=item *

Multiple targets for a rule are now treated in a way which is more
compatible with old makefiles.  Makepp has a heuristic algorithm for
guessing whether the rule is supposed to build all targets at once or
whether the rule needs to be invoked multiple times.  I do not think
this will break any existing makefiles, but it should allow makepp to
work with many more makefiles designed for Unix make.

=item *

The C<--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.

=item *

Repositories now work with libtool.

=item *

Variable settings are now allowed with the C<load_makefile> statement
and with recursive make.

=back

=head2 Version 0.95

This version has several user-visible changes:

=over 4

=item *

A tutorial on writing makefiles for makepp has been added.

=item *

GNU make style conditionals (ifeq/ifneq/ifdef/ifndef) are now
supported, as is the S<C<$(if )>> function.

=item *

By default, the C<%> wildcard now matches only files within a directory;
C<%.c> is now equivalent to C<*.c>, not C<**/*.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 C<--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.)

=item *

By default, makefiles from any directory that contains a dependency, or
that is searched by a wildcard, are loaded automatically.  Usually this
means you don't need any C<load_makefile> statements at all.  If this
causes you problems, you can turn off implicit loading of makefiles by
adding C<--no-implicit-load> to the command line.  (I'm curious whether
people like or dislike implicit loading of makefiles.)

=item *

A target may now be declared phony on the same line that defines the
target by using the new S<C<$(phony )>> function, like this:

    $(phony all): program_1 program_2

The S<C<$(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 S<C<$(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.

=back

=head2 Version 0.90

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 C<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:

=over 4

=item *

Repositories are now supported.

=item *

It is now possible to specify different methods for calculating and
comparing file signatures.  For example, you can use an MD5 checksum
ignoring comments and whitespace, or you can require merely that the
target be newer than the dependencies (the method that the traditional
make uses).

=item *

Makefiles are only rebuilt if they are older than their dependencies; a
different signature method is used in this special case.

=item *

Parallel builds are now supported, though this is still an experimental
feature.  See the C<-j> option.

=item *

It is now possible to write your own functions.  See the C<sub>
statement and L<makepp_extending> for details.

=item *

Filenames with characters like colon or space are now
supported with a new quoting syntax.

=item *

Synonymous, less cryptic names for automatic variables have been
introduced to encourage more readable makefiles.

=item *

Makepp now remembers the architecture of the machine
you built on, and rebuilds if the architecture is different.

=item *

Directories can now be targets or dependencies; a previous restriction
that all directories had to exist before the start of the build has been
lifted.

=item *

Makepp now writes a log file called C<.makepp_log> explaining why it
rebuilt everything.  This is extremely useful for debugging.

=item *

The usual C<-k> option for continuing to build even when an error occurs
is now supported.

=item *

The documentation has been reorganized and extended.

=back

There are also (unfortunately) a few incompatibilities with
previous versions:

=over 4

=item *

The file format for storing information about the last build has
changed.  Thus makepp will insist on rebuilding everything the first
time you run the new version.

=item *

load_makefile no longer supports targets or variable settings.  It now
supports loading a list of makefiles rather than just one, so the C<-F>
switch is now unnecessary (and no longer documented).

=item *

Recursive make now ignores variable settings on the command
line.  This is necessary to load makefiles in a consistent way.

=item *

C<$(INFERRED_OBJS)> is no longer supported (since it was not a well-designed
interface anyway).  Use the newer
L<C<$(infer_objects)>|makepp_functions/infer_objects_file1_file2_pattern>
function instead.

=item *

C<$_> is no longer supported.  Use C<$(foreach)> instead.

=item *

A few seldom used GNU make options such as C<-s>, C<-n>, and C<-q> are
no longer supported due to internal architecture changes.  C<-n> will
probably be supported again in future releases.

=item *

A man page is no longer provided since the documentation is no longer
written in the Perl pod format.  Use the HTML documentation instead.

=item *

The automatic clean target is no longer supported.  A better
way to do it is with C<$(only_targets)>.

=back
