dpatch on Makefile.in?

John Skaller skaller at users.sourceforge.net
Wed Jun 22 12:25:39 CDT 2005

On Wed, 2005-06-22 at 07:31 +0100, Magnus Therning wrote:
> On Wed, Jun 22, 2005 at 11:01:19AM +1000, John Skaller wrote:
> >On Tue, 2005-06-21 at 16:06 +0100, Magnus Therning wrote:
> >>On Tue, Jun 21, 2005 at 03:59:50PM +0200, Martin Pitt wrote:
> >>>
> >>>Magnus Therning [2005-06-21 14:09 +0100]:
> >>>> Should a distribution specific patch modify Makefile.in or
> >>>> Makefile.am?
> >>>
> >>>I prefer to patch Makefile.am and regenerate Makefile.in since it is
> >>>cleaner and the .am file is the "actual source".
> >
> >This is not a matter of preference or opinion.
> >You must patch the source, not a file generated
> >by the build.
> Are you suggesting I should file a bug on a package that contains
> patches to Makefile.in without any change to Makefile.am?

I have no idea if the build uses Makefile.am to create
Makefile.in, in the particular package in question.

If the build runs 'automake' then you must patch Makefile.am.
Patching Makefile.in will not work, because automake will
clobber the file, your patch included.

If the build does not run 'automake', you must patch Makefile.in,
and you should probably patch Makefile.am as well.

In the latter case, Makefile.am is not used in the build
and is probably included for the developers convenience
and/or documentation.

I believe GNU recommends NOT running automake in builds.

I think the packager here would modify Makefile.am,
run automake, and then use the diff as a patch,
this would patch BOTH the Makefile.am and .in files.

Hope this makes sense.

BTW: on Debian systems, and most tarballs by convention,
you basically only have 3 commands to build something:

make all
make install

Of course, a real development process need not be
this simplistic. The packager may have to make
a choice how to handle a non-simplistic upstream
development process.

This may be the case with a multi-phased build
process, such as one using automake. It may be
the packagers decision whether to run automake
in the configuration script or not.

I would be emailing the upstream author I think,
asking for their opinion, since the decision depends
on how stable the use of automake is: some developers
only use it once, and edit the Makefile.in by hand

John Skaller <skaller at users dot sourceforge dot net>
Download Felix: http://felix.sf.net

More information about the ubuntu-devel mailing list