summaryrefslogtreecommitdiff
path: root/Makefile.in
blob: 3482e104b79a2404ca830bdb42f8ff5ada304b1f (plain)
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
# Makefile for WebAuth
# $Id$

srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@

@SET_MAKE@

# The directory name and tar file to use when building a release.
TARDIR		= @PACKAGE_TARNAME@-@PACKAGE_VERSION@
TARNAME		= $(TARDIR).tar

# DISTDIRS gets all directories from the MANIFEST, and DISTFILES gets all
# regular files.  Anything not listed in the MANIFEST will not be included in
# a distribution.  These are arguments to sed.
DISTDIRS	= -e 1,2d -e '/(Directory)/!d' -e 's/ .*//'
DISTFILES	= -e 1,2d -e '/(Directory)/d' -e 's/ .*//'


SUBDIRS		= src
ALLDIRS		= src tests

.PHONY: all check check-manifest clean dist distclean doc docs install
.PHONY: install-tests install-webkdc test tests

all install: Makefile 
	@for subdir in $(SUBDIRS); do \
	    echo "making $@ in $$subdir"; \
	    ( cd $$subdir && $(MAKE) $@ ) || exit 1; \
	done

check test tests:
	cd tests && $(MAKE) all

install-tests:
	cd tests && $(MAKE) install

install-webkdc:
	cd src && $(MAKE) install-webkdc

clean depend:
	@for subdir in $(ALLDIRS); do \
	    echo "making $@ in $$subdir"; \
	    ( cd $$subdir && $(MAKE) $@ ) || exit 1; \
	done

doc docs:
	doxygen doc/doxygen.cfg

distclean: clean
	rm -rf config.status config.cache config.log config.h libtool \
	       Makefile src/Makefile src/bindings/Makefile \
	       src/bindings/perl/Makefile src/libwebauth/Makefile \
	       src/libwebauth/webauth.h src/modules/Makefile \
	       src/modules/webauth/Makefile src/modules/webkdc/Makefile \
	       src/utils/Makefile src/webkdc/Makefile tests/Makefile \
	       tests/libwebauth/Makefile \
	       src/bindings/perl/WebAuth3/Makefile.PL *~ core \#* \
	       autom4te*.cache LIST.* webauth-*-@PACKAGE_VERSION@

# Make a release.  We create a release by recreating the directory structure
# and then copying over all files listed in the MANIFEST.  If it isn't in the
# MANIFEST, it doesn't go into the release.
dist:
	rm -rf $(TARDIR)
	rm -f webauth*.tar.gz
	mkdir $(TARDIR)
	for d in `sed $(DISTDIRS) MANIFEST` ; do \
	    mkdir -p $(TARDIR)/$$d || exit 1 ; \
	done
	for f in `sed $(DISTFILES) MANIFEST` ; do \
	    cp $$f $(TARDIR)/$$f || exit 1 ; \
	done
	find $(TARDIR) -type f -print | xargs touch -t `date +%m%d%H%M.%S`
	tar cf $(TARNAME) $(TARDIR)
	gzip -9 $(TARNAME)
	md5sum $(TARNAME).gz > $(TARNAME).gz.md5

# Check the MANIFEST against the files present in the current tree, building a
# list with tools/mkmanifest and running diff between the lists.
check-manifest:
	sed -e 1,2d -e 's/ .*//' MANIFEST > LIST.manifest
	tools/mkmanifest > LIST.real
	diff -u LIST.manifest LIST.real