src/Tools/Metis/Makefile
author desharna
Thu, 09 Jul 2020 11:39:16 +0200
changeset 72004 913162a47d9f
parent 43269 3535f16d9714
permissions -rw-r--r--
Update Metis to 2.4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39433
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
     1
###############################################################################
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
     2
# METIS MAKEFILE
72004
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
     3
# Copyright (c) 2001 Joe Leslie-Hurd, distributed under the BSD License
39433
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
     4
###############################################################################
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
     5
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
     6
.SUFFIXES:
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
     7
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
     8
###############################################################################
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
     9
# The default action.
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    10
###############################################################################
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    11
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    12
.PHONY: default
72004
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
    13
default:
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
    14
	@if command -v mlton > /dev/null ; then $(MAKE) mlton ; else if command -v polyc > /dev/null ; then $(MAKE) polyml ; else if command -v mosmlc > /dev/null ; then $(MAKE) mosml ; else echo "ERROR: No ML found on path: install either MLton, Poly/ML or Moscow ML." ; exit 1 ; fi ; fi ; fi
39433
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    15
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    16
###############################################################################
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    17
# Cleaning temporary files.
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    18
###############################################################################
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    19
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    20
TEMP = \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    21
  $(MLTON_TARGETS) \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    22
  bin/mlton/*.sml bin/mlton/*.mlb \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    23
  $(POLYML_TARGETS) \
72004
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
    24
  bin/polyml/*.sml bin/polyml/*.log \
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
    25
  $(MOSML_TARGETS) \
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
    26
  bin/mosml/*.sml bin/mosml/*.ui bin/mosml/*.uo bin/mosml/a.out
39433
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    27
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    28
.PHONY: clean
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    29
clean:
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    30
	@echo
72004
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
    31
	@echo '+------------------+'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
    32
	@echo '| Clean everything |'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
    33
	@echo '+------------------+'
39433
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    34
	@echo
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    35
	rm -f $(TEMP)
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    36
	$(MAKE) -C test $@
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    37
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    38
###############################################################################
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    39
# Testing.
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    40
###############################################################################
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    41
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    42
.PHONY: test
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    43
test:
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    44
	$(MAKE) -C test
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    45
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    46
###############################################################################
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    47
# Source files.
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    48
###############################################################################
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    49
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    50
SRC = \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    51
  src/Useful.sig src/Useful.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    52
  src/Lazy.sig src/Lazy.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    53
  src/Ordered.sig src/Ordered.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    54
  src/Map.sig src/Map.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    55
  src/KeyMap.sig src/KeyMap.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    56
  src/Set.sig src/Set.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    57
  src/ElementSet.sig src/ElementSet.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    58
  src/Sharing.sig src/Sharing.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    59
  src/Stream.sig src/Stream.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    60
  src/Heap.sig src/Heap.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    61
  src/Print.sig src/Print.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    62
  src/Parse.sig src/Parse.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    63
  src/Name.sig src/Name.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    64
  src/NameArity.sig src/NameArity.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    65
  src/Term.sig src/Term.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    66
  src/Subst.sig src/Subst.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    67
  src/Atom.sig src/Atom.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    68
  src/Formula.sig src/Formula.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    69
  src/Literal.sig src/Literal.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    70
  src/Thm.sig src/Thm.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    71
  src/Proof.sig src/Proof.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    72
  src/Rule.sig src/Rule.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    73
  src/Normalize.sig src/Normalize.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    74
  src/Model.sig src/Model.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    75
  src/Problem.sig src/Problem.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    76
  src/TermNet.sig src/TermNet.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    77
  src/AtomNet.sig src/AtomNet.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    78
  src/LiteralNet.sig src/LiteralNet.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    79
  src/Subsume.sig src/Subsume.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    80
  src/KnuthBendixOrder.sig src/KnuthBendixOrder.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    81
  src/Rewrite.sig src/Rewrite.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    82
  src/Units.sig src/Units.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    83
  src/Clause.sig src/Clause.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    84
  src/Active.sig src/Active.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    85
  src/Waiting.sig src/Waiting.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    86
  src/Resolution.sig src/Resolution.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    87
  src/Tptp.sig src/Tptp.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    88
  src/Options.sig src/Options.sml
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    89
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    90
EXTRA_SRC = \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    91
  src/problems.sml
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    92
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    93
###############################################################################
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    94
# The ML preprocessor.
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    95
###############################################################################
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    96
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    97
MLPP = scripts/mlpp
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    98
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
    99
MLPP_OPTS =
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   100
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   101
###############################################################################
72004
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   102
# Building using MLton.
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   103
###############################################################################
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   104
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   105
MLTON = mlton
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   106
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   107
MLTON_OPTS = -runtime 'ram-slop 0.4'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   108
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   109
MLTON_SRC = \
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   110
  src/Portable.sig src/PortableMlton.sml \
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   111
  $(SRC)
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   112
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   113
MLTON_TARGETS = \
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   114
  bin/mlton/selftest \
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   115
  bin/mlton/metis \
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   116
  bin/mlton/problems2tptp
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   117
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   118
bin/mlton/%.sml: $(MLTON_SRC) src/%.sml
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   119
	@$(MLPP) $(MLPP_OPTS) -c mlton $^ > $@
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   120
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   121
bin/mlton/%.mlb: bin/mlton/%.sml
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   122
	echo '$$(SML_LIB)/basis/basis.mlb $$(SML_LIB)/basis/mlton.mlb $(notdir $<)' > $@
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   123
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   124
bin/mlton/%: bin/mlton/%.mlb
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   125
	@echo
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   126
	@echo '+-------------------------+'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   127
	@echo '| Compile a MLton program |'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   128
	@echo '+-------------------------+'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   129
	@echo
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   130
	@echo $@
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   131
	cd bin/mlton ; $(MLTON) $(MLTON_OPTS) $(notdir $<)
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   132
	@echo
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   133
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   134
.PHONY: mlton-info
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   135
mlton-info:
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   136
	@echo
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   137
	@echo '+-----------------------------------+'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   138
	@echo '| Build and test the MLton programs |'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   139
	@echo '+-----------------------------------+'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   140
	@echo
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   141
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   142
.PHONY: mlton
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   143
mlton: mlton-info $(MLTON_TARGETS)
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   144
	$(MAKE) -C test mlton
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   145
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   146
###############################################################################
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   147
# Building using Poly/ML.
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   148
###############################################################################
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   149
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   150
POLYML = polyc
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   151
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   152
POLYML_OPTS =
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   153
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   154
POLYML_SRC = \
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   155
  src/Random.sig src/Random.sml \
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   156
  src/Portable.sig src/PortablePolyml.sml \
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   157
  $(SRC)
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   158
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   159
POLYML_TARGETS = \
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   160
  bin/polyml/selftest \
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   161
  bin/polyml/problems2tptp \
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   162
  bin/polyml/metis
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   163
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   164
bin/polyml/%.sml: src/%.sml $(POLYML_SRC)
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   165
	@$(MLPP) $(MLPP_OPTS) -c polyml $(POLYML_SRC) > $@
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   166
	@echo 'fun main () = let' >> $@
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   167
	@$(MLPP) $(MLPP_OPTS) -c polyml $< >> $@
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   168
	@echo "in () end handle e => (TextIO.output (TextIO.stdErr, \"FATAL EXCEPTION:\\\\n\"^ exnMessage e); OS.Process.exit OS.Process.failure);" >> $@
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   169
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   170
bin/polyml/%: bin/polyml/%.sml
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   171
	@echo
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   172
	@echo '+---------------------------+'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   173
	@echo '| Compile a Poly/ML program |'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   174
	@echo '+---------------------------+'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   175
	@echo
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   176
	@echo $@
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   177
	cd bin/polyml && $(POLYML) $(POLYML_OPTS) -o $(notdir $@) $(notdir $<)
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   178
	@echo
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   179
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   180
.PHONY: polyml-info
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   181
polyml-info:
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   182
	@echo
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   183
	@echo '+-------------------------------------+'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   184
	@echo '| Build and test the Poly/ML programs |'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   185
	@echo '+-------------------------------------+'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   186
	@echo
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   187
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   188
.PHONY: polyml
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   189
polyml: polyml-info $(POLYML_TARGETS)
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   190
	$(MAKE) -C test polyml
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   191
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   192
###############################################################################
39433
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   193
# Building using Moscow ML.
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   194
###############################################################################
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   195
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   196
MOSMLC = mosmlc -toplevel -q
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   197
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   198
MOSML_SRC = \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   199
  src/Portable.sig src/PortableMosml.sml \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   200
  $(SRC)
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   201
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   202
MOSML_TARGETS = \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   203
  bin/mosml/problems2tptp \
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   204
  bin/mosml/metis
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   205
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   206
include bin/mosml/Makefile.src
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   207
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   208
.PHONY: mosml-info
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   209
mosml-info:
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   210
	@echo
72004
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   211
	@echo '+---------------------------------------+'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   212
	@echo '| Build and test the Moscow ML programs |'
913162a47d9f Update Metis to 2.4
desharna
parents: 43269
diff changeset
   213
	@echo '+---------------------------------------+'
39433
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   214
	@echo
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   215
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   216
.PHONY: mosml
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   217
mosml: mosml-info $(MOSML_OBJ) $(MOSML_TARGETS) test
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   218
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   219
###############################################################################
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   220
# Development.
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   221
##############################################################################
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   222
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   223
include Makefile.dev
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   224
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   225
Makefile.dev:
3e41c9d29769 make "metis.ML" building process slightly more robust by eliminating the need for "FILES";
blanchet
parents:
diff changeset
   226
	echo > $@