forked from hemmecke/fricas-svn
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
184 lines (154 loc) · 5.62 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
## ----------------------------------------
## -- Old-style Axiom makefile variables --
## ----------------------------------------
COMMAND=$(DESTDIR)$(libdir)/fricas/target/$(target)/bin/axiom
pamphlets = configure.ac.pamphlet Makefile.pamphlet
subdir =
SUBDIRS = src
build_srcdir = $(builddir)/src
AXIOM_SRC_TARGETS = all-algebra all-asq all-axiomsys all-book all-boot \
all-clef all-doc all-graph all-hyper all-input all-interpsys \
all-lib all-lisp all-sman all-src
.PHONY: all install $(AXIOM_SRC_TARGETS)
all: all-ax all-contrib
# Generate the efricas script.
all-contrib: all-src
cd contrib/emacs && ${MAKE}
all-ax: all-src
@echo finished system build on `date` | tee >lastBuildDate
all-src: stamp-rootdirs @axiom_all_prerequisites@
all-input: all-src
$(AXIOM_SRC_TARGETS):
cd $(build_srcdir) && $(MAKE) $@
stamp-rootdirs: $(axiom_build_document)
mkdir -p $(axiom_build_bindir)
mkdir -p $(axiom_build_libdir)
mkdir -p $(axiom_target_bindir)
mkdir -p $(axiom_target_libdir)
mkdir -p $(axiom_target_docdir)/spadhelp
mkdir -p $(axiom_target_datadir)/msgs
mkdir -p $(axiom_target_texdir)
mkdir -p $(axiom_targetdir)/algebra/
mkdir -p $(axiom_targetdir)/autoload
mkdir -p $(axiom_target_srcdir)/algebra
mkdir -p ${TMP}
$(STAMP) stamp-rootdirs
.PHONY: all-noweb
all-noweb: stamp-noweb
stamp-noweb:
@echo Making in noweb
( mkdir noweb && \
cd noweb && \
$(TAR) -zxf "@noweb_tarball@" && \
cd src && \
cat Makefile \
| sed -e "s|^BIN=.*|BIN=$(axiom_build_bindir)|" \
-e "s|^LIB=.*|LIB=$(axiom_build_libdir)|" \
-e "s|^MAN=.*|MAN=$(axiom_build_mandir)|" \
-e "s|^TEXINPUTS=.*|TEXINPUTS=$(axiom_target_texdir)|" \
-e 's/ make / $$\(MAKE\) /' \
-e "s,c/nt,c/nt$(EXEEXT)," \
-e "s,c/markup,c/markup$(EXEEXT)," \
-e "s,c/mnt,c/mnt$(EXEEXT)," \
-e "s,c/finduses,c/finduses$(EXEEXT)," \
> Makefile.tmp && mv Makefile.tmp Makefile && \
./awkname $(AWK) && $(MAKE) -j 1 all install )
$(STAMP) stamp-noweb
book:
@ echo 79 building the book as $(axiom_target_docdir)/book.dvi
mkdir -p ${TMP}
mkdir -p $(axiom_target_docdir)/ps
$(INSTALL) $(axiom_src_srcdir)/doc/book.pamphlet $(axiom_target_docdir)
cp $(axiom_src_srcdir)/doc/ps/* $(axiom_target_docdir)/ps
(cd $(axiom_target_docdir) ; \
latex book.pamphlet --interaction nonstopmode && \
latex book.pamphlet --interaction nonstopmode ; \
rm book.pamphlet ; \
rm book.toc ; \
rm book.log ; \
rm book.aux )
@ echo 80 The book is at $(axiom_target_docdir)/book.dvi
reltarget = target/$(target)
install: install-src install-contrib
install-src:
@echo Installing FriCAS in $(prefix)
rm -rf '$(DESTDIR)$(libdir)/fricas'
$(mkinstalldirs) '$(DESTDIR)$(libdir)/fricas'
$(mkinstalldirs) '$(DESTDIR)$(libdir)/fricas/$(reltarget)/lib'
for A in algebra autoload doc share src lib/graph ; do \
for B in `find $(reltarget)/$$A -type d -print` ; do \
$(mkinstalldirs) '$(DESTDIR)$(libdir)'/fricas/$$B \
|| exit 1 ; \
done ; \
for B in `find $(reltarget)/$$A -type f -print` ; do \
$(INSTALL_DATA) $$B '$(DESTDIR)$(libdir)'/fricas/$$B \
|| exit 1 ; \
done ; \
done
$(mkinstalldirs) '$(DESTDIR)$(libdir)/fricas/$(reltarget)/bin'
for A in bin/AXIOMsys bin/asq bin/clef bin/htadd bin/hypertex \
bin/sman bin/viewAlone lib/ex2ht lib/hthits lib/session \
lib/spadbuf lib/spadclient lib/view2D lib/view3D \
lib/viewman ; do \
if [ -f $(reltarget)/$$A$(EXEEXT) ] ; then \
$(INSTALL_PROGRAM) $(reltarget)/$$A$(EXEEXT) \
'$(DESTDIR)$(libdir)'/fricas/$(reltarget)/$$A$(EXEEXT) \
|| exit 1 ; \
fi ; \
done
if [ -f $(reltarget)/lib/libspad.so ] ; then \
$(INSTALL_PROGRAM) $(reltarget)/lib/libspad.so \
'$(DESTDIR)$(libdir)'/fricas/$(reltarget)/lib/libspad.so \
|| exit 1 ; \
fi
if [ -f $(reltarget)/lib/gmp_wrap.so ] ; then \
$(INSTALL_PROGRAM) $(reltarget)/lib/gmp_wrap.so \
'$(DESTDIR)$(libdir)'/fricas/$(reltarget)/lib/gmp_wrap.so \
|| exit 1 ; \
fi
for A in SPADEDIT htsearch presea ; do \
if [ -f $(reltarget)/lib/$$A ] ; then \
$(INSTALL_SCRIPT) $(reltarget)/lib/$$A \
'$(DESTDIR)$(libdir)'/fricas/$(reltarget)/lib/$$A \
|| exit 1 ; \
fi ; \
done
for A in command.list copyright summary ; do \
$(INSTALL_DATA) $(reltarget)/lib/$$A \
'$(DESTDIR)$(libdir)'/fricas/$(reltarget)/lib/$$A \
|| exit 1 ; \
done
echo '#!/bin/sh -' > '${COMMAND}'.tmp
echo AXIOM="'$(libdir)/fricas/target/$(target)'" >> '${COMMAND}'.tmp
echo export AXIOM >> '${COMMAND}'.tmp
echo PATH='$${AXIOM}/bin':'$${PATH}' >> '${COMMAND}'.tmp
echo export PATH >> '${COMMAND}'.tmp
cat $(axiom_src_srcdir)/etc/axiom >> '${COMMAND}'.tmp
$(INSTALL_SCRIPT) '${COMMAND}'.tmp '${COMMAND}'
-rm '${COMMAND}'.tmp
rm -f '$(DESTDIR)$(bindir)'/fricas
$(mkinstalldirs) '$(DESTDIR)$(bindir)'
$(INSTALL_SCRIPT) '$(COMMAND)' '$(DESTDIR)$(bindir)/fricas'
if test x"@BUILD_ALDOR_INTERFACE@" = xyes ; then \
cd src/aldor && $(MAKE) install; \
fi
@echo 79 FriCAS installation finished.
install-contrib:
$(mkinstalldirs) '$(DESTDIR)$(bindir)'
$(mkinstalldirs) '$(DESTDIR)@emacsdatadir@'
cd contrib/emacs && $(MAKE) install;
@echo 79 FriCAS contrib installation finished.
mostlyclean-local:
@-rm -f lastBuildDate
clean-local: mostlyclean-local
-rm -f stamp-*
-cd contrib/emacs && ${MAKE} clean
-rm -rf $(axiom_targetdir)
-rm -rf build/$(target)
distclean-local: clean-local
@-rm -rf build
@-rm -f config.status config.log
@-rm -f Makefile
$(top_builddir)/config.status: $(top_srcdir)/configure
$(SHELL) ./config.status --recheck
$(RECURSIVE_TARGETS): stamp-rootdirs @axiom_all_prerequisites@