#
# Copyright (C) 2007, 2008 Kazuhiro Ito
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#

PACKAGE = wikipedia-fpw-20080528
DIR = WIKIP
SRCDIR = .
COPYRIGHT_FILE = GFDL
COMMON_SOURCES = ${SRCDIR}/wikipedia.xml wikipedia-fpw.conf
SOURCES = ${COMMON_SOURCES} tables
PACKAGEEXTRA = ${COPYRIGHT_FILE} README.PKG
PREPARSER = preparser

ARCHIVEEXTRA = ChangeLog COPYING entities.pl wikipedia-fpw.conf tables ${PREPARSER} ${PACKAGEEXTRA}
FPWPARSER = fpwwikipedia
FPWPARSERFLAGS = ${SOURCES} ${COPYRIGHT_FILE}
PREPARSE_DEP = ${SRCDIR}/preparse.dep
ALLDEPS = ${PREPARSE_DEP}
CLEANEXTRA = ${PREPARSE_DEP} ${SRCDIR}/entries

.SUFFIXES:

include fpwutils.mk

${PREPARSE_DEP}: ${COMMON_SOURCES} ${PREPARSER}
	@rm -f ${PARSE_DEP}
	${PERL} ${PERLINCFLAGS} ${PERLFLAGS} ${PREPARSER} \
	  ${SRCDIR}/wikipedia.xml ${SRCDIR}/entries
	@echo timestamp > ${SRCDIR}/preparse.dep
