summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipng/Makefile.in.work
blob: 0319f9844601752506b7fa6779d41decd435c29c (plain)
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
96
#************************************************************************

CC = @CC@
CFLAGS = @CFLAGS@ -Wall
CPPFLAGS = @CPPFLAGS@ -I.
LN_S = @LN_S@

MAKEINFO=@MAKEINFO@ @MAKEINFO_MACROS@
INSTALL_INFO=@INSTALL_INFO@
TEX=tex
TEXIDVI=texi2dvi
TEXIHTML=texi2html
DVIPS=dvips
TEXIFILES = dvipng.texi readme.texi install.texi macros.texi dvipng.help

all: dvipng docs

####################################### The program

dvipng: $(objects)
	$(CC) $(LDFLAGS) $(objects) -o dvipng $(LIBS) 

$(objects): dvipng.h commands.h config.h

####################################### The documentation

docs: dvipng.dvi dvipng.info

dvipng.dvi: $(TEXIFILES)
	-$(TEXIDVI) -I $(srcdir) $(srcdir)/dvipng.texi

dvipng.ps: dvipng.dvi
	$(DVIPS) -Ppdf dvipng.dvi 

dvipng.info: $(TEXIFILES) dvipng.help
	-$(MAKEINFO) -I$(srcdir) $(srcdir)/dvipng.texi

dvipng.help: dvipng
	-./dvipng > dvipng.tmp
	( test -r dvipng.help && diff dvipng.tmp dvipng.help ) \
		|| cp dvipng.tmp dvipng.help
	rm -f dvipng.tmp

www: $(TEXIFILES) dvipng.help
	texi2html -split chapter -nosec-nav -subdir html \
	   -I $(srcdir) $(srcdir)/dvipng.texi
	(cd html; for i in *; do \
	   sed -e "s/Jan-A/Jan-\&Aring\;/g" $$i > ../www/$$i; \
	done) 
	cp www/dvipng.html www/index.html
	rm -rf html

dvipng_mono.html: $(TEXIFILES) dvipng.help
	texi2html --monolithic -nomenu -nosec_nav -o dvipng_mono.html \
		 -I $(srcdir) $(srcdir)/dvipng.texi

install-docs: docs
	-$(MKINSTALLDIRS) $(DESTDIR)$(infodir)
	for x in dvipng.info* ; do \
		$(INSTALL_DATA) $$x $(DESTDIR)$(infodir) ; \
	done
	-$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) dvipng.info

####################################### The test

test: test_dvipng.dvi dvipng
	./dvipng -T tight -strict test_dvipng
	echo View the result e.g. with xv test_dvipng\*.png

test_dvipng.dvi: test_dvipng.tex
	latex $(srcdir)/test_dvipng.tex

####################################### Maintainer targets

INSTALL: install.texi
	-$(MAKEINFO) -D rawfile --no-headers --no-validate \
		--no-number-sections \
		-I$(srcdir) $(srcdir)/install.texi --output INSTALL

README: readme.texi
	-$(MAKEINFO) -D rawfile --no-headers --no-validate \
		--no-number-sections \
		-I$(srcdir) $(srcdir)/readme.texi --output README

dvipng.1: dvipng.texi readme.texi
	texi2pod.pl -D man $(srcdir)/dvipng.texi | \
	sed -es/@//g -es/previewlatex/preview-latex/g -es/{}//g > dvipng.pod
	pod2man --center="User commands" --release=$(PACKAGE_STRING)\
		dvipng.pod > dvipng.1
	rm dvipng.pod

dist: INSTALL README dvipng.1 distclean

# SunOS make suffix rule wierdness
.cps.h: