[gtkada] improvements to the GtkAda build system

Arnaud Charlet charlet at adacore.com
Mon Mar 21 18:25:12 CET 2011


> --- projects/generate_prj.sh	2011-02-12 18:22:59.000000000 +0100
> +++ projects/generate_prj.sh	2011-03-14 23:41:03.000000000 +0100
> @@ -1,10 +1,12 @@
>  #!/bin/sh
[...]
>  lcmodule=`echo $module | tr [A-Z] [a-z]`
>  
> @@ -44,10 +46,10 @@
>              echo "        \"-lopengl32\","
>              echo "        \"-lgdi32\","
>  	    if [ "$shared" = "1" ]; then
> -		echo "        \"-L../../bin\","
> +		echo "        \"-L${bindir}\","
>  	    fi
> -	    echo "        \"-L..\","
> -	    echo -n "        \"-L../../include/gtkada/$subdir\""
> +	    echo "        \"-L${libdir}\","
> +	    echo -n "        \"-L${incdir}/$subdir\""
>              ;;
>           *)
>              if [ x"$previous" != x"" ]; then
> @@ -81,7 +83,7 @@
>     type Gtkada_Kind_Type is ("static", "relocatable");
>     Gtkada_Kind : Gtkada_Kind_Type := external ("LIBRARY_TYPE", "$3");
>  
> -   for Source_Dirs use ("../../include/gtkada/$subdir");
> +   for Source_Dirs use ("${incdir}/$subdir");
>     for Library_Kind use Gtkada_Kind;
>  
>  EOF
> @@ -92,11 +94,11 @@
>     case Gtkada_Kind is
>        when "static" =>
>           for Library_Name use "${lcmodule}";
> -         for Library_Dir use "../gtkada/static/$subdir";
> +         for Library_Dir use "${libdir}/gtkada/static/$subdir";
>        when "relocatable" =>
>           for Library_Name use "${lcmodule}${lcversion}";
> -         for Library_Dir use "../../bin";
> -         for Library_ALI_Dir use "../gtkada/relocatable/$subdir";
> +         for Library_Dir use "${bindir}";
> +         for Library_ALI_Dir use "${libdir}/gtkada/relocatable/$subdir";
>     end case;

We don't want to change relative path to absolute path, this makes it
impossible to relocate installations.

I know that in the free software world, people often do not
understand/appreciate the notion of "relocatable binary distribution" (although
more so under Windows than under unix) and think that you can
simply redo a configure/make install if you want to relocate, but this
approach does not work in an industrial/commercial context.

Arno



More information about the gtkada mailing list