home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / src / linux-headers-2.6.17-6 / debian / ruleset / targets / doc.mk < prev    next >
Encoding:
Text File  |  2006-03-29  |  5.0 KB  |  118 lines

  1. ######################### -*- Mode: Makefile-Gmake -*- ########################
  2. ## doc.mk --- 
  3. ## Author           : Manoj Srivastava ( srivasta@glaurung.internal.golden-gryphon.com ) 
  4. ## Created On       : Mon Oct 31 16:38:08 2005
  5. ## Created On Node  : glaurung.internal.golden-gryphon.com
  6. ## Last Modified By : Manoj Srivastava
  7. ## Last Modified On : Mon Oct 31 16:38:08 2005
  8. ## Last Machine Used: glaurung.internal.golden-gryphon.com
  9. ## Update Count     : 0
  10. ## Status           : Unknown, Use with caution!
  11. ## HISTORY          : 
  12. ## Description      : This file is responsible for creating the kernel-doc packages
  13. ## 
  14. ## arch-tag: ecb720c6-075d-4641-adb4-55f313499e8e
  15. ## 
  16. ## 
  17. ## This program is free software; you can redistribute it and/or modify
  18. ## it under the terms of the GNU General Public License as published by
  19. ## the Free Software Foundation; either version 2 of the License, or
  20. ## (at your option) any later version.
  21. ##
  22. ## This program is distributed in the hope that it will be useful,
  23. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  24. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  25. ## GNU General Public License for more details.
  26. ##
  27. ## You should have received a copy of the GNU General Public License
  28. ## along with this program; if not, write to the Free Software
  29. ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  30. ##
  31. ###############################################################################
  32.  
  33. install/$(d_package): 
  34.     $(REASON)
  35.     @echo "This is kernel package version $(kpkg_version)."
  36. ifeq ($(strip $(MAKING_VIRTUAL_IMAGE)),)
  37.     $(eval $(which_debdir))
  38.     rm -rf            $(TMPTOP)
  39.     $(make_directory) $(DOCDIR)
  40.     $(make_directory) $(MAN9DIR)
  41.     $(make_directory) $(TMP_MAN)
  42.     $(install_file) debian/changelog          $(DOCDIR)/changelog.Debian
  43.     $(install_file) $(DEBDIR)/pkg/doc/README  $(DOCDIR)/README.Debian
  44.     echo "This was produced by kernel-package version $(kpkg_version)." > \
  45.                $(DOCDIR)/Buildinfo
  46.     chmod 0644 $(DOCDIR)/Buildinfo
  47.     if test -f debian/official && test -f debian/README.Debian ; then \
  48.            $(install_file) debian/README.Debian $(DOCDIR)/README.Debian;\
  49.     fi
  50.     if test -f README.Debian ; then \
  51.            $(install_file) README.Debian $(DOCDIR)/README.Debian.1st;\
  52.     fi
  53.   ifneq ($(strip $(shell if [ -x /usr/bin/db2html ]; then echo YSE; fi)),)
  54.     $(MAKE)  mandocs htmldocs
  55.   endif
  56.     -tar cf - Documentation | (cd $(DOCDIR); umask 000; tar xsf -)
  57.     test ! -d $(DOCDIR)/Documentation/DocBook ||                            \
  58.        rm -f   $(DOCDIR)/Documentation/DocBook/Makefile                     \
  59.                $(DOCDIR)/Documentation/DocBook/*.sgml                       \
  60.                $(DOCDIR)/Documentation/DocBook/*.tmpl                       \
  61.                $(DOCDIR)/Documentation/DocBook/.*.sgml.cmd
  62.     test ! -d $(DOCDIR)/Documentation/DocBook ||                                  \
  63.        find $(DOCDIR)/Documentation/DocBook -name "*.9"    -exec mv {} $(TMP_MAN) \;
  64.     test ! -d $(DOCDIR)/Documentation/DocBook ||                                  \
  65.        find $(DOCDIR)/Documentation/DocBook -name "*.9.gz" -exec mv {} $(TMP_MAN) \;
  66.     test ! -d $(DOCDIR)/Documentation/DocBook/man ||                       \
  67.        rm -rf $(DOCDIR)/Documentation/DocBook/man
  68.     test ! -d $(DOCDIR)/Documentation/DocBook ||                           \
  69.        mv $(DOCDIR)/Documentation/DocBook $(DOCDIR)/html
  70.   ifneq ($(shell if [ $(VERSION) -ge 2 ] && [ $(PATCHLEVEL) -ge 5 ]; then \
  71.                       echo new;fi),)
  72.         find -name Kconfig -print0 | xargs -0r cat | \
  73.              (umask 000 ; cat > $(DOCDIR)/Kconfig.collected)
  74. # removing if empty should be faster than running find twice
  75.     if ! test -s $(DOCDIR)/Kconfig.collected ; then \
  76.         rm -f $(DOCDIR)/Kconfig.collected ;          \
  77.          fi
  78.   endif
  79.   ifneq ($(strip $(doc_clean_hook)),)
  80.     (cd $(DOCDIR);              \
  81.                test -x $(doc_clean_hook) && $(doc_clean_hook))
  82.   endif
  83.     -gzip -9qfr $(DOCDIR)
  84.     -find $(DOCDIR)      -type f -name \*.gz -perm +111 -exec gunzip {} \;
  85.     -find $(DOCDIR)/html -type f -name \*.gz            -exec gunzip {} \;
  86.     $(install_file) $(DEBDIR)/pkg/doc/copyright $(DOCDIR)/copyright
  87.     -rmdir   $(MAN9DIR)
  88.     -rmdir   $(MANDIR)
  89. endif
  90.  
  91. debian/$(d_package): testroot
  92.     $(REASON)
  93.     @echo "This is kernel package version $(kpkg_version)."
  94. ifeq ($(strip $(MAKING_VIRTUAL_IMAGE)),)
  95.     $(make_directory) $(TMPTOP)/DEBIAN
  96.     $(eval $(deb_rule))
  97.     sed -e 's/=P/$(package)/g' -e 's/=V/$(version)/g' \
  98.         $(DEBDIR)/pkg/doc/postinst >        $(TMPTOP)/DEBIAN/postinst
  99.     chmod 755                                   $(TMPTOP)/DEBIAN/postinst
  100.     dpkg-gencontrol -isp -p$(package)         -P$(TMPTOP)/
  101.     chmod -R og=rX                              $(TMPTOP)
  102.     chown -R root:root                          $(TMPTOP)
  103.     dpkg --build                                $(TMPTOP) $(DEB_DEST)
  104. endif
  105.  
  106. binary/$(d_package): 
  107.     $(REASON)
  108.     @echo "This is kernel package version $(kpkg_version)."
  109. ifeq ($(strip $(MAKING_VIRTUAL_IMAGE)),)
  110.     $(require_root)
  111.     $(eval $(deb_rule))
  112.     $(root_run_command) debian/$(package)
  113. endif
  114.  
  115. #Local variables:
  116. #mode: makefile
  117. #End:
  118.