File: Makefile.in

package info (click to toggle)
distcc 2.18.3-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,188 kB
  • ctags: 1,536
  • sloc: ansic: 12,829; sh: 3,183; python: 1,313; makefile: 493
file content (619 lines) | stat: -rw-r--r-- 17,566 bytes parent folder | download | duplicates (3)
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
# Top-level Makefile(.in) for distcc

# Copyright (C) 2002, 2003, 2004 by Martin Pool

# Note that distcc no longer uses automake, but this file is still
# structured in a somewhat similar way.

# Remember that a CVS checkout of this project contains some
# directories that will not be present in a tarball distribution,
# including web/.  So, those directories must not be built by regular
# commands (make all, make clean, make distclean), only by
# maintainer-* or explicit invocations.

## VARIABLES

PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
SHELL = @SHELL@

# These autoconf variables may contain recursive Make expansions, and
# so they have to be done here rather than written into config.h.

CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
CC = @CC@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ ${DIR_DEFS} -Isrc -I$(srcdir)/lzo

srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@

bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
docdir = @docdir@
pkgdatadir = $(datadir)/@PACKAGE_NAME@

# These must be done from here, not from autoconf, because they can 
# contain variable expansions written in Make syntax.  Ew.
DIR_DEFS = -DSYSCONFDIR="\"${sysconfdir}\"" -DPKGDATADIR="\"${pkgdatadir}\""

# arguments to pkgconfig
GNOME_PACKAGES = @GNOME_PACKAGES@
GNOME_CFLAGS = @GNOME_CFLAGS@
GNOME_LIBS = @GNOME_LIBS@

LIBS = @LIBS@

DESTDIR =

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ 
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@

# You might need to override this depending on the name under which
# Python is installed here.
PYTHON = @PYTHON@

dist_files =							\
	src/config.h.in						\
	$(dist_lzo)						\
	$(dist_contrib)						\
	$(dist_patches)						\
	$(dist_common)						\
	$(MEN)							\
	$(pkgdoc_DOCS)						\
	$(example_DOCS)						\
	$(popt_EXTRA) $(popt_SRC) $(popt_HEADERS)		\
	$(SRC) $(HEADERS)					\
	$(test_SOURCE)						\
	$(bench_PY)						\
	$(dist_extra)						\
	$(gnome_data)

dist_lzo = lzo/minilzo.c lzo/minilzo.h lzo/lzoconf.h lzo/.stamp-conf.in

dist_contrib = contrib/distcc-absolutify	\
	contrib/distcc.sh			\
	contrib/distccd-init			\
	contrib/dmake				\
	contrib/make-j				\
	contrib/netpwd				\
	contrib/stage-cc-wrapper.patch		\
	contrib/redhat/init			\
	contrib/redhat/logrotate		\
	contrib/redhat/sysconfig		\
	contrib/redhat/xinetd

bench_PY = bench/Build.py bench/Project.py bench/ProjectDefs.py \
	bench/Summary.py bench/actions.py bench/benchmark.py	\
	bench/buildutil.py bench/compiler.py bench/statistics.py

pkgdoc_DOCS = AUTHORS COPYING NEWS README			\
	INSTALL						        \
	TODO							\
	doc/protocol-1.txt doc/status-1.txt			\
	doc/protocol-2.txt					\
	doc/reporting-bugs.txt					\
	survey.txt

example_DOCS = \
	doc/example/init doc/example/init-suse			\
	doc/example/logrotate					\
	doc/example/xinetd					\

# These are included in the distribution but not installed into the
# doc dir.
dist_extra =							\
	README.packaging ChangeLog ChangeLog.old

latte_HTML = web/binaries.html					\
	web/compared.html web/doc.html web/download.html	\
	web/cvs.html web/faq.html web/index.html		\
	web/links.html web/news.html				\
	web/problems.html					\
	web/results.html					\
	web/scenarios.html web/security.html			\
	web/old-news.html

mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
man1dir = $(mandir)/man1
man8dir = $(mandir)/man8

test_SOURCE = test/comfychair.py				\
	test/testdistcc.py			

dist_common = Makefile.in install-sh configure configure.ac \
	config.guess config.sub mkinstalldirs autogen.sh

# It seems a bit unnecessary to ship patches in the released tarballs.
# People who are so keen as to apply unsupported patches ought to use
# CVS, or at least get them from the list.
dist_patches = 

TAR = tar
GZIP = gzip
GZIP_OPT = -9v

BZIP2 = bzip2

distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)

distdir = $(PACKAGE_TARNAME)-$(VERSION)
tarball = $(PACKAGE_TARNAME)-$(VERSION).tar
tarball_bz2 = $(tarball).bz2
tarball_sig = $(tarball_bz2).asc
distnews = $(PACKAGE_TARNAME)-$(VERSION).NEWS

common_obj = src/arg.o src/argutil.o					\
	src/cleanup.o src/compress.o					\
	src/trace.o src/util.o src/io.o src/exec.o			\
	src/rpc.o src/tempfile.o src/bulk.o src/help.o src/filename.o	\
	src/lock.o							\
	src/netutil.o							\
	src/pump.o							\
	src/sendfile.o							\
	src/safeguard.o src/snprintf.o src/timeval.o			\
	lzo/minilzo.o

distcc_obj = src/backoff.o						\
	src/climasq.o src/clinet.o src/clirpc.o				\
	src/compile.o src/cpp.o						\
	src/distcc.o							\
	src/hosts.o src/hostfile.o					\
	src/implicit.o src/loadfile.o					\
	src/remote.o							\
	src/ssh.o src/state.o src/strip.o				\
	src/timefile.o src/traceenv.o					\
	src/where.o							\
	$(common_obj)

distccd_obj = src/access.o						\
	src/daemon.o  src/dopt.o src/dparent.o src/dsignal.o		\
	src/ncpus.o							\
	src/prefork.o							\
	src/serve.o src/setuid.o src/srvnet.o src/srvrpc.o src/state.o	\
	$(common_obj) @BUILD_POPT@

# Objects that need to be linked in to build monitors
mon_obj =								\
	src/cleanup.o							\
	src/filename.o							\
	src/io.o							\
	src/mon.o							\
	src/netutil.o							\
	src/rpc.o							\
	src/snprintf.o src/state.o 					\
	src/tempfile.o src/trace.o src/traceenv.o			\
	src/util.o

gnome_obj = src/history.o src/mon-gnome.o				\
	src/renderer.o

h_exten_obj = src/h_exten.o $(common_obj)
h_issource_obj = src/h_issource.o $(common_obj) 
h_scanargs_obj = src/h_scanargs.o $(common_obj) src/implicit.o
h_hosts_obj = src/h_hosts.o $(common_obj) src/hostfile.o src/hosts.o	\
	src/loadfile.o
h_argvtostr_obj = src/h_argvtostr.o $(common_obj)
h_strip_obj = src/h_strip.o $(common_obj) src/strip.o
h_parsemask_obj = src/h_parsemask.o $(common_obj) src/access.o
h_sa2str_obj = src/h_sa2str.o $(common_obj) src/srvnet.o src/access.o
h_ccvers_obj = src/h_ccvers.o $(common_obj) 

# All source files, for the purposes of building the distribution
SRC =	src/access.c src/arg.c src/argutil.c				\
	src/backoff.c src/bulk.c					\
	src/cleanup.c							\
	src/climasq.c src/clinet.c src/clirpc.c src/compile.c		\
	src/compress.c src/cpp.c					\
	src/daemon.c src/distcc.c src/dsignal.c				\
	src/dopt.c src/dparent.c src/exec.c src/filename.c		\
	src/h_argvtostr.c						\
	src/h_exten.c src/h_hosts.c src/h_issource.c src/h_parsemask.c	\
	src/h_sa2str.c src/h_scanargs.c src/h_strip.c			\
	src/help.c src/history.c src/hosts.c src/hostfile.c		\
	src/implicit.c src/io.c						\
	src/loadfile.c src/lock.c 					\
	src/mon.c src/mon-notify.c src/mon-text.c			\
	src/mon-gnome.c							\
	src/ncpus.c src/netutil.c					\
	src/prefork.c src/pump.c					\
	src/remote.c src/renderer.c src/rpc.c				\
	src/safeguard.c src/sendfile.c src/setuid.c src/serve.c		\
	src/snprintf.c src/state.c					\
	src/srvnet.c src/srvrpc.c src/ssh.c src/strip.c			\
	src/tempfile.c src/timefile.c                     		\
	src/timeval.c src/traceenv.c					\
	src/trace.c src/util.c src/where.c				


HEADERS = src/access.h							\
	src/bulk.h							\
	src/clinet.h src/compile.h					\
	src/daemon.h							\
	src/distcc.h src/dopt.h src/exitcode.h				\
	src/hosts.h src/implicit.h					\
	src/mon.h							\
	src/netutil.h							\
	src/renderer.h src/rpc.h					\
	src/snprintf.h src/state.h		 			\
	src/timefile.h src/timeval.h src/trace.h			\
	src/types.h							\
	src/util.h							\
	src/exec.h src/lock.h src/where.h src/srvnet.h

man1_MEN = man/distcc.1 man/distccd.1 man/distccmon-text.1 
man_HTML = man/distcc_1.html man/distccd_1.html man/distccmon_text_1.html
MEN = $(man1_MEN) 

gnome_data = gnome/distccmon-gnome-icon.png	\
	gnome/distccmon-gnome.desktop

popt_OBJS=popt/findme.o  popt/popt.o  popt/poptconfig.o \
	popt/popthelp.o popt/poptparse.o

popt_SRC=popt/findme.c  popt/popt.c  popt/poptconfig.c			 \
	popt/popthelp.c popt/poptparse.c

popt_HEADERS = popt/findme.h popt/popt.h popt/poptint.h popt/system.h

popt_EXTRA = popt/README.popt popt/.stamp-conf.in


# You might think that distccd ought to be in sbin, because it's a
# daemon.  It is a grey area.  However, the Linux Filesystem Hierarchy
# Standard (FHS 2.2) says that sbin is for programs "used exclusively
# by the system administrator".  

# distccd will often be used by non-root users, and when we support
# ssh it will be somewhat important that it be found in their default
# path.  Therefore on balance it seems better to put it in bin/.  

# Package maintainers can override this if absolutely necessary, but I
# would prefer that they do not. -- mbp

bin_PROGRAMS = \
	distcc@EXEEXT@ \
	distccd@EXEEXT@ \
	distccmon-text@EXEEXT@ \
	@GNOME_BIN@ 

check_PROGRAMS = \
	h_argvtostr@EXEEXT@ \
	h_exten@EXEEXT@ \
	h_hosts@EXEEXT@ \
	h_issource@EXEEXT@ \
	h_parsemask@EXEEXT@ \
	h_sa2str@EXEEXT@ \
	h_scanargs@EXEEXT@ \
	h_strip@EXEEXT@

## OVERALL targets

## IMPLICIT BUILD rules

.SUFFIXES: .html .latte .o .c

.latte.html:
	-rm -f $@
	if ! latte-html -l web/style.latte -o $@ $<; then rm $@; exit 1 ; fi

.c.o: 
	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $< 

## OVERALL targets

## NOTE: "all" must be the first (default) rule, aside from patterns.

# We don't build the web pages by default, because many people will
# not have the tools to do it.  Just use all-web if you want it.
all: $(bin_PROGRAMS)

all-web: all-latte
all-latte: $(latte_HTML)


## BUILD targets

distcc@EXEEXT@: $(distcc_obj)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(distcc_obj) $(LIBS)

distccd@EXEEXT@: $(distccd_obj)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(distccd_obj) $(LIBS)	

distccmon-text@EXEEXT@: $(mon_obj) src/mon-text.o
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(mon_obj) src/mon-text.o $(LIBS)

h_exten@EXEEXT@: $(h_exten_obj)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_exten_obj) $(LIBS)

h_issource@EXEEXT@: $(h_issource_obj)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_issource_obj) $(LIBS)

h_sa2str@EXEEXT@: $(h_sa2str_obj)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_sa2str_obj) $(LIBS)

h_scanargs@EXEEXT@: $(h_scanargs_obj)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_scanargs_obj) $(LIBS)

h_hosts@EXEEXT@: $(h_hosts_obj)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_hosts_obj) $(LIBS)

h_argvtostr@EXEEXT@: $(h_argvtostr_obj)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_argvtostr_obj) $(LIBS)

h_parsemask@EXEEXT@: $(h_parsemask_obj)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_parsemask_obj) $(LIBS)

h_strip@EXEEXT@: $(h_strip_obj)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_strip_obj) $(LIBS)

h_ccvers@EXEEXT@: $(h_ccvers_obj)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(h_ccvers_obj) $(LIBS)

src/mon-gnome.o: src/mon-gnome.c
	$(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) \
		$(GNOME_CFLAGS) \
		$(srcdir)/src/mon-gnome.c

src/renderer.o: src/renderer.c
	$(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS)			\
		$(GNOME_CFLAGS) \
		$(srcdir)/src/renderer.c

distccmon-gnome@EXEEXT@: $(mon_obj) $(gnome_obj)
	$(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(LIBS)	\
		$(GNOME_CFLAGS) $(GNOME_LIBS)			\
		$(mon_obj) $(gnome_obj)


## Dist targets

# The sub-targets copy (and if necessary, build) various files that
# have to go into the tarball.  They also create necessary directories
# -- bear in mind that they might be run in parallel.

# This looks a bit gross to me, but it's not as bad as it might be :-/

dist: 
	-rm -fr $(distdir)
	$(MAKE) dist-files 
	$(TAR) cfh $(tarball) $(distdir)
	$(BZIP2) -vf $(tarball)
	rm -r $(distdir)
	cp NEWS $(distnews)

distcheck: dist
	rm -rf '+distcheck'
	mkdir '+distcheck'
	cd '+distcheck' && bunzip2 < ../$(tarball_bz2) | $(TAR) xv && \
	cd $(distdir) && ./configure --prefix=`pwd`/prefix && \
	$(MAKE) && $(MAKE) install && $(MAKE) maintainer-check && \
	$(MAKE) clean
	rm -rf '+distcheck'

dist-sign:
	gpg -a --detach-sign $(tarball_bz2)

# the sort function removes duplicates
dist-files: $(dist_files)
	for f in $(dist_files); do mkdir -p $(distdir)/`dirname $$f` || exit 1; \
	cp -a $(srcdir)/$$f $(distdir)/$$f || exit 1; done

## BUILD (web) targets
$(latte_HTML): web/style.latte

## BUILD manual targets
man/distcc_1.html: man/distcc.1
	troff2html -man man/distcc.1 > $@

man/distccd_1.html: man/distccd.1
	troff2html -man man/distccd.1 > $@

man/distccmon_text_1.html: man/distccmon-text.1
	troff2html -man man/distccmon-text.1 > $@


######################################################################
## CHECK targets

check_programs: $(check_PROGRAMS) $(bin_PROGRAMS)

# WARNING: This resets the path to avoid any confusion caused by
# having distcc masquerades already on the path.  If you have gcc
# installed elsewhere this won't work....
maintainer-check: check_programs
	if test x$(PYTHON) != x; then \
	$(PYTHON) -c 'import sys; print sys.version'; \
	PATH=`pwd`:/usr/local/bin:/bin:/usr/bin $(PYTHON) $(srcdir)/test/testdistcc.py; \
	else echo "WARNING: python not found; tests skipped"; \
	fi

# NB: This does not depend upon install; you might want to test another version.
maintainer-installcheck: check_programs
	if test x$(PYTHON) != x; then \
	$(PYTHON) -c 'import sys; print sys.version'; \
	PATH="$(bindir):`pwd`:$$PATH" $(PYTHON) $(srcdir)/test/testdistcc.py; \
	else echo "WARNING: python not found; tests skipped"; \
	fi

check:
	@echo Please try 'make maintainer-check' instead.
installcheck:
	@echo Please try 'make maintainer-check' instead.


######################################################################
## BENCHMARK targets
benchmark: 
	@echo "The distcc macro-benchmark uses your existing distcc installation"
	@if [ "$$DISTCC_HOSTS" ]; \
	then echo "DISTCC_HOSTS=\"$$DISTCC_HOSTS\""; \
	else echo "You must set up servers and set DISTCC_HOSTS before running the benchmark"; \
	exit 1; \
	fi
	@echo "This benchmark may download a lot of source files, and it takes a "
	@echo "long time to run.  Interrupt now if you want."
	@echo 
	@echo "Pass BENCH_ARGS to make to specify which benchmarks to run."
	@echo
	@sleep 5
	cd bench && $(PYTHON) benchmark.py $(BENCH_ARGS)


## CLEAN targets

# Also clean binaries which are optionally built
clean: clean-autoconf clean-lzo
	rm -f src/*.o popt/*.o 
	rm -f $(check_PROGRAMS) $(bin_PROGRAMS)
	rm -f distccmon-gnome
	rm -rf testtmp

clean-autoconf:
	rm -f config.cache config.log

clean-lzo:
	rm -f lzo/*.o lzo/testmini

maintainer-clean: distclean maintainer-clean-web  \
	maintainer-clean-autoconf clean

# configure and co are distributed, but not in CVS
maintainer-clean-autoconf:
	rm -f configure src/config.h.in

maintainer-clean-web: 
	rm -f $(latte_HTML)

distclean-autoconf:
	rm -f Makefile src/config.h config.status config.cache config.log
	rm -rf autom4te.cache

distclean: distclean-autoconf clean


## MAINTAINER targets

upload-web: all-web
	rsync -avz web/ survey.txt \
		--exclude CVS --exclude '*~' --exclude '*.latte' \
		samba.org:/home/httpd/distcc/

upload-man: $(man_HTML)
	rsync -avz $(man_HTML) \
		--exclude CVS --exclude '*~' --exclude '*.latte' \
		samba.org:/home/httpd/distcc/man/

upload-dist:
	rsync -avP $(tarball_bz2) $(distnews) $(tarball_sig) samba.org:/home/ftp/pub/distcc/



### CVSPLOT

cvsplot:
	cvsplot -cvsdir . \
		-include '\.(c|h|py)$$' \
		-linedata /tmp/linedata.txt \
		-gnuplotlinedata web/cvslinedata.png \
		-filedata /tmp/filedata.txt \
		-gnuplotfiledata web/cvsfiledata.png



### INSTALL targets

# TODO: Allow root directory to be overridden for use in building
# packages.



showpaths:
	@echo "'make install' will install distcc as follows:"
	@echo "  man pages            $(DESTDIR)$(man1dir)"
	@echo "  documents            $(DESTDIR)$(docdir)"
	@echo "  programs             $(DESTDIR)$(bindir)"
	@echo "  system configuration $(DESTDIR)$(sysconfdir)"
	@echo "  shared data files    $(DESTDIR)$(pkgdatadir)"


# install-sh can't handle multiple arguments, but we don't need any
# tricky features so mkinstalldirs and cp will do

install: showpaths install-doc install-man install-programs install-example @INSTALL_GNOME@

install-programs: $(bin_PROGRAMS)
	$(mkinstalldirs) $(DESTDIR)$(bindir)
	for p in $^; do				\
	$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir) || exit 1;	\
	done

install-man: $(man1_MEN)
	$(mkinstalldirs) $(DESTDIR)$(man1dir)
	for p in $^; do				\
	$(INSTALL_DATA)	$$p $(DESTDIR)$(man1dir) || exit 1;	\
	done

install-doc: $(pkgdoc_DOCS)
	$(mkinstalldirs) $(DESTDIR)$(docdir)
	for p in $^; do				\
	$(INSTALL_DATA) $$p $(DESTDIR)$(docdir) || exit 1;	\
	done

install-example: $(example_DOCS)
	$(mkinstalldirs) $(DESTDIR)$(docdir)/example
	for p in $^; do				\
	$(INSTALL_DATA) $$p $(DESTDIR)$(docdir)/example || exit 1;	\
	done

install-gnome-data: $(gnome_data)
	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
	for p in $^; do				\
	$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir) || exit 1;	\
	done

## LINBOT targets

# This target checks the website for broken links.  It's probably not
# very interesting unless you are a maintainer and therefore in a
# position to fix them.

linbot-run:
	mkdir -p linbot-report
	linbot -o linbot-report http://distcc.samba.org/

## ANALOG targets

# These are probably only interesting for maintainers
analog-all:
	$(MAKE) analog-download
	$(MAKE) analog-resolve
	$(MAKE) analog-run

analog-download:
	rsync -avz 'samba.org:/var/log/httpd/distcc/*_log*' analog/

analog-run:
	mkdir -p analog/report && cd analog && analog -G +gdistcc.analog

analog-resolve:
	cat analog/access_log_* analog/access_log | \
		jdresolve --recursive --database analog/jdresolve.db - \
		--progress --timeout 15 --sockets 512 --linecache 100000 \
		> analog/resolved_log