123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- TEXPICDIR = $(TOP)/outpics ;
- SOURCEPICDIR = $(TOP)/srcpics ;
- rule TexPic
- {
- Depends $(1) : $(1).eps ;
- # LOCATE on $(2) = $(SOURCEPICDIR) ;
- LOCATE on $(2) = $(SOURCEPICDIR) ;
- Depends $(1).eps : $(2) $(3) $(4) $(5) $(6) ;
- MyTexPic $(1).eps : $(1).tex ;
- }
- rule MyTexPic
- {
- # LOCATE on $(1) = $(SEARCH_SOURCE) ;
- LOCATE on $(1) = $(TEXPICDIR) ;
- LOCATE on $(2) = $(SEARCH_SOURCE) ;
- Depends pics : $(1) ;
- Depends $(1) : $(2) ;
- LatexPic $(1) : $(2) ;
- }
- rule PdfTexPic
- {
- Depends $(1) : $(1).eps ;
- LOCATE on $(2) = $(SOURCEPICDIR) ;
- LOCATE on $(1).eps = $(TEXPICDIR) ;
- Depends $(1).eps : $(1).pdf ;
- Depends $(1).pdf : $(2) $(3) $(4) $(5) $(6) ;
- Depends pics : $(1).eps ;
- MyPdfTexPic $(1).pdf : $(1).tex ;
- MyEpsFromPdf $(1).eps : $(1).pdf ;
- }
- rule MyPdfTexPic
- {
- LOCATE on $(1) = $(TEXPICDIR) ;
- LOCATE on $(2) = $(SEARCH_SOURCE) ;
- Depends $(1) : $(2) ;
- PdfLatexPic $(1) : $(2) ;
- }
- rule MyEpsFromPdf
- {
- EpsFromPdf $(1) : $(2) ;
- }
- actions LatexPic
- {
- echo ActionLatexPic
- cd $(SEARCH_SOURCE)
- latex $(2:D=.)
- # echo dvivile= $(1:D=$(SEARCH_SOURCE)).tmp
- dvips -E -o $(1:D=.).tmp $(1:D=.:S=.dvi)
- echo crop eps file
- cd $(PWD)
- pwd
- epscrop $(1:D=$(SEARCH_SOURCE)).tmp > $(1)
- echo $(TOPDIR)
- }
- actions PdfLatexPic
- {
- echo ActionPdfLatexPic
- cd $(SEARCH_SOURCE)
- pdflatex $(2:D=.)
- cd $(PWD)
- cp $(1:D=$(SEARCH_SOURCE):S=.pdf) $(1:S=.pdf)
- }
- actions EpsFromPdf
- {
- pwd
- echo EpsFromPdf $(1) $(2)
- gs -dEPSCrop -dTextAlphaBits=4 -sDEVICE=epswrite -sOutputFile=$(1).tmp -dNOPAUSE -dBATCH $(2)
- echo epscrop $(1).tmp > $(1)
- epscrop $(1).tmp > $(1)
- }
|