-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
114 lines (97 loc) · 4.13 KB
/
Makefile
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
## ********************************************************************* ##
## Copyright 2015 ##
## Robert A. Beezer, Michael Gage, Geoff Goehle, Alex Jordan ##
## ##
## This file is part of MathBook XML. ##
## ##
## MathBook XML is free software: you can redistribute it and/or modify ##
## it under the terms of the GNU General Public License as published by ##
## the Free Software Foundation, either version 2 or version 3 of the ##
## License (at your option). ##
## ##
## MathBook XML is distributed in the hope that it will be useful, ##
## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
## GNU General Public License for more details. ##
## ##
## You should have received a copy of the GNU General Public License ##
## along with MathBook XML. If not, see <http://www.gnu.org/licenses/>. ##
## ********************************************************************* ##
#######################
# DO NOT EDIT THIS FILE
#######################
# 1) Do make a copy of Makefile.paths.original
# as Makefile.paths
# 2) Edit Makefile.paths as directed there
# 3) This file (Makefile) and Makefile.paths.original
# are managed by revision control and edits will conflict
# 4) See updated history in Makefile.paths.original
# for changes, or follow the revision control history
##############
# Introduction
##############
# This is not a "true" makefile, since it does not
# operate on dependencies. It is more of a shell
# script, sharing common configurations
######################
# System Prerequisites
######################
# install (system tool to make directories)
# xsltproc (xml/xsl text processor)
# xmllint (only to check source against DTD)
# <helpers> (PDF viewer, web browser, pager, Sage executable, etc)
#####
# Use
#####
# A) Set default directory to be the location of this file
# B) At command line: make <some-target>
# The included file contains customized versions
# of locations of the principal components of this
# project and names of various helper executables
include Makefile.paths
# These paths are subdirectories of
# the Mathbook XML distribution
# MBUSR is where extension files get copied
# so relative paths work properly
MBXSL = $(MB)/xsl
MBUSR = $(MB)/user
RNG = $(MB)/schema/pretext.rng
# These paths are subdirectories of
# the project
SRC = $(PRJ)/src
OUTPUT = $(PRJ)/output
IMGSRC = $(SRC)/images
PRJXSL = $(PRJ)/xsl
# The main file
MAINFILE = $(SRC)/mathresources.ptx
# Places where output lands
HTML = $(OUTPUT)/html
IMGOUT = $(OUTPUT)/images
# Some aspects of producing these examples require a WeBWorK server.
# For all but trivial testing or examples, please look into setting
# up your own WeBWorK server, or consult Alex Jordan about the use
# of PCC's server in a nontrivial capacity. <[email protected]>
SERVER = https://webwork.pcc.edu
# Make the HTML output
html:
install -d $(OUTPUT)
install -d $(HTML)
install -d $(HTML)/images
install -d $(IMGOUT)
install -d $(IMGSRC)
-rm $(HTML)/*.html
-rm $(HTML)/knowl/*.html
-rm $(HTML)/images/*
cp -a $(IMGSRC) $(HTML)
cd $(HTML); \
xsltproc --stringparam webwork.server $(SERVER) $(PRJXSL)/math-resources-html.xsl $(MAINFILE)
###########
# Utilities
###########
# Verify Source integrity
# Leaves "jingreport.txt" in OUTPUT
check:
install -d $(OUTPUT)
-rm $(OUTPUT)/jingreport.txt
-java -classpath ~/jing-trang/build -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration -jar ~/jing-trang/build/jing.jar $(RNG) $(MAINFILE) > $(OUTPUT)/jingreport.txt
less $(OUTPUT)/jingreport.txt