<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>96245</bug_id>
          
          <creation_ts>2012-09-10 01:29:08 -0700</creation_ts>
          <short_desc>[Qt] Fix generation of forward headers for generated files in WebCore on Windows</short_desc>
          <delta_ts>2012-09-10 04:40:10 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>76776</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Hausmann">hausmann</reporter>
          <assigned_to name="Simon Hausmann">hausmann</assigned_to>
          <cc>abecsi</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>menard</cc>
    
    <cc>vestbo</cc>
    
    <cc>webkit.review.bot</cc>
    
    <cc>zoltan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>715821</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2012-09-10 01:29:08 -0700</bug_when>
    <thetext>[Qt] Fix generation of forward headers for generated files in WebCore on Windows</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>715825</commentid>
    <comment_count>1</comment_count>
      <attachid>163063</attachid>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2012-09-10 01:32:59 -0700</bug_when>
    <thetext>Created attachment 163063
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>715879</commentid>
    <comment_count>2</comment_count>
      <attachid>163063</attachid>
    <who name="Tor Arne Vestbø">vestbo</who>
    <bug_when>2012-09-10 02:58:06 -0700</bug_when>
    <thetext>Comment on attachment 163063
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=163063&amp;action=review

&gt; Source/WebKit2/DerivedSources.pri:148
&gt; +    win32: eval($${header_target}.commands = ($${QMAKE_MKDIR} $$toSystemPath($$dest_dir) 2&gt;nul || echo&gt;nul))

It looks like we use $${QMAKE_CHK_DIR_EXISTS} || $${QMAKE_MKDIR} in the rest of Qt&apos;s makefiles, perhaps stick with that?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>715899</commentid>
    <comment_count>3</comment_count>
      <attachid>163063</attachid>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2012-09-10 03:52:42 -0700</bug_when>
    <thetext>Comment on attachment 163063
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=163063&amp;action=review

&gt;&gt; Source/WebKit2/DerivedSources.pri:148
&gt;&gt; +    win32: eval($${header_target}.commands = ($${QMAKE_MKDIR} $$toSystemPath($$dest_dir) 2&gt;nul || echo&gt;nul))
&gt; 
&gt; It looks like we use $${QMAKE_CHK_DIR_EXISTS} || $${QMAKE_MKDIR} in the rest of Qt&apos;s makefiles, perhaps stick with that?

The problem with that approach is that it doesn&apos;t work well with parallel rules that try to create the same directory ;(

IOW there&apos;s a race condition between the check if the directory exists and making it. If you have two jobs trying to do the same thing, then
both jobs determine simultaneously that the directory doesn&apos;t exist, both try to create the directory at the same time and only once succeeds. The
second one will see mkdir aborting because the directory already exists.

I tried removing the mkdir from this rule altogether and instead depend on the other generator that creates the directory also, but unfortunately when
depending on such a symbol target nmake will always call it and thus always re-generate the file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>715924</commentid>
    <comment_count>4</comment_count>
      <attachid>163063</attachid>
    <who name="Tor Arne Vestbø">vestbo</who>
    <bug_when>2012-09-10 04:34:19 -0700</bug_when>
    <thetext>Comment on attachment 163063
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=163063&amp;action=review

&gt;&gt;&gt; Source/WebKit2/DerivedSources.pri:148
&gt;&gt;&gt; +    win32: eval($${header_target}.commands = ($${QMAKE_MKDIR} $$toSystemPath($$dest_dir) 2&gt;nul || echo&gt;nul))
&gt;&gt; 
&gt;&gt; It looks like we use $${QMAKE_CHK_DIR_EXISTS} || $${QMAKE_MKDIR} in the rest of Qt&apos;s makefiles, perhaps stick with that?
&gt; 
&gt; The problem with that approach is that it doesn&apos;t work well with parallel rules that try to create the same directory ;(
&gt; 
&gt; IOW there&apos;s a race condition between the check if the directory exists and making it. If you have two jobs trying to do the same thing, then
&gt; both jobs determine simultaneously that the directory doesn&apos;t exist, both try to create the directory at the same time and only once succeeds. The
&gt; second one will see mkdir aborting because the directory already exists.
&gt; 
&gt; I tried removing the mkdir from this rule altogether and instead depend on the other generator that creates the directory also, but unfortunately when
&gt; depending on such a symbol target nmake will always call it and thus always re-generate the file.

Ouch! You&apos;re right, that will not be pretty. Wonder why Qt gets away with that though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>715927</commentid>
    <comment_count>5</comment_count>
      <attachid>163063</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-09-10 04:40:06 -0700</bug_when>
    <thetext>Comment on attachment 163063
Patch

Clearing flags on attachment: 163063

Committed r128045: &lt;http://trac.webkit.org/changeset/128045&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>715928</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-09-10 04:40:10 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>163063</attachid>
            <date>2012-09-10 01:32:59 -0700</date>
            <delta_ts>2012-09-10 04:40:06 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-96245-20120910103444.patch</filename>
            <type>text/plain</type>
            <size>2139</size>
            <attacher name="Simon Hausmann">hausmann</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTI4MDMwCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0Mi9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViS2l0Mi9DaGFuZ2VMb2cKaW5kZXggODBjMDY0ZDNmZmNiMzkx
OTE0ODAyZWRjYTk3YmU3YmQ2ZTMxN2E0Ni4uNjg1NGY0NGRkYzc1ZTM3ODA4MTBlYzhkMDViMjIx
NDE5ZTUxZTVlNCAxMDA2NDQKLS0tIGEvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJLaXQyL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE4IEBACisyMDEyLTA5LTEwICBTaW1v
biBIYXVzbWFubiAgPHNpbW9uLmhhdXNtYW5uQG5va2lhLmNvbT4KKworICAgICAgICBbUXRdIEZp
eCBnZW5lcmF0aW9uIG9mIGZvcndhcmQgaGVhZGVycyBmb3IgZ2VuZXJhdGVkIGZpbGVzIGluIFdl
YkNvcmUgb24gV2luZG93cworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1
Zy5jZ2k/aWQ9OTYyNDUKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKwor
ICAgICAgICBXZSBnZW5lcmF0ZSB0aGUgZm9yd2FyZGluZyBoZWFkZXIgZmlsZXMgb2YgZ2VuZXJh
dGVkIFdlYkNvcmUgc291cmNlcyBieSB1c2luZworICAgICAgICBta2RpciB0byBlbnN1cmUgdGhl
IHRhcmdldCBkaXJlY3RvcnkgZXhpc3RzLCBmb2xsb3dlZCBieQorICAgICAgICBlY2hvICNpbmNs
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