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 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745
|
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{The Top Level Makefile}
\author{Timothy Daly}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\newpage
\section{The overall build process}
Makefiles are responsible for building all of their subdirectories
and then themselves. The system is built in the following order
\begin{enumerate}
\item books -- building pdf files
\item src/scripts -- building scripts
\item src/lib -- building lib files
\item lsp -- building gcl common lisp
\item src -- building src
\item src/interp -- building interpreter files
\item src/share -- building share files
\item src/algebra -- building help files
\item src/algebra -- building input files
\item src/algebra -- building xhtml files
\item src/algebra -- building algebra files
\begin{itemize}
\item algebra bootstrap complete
\item layer 0 of 24 complete
\item layer 1 of 24 complete
\item layer 2 of 24 complete
\item layer 3 of 24 complete
\item layer 4 of 24 complete
\item layer 5 of 24 complete
\item layer 6 of 24 complete
\item layer 7 of 24 complete
\item layer 8 of 24 complete
\item layer 9 of 24 complete
\item layer 10 of 24 complete
\item layer 11 of 24 complete
\item layer 12 of 24 complete
\item layer 13 of 24 complete
\item layer 14 of 24 complete
\item layer 15 of 24 complete
\item layer 16 of 24 complete
\item layer 17 of 24 complete
\item layer 18 of 24 complete
\item layer 19 of 24 complete
\item layer 20 of 24 complete
\item layer 21 of 24 complete
\item layer 22 of 24 complete
\item layer 23 of 24 complete
\item layer 0 copy complete
\end{itemize}
\item src/etc -- building etc
\item src/doc -- building doc files
\item src/input -- running regression tests
\end{enumerate}
\section{General Makefile Structure}
Makefiles are responsible for four things. First, they have to set up
the output directory structure so that all of the build machinery
can assume it exists. Second, they have to build all of the files
in their own directory. Third, they have to invoke Make on each
of their subdirectories. This forms a natural tree walk of the
directory structure. Fourth, they have to explain all of the details
about the directory, the files it manages and its subdirectories.
The clean stanza has been modified to be more effective. Previously
it walked the Makefile hierarchy trying to clean subdirectories. This
method often fails for various reasons (e.g. permissions, incomplete
builds, etc). Now we simply remove the created files directly.
\newpage
\subsection{The Top Level Makefile}
We have added a stanza to separate the build of documents from the build
of source files. As much as possible we would like to do the document
builds in parallel with the source builds. We kick off a make for the
documents in the background and then kick off a make in the foreground
for the source code. This is independent of using make in parallel and
instead uses the shell to fork the processes. We have not had much luck
getting make to build in parallel reliably.
Note that make cannot handle recursively calling itself in the same
directory so we have to expand the serial forms inline. Cheesy.
\begin{chunk}{parallel}
all: rootdirs axiom.sty tanglec libspad
@ echo 1 making a ${SYS} system, PART=${PART} SUBPART=${SUBPART}
@ echo 2 Environment ${ENV}
@ ${BOOKS}/tanglec Makefile.pamphlet "Makefile.${SYS}" >Makefile.${SYS}
@ cp ${BOOKS}/dvipdfm.def ${MNT}/${SYS}/doc
@ cp ${BOOKS}/changepage.sty ${MNT}/${SYS}/doc
@ ${EXTRACT} Makefile.pamphlet
@ cp Makefile.pdf ${MNT}/${SYS}/doc/src/root.Makefile.pdf
@ if [ "${RUNTYPE}" = "parallel" ] ; then \
( echo p4 starting parallel make of input files ; \
${ENV} ${MAKE} input ${NOISE} & ) ; \
else \
if [ "${BUILD}" = "full" ] ; then \
( echo s4 starting serial make of input files ; \
cd ${MNT}/${SYS}/doc/src/input ; \
cp ${BOOKS}/axiom.sty . ; \
cp ${SRC}/input/*.eps . ; \
for i in `ls ${SRC}/input/*.input.pamphlet` ; do \
if [ .${NOISE} = . ] ; \
then \
latex $$i ; \
else \
( echo p4a making $$i ; \
latex $$i >${TMP}/trace ) ; \
fi ; \
done ; \
rm -f *~ ; \
rm -f *.pamphlet~ ; \
rm -f *.log ; \
rm -f *.tex ; \
rm -f *.toc ; \
rm -f *.aux ) ; fi ; \
fi
@ if [ "${RUNTYPE}" = "parallel" ] ; then \
( echo s2 starting parallel make of books ; \
echo s3 ${SPD}/books/Makefile from \
${SPD}/books/Makefile.pamphlet ; \
cd ${SPD}/books ; \
${EXTRACT} Makefile ; \
cp Makefile.pdf ${MNT}/${SYS}/doc/src/books.Makefile.pdf ; \
${ENV} ${MAKE} & ) ; \
else \
( echo s2 starting serial make of books ; \
echo s3 ${SPD}/books/Makefile from \
${SPD}/books/Makefile.pamphlet ; \
cd ${SPD}/books ; \
${EXTRACT} Makefile ; \
cp Makefile.pdf ${MNT}/${SYS}/doc/src/books.Makefile.pdf ; \
if [ "${BUILD}" = "full" ] ; then \
${ENV} ${MAKE} ; fi ) ; \
fi
@ echo p7 starting make of src
@ ${ENV} $(MAKE) -f Makefile.${SYS}
@ echo 3 finished system build on `date` | tee >lastBuildDate
libspad:
@ echo 11a making libspad
@ ( cd ${OBJ}/${SYS}/lib ; \
${BOOKS}/tanglec ${BOOKS}/bookvol8.pamphlet Makefile >Makefile ; \
${ENV} ${MAKE} libspad.a )
axiom.sty:
@ echo 11c copying books/axiom.sty
@ cp ${BOOKS}/axiom.sty .
rootdirs:
@ echo 11 checking directory structure
mkdir -p ${TMP}
mkdir -p ${INT}/algebra
mkdir -p ${INT}/hyper
mkdir -p ${INT}/input
mkdir -p ${INT}/interp
mkdir -p ${INT}/sman
mkdir -p ${OBJ}/${SYS}/bin
mkdir -p ${OBJ}/${SYS}/etc
mkdir -p ${OBJ}/${SYS}/graph
mkdir -p ${OBJ}/${SYS}/hyper/pages
mkdir -p ${OBJ}/${SYS}/interp
mkdir -p ${OBJ}/${SYS}/lib
mkdir -p ${OBJ}/${SYS}/sman
mkdir -p ${OBJ}/${SYS}/proofs
mkdir -p ${MNT}/doc
mkdir -p ${MNT}/${SYS}/algebra
mkdir -p ${MNT}/${SYS}/src/algebra
mkdir -p ${MNT}/${SYS}/autoload
mkdir -p ${MNT}/${SYS}/bin
mkdir -p ${MNT}/${SYS}/doc/axbook
mkdir -p ${MNT}/${SYS}/doc/bitmaps
mkdir -p ${MNT}/${SYS}/doc/hypertex/bitmaps
mkdir -p ${MNT}/${SYS}/doc/msgs
mkdir -p ${MNT}/${SYS}/doc/ps
mkdir -p ${MNT}/${SYS}/doc/cookbook
mkdir -p ${MNT}/${SYS}/doc/spadhelp
mkdir -p ${MNT}/${SYS}/doc/src/input
mkdir -p ${MNT}/${SYS}/graph/parabola.view
mkdir -p ${MNT}/${SYS}/input
mkdir -p ${MNT}/${SYS}/lib/graph
mkdir -p ${MNT}/${SYS}/lib/scripts
input:
@ echo p9 making input documents
@ if [ "${BUILD}" = "full" ] ; then \
( cd ${MNT}/${SYS}/doc/src/input ; \
cp ${BOOKS}/axiom.sty . ; \
for i in `ls ${SRC}/input/*.input.pamphlet` ; \
do latex $$i ; \
done ; \
rm -f *~ ; \
rm -f *.pamphlet~ ; \
rm -f *.log ; \
rm -f *.tex ; \
rm -f *.toc ; \
rm -f *.aux ) ; fi
\end{chunk}
\begin{chunk}{*}
\getchunk{ENVDEFAULTS}
\getchunk{ENVAR}
\getchunk{parallel}
\getchunk{book}
\getchunk{tanglec.c}
\getchunk{literate commands}
\getchunk{install}
document:
@ echo 4 making a ${SYS} system, PART=${PART} SUBPART=${SUBPART}
@ echo 5 Environment ${ENV}
@ ${BOOKS}/tanglec Makefile.pamphlet "Makefile.${SYS}" >Makefile.${SYS}
@ ${ENV} $(MAKE) -f Makefile.${SYS} document
@echo 6 finished system build on `date` | tee >lastBuildDate
clean:
@ echo 7 making a ${SYS} system, PART=${PART} SUBPART=${SUBPART}
@ echo 8 Environment ${ENV}
@ rm -f axiom.sty
@ rm -f Makefile.pdf
@ rm -f Makefile.dvi
@ rm -f Makefile.${SYS}
@ rm -f books/Makefile
@ rm -f books/Makefile.dvi
@ rm -f books/Makefile.pdf
@ rm -f books/axiom.bib
@ rm -f lsp/axiom.sty
@ rm -f lsp/Makefile lsp/Makefile.dvi lsp/Makefile.pdf
@ rm -rf lsp/gcl*
@ rm -f src/axiom.sty
@ rm -f src/Makefile
@ rm -f src/Makefile.dvi
@ rm -f src/Makefile.pdf
@ rm -f src/algebra/book*pamphlet
@ rm -f src/algebra/*.spad
@ rm -f src/algebra/Makefile
@ rm -f src/etc/axiom.sty
@ rm -f src/etc/Makefile src/etc/Makefile.dvi src/etc/Makefile.pdf
@ rm -f src/interp/book*pamphlet
@ rm -f src/interp/axiom.sty
@ rm -f src/input/axiom.sty
@ rm -f src/share/axiom.sty
@ rm -f src/share/Makefile src/share/Makefile.dvi
@ rm -f src/share/Makefile.pdf
@ rm -rf int
@ rm -rf obj
@ rm -rf mnt
@ for i in `find . -name "*~"` ; do rm -f $$i ; done
@ rm -f lastBuildDate
@ rm -f books/tanglec
@ rm -f src/input/Makefile src/input/Makefile.dvi
@ rm -f src/input/Makefile.pdf
@ rm -f src/interp/Makefile src/interp/Makefile.dvi
@ rm -f src/interp/Makefile.pdf
@ rm -f src/share/Makefile src/share/Makefile.dvi
@ rm -f src/share/Makefile.pdf
@ rm -f Makefile.aux
@ rm -f Makefile.log
\end{chunk}
\subsection{Environment}
\subsubsection{VERSION}
The VERSION variable is a unique string intended to show up
in the banner at startup time. I can be anything but is intended
to be a unique way of identifying the CVS version so we can
reference bug reports to versions.
The VERSION variable is used in the src/interp/Makefile
to set a lisp variable boot::*build-version*. This variable
is used by the {\tt yearweek} function to construct the banner.
The banner also contains a build timestamp so we can determine
when the image is compiled. We touch the file
called \verb|${MNT}/${SYS}/timestamp| and using a formatted form
of its file information. See the YEARWEEK variable in the
src/interp/Makefile.pamphlet and the {\tt yearweek} function in
src/interp/util.lisp.pamphlet.
\subsubsection{SPAD}
The SPAD environment variable is normally specified.
It is expected to be a path to the top level directory of the
shipped system. For example, if we want to build a linux system
the SPAD variable should look like:
\begin{verbatim}
`pwd`/new/mnt/{\bf linux}
\end{verbatim}
\subsubsection{SYS}
From the SPAD variable we look at the last directory name
and create a version of Axiom for that system. The SYS
environment variable is the last directory name in the SPAD
variable.
\subsubsection{SPD}
The SPD variable is taken to be the current working directory
where this Makefile lives. This is obviously the root of the whole
system source tree. All Makefiles form environment variables based
on this value.
Next we see the six top-level directories discussed above being
defined using the SPD variable.
\subsubsection{LSP}
This variable specifies where the LSP subdirectory lives.
It is normally a directory at the top level of the system but
we do not assume that to be true. Other lisps might require it
to be elsewhere.
\subsubsection{GCLDIR}
This file contained the only mention of the AKCLDIR variable which
gives the path to the version of AKCL. Now that the system is running
on GCL this variable has been renamed to GCLDIR. This cannot be eliminated
entirely because the system uses this variable to look up a file
called collectfn.lsp which is part of the GCL distribution. This
file lookup is in conditional lisp code so other lisps will not
see the file load. The collectfn.lsp code is used by GCL to generate
the ``.fn'' files which are used to optimize function calling.
Also, lsp/sys-proclaims.lisp is a file generated
during the GCL build which contains type information about lisp
functions, allowing fast-function calling behavior.
When defining the environment, the SPD variable is defined as the
current directory. SYS is taken as the last non-directory part of
the environment variable \verb|$AXIOM| (e.g. if
\verb|$AXIOM=/(a-path)/mnt/linux|
then SYS=linux). It is {\bf mandatory} that \verb|$AXIOM| does
{\bf not} contain any trailing slash, because the {\tt notdir} function
will return the string following the final slash and would thus return
the empty string.
\subsubsection{SRC}
The SRC subdirectory is a hand-generated, read-only top level
directory containing the source code. This is assumed to be completely
system-independent and, in general, it can reside on a CD or NFS
mounted file system. This is useful for building several different
kinds of systems (as specified by the SYS variable from a single
source tree.
\subsubsection{INT}
The INT subdirectory is a machine-generated, system-independent
top-level directory containing source code. Axiom builds from literate
sources. This work only needs to be done once at the first build. The
INT directory is a cache of work. It can be erased at will.
However steps such as generating lisp code from spad code, while
done by machine, are system-independent. Therefore this subdirectory,
once built, can reside with the SRC subdirectory on CD or NFS as a
read-only branch.
\subsubsection{OBJ}
The OBJ subdirectory is a machine-generated, system-dependent
top level directory containing things like compiler binaries. The
OBJ directory is a cache of work. It can be erased at will.
Because it is system-dependent it needs to be written at build
time by compilers for each specific system.
\subsubsection{MNT}
The MNT subdirectory is a complete, working copy of Axiom.
This directory contains everything that is needed to run Axiom and
can be copied anywhere. Everything in this directory takes its required
information from the \verb|$AXIOM| shell variable. Once this directory is
copied the SRC, INT, and OBJ subdirectories can be erased.
\subsubsection{ZIPS}
The ZIPS subdirectory contains particular versions of subsystems
that Axiom needs in tar-gzip format. The Makefiles will unpack them.
It also contains patch files to these subsystems. The Makefile will
apply those patches. Then it will configure and build the required
subsystems.
\subsubsection{TMP}
The TMP directory is used in place of normal unix tmp in order to
avoid writing outside of our build tree.
Note that TMP is a workspace in the OBJ directory. It is
working space for temporary files since we cannot assume that
we can write outside our own tree. Output from commands like
the {\tt document} command will generally be written to the
TMP/trace file. If the build seems to hang while making a
document file then check this file. It will contain the output
of the latex command and the likely error in the tex file.
\subsubsection{SPADBIN}
The SPADBIN directory is the path to the executable
binary directory of the shipped system. The directory contains
all of the executable commands, such as the {\tt document}
command. The {\tt document} command lives in the SRC/SCRIPTS
subdirectory and will be copied to SPADBIN before we start
walking the build subtree.
\subsubsection{INC}
The INC directory contains all the include files for the C
programs.
\subsubsection{The NOISE variable }
The NOISE variable is used in the calls to the document
command. In general, where the document command is called in
the Makefiles it is called with the following form:
\begin{verbatim}
${SPADBIN}/document ${NOISE} foo
\end{verbatim}
with the default value of NOISE being:
\begin{verbatim}
NOISE="-o ${TMP}/trace"
\end{verbatim}
The reason NOISE exists is that the latex command will
generate a page of output which is uninteresting during the
make. However if there is a latex syntax error in a pamphlet
file the make will continue past the error due to the nonstopmode
flag. To see the actual error message rerun the make as:
\begin{verbatim}
make NOISE=
\end{verbatim}
\subsubsection{PART and SUBPART}
Because of the size of this build we do everything possible to
minimize the work necessary to rebuild. In order to allow
finer control of the build we have two options that can be
specified. The first is the PART variable. The second
is the SUBPART variable. The PART variable basically
specifies which directory we wish to build.
Setting the PART as:
\begin{verbatim}
PART=foo
\end{verbatim}
will look for a stanza in the Makefile as:
\begin{verbatim}
\${PART}dir
\end{verbatim}
which expands to:
\begin{verbatim}
foodir
\end{verbatim}
Variable PART can be specified (environment or command-line) as
one of:
\begin{verbatim}
(all | lib | install | lisp | interp | comp | graph | hyper
| input | sman | boot | include | doc | algebra )
\end{verbatim}
It is possible to be more specific with a directory using SUBPART.
\subsubsection{DESTDIR and COMMAND}
The install directory is /usr/local/axiom by default
but this can be changed on the command line by typing:
\begin{verbatim}
make DESTDIR=/yourabsolutepath COMMAND=fullPathAndCommand install
\end{verbatim}
The COMMAND string has been modified to use the DESTDIR
variable so we can properly find the axiom command.
The DOCUMENT variable is now set to replace the direct call
to the document command. This will allow it to be
changed on the command line.
\section{The Environment}
\begin{chunk}{ENVDEFAULTS}
VERSION:="Axiom (May 2016)"
##### special paths
SPD:=$(shell pwd)
SRC:=${SPD}/src
LSP:=${SPD}/lsp
INT:=${SPD}/int
OBJ:=${SPD}/obj
MNT:=${SPD}/mnt
TMP:=${OBJ}/tmp
ZIPS:=${SPD}/zips
BOOKS:=${SPD}/books
SRCDIRS:="interpdir sharedir algebradir etcdir docdir \
graphdir smandir hyperdir browserdir inputdir"
SYS:=$(notdir $(AXIOM))
DAASE:=${SRC}/share
PROOFS:=${OBJ}/${SYS}/proofs
SPAD:=${SPD}/mnt/${SYS}
SPADBIN:=${MNT}/${SYS}/bin
DOCUMENT:=${SPADBIN}/document
EXTRACT:=${BOOKS}/extract
##### installation paths
DESTDIR:=/usr/local/axiom
COMMAND:=${DESTDIR}/mnt/${SYS}/bin/axiom
##### functions we need
AWK:=gawk
PATCH:=patch
RANLIB:=ranlib
TAR:=tar
TOUCH:=touch
UNCOMPRESS:=gunzip
####K C Related variables
PLF=$(shell echo $(SYS) |tr /a-z/ /A-Z/)platform
CCF="${CFLAGS} -O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} \
-I/usr/X11/include \
-Wno-absolute-value -std=gnu89 -w"
INC:=${SPD}/src/include
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF="-L/usr/X11/lib -L/usr/X11R6/lib64 -L/usr/local/lib64 -L/usr/openwin/lib64 -L/usr/lib64 "
O:=o
##### lisp related variables
BYE:=bye
\getchunk{GCLVERSION}
GCLDIR:=${LSP}/${GCLVERSION}
\getchunk{GCLOPTS-LOCBFD}
LISP:=lsp
##### command line control
NOISE:="-o ${TMP}/trace"
PART:= cprogs
SUBPART:= everything
RUNTYPE:=serial
# can be richtests, catstests, regresstests (see src/input/Makefile)
# alltests, notests
TESTSET:=notests
BUILD:=full
ACL2:=
COQ:=
\end{chunk}
\subsection{The ENV variable}
\begin{chunk}{ENVAR}
ENV:= \
ACL2=${ACL2} \
AWK=${AWK} \
BOOKS=${BOOKS} \
BUILD=${BUILD} \
BYE=${BYE} \
CC=${CC} \
CCF=${CCF} \
COMMAND=${COMMAND} \
COQ=${COQ} \
DAASE=${DAASE} \
DESTDIR=${DESTDIR} \
DOCUMENT=${DOCUMENT} \
EXTRACT=${EXTRACT} \
GCLDIR=${GCLDIR} \
GCLOPTS=${GCLOPTS} \
GCLVERSION=${GCLVERSION} \
INC=${INC} \
INT=${INT} \
LDF=${LDF} \
LISP=${LISP} \
LSP=${LSP} \
MNT=${MNT} \
NOISE=${NOISE} \
O=${O} \
OBJ=${OBJ} \
PART=${PART} \
PATCH=${PATCH} \
PLF=${PLF} \
PROOFS=${PROOFS} \
RANLIB=${RANLIB} \
RUNTYPE=${RUNTYPE} \
SPAD=${SPAD} \
SPADBIN=${SPADBIN} \
SPD=${SPD} \
SRC=${SRC} \
SRCDIRS=${SRCDIRS} \
SUBPART=${SUBPART} \
SYS=${SYS} \
TANGLE=${TANGLE} \
TAR=${TAR} \
TESTSET=${TESTSET} \
TMP=${TMP} \
TOUCH=${TOUCH} \
UNCOMPRESS=${UNCOMPRESS} \
VERSION=${VERSION} \
WEAVE=${WEAVE} \
XLIB=${XLIB} \
ZIPS=${ZIPS}
\end{chunk}
\subsection{book}
This stanza constructs the book from the original pamphlet file.
At this time there is no difference between the pamphlet file
and straight latex (intentionally). Thus we just need to make
sure the correct directories are in place, copy the files, and
run latex over the pamphlet file.
\begin{chunk}{book}
book:
@ echo 79 building the book as ${MNT}/${SYS}/doc/book.dvi
@ cp ${SRC}/doc/book.pamphlet ${MNT}/${SYS}/doc
@ cp -pr ${SRC}/doc/ps ${MNT}/${SYS}/doc
@ (cd ${MNT}/${SYS}/doc ; \
if [ .${NOISE} = . ] ; then \
( latex book.pamphlet --interaction nonstopmode ; \
latex book.pamphlet --interaction nonstopmode ) ; \
else \
( latex book.pamphlet --interaction nonstopmode >${TMP}/trace ; \
latex book.pamphlet --interaction nonstopmode >${TMP}/trace ) ; \
fi ; \
rm book.pamphlet ; \
rm book.toc ; \
rm book.log ; \
rm book.aux )
@ echo 80 The book is at ${MNT}/${SYS}/doc/book.dvi
\end{chunk}
\subsection{tanglec.c}
\begin{chunk}{tanglec.c}
tanglec: books/tanglec.c
@echo t01 making tanglec from books/tanglec.c
@( cd books ; gcc -o tanglec tanglec.c )
\end{chunk}
\subsection{src}
We should recompile the world with the .fn information but not here.
\begin{verbatim}
( for i in `find . -name "*.lsp"` ; \
do echo $$i ; touch $$i ; done )
( for i in `find . -name "*.lisp"` ; \
do echo $$i ; touch $$i ; done )
@echo 15a remaking ${SRC}/interp for performance
@(cd src ; ${ENV} ${MAKE} )
\end{verbatim}
\begin{chunk}{src}
srcdir: ${SPD}/src/Makefile
@echo 15 making ${SPD}/src
@( cd src ; ${ENV} ${MAKE} )
${SPD}/src/Makefile: ${SPD}/src/Makefile.pamphlet
@echo 16 making ${SPD}/src/Makefile from ${SPD}/src/Makefile.pamphlet
( cd src ; \
${EXTRACT} Makefile ; \
cp Makefile.pdf ${MNT}/${SYS}/doc/src/src.Makefile.pdf )
libspadclean:
@echo 17 cleaning ${OBJ}/${SYS}/lib
@rm -rf ${OBJ}/${SYS}/lib
@( cd src ; ${EXTRACT} Makefile )
@( cd src ; ${ENV} ${MAKE} clean )
@rm -f ${SPD}/src/Makefile ${SPD}/src/Makefile.dvi
\end{chunk}
\subsection{src setup}
\begin{chunk}{srcsetup}
srcsetup: ${SPD}/src/Makefile
@echo 18 making ${SPD}/src
@( cd src ; ${ENV} ${MAKE} setup )
\end{chunk}
\subsection{lsp}
We delegate the details of constructing common lisp to the Makefiles in
the subtree. We need only ensure that the Makefiles are up to date.
When we first make GCL we the src/Makefile will create a marker file
called gcldir. This file has the same name as the stanza to create
GCL and thus will prevent GCL from rebuilding. We need to do this
since we have no control over the GCL makefiles.
The \verb|${OBJ}/${SYS}/bin| directory is where the lisps get built.
\subsubsection{LSPMakefile}
We need to specialize the Makefile stanza based on the version
of Lisp we plan to use. At the moment there are 3 GCL versions
which run Axiom: 2.4.1, 2.5, and 2.6 These are incompatible versions
so we have different patches against them. The details are in
the lsp/Makefile.pamphlet file. Here we just decide which section
to choose. The default is 2.4.1 but if the GCLVERSION is changed
then the Makefile is rewritten to extract the later version.
It looks for a chunk name that matches the version number.
\begin{chunk}{LSPMakefile}
${LSP}/Makefile: ${LSP}/Makefile.pamphlet
@echo 20 making ${LSP}/Makefile from ${LSP}/Makefile.pamphlet
@( cd lsp ; \
${EXTRACT} Makefile.pamphlet ; \
if [ "${GCLVERSION}" != "gcl-2.4.1" ] ; then \
${BOOKS}/tanglec Makefile.pamphlet ${GCLVERSION} >Makefile ; \
fi ; \
cp Makefile.pdf ${MNT}/${SYS}/doc/src/lsp.Makefile.pdf )
\end{chunk}
Here we add mkdir -p \verb|${OBJ}/${SYS}/lsp| because we need to rename the
\verb|gcl_collectfn.lsp| back to collectfn.lsp. We also start adding support
for sys-proclaim.lsp and other dynamically collected proclaim information.
The obj/sys/bin dir is necessary to keep the compiled lisp image.
The obj/sys/lsp dir is necessary to keep collectfn and sys-proclaims.
The collectfn.lsp file is a special extension to GCL to collect type
information during a compile-file. This information gets written out
to a .fn file. These .fn files can be loaded and written out
as a file containing proclaims information. If this proclaims information
is available at compile time then the resulting function calls are much
more efficient. The sys-proclaims file contains type information
about standard common lisp function calls.
\begin{chunk}{lsp}
lspdir: ${LSP}/Makefile
@echo 19 making ${LSP}
@mkdir -p ${OBJ}/${SYS}/bin
@mkdir -p ${OBJ}/${SYS}/lsp
@echo =====================================
@echo lsp BUILDING GCL COMMON LISP
@echo =====================================
(cd lsp ; ${ENV} DESTDIR= ${MAKE} gcldir )
@(cp ${OBJ}/${SYS}/bin/lisp ${SPADBIN}/${GCLVERSION})
\getchunk{LSPMakefile}
lspclean:
@echo 21 cleaning ${OBJ}/${SYS}/ccl
@rm -rf ${LSP}/${GCLVERSION}
@rm -rf ${INT}/ccl
@rm -rf ${OBJ}/${SYS}/ccl
@rm -rf ${LSP}/gcldir
@rm -f ${LSP}/Makefile ${LSP}/Makefile.dvi
\end{chunk}
\subsection{install}
\begin{chunk}{install}
install:
@echo 78 installing Axiom in ${DESTDIR}
@mkdir -p ${DESTDIR}
@cp -pr ${MNT} ${DESTDIR}
@echo '#!/bin/sh -' >${COMMAND}
@echo AXIOM=${DESTDIR}/mnt/${SYS} >>${COMMAND}
@echo export AXIOM >>${COMMAND}
@echo PATH='$${AXIOM}/bin':'$${PATH}' >>${COMMAND}
@echo export PATH >>${COMMAND}
@cat ${INT}/sman/axiom >>${COMMAND}
@chmod +x ${COMMAND}
@echo 79 Axiom installation finished.
@echo
@echo Please add $(shell dirname ${COMMAND}) to your PATH variable
@echo Start Axiom with the command $(shell basename ${COMMAND})
@echo
\end{chunk}
\subsection{document}
Each file in the system is in pamphlet form. This stanza, which is not
executed by default, will walk the directories generating the
documentation for each file. These are dvi files and since they are
system-independent and machine-generated they live in the INT
subdirectory. In particular, we will build an INT/DOC subtree
mirroring the LSP and SRC subtrees. The INT/DOC
subtree can be removed with no ill effect. Since all of the pamphlet
files live in either the LSP or SRC subdirectories we make
sure the INT/DOC/LSP and INT/DOC/SRC directories exist.
\begin{chunk}{document}
document:
@echo 22 documenting files
@(cd lsp ; ${ENV} ${MAKE} document )
@(cd src ; ${ENV} ${MAKE} document )
\end{chunk}
\subsection{clean}
\begin{chunk}{clean}
clean:
@ echo 7 making a ${SYS} system, PART=${PART} SUBPART=${SUBPART}
@ echo 8 Environment ${ENV}
@ rm -f lsp/Makefile.dvi
@ rm -f lsp/Makefile
@ rm -f trace
@ rm -f *~
@ rm -f Makefile.${SYS}
@ rm -rf ${MNT}
@ rm -rf int
@ rm -rf obj
@ rm -rf mnt
@ for i in `find src -name "Makefile"` ; do rm -f $i ; done
@ for i in `find src -name "Makefile.dvi"` ; do rm -f $i ; done
\end{chunk}
\section{The Platform Makefiles}
The Top Level Makefile examines the SPAD variable to determine
the target build platform. It sets up the general structure
of the world. Then it invokes one of these platform Makefiles.
Each of these Makefiles sets several
environment variables that are specific to this platform.
\subsubsection{The LDF variable }
The LDF variable is the generic loader flags. This gives information
about where various libraries are located on specific platforms. On
linux, for instance, the library libXpm.a is used by the graphics
routines. This library is usually found in /usr/X11R6/bin/libXpm.a.
Thus, on the linux platform LDF is defined as
\begin{verbatim}
LDF=" -L/usr/X11R6/lib -L/usr/lib ${XLIB}/libXpm.a -lXpm"
\end{verbatim}
\subsubsection{The AWK variable }
On most systems the gnu toolset is the default. Thus we can just use
'awk' and the program works. However, on some systems we need to
specify that we are using the gnu toolset, and we need to use
gawk instead of awk.
\subsubsection{The PATCH variable }
On most systems the gnu toolset is the default. Thus we can just use
'patch' and the program works. However, on some systems we need to
specify that we are using the gnu toolset, and we need to use
gpatch instead of patch.
\subsubsection{The O variable }
Various Common Lisp systems prefer certain filename extensions.
This defaults to ``o'' so a compile of foo.lisp becomes foo.o
but other systems prefer .fasl so a compile of foo.lisp becomes
foo.fasl. Change this based on the target lisp.
\subsubsection{The LISP variable }
There are 3 kinds of "lisp" files in the Axiom build process.
The first are the "clisp" files. These are common lisp files
generated by the boot compiler. The second are the "lisp" files.
These are hand written common lisp code. The third are the "lsp"
files. These are files generated by GNU Common Lisp. The LISP
variable is used to name the third kind of files as this may
change when the underlying common lisp is changed.
\subsubsection{The DAASE variable}
Axiom uses 5 files, the *.daase files, which are called ``the
databases''. They contain cross-reference, signatures,
and other information needed by the interpreter and compiler.
When the system is being built from scratch these databases
need to exist. However, they get dynamically rebuilt after
the algebra files are compiled. The bootstrap versions of these
databases live in the src/share subdirectory. Axiom will
use the value of the shell variable DAASE to find its
databases. If this variable is unbound it uses the standard
\verb|${MNT}/${SYS}| path. Note that Axiom will append the string
/algebra to the value of DAASE. The default value setting
given here is:
\verb|DAASE=${SRC}/share|
so \verb|${SRC}/share/algebra/*.daase| will be the
Axiom bootstrap database files.
\subsubsection{The XLIB variable}
The XLIB variable tells us where the X11 libraries live.
Axiom needs to use libXpm.a to build the graph subdirectory.
\subsubsection{The SRCDIRS variable}
The SRCDIRS variable is used in the src/Makefile.pamphlet
to decide what directories to build on a given platform. This is
needed at the moment because certain functions do not yet work on
all platforms.
\subsubsection{The GCLVERSION variable }
GCLVERSION is the name of the GCL version. The one we used to
build the original version of the system is gcl-2.4.1. The system
will attempt to untar a file in the ZIPS directory with the
name GCLVERSION.tgz, cd to the GCLVERSION subdirectory and
do a ./configure followed by a make.
The GCLVERSION variable is also used to make the GCLDIR variable.
GCLDIR tells depsys where GCL lives. The depsys image needs to
load a file from GCL (cmpnew/collectfn.lsp) which is used to generate
optimizations for function calling in Axiom. This is handled automatically
by changing this variable.
If GCLVERSION is ``gcl-system'', then GCL is not built locally,
and it is assumed that the ``gcl'' command is available off the path.
IF this GCL is unsuitable for building Axiom then very bad things
will happen.
NOTE WELL: IF YOU CHANGE THIS YOU SHOULD ERASE THE lsp/Makefile FILE.
This will cause the build to remake the lsp/Makefile from the
lsp/Makefile.pamphlet file and get the correct version. If you
forget to erase the lsp/Makefile the wrong patches will be applied.
\begin{chunk}{GCLVERSION}
#GCLVERSION=gcl-2.4.1
#GCLVERSION=gcl-2.5
#GCLVERSION=gcl-2.5.2
#GCLVERSION=gcl-2.6.1
#GCLVERSION=gcl-2.6.2
#GCLVERSION=gcl-2.6.2a
#GCLVERSION=gcl-2.6.3
#GCLVERSION=gcl-2.6.5
#GCLVERSION=gcl-2.6.6
#GCLVERSION=gcl-2.6.7pre
#GCLVERSION=gcl-2.6.7
#GCLVERSION=gcl-2.6.8pre
#GCLVERSION=gcl-2.6.8pre2
#GCLVERSION=gcl-2.6.8pre3
#GCLVERSION=gcl-2.6.8pre4
#GCLVERSION=gcl-2.6.8pre7
GCLVERSION=gcl-cygwin
#GCLVERSION=gcl-2.6.9
#GCLVERSION=gcl-2.6.10
#GCLVERSION=gcl-2.6.11
#GCLVERSION=gcl-2.6.12
#GCLVERSION=gcl-2.6.13pre
\end{chunk}
\subsubsection{The GCLOPTS configure variable}
The GCLOPTS lisp requires some parameters
for building which vary from system
to system. We create an environment variable here so we can add options
to the configure command in the lsp/Makefile.pamphlet.
\begin{chunk}{GCLOPTS}
GCLOPTS="--enable-vssize=65536*2 --disable-xgcl --disable-tkconfig"
\end{chunk}
It turns out that we can successfully build GCL on many more systems
if we set the GCLOPTS to build a local BFD.
We are failing during build because "directoryp is undefined" along
with the message
\begin{verbatim}
Error: Cannot get relocated section contents
\end{verbatim}
\begin{chunk}{GCLOPTS-LOCBFD}
GCLOPTS="--enable-vssize=65536*2 --disable-xgcl --disable-tkconfig"
\end{chunk}
For the gcl-2.6.8pre7 version we move to using the custreloc option.
\begin{chunk}{GCLOPTS-CUSTRELOC}
GCLOPTS="--enable-vssize=65536*2 --disable-xgcl --disable-tkconfig"
\end{chunk}
For the MACOSX port we need the following options. The ``--disable-nls'' means
that we will not be supporting natural language internationalization.
The ``--enable-maxpage'' has been eliminated because it causes build failures.
The ``--enable-machine'' parameter appears to be used by configure from the
setting of the ``canonical'' variable, which is in turn set by a shell script.
We need to add ``--enable-locbfd'' and ``--disable-dlopen'' due to the error
``unexec: not enough room for load commands for new \_\_DATA segments''.
\begin{chunk}{GCLOPTS-MACPORT}
GCLOPTS="--enable-vssize=65536*2 --disable-xgcl --disable-tkconfig"
\end{chunk}
\subsection{Makefile.freebsd}
\begin{chunk}{Makefile.freebsd}
\getchunk{ENVDEFAULTS}
####1 C related variables
INC:=${SPD}/src/include
PLF=BSDplatform
CCF="-O2 -pipe -fno-strength-reduce -D_GNU_SOURCE \
-D${PLF} -I/usr/X11R6/include -I/usr/local/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF="-L/usr/X11R6/lib -L/usr/local/lib"
O:=o
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.FreeBSD called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.windows}
This is for the Windows port. We assume that the build will be done
using GCC under MSYS.
We've modified the GCLOPTS variable from the standard config in
two ways. First we add --enable-debug so more information is
available for testing and second we removed --enable-statsysbfd.
\begin{chunk}{Makefile.windows}
\getchunk{ENVDEFAULTS}
AWK=awk
####2 C related variables
INC:=${SPD}/src/include
PLF=MSYSplatform
CCF="-O2 -D_GNU_SOURCE -D${PLF} -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib -lXpm"
O:=o
SRCDIRS="bootdir interpdir sharedir algebradir etcdir docdir inputdir"
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.windows called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\begin{chunk}{Makefile.slackware}
\getchunk{ENVDEFAULTS}
####3 C related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib -lXpm"
O:=o
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.slackware called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.linux}
\begin{chunk}{Makefile.linux}
\getchunk{ENVDEFAULTS}
####4 C related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="${CFLAGS} -O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib -lXpm"
O:=o
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.mandriva}
\begin{chunk}{Makefile.mandriva}
\getchunk{ENVDEFAULTS}
####5 C related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib -lXpm"
O:=o
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.mandriva called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.vector}
\begin{chunk}{Makefile.vector}
\getchunk{ENVDEFAULTS}
####6 C Related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib -lXpm"
O:=o
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.redhat72}
\begin{chunk}{Makefile.redhat72}
\getchunk{ENVDEFAULTS}
####7 C Related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib -lXpm"
O:=o
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.redhat9}
\begin{chunk}{Makefile.redhat9}
\getchunk{ENVDEFAULTS}
####8 C Related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib -lXpm"
O:=o
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.debian}
\begin{chunk}{Makefile.debian}
\getchunk{ENVDEFAULTS}
####9 C Related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib -lXpm"
O:=o
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.opensuse}
\begin{chunk}{Makefile.opensuse}
\getchunk{ENVDEFAULTS}
####A C Related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib -lXpm"
O:=o
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.ubuntu}
\begin{chunk}{Makefile.ubuntu}
\getchunk{ENVDEFAULTS}
####B C Related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib -lXpm"
O:=o
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.mint}
\begin{chunk}{Makefile.mint}
\getchunk{ENVDEFAULTS}
####C C Related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib -lXpm"
O:=o
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.ubuntu64}
\begin{chunk}{Makefile.ubuntu64}
\getchunk{ENVDEFAULTS}
####D C Related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib ${XLIB}/libXpm.a -lXpm"
O:=o
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.centos}
\begin{chunk}{Makefile.centos}
\getchunk{ENVDEFAULTS}
####E C Related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib -lXpm"
O:=o
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.macosxppc}
\begin{chunk}{Makefile.macosxppc}
\getchunk{ENVDEFAULTS}
####F C Related variables
INC:=${SPD}/src/include
PLF:=MACOSXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib -lXpm"
O:=o
\getchunk{GCLOPTS-MACPORT}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.macosxppc called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.fedora}
\begin{chunk}{Makefile.fedora}
\getchunk{ENVDEFAULTS}
####G C Related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib -lXpm"
O:=o
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.fedora called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.fedora5}
\begin{chunk}{Makefile.fedora5}
\getchunk{Makefile.fedora}
\end{chunk}
\subsection{Makefile.fedora6}
\begin{chunk}{Makefile.fedora6}
\getchunk{Makefile.fedora}
\end{chunk}
\subsection{Makefile.fedora7}
\begin{chunk}{Makefile.fedora7}
\getchunk{Makefile.fedora}
\end{chunk}
\subsection{Makefile.fedora8}
\begin{chunk}{Makefile.fedora8}
\getchunk{Makefile.fedora}
\end{chunk}
\subsection{Makefile.fedora8-64}
Fedora 8 on a 64 bit machine requires gcl-2.6.8pre2
\begin{chunk}{Makefile.fedora8-64}
\getchunk{ENVDEFAULTS}
####H C Related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF:=" -L/usr/X11R6/lib -L/usr/lib -lXpm"
O:=o
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.fedora9}
\begin{chunk}{Makefile.fedora9}
\getchunk{Makefile.fedora}
\end{chunk}
\subsection{Makefile.fedora10}
\begin{chunk}{Makefile.fedora10}
\getchunk{Makefile.fedora}
\end{chunk}
\subsection{Makefile.fedora11}
\begin{chunk}{Makefile.fedora11}
\getchunk{Makefile.fedora}
\end{chunk}
\subsection{Makefile.fedora12}
\begin{chunk}{Makefile.fedora12}
\getchunk{Makefile.fedora}
\end{chunk}
\subsection{Makefile.fedora13}
\begin{chunk}{Makefile.fedora13}
\getchunk{Makefile.fedora}
\end{chunk}
\subsection{Makefile.gentoo}
\begin{chunk}{Makefile.gentoo}
\getchunk{ENVDEFAULTS}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.fedora64}
\begin{chunk}{Makefile.fedora64}
\getchunk{ENVDEFAULTS}
####I C Related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF="-L/usr/X11R6/lib64 -L/usr/local/lib64 -L/usr/openwin/lib64 -L/usr/lib64 "
O:=o
\getchunk{GCLOPTS-CUSTRELOC}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.fedora3}
Fedora Core 3 needs special GCL options for local bfd.
\begin{chunk}{Makefile.fedora3}
\getchunk{ENVDEFAULTS}
####J C Related variables
INC:=${SPD}/src/include
PLF:=LINUXplatform
CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF="-L/usr/X11R6/lib64 -L/usr/local/lib64 -L/usr/openwin/lib64 -L/usr/lib64 "
O:=o
\getchunk{GCLOPTS-LOCBFD}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.MACOSX}
On the MAC OSX someone decided (probably a BSDism) to rename the
SIGCLD signal to SIGCHLD. In order to handle this in the
low level C socket code (in particular, in \verb|src/lib/fnct_key.c|)
we change the platform variable to be MACOSXplatform and create
this new stanza.
It appears that the MAC OSX does not include gawk or nawk by
default so we change the AWK variable to use awk.
We need to add -I/usr/include/sys because {\tt malloc.h} has been
moved on this platform.
We need to search includes (``-I'') in /usr/include before
/usr/include/sys because the MAC seems to search in a
different order than linux systems. The sys versions of
the include files are broken, at least for Axiom use.
\begin{chunk}{Makefile.MACOSX}
\getchunk{ENVDEFAULTS}
AWK=awk
####K C Related variables
PLF=MACOSXplatform
CCF="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} \
-I/usr/X11/include -I/usr/include -I/usr/include/sys \
-Wno-absolute-value -std=gnu89 -w"
INC:=${SPD}/src/include
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF="-L/usr/X11R6/lib64 -L/usr/local/lib64 -L/usr/openwin/lib64 -L/usr/lib64 "
O:=o
\getchunk{GCLOPTS-MACPORT}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\subsection{Makefile.BSD}
On the MAC OSX someone decided (probably a BSDism) to rename the
SIGCLD signal to SIGCHLD. In order to handle this in the
low level C socket code (in particular, in \verb|src/lib/fnct_key.c|)
we change the platform variable to be MACOSXplatform and create
this new stanza.
It appears that the MAC OSX does not include gawk or nawk by
default so we change the AWK variable to use awk.
We need to add -I/usr/include/sys because {\tt malloc.h} has been
moved on this platform.
We need to search includes (``-I'') in /usr/include before
/usr/include/sys because the MAC seems to search in a
different order than linux systems. The sys versions of
the include files are broken, at least for Axiom use.
\begin{chunk}{Makefile.BSD}
\getchunk{ENVDEFAULTS}
AWK=awk
####K C Related variables
PLF=BSDplatform
CCF="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} \
-I/usr/X11/include \
-Wno-absolute-value -std=gnu89 -w"
INC:=${SPD}/src/include
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF="-L/usr/X11/lib "
O:=o
\getchunk{GCLOPTS-MACPORT}
\getchunk{ENVAR}
all: srcsetup lspdir srcdir
@echo 45 Makefile.linux called
@echo 46 Environment : ${ENV}
@echo 47 finished system build on `date` | tee >lastBuildDate
@- if [ "${TESTSET}" != "notests" ] ; \
then grep "result FAILED" int/input/*.regress || true ; fi
\getchunk{literate commands}
\getchunk{srcsetup}
\getchunk{src}
\getchunk{lsp}
\getchunk{document}
\getchunk{clean}
\end{chunk}
\newpage
\begin{thebibliography}{99}
\bibitem{1} CMUCL {\bf http://www.cons.org/cmucl}
\bibitem{2} GCL {\bf http://savannah.gnu.org/projects/gcl}
\bibitem{3} Codemist Ltd, ``Alta'', Horsecombe Vale Combs Down
Bath BA2 5QR UK Tel. +44-1225-837430
{\bf http://www.codemist.co.uk}
\bibitem{5} \$SPAD/zips/advi-1.2.0.tar.gz, the advi source tree
\end{thebibliography}
\end{document}
|