forked from michaelrsweet/epm
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile.in
More file actions
133 lines (113 loc) · 3.85 KB
/
Makefile.in
File metadata and controls
133 lines (113 loc) · 3.85 KB
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
129
130
131
132
133
#
# Makefile for the ESP Package Manager (EPM) documentation.
#
# Copyright © 2020 by Jim Jagielski
# Copyright © 1999-2020 by Michael R Sweet
# Copyright © 1999-2006 by Easy Software Products, all rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.#
# Programs...
CC = @CC@
HTMLDOC = @HTMLDOC@
RM = @RM@ -f
INSTALL = @INSTALL@
# Program options...
ARFLAGS = @ARFLAGS@
ARCHFLAGS = @ARCHFLAGS@
CFLAGS = $(ARCHFLAGS) @CFLAGS@ $(OPTIM)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = $(ARCHFLAGS) @LDFLAGS@ $(OPTIM)
LIBS = @LIBS@
OPTIM = @OPTIM@
# Directories...
bindir = @bindir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
exec_prefix = @exec_prefix@
includedir = @includedir@
infodir = @infodir@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
privateinclude = @privateinclude@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
top_srcdir = @top_srcdir@
BUILDROOT = $(DSTROOT)$(RPM_BUILD_ROOT)$(DESTDIR)
VPATH = $(srcdir)
# Man page generation rule...
.SUFFIXES: .html .1 .5
.1.html .5.html:
$(RM) $@
./mantohtml $< >$@
# Targets...
MANPAGES = epm.html epminstall.html mkepmlist.html setup.html
HTMLFILES = title.html preface.html 1-intro.html 2-building.html \
3-packaging.html 4-advanced.html 5-examples.html \
a-license.html b-manpages.html c-reference.html \
$(MANPAGES)
BOOKS = epm-book.epub epm-book.html epm-book.pdf
# Make everything (requires HTMLDOC)
all: $(MANPAGES) $(BOOKS)
# Clean generated programs
clean:
$(RM) mantohtml mantohtml.o
# Install documentation
install:
echo Installing EPM manpages in $(BUILDROOT)$(mandir)/man1
$(INSTALL) -d -m 755 $(BUILDROOT)$(mandir)/man1
for file in epm.1 epminstall.1 mkepmlist.1 setup.1; do \
$(INSTALL) -c -m 644 $$file $(BUILDROOT)$(mandir)/man1; \
done
echo Installing EPM manpages in $(BUILDROOT)$(mandir)/man5
$(INSTALL) -d -m 755 $(BUILDROOT)$(mandir)/man5
for file in epm.list.5 setup.types.5; do \
$(INSTALL) -c -m 644 $$file $(BUILDROOT)$(mandir)/man5; \
done
echo Installing EPM documentation in $(BUILDROOT)$(docdir)
$(INSTALL) -d -m 755 $(BUILDROOT)$(docdir)
for file in $(srcdir)/../LICENSE $(srcdir)/../README.md $(BOOKS); do \
$(INSTALL) -c -m 644 $$file $(BUILDROOT)$(docdir); \
done
# Uninstall all targets...
uninstall:
echo Uninstalling EPM manpages from $(BUILDROOT)$(mandir)/man1
$(RM) $(BUILDROOT)$(mandir)/man1/epm.1
$(RM) $(BUILDROOT)$(mandir)/man1/epminstall.1
$(RM) $(BUILDROOT)$(mandir)/man1/mkepmlist.1
$(RM) $(BUILDROOT)$(mandir)/man1/setup.1
echo Uninstalling EPM manpages from $(BUILDROOT)$(mandir)/man5
$(RM) $(BUILDROOT)$(mandir)/man5/epm.list.5
$(RM) $(BUILDROOT)$(mandir)/man5/setup.types.5
echo Uninstalling EPM documentation from $(BUILDROOT)$(docdir)
$(RM) -r $(BUILDROOT)$(docdir)
# EPUB book
epm-book.epub: $(HTMLFILES) epm-256.png setup.png title.png epm-book.book
$(HTMLDOC) --batch epm-book.book --titleimage title.png -f epm-book.epub
# HTML book
epm-book.html: $(HTMLFILES) epm-256.png setup.png epm-book.book
$(HTMLDOC) --batch epm-book.book -f epm-book.html
# PDF book
epm-book.pdf: $(HTMLFILES) epm-256.png setup.png epm-book.book
$(HTMLDOC) --batch epm-book.book --size universal -f epm-book.pdf
# mantohtml
mantohtml: mantohtml.o
$(CC) -o $@ mantohtml.o
# HTML man pages
$(MANPAGES): mantohtml