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
22 # Let's get a dynamic libpam.so first
23 bootstrap-libpam: _pam_aconf.h prep
24 $(MAKE) -C libpam bootstrap-libpam
31 if [ ! -f Make.Rules ]; then touch Make.Rules ; fi
32 for i in $(THINGSTOMAKE) ; do $(MAKE) -C $$i clean ; done
33 rm -f security *~ *.orig *.rej Make.Rules #*#
36 rm -f Make.Rules _pam_aconf.h
37 rm -f config.status config.cache config.log core
39 maintainer-clean: distclean
40 @echo files should be ok for packaging now.
42 # NB _pam_aconf.h.in changes will remake this too
43 Make.Rules: configure Make.Rules.in _pam_aconf.h.in
44 @echo XXX - not sure how to preserve past configure options..
45 @echo XXX - so not attempting to. Feel free to run ./configure
46 @echo XXX - by hand, with the options you want.
49 _pam_aconf.h: Make.Rules
51 configure: configure.in
53 @echo You do not appear to have an up-to-date ./configure file.
54 @echo Please run autoconf, and then ./configure [..options..]
59 $(THINGSTOMAKE): _pam_aconf.h prep bootstrap-libpam
62 install: _pam_aconf.h prep
63 $(MKDIR) $(FAKEROOT)$(INCLUDED)
64 $(INSTALL) -m 444 security/_pam_aconf.h $(FAKEROOT)$(INCLUDED)
65 for x in $(THINGSTOMAKE) ; do $(MAKE) -C $$x install ; done
68 rm -f $(FAKEROOT)$(INCLUDED)/_pam_aconf.h
69 for x in $(THINGSTOMAKE) ; do $(MAKE) -C $$x remove ; done
72 @if [ ! -f Make.Rules ]; then echo $(MAKE) Make.Rules first ;exit 1 ;fi
73 @if [ ! -L ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL) ]; then \
74 echo generating ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL) link ; \
75 ln -sf $(DISTNAME) ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL) ; \
76 echo to ../$(DISTNAME) . ; fi
77 @diff ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL)/Make.Rules Make.Rules
79 cd .. ; tar zvfc $(DISTNAME)-$(MAJOR_REL).$(MINOR_REL).tar.gz \
80 --exclude CVS --exclude .cvsignore --exclude '.#*' \
81 $(DISTNAME)-$(MAJOR_REL).$(MINOR_REL)/*