<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:annulen@yandex.ru" title="Konstantin Tokarev <annulen@yandex.ru>"> <span class="fn">Konstantin Tokarev</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Win] forwarding headers should not be copies"
   href="https://bugs.webkit.org/show_bug.cgi?id=179814">bug 179814</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #327160 Flags</td>
           <td>review?
           </td>
           <td>review-
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Win] forwarding headers should not be copies"
   href="https://bugs.webkit.org/show_bug.cgi?id=179814#c9">Comment # 9</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Win] forwarding headers should not be copies"
   href="https://bugs.webkit.org/show_bug.cgi?id=179814">bug 179814</a>
              from <span class="vcard"><a class="email" href="mailto:annulen@yandex.ru" title="Konstantin Tokarev <annulen@yandex.ru>"> <span class="fn">Konstantin Tokarev</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=327160&action=diff" name="attach_327160" title="Patch set #2 checks if the perl script to create forwarding headers returns an error; if so it causes the batch script to return an error and the build stops.">attachment 327160</a> <a href="attachment.cgi?id=327160&action=edit" title="Patch set #2 checks if the perl script to create forwarding headers returns an error; if so it causes the batch script to return an error and the build stops.">[details]</a></span>
Patch set #2 checks if the perl script to create forwarding headers returns an error; if so it causes the batch script to return an error and the build stops.

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=327160&action=review">https://bugs.webkit.org/attachment.cgi?id=327160&action=review</a>

<span class="quote">> Source/JavaScriptCore/PlatformWin.cmake:44
> +file(WRITE "${JavaScriptCore_POST_BUILD_COMMAND}" "perl ${JAVASCRIPTCORE_DIR}/Scripts/make-forwarding-headers.pl \"${DERIVED_SOURCES_DIR}/JavaScriptCore/*.h\" \"${DERIVED_SOURCES_DIR}/JavaScriptCore\" \"${FORWARDING_HEADERS_DIR}/JavaScriptCore\"\n")</span >

I think better approach would be to pass list of globs as arguments to one script invocation, and ditch preBuild.cmd file altogether, replacing JavaScriptCore_PRE_BUILD_COMMAND with script invocation

At very least use && to join commands instead of "if %errorlevel% NEQ 0 exit /b 1\n"

<span class="quote">> Source/JavaScriptCore/Scripts/make-forwarding-headers.pl:1
> +use strict;</span >

It's also a good practice to add "use warnings" to all scripts, unfortunately many our scripts don't

<span class="quote">> Source/JavaScriptCore/Scripts/make-forwarding-headers.pl:5
> +my $searchPath = shift;</span >

you'll need Getopt::Long

<span class="quote">> Source/JavaScriptCore/Scripts/make-forwarding-headers.pl:10
> +foreach(@headers) {</span >

use explicit name for iterator

<span class="quote">> Source/JavaScriptCore/Scripts/make-forwarding-headers.pl:12
> +    my $forwardingHeader = $forwardingDir.'/'.$file;</span >

use File::Spec->join

<span class="quote">> Source/JavaScriptCore/Scripts/make-forwarding-headers.pl:15
> +        open (HEADER, $forwardingHeader) or die("Unable to open $forwardingHeader");</span >

Barewords for file handles are bad practice, use my $header

Don't forget to add $! into your die messages

open without '<' is fragile, if it happens that file name starts with special character it may lead to unexpected result

<span class="quote">> Source/JavaScriptCore/Scripts/make-forwarding-headers.pl:21
> +        print "Creating forwarding header $forwardingHeader with #include \"$includePath/$file\"\n";</span >

Don't duplicate $fileContent here, chomp it, or add "\n" in the next statement

<span class="quote">> Source/JavaScriptCore/Scripts/make-forwarding-headers.pl:24
> +    close(HEADER);</span >

Better check errors in close too. This may not be incredibly useful for files, but for other types of handles it's really needed (e.g. pipes). Just keep in mind</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>