Changeset 112203 in webkit


Ignore:
Timestamp:
Mar 26, 2012 8:58:35 PM (12 years ago)
Author:
ddkilzer@apple.com
Message:

Build system prep work for upstreaming iOS changes
<http://webkit.org/b/82267>

Reviewed by Mark Rowe.

  • DerivedSources.make: Move 'bison' into a variable and use

xcrun to find it on Mac OS X.

  • bindings/scripts/preprocessor.pm:

(applyPreprocessor): Add local @args variable. On iOS, the
compiler needs additional "-isysroot $(SDKROOT)" arguments when
invoked, so it's easier to add them to an array, especially if
$SDKROOT contains a space in the path. Remove now-redundant
$gccLocation variable.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r112201 r112203  
     12012-03-26  David Kilzer  <ddkilzer@apple.com>
     2
     3        Build system prep work for upstreaming iOS changes
     4        <http://webkit.org/b/82267>
     5
     6        Reviewed by Mark Rowe.
     7
     8        * DerivedSources.make: Move 'bison' into a variable and use
     9        xcrun to find it on Mac OS X.
     10        * bindings/scripts/preprocessor.pm:
     11        (applyPreprocessor): Add local @args variable.  On iOS, the
     12        compiler needs additional "-isysroot $(SDKROOT)" arguments when
     13        invoked, so it's easier to add them to an array, especially if
     14        $SDKROOT contains a space in the path.  Remove now-redundant
     15        $gccLocation variable.
     16
    1172012-03-26  Nate Chapin  <japhet@chromium.org>
    218
  • trunk/Source/WebCore/DerivedSources.make

    r112035 r112203  
    729729# --------
    730730
     731# Path to bison
     732
     733ifeq ($(OS),MACOS)
     734BISON=$(shell xcrun -find bison)
     735else
     736BISON=bison
     737endif
     738
     739# --------
     740
    731741# CSS grammar
    732742# NOTE: Older versions of bison do not inject an inclusion guard, so we add one.
    733743
    734744CSSGrammar.cpp : css/CSSGrammar.y
    735         bison -d -p cssyy $< -o $@
     745        $(BISON) -d -p cssyy $< -o $@
    736746        touch CSSGrammar.cpp.h
    737747        touch CSSGrammar.hpp
     
    748758
    749759XPathGrammar.cpp : xml/XPathGrammar.y $(PROJECT_FILE)
    750         bison -d -p xpathyy $< -o $@
     760        $(BISON) -d -p xpathyy $< -o $@
    751761        touch XPathGrammar.cpp.h
    752762        touch XPathGrammar.hpp
  • trunk/Source/WebCore/bindings/scripts/preprocessor.pm

    r101506 r112203  
    4141    my $preprocessor = shift;
    4242
     43    my @args = ();
    4344    if (!$preprocessor) {
    4445        require Config;
    45         my $gccLocation = "";
    4646        if ($ENV{CC}) {
    47             $gccLocation = $ENV{CC};
     47            $preprocessor = $ENV{CC};
    4848        } elsif (($Config::Config{'osname'}) =~ /solaris/i) {
    49             $gccLocation = "/usr/sfw/bin/gcc";
     49            $preprocessor = "/usr/sfw/bin/gcc";
    5050        } else {
    51             $gccLocation = "/usr/bin/gcc";
     51            $preprocessor = "/usr/bin/gcc";
    5252        }
    53         $preprocessor = $gccLocation . " -E -P -x c++";
     53        push(@args, qw(-E -P -x c++));
    5454    }
    5555
     
    6161    @macros = map { "-D$_" } @macros;
    6262
    63     my $pid = open2(\*PP_OUT, \*PP_IN, split(' ', $preprocessor), @macros, $fileName);
     63    my $pid = open2(\*PP_OUT, \*PP_IN, split(' ', $preprocessor), @args, @macros, $fileName);
    6464    close PP_IN;
    6565    my @documentContent = <PP_OUT>;
Note: See TracChangeset for help on using the changeset viewer.