documentation/Makefile
author Florian Pose <fp@igh-essen.com>
Thu, 02 Oct 2008 15:38:35 +0000
changeset 1249 d64ed42e0d11
parent 1202 91d190223daa
child 1289 5b82b6b39c2d
permissions -rw-r--r--
Userspace example with priority.
#------------------------------------------------------------------------------
#
#  LaTeX Makefile
#
#  $Id$
#
#------------------------------------------------------------------------------

FILE := ethercat_doc

LATEX_OPTIONS := -file-line-error-style

COMMANDS := \
	alias \
	config \
	data \
	debug \
	domains \
	master \
	pdos \
	sdos \
	download \
	upload \
	slaves \
	sii_read \
	sii_write \
	states \
	xml

EXT_PREFIX := external/ethercat_
EXT_FILES := $(addprefix $(EXT_PREFIX),$(COMMANDS))
ETHERCAT_CMD := ../tool/ethercat
ETHERCAT_HELP := $(ETHERCAT_CMD) -h

#------------------------------------------------------------------------------

all: pdf

$(EXT_FILES): $(ETHERCAT_CMD)
	@mkdir -pv external
	@echo Creating $@...
	$(shell $(subst $(EXT_PREFIX),$(ETHERCAT_HELP) ,$@) > $@)

pdf: $(EXT_FILES)
	$(MAKE) -C images
	$(MAKE) -C graphs
	pdflatex $(LATEX_OPTIONS) $(FILE)

index:
	makeindex $(FILE)
	makeindex $(FILE).glo -s nomencl.ist -o $(FILE).gls

clean:
	@rm -f $(FILE).aux $(FILE).dvi $(FILE).idx \
		$(FILE).ilg $(FILE).ind $(FILE).log \
		$(FILE).out $(FILE).pdf $(FILE).ps \
		$(FILE).toc $(FILE).lot $(FILE).lof \
		$(FILE).lol $(FILE).glo $(FILE).gls \
		images/*.bak *~

#------------------------------------------------------------------------------