Skip to content

Commit

Permalink
put wiki* files in the correct directory (XXpedia).
Browse files Browse the repository at this point in the history
With the new capability for multiple languages the wiki* files need to be in a subdirectory
of the destdir. The Makefile now puts them in the right place, depending on the
language setting.
  • Loading branch information
akoehn committed Mar 11, 2010
1 parent 8f7adde commit 9f178d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions Makefile
Expand Up @@ -127,6 +127,7 @@ misc-files-install: validate-destdir
.PHONY: validate-destdir
validate-destdir:
@if [ ! -d "${DESTDIR_PATH}" ] ; then echo DESTDIR: "'"${DESTDIR_PATH}"'" is not a directory ; exit 1; fi
@if [ ! -d "${DESTDIR_PATH}/${WIKI_LANGUAGE}pedia" ] ; then echo DESTDIR: "'"${DESTDIR_PATH}/${WIKI_LANGUAGE}pedia"'" is not a directory ; exit 1; fi


# Main program
Expand Down Expand Up @@ -293,6 +294,7 @@ cleandirs:
@if [ -z "${TEMPDIR_PATH}" ] ; then echo missing TEMPDIR ; exit 1 ; fi
${RM} -r "${DESTDIR_PATH}" "${TEMPDIR_PATH}" "${WORKDIR_PATH}"
${MKDIR} "${DESTDIR_PATH}"
${MKDIR} "${DESTDIR_PATH}/${WIKI_LANGUAGE}pedia"
${MKDIR} "${WORKDIR_PATH}"
${MKDIR} "${TEMPDIR_PATH}"

Expand Down Expand Up @@ -344,10 +346,10 @@ combine: validate-destdir

.PHONY: hash
hash: validate-destdir hash-gen
cd "${DESTDIR}" && ${HOST_TOOLS}/hash-gen/hash-gen \
--pfx="${DESTDIR_PATH}/${WIKI_FILE_PREFIX}.pfx" \
--fnd="${DESTDIR_PATH}/${WIKI_FILE_PREFIX}.fnd" \
--hsh="${DESTDIR_PATH}/${WIKI_FILE_PREFIX}.hsh"
cd "${DESTDIR}/${WIKI_LANGUAGE}pedia" && ${HOST_TOOLS}/hash-gen/hash-gen \
--pfx="${DESTDIR_PATH}/${WIKI_LANGUAGE}pedia/${WIKI_FILE_PREFIX}.pfx" \
--fnd="${DESTDIR_PATH}/${WIKI_LANGUAGE}pedia/${WIKI_FILE_PREFIX}.fnd" \
--hsh="${DESTDIR_PATH}/${WIKI_LANGUAGE}pedia/${WIKI_FILE_PREFIX}.hsh"


# o run all stages (for testing small XML sample files)
Expand Down
2 changes: 1 addition & 1 deletion host-tools/offline-renderer/Makefile
Expand Up @@ -47,7 +47,7 @@ TEMPDIR ?= ${WORKDIR}/tmp
WIKI_FILE_PREFIX ?= pedia
WIKI_LANGUAGE ?= en

PREFIX := $(shell ${RESOLVEPATH} ${DESTDIR}/${WIKI_FILE_PREFIX})
PREFIX := $(shell ${RESOLVEPATH} ${DESTDIR}/${WIKI_LANGUAGE}pedia/${WIKI_FILE_PREFIX})
ARTICLES := $(shell ${RESOLVEPATH} ${WORKDIR}/articles.db)
COUNTS_FILE := $(shell ${RESOLVEPATH} ${WORKDIR}/counts.text)
TEMPLATE_FILE := $(shell ${RESOLVEPATH} ${WORKDIR}/templates.db)
Expand Down

0 comments on commit 9f178d3

Please sign in to comment.