]> granicus.if.org Git - linux-pam/blobdiff - Makefile
Relevant BUGIDs: 124930
[linux-pam] / Makefile
index c17dc2080099e02b2e2230bf47a62e7a33b65add..2f57fff712e34c75ef27df5e4a8c278e7ed3de39 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,8 @@
 ## configure.in not getting propagated down the tree. (AGM) [I realise
 ## that this may not prove possible, but at least I tried.. Sigh.]
 
+DISTNAME=Linux-PAM
+
 ifeq ($(shell test \! -f Make.Rules || echo yes),yes)
     include Make.Rules
 endif
@@ -24,7 +26,7 @@ prep:
 clean:
        if [ ! -f Make.Rules ]; then touch Make.Rules ; fi
        for i in $(THINGSTOMAKE) ; do $(MAKE) -C $$i clean ; done
-       rm -f security *~ *.orig *.rej #*#
+       rm -f security *~ *.orig *.rej Make.Rules #*#
 
 distclean: clean
        rm -f Make.Rules _pam_aconf.h
@@ -40,12 +42,14 @@ Make.Rules: configure Make.Rules.in _pam_aconf.h.in
        @echo XXX - by hand, with the options you want.
        ./configure
 
+_pam_aconf.h: Make.Rules
+
 configure: configure.in
-       @$(MAKE) distclean
        @echo
-       @echo You do not appear to have a ./configure file.
+       @echo You do not appear to have an up-to-date ./configure file.
        @echo Please run autoconf, and then ./configure [..options..]
        @echo
+       @rm -f configure
        @exit 1
 
 $(THINGSTOMAKE): _pam_aconf.h prep
@@ -60,6 +64,16 @@ remove:
        rm -f $(FAKEROOT)$(INCLUDED)/_pam_aconf.h
        for x in $(THINGSTOMAKE) ; do make -C $$x remove ; done
 
+release:
+       @if [ ! -f Make.Rules ]; then echo make Make.Rules first ; exit 1; fi
+       @if [ ! -L ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL) ]; then \
+          echo generating ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL) link ; \
+          ln -sf $(DISTNAME) ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL) ; \
+          echo to ../$(DISTNAME) . ; fi
+       @diff ../$(DISTNAME)-$(MAJOR_REL).$(MINOR_REL)/Make.Rules Make.Rules
+       make distclean
+       cd .. ; tar zvfc $(DISTNAME)-$(MAJOR_REL).$(MINOR_REL).tar.gz --exclude CVS --exclude .cvsignore --exclude '.#*' $(DISTNAME)-$(MAJOR_REL).$(MINOR_REL)/*
+
 ## =================
 
 ifdef LEGACY_OLD_MAKEFILE