X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=0.4 required=5.0	tests=BAYES_05,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_PASS,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Message-ID: <28454344.post@talk.nabble.com>
Date: Tue, 4 May 2010 16:48:05 -0700 (PDT)
From: MichaelKim <souren@gmail.com>
To: cygwin@cygwin.com
Subject: Cygwin make target is never determined up to date
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com


Cygwin make always processing `$(chrome_jar_file)` target, after first
successful build. So I never get up to date message and always see commands
for `$(chrome_jar_file)` are executing.

However it happens only on Windows 7. On Windows XP once it built and
intact, no more builds.
I narrowed down the issue to one prerequisite - `$(jar_target_dir)`.

Here is part of the code

    # The location where the JAR file will be created.
    jar_target_dir := $(build_dir)/chrome
    
    # The main chrome JAR file.
    chrome_jar_file := $(jar_target_dir)/$(extension_name).jar
    
    # The root of the JAR sources.
    jar_source_root := chrome
    
    # The sources for the JAR file.
    jar_sources := bla #... some files, doesn't matter
    
    jar_sources_no_dir := $(subst $(jar_source_root)/,,$(jar_sources))
    
    $(chrome_jar_file): $(jar_sources) $(jar_target_dir)
     @echo "Creating chrome JAR file."
     @cd $(jar_source_root); $(ZIP) ../$(chrome_jar_file)
$(jar_sources_no_dir)
     @echo "Creating chrome JAR file. Done!"
    
    $(jar_target_dir): $(build_dir)
     echo "Creating jar target dir..."
     if [ ! -x $(jar_target_dir) ]; \
      then \
        mkdir $(jar_target_dir); \
      fi

    $(build_dir):
     @if [ ! -x $(build_dir) ]; \
      then \
        mkdir $(build_dir); \
      fi


so if I just remove  `$(jar_target_dir)` from `$(chrome_jar_file)` rule, it
works fine.
Also tried to use `-e` in `if`.
So again, question is why in windows 7 target is never up to date and it has
always to process it.
-- 
View this message in context: http://old.nabble.com/Cygwin-make-target-is-never-determined-up-to-date-tp28454344p28454344.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

