Skip to content

Commit

Permalink
index: keep index file as long as possible
Browse files Browse the repository at this point in the history
When generating the INDEX file, we are already building it in a
temporary file and swap it last minute. make the index target now
directly depend on the INDEX file generation target.
Turn that target into a PHONY target so the file is always regenerated
when someone calls make index.

PR:		202070
  • Loading branch information
bapt committed Nov 8, 2021
1 parent b8fdcc0 commit 62f3ada
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Makefile
Expand Up @@ -64,9 +64,7 @@ PORTSTOP= yes

.include <bsd.port.subdir.mk>

index:
@rm -f ${INDEXDIR}/${INDEXFILE}
@cd ${.CURDIR} && ${MAKE} ${INDEXDIR}/${INDEXFILE}
index: ${INDEXDIR}/${INDEXFILE}

fetchindex: ${INDEXDIR}/${INDEXFILE}.bz2
@bunzip2 < ${INDEXDIR}/${INDEXFILE}.bz2 > ${INDEXDIR}/${INDEXFILE} && \
Expand Down Expand Up @@ -110,7 +108,7 @@ MAKE_INDEX= /usr/libexec/make_index /dev/stdin
MAKE_INDEX= perl ${.CURDIR}/Tools/make_index
.endif

${INDEXDIR}/${INDEXFILE}:
${INDEXDIR}/${INDEXFILE}: .PHONY
@${INDEX_ECHO_1ST} "Generating ${INDEXFILE} - please wait.."; \
if [ "${INDEX_PRISTINE}" != "" ]; then \
export LOCALBASE=/nonexistentlocal; \
Expand Down

0 comments on commit 62f3ada

Please sign in to comment.