Makefile
changeset 1 b23e948de24a
parent 0 604037699664
child 3 cc5593c28a4b
--- a/Makefile	Sun Jun 28 16:45:39 2009 +0300
+++ b/Makefile	Sun Jun 28 19:46:11 2009 +0300
@@ -1,4 +1,5 @@
 
+# On Debian Etch 'stardict-tools' package not placed tools in any system bin dir.
 export PATH := $(PATH):/usr/lib/stardict-tools
 
 DICSETNAME = gavenkoa-dicts
@@ -8,7 +9,9 @@
 datadir = $(datarootdir)/stardict
 dicdir = $(datadir)/dic/$(DICSETNAME)
 
-F_TAB = $(wildcard *.tab)
+F_TAB_ = $(wildcard *.tab_)
+
+F_TAB = $(patsubst %.tab_,%.tab,$(F_TAB_))
 FNAME = $(patsubst %.tab,%,$(F_TAB))
 F_DICT = $(patsubst %.tab,%.dict.dz,$(F_TAB))
 F_IFO = $(patsubst %.tab,%.ifo,$(F_TAB))
@@ -23,6 +26,9 @@
 
 dist: $(F_DICT)
 
+%.tab: %.tab_
+	sed 's_\\n _\\n_g' > $@ < $<
+
 %.dict.dz: %.tab
 	tabfile $<
 
@@ -39,5 +45,5 @@
 
 clean:
 	for dic in $(FNAME); do \
-		rm -f $$dic.dict.dz $$dic.idx $$dic.ifo; \
+		rm -f $$dic.dict.dz $$dic.idx $$dic.ifo $$dic.tab; \
 	done