Cygwin make always processing target
Posted
by Michael
on Stack Overflow
See other posts from Stack Overflow
or by Michael
Published on 2010-05-04T14:32:43Z
Indexed on
2010/05/04
19:08 UTC
Read the original article
Hit count: 117
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.
© Stack Overflow or respective owner