~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to docs/mathex/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2004-08-12 16:29:37 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040812162937-moo8ulvysp1ln771
Tags: 1.9.4-5
fp-compiler: needs ld, adding dependency on binutils.  (Closes: #265265)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
#######################################################################
6
6
 
7
7
# Compiler
8
 
PP=ppc386
9
8
 
 
9
override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
 
10
ifneq ($(findstring darwin,$(OSTYPE)),)
 
11
inUnix=1 #darwin
 
12
SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
 
13
else
 
14
ifeq ($(findstring ;,$(PATH)),)
 
15
inUnix=1
 
16
SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
 
17
else
 
18
SEARCHPATH:=$(subst ;, ,$(PATH))
 
19
endif
 
20
endif
 
21
SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
 
22
PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
 
23
ifeq ($(PWD),)
 
24
PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
 
25
ifeq ($(PWD),)
 
26
$(error You need the GNU utils package to use this Makefile)
 
27
else
 
28
PWD:=$(firstword $(PWD))
 
29
SRCEXEEXT=
 
30
endif
 
31
else
 
32
PWD:=$(firstword $(PWD))
 
33
SRCEXEEXT=.exe
 
34
endif
 
35
ifndef inUnix
 
36
ifeq ($(OS),Windows_NT)
 
37
inWinNT=1
 
38
else
 
39
ifdef OS2_SHELL
 
40
inOS2=1
 
41
endif
 
42
endif
 
43
else
 
44
ifneq ($(findstring cygdrive,$(PATH)),)
 
45
inCygWin=1
 
46
endif
 
47
endif
 
48
ifdef inUnix
 
49
SRCBATCHEXT=.sh
 
50
else
 
51
ifdef inOS2
 
52
SRCBATCHEXT=.cmd
 
53
else
 
54
SRCBATCHEXT=.bat
 
55
endif
 
56
endif
 
57
ifdef inUnix
 
58
PATHSEP=/
 
59
else
 
60
PATHSEP:=$(subst /,\,/)
 
61
ifdef inCygWin
 
62
PATHSEP=/
 
63
endif
 
64
endif
 
65
ifdef PWD
 
66
BASEDIR:=$(subst \,/,$(shell $(PWD)))
 
67
ifdef inCygWin
 
68
ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
 
69
BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
 
70
BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
 
71
BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
 
72
endif
 
73
endif
 
74
else
 
75
BASEDIR=.
 
76
endif
 
77
ifdef inOS2
 
78
ifndef ECHO
 
79
ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
 
80
ifeq ($(ECHO),)
 
81
ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
 
82
ifeq ($(ECHO),)
 
83
ECHO=echo
 
84
else
 
85
ECHO:=$(firstword $(ECHO))
 
86
endif
 
87
else
 
88
ECHO:=$(firstword $(ECHO))
 
89
endif
 
90
endif
 
91
export ECHO
 
92
endif
 
93
override DEFAULT_FPCDIR=../..
 
94
ifndef FPC
 
95
ifdef PP
 
96
FPC=$(PP)
 
97
endif
 
98
endif
 
99
ifndef FPC
 
100
FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
 
101
ifneq ($(FPCPROG),)
 
102
FPCPROG:=$(firstword $(FPCPROG))
 
103
FPC:=$(shell $(FPCPROG) -PB)
 
104
ifneq ($(findstring Error,$(FPC)),)
 
105
override FPC=ppc386
 
106
endif
 
107
else
 
108
override FPC=ppc386
 
109
endif
 
110
endif
 
111
override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
 
112
override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
10
113
# Unit directory
11
114
# UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
12
115
 
30
133
 
31
134
.SUFFIXES: .pp .tex
32
135
 
33
 
.PHONY: all tex clean
 
136
.PHONY: all tex clean execute
34
137
 
35
138
OBJECTS=ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 ex10 \
36
139
        ex11 ex12 ex13 ex14 ex15 ex16 ex17 ex18 ex19 ex20 \
40
143
 
41
144
TEXOBJECTS=$(addsuffix .tex, $(OBJECTS))
42
145
 
 
146
# This is not the same list as objects, since some of the
 
147
# tests are interactive.
 
148
TOTEST=ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 ex10 \
 
149
        ex11 ex12 ex13 ex14 ex15 ex16 ex17 ex18 ex19 ex20 \
 
150
        ex21 ex22 ex23 ex24 ex25 ex26 ex27 ex28 ex29 ex30 \
 
151
        ex31 ex32 ex33 ex34 ex35 ex36 ex37 ex38 ex39 ex40 \
 
152
        ex41 ex42 ex43 ex44 ex45 ex46 ex47 ex48 ex49 ex50
 
153
LOGFILE=$(addsuffix .log, $(TOTEST))
 
154
 
 
155
 
43
156
all : $(OBJECTS)
44
157
 
45
158
tex : $(TEXOBJECTS)
46
159
 
 
160
execute: $(LOGFILE)
 
161
 
 
162
 
47
163
onetex : tex
48
164
        $(MAKETEX) $(TEXOBJECTS)
49
165
 
50
166
clean : 
51
167
        rm -f *.o *.s $(OBJECTS) $(TEXOBJECTS)
 
168
        rm -f *.ow *.sw *.exe *.dll *.log *.tmp
52
169
 
53
170
$(OBJECTS): %: %.pp
54
 
        $(PP) $(PPOPTS) $*
 
171
        $(FPC) $(PPOPTS) $*
55
172
 
56
173
$(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
57
174
        $(PP2TEX) $*
 
175
 
 
176
$(LOGFILE): %.log: %.exe 
 
177
        $* > $*.log