X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=Makefile.in;h=8529ad2560497d53f4a54241737203599c8de0a9;hb=bc05c5c0eef21e7f80a9b6a7fa7e551b200ad905;hp=292851499d0b15f1916e20130a6e10a78a87535e;hpb=53a2161b3e0ff69420968c0fba82b93800a6b381;p=goals.git diff --git a/Makefile.in b/Makefile.in index 2928514..8529ad2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Goalfile parser +# Goals # Copyright (C) 2019 Richard W.M. Jones # Copyright (C) 2019 Red Hat Inc. # @@ -16,18 +16,44 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -SUBDIRS = parsing +# Pass through normal targets to Goalfile.in -all clean depend install: - $(MAKE) -C parsing $@ +# XXX Why can't this parse "all" instead of "all ()"? +all clean depend install maintainer-clean: src/goals + ./run src/goals "$@ ()" +# If src/goals doesn't exist then brute-force build it. Once we have +# src/goals we can rebuild it and other parts of the project using +# goals itself (see Goalfile.in). + +MENHIR = @MENHIR@ +OCAMLDEP = @OCAMLDEP@ +OCAMLFIND = @OCAMLFIND@ +OCAMLLEX = @OCAMLLEX@ +OCAMLFLAGS = @OCAMLFLAGS@ +OCAMLPACKAGES = @OCAMLPACKAGES@ + +src/goals: + $(MENHIR) --explain src/parser.mly +# Hack required to break circular dependencies. + echo 'val lexer_read : (Lexing.lexbuf -> token) option ref' >> src/parser.mli + echo 'val eval_substitute : (Ast.env -> Ast.loc -> Ast.substs -> string) option ref' >> src/parser.mli + $(OCAMLLEX) src/lexer.mll + $(OCAMLFIND) opt $(OCAMLFLAGS) $(OCAMLPACKAGES) -I src \ + $$($(OCAMLDEP) -sort src/*.mli src/*.ml) \ + -linkpkg -o $@ + +# These rules are required by autoconf. config.h: stamp-h stamp-h: config.h.in config.status ./config.status config.h touch $@ Makefile: Makefile.in config.status - ./config.status Makefile + ./config.status $@ + +run: run.in config.status + ./config.status $@ $(srcdir)/configure: configure.ac aclocal.m4 cd '$(srcdir)' && autoconf