File: ivritex.mk

package info (click to toggle)
ivritex 1.0-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,200 kB
  • ctags: 83
  • sloc: sh: 133; perl: 121; makefile: 116
file content (95 lines) | stat: -rw-r--r-- 2,071 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
PREFIX=/usr/local
PROJECT=ivritex
VERSION=1.1.0
TEX_ROOT=$(PREFIX)/share/texmf
HEBBIB_SUBDIR=bibtex/ivritex
IVRITEX_BIBDIR=$(TEX_ROOT)/$(HEBBIB_SUBDIR)
# for the moment still put things in a seperate subdir.
# tetex seems to already include hebrew.sty in the babel directory
IVRITEX_DIR=0ivritex
HEBLATEX_SUBDIR=tex/generic/$(IVRITEX_DIR)
HEBLATEX_DOC_SUBDIR=doc/generic/$(IVRITEX_DIR)
HEBREW_TARGET_DIR=$(TEX_ROOT)/$(HEBLATEX_SUBDIR)
HEBREW_TARGET_DOC_DIR=$(TEX_ROOT)/$(HEBLATEX_DOC_SUBDIR)
LATEX=elatex
RM=rm -f
TEX_REHASH=mktexlsr
DVIPS=dvips
PS2PDF=ps2pdf

CONFIG_MAKEFILE=ivritex.mk

RPM_SPEC=$(PROJECT).spec
FILES_LIST_FILE=files_list 
GENERATED_FILES=$(RPM_SPEC) $(FILES_LIST_FILE)

FILES_LIST=$(GENERATED_FILES) $(shell cat $(FILES_LIST_FILE)) 

#as=`kpsewhich --expand-path \\$$TEXMF`
#old_texmf=`kpsewhich --expand-path $$TEXMF`
#ADD_TO_TEXMF=`pwd`/latex/heblatex:`pwd`/fonts
#export TEXMF=$(ADD_TO_TEXMF):$(old_texmf)
#export TEXMF=$(old_texmf)

TAR=tar
CVS=cvs
SED=sed
CP=cp
RM=rm -f
MKDIR=mkdir
DIRNAME=dirname
GREP=grep

TAR_BALL_DIR=$(PROJECT)-$(VERSION)
TAR_BALL=$(PROJECT)-$(VERSION).tar.gz

EXAMPLES=$(TEX_SRC:%=%.dvi) $(TEX_SRC:%=%.ps) $(TEX_SRC:%=%.pdf)
TARGETS+=$(EXAMPLES)
CLEAN+=$(TEX_SRC:%=%.log) $(TEX_SRC:%=%.aux) $(TEX_SRC:%=%.toc) \
       $(EXAMPLES) missfont.log

all: all_subdirs $(TARGETS)

clean: clean_subdirs
	rm -f $(CLEAN)

install: copy_only
	$(TEXREHASH)

copy_only: install_subdirs do_install

ifeq ($(SUBDIRS),)
# if SUBDIRS is not defined those targets should do nothing:
clean_subdirs:
all_subdirs:
install_subdirs:

else

clean_subdirs: $(SUBDIRS)
	@for dir in $(SUBDIRS); do make -C $$dir clean; done

all_subdirs: $(SUBDIRS)
	@for dir in $(SUBDIRS); do make -C $$dir all; done
	
install_subdirs: $(SUBDIRS)
	@for dir in $(SUBDIRS); do make -C $$dir copy_only; done
endif

%.dvi: %.dtx
	$(LATEX) $<
	#makeindex -s bbind.ist hebrew.idx
	#makeindex -s bbglo.ist -o hebrew.gls hebrew.glo
	$(LATEX) $<
	$(LATEX) $<

%.dvi: %.tex
	$(LATEX) $<
	$(LATEX) $<
	$(LATEX) $<

%.ps: %.dvi
	$(DVIPS) -o $@ $<

%.pdf: %.ps
	$(PS2PDF) $< $@