/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Björn Påhlsson
  • Date: 2011-11-24 19:27:53 UTC
  • mto: (518.2.5 persistent-state-gpgme)
  • mto: This revision was merged to the branch mainline in revision 524.
  • Revision ID: belorn@fukt.bsnet.se-20111124192753-y5jxlc1h3tcxpubc
First run of python-lint. Fixed some *obviously* bad code and turned
them into good code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
OPTIMIZE=-Os
24
24
LANGUAGE=-std=gnu99
25
25
htmldir=man
26
 
version=1.5.3
 
26
version=1.4.1
27
27
SED=sed
28
28
 
29
 
USER=$(firstword $(subst :, ,$(shell getent passwd _mandos || getent passwd nobody || echo 65534)))
30
 
GROUP=$(firstword $(subst :, ,$(shell getent group _mandos || getent group nobody || echo 65534)))
31
 
 
32
29
## Use these settings for a traditional /usr/local install
33
30
# PREFIX=$(DESTDIR)/usr/local
34
31
# CONFDIR=$(DESTDIR)/etc/mandos
35
32
# KEYDIR=$(DESTDIR)/etc/mandos/keys
36
33
# MANDIR=$(PREFIX)/man
37
34
# INITRAMFSTOOLS=$(DESTDIR)/etc/initramfs-tools
38
 
# STATEDIR=$(DESTDIR)/var/lib/mandos
39
35
##
40
36
 
41
37
## These settings are for a package-type install
44
40
KEYDIR=$(DESTDIR)/etc/keys/mandos
45
41
MANDIR=$(PREFIX)/share/man
46
42
INITRAMFSTOOLS=$(DESTDIR)/usr/share/initramfs-tools
47
 
STATEDIR=$(DESTDIR)/var/lib/mandos
48
43
##
49
44
 
50
45
GNUTLS_CFLAGS=$(shell pkg-config --cflags-only-I gnutls)
235
230
distclean: clean
236
231
mostlyclean: clean
237
232
maintainer-clean: clean
238
 
        -rm --force --recursive keydir confdir statedir
 
233
        -rm --force --recursive keydir confdir
239
234
 
240
235
check:  all
241
236
        ./mandos --check
255
250
        @echo "###################################################################"
256
251
        ./plugin-runner --plugin-dir=plugins.d \
257
252
                --config-file=plugin-runner.conf \
258
 
                --options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt,--network-hook-dir=network-hooks.d \
 
253
                --options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt \
259
254
                $(CLIENTARGS)
260
255
 
261
256
# Used by run-client
265
260
 
266
261
# Run the server with a local config
267
262
run-server: confdir/mandos.conf confdir/clients.conf
268
 
        ./mandos --debug --no-dbus --configdir=confdir \
269
 
                --statedir=statedir $(SERVERARGS)
 
263
        ./mandos --debug --no-dbus --configdir=confdir $(SERVERARGS)
270
264
 
271
265
# Used by run-server
272
266
confdir/mandos.conf: mandos.conf
277
271
        install --mode=u=rw $< $@
278
272
# Add a client password
279
273
        ./mandos-keygen --dir keydir --password >> $@
280
 
statedir:
281
 
        install --directory statedir
282
274
 
283
275
install: install-server install-client-nokey
284
276
 
289
281
 
290
282
install-server: doc
291
283
        install --directory $(CONFDIR)
292
 
        install --directory --mode=u=rwx --owner=$(USER) \
293
 
                --group=$(GROUP) $(STATEDIR)
294
284
        install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
295
285
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
296
286
                mandos-ctl
319
309
                > $(MANDIR)/man5/mandos.conf.5.gz
320
310
        gzip --best --to-stdout mandos-clients.conf.5 \
321
311
                > $(MANDIR)/man5/mandos-clients.conf.5.gz
322
 
        gzip --best --to-stdout intro.8mandos \
323
 
                > $(MANDIR)/man8/intro.8mandos.gz
324
312
 
325
313
install-client-nokey: all doc
326
314
        install --directory $(PREFIX)/lib/mandos $(CONFDIR)
330
318
                install --mode=u=rwx \
331
319
                        --directory "$(CONFDIR)/plugins.d"; \
332
320
        fi
333
 
        install --mode=u=rwx,go=rx --directory \
334
 
                "$(CONFDIR)/network-hooks.d"
335
321
        install --mode=u=rwx,go=rx \
336
322
                --target-directory=$(PREFIX)/lib/mandos plugin-runner
337
323
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \