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 = libpam libpamc libpam_misc modules 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 ./config.status --recheck
47 _pam_aconf.h: Make.Rules
49 configure: configure.in
51 @echo You do not appear to have an up-to-date ./configure file.
52 @echo Please run autoconf, and then ./configure [..options..]
57 $(THINGSTOMAKE): _pam_aconf.h prep bootstrap-libpam
60 install: _pam_aconf.h prep
61 $(MKDIR) $(FAKEROOT)$(INCLUDED)
62 $(INSTALL) -m 444 security/_pam_aconf.h $(FAKEROOT)$(INCLUDED)
63 for x in $(THINGSTOMAKE) ; do $(MAKE) -C $$x install ; done
66 rm -f $(FAKEROOT)$(INCLUDED)/_pam_aconf.h
67 for x in $(THINGSTOMAKE) ; do $(MAKE) -C $$x remove ; done
70 @if [ ! -f Make.Rules ]; then echo $(MAKE) Make.Rules first ;exit 1 ;fi
71 @if [ ! -L ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL) ]; then \
72 echo generating ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL) link ; \
73 ln -sf $(DISTNAME) ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL) ; \
74 echo to ../$(DISTNAME) . ; fi
75 @diff ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL)/Make.Rules Make.Rules
77 cd .. ; tar zvfc $(DISTNAME)-$(MAJOR_REL).$(MINOR_REL).tar.gz \
78 --exclude CVS --exclude .cvsignore --exclude '.#*' \
79 $(DISTNAME)-$(MAJOR_REL).$(MINOR_REL)/*