Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Makefile! #10

Open
rwmjones opened this issue Jul 5, 2017 · 3 comments
Open

Add a Makefile! #10

rwmjones opened this issue Jul 5, 2017 · 3 comments

Comments

@rwmjones
Copy link

rwmjones commented Jul 5, 2017

Installing a whole new build system is pretty pointless, when a Makefile is not only far more portable, but it's simpler too!

OCAML_VERSION := $(shell ocamlopt -version)

all: ocplib_endian.cmxa

ocplib_endian.cmxa: endianString.cmx endianBytes.cmx
	ocamlfind mklib -o ocplib_endian $<

%.mli: %.cppo.mli
	cppo -V OCAML:$(OCAML_VERSION) $< -o $@
%.ml: %.cppo.ml
	cppo -V OCAML:$(OCAML_VERSION) $< -o $@
%.cmx: %.ml
	ocamlfind opt -c $< -o $@

endianString.ml: endianString.cppo.ml common.ml common_401.ml common_400.ml
endianBytes.ml: endianBytes.cppo.ml endianBytes.cppo.ml common.ml common_401.ml common_400.ml
endianBigString.ml: endianBigString.cppo.ml common.ml common_401.ml common_400.ml
common_400.ml: common_400.cppo.ml be_ocaml_400.ml le_ocaml_400.ml ne_ocaml_400.ml common_float.ml
common_401.ml: common_401.cppo.ml be_ocaml_401.ml le_ocaml_401.ml ne_ocaml_401.ml common_float.ml
@rgrinberg
Copy link

"portable" & "simpler". Caveats include:

  • Doesn't generate any docs
  • Doesn't work on systems where ocamlopt is missing.
  • Doesn't create a cmxs
  • Doesn't generate cmt/cmti files
  • Doesn't generate a .install file for opam
  • Doesn't build and execute the tests.

@avsm
Copy link
Contributor

avsm commented Feb 2, 2019

I've added a simple Makefile in #14 that satisfies both comments :-)

@hhugo
Copy link
Contributor

hhugo commented Nov 25, 2019

Should this be closed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants