File: Makefile

package info (click to toggle)
octave-interval 3.2.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,564 kB
  • sloc: ansic: 31,664; sh: 4,401; cpp: 2,985; objc: 1,662; makefile: 246; xml: 58; sed: 8
file content (46 lines) | stat: -rw-r--r-- 1,664 bytes parent folder | download | duplicates (5)
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
## This is part of the GNU Octave Interval Package.
## Copyright 2015 Oliver Heimlich.
## See the file COPYING for copying conditions.

SHELL      = /bin/sh
M_IMAGE    = $(wildcard image/*.m) $(patsubst %.m.texinfo,%.m,$(wildcard image/*.m.texinfo))
IMAGE_OBJ  = $(patsubst %,%.png,$(M_IMAGE))
OBJ        = manual.html manual.pdf $(IMAGE_OBJ)
MAKEINFO  ?= makeinfo
VERSION   ?= $(shell grep "^Version: " ../packinfo/DESCRIPTION ../DESCRIPTION | head -1 | cut -f2 -d" ")
OCTAVE    ?= octave

.PHONY: all clean images

all: $(OBJ)

images: $(IMAGE_OBJ)

manual.html: manual.texinfo $(wildcard chapter/*) license/gpl-3.0.texi $(wildcard image/*.texinfo) $(IMAGE_OBJ)
	@echo " [MAKEINFO --html] $<"
	@$(MAKEINFO) -D 'version $(VERSION)' --html --no-split --css-include manual.css "$<"

manual.pdf: manual.texinfo $(wildcard chapter/*) license/gpl-3.0.texi $(wildcard image/*.texinfo) $(wildcard image/*.pdf) $(IMAGE_OBJ)
	@echo " [MAKEINFO --pdf] $<"
	@$(MAKEINFO) --Xopt=--texinfo='@set version $(VERSION)' --pdf "$<"

image/%.m.png: image/%.m
	@echo " [OCTAVE] $<"
	@$(OCTAVE) --no-history \
		--eval "addpath ('../inst');" \
		--eval "addpath ('../src');" \
		--eval "set (0, 'defaultfigurevisible', 'off');" \
		--eval "source ('$<');" \
		--eval "print (gcf, '$@');"
	@# The image size is too large for inclusion in the pdf,
	@# thus we increase the resolution from 150 to 250 dpi.
	@echo " [IMAGEMAGICK] $@"
	@convert -density 98.425 -units PixelsPerCentimeter "$@" "$@"

image/%.m: image/%.m.texinfo
	@echo " [MAKEINFO --plaintext] $<"
	@$(MAKEINFO) -D m-file --plaintext "$<" > "$@"

clean:
	$(RM) $(OBJ)
	$(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr