167
167
# Set environment variable HTTP_PROXY_WITH_PORT if your curl needs to
168
# use a proxy. HTTP_PROXY_WITH_PORT can be, for example,
169
# http://proxy.nbc.com:80
169
170
ifneq ($(HTTP_PROXY_WITH_PORT), )
170
171
HTTP_PROXY_FLAG=-x $(HTTP_PROXY_WITH_PORT)
171
172
endif # HTTP_PROXY_WITH_PORT
173
QUICKLISP_DIR := centaur/quicklisp
177
ifeq ($(USE_QUICKLISP), )
180
$(MAKE) USE_QUICKLISP=1 $(QUICKLISP_DIR)/top.cert
184
$(QUICKLISP_DIR)/quicklisp.lsp:
185
@echo "Downloading Quicklisp"
186
@cd $(QUICKLISP_DIR); \
187
curl http://beta.quicklisp.org/quicklisp.lisp \
188
-o quicklisp.lsp $(HTTP_PROXY_FLAG)
189
@$(BUILD_DIR)/wait.pl $(QUICKLISP_DIR)/quicklisp.lsp
190
@ls -l $(QUICKLISP_DIR)/quicklisp.lsp
192
$(QUICKLISP_DIR)/inst/setup.lisp: $(QUICKLISP_DIR)/quicklisp.lsp \
193
$(QUICKLISP_DIR)/install.lsp
194
@echo "Setting up Quicklisp..."
195
@cd $(QUICKLISP_DIR); \
197
"ACL2_CUSTOMIZATION=NONE $(ACL2) < install.lsp &> install.out" ; \
198
$(BUILD_DIR)/wait.pl inst/setup.lisp ;\
199
ls -l inst/setup.lisp) \
200
|| (tail -300 install.out | sed 's/^/ | /'; false)
202
$(QUICKLISP_DIR)/base.cert: $(QUICKLISP_DIR)/inst/setup.lisp
204
quicklisp: $(QUICKLISP_DIR)/top.cert
206
# I don't think we need this now
207
# all: $(QUICKLISP_DIR)/top.cert
209
endif # USE_QUICKLISP
211
# [Jared]: I moved these out of the USE_QUICKLISP section so that "make clean"
212
# will always remove the quicklisp files if you have ever built with
213
# USE_QUICKLISP before. The goal is to ensure that stale quicklisp files
214
# aren't left around after a "make clean" by accident.
216
.PHONY: quicklisp_clean
219
echo "Removing downloaded quicklisp files (if any)" ; \
220
cd $(QUICKLISP_DIR); rm -rf quicklisp.lsp inst/asdf.lisp inst/cache \
221
inst/client-info.sexp inst/dists inst/local-projects \
222
inst/quicklisp inst/setup.lisp inst/tmp install.out Makefile-tmp
223
cd $(QUICKLISP_DIR); $(BUILD_DIR)/clean.pl
225
# The following hack was useful briefly in late January, 2014, when
226
# there were issues with quicklisp that caused us not to want to clean
227
# quicklisp files. Rager likes this hack (because his company-wide
228
# ACL2 installation isn't writable by those that use it and he doesn't
229
# always want to clean quicklisp since proxies have to be configured
230
# and because it's good to preserve the
231
# quicklisp/inst/cache/asdf-installs directory), and so he prefers
232
# that the "hack" be preserved.
233
ifndef ACL2_SAVE_QUICKLISP
234
clean: quicklisp_clean
235
endif # ifndef ACL2_SAVE_QUICKLISP
237
175
# Ensure that the following variable is simply expanded.
238
176
ACL2_CUSTOM_TARGETS :=
377
315
OK_CERTS := $(filter-out $(CERT_PL_CCL_ONLY), $(OK_CERTS))
318
ifeq (ALLEGRO, $(ACL2_HOST_LISP))
319
${info Excluding non-Allegro books: [$(CERT_PL_NON_ALLEGRO)]}
320
OK_CERTS := $(filter-out $(CERT_PL_NON_ALLEGRO), $(OK_CERTS))
323
ifeq (LISPWORKS, $(ACL2_HOST_LISP))
324
${info Excluding non-Lispworks books: [$(CERT_PL_NON_LISPWORKS)]}
325
OK_CERTS := $(filter-out $(CERT_PL_NON_LISPWORKS), $(OK_CERTS))
328
ifeq (SBCL, $(ACL2_HOST_LISP))
329
${info Excluding non-SBCL books: [$(CERT_PL_NON_SBCL)]}
330
OK_CERTS := $(filter-out $(CERT_PL_NON_SBCL), $(OK_CERTS))
381
333
ifeq ($(ACL2_HAS_ANSI), )
434
386
endif # ifneq ($(ACL2_HAS_REALS), )
437
ifeq ($(USE_QUICKLISP), )
390
# Set up REALLY_USE_QUICKLISP to be 1 if we really want to use Quicklisp or 0
391
# otherwise. REALLY_USE_QUICKLISP is almost the same as USE_QUICKLISP.
392
# However, Quicklisp doesn't work on GCL, so if we're running on GCL, then
393
# ignore what the user said and don't try to build the Quicklisp books.
395
# I would much prefer to just reassign USE_QUICKLISP to 0 when we don't want
396
# it, but I can't get that to work in Make for whatever reason.
398
ifeq ($(USE_QUICKLISP), 1)
399
ifeq ($(ACL2_HOST_LISP), GCL)
400
$(info Note: Ignoring USE_QUICKLISP=1 since Quicklisp does not work on GCL!)
401
REALLY_USE_QUICKLISP := 0
403
REALLY_USE_QUICKLISP := 1
406
REALLY_USE_QUICKLISP := 0
409
QUICKLISP_DIR := centaur/quicklisp
413
ifeq ($(REALLY_USE_QUICKLISP), 0)
416
$(MAKE) REALLY_USE_QUICKLISP=1 $(QUICKLISP_DIR)/top.cert
420
$(QUICKLISP_DIR)/quicklisp.lsp:
421
@echo "Downloading Quicklisp"
422
@cd $(QUICKLISP_DIR); \
423
curl http://beta.quicklisp.org/quicklisp.lisp \
424
-o quicklisp.lsp $(HTTP_PROXY_FLAG)
425
@$(BUILD_DIR)/wait.pl $(QUICKLISP_DIR)/quicklisp.lsp
426
@ls -l $(QUICKLISP_DIR)/quicklisp.lsp
428
$(QUICKLISP_DIR)/inst/setup.lisp: $(QUICKLISP_DIR)/quicklisp.lsp \
429
$(QUICKLISP_DIR)/install.lsp
430
@echo "Setting up Quicklisp..."
431
@cd $(QUICKLISP_DIR); \
433
"ACL2_CUSTOMIZATION=NONE $(ACL2) < install.lsp &> install.out" ; \
434
$(BUILD_DIR)/wait.pl inst/setup.lisp ;\
435
ls -l inst/setup.lisp) \
436
|| (tail -300 install.out | sed 's/^/ | /'; false)
438
$(QUICKLISP_DIR)/base.cert: $(QUICKLISP_DIR)/inst/setup.lisp
440
quicklisp: $(QUICKLISP_DIR)/top.cert
442
# I don't think we need this now
443
# all: $(QUICKLISP_DIR)/top.cert
445
endif # REALLY_USE_QUICKLISP
448
# [Jared]: I moved these out of the REALLY_USE_QUICKLISP section so that "make
449
# clean" will always remove the quicklisp files if you have ever built with
450
# REALLY_USE_QUICKLISP before. The goal is to ensure that stale quicklisp
451
# files aren't left around after a "make clean" by accident.
453
.PHONY: quicklisp_clean
456
echo "Removing downloaded quicklisp files (if any)" ; \
457
cd $(QUICKLISP_DIR); rm -rf quicklisp.lsp inst/asdf.lisp inst/cache \
458
inst/client-info.sexp inst/dists inst/local-projects \
459
inst/quicklisp inst/setup.lisp inst/tmp install.out Makefile-tmp \
460
asdf-home/cache/common-lisp
461
cd $(QUICKLISP_DIR); $(BUILD_DIR)/clean.pl
463
# The following hack was useful briefly in late January, 2014, when
464
# there were issues with quicklisp that caused us not to want to clean
465
# quicklisp files. Rager likes this hack (because his company-wide
466
# ACL2 installation isn't writable by those that use it and he doesn't
467
# always want to clean quicklisp since proxies have to be configured
468
# and because it's good to preserve the
469
# quicklisp/inst/cache/asdf-installs directory), and so he prefers
470
# that the "hack" be preserved.
471
ifndef ACL2_SAVE_QUICKLISP
472
clean: quicklisp_clean
473
endif # ifndef ACL2_SAVE_QUICKLISP
476
ifeq ($(REALLY_USE_QUICKLISP), 0)
438
477
$(info Excluding books that depend on Quicklisp: [$(CERT_PL_USES_QUICKLISP)])
439
478
OK_CERTS := $(filter-out $(CERT_PL_USES_QUICKLISP), $(OK_CERTS))
459
498
system/parallel/proofs/ideal-speedup.cert \
460
499
workshops/2009/sumners/support/examples.cert \
461
500
workshops/2011/krug-et-al/support/MinVisor/va-to-pa-thm.cert \
462
workshops/2011/krug-et-al/support/MinVisor/setup-nested-page-tables.cert
464
# The following has taken only a couple of minutes on a decent Linux
465
# system in 2013. However, ACL2 built on GCL 2.6.8 and Mac OS 10.6
466
# cannot complete the certification without running exhausting STRING
467
# storage, probably because it contains a large stobj. So we certify
468
# it only in "everything" regressions.
470
ADDED_BOOKS += workshops/2013/hardin-hardin/support/APSP.cert
501
workshops/2011/krug-et-al/support/MinVisor/setup-nested-page-tables.cert \
502
workshops/2013/hardin-hardin/support/APSP.cert
504
ADDED_BOOK_TARGETS :=
472
506
ifneq ($(ACL2_HAS_HONS), )
473
ADDED_BOOKS += milawa-test-basic
507
ADDED_BOOK_TARGETS += milawa-test-basic
476
510
# Now SLOW_BOOKS is defined as the list above, except that below, we
529
568
$(BUILD_DIR)/Makefile-cache \
530
569
serialize/test.sao \
531
570
bdd/benchmarks.lisp \
532
nonstd/workshops/1999/calculus/book/tree.lisp
571
nonstd/workshops/1999/calculus/book/tree.lisp \
572
centaur/getopt/demo2.core \
573
centaur/getopt/demo2.gcl \
574
centaur/getopt/demo2.lw \
575
centaur/getopt/demo2.lx86cl64 \
576
centaur/getopt/demo2.ccl \
577
nonstd/workshops/1999/calculus/book/outline/
534
579
MORECLEAN_FILES_EXPLICIT := \
538
584
.PHONY: clean_books clean
588
635
# There are several directories that we can't easily work directly
589
636
# into our general framework because they each have a custom Makefile.
590
# We handle those next. For example, two directories test provisional
591
# certification: system/pcert, which was constructed explicitly to
592
# test provisional certification; and workshops/2011/verbeek-schmaltz,
593
# which is slow without provisional certification but is reasonably
594
# fast using provisional certification.
637
# We handle those next
596
639
# Our perhaps gross hack is to use the old ACL2 Makefile-generic
597
640
# system to invoke the custom makefiles, for example as follows for
641
# workshops/2003/greve-wilding-vanfleet:
600
# - we tell cert.pl not to look at verbeek-schmaltz/sources, via a
643
# - we tell cert.pl not to look at greve-wilding-vanfleet/support, via a
601
644
# cert_pl_exclude file;
602
# - we add a verbeek-schmaltz/deps.lisp file with the prerequisites that
603
# we need before going into the verbeek-schmaltz directory;
604
# - we use an arbitrary top-level target to certify the actual
605
# verbeek-schmaltz books after certifying the deps, which need not
606
# be in any sense "the top-level book" for the directory -- but if
607
# not, then if a book B in any other directory comes to depend on
608
# a book other than the target that we picked, we will need to
609
# make it depend on that target.
645
# - we add a greve-wilding-vanfleet/deps.lisp file with the
646
# prerequisites that we need before going into the support
648
# - we use an arbitrary top-level target to certify the actual books
649
# after certifying the deps, which need not be in any sense "the
650
# top-level book" for the directory -- but if not, then if a book
651
# B in any other directory comes to depend on a book other than
652
# the target that we picked, we will need to make it depend on
611
655
# In order to create a deps file, we connect to the directory (e.g.,
612
656
# cd clause-processors/SULFA), and then use shell commands:
631
675
# that we don't always want built with "all".
633
677
ACL2_CUSTOM_TARGETS := \
678
system/toothbrush/success.txt \
634
679
clause-processors/SULFA/target.cert \
635
680
fix-cert/fix-cert.cert \
636
681
projects/translators/l3-to-acl2/target.cert \
637
682
workshops/1999/multiplier/proof.cert \
638
683
workshops/2003/greve-wilding-vanfleet/support/firewallworks.cert \
639
684
workshops/2003/kaufmann/support/input/defs-in.cert \
640
workshops/2004/sumners-ray/support/success.txt \
641
workshops/2011/verbeek-schmaltz/sources/correctness2.cert
685
workshops/2004/sumners-ray/support/success.txt
643
687
# Warning! For each target below, if there is a cert_pl_exclude file
644
688
# in the directory or it is exluded explicitly by
650
694
# cert_pl_exclude file in projects/translators/ (even though there is
651
695
# a cert_pl_exclude in projects/translators/l3-to-acl2/).
697
# It is currently only recommended to test the toothbrush mechanism
698
# for Lisps that compile on-the-fly, namely CCL and SBCL, since that
699
# mechanism doeswn't use (or depend on) compiled files in the main
700
# ACL2 directory. We might revisit that decision if there is reason
703
.PHONY: system/toothbrush/success.txt
704
system/toothbrush/success.txt:
705
@echo "Note: Skipping $@ for host Lisp $(ACL2_HOST_LISP)."
707
system/toothbrush/success.txt: system/toothbrush-deps.cert
708
cd $(@D) ; $(STARTJOB) -c "$(MAKE)"
709
endif # ifeq ($(TB_LISP), )
653
711
# We only make the books under SULFA if a documented test for an
654
712
# installed SAT solver succeeds.
655
713
clause-processors/SULFA/target.cert: \
687
745
workshops/2004/sumners-ray/support/success.txt:
688
746
cd $(@D) ; $(STARTJOB) -c "$(MAKE)"
690
workshops/2011/verbeek-schmaltz/sources/correctness2.cert: \
691
workshops/2011/verbeek-schmaltz/deps.cert
692
cd $(@D) ; $(STARTJOB) -c "$(MAKE)"
694
748
endif # ifeq ($(ACL2_HAS_REALS), )
696
ACL2_CUSTOM_TARGETS += system/pcert/sub.cert
698
system/pcert/sub.cert: \
699
system/deps-pcert.cert
700
cd $(@D) ; $(STARTJOB) -c "$(MAKE)"
702
750
endif # ifndef ACL2_COMP
704
752
# We avoid += because we want the custom targets to start first, in
813
862
# The .acl2 files specify no compilation:
814
863
BOOKS_SKIP_COMP += $(patsubst %.cert, %.$(ACL2_COMP_EXT), $(wildcard workshops/2006/cowles-gamboa-euclid/Euclid/fld-u-poly/*.cert))
816
# The .acl2 file specifies no compilation:
817
BOOKS_SKIP_COMP += ccg/ccg.$(ACL2_COMP_EXT)
865
# The .acl2 file for ccg.lisp specifies no compilation, so we exclude
866
# that books and books that include it.
867
BOOKS_SKIP_COMP += acl2s/ccg/ccg.$(ACL2_COMP_EXT)
868
BOOKS_SKIP_COMP += acl2s/doc.$(ACL2_COMP_EXT)
819
870
# Some .acl2 files specify no compilation, including ed3.acl2, and
820
871
# many books depend on ed3:
821
872
BOOKS_SKIP_COMP += $(patsubst %.cert, %.$(ACL2_COMP_EXT), $(wildcard workshops/2006/cowles-gamboa-euclid/Euclid/*.cert))
874
# At one time we handled system/pcert/ (using -j 1), which was a
875
# special case that was ignored because of its cert_pl_exclude file.
876
# But the exclude is no longer there, and we got a **PCERT0->PCERT1
877
# CONVERSION FAILED** error for
878
# system/pcert/acl2x-pcert-test-2-include.lisp. So we simply exclude
880
BOOKS_SKIP_COMP += $(patsubst %.cert, %.$(ACL2_COMP_EXT), $(wildcard system/pcert/*.cert))
823
882
# The .acl2 files specify no compilation:
824
883
BOOKS_SKIP_COMP += workshops/2006/kaufmann-moore/support/rhs1-iff.$(ACL2_COMP_EXT) \
825
884
workshops/2006/kaufmann-moore/support/rhs1.$(ACL2_COMP_EXT) \
837
896
BOOKS_SKIP_COMP += centaur/bridge/top.$(ACL2_COMP_EXT)
898
# Has readtime conditionals #+cmucl and #-cmucl:
899
BOOKS_SKIP_COMP += std/io/read-string-tests.$(ACL2_COMP_EXT)
839
901
# CLISP says: "Lisp stack overflow":
840
902
BOOKS_SKIP_COMP += workshops/2006/rager/support/ptest-mergesort.$(ACL2_COMP_EXT)
904
# GCL says: "Condition in IF [or a callee]: INTERNAL-SIMPLE-ERROR:
905
# Invocation history stack overflow." Other Lisps had trouble too.
906
BOOKS_SKIP_COMP += system/hons-check/memoize-tests.lisp
842
908
# In Makefile-comp, bdd/benchmarks.$(ACL2_COMP_EXT) may depend on
843
909
# bdd/benchmarks.lisp, but we don't want to make either, so we do this
863
929
echo "Making $$PWD/$@" ; \
864
930
(echo '(ld `((include-book "$(patsubst %.$(ACL2_COMP_EXT),%,$(@))" :load-compiled-file :comp :ttags :all))) (acl2::value :q) (acl2::exit-lisp)' | $(ACL2) >& $@.out) ; (ls -al $@ || (echo "**COMPILATION FAILED** for `pwd`/$@" ; exit 1)) ; fi
866
# Finally, we handle system/pcert/, which is a special case and thus
867
# would otherwise be ignored because of its cert_pl_exclude file. We
868
# use -j 1 because the old Makefile-generic, included by the
869
# directory's Makefile, doesn't establish dependencies between the
870
# compiled files, and this can cause an error when attempting to load
871
# another book's partially-built compiled file. Note that this rule
872
# overrides the pattern rule just above (a feature of GNU make).
873
system/pcert/sub.$(ACL2_COMP_EXT): \
874
system/deps-pcert.$(ACL2_COMP_EXT)
876
@cd system/pcert/ ; \
877
$(MAKE) -j 1 $(ACL2_COMP_EXT) ACL2_PCERT= >& make-$(ACL2_COMP_EXT).out ; \
878
(cd ../.. ; ls -al $(@D)/*.$(ACL2_COMP_EXT)) ; \
879
if [ `ls -1 *.$(ACL2_COMP_EXT) | wc -l` != `ls -1 *.cert | wc -l` ] ; then \
880
echo "**COMPILATION FAILED** for $(@D);" ; \
881
echo " search for '**' in `pwd`/make-$(ACL2_COMP_EXT).out to see failures." ; \
885
932
OK_CERTS += system/pcert/sub.$(ACL2_COMP_EXT)
887
934
endif # ifdef ACL2_COMP
950
# It was tempting to handle the `everything' target as follows:
951
# everything: USE_QUICKLISP = 1
952
# everything: all $(ADDED_BOOKS)
953
# But that didn't work, presumably because the value of OK_CERTS was
954
# on a first pass through the Makefile without USE_QUICKLISP being
997
# Starting 8/15/2014, everything does not automatically set USE_QUICKLISP=1,
998
# even in the HONS case. In particular, "make everything" no longer makes
999
# doc/manual/; for that, specify USE_QUICKLISP=1.
956
1000
.PHONY: everything
957
# Note: We add doc/top.cert explicitly, even though that might not
958
# be necessary, because at one point doc/top.cert was not
959
# otherwise made (something related to glucose).
961
ifeq ($(ACL2_HAS_HONS), )
962
$(MAKE) all $(ADDED_BOOKS)
964
$(MAKE) all USE_QUICKLISP=1 $(ADDED_BOOKS) doc/top.cert
965
endif # ifeq ($(ACL2_HAS_HONS), )
1002
$(MAKE) all $(ADDED_BOOKS) $(ADDED_BOOK_TARGETS)
967
1004
# The critical path report will work only if you have set up certificate timing
968
1005
# BEFORE you build the books. See ./critpath.pl --help for details.
1213
1246
# unknown property EXTEND-PROGN! or RETRACT-PROGN!, or else is an
1214
1247
# unbinding of the PREDEFINED property for PROGN! (indicating a use of
1215
1248
# :REDEF); presumably these books mess with raw mode. Since we have
1216
# had such problems with ccg/ccg.lisp (presumably because it includes
1249
# had such problems with acl2s/ccg/ccg.lisp (presumably because it includes
1217
1250
# hacking/hacker), we exclude that book too.
1219
1252
BOOKS_BKCHK_OUT := $(patsubst %.cert,%.bkchk.out,$(OK_CERTS))
1220
1253
BOOKS_BKCHK_OUT := $(filter-out hacking/%, $(BOOKS_BKCHK_OUT))
1221
1254
BOOKS_BKCHK_OUT := $(filter-out workshops/2007/dillinger-et-al/code/%, $(BOOKS_BKCHK_OUT))
1222
BOOKS_BKCHK_OUT := $(filter-out ccg/ccg.bkchk.out, $(BOOKS_BKCHK_OUT))
1255
BOOKS_BKCHK_OUT := $(filter-out acl2s/ccg/ccg.bkchk.out, $(BOOKS_BKCHK_OUT))
1224
1257
.PHONY: chk-include-book-worlds
1225
1258
chk-include-book-worlds: $(BOOKS_BKCHK_OUT)
1372
1405
clean: clean_vl
1411
centaur/getopt/demo2: centaur/getopt/demo2.cert
1412
@echo "Making getopt demo executable"
1413
@cd centaur/getopt; \
1414
ACL2_CUSTOMIZATION=NONE $(STARTJOB) -c "$(ACL2) < demo2-save.lsp &> demo2-save.out"
1415
@ls -l centaur/getopt/demo2
1417
centaur/getopt/demo2-test.ok: centaur/getopt/demo2 \
1418
centaur/getopt/demo2-test.pl
1419
@echo "Testing getopt demo executable"
1420
@cd centaur/getopt; \
1421
$(STARTJOB) -c "./demo2-test.pl &> demo2-test.out"
1422
@cd centaur/getopt; cp demo2-test.out demo2-test.ok
1423
@ls -l centaur/getopt/demo2-test.ok
1425
all: centaur/getopt/demo2-test.ok
1374
1429
##############################
1375
1430
### Section: Tags
1376
1431
##############################
1493
1548
# default to simply (certify-book "foo" ? t)
1494
1549
# These instructions specify arguments to certify-book, for example:
1495
1550
# ; cert-flags: ? t :ttags :all
1496
# - In the following cases, books may be skipped in which case,
1497
# recursively, so are books that include such books, books that
1498
# include those parent books, and so on. In each case, the
1499
# indicated line may be placed either in the .lisp file or in the
1500
# .acl2 file that is consulted, as discussed above.
1501
# - Books that depend on ACL2(h), such as
1502
# centaur/tutorial/alu16-book.lisp, contain this line:
1503
# ; cert_param: (hons-only)
1504
# - Books that depend on ANSI Common Lisp, such as
1505
# oslib/*.lisp, contain this line (or in this case,
1506
# file cert.acl2 contains this line):
1507
# ; cert_param: (ansi-only)
1508
# - Books that require glucose (a SAT solver) contain this line:
1509
# ; cert_param: (uses-glucose)
1510
# - Books that require quicklisp contain this line:
1511
# ; cert_param: (uses-quicklisp)
1512
# - Two-pass certification is handled as follows, for example in
1513
# books/make-event/stobj-test.acl2 (as indicated above, this can
1514
# also go into the book instead of the relevant .acl2 file):
1515
# ; cert_param: (acl2x)
1551
# - See :DOC books-certification for documentation of the cert_param
1552
# comment, which can be used to restrict which books are to be
1516
1554
# - It's not clear that provisional certification is fully
1517
1555
# supported. For now, we implement it for two specific
1518
1556
# directories; search below for "provisional certification" to see