mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] Helper script to keep configure arguments up to date
Date: Fri, 21 Apr 2017 16:06:47 +0200	[thread overview]
Message-ID: <20170421140647.bqyz6vhczu5z3gen@pengutronix.de> (raw)

Hi,

I've just added scripts/configure_helper.py to ptxdist. This is a tool to
help update or create autoconf packages. Please use it before sending
patches. It basically does what I always tell you to do manually: It checks
the output of './configure --help' and compares it with the options
specified in the rule.
So how does it work? Here is a short example:

 Let's say I want to update the 'glib' package to a newer version.

1. Update the version in the rule

2. Extract the source:
$ ptxdist extract glib

3. Check if I need to to change the options:

3.1 compare old and new configure scripts:
$ .../scripts/configure_helper.py --pkg glib --old-src platform-foo/build-target/glib-2.50.2/

No output: Great!

3.2 But maybe to existing options weren't so great:
$ .../scripts/configure_helper.py --pkg glib
> --- 
> +++ 
> @@ -2,8 +2,8 @@
>  	--sysconfdir=/etc
>  	--localstatedir=/var
>  	--libdir=/usr/lib
> +	--build=x86_64-host-linux-gnu
>  	--host=arm-v7a-linux-gnueabihf
> -	--build=x86_64-host-linux-gnu

This is ok, just reordered for the generic options

>  	--enable-debug=minimum
>  	--disable-gc-friendly
>  	--enable-mem-pools
> @@ -20,10 +20,17 @@
>  	--disable-libelf
>  	--disable-libmount
>  	--disable-gtk-doc
> +	--enable-gtk-doc-html
> +	--enable-gtk-doc-pdf

I could add those, but I know, that the docs are not build anyways, so
right now I don't care.

>  	--disable-man
>  	--disable-dtrace
>  	--disable-systemtap
>  	--disable-coverage
> +	--disable-compile-warnings

I don't care about that.

> +	--with-runtime-libdir=RELPATH

The default is just fine, just like most other dirs like libdir etc.

> +	--with-python=PATH

This is python for building and the on in the path is the correct on so
this is not needed.

>  	--with-libiconv=no
> +	--with-gio-module-dir=DIR

Same as above.

>  	--with-threads=posix
>  	--with-pcre=system
> +	--with-tapset-install-dir=DIR

These files are not used in ptxdist, so I don't care where they are
installed.
Great, no new options. Now I just need to test the package before
submitting a patch...

This is what I expect you to do before submitting a patch that adds or
updates a package. This script has a long blacklist with options that don't
need to be set. For the rest use common sense or ask here if you are
unsure.

I wrote this for me because doing this manually for many packages is really
annoying. I hope this will help you too.

Of course, now it's easier for me to check you patches and I can be even
more pedantic about configure options... :-)

Regards,
Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

                 reply	other threads:[~2017-04-21 14:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170421140647.bqyz6vhczu5z3gen@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox