5 ## Note, ideally I would prefer it if this top level makefile did
6 ## not get created by autoconf. As I find typing 'make' and relying
7 ## on it to take care of all dependencies much more friendly than
8 ## the multi-stage autoconf+make and also worry about updates to
9 ## configure.in not getting propagated down the tree. (AGM) [I realise
10 ## that this may not prove possible, but at least I tried.. Sigh.]
14 ifeq ($(shell test \! -f Make.Rules || echo yes),yes)
18 THINGSTOMAKE = modules libpam libpamc libpam_misc doc examples
27 if [ ! -f Make.Rules ]; then touch Make.Rules ; fi
28 for i in $(THINGSTOMAKE) ; do $(MAKE) -C $$i clean ; done
29 rm -f security *~ *.orig *.rej Make.Rules #*#
32 rm -f Make.Rules _pam_aconf.h
33 rm -f config.status config.cache config.log core
35 maintainer-clean: distclean
36 @echo files should be ok for packaging now.
38 # NB _pam_aconf.h.in changes will remake this too
39 Make.Rules: configure Make.Rules.in _pam_aconf.h.in
40 @echo XXX - not sure how to preserve past configure options..
41 @echo XXX - so not attempting to. Feel free to run ./configure
42 @echo XXX - by hand, with the options you want.
45 _pam_aconf.h: Make.Rules
47 configure: configure.in
49 @echo You do not appear to have an up-to-date ./configure file.
50 @echo Please run autoconf, and then ./configure [..options..]
55 $(THINGSTOMAKE): _pam_aconf.h prep
58 install: _pam_aconf.h prep
59 $(MKDIR) $(FAKEROOT)$(INCLUDED)
60 $(INSTALL) -m 444 security/_pam_aconf.h $(FAKEROOT)$(INCLUDED)
61 for x in $(THINGSTOMAKE) ; do $(MAKE) -C $$x install ; done
64 rm -f $(FAKEROOT)$(INCLUDED)/_pam_aconf.h
65 for x in $(THINGSTOMAKE) ; do $(MAKE) -C $$x remove ; done
68 @if [ ! -f Make.Rules ]; then echo $(MAKE) Make.Rules first ;exit 1 ;fi
69 @if [ ! -L ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL) ]; then \
70 echo generating ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL) link ; \
71 ln -sf $(DISTNAME) ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL) ; \
72 echo to ../$(DISTNAME) . ; fi
73 @diff ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL)/Make.Rules Make.Rules
75 cd .. ; tar zvfc $(DISTNAME)-$(MAJOR_REL).$(MINOR_REL).tar.gz \
76 --exclude CVS --exclude .cvsignore --exclude '.#*' \
77 $(DISTNAME)-$(MAJOR_REL).$(MINOR_REL)/*