chiark / gitweb /
Reran autoconf/autoheader (autoconf Debian 2.13-54).
[userv.git] / Makefile.in
1 #  userv - Makefile.in
2 #  
3 #  Copyright (C)1996-1997,1999 Ian Jackson
4 #  
5 #  This is free software; you can redistribute it and/or modify it
6 #  under the terms of the GNU General Public License as published by
7 #  the Free Software Foundation; either version 2 of the License, or
8 #  (at your option) any later version.
9 #  
10 #  This program is distributed in the hope that it will be useful, but
11 #  WITHOUT ANY WARRANTY; without even the implied warranty of
12 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 #  General Public License for more details.
14 #  
15 #  You should have received a copy of the GNU General Public License
16 #  along with userv; if not, write to the Free Software
17 #  Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 VERSION=@VERSION@
20 VEREXT=std
21
22 CC=@CC@
23 CFLAGS=@CFLAGS@ $(XCFLAGS) -DVERSION='"$(VERSION)"' -DVEREXT='"$(VEREXT)"' $(WERROR)
24 OPTIMISE=@OPTIMISE@
25 CPPFLAGS=@DEBUGDEFS@ $(XCPPFLAGS)
26 LDLIBS=@DEBUGLIBS@ @LIBS@ $(XLDLIBS)
27
28 M4=m4
29 M4FLAGS=
30 LEX=flex
31 MD5SUM=@MD5SUM_SIMPLE@
32 CWD=$(shell pwd)
33
34 INSTALL_GROUP=root
35 INSTALL_FLAGS=-o root -g $(INSTALL_GROUP)
36
37 INSTALL=@INSTALL@
38 INSTALL_PROGRAM=@INSTALL_PROGRAM@ $(INSTALL_FLAGS)
39 INSTALL_DATA=@INSTALL_DATA@ $(INSTALL_FLAGS)
40 prefix=@prefix@
41 exec_prefix=$(prefix)
42 bindir=$(exec_prefix)/bin
43 mandir=$(prefix)/man
44 man1dir=$(mandir)/man1
45 man8dir=$(mandir)/man8
46 sbindir=$(exec_prefix)/sbin
47 etcdir=/etc
48 etcsubdir=$(etcdir)/userv
49 docdir=$(prefix)/userv
50
51 TARGETS=        daemon client
52 TARGETS_DOC_PS= spec.ps overview.ps
53 TARGETS_DOC_RM= $(TARGETS_DOC_PS) spec.html
54 TARGETS_DOC=    $(TARGETS_DOC_PS) spec.html/index.html
55 MAN1PAGES=      userv.1
56 MAN8PAGES=      uservd.8
57
58 SOURCES=        Makefile.in configure.in acconfig.h                     \
59                 client.c common.h                                       \
60                 overlord.c process.c servexec.c                         \
61                 daemon.h debug.c parser.c lib.c lib.h                   \
62                 language.i4 lexer.l.m4 tokens.h.m4
63
64 CONFIG_RESULTS= config.status config.log config.h config.cache \
65                 Makefile pcsum.h
66
67 GENSHIP_CLEAN=  lexer.l lexer.c tokens.h config.h.in spec.sgml $(TARGETS_DOC)
68 GENSHIP=        $(GENSHIP_CLEAN) configure
69
70 all:            $(TARGETS)
71
72 docs:           $(TARGETS_DOC)
73
74 install:        all
75                 $(INSTALL_PROGRAM) -m 755 daemon $(sbindir)/uservd
76                 $(INSTALL_PROGRAM) -m 4755 client $(bindir)/userv
77                 $(INSTALL) -d -m 2755 $(etcsubdir) \
78         $(etcsubdir)/default.d $(etcsubdir)/services.d $(etcsubdir)/override.d
79                 if test ! -f $(etcsubdir)/system.default; then \
80                         $(INSTALL_DATA) system.default $(etcsubdir); fi
81                 if test ! -f $(etcsubdir)/system.override; then \
82                         $(INSTALL_DATA) system.override $(etcsubdir); fi
83
84 install-strip:
85                 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
86
87 install-doc:    $(TARGETS_DOC)
88                 $(INSTALL) -d -m 2755 $(docdir) $(docdir)/spec.html
89                 $(INSTALL) -d -m 2755 $(mandir) $(man1dir) $(man8dir)
90                 $(INSTALL_DATA) -m 644 $(TARGETS_DOC_PS) $(docdir)/.
91                 $(INSTALL_DATA) -m 644 spec.html/*.html $(docdir)/spec.html/.
92                 $(INSTALL_DATA) -m 644 $(MAN1PAGES) $(man1dir)
93                 $(INSTALL_DATA) -m 644 $(MAN8PAGES) $(man8dir)
94
95 uninstall:
96                 rm -f $(bindir)/userv $(sbindir)/uservd
97
98 uninstall-doc:
99                 cd $docdir && rm -rf $(TARGETS_DOC_RM)
100
101 check:
102                 @echo There is no validation suite for this package.
103
104 daemon:         overlord.o process.o servexec.o parserlexer.o debug.o lib.o both.o
105                 $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
106
107 client:         client.o both.o
108                 $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
109
110 lexer.l:        language.i4
111
112 spec.sgml:      spec.sgml.in Makefile
113                 sed -e '/<version><\/version>/ s/>/&$(VERSION)/' \
114                         spec.sgml.in >$@.new && mv -f $@.new $@
115
116 client.o:       config.h common.h pcsum.h both.h version.h
117
118 process.o:      config.h common.h pcsum.h both.h daemon.h lib.h tokens.h
119
120 overlord.o:     config.h common.h pcsum.h daemon.h
121
122 servexec.o:     config.h common.h pcsum.h daemon.h lib.h version.h
123
124 lib.o:          config.h common.h lib.h
125
126 debug.o:        config.h common.h pcsum.h daemon.h lib.h tokens.h
127
128 parserlexer.o:  lexer.c parser.c config.h common.h pcsum.h daemon.h lib.h tokens.h
129 # lexer.c #include's parser.c at the end.  Blame flex.
130                 $(CC) -c $(CPPFLAGS) $(CFLAGS) lexer.c -o $@
131
132 pcsum.h:        common.h config.h config.status Makefile
133                 cat $^ | $(MD5SUM) \
134                         | sed -e 's/  -$$//; s/../0x&,/g; s/,$$//;' \
135                         >pcsum.h.new
136                 cmp pcsum.h.new pcsum.h || mv -f pcsum.h.new pcsum.h
137                 @rm -f pcsum.h.new
138
139 version.h:      Makefile
140                 echo '#define VERSION "$(VERSION)"' >$@.new && mv -f $@.new $@
141
142 tokens.h:       language.i4
143
144 autoconf configure:
145                 autoheader
146                 autoconf
147
148 clean:
149                 find -name '*.orig' -o -name '*~' -o -name '.*~' \
150                         -o -name '*#' -o -name '.#*' -o -name '*.bak' \
151                         | xargs -r rm
152                 rm -rf $(TARGETS) *.o core version.h
153                 rm -f overview.eps
154                 rm -f spec.lout* spec.text* spec.ps?* spec.sgml.new spec.tex
155                 rm -f lout.li *.ld *.lix *.ldx
156                 rm -f userv-*.tar.gz vd/*
157
158 distclean mostlyclean:  clean
159                 rm -f $(CONFIG_RESULTS)
160
161 maintainer-clean:       distclean
162                 rm -rf $(GENSHIP_CLEAN) spec.html/*.html
163
164 dist-prep:      $(GENSHIP)
165
166 pre-checkin:
167                 ./configure
168                 $(MAKE) dist-prep
169
170 dist_tmp=dist_tmp/userv-$(VERSION)
171 dist_prune=\( -name CVS -o -name 'dist_tmp*' -o -name slash-etc -o -name vd \)
172 dist:                   dist-prep distclean
173         rm -rf dist_tmp*
174         mkdir dist_tmp $(dist_tmp)
175         find $(dist_prune) -prune -o -type d -print | \
176                 sed -e 's#.*#mkdir -p $(dist_tmp)/&#' | sh
177         find $(dist_prune) -prune -o -type f -print | \
178                 sed -e 's#.*#ln & $(dist_tmp)/&#' | sh
179         cd dist_tmp && tar cf ../$(dist_tmp).tar `basename $(dist_tmp)`
180         gzip -9 $(dist_tmp).tar
181         mv $(dist_tmp).tar.gz .
182
183 linecount:      $(SOURCES)
184                 wc -l $^
185
186 %.html/index.html:      %.sgml
187                         debiandoc2html $<
188
189 %.ps:           %.sgml
190                 debiandoc2ps -1 -O $< >$@.new && mv $@.new $@
191
192 %.ps:           %.fig
193                 fig2dev -L ps -c -l dummy -P -z A4 $< >$@.new && mv $@.new $@
194
195 %.l:            %.l.m4
196                 $(M4) $(M4FLAGS) -- $< >$@.new && mv $@.new $@
197
198 %.h:            %.h.m4
199                 $(M4) $(M4FLAGS) -- $< >$@.new && mv $@.new $@
200
201 %:              %.m4
202                 $(M4) $(M4FLAGS) -- $< >$@.new && mv $@.new $@