-# Goalfile parser
-# Copyright (C) 2019 Richard W.M. Jones
-# Copyright (C) 2019 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-let objects = ["ast.cmx", "parser.cmx", "lexer.cmx", "main.cmx"]
-
-goal all = : file("goals")
-
-goal clean = {
- rm -f *~
- rm -f *.cmi *.cmo *.cmx *.o
- rm -f parser.ml parser.mli lexer.ml parser.conflicts
- rm -f goals
-}
-
-file("goals"): objects {
- @OCAMLFIND@ opt %^ -o %@
-}
-
-let OCAMLFLAGS = "-g -safe-string -warn-error CDEFLMPSUVYZX+52-3"
-
-goal compile_cmi (name) = "%name.cmi": "%name.mli" {
- @OCAMLFIND@ c %OCAMLFLAGS -c %< -o %@
-}
-goal compile_cmo (name) = "%name.cmo": "%name.ml" {
- @OCAMLFIND@ c %OCAMLFLAGS -c %< -o %@
-}
-goal compile_cmx (name) = "%name.cmx": "%name.ml" {
- @OCAMLFIND@ opt %OCAMLFLAGS -c %< -o %@
-}
-
-"parser.ml", "parser.mli": "parser.mly" {
- @MENHIR@ --explain %<
-}
-
-"lexer.ml": "lexer.mll", "lexer.cmi", "parser.ml" {
- @OCAMLLEX@ %<
-}
-
-# depend: .depend
-
-# .depend: parser.mly lexer.mll *.mli
-# rm -f $@ $@-t
-# @MENHIR@ --depend parser.mly > $@-t
-# ocamldep lexer.mll *.mli >> $@-t
-# mv $@-t $@
-
-# -include .depend
-
-# .PHONY: all clean depend