Makefile 21 KB

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