In a ports Makefile, the following if statement never evaluates to false, i.e. never thinks the file exists:
The
There are several other
So
What's wrong with the syntax here? Thanks in advance for your insight.
Makefile:
pre-fetch:
.if !exists(${DISTDIR}/${DIST_SUBDIR}/${MAVEN_CACHE_FILE})
ls -alh ${DISTDIR}/${DIST_SUBDIR}/${MAVEN_CACHE_FILE}
${MKDIR} ${DISTDIR}/${DIST_SUBDIR}
# Do a bunch of other stuff...
.endif
The
ls
in the third line is just for testing, and shows us that the file is indeed there!===> cassandra4-4.1.2 depends on executable: ant - found
ls -alh /usr/ports/distfiles/cassandra/apache-cassandra-4.1.2-repo.tar.xz
-rw-r--r-- 1 root wheel 75M Jul 9 10:55 /usr/ports/distfiles/cassandra/apache-cassandra-4.1.2-repo.tar.xz
/bin/mkdir -p /usr/ports/distfiles/cassandra
There are several other
.if
s in the Makefile, and they all work as expected, though none of them involve checking the existence of a file.So
pre-fetch
code always runs, downloading the maven dependencies anew, and this port can't be built offline.What's wrong with the syntax here? Thanks in advance for your insight.