chiark / gitweb /
Fixed assertion failure if user's home directory not accessible
[userv.git] / Makefile
1 # Generated automatically from Makefile.in by configure.
2 #  userv - Makefile.in
3 #  
4 #  Copyright (C)1996-1997 Ian Jackson
5 #  
6 #  This is free software; you can redistribute it and/or modify it
7 #  under the terms of the GNU General Public License as published by
8 #  the Free Software Foundation; either version 2 of the License, or
9 #  (at your option) any later version.
10 #  
11 #  This program is distributed in the hope that it will be useful, but
12 #  WITHOUT ANY WARRANTY; without even the implied warranty of
13 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 #  General Public License for more details.
15 #  
16 #  You should have received a copy of the GNU General Public License
17 #  along with userv; if not, write to the Free Software
18 #  Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 VERSION=
21 VEREXT=std
22
23 CC=gcc
24 CFLAGS=-g $(OPTIMISE) -D_GNU_SOURCE -Wall -Wno-implicit -Wwrite-strings -Wpointer-arith -Wimplicit -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Werror $(XCFLAGS) -DVERSION='"$(VERSION)"' -DVEREXT='"$(VEREXT)"'
25 OPTIMISE=-O2
26 CPPFLAGS=-DDEBUG -DVARDIR='"/u/ian/things/userv-alt/vd"' -DSYSTEMCONFIGDIR='"/u/ian/things/userv-alt/slash-etc"' -DSERVICEUSERDIR='"/u/ian/things/userv-alt/tilde"' $(XCPPFLAGS)
27 LDLIBS=-lefence $(XLDLIBS)
28
29 M4=m4
30 M4FLAGS=
31 LEX=flex
32 CWD=$(shell pwd)
33
34 INSTALL=/usr/bin/install -c
35 INSTALL_PROGRAM=${INSTALL}
36 INSTALL_DATA=${INSTALL} -m 644
37 prefix=/usr/local
38 exec_prefix=$(prefix)
39 bindir=$(exec_prefix)/bin
40 sbindir=$(exec_prefix)/sbin
41 etcdir=/etc
42 etcsubdir=$(etcdir)/userv
43
44 SOURCES=        Makefile.in configure.in acconfig.h                     \
45                 client.c common.h                                       \
46                 overlord.c process.c servexec.c                         \
47                 daemon.h debug.c parser.c lib.c lib.h                   \
48                 language.i4 lexer.l.m4 tokens.h.m4
49 ALSOSHIP=       README INSTALL Changelog COPYING \
50                 system.default system.override \
51                 spec.sgml.in overview.fig overview.ps \
52                 buildship install-sh .cvsignore
53 GENSHIP=        lexer.l lexer.c tokens.h configure config.h.in \
54                 spec.sgml spec.html spec.ps overview.ps
55
56 SHIPTARGETS=    $(SOURCES) $(ALSOSHIP) $(GENSHIP)
57
58 all:            daemon client
59
60 install:        all
61                 $(INSTALL_PROGRAM) -s -o root -g root -m 755 daemon $(sbindir)/uservd
62                 $(INSTALL_PROGRAM) -s -o root -g root -m 4755 client $(bindir)/userv
63                 $(INSTALL) -d -o root -g root -m 2755 $(etcsubdir) \
64         $(etcsubdir)/default.d $(etcsubdir)/services.d $(etcsubdir)/override.d
65                 if ! test -f $(etcsubdir)/system.default; then \
66                         $(INSTALL_DATA) -o root -g root system.default $(etcsubdir); fi
67                 if ! test -f $(etcsubdir)/system.override; then \
68                         $(INSTALL_DATA) -o root -g root system.override $(etcsubdir); fi
69
70 daemon:         overlord.o process.o servexec.o parserlexer.o debug.o lib.o
71                 $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
72
73 lexer.l:        language.i4
74
75 spec.sgml:      spec.sgml.in Makefile
76                 sed -e '/<version><\/version>/ s/>/&$(VERSION)/' \
77                         spec.sgml.in >$@.new && mv -f $@.new $@
78
79 client.o:       config.h common.h pcsum.h version.h
80
81 process.o:      config.h common.h pcsum.h daemon.h lib.h tokens.h
82
83 overlord.o:     config.h common.h pcsum.h daemon.h
84
85 servexec.o:     config.h common.h pcsum.h daemon.h lib.h version.h
86
87 lib.o:          config.h common.h lib.h
88
89 debug.o:        config.h common.h pcsum.h daemon.h lib.h tokens.h
90
91 parserlexer.o:  lexer.c parser.c config.h common.h pcsum.h daemon.h lib.h tokens.h
92 # lexer.c #include's parser.c at the end.  Blame flex.
93                 $(CC) -c $(CPPFLAGS) $(CFLAGS) lexer.c -o $@
94
95 pcsum.h:        common.h config.h config.status Makefile
96                 cat $^ | md5sum | sed -e 's/../0x&,/g; s/,$$//;' >pcsum.h.new
97                 cmp pcsum.h.new pcsum.h || mv -f pcsum.h.new pcsum.h
98                 @rm -f pcsum.h.new
99
100 version.h:      Makefile
101                 echo '#define VERSION "$(VERSION)"' >$@.new && mv -f $@.new $@
102
103 tokens.h:       language.i4
104
105 autoconf configure:
106                 autoheader
107                 autoconf
108
109 clean:
110                 rm -f daemon client pcsum.h
111                 rm -f overview.eps
112                 rm -f spec.lout* spec.text* spec.sgml spec.sgml.new spec.ps?*
113                 rm -rf spec.html?*
114                 rm -f lout.li *.lix *.ldx config.cache
115                 rm -f *.o *~ core ./#*#
116
117 distclean:      clean
118                 rm -f config.status config.log Makefile config.h
119
120 realclean:      distclean
121                 rm -f spec.ps* spec.sgml spec.sgml.new
122                 rm -f lexer.l lexer.c tokens.h overview.ps
123                 rm -rf spec.html*
124
125 totalclean:     realclean
126                 rm -f configure config.h.in
127
128 shipprep:       $(SHIPTARGETS)
129
130 ship:           $(SHIPTARGETS)
131                 rm -rf shipcheck
132                 mkdir -p shipcheck/userv-$(VERSION)
133                 cp -a $^ shipcheck/userv-$(VERSION)
134                 cd shipcheck && \
135                  GZIP=-9v tar zvvcf userv-$(VERSION).tar.gz userv-$(VERSION)
136                 rm -rf shipcheck/userv-$(VERSION)
137
138 linecount:      $(SOURCES)
139                 wc -l $^
140
141 %.html:         %.sgml
142                 rm -rf $@; debiandoc2html $<
143
144 %.ps:           %.sgml
145                 debiandoc2ps -1 -O $< >$@.new && mv $@.new $@
146
147 %.ps:           %.fig
148                 fig2dev -L ps -c -l dummy -P -z A4 $< >$@.new && mv $@.new $@
149
150 %.l:            %.l.m4
151                 $(M4) $(M4FLAGS) -- $< >$@.new && mv $@.new $@
152
153 %.h:            %.h.m4
154                 $(M4) $(M4FLAGS) -- $< >$@.new && mv $@.new $@
155
156 %:              %.m4
157                 $(M4) $(M4FLAGS) -- $< >$@.new && mv $@.new $@