Makefile 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  1. #
  2. # $Id$
  3. # This file is part of the Free Pascal run time library.
  4. # Copyright (c) 1996-98 by Michael van Canneyt
  5. #
  6. # Makefile for the Free Pascal Documentation
  7. #
  8. # See the file COPYING.FPC, included in this distribution,
  9. # for details about the copyright.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. #
  15. #####################################################################
  16. # Configurable section
  17. #####################################################################
  18. # Debugging the install, that will only copy the .tex to index.html
  19. # so a make html and make install goes quickly
  20. #INSTALLDEBUG=1
  21. override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
  22. ifneq ($(findstring darwin,$(OSTYPE)),)
  23. inUnix=1 #darwin
  24. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  25. else
  26. ifeq ($(findstring ;,$(PATH)),)
  27. inUnix=1
  28. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  29. else
  30. SEARCHPATH:=$(subst ;, ,$(PATH))
  31. endif
  32. endif
  33. SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
  34. ifndef FPC
  35. ifdef PP
  36. FPC=$(PP)
  37. endif
  38. endif
  39. ifndef FPC
  40. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  41. ifneq ($(FPCPROG),)
  42. FPCPROG:=$(firstword $(FPCPROG))
  43. FPC:=$(shell $(FPCPROG) -PB)
  44. ifneq ($(findstring Error,$(FPC)),)
  45. override FPC=ppc386
  46. endif
  47. else
  48. override FPC=ppc386
  49. endif
  50. endif
  51. override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
  52. override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
  53. HOSTOS=$(shell $(FPC) -iSO)
  54. SYSTEMUNITDIR=$(HOSTOS)
  55. ifeq ($(findstring bsd,$(HOSTOS)),)
  56. override SYSTEMUNITDIR=bsd
  57. endif
  58. ifeq ($(findstring darwin,$(HOSTOS)),)
  59. override SYSTEMUNITDIR=bsd
  60. endif
  61. # Which docs are made when 'html' is specified
  62. HTML = user rtl fcl ref prog fpdoc chart
  63. # Can be 'report','book', 'html', 'hevea', 'ts3' 'ts4'
  64. ifdef USEHEVEA
  65. PREAMBLETYPE = hevea
  66. else
  67. ifdef USEL2H
  68. PREAMBLETYPE = html
  69. else
  70. PREAMBLETYPE = report
  71. endif
  72. endif
  73. # Where do you want the html files to be put ?
  74. ifndef PREFIXINSTALLDIR
  75. PREFIXINSTALLDIR=/usr
  76. endif
  77. ifndef DOCINSTALLDIR
  78. DOCINSTALLDIR:=$(PREFIXINSTALLDIR)/doc/fpc-$(shell $(FPC) -iV)
  79. endif
  80. ifndef FPDOC
  81. ifneq ($(wildcard ../utils/fpdoc/fpdoc),)
  82. FPDOC=../utils/fpdoc/fpdoc
  83. else
  84. FPDOC=fpdoc
  85. endif
  86. endif
  87. ifndef FPCSRCDIR
  88. FPCSRCDIR=..
  89. endif
  90. # Use Ascii mode ? (i.e. no pics in produced HTML ?)
  91. ifndef ASCIIMODE
  92. ASCIIMODE=NO
  93. endif
  94. #######################################################################
  95. # LaTeX Program definitions
  96. #######################################################################
  97. # Latex itself
  98. ifndef LATEX
  99. LATEX = latex
  100. endif
  101. # DVI to PS converter
  102. ifndef DVIPS
  103. DVIPS=dvips
  104. endif
  105. # DVI to TXT converter
  106. ifndef DVITXT
  107. DVITXT=dvi2tty -w132
  108. endif
  109. # PDF converter
  110. ifndef PDFLATEX
  111. PDFLATEX=pdflatex
  112. endif
  113. # Makeindex programma
  114. ifndef MAKEINDEX
  115. MAKEINDEX=makeindex
  116. endif
  117. #######################################################################
  118. # Latex2html conversion.
  119. #######################################################################
  120. ifdef USEL2H
  121. # Command to use.
  122. ifndef LATEX2HTML
  123. LATEX2HTML = /usr/bin/latex2html
  124. endif
  125. # Default options for converter
  126. ifndef LATEX2HTMLOPTS
  127. LATEX2HTMLOPTS = -no_reuse -up_url "../fpctoc.html"\
  128. -up_title "Free Pascal manuals"\
  129. -html_version 4.0 -split 3
  130. endif
  131. endif # USEL2H
  132. #######################################################################
  133. # HEVEA conversion.
  134. #######################################################################
  135. ifdef USEHEVEA
  136. # Hevea conversion.
  137. ifndef HEVEA
  138. HEVEA = /usr/bin/hevea
  139. endif
  140. endif # USEHEVEA
  141. # tmpdir
  142. export TMP=/tmp
  143. #
  144. #######################################################################
  145. # End of configurable section. Do not edit after this line.
  146. #######################################################################
  147. PS = $(addsuffix .ps, $(HTML))
  148. DVI = $(addsuffix .dvi, $(HTML))
  149. TXT = $(addsuffix .txt, $(HTML))
  150. PDF = $(addsuffix .pdf, $(HTML))
  151. TOC = $(addsuffix .toc, $(HTML) onechap)
  152. AUX = $(addsuffix .aux, $(HTML) onechap)
  153. LOG = $(addsuffix .log, $(HTML) onechap)
  154. LOT = $(addsuffix .lot, $(HTML) onechap)
  155. OUT = $(addsuffix .out, $(HTML) onechap)
  156. CHK = $(addsuffix .chk, $(HTML) progex unitex refex htex onechap scripts)
  157. CHAPTERS = $(addsuffix .tex, crt dos getopts go32 graph linux printer\
  158. strings objects heaptrc sysutils ipc mouse gpm dxeload \
  159. emu387 ports math keyboard typinfo video)
  160. GTKPDF=$(addsuffix .pdf,$(addprefix gtk, 1 2 3 4 5))
  161. # Check if ascii-mode requested
  162. ifeq ($(ASCIIMODE),YES)
  163. ifdef USEL2H
  164. LATEX2HTMLOPTS+=-ascii_mode
  165. endif
  166. ifdef USEHEVEA
  167. HEVEAOPTS+=-text
  168. endif
  169. endif
  170. #####################################################################
  171. # Conversion from types
  172. #####################################################################
  173. .PHONY: clean dvi help html ps psdist htmldist htmdist htdist pdfdist \
  174. txtdist htm txt pdf refex alldist messages onechap gtk \
  175. user ref prog rtl
  176. .SUFFIXES: .dvi .tex .ps .txt .pdf
  177. # default show help
  178. .dvi.ps:
  179. $(DVIPS) $<
  180. .tex.dvi:
  181. -rm $*.aux $*.idx $*.ilg $*.ind $*.log $*.out $*.toc $*.tmp $*.xref $*.4ht
  182. $(LATEX) $*
  183. -$(MAKEINDEX) $*
  184. $(LATEX) $*
  185. -$(MAKEINDEX) $*
  186. $(LATEX) $*
  187. .dvi.txt:
  188. $(DVITXT) -o $*.txt $*.dvi
  189. .tex.pdf:
  190. -rm $*.aux $*.idx $*.ilg $*.ind $*.log $*.out $*.toc $*.tmp $*.xref $*.4ht
  191. $(PDFLATEX) $*
  192. -$(MAKEINDEX) $*
  193. $(PDFLATEX) $*
  194. -$(MAKEINDEX) $*
  195. $(PDFLATEX) $*
  196. #####################################################################
  197. # Targets
  198. #####################################################################
  199. help:
  200. @echo 'Possible targets :'
  201. @echo ' dvi : Make documentation using latex.'
  202. @echo ' ps : Make documentation using latex and dvips.'
  203. @echo ' html : Make HTML documentation using default converter.'
  204. @echo ' hevea : Make HTML documentation using hevea'
  205. @echo ' l2h : Make HTML documentation using latex2html'
  206. @echo ' 4ht : Make HTML documentation using tex4ht'
  207. @echo ' pdf : Make documentation using pdflatex'
  208. @echo ' txt : dvi, convert to text using dvi2tty'
  209. @echo ' htm : Convert .html to .htm files, zip result'
  210. @echo ' clean : Clean up the mess.'
  211. @echo ' examples : Comple all generic examples'
  212. @echo ' linuxexamples : Compile all examples for linux'
  213. @echo ' dosexamples : Compile all examples for dos'
  214. @echo ' execute : Execute examples (DOS/Windows/OS/2 only)'
  215. @echo ' htmldist : html, and rchive result.'
  216. @echo ' psdist : ps, and archive result.'
  217. @echo ' pdfdist : pdf, and archive result.'
  218. clean:
  219. -rm -f preamble.inc date.inc htex.sed
  220. -rm -f *.htex *.hind *.haux *.htoc $(addsuffix *.html,$(HTML))
  221. -rm -f *.4tc *.4ct *.css *.lg *.tmp *.xref
  222. -rm -rf $(HTML) onechap
  223. -rm -f $(TOC) $(LOG) $(DVI) $(PDF) $(AUX) $(OUT) $(PS) *.i* $(LOT) $(TXT) $(CHK)
  224. -rm -f onechap.dvi onechap.pdf onechap.ps onechap.out onechap.log onechap.aux
  225. # Styles
  226. -rm -f $(notdir $(wildcard styles/*))
  227. # Units
  228. -$(MAKE) -C crtex clean
  229. -$(MAKE) -C dosex clean
  230. -$(MAKE) -C go32ex clean
  231. -$(MAKE) -C heapex clean
  232. -$(MAKE) -C ipcex clean
  233. -$(MAKE) -C linuxex clean
  234. -$(MAKE) -C mmouseex clean
  235. -$(MAKE) -C mouseex clean
  236. -$(MAKE) -C objectex clean
  237. -$(MAKE) -C optex clean
  238. -$(MAKE) -C printex clean
  239. -$(MAKE) -C sockex clean
  240. -$(MAKE) -C stringex clean
  241. -$(MAKE) -C sysutex clean
  242. -$(MAKE) -C mathex clean
  243. -$(MAKE) -C graphex clean
  244. -$(MAKE) -C gpmex clean
  245. -$(MAKE) -C typinfex clean
  246. -$(MAKE) -C kbdex clean
  247. -$(MAKE) -C videoex clean
  248. # Reference
  249. -$(MAKE) -C refex clean
  250. # Programmers manual
  251. -$(MAKE) -C progex clean
  252. $(TXT) : %.txt: %.dvi
  253. $(DVI) : %.dvi: %.tex
  254. $(PDF) : %.pdf: %.tex
  255. unitex.chk:
  256. ifndef INSTALLDEBUG
  257. $(MAKE) -C crtex tex
  258. $(MAKE) -C dosex tex
  259. $(MAKE) -C go32ex tex
  260. $(MAKE) -C heapex tex
  261. $(MAKE) -C ipcex tex
  262. $(MAKE) -C linuxex tex
  263. $(MAKE) -C mouseex tex
  264. $(MAKE) -C mmouseex tex
  265. $(MAKE) -C objectex tex
  266. $(MAKE) -C optex tex
  267. $(MAKE) -C printex tex
  268. $(MAKE) -C sockex tex
  269. $(MAKE) -C stringex tex
  270. $(MAKE) -C sysutex tex
  271. $(MAKE) -C mathex tex
  272. $(MAKE) -C graphex tex
  273. $(MAKE) -C gpmex tex
  274. $(MAKE) -C kbdex tex
  275. $(MAKE) -C typinfex tex
  276. $(MAKE) -C videoex tex
  277. endif
  278. touch unitex.chk
  279. refex.chk:
  280. ifndef INSTALLDEBUG
  281. $(MAKE) -C refex tex
  282. endif
  283. touch refex.chk
  284. progex.chk:
  285. ifndef INSTALLDEBUG
  286. $(MAKE) -C progex tex
  287. endif
  288. touch progex.chk
  289. messages:
  290. msg2inc -TE ../compiler/errore.msg messages.tex
  291. #
  292. # Include files
  293. #
  294. date.inc:
  295. @echo \\date\{`date +'%B %Y'`\} > date.inc
  296. preamble.inc:
  297. cp -f preamble.$(PREAMBLETYPE) preamble.inc
  298. ifeq ($(OS),Windows_NT)
  299. inWinNT=1
  300. endif
  301. ifndef inWinNT
  302. scripts.chk:
  303. chmod +x tex2htex
  304. chmod +x pp2tex
  305. chmod +x progex/c2tex
  306. touch scripts.chk
  307. endif
  308. # Local copy of the required styles
  309. syntax.sty: styles/syntax.sty
  310. cp $(wildcard styles/*.*) .
  311. ifndef inWinNT
  312. INCLUDES=date.inc preamble.inc syntax.sty scripts.chk
  313. else
  314. INCLUDES=date.inc preamble.inc syntax.sty
  315. endif
  316. #####################################################################
  317. # Tex from XML
  318. #####################################################################
  319. FCLOPTS=--package=fcl --descr=classes.xml --input='$(FPCSRCDIR)/rtl/$(HOSTOS)/classes.pp -Fi$(FPCSRCDIR)/rtl/objpas/classes'
  320. fcl.inc: classes.xml
  321. $(FPDOC) --output=fcl.inc $(FCLOPTS) --format=latex
  322. RTLOPTS=--package=rtl
  323. ifndef CURRENTXMLONLY
  324. XMLUNITS=sysutils strutils dateutils systhrds strings mouse keyboard \
  325. crt video dos sockets objects heaptrc mmx ipc printer typinfo \
  326. ports getopts emu387 dxeload go32 gpm graph oldlinux baseunix \
  327. unixtype unix classes unixutil x86 dynlibs linux math system\
  328. objpas dateutils
  329. RTLXML=$(addsuffix .xml,$(XMLUNITS))
  330. RTLOPTS+= --descr=strutils.xml --input="../rtl/objpas/strutils.pp"
  331. RTLOPTS+= --descr=systhrds.xml --input="../rtl/unix/systhrds.pp -Fi../rtl/inc"
  332. RTLOPTS+= --descr=sysutils.xml --input="../rtl/unix/sysutils.pp -Fi../rtl/objpas/sysutils -Fi../rtl/inc"
  333. RTLOPTS+= --descr=strings.xml --input="../rtl/inc/strings.pp -Fi../rtl/i386 -Fi../rtl/inc"
  334. RTLOPTS+= --descr=mouse.xml --input="../rtl/unix/mouse.pp -Fi../rtl/inc"
  335. RTLOPTS+= --descr=keyboard.xml --input="../rtl/unix/keyboard.pp -Fi../rtl/inc"
  336. RTLOPTS+= --descr=crt.xml --input="../rtl/unix/crt.pp -Fi../rtl/inc"
  337. RTLOPTS+= --descr=video.xml --input="../rtl/unix/video.pp -Fi../rtl/inc"
  338. RTLOPTS+= --descr=dos.xml --input="../rtl/unix/dos.pp -Fi../rtl/inc -dcpui386"
  339. RTLOPTS+= --descr=sockets.xml --input="-dver1_0 ../rtl/unix/sockets.pp -Fi../rtl/inc -Fi../rtl/$(HOSTOS)"
  340. RTLOPTS+= --descr=objects.xml --input="../rtl/inc/objects.pp -Fi../rtl/i386 -Fi../rtl/$(HOSTOS)"
  341. RTLOPTS+= --descr=heaptrc.xml --input="../rtl/inc/heaptrc.pp -Fi../rtl/i386 -Fi../rtl/$(HOSTOS)"
  342. RTLOPTS+= --descr=mmx.xml --input="../rtl/i386/mmx.pp -Fi../rtl/$(HOSTOS)"
  343. RTLOPTS+= --descr=ipc.xml --input="../rtl/unix/ipc.pp -Fi../rtl/$(HOSTOS)"
  344. RTLOPTS+= --descr=printer.xml --input="../rtl/unix/printer.pp -Fi../rtl/$(HOSTOS) -Fi../rtl/inc"
  345. RTLOPTS+= --descr=typinfo.xml --input="../rtl/objpas/typinfo.pp -Fi../rtl/$(HOSTOS)"
  346. RTLOPTS+= --descr=ports.xml --input="../rtl/unix/ports.pp -Fi../rtl/$(HOSTOS)"
  347. RTLOPTS+= --descr=getopts.xml --input="../rtl/inc/getopts.pp -Fi../rtl/$(HOSTOS)"
  348. RTLOPTS+= --descr=emu387.xml --input="../rtl/go32v2/emu387.pp -Fi../rtl/i386"
  349. RTLOPTS+= --descr=dxeload.xml --input="../rtl/go32v2/dxeload.pp -Fi../rtl/i386"
  350. RTLOPTS+= --descr=go32.xml --input="../rtl/go32v2/go32.pp -Fi../rtl/i386"
  351. RTLOPTS+= --descr=gpm.xml --input="-dVER1_0 ../rtl/unix/gpm.pp -Fi../rtl/i386"
  352. RTLOPTS+= --descr=graph.xml --input="../rtl/unix/graph.pp -Fi../rtl/i386 -Fi../rtl/inc/graph"
  353. RTLOPTS+= --descr=oldlinux.xml --input="../rtl/unix/oldlinux.pp -Fi../rtl/linux -Fi../rtl/unix"
  354. RTLOPTS+= --descr=unixtype.xml --input="../rtl/unix/unixtype.pp -Fi../rtl/unix -Fi../rtl/linux -Fi../rtl/linux/i386"
  355. RTLOPTS+= --descr=baseunix.xml --input="../rtl/linux/baseunix.pp -Fi../rtl/unix -Fi../rtl/linux -Fi../rtl/linux/i386"
  356. RTLOPTS+= --descr=unix.xml --input="../rtl/unix/unix.pp -Fi../rtl/unix -Fi../rtl/linux -Fi../rtl/linux/i386"
  357. RTLOPTS+= --descr=classes.xml --input='$(FPCSRCDIR)/rtl/$(HOSTOS)/classes.pp -Fi$(FPCSRCDIR)/rtl/objpas/classes'
  358. RTLOPTS+= --descr=unixutil.xml --input="../rtl/unix/unixutil.pp"
  359. RTLOPTS+= --descr=x86.xml --input="../rtl/unix/x86.pp"
  360. RTLOPTS+= --descr=dynlibs.xml --input="../rtl/inc/dynlibs.pp -Fi../rtl/unix"
  361. RTLOPTS+= --descr=linux.xml --input="../rtl/unix/linux.pp -Fi../rtl/linux -Fi../rtl/unix"
  362. RTLOPTS+= --descr=math.xml --input="../rtl/objpas/math.pp -Fi../rtl/i386 -dFPC_HAS_TYPE_EXTENDED"
  363. RTLOPTS+= --descr=system.xml --input="-dfpdocsystem -dHASGETHEAPSTATUS -dSUPPORT_DOUBLE ../rtl/$(SYSTEMUNITDIR)/system.pp -Fi../rtl/unix -Fi../rtl/inc -Fi../rtl/i386 -dCPU32 -dHASVARIANT -dFPC_HAS_TYPE_EXTENDED -dHASWIDECHAR"
  364. RTLOPTS+=--descr=objpas.xml --input="-dHASINTF ../rtl/objpas/objpas.pp"
  365. RTLOPTS+=--descr=dateutils.xml --input="../rtl/objpas/dateutils.pp -Fi../rtl/objpas"
  366. else
  367. RTLXML=dateutils.xml
  368. RTLOPTS+=--descr=dateutils.xml --input="../rtl/objpas/dateutils.pp -Fi../rtl/objpas"
  369. endif
  370. rtl.inc: $(RTLXML)
  371. $(FPDOC) --output=rtl.inc $(RTLOPTS) --format=latex
  372. #####################################################################
  373. # DVI files
  374. #####################################################################
  375. onechap: onechap.dvi
  376. ref.dvi: ref.tex $(INCLUDES)
  377. prog.dvi: prog.tex $(INCLUDES)
  378. user.dvi: user.tex $(INCLUDES)
  379. fpdoc.dvi: fpdoc.tex $(INCLUDES)
  380. fcl.dvi: fcl.tex fcl.inc $(INCLUDES)
  381. chart.dvi: chart.tex
  382. ref.pdf: ref.tex $(INCLUDES)
  383. user.pdf: user.tex $(INCLUDES)
  384. prog.pdf: prog.tex $(INCLUDES)
  385. onechap.pdf: onechap.tex $(INCLUDES)
  386. onechap.dvi: onechap.tex $(INCLUDES)
  387. fpdoc.pdf: fpdoc.tex $(INCLUDES)
  388. fcl.pdf: fcl.tex fcl.inc $(INCLUDES)
  389. chart.pdf: chart.tex
  390. rtl.dvi: rtl.tex rtl.inc $(INCLUDES)
  391. rtl.pdf: rtl.tex rtl.inc $(INCLUDES)
  392. dvi : $(DVI)
  393. txt : dvi $(TXT)
  394. ps : dvi $(PS)
  395. pdf : $(PDF)
  396. all : dvi ps pdf txt html
  397. #######################################################################
  398. # HTML creation
  399. #######################################################################
  400. .PHONY: htex user prog onechap ref internal html hevea
  401. ifdef INSTALLDEBUG
  402. #######################################################################
  403. # Installation debugging
  404. $(HTML):
  405. mkdir $@
  406. cp [email protected] $@/index.html
  407. html: $(HTML)
  408. else
  409. #######################################################################
  410. # Automatic selection. Default tex4ht
  411. ifdef USEHEVEA
  412. include Makefile.hev
  413. else
  414. ifdef USEL2H
  415. include Makefile.l2h
  416. else
  417. include Makefile.4ht
  418. endif # USEL2H
  419. endif # USEHEVEA
  420. endif # INSTALLDEBUG
  421. #######################################################################
  422. # Targets to force using a specific tool.
  423. hevea:
  424. $(MAKE) html USEHEVEA=1
  425. l2h:
  426. $(MAKE) html USEL2H=1
  427. 4ht:
  428. $(MAKE) html USETEX4HT=1
  429. fcl: fcl/index.html
  430. fcl/index.html: classes.xml
  431. $(FPDOC) $(FCLOPTS) --format=html --output=fcl
  432. rtl: rtl/index.html
  433. rtl/index.html: $(RTLXML)
  434. $(FPDOC) $(RTLOPTS) --format=html --output=rtl
  435. #####################################################################
  436. # GTK Articles
  437. #####################################################################
  438. gtk: $(GTKPDF)
  439. gtk1.pdf: gtk1.tex
  440. gtk2.pdf: gtk2.tex
  441. gtk3.pdf: gtk3.tex
  442. gtk4.pdf: gtk4.tex
  443. gtk5.pdf: gtk5.tex
  444. #####################################################################
  445. # Installation
  446. #####################################################################
  447. pdfinstall: pdf
  448. install -d -m 755 $(DOCINSTALLDIR)
  449. cp $(PDF) $(DOCINSTALLDIR)
  450. htmlinstall: html
  451. install -d -m 755 $(DOCINSTALLDIR)
  452. cp fpctoc.html $(DOCINSTALLDIR)
  453. cp -R buttons $(DOCINSTALLDIR)
  454. cp -R pics $(DOCINSTALLDIR)
  455. cp -R $(HTML) $(DOCINSTALLDIR)
  456. find $(DOCINSTALLDIR) -name 'CVS' -or -name '*.eps' | xargs -n1 rm -rf
  457. install:
  458. @echo Choose install from:
  459. @echo pdfinstall,htmlinstall,htmldosinstall
  460. @exit
  461. #####################################################################
  462. # Archives
  463. #####################################################################
  464. psdist: $(PS)
  465. tar -cvzf fpcdocps.tar.gz $(PS)
  466. zip docs-ps $(PS)
  467. pdfdist: pdf
  468. zip docs-pdf $(PDF)
  469. dvidist: dvi
  470. zip docs-dvi $(DVI)
  471. txtdist: txt
  472. zip docs-txt $(TXT)
  473. #####################################################################
  474. # Zips of htmls
  475. #####################################################################
  476. makehtm: makehtm.pp
  477. fpc makehtm.pp
  478. DOCPREFIX=doc
  479. BASEDIR=$(shell pwd)
  480. htmltar:
  481. ifndef SKIPINSTALL
  482. $(MAKE) htmlinstall DOCINSTALLDIR=$(DOCPREFIX)
  483. endif
  484. cd $(DOCPREFIX) ; tar cz * > $(BASEDIR)/fpcdoc.tar.gz ; cd $(BASEDIR)
  485. ifndef SKIPINSTALL
  486. rm -rf $(DOCPREFIX)
  487. endif
  488. htmlzip:
  489. ifndef SKIPINSTALL
  490. $(MAKE) htmlinstall DOCINSTALLDIR=$(DOCPREFIX)
  491. endif
  492. zip -D9rq doc-html $(DOCPREFIX)/*
  493. ifndef SKIPINSTALL
  494. rm -rf $(DOCPREFIX)
  495. endif
  496. htmzip: makehtm
  497. ifndef SKIPINSTALL
  498. $(MAKE) htmlinstall DOCINSTALLDIR=$(DOCPREFIX)
  499. endif
  500. makehtm -r $(DOCPREFIX)
  501. zip -D9rq doc-htm $(DOCPREFIX)
  502. rm -rf $(DOCPREFIX)
  503. # html only, no htm
  504. htmldist: htmlzip htmltar
  505. # htm only, no html
  506. htmdist: makehtm htmzip
  507. # html and htm, optimized.
  508. htdist:
  509. $(MAKE) htmlinstall DOCINSTALLDIR=$(DOCPREFIX)
  510. $(MAKE) htmltar SKIPINSTALL=Y
  511. $(MAKE) htmlzip SKIPINSTALL=Y
  512. $(MAKE) htmzip SKIPINSTALL=Y
  513. alldist: dvidist psdist txtdist pdfdist htdist
  514. distclean: clean
  515. -rm -f *.tar.gz *.zip
  516. #####################################################################
  517. # Examples
  518. #####################################################################
  519. examples:
  520. $(MAKE) -C crtex
  521. $(MAKE) -C dosex
  522. $(MAKE) -C optex
  523. $(MAKE) -C mathex
  524. $(MAKE) -C printex
  525. $(MAKE) -C refex
  526. $(MAKE) -C stringex
  527. $(MAKE) -C objectex
  528. $(MAKE) -C sysutex
  529. $(MAKE) -C typinfex
  530. $(MAKE) -C kbdex
  531. dosexamples: examples
  532. $(MAKE) -C go32ex
  533. $(MAKE) -C mouseex
  534. linuxexamples: examples
  535. $(MAKE) -C linuxex
  536. $(MAKE) -C sockex
  537. $(MAKE) -C ipcex
  538. execute:
  539. $(MAKE) -C dosex all
  540. $(MAKE) -C dosex execute
  541. $(MAKE) -C refex all
  542. $(MAKE) -C refex execute
  543. $(MAKE) -C mathex all
  544. $(MAKE) -C mathex execute
  545. $(MAKE) -C stringex all
  546. $(MAKE) -C stringex execute
  547. $(MAKE) -C objectex all
  548. $(MAKE) -C objectex execute
  549. $(MAKE) -C sysutex all
  550. $(MAKE) -C sysutex execute
  551. $(MAKE) -C typinfex all
  552. $(MAKE) -C typinfex execute
  553. #
  554. # $Log$
  555. # Revision 1.37 2004-12-22 08:47:31 marco
  556. # * bsd system unit location fix. Hope it works for Darwin too
  557. #
  558. # Revision 1.36 2004/12/21 22:58:24 michael
  559. # + Added dateutils functions
  560. #
  561. # Revision 1.35 2004/12/19 20:20:16 peter
  562. # * includes variable instead of target to prevent always rebuilding
  563. # * also build fcl.pdf
  564. #
  565. # Revision 1.34 2004/12/15 22:14:14 michael
  566. # + Make targets fixed (hopefully)
  567. #
  568. # Revision 1.33 2004/12/14 21:50:02 michael
  569. # + Delete aux file before running (pdf)latex.
  570. #
  571. # Revision 1.32 2004/12/14 21:44:54 michael
  572. # + Converted makehtm to pascal program. Argument line too long
  573. #
  574. # Revision 1.31 2004/12/06 22:43:41 michael
  575. # * Hopefully fixed make. Not yet tested, as my XML file is currently faulty.
  576. #
  577. # Revision 1.30 2004/10/22 23:02:40 michael
  578. # + Math.xml now ok to be used
  579. #
  580. # Revision 1.29 2004/10/22 20:45:50 michael
  581. # + Most units added
  582. #
  583. # Revision 1.28 2004/09/23 21:41:08 florian
  584. # * fixed Makefile to work on non i386 platforms
  585. #
  586. # Revision 1.27 2004/07/17 21:02:28 marco
  587. # * x86 dependancy fixed, reported by Claviola
  588. #
  589. # Revision 1.26 2004/05/18 22:10:56 michael
  590. # + Updates for 1.9.4. Mostly MACPas related
  591. #
  592. # Revision 1.25 2004/03/19 17:39:03 peter
  593. # * use fpdoc from utils tree if found
  594. #
  595. # Revision 1.24 2003/11/16 00:03:03 michael
  596. # + Many changes for 2.0 beta
  597. #
  598. # Revision 1.23 2003/11/02 00:14:23 marco
  599. # * fixed classes moving to rtl, and the OS dependancy of the classes unit
  600. # generation.
  601. #
  602. # Revision 1.22 2003/05/29 10:25:51 peter
  603. # * allow to specify FPCSRCDIR and FPDOC
  604. #
  605. # Revision 1.21 2003/03/18 21:25:23 michael
  606. # + Added fcl docs and fpdoc
  607. #
  608. # Revision 1.20 2003/03/18 00:14:51 michael
  609. # + Added fpdoc
  610. #
  611. # Revision 1.19 2003/03/17 08:27:27 michael
  612. # + Split out html generation
  613. #
  614. # Revision 1.18 2003/03/16 15:24:58 peter
  615. # * also remove htex.sed
  616. #
  617. # Revision 1.17 2003/03/16 15:22:18 peter
  618. # * support for hevea
  619. # * provided local copies or required styles since debian does not
  620. # supply the listings.sty anymore
  621. #
  622. # Revision 1.16 2003/02/24 23:37:52 michael
  623. # + Preparations for version 1.0.8
  624. #
  625. # Revision 1.15 2002/11/10 12:22:10 carl
  626. # * update makefiles for testing
  627. # * update example which did not compile
  628. #
  629. # Revision 1.14 2002/04/23 18:03:50 michael
  630. # + removed fcl target in HTML
  631. #
  632. # Revision 1.13 2002/03/19 14:33:18 pierre
  633. # * remove ipcex directory target from examples
  634. #
  635. # Revision 1.12 2002/03/12 22:13:42 michael
  636. # + Now pics directory is included in HTML
  637. #
  638. # Revision 1.11 2001/11/05 20:10:05 michael
  639. # + Added onechap target
  640. #
  641. # Revision 1.10 2001/10/18 21:41:26 peter
  642. # * fixed latex2html settings
  643. #
  644. # Revision 1.9 2001/10/11 23:36:54 carl
  645. # + reinstated Windows NT support
  646. #
  647. # Revision 1.8 2001/10/04 21:03:13 michael
  648. # + Added video and keyboard units
  649. #
  650. # Revision 1.7 2001/09/22 11:15:04 peter
  651. # * chmod the scripts
  652. # * fixed html installation
  653. #
  654. # Revision 1.6 2001/07/29 20:28:00 peter
  655. # * move preamble to separate include file so changes only need to
  656. # be done to this file.
  657. #
  658. # Revision 1.5 2001/07/10 22:01:15 michael
  659. # + Some cleaning up
  660. #
  661. # Revision 1.4 2000/10/12 10:41:58 peter
  662. # * more examples
  663. #
  664. # Revision 1.3 2000/09/02 21:51:36 peter
  665. # * fixed pdf creating (merged)
  666. #
  667. # Revision 1.1 2000/07/13 09:10:03 michael
  668. # + Initial import
  669. #