~ubuntu-branches/ubuntu/wily/acl2/wily

« back to all changes in this revision

Viewing changes to books/GNUmakefile

  • Committer: Package Import Robot
  • Author(s): Camm Maguire
  • Date: 2015-01-16 10:35:45 UTC
  • mfrom: (3.3.26 sid)
  • Revision ID: package-import@ubuntu.com-20150116103545-prehe9thgo79o8w8
Tags: 7.0-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
165
165
basic:
166
166
 
167
167
# Set environment variable HTTP_PROXY_WITH_PORT if your curl needs to
168
 
# use a proxy.
 
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
172
173
 
173
 
QUICKLISP_DIR := centaur/quicklisp
174
 
 
175
 
.PHONY: quicklisp
176
 
 
177
 
ifeq ($(USE_QUICKLISP), )
178
 
 
179
 
quicklisp:
180
 
        $(MAKE) USE_QUICKLISP=1 $(QUICKLISP_DIR)/top.cert
181
 
 
182
 
else
183
 
 
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
191
 
 
192
 
$(QUICKLISP_DIR)/inst/setup.lisp: $(QUICKLISP_DIR)/quicklisp.lsp \
193
 
                                  $(QUICKLISP_DIR)/install.lsp
194
 
        @echo "Setting up Quicklisp..."
195
 
        @cd $(QUICKLISP_DIR); \
196
 
           ($(STARTJOB) -c \
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)
201
 
 
202
 
$(QUICKLISP_DIR)/base.cert: $(QUICKLISP_DIR)/inst/setup.lisp
203
 
 
204
 
quicklisp: $(QUICKLISP_DIR)/top.cert
205
 
 
206
 
# I don't think we need this now
207
 
# all: $(QUICKLISP_DIR)/top.cert
208
 
 
209
 
endif # USE_QUICKLISP
210
 
 
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.
215
 
 
216
 
.PHONY: quicklisp_clean
217
 
 
218
 
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
224
 
 
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
236
174
 
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))
378
316
endif
379
317
 
 
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))
 
321
endif
 
322
 
 
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))
 
326
endif
 
327
 
 
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))
 
331
endif
380
332
 
381
333
ifeq ($(ACL2_HAS_ANSI), )
382
334
 
434
386
endif # ifneq ($(ACL2_HAS_REALS), )
435
387
 
436
388
 
437
 
ifeq ($(USE_QUICKLISP), )
 
389
 
 
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.
 
394
#
 
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.
 
397
 
 
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
 
402
  else
 
403
    REALLY_USE_QUICKLISP := 1
 
404
  endif
 
405
else
 
406
  REALLY_USE_QUICKLISP := 0
 
407
endif
 
408
 
 
409
QUICKLISP_DIR := centaur/quicklisp
 
410
 
 
411
.PHONY: quicklisp
 
412
 
 
413
ifeq ($(REALLY_USE_QUICKLISP), 0)
 
414
 
 
415
quicklisp:
 
416
        $(MAKE) REALLY_USE_QUICKLISP=1 $(QUICKLISP_DIR)/top.cert
 
417
 
 
418
else
 
419
 
 
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
 
427
 
 
428
$(QUICKLISP_DIR)/inst/setup.lisp: $(QUICKLISP_DIR)/quicklisp.lsp \
 
429
                                  $(QUICKLISP_DIR)/install.lsp
 
430
        @echo "Setting up Quicklisp..."
 
431
        @cd $(QUICKLISP_DIR); \
 
432
           ($(STARTJOB) -c \
 
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)
 
437
 
 
438
$(QUICKLISP_DIR)/base.cert: $(QUICKLISP_DIR)/inst/setup.lisp
 
439
 
 
440
quicklisp: $(QUICKLISP_DIR)/top.cert
 
441
 
 
442
# I don't think we need this now
 
443
# all: $(QUICKLISP_DIR)/top.cert
 
444
 
 
445
endif # REALLY_USE_QUICKLISP
 
446
 
 
447
 
 
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.
 
452
 
 
453
.PHONY: quicklisp_clean
 
454
 
 
455
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
 
462
 
 
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
 
474
 
 
475
 
 
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))
440
479
endif
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
463
 
 
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.
469
 
 
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
 
503
 
 
504
ADDED_BOOK_TARGETS :=
471
505
 
472
506
ifneq ($(ACL2_HAS_HONS), )
473
 
ADDED_BOOKS += milawa-test-basic
 
507
ADDED_BOOK_TARGETS += milawa-test-basic
474
508
endif
475
509
 
476
510
# Now SLOW_BOOKS is defined as the list above, except that below, we
479
513
# Then we remove SLOW_BOOKS from regressions, restoring its subset,
480
514
# ADDED_BOOKS, for the "everything" target.
481
515
 
482
 
SLOW_BOOKS := $(ADDED_BOOKS)
 
516
SLOW_BOOKS := $(ADDED_BOOKS) $(ADDED_BOOK_TARGETS)
483
517
 
484
518
# The models/y86 books are a special case.  We prefer to include them
485
519
# only with the "everything" target, not the "all" target, since they
510
544
endif # ifneq ($(filter CCL ALLEGRO SBCL, $(ACL2_HOST_LISP)), )
511
545
endif # ifneq ($(ACL2_HAS_HONS), )
512
546
 
 
547
# Remove ADDED_BOOKS as necessary because of dependence on Quicklisp,
 
548
# HONS, CCL, etc.:
 
549
ADDED_BOOKS := $(filter $(ADDED_BOOKS), $(OK_CERTS))
 
550
 
513
551
OK_CERTS := $(filter-out $(SLOW_BOOKS) models/y86/%, $(OK_CERTS))
514
552
 
515
553
##############################
518
556
 
519
557
# We delegate most of the cleaning process to clean.pl, a simple perl script
520
558
# that lets us take care not to delete certain kinds of files.  The clean.pl
521
 
# script will remove things like .cert and .fasl files.
 
559
# script will remove things like .cert and .fasl files.  A few files don't
 
560
# get explicitly cleaned.
522
561
 
523
562
CLEAN_FILES_EXPLICIT := \
524
563
   $(BUILD_DIR)/Makefile-comp \
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/
533
578
 
534
579
MORECLEAN_FILES_EXPLICIT := \
535
580
   doc/manual \
536
 
   system/doc/manual
 
581
   system/doc/manual \
 
582
   doc/xdoc.sao
537
583
 
538
584
.PHONY: clean_books clean
539
585
 
547
593
clean: clean_books
548
594
        @echo "Removing extra, explicitly temporary files."
549
595
        rm -rf $(CLEAN_FILES_EXPLICIT)
550
 
        for dir in $(dir $(ACL2_CUSTOM_TARGETS)) ; \
 
596
        for dir in $(dir $(ACL2_CUSTOM_TARGETS)) \
 
597
          workshops/2003/kaufmann/support/rtl ; \
551
598
        do \
552
599
        if [ -f $$dir/Makefile ] ; then \
553
600
        (cd $$dir ; $(MAKE) clean) ; \
587
634
 
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
595
638
 
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
598
 
# verbeek-schmaltz.
 
641
# workshops/2003/greve-wilding-vanfleet:
599
642
 
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
 
647
#     directory;
 
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
 
653
#     that target.
610
654
 
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".
632
676
 
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
642
686
 
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/).
652
696
 
 
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
 
701
# to do so.
 
702
ifeq ($(TB_LISP), )
 
703
.PHONY: system/toothbrush/success.txt
 
704
system/toothbrush/success.txt:
 
705
        @echo "Note: Skipping $@ for host Lisp $(ACL2_HOST_LISP)."
 
706
else
 
707
system/toothbrush/success.txt: system/toothbrush-deps.cert
 
708
        cd $(@D) ; $(STARTJOB) -c "$(MAKE)"
 
709
endif # ifeq ($(TB_LISP), )
 
710
 
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)"
689
747
 
690
 
workshops/2011/verbeek-schmaltz/sources/correctness2.cert: \
691
 
  workshops/2011/verbeek-schmaltz/deps.cert
692
 
        cd $(@D) ; $(STARTJOB) -c "$(MAKE)"
693
 
 
694
748
endif # ifeq ($(ACL2_HAS_REALS), )
695
749
 
696
 
ACL2_CUSTOM_TARGETS += system/pcert/sub.cert
697
 
 
698
 
system/pcert/sub.cert: \
699
 
  system/deps-pcert.cert
700
 
        cd $(@D) ; $(STARTJOB) -c "$(MAKE)"
701
 
 
702
750
endif # ifndef ACL2_COMP
703
751
 
704
752
# We avoid += because we want the custom targets to start first, in
795
843
# Unusual directory:
796
844
BOOKS_SKIP_COMP += $(patsubst %.cert, %.$(ACL2_COMP_EXT), $(wildcard fix-cert/*.cert))
797
845
 
798
 
# Contains Lisp-specific readtime conditionals:
 
846
# Contain Lisp-specific readtime conditionals:
799
847
BOOKS_SKIP_COMP += hacking/evalable-ld-printing.$(ACL2_COMP_EXT)
 
848
BOOKS_SKIP_COMP += centaur/misc/memory-mgmt-logic.$(ACL2_COMP_EXT)
800
849
 
801
850
# dft-ex.acl2 specifies no compilation; getprop.lisp can give stack
802
851
# overflow in during the load of the expansion file -- perhaps not
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))
815
864
 
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)
818
869
 
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))
822
873
 
 
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
 
879
# that directory.
 
880
BOOKS_SKIP_COMP += $(patsubst %.cert, %.$(ACL2_COMP_EXT), $(wildcard system/pcert/*.cert))
 
881
 
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) \
836
895
# host Lisp").
837
896
BOOKS_SKIP_COMP += centaur/bridge/top.$(ACL2_COMP_EXT)
838
897
 
 
898
# Has readtime conditionals #+cmucl and #-cmucl:
 
899
BOOKS_SKIP_COMP += std/io/read-string-tests.$(ACL2_COMP_EXT)
 
900
 
839
901
# CLISP says: "Lisp stack overflow":
840
902
BOOKS_SKIP_COMP += workshops/2006/rager/support/ptest-mergesort.$(ACL2_COMP_EXT)
841
903
 
 
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
 
907
 
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
844
910
# explicitly:
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
865
931
 
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)
875
 
        @echo "Making $@"
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." ; \
882
 
        exit 1 ; \
883
 
        fi
884
 
 
885
932
OK_CERTS += system/pcert/sub.$(ACL2_COMP_EXT)
886
933
 
887
934
endif # ifdef ACL2_COMP
947
994
 
948
995
all: $(OK_CERTS)
949
996
 
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
955
 
# set.
 
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).
960
1001
everything:
961
 
ifeq ($(ACL2_HAS_HONS), )
962
 
        $(MAKE) all $(ADDED_BOOKS)
963
 
else
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)
966
1003
 
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.
977
1014
 
978
1015
# basic is the default set of books to build:
979
1016
.PHONY: basic
980
 
basic: arithmetic arithmetic-2 arithmetic-3 arithmetic-5 ihs std str xdoc tools misc data-structures
 
1017
basic: arithmetic arithmetic-3 arithmetic-5 ihs std xdoc tools misc data-structures
981
1018
 
 
1019
.PHONY: acl2s
 
1020
acl2s: $(filter acl2s/%, $(OK_CERTS))
982
1021
 
983
1022
.PHONY: add-ons
984
1023
add-ons: $(filter add-ons/%, $(OK_CERTS))
998
1037
.PHONY: bdd
999
1038
bdd: $(filter bdd/%, $(OK_CERTS))
1000
1039
 
1001
 
.PHONY: ccg
1002
 
ccg: $(filter ccg/%, $(OK_CERTS))
1003
 
 
1004
1040
.PHONY: centaur
1005
1041
centaur: $(filter centaur/%, $(OK_CERTS))
1006
1042
 
1007
 
.PHONY: cgen
1008
 
cgen: $(filter cgen/%, $(OK_CERTS))
1009
 
 
1010
1043
.PHONY: clause-processors
1011
1044
clause-processors: $(filter clause-processors/%, $(OK_CERTS))
1012
1045
 
1162
1195
MILAWA_DEPS := misc/untranslate-patterns.cert \
1163
1196
               misc/hons-help2.cert \
1164
1197
               misc/definline.cert \
1165
 
               str/top.cert \
 
1198
               std/strings/top.cert \
1166
1199
               arithmetic-3/floor-mod/floor-mod.cert \
1167
1200
               tools/include-raw.cert \
1168
1201
               centaur/misc/seed-random.cert \
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.
1218
1251
 
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))
1223
1256
 
1224
1257
.PHONY: chk-include-book-worlds
1225
1258
chk-include-book-worlds: $(BOOKS_BKCHK_OUT)
1371
1404
 
1372
1405
clean: clean_vl
1373
1406
 
 
1407
 
 
1408
 
 
1409
# Getopt Demo
 
1410
 
 
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
 
1416
 
 
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
 
1424
 
 
1425
all: centaur/getopt/demo2-test.ok
 
1426
 
 
1427
 
 
1428
 
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
 
1553
#     certified.
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
1539
1577
# cert-flags instead of certify-book commands.  Alternately, maybe the scheme
1540
1578
# should be something like: if you give a certify-book command, we use it;
1541
1579
# otherwise we generate one using the cert-flags.
 
1580