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 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
|
#
# Makefile for PolyglotMan
# It's helpful to read the README-rman file first.
# You should read over all parts of this file,
# down to the "you shouldn't modify" line
#
# Tom Phelps (phelps@ACM.org)
#
### you need to localize the paths on these lines
# The executable `rman' is placed in BINDIR.
# If you're also installing TkMan (available separately--see README-rman),
# this must be a directory that's in your bin PATH.
# MANDIR holds the man page.
BINDIR = /usr/local/bin
#BINDIR = //C/bin
MANDIR = /home/auspex/h/bair/phelps/man/man1
#MANDIR = /usr/local/man/man1
### if you have GNU gcc v2.x, use these definitions
CC = gcc
# if you don't have gcc v2.x, try -O for CFLAGS
CFLAGS = -O2 -finline-functions
### if you just have a standard UNIX, use these instead of GNU.
### CC must be an ANSI C compiler
#CC = cc
#CFLAGS = -O
# Solaris and SysV people may need this
#CFLAGS = -O2 -finline-functions
# For HP-UX
#CC = cc
#CFLAGS = -Aa -O
# HP-UX 10.20
#CFLAGS = -Ae -O
# DEC Alpha and Ultrix, -std1 needed to conform to ANSI C
#CC = cc
#CFLAGS = -std1 -O3 -Olimit 1000
# list of valid volume numbers and letters
# you can also set these at runtime with -V
VOLLIST = "1:2:3:4:5:6:7:8:9:o:l:n:p"
# SCO Unix has expanded set of volume letters
#VOLLIST = "1:2:3:4:5:6:7:8:9:o:l:n:p:C:X:S:L:M:F:G:A:H"
# SGI and UnixWare 2.0
#VOLLIST = "1:2:3:4:5:6:7:8:9:o:l:n:p:D"
# the printf strings used to set the <TITLE> and
# to set URL hyperlinks to referenced manual pages
# can be defined at runtime. The defaults are defined below.
# The first %s parameter is the manual page name,
# the second the volume/section number.
# you can set these at runtime with -l and -r, respectively
MANTITLEPRINTF = "%s(%s) manual page"
# relative link to pregenerated file in same directory
MANREFPRINTF = "%s.%s"
# on-the-fly through a cgi-bin script
#MANREFPRINTF = "/cgi-bin/man2html?%s&%s"
# # # these lines are probably fine
CP = cp
# or you can use GNU's cp and backup files that are about to be overwritten
#CP = cp -b
RM = rm
#--------------------------------------------------
#
# you shouldn't modify anything below here
#
#--------------------------------------------------
version = 3.0.9
rman = rman-$(version)
srcs = rman.c getopt.c macish.c
objs = rman
defs = -DVOLLIST='$(VOLLIST)' -DMANTITLEPRINTF='$(MANTITLEPRINTF)' -DMANREFPRINTF='$(MANREFPRINTF)'
libs =
aux = ANNOUNCE-rman README-rman Makefile Makefile.mac rman.1 rman.html CHANGES
distrib = $(srcs) $(libs) $(aux) contrib
all: rman
@echo 'Files made in current directory.'
@echo 'You should "make install".'
# everyone but me zaps assertions with the -DNDEBUG flag
rman: rman.c Makefile
$(CC) -DNDEBUG $(defs) -DPOLYGLOTMANVERSION=\"$(version)\" $(CFLAGS) -o rman rman.c
#rman.1
dox: ANNOUNCE-rman
ANNOUNCE-rman: Announce-rman
sed -e /=========/,/bogusline/p -e d Announce-rman > ANNOUNCE-rman
rman.1: rman.html rman
echo '.TH PolyglotMan 1' > rman.1
cat ../html/html.dtd rman.html | sgmls | ../html/html2man.pl >> rman.1
debug:
$(CC) $(defs) -DDEBUG -DPOLYGLOTMANVERSION=\"debug\" -g -Wall -o rman rman.c
prof:
quantify -cache-dir=/home/orodruin/h/bair/phelps/spine/rman/cache $(CC) -DNDEBUG $(defs) -DPOLYGLOTMANVERSION=\"QUANTIFY\" -g -o rman rman.c
install: rman
# $(INSTALL) -s rman $(BINDIR)
$(RM) -f $(BINDIR)/rman
$(CP) rman $(BINDIR)
$(RM) -f $(MANDIR)/rman.1
$(CP) rman.1 $(MANDIR)
# test version includes assertions
# ginstall rman $(BINDIR)/`arch`
test: rman.c Makefile
$(CC) $(defs) -DPOLYGLOTMANVERSION=\"$(version)\" $(CFLAGS) -Wall -ansi -pedantic -o rman rman.c
ls -l rman
ginstall rman $(BINDIR)
rman -v
rman --help
@echo 'Assertion checks:'
rman -f html weirdman/hp-tbl.1 > /dev/null
rman -f html weirdman/Pnews.1 > /dev/null
nroff -man rman.1 | rman -f html > /dev/null
sww:
rm -f rman $(wildcard ~/bin/{sun4,snake,alpha}/rman)
rman
clean:
rm -f $(objs)
dist: dox
rm -rf $(rman)*
mkdir $(rman)
$(CP) -R $(distrib) $(rman)
# expand -4 rman.c > $(rman)/rman.c
rm -f $(rman)/contrib/*~
@echo 'gcksum crc length name' > MANIFEST
@echo '---------- ------ ----' >> MANIFEST
@cksum $(filter-out contrib, $(filter-out %~, $(distrib) $(wildcard contrib/*))) | tee -a MANIFEST
mv MANIFEST $(rman)
tar chvf $(rman).tar $(rman)
# compress $(rman).tar
gzip -9v $(rman).tar
rm -rf $(rman) ANNOUNCE-rman rman.1
@echo "*** Did you remember to ci -l first?"
uu: tar
gznew $(rman).tar.Z
echo 'uudecode, gunzip (from GNU), untar' > $(rman).tar.gz.uu
uuencode $(rman).tar.gz $(rman).tar.gz >> $(rman).tar.gz.uu
|