7
7
# See below for targets to build the documentation in other formats,
8
8
# to run various types of test suites, and to remove parts of the build etc.
9
9
10
- PIPE = build/pipestatus
11
-
12
-
13
- all : start doc # indirectly depends on build
14
-
15
- logs :
16
- mkdir -p $@
17
-
18
- build : logs configure
19
- +cd build && \
20
- " ../$( PIPE) " \
21
- " env SAGE_PARALLEL_SPKG_BUILD='$( SAGE_PARALLEL_SPKG_BUILD) ' ./install all 2>&1" \
22
- " tee -a ../logs/install.log"
23
- +./sage -b
10
+ default : all
11
+
12
+ build : all-build
13
+
14
+ # Defer unknown targets to build/make/Makefile
15
+ % ::
16
+ $(MAKE ) build/make/Makefile
17
+ +build/bin/sage-logger \
18
+ " cd build/make && ./install '$@ '" logs/install.log
19
+
20
+ # If configure was run before, rerun it with the old arguments.
21
+ # Otherwise, run configure with argument $PREREQ_OPTIONS.
22
+ build/make/Makefile : configure build/pkgs/* /*
23
+ rm -f config.log
24
+ mkdir -p logs/pkgs
25
+ ln -s logs/pkgs/config.log config.log
26
+ @if [ -x config.status ]; then \
27
+ ./config.status --recheck && ./config.status; \
28
+ else \
29
+ ./configure $$ PREREQ_OPTIONS; \
30
+ fi || ( \
31
+ if [ " x$$ SAGE_PORT" = x ]; then \
32
+ echo " If you would like to try to build Sage anyway (to help porting)," ; \
33
+ echo " export the variable 'SAGE_PORT' to something non-empty." ; \
34
+ exit 1; \
35
+ else \
36
+ echo " Since 'SAGE_PORT' is set, we will try to build anyway." ; \
37
+ fi ; )
24
38
25
39
# Preemptively download all standard upstream source tarballs.
26
40
download :
@@ -36,118 +50,64 @@ download:
36
50
ssl : all
37
51
./sage -i pyopenssl
38
52
39
- build-serial : SAGE_PARALLEL_SPKG_BUILD = no
40
- build-serial : build
41
-
42
- # Start Sage if the file local/etc/sage-started.txt does not exist
43
- # (i.e. when we just installed Sage for the first time).
44
- start : build
45
- [ -f local/etc/sage-started.txt ] || local/bin/sage-starts
46
-
47
- # You can choose to have the built HTML version of the documentation link to
48
- # the PDF version. To do so, you need to build both the HTML and PDF versions.
49
- # To have the HTML version link to the PDF version, do
50
- #
51
- # $ ./sage --docbuild all html
52
- # $ ./sage --docbuild all pdf
53
- #
54
- # For more information on the docbuild utility, do
55
- #
56
- # $ ./sage --docbuild -H
57
- doc : doc-html
58
-
59
- doc-html : build
60
- $(PIPE ) " ./sage --docbuild --no-pdf-links all html $( SAGE_DOCBUILD_OPTS) 2>&1" " tee -a logs/dochtml.log"
61
-
62
- # 'doc-html-no-plot': build docs without building the graphics coming
63
- # from the '.. plot' directive, in case you want to save a few
64
- # megabytes of disk space. 'doc-clean' is a prerequisite because the
65
- # presence of graphics is cached in src/doc/output.
66
- doc-html-no-plot : build doc-clean
67
- $(PIPE ) " ./sage --docbuild --no-pdf-links --no-plot all html $( SAGE_DOCBUILD_OPTS) 2>&1" " tee -a logs/dochtml.log"
68
-
69
- doc-html-mathjax : build
70
- $(PIPE ) " ./sage --docbuild --no-pdf-links all html -j $( SAGE_DOCBUILD_OPTS) 2>&1" " tee -a logs/dochtml.log"
71
-
72
- # Keep target 'doc-html-jsmath' for backwards compatibility.
73
- doc-html-jsmath : doc-html-mathjax
74
-
75
- doc-pdf : build
76
- $(PIPE ) " ./sage --docbuild all pdf $( SAGE_DOCBUILD_OPTS) 2>&1" " tee -a logs/docpdf.log"
77
-
78
- doc-clean :
79
- cd src/doc && $(MAKE ) clean
80
-
81
- clean :
82
- @echo " Deleting package build directories..."
83
- rm -rf local/var/tmp/sage/build
84
-
85
- lib-clean :
86
- cd src && $(MAKE ) clean
87
-
88
- bdist-clean : clean
53
+ misc-clean :
89
54
@echo " Deleting miscellaneous artifacts generated by build system ..."
90
55
rm -rf logs
91
56
rm -rf dist
92
57
rm -rf tmp
93
58
rm -f aclocal.m4 config.log config.status confcache
94
59
rm -rf autom4te.cache
95
- rm -f build/Makefile build/Makefile-auto
60
+ rm -f build/make/ Makefile build/make /Makefile-auto
96
61
rm -f .BUILDSTART
97
62
98
- distclean : clean doc-clean lib-clean bdist-clean
63
+ bdist-clean : clean
64
+ $(MAKE ) misc-clean
65
+
66
+ distclean : build-clean
67
+ $(MAKE ) misc-clean
99
68
@echo " Deleting all remaining output from build system ..."
100
69
rm -rf local
101
70
102
71
# Delete all auto-generated files which are distributed as part of the
103
72
# source tarball
104
73
bootstrap-clean :
105
- rm -rf config configure build/Makefile-auto.in
74
+ rm -rf config configure build/make/ Makefile-auto.in
106
75
107
76
# Remove absolutely everything which isn't part of the git repo
108
77
maintainer-clean : distclean bootstrap-clean
109
78
rm -rf upstream
110
79
111
- micro_release : bdist-clean lib -clean
80
+ micro_release : bdist-clean sagelib -clean
112
81
@echo " Stripping binaries ..."
113
82
LC_ALL=C find local/lib local/bin -type f -exec strip ' {}' ' ;' 2>&1 | grep -v " File format not recognized" | grep -v " File truncated" || true
114
83
115
- TESTPRELIMS = local/bin/sage-starts
116
84
TESTALL = ./sage -t --all
117
85
PTESTALL = ./sage -t -p --all
118
86
119
- test : all # i.e. build and doc
120
- $(TESTPRELIMS )
87
+ test : all
121
88
$(TESTALL ) --logfile=logs/test.log
122
89
123
90
check : test
124
91
125
- testall : all # i.e. build and doc
126
- $(TESTPRELIMS )
92
+ testall : all
127
93
$(TESTALL ) --optional=all --logfile=logs/testall.log
128
94
129
- testlong : all # i.e. build and doc
130
- $(TESTPRELIMS )
95
+ testlong : all
131
96
$(TESTALL ) --long --logfile=logs/testlong.log
132
97
133
- testalllong : all # i.e. build and doc
134
- $(TESTPRELIMS )
98
+ testalllong : all
135
99
$(TESTALL ) --long --optional=all --logfile=logs/testalllong.log
136
100
137
- ptest : all # i.e. build and doc
138
- $(TESTPRELIMS )
101
+ ptest : all
139
102
$(PTESTALL ) --logfile=logs/ptest.log
140
103
141
- ptestall : all # i.e. build and doc
142
- $(TESTPRELIMS )
104
+ ptestall : all
143
105
$(PTESTALL ) --optional=all --logfile=logs/ptestall.log
144
106
145
- ptestlong : all # i.e. build and doc
146
- $(TESTPRELIMS )
107
+ ptestlong : all
147
108
$(PTESTALL ) --long --logfile=logs/ptestlong.log
148
109
149
- ptestalllong : all # i.e. build and doc
150
- $(TESTPRELIMS )
110
+ ptestalllong : all
151
111
$(PTESTALL ) --long --optional=all --logfile=logs/ptestalllong.log
152
112
153
113
@@ -159,8 +119,7 @@ ptestoptional: ptestall # just an alias
159
119
160
120
ptestoptionallong : ptestalllong # just an alias
161
121
162
- configure : configure.ac src/bin/sage-version.sh \
163
- m4/ax_c_check_flag.m4 m4/ax_gcc_option.m4 m4/ax_gcc_version.m4 m4/ax_gxx_option.m4 m4/ax_gxx_version.m4 m4/ax_prog_perl_version.m4
122
+ configure : configure.ac src/bin/sage-version.sh m4/* .m4
164
123
./bootstrap -d
165
124
166
125
install :
@@ -182,8 +141,7 @@ install:
182
141
" $( DESTDIR) " /bin/sage -c # Run sage-location
183
142
184
143
185
- .PHONY : all build build-serial start install micro_release \
186
- doc doc-html doc-html-jsmath doc-html-mathjax doc-pdf \
187
- doc-clean clean lib-clean bdist-clean distclean bootstrap-clean maintainer-clean \
144
+ .PHONY : default build install micro_release \
145
+ misc-clean bdist-clean distclean bootstrap-clean maintainer-clean \
188
146
test check testoptional testall testlong testoptionallong testallong \
189
147
ptest ptestoptional ptestall ptestlong ptestoptionallong ptestallong
0 commit comments