Commit 9d001f10 by Ewan Klein

modified Makefile targets for rebuilding data index file

parent 5de11e9d
...@@ -5,28 +5,34 @@ ...@@ -5,28 +5,34 @@
# URL: <http://www.nltk.org/> # URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT # For license information, see LICENSE.TXT
PUBLISH = ../../../nltk_data/packages/grammars DATADIR = ../../../nltk_data
PUBLISH = $(DATADIR)/packages/grammars
PACKAGE_DIRS = book_grammars sample_grammars #basque_grammars spanish_grammars PACKAGE_DIRS = book_grammars sample_grammars #basque_grammars spanish_grammars
PACKAGES := $(addsuffix .zip, $(PACKAGE_DIRS)) PACKAGES := $(addsuffix .zip, $(PACKAGE_DIRS))
ZIP = zip ZIP = zip
define remove
$(if $(wildcard $1), rm $1,)
endef
all: publish all: publish
ci: ci:
svn ci -m "updated grammar files" git ci -m "updated grammar files"
zip: clean $(PACKAGES) zip: clean $(PACKAGES)
clean: clean:
rm *.zip $(call remove, *.zip)
%.zip: % %.zip: %
$(ZIP) -r $< $< -x \*.svn* $(ZIP) -r $< $<
git add *zip
publish: zip publish: zip
cp $(PACKAGES) $(PUBLISH) cp $(PACKAGES) $(PUBLISH)
svn commit -m "updated grammar files" ../../../nltk_data/packages/grammars $(MAKE) -C $(DATADIR) grammars
$(MAKE) -C ../.. pkg_index $(MAKE) -C $(DATADIR) pkg_index
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment