| version 1.9, 2003/06/25 14:11:32 |
version 1.10, 2003/06/29 22:08:46 |
|
|
| # Licensed under terms of GNU General Public License. |
# Licensed under terms of GNU General Public License. |
| # All rights reserved. |
# All rights reserved. |
| # |
# |
| # $Platon: Platon.SK/office/_templates/Rules.make,v 1.8 2003/06/11 17:53:09 rajo Exp $ |
# $Platon: Platon.SK/office/_templates/Rules.make,v 1.9 2003/06/25 14:11:32 rajo Exp $ |
| # |
# |
| |
|
| # Other programs configured automaticaly: |
# Other programs configured automaticaly: |
|
|
| DEPEND_all = Makefile \ |
DEPEND_all = Makefile \ |
| ps__OUTPUT \ |
ps__OUTPUT \ |
| pdf_OUTPUT \ |
pdf_OUTPUT \ |
| $(PLATON_STYLE) \ |
$(PLATON_STYLE) \ |
| $(TOP_DIR)/_templates/platon-logo.eps \ |
$(TOP_DIR)/_templates/platon-logo.eps \ |
| $(TOP_DIR)/_templates/platon-logo.png \ |
$(TOP_DIR)/_templates/platon-logo.png \ |
| $(IMAGES) \ |
$(IMAGES) \ |
| Line 42 export DEPEND_all |
|
| Line 42 export DEPEND_all |
|
| ifdef ps__OUTPUT |
ifdef ps__OUTPUT |
| export ps__OUTPUT |
export ps__OUTPUT |
| OUTPUT := $(ps__OUTPUT) |
OUTPUT := $(ps__OUTPUT) |
| endif |
endif # ifdef ps__OUTPUT |
| |
|
| ifdef pdf_OUTPUT |
ifdef pdf_OUTPUT |
| export pdf_OUTPUT |
export pdf_OUTPUT |
| OUTPUT := $(OUTPUT) $(pdf_OUTPUT) |
OUTPUT := $(OUTPUT) $(pdf_OUTPUT) |
| endif |
endif # ifdef pdf_OUTPUT |
| |
|
| ifdef OUTPUT |
ifdef OUTPUT |
| export OUTPUT |
export OUTPUT |
| endif |
endif # ifdef OUTPUT |
| |
|
| ps__INPUT = $(patsubst %.ps,%.tex,$(ps__OUTPUT)) |
ps__INPUT = $(patsubst %.ps,%.tex,$(ps__OUTPUT)) |
| pdf_INPUT = $(patsubst %.pdf,%.tex,$(pdf_OUTPUT)) |
pdf_INPUT = $(patsubst %.pdf,%.tex,$(pdf_OUTPUT)) |
| Line 74 ps__OUTPUT_third = $(patsubst %,.third. |
|
| Line 74 ps__OUTPUT_third = $(patsubst %,.third. |
|
| pdf_OUTPUT_third = $(patsubst %,.third.%,$(pdf_OUTPUT)) |
pdf_OUTPUT_third = $(patsubst %,.third.%,$(pdf_OUTPUT)) |
| OUTPUT_third = $(ps__OUTPUT_third) |
OUTPUT_third = $(ps__OUTPUT_third) |
| |
|
| |
ifdef APPEND_DIRNAME |
| |
ifdef PREFIX |
| |
PREFIX := $(PREFIX)-$(shell basename `pwd`) |
| |
else |
| |
PREFIX := $(shell basename `pwd`) |
| |
endif # ifdef PREFIX |
| |
endif # ifdef APPEND_DIRNAME |
| |
|
| |
|
| |
ifdef PREFIX |
| |
prefix_ps__OUTPUT = $(patsubst %,$(PREFIX)-%,$(ps__OUTPUT)) |
| |
prefix_pdf_OUTPUT = $(patsubst %,$(PREFIX)-%,$(pdf_OUTPUT)) |
| |
endif # ifdef PREFIX |
| |
|
| .SUFFIXES: |
.SUFFIXES: |
| |
|
| # |
# |
| Line 82 OUTPUT_third = $(ps__OUTPUT_third) |
|
| Line 96 OUTPUT_third = $(ps__OUTPUT_third) |
|
| # With variables $(ps__OUTPUT) and $(pdf_OUTPUT) you can customize, |
# With variables $(ps__OUTPUT) and $(pdf_OUTPUT) you can customize, |
| # which type of output you will create. |
# which type of output you will create. |
| # |
# |
| ifdef ps__OUTPUT |
ifdef ps__OUTPUT # {{{ |
| |
ifdef PREFIX |
| |
all: ps-subdir ps-prefixed-output |
| |
else |
| all: ps-subdir |
all: ps-subdir |
| endif |
endif # ifdef PREFIX |
| |
endif # }}} ifdef ps__OUTPUT |
| |
|
| ifdef pdf_OUTPUT |
ifdef pdf_OUTPUT # {{{ |
| |
ifdef PREFIX |
| |
all: pdf-subdir pdf-prefixed-output |
| |
else |
| all: pdf-subdir |
all: pdf-subdir |
| |
endif # ifdef PREFIX |
| |
|
| ifdef ps__OUTPUT |
ifdef ps__OUTPUT # {{{ |
| |
ifdef PREFIX |
| |
all: ps-subdir pdf-subdir ps-prefixed-output pdf-prefixed-output |
| |
@echo 'PREFIX = "$(PREFIX)"' |
| |
else |
| all: ps-subdir pdf-subdir |
all: ps-subdir pdf-subdir |
| endif |
endif # ifdef PREFIX |
| |
endif # }}} ifdef ps__OUTPUT |
| |
|
| endif |
endif # }}} ifdef pdf_OUTPUT |
| # end of taget `all' |
# end of taget `all' |
| |
|
| |
|
|
|
| -@$(BUILD_STRUCT) "PDF" \ |
-@$(BUILD_STRUCT) "PDF" \ |
| && $(MAKE) TOP_DIR=$(TOP_DIR)/.. -C PDF PDF |
&& $(MAKE) TOP_DIR=$(TOP_DIR)/.. -C PDF PDF |
| |
|
| |
|
| PostScript: $(ps__OUTPUT_first) $(ps__OUTPUT_second) $(ps__OUTPUT_third) $(DVI_ps__OUTPUT) $(ps__OUTPUT) |
PostScript: $(ps__OUTPUT_first) $(ps__OUTPUT_second) $(ps__OUTPUT_third) $(DVI_ps__OUTPUT) $(ps__OUTPUT) |
| |
|
| PDF: $(pdf_OUTPUT) |
PDF: $(pdf_OUTPUT) |
| |
|
| |
ifdef PREFIX # {{{ |
| |
ps-prefixed-output: |
| |
-ln -f PostScript/$(ps__OUTPUT) $(prefix_ps__OUTPUT) \ |
| |
|| cp -f PostScript/$(ps__OUTPUT) $(prefix_ps__OUTPUT) |
| |
|
| |
pdf-prefixed-output: |
| |
-ln -f PDF/$(pdf_OUTPUT) $(prefix_pdf_OUTPUT) \ |
| |
|| cp -f PDF/$(pdf_OUTPUT) $(prefix_pdf_OUTPUT) |
| |
endif # }}} ifdef PREFIX |
| |
|
| %.ps: %.dvi $(ps__OUTPUT_first) $(ps__OUTPUT_second) $(ps__OUTPUT_third) |
%.ps: %.dvi $(ps__OUTPUT_first) $(ps__OUTPUT_second) $(ps__OUTPUT_third) |
| $(DVIPS) -o $@ $< |
$(DVIPS) -o $@ $< |
| |
|
| %.pdf: $(pdf_OUTPUT_first) $(DEPEND_all) |
%.pdf: $(pdf_OUTPUT_first) $(DEPEND_all) |
| @file="`echo '$@'`"; \ |
@file="`echo '$@'`"; \ |
| echo "$(PDFTEX_COMPILER) $${file%.pdf}.tex"; \ |
echo "$(PDFTEX_COMPILER) $${file%.pdf}.tex"; \ |
| $(PDFTEX_COMPILER) $${file%.pdf}.tex \ |
$(PDFTEX_COMPILER) $${file%.pdf}.tex |
| |
|
| %.dvi: .third.%.ps |
%.dvi: .third.%.ps |
| |
|
|
|
| |
|
| doc: all |
doc: all |
| |
|
| endif |
endif # ifdef SUBDIRS |
| |
|
| |
|
| # Clean {{{ |
# Clean {{{ |
|
|
| clean: clean-tex-logs clean-graphs clean-postscript clean-pdf |
clean: clean-tex-logs clean-graphs clean-postscript clean-pdf |
| -rm -f .first.* .second.* .third.* core core.* |
-rm -f .first.* .second.* .third.* core core.* |
| |
|
| endif |
endif # ifdef SUBDIRS |
| |
|
| |
ifdef PREFIX |
| clean-postscript: |
clean-postscript: |
| -rm -rf PostScript/ |
-rm -rf PostScript/ |
| |
-rm -f $(prefix_ps__OUTPUT) |
| |
|
| clean-pdf: |
clean-pdf: |
| -rm -rf PDF/ |
-rm -rf PDF/ |
| |
-rm -f $(prefix_pdf_OUTPUT) |
| |
else |
| |
clean-postscript: |
| |
-rm -rf PostScript/ |
| |
|
| |
clean-pdf: |
| |
-rm -rf PDF/ |
| |
endif |
| |
|
| # zmazanie docasnych suborov vytvorenych LaTeXom |
# zmazanie docasnych suborov vytvorenych LaTeXom |
| ifdef OUTPUT |
ifdef OUTPUT |