File: Makefile

package info (click to toggle)
docbook-to-man 1%3A2.0.0-31
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,332 kB
  • sloc: ansic: 5,819; sh: 1,371; makefile: 158
file content (136 lines) | stat: -rw-r--r-- 4,525 bytes parent folder | download | duplicates (6)
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
#
# Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
# All rights reserved.
#
# Copyright (c) 1994  
# Open Software Foundation, Inc. 
#  
# Permission is hereby granted to use, copy, modify and freely distribute 
# the software in this file and its documentation for any purpose without 
# fee, provided that the above copyright notice appears in all copies and 
# that both the copyright notice and this permission notice appear in 
# supporting documentation.  Further, provided that the name of Open 
# Software Foundation, Inc. ("OSF") not be used in advertising or 
# publicity pertaining to distribution of the software without prior 
# written permission from OSF.  OSF makes no representations about the 
# suitability of this software for any purpose.  It is provided "as is" 
# without express or implied warranty. 
#
# Copyright (c) 1996 X Consortium
# Copyright (c) 1996 Dalrymple Consulting
# 
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
# X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# 
# Except as contained in this notice, the names of the X Consortium and
# Dalrymple Consulting shall not be used in advertising or otherwise to
# promote the sale, use or other dealings in this Software without prior
# written authorization.
#
#
# For building 'instant'.
#
# J.Bowe, 1993
#
#  $Header: /aolnet/dev/src/CVS/sgml/docbook-to-man/Instant/Makefile,v 1.3 1999/02/23 22:21:26 db3l Exp $
#
# This assumes you have the (tpt)regexp package (includes and library)
# available.
#
# Some things you could set at your site.
#   XDEFINES   = ...				# for extra defines
#   REGEX_INC  = -I../tptregexp			# should be here with release
#   REGEX_LIB  = ../lib/tptregexp		# assumes you built it there
#   BINDIR     = /usr/local/bin			# where you keep your programs
# (You should set DEF_TPT_LIB to something, or set it in general.h.
# At OSF we use the default in that file.)
#
#   -DSTRERROR to DEFINES if library does not have strerror()   [ANS-db3l]
#
MAKE =	make
SHELL =	/bin/sh

ROOT		= /usr/local

TPTLIB		= $(ROOT)/share/sgml/transpec
REGEX_INC	= -Itptregexp
REGEX_LIB	= tptregexp
BINDIR		= $(ROOT)/bin
DEFINES		= -DDEF_TPT_LIB=\"$(TPTLIB)\" $(XDEFINES)

CC	= gcc

OPT	= -g
REGEX	= -L$(REGEX_LIB) -ltptregexp

CFILES	= main.c util.c info.c translate.c traninit.c tranvar.c tables.c \
	browse.c
HFILES	= general.h translate.h
OBJ	= main.o util.o info.o translate.o traninit.o tranvar.o tables.o \
	browse.o masterVersion.o
PROGS	= instant

all:	dotptregexp $(PROGS)

%.o : %.c
	$(CC) -c $(CFLAGS) $(OPT) $(REGEX_INC) $(DEFINES) $< -o $@

dotptregexp:
	cd tptregexp; $(MAKE) all

instant: $(OBJ)
	$(CC) -o $@ $(LDFLAGS) $(OBJ) $(REGEX)

install: all
	cp $(PROGS) $(BINDIR)


Version:	allVersion.o

allVersion.c:	$(HFILES) $(CFILES) Makefile
	co -l allVersion.c
	makeVersionFile $(HFILES) $(CFILES) Makefile > allVersion.c
	ci -u -m"new master version number" allVersion.c
	makeVersionFile -n instant allVersion.c > masterVersion.c


clean:
	rm -f $(OBJ) allVersion.o lint.out core tags
	cd tptregexp; make clean

clobber:	clean
	rm -f $(PROGS)
	cd tptregexp; make clobber

tags: $(CFILES) $(HFILES)
	ctags $(CFILES) $(HFILES)

lint:
	gcc -Wall -Dlint $(REGEX_INC) -c $(CFILES) >lint.out 2>&1
#	lint $(CFILES) > lint.out

# dependencies
main.o:		main.c general.h
util.o:		util.c general.h
info.o:		info.c general.h
translate.o:	translate.c general.h translate.h
traninit.o:	traninit.c general.h translate.h
tranvar.o:	tranvar.c general.h translate.h
tables.o:	tables.c general.h translate.h
browse.o:	browse.c general.h