File: Makefile

package info (click to toggle)
slony1-2 2.0.4-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 6,716 kB
  • ctags: 4,089
  • sloc: ansic: 17,784; sh: 12,592; xml: 8,185; sql: 7,314; yacc: 2,468; perl: 2,376; lex: 1,321; makefile: 909; awk: 24
file content (128 lines) | stat: -rw-r--r-- 2,823 bytes parent folder | download
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# ----------
# Makefile for the Slony-I implementation paper
#
#	Copyright (c) 2003-2009,  PostgreSQL Global Development Group
#	Author: Jan Wieck, Afilias USA INC.
#
# $Id: Makefile,v 1.13.2.1 2009-08-17 16:56:09 devrim Exp $
# ----------

slony_subdir = doc/implementation
slony_top_builddir = ../..
include $(slony_top_builddir)/Makefile.global

GOPTS	= -U -t -p -ms -mpspic

# IMG_WID	= 1799
# IMG_HT	= 1440
IMG_WID	= 900
IMG_HT	= 720

SRC_CONCEPT =	Slony-I-implementation.nr	\
				Makefile			\
				figure-1.pic		\
				figure-2.pic		\
				Slon.eps

PDF		= Slony-I-implementation.pdf

PS		= Slony-I-implementation.ps

TXT		= Slony-I-implementation.txt

DISTFILES = Makefile $(wildcard *.pic) Slon_900x720.jpg Slony-I-implementation.nr

all:		all-ps all-pdf all-txt

all-ps:		Slon.eps $(PS)

all-pdf:	Slon.eps $(PDF)

all-txt:	Slon.eps $(TXT)

installdirs:
ifdef docdir
	$(mkinstalldirs) $(DESTDIR)$(docdir)/implementation
endif

install: all installdirs
ifdef docdir
	for file in $(PS) $(PDF) $(TXT) Slon.eps Slon_$(IMG_WID)x$(IMG_HT).jpg ; do \
	  $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/implementation || exit; \
	done
endif

clean distclean maintainer-clean:
	rm -f $(PS) $(PDF) $(TXT) tmp.* Slon.eps

Slony-I-implementation.ps:	$(SRC_CONCEPT)
Slony-I-implementation.pdf:	$(SRC_CONCEPT)
Slony-I-implementation.txt:	$(SRC_CONCEPT)

Slon.eps:	Slon_$(IMG_WID)x$(IMG_HT).jpg
ifdef DJPEG
  ifdef PNMTOPS
		$(DJPEG) $< | $(PNMTOPS) -rle -noturn >$@
  else
    ifdef CONVERT
		$(CONVERT) $< >$@ || echo "unable to create $@ from $<"
    else
		@echo "unable to create $@ from $<"
    endif
  endif
else
  ifdef CONVERT
		$(CONVERT) $< >$@ || echo "unable to create $@ from $<"
  else
		@echo "unable to create $@ from $<"
  endif
endif

%.ps:	%.nr
ifdef GROFF
		@echo ".XS 1"	> tmp.idx
		@echo "dummy"	>>tmp.idx
		@echo ".XE"		>>tmp.idx
		@echo ""		> tmp.old
		-$(GROFF) $(GOPTS) $< >$@ 2>/dev/null
		@n=0 ; \
		while ! cmp tmp.idx tmp.old >/dev/null ; do \
			cp tmp.idx tmp.old ; \
			n=`expr $$n + 1` ; \
			if [ $$n -gt 10 ] ; then break ; fi ; \
			echo "$(GROFF) $(GOPTS) $< >$@" ; \
			$(GROFF) $(GOPTS) $< >$@ ; \
		done
		@rm -f tmp.*
endif

%.txt:	%.nr
ifdef GROFF
		@echo ".XS 1"	> tmp.idx
		@echo "dummy"	>>tmp.idx
		@echo ".XE"		>>tmp.idx
		@echo ""		> tmp.old
		-$(GROFF) -Tlatin1 $(GOPTS) $< >$@ 2>/dev/null
		@n=0 ; \
		while ! cmp tmp.idx tmp.old >/dev/null ; do \
			cp tmp.idx tmp.old ; \
			n=`expr $$n + 1` ; \
			if [ $$n -gt 10 ] ; then break ; fi ; \
			echo "$(GROFF) -Tlatin1 $(GOPTS) $< >$@" ; \
			$(GROFF) -Tlatin1 $(GOPTS) $< >$@ ; \
		done
		@rm -f tmp.*
endif

%.pdf:	%.ps
ifdef PS2PDF
		$(PS2PDF) $<
endif

distdir: $(DISTFILES)
	mkdir $(distdir)/$(subdir)
	-chmod 777 $(distdir)/$(subdir)
	for file in $(DISTFILES) ; do \
      cp $$file $(distdir)/$(subdir)/$$file || exit; \
    done