Patchwork [1/6] pixman: add output dir to include path

login
register
mail settings
Submitter Gerd Hoffmann
Date Nov. 13, 2012, 8:42 a.m.
Message ID <1352796133-956-2-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/198571/
State New
Headers show

Comments

Gerd Hoffmann - Nov. 13, 2012, 8:42 a.m.
Needed to make sure the (generated) pixman-version.h file is found.
Based on a patch from Blue Swirl.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 configure |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Stefan Weil - Nov. 13, 2012, 5:57 p.m.
Am 13.11.2012 09:42, schrieb Gerd Hoffmann:
> Needed to make sure the (generated) pixman-version.h file is found.
> Based on a patch from Blue Swirl.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>   configure |    6 +++---
>   1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/configure b/configure
> index 7290f50..18faded 100755
> --- a/configure
> +++ b/configure
> @@ -2121,8 +2121,9 @@ else
>       echo "      git submodule update --init pixman"
>       exit 1
>     fi
> -  pixman_cflags="-I${source_path}/pixman/pixman"
> -  pixman_libs="-Lpixman/pixman/.libs -lpixman-1"
> +  mkdir -p pixman/pixman
> +  pixman_cflags="-I${source_path}/pixman/pixman -I$(pwd)/pixman/pixman"
> +  pixman_libs="-L$(pwd)/pixman/pixman/.libs -lpixman-1"

I'd prefer \$(BUILD_DIR) instead of $(pwd) for cflags and libs
because it allows moving the build directory.

\$(SRC_PATH) could be used instead of $(source_path).
This would also avoid hardcoded paths in the generated
Makefile code and match better to other include parameters.

>   fi
>   QEMU_CFLAGS="$QEMU_CFLAGS $pixman_cflags"
>   libs_softmmu="$libs_softmmu $pixman_libs"
> @@ -4154,7 +4155,6 @@ DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas"
>   DIRS="$DIRS roms/seabios roms/vgabios"
>   DIRS="$DIRS qapi-generated"
>   DIRS="$DIRS libcacard libcacard/libcacard libcacard/trace"
> -DIRS="$DIRS pixman"
>   FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
>   FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
>   FILES="$FILES tests/tcg/lm32/Makefile libcacard/Makefile"
Gerd Hoffmann - Nov. 14, 2012, 8:40 a.m.
On 11/13/12 18:57, Stefan Weil wrote:
> Am 13.11.2012 09:42, schrieb Gerd Hoffmann:
>> Needed to make sure the (generated) pixman-version.h file is found.
>> Based on a patch from Blue Swirl.
>>
>> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>> ---
>>   configure |    6 +++---
>>   1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 7290f50..18faded 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2121,8 +2121,9 @@ else
>>       echo "      git submodule update --init pixman"
>>       exit 1
>>     fi
>> -  pixman_cflags="-I${source_path}/pixman/pixman"
>> -  pixman_libs="-Lpixman/pixman/.libs -lpixman-1"
>> +  mkdir -p pixman/pixman
>> +  pixman_cflags="-I${source_path}/pixman/pixman -I$(pwd)/pixman/pixman"
>> +  pixman_libs="-L$(pwd)/pixman/pixman/.libs -lpixman-1"
> 
> I'd prefer \$(BUILD_DIR) instead of $(pwd) for cflags and libs
> because it allows moving the build directory.

It isn't that simple.  Blue Swirl had it that way initially.  The
problem is that pixman_cflags is added to QEMU_CFLAGS, which in turn is
used by configure script checks too, which then blow up because make and
shell interpret "$(BUILD_DIR)" in different ways ...

cheers,
  Gerd
Gerd Hoffmann - Nov. 14, 2012, 12:33 p.m.
On 11/14/12 09:40, Gerd Hoffmann wrote:
>>> >> +  pixman_cflags="-I${source_path}/pixman/pixman -I$(pwd)/pixman/pixman"
>>> >> +  pixman_libs="-L$(pwd)/pixman/pixman/.libs -lpixman-1"

>> > 
>> > I'd prefer \$(BUILD_DIR) instead of $(pwd) for cflags and libs
>> > because it allows moving the build directory.

> It isn't that simple.  Blue Swirl had it that way initially.  The
> problem is that pixman_cflags is added to QEMU_CFLAGS, which in turn is
> used by configure script checks too, which then blow up because make and
> shell interpret "$(BUILD_DIR)" in different ways ...

Moving the lines which update QEMU_CFLAGS down the road, after all
configure checks works though.

cheers,
  Gerd

Patch

diff --git a/configure b/configure
index 7290f50..18faded 100755
--- a/configure
+++ b/configure
@@ -2121,8 +2121,9 @@  else
     echo "      git submodule update --init pixman"
     exit 1
   fi
-  pixman_cflags="-I${source_path}/pixman/pixman"
-  pixman_libs="-Lpixman/pixman/.libs -lpixman-1"
+  mkdir -p pixman/pixman
+  pixman_cflags="-I${source_path}/pixman/pixman -I$(pwd)/pixman/pixman"
+  pixman_libs="-L$(pwd)/pixman/pixman/.libs -lpixman-1"
 fi
 QEMU_CFLAGS="$QEMU_CFLAGS $pixman_cflags"
 libs_softmmu="$libs_softmmu $pixman_libs"
@@ -4154,7 +4155,6 @@  DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas"
 DIRS="$DIRS roms/seabios roms/vgabios"
 DIRS="$DIRS qapi-generated"
 DIRS="$DIRS libcacard libcacard/libcacard libcacard/trace"
-DIRS="$DIRS pixman"
 FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
 FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
 FILES="$FILES tests/tcg/lm32/Makefile libcacard/Makefile"