[Sugar-devel] Automake-fu question
Tomeu Vizoso
tomeu at tomeuvizoso.net
Sun Feb 21 10:10:13 EST 2010
On Fri, Feb 19, 2010 at 19:47, Andrés Ambrois <andresambrois at gmail.com> wrote:
> Hello list!
>
> To provide mobile-broadband-provider-info support for the 3G feature, I need
> to parse some system files, namely /usr/share/zoneinfo/iso3166.tab and
> /usr/share/mobile-broadband-provider-info/serviceproviders.xml. In order for
> packagers to override those locations I created a config.py.in file that looks
> like this:
>
> PROVIDERS_PATH = "@prefix@/share/mobile-broadband-provider-
> info/serviceproviders.xml"
> PROVIDERS_FORMAT_SUPPORTED = "2.0"
> COUNTRY_CODES_PATH = "@prefix@/share/zoneinfo/iso3166.tab"
>
> Which is then converted by a make rule in Makefile.am into config.py. I
> understand this is the recommended approach when using autotools [0].
>
> One of the problems is that this breaks jhbuild, because it uses
> --prefix=/path/to/jhbuild/install. The other is that by default @prefix@ expands
> to /usr/local/, which is not the usual location for these files.
>
> The full patch is [1], if you're interested.
Hmm, as we want to know where the packages that provide those files
were installed, and not where is Sugar installed, I think @prefix@ is
not what we want here.
The best I can think right now is harcoding to the /usr prefix, or
adding a configure switch for each. Unless we can get those paths from
a .pc file, which would be the ideal but I don't think it's likely.
What do other packages that consume those files?
Regards,
Tomeu
> Cheers!
>
> [0] http://www.gnu.org/software/autoconf/manual/autoconf.html#Installation-
> Directory-Variables
> [1] http://bugs.sugarlabs.org/ticket/1630
> --
> -Andrés
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
More information about the Sugar-devel
mailing list