ocaml-indent / OMakefile

camlspotter 0a0cf92 

camlspotter 42c1302 
camlspotter 0a0cf92 





camlspotter 341a5a9 

camlspotter 5f6fb4d 
camlspotter 341a5a9 
camlspotter 5f6fb4d 
camlspotter 341a5a9 




camlspotter 4aed057 

camlspotter eceb3b0 
camlspotter 5f6fb4d 
camlspotter e0b335b 
camlspotter 69ca6e2 
camlspotter 341a5a9 

camlspotter afae5f4 
camlspotter 341a5a9 





camlspotter 7ac7568 
camlspotter 341a5a9 
camlspotter afae5f4 
camlspotter 341a5a9 


camlspotter 76df415 



camlspotter 9053664 
camlspotter 76df415 





camlspotter b7aefda 
camlspotter df4cce3 
camlspotter b7aefda 
camlspotter 76df415 


camlspotter d48d8fe 
camlspotter 76df415 

camlspotter df4cce3 
camlspotter 1f0ff49 








camlspotter df4cce3 




camlspotter 1c0b04e 
# How-to-build using OMake
#
# cp OMakeroot.in OMakeroot # to create OMakeroot for the first time

# If OMakeroot is here, include OMyMakefile
if $(file-exists OMakeroot)
   include OMyMakefile
   export

.PHONY: all install clean

CAMLP4PACKS[]= sexplib compiler-libs.common

OCAMLPACKS[]= sexplib compiler-libs.common

OCAMLDEPFLAGS= -syntax camlp4o -package sexplib.syntax
OCAMLPPFLAGS= -syntax camlp4o -package sexplib.syntax

FILES[] =
    pos
    reader
    tokenstr
    xparser
    machine
    args
    main

PROGRAM = ocaml-indent

OCAML_LIBS +=
OCAML_CLIBS +=
OCAML_OTHER_LIBS +=
OCAML_LIB_FLAGS +=

MyOCamlProgram($(PROGRAM), $(FILES))

.DEFAULT: ocaml-indent

clean:
	rm -f *.cm* *.o *output *.sp?t

.PHONY: test


TESTS=$(glob tests/*.ml)
test_out(file) = 
    return $(addprefix tests_out, $(removeprefix tests, $(file)))

TESTS_OUT=$(test_out $(TESTS))

foreach (file, $(TESTS))
  $(test_out $(file)): $(file) ./ocaml-indent
    mkdir_if_not_exists(tests_out)
    ./ocaml-indent $< > $@
  export

result.diff: $(TESTS_OUT)
    -diff -x '*~' -c -r tests tests_out > $@

test: result.diff

SELFTESTS=$(glob *.ml *.mli)
selftest_out(file) = 
    return $(addprefix self_tests_out/, $(file))

SELFTESTS_OUT=$(selftest_out $(TESTS))

.PHONY: selftest
selftest: $(SELFTESTS_OUT)

#|ditto.
mkdir_if_not_exists(dir) =
  if $(not $(test -e $(dir))):
    mkdir $(dir) 
  return

WithOCamlVeryClean()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.