Makefile
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:5k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. BOOKS := wanbook.sgml z8530book.sgml mcabook.sgml videobook.sgml 
  2.    kernel-api.sgml parportbook.sgml kernel-hacking.sgml 
  3.    kernel-locking.sgml via-audio.sgml mousedrivers.sgml sis900.sgml 
  4.    deviceiobook.sgml procfs-guide.sgml tulip-user.sgml
  5. PS := $(patsubst %.sgml, %.ps, $(BOOKS))
  6. PDF := $(patsubst %.sgml, %.pdf, $(BOOKS))
  7. HTML    :=      $(patsubst %.sgml, %, $(BOOKS))
  8. IMG-parportbook := parport-share.fig parport-multi.fig parport-structure.fig
  9. EPS-parportbook := $(patsubst %.fig, %.eps, $(IMG-parportbook))
  10. PNG-parportbook := $(patsubst %.fig, %.png, $(IMG-parportbook))
  11. C-procfs-example = procfs_example.sgml
  12. books: $(BOOKS)
  13. $(BOOKS): $(TOPDIR)/scripts/docproc
  14. .PHONY: books ps pdf html clean mrproper
  15. ps: $(PS)
  16. pdf: $(PDF)
  17. html: $(HTML)
  18. %.eps: %.fig
  19. fig2dev -Leps $< $@
  20. %.png: %.fig
  21. fig2dev -Lpng $< $@
  22. %.sgml: %.c
  23. echo "<programlisting>" > $@
  24. expand --tabs=8 < $< | 
  25. sed -e "s/&/\&amp;/g" 
  26.     -e "s/</\&lt;/g" 
  27.     -e "s/>/\&gt;/g" >> $@
  28. echo "</programlisting>" >> $@
  29. $(TOPDIR)/scripts/docproc:
  30. $(MAKE) -C $(TOPDIR)/scripts docproc
  31. mousedrivers.sgml: mousedrivers.tmpl
  32. $(TOPDIR)/scripts/docgen <$< >$@
  33. kernel-hacking.sgml: kernel-hacking.tmpl
  34. $(TOPDIR)/scripts/docgen <$< >$@
  35. kernel-locking.sgml: kernel-locking.tmpl
  36. $(TOPDIR)/scripts/docgen <$< >$@
  37. wanbook.sgml: wanbook.tmpl $(TOPDIR)/drivers/net/wan/syncppp.c
  38. $(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/net/wan/syncppp.c 
  39. <wanbook.tmpl >wanbook.sgml
  40. z8530book.sgml: z8530book.tmpl $(TOPDIR)/drivers/net/wan/z85230.c
  41. $(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/net/wan/z85230.c 
  42. <z8530book.tmpl >z8530book.sgml
  43. via-audio.sgml: via-audio.tmpl $(TOPDIR)/drivers/sound/via82cxxx_audio.c
  44. $(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/sound/via82cxxx_audio.c 
  45. <via-audio.tmpl >via-audio.sgml
  46. tulip-user.sgml: tulip-user.tmpl
  47. $(TOPDIR)/scripts/docgen <$< >$@
  48. sis900.sgml: sis900.tmpl $(TOPDIR)/drivers/net/sis900.c
  49. $(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/net/sis900.c 
  50. <sis900.tmpl >sis900.sgml
  51. deviceiobook.sgml: deviceiobook.tmpl
  52. $(TOPDIR)/scripts/docgen <deviceiobook.tmpl >deviceiobook.sgml
  53. mcabook.sgml: mcabook.tmpl $(TOPDIR)/arch/i386/kernel/mca.c
  54. $(TOPDIR)/scripts/docgen $(TOPDIR)/arch/i386/kernel/mca.c 
  55. <mcabook.tmpl >mcabook.sgml
  56. videobook.sgml: videobook.tmpl $(TOPDIR)/drivers/media/video/videodev.c
  57. $(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/media/video/videodev.c 
  58. <videobook.tmpl >videobook.sgml
  59. procfs-guide.sgml:  procfs-guide.tmpl procfs_example.sgml
  60. $(TOPDIR)/scripts/docgen < procfs-guide.tmpl >$@
  61. APISOURCES := $(TOPDIR)/drivers/media/video/videodev.c 
  62. $(TOPDIR)/arch/i386/kernel/irq.c 
  63. $(TOPDIR)/arch/i386/kernel/mca.c 
  64. $(TOPDIR)/arch/i386/kernel/mtrr.c 
  65. $(TOPDIR)/drivers/char/misc.c 
  66. $(TOPDIR)/kernel/printk.c 
  67. $(TOPDIR)/drivers/net/net_init.c 
  68. $(TOPDIR)/drivers/net/8390.c 
  69. $(TOPDIR)/drivers/char/serial.c 
  70. $(TOPDIR)/drivers/pci/pci.c 
  71. $(TOPDIR)/drivers/block/ll_rw_blk.c 
  72. $(TOPDIR)/drivers/sound/sound_core.c 
  73. $(TOPDIR)/drivers/sound/sound_firmware.c 
  74. $(TOPDIR)/drivers/net/wan/syncppp.c 
  75. $(TOPDIR)/drivers/net/wan/z85230.c 
  76. $(TOPDIR)/drivers/usb/usb.c 
  77. $(TOPDIR)/drivers/video/fbmem.c 
  78. $(TOPDIR)/drivers/video/fbcmap.c 
  79. $(TOPDIR)/drivers/video/fbcon.c 
  80. $(TOPDIR)/drivers/video/fbgen.c 
  81. $(TOPDIR)/drivers/video/fonts.c 
  82. $(TOPDIR)/drivers/video/macmodes.c 
  83. $(TOPDIR)/drivers/video/modedb.c 
  84. $(TOPDIR)/fs/devfs/base.c 
  85. $(TOPDIR)/fs/locks.c 
  86. $(TOPDIR)/include/asm-i386/bitops.h 
  87. $(TOPDIR)/kernel/pm.c 
  88. $(TOPDIR)/kernel/ksyms.c 
  89. $(TOPDIR)/kernel/kmod.c 
  90. $(TOPDIR)/kernel/module.c 
  91. $(TOPDIR)/kernel/printk.c 
  92. $(TOPDIR)/kernel/sched.c 
  93. $(TOPDIR)/kernel/sysctl.c 
  94. $(TOPDIR)/lib/string.c 
  95. $(TOPDIR)/lib/vsprintf.c 
  96. $(TOPDIR)/net/netsyms.c
  97.  
  98. kernel-api.sgml: kernel-api.tmpl $(APISOURCES)
  99. $(TOPDIR)/scripts/docgen $(APISOURCES) 
  100. <kernel-api.tmpl >kernel-api.sgml
  101. kernel-api-man: $(APISOURCES)
  102. @rm -rf $(TOPDIR)/Documentation/man
  103. $(TOPDIR)/scripts/kernel-doc -man $^ | 
  104. $(PERL) $(TOPDIR)/scripts/split-man $(TOPDIR)/Documentation/man
  105. parportbook parportbook.pdf: $(PNG-parportbook)
  106. parportbook.ps: $(EPS-parportbook)
  107. parportbook.sgml: parportbook.tmpl $(TOPDIR)/drivers/parport/init.c
  108. $(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/parport/init.c <$< >$@
  109. DVI := $(patsubst %.sgml, %.dvi, $(BOOKS))
  110. AUX := $(patsubst %.sgml, %.aux, $(BOOKS))
  111. TEX := $(patsubst %.sgml, %.tex, $(BOOKS))
  112. LOG := $(patsubst %.sgml, %.log, $(BOOKS))
  113. OUT := $(patsubst %.sgml, %.out, $(BOOKS))
  114. clean:
  115. rm -f core *~
  116. rm -f $(BOOKS)
  117. rm -f $(DVI) $(AUX) $(TEX) $(LOG) $(OUT)
  118. rm -f $(PNG-parportbook) $(EPS-parportbook)
  119. rm -f $(C-procfs-example)
  120. mrproper: clean
  121. rm -f $(PS) $(PDF)
  122. rm -f -r $(HTML)
  123. rm -f .depend
  124. rm -f $(TOPDIR)/scripts/mkdep-docbook
  125. rm -rf DBTOHTML_OUTPUT*
  126. %.ps : %.sgml
  127. @(which db2ps > /dev/null 2>&1) || 
  128.  (echo "*** You need to install DocBook stylesheets ***"; 
  129.   exit 1)
  130. db2ps $<
  131. %.pdf : %.sgml
  132. @(which db2pdf > /dev/null 2>&1) || 
  133.  (echo "*** You need to install DocBook stylesheets ***"; 
  134.   exit 1)
  135. db2pdf $<
  136. %: %.sgml
  137. @(which db2html > /dev/null 2>&1) || 
  138.  (echo "*** You need to install DocBook stylesheets ***"; 
  139.   exit 1)
  140. rm -rf $@
  141. db2html $<
  142. if [ ! -z "$(PNG-$@)" ]; then cp $(PNG-$@) $@; fi
  143. #
  144. # we could have our own dependency generator
  145. #
  146. #
  147. # .depend: $(TOPDIR)/scripts/mkdep-docbook
  148. # $(TOPDIR)/scripts/mkdep-docbook $(wildcard *.tmpl) > .depend
  149. include $(TOPDIR)/Rules.make