<commit_before>
## Glade management:
LABLGLADE_OPT= -embed 
LABLGLADE_FILE= gui_files/app.glade
LABLGLADE_GEN_MOD= generatedGui
LABLGLADE_GEN_FILE=$(LABLGLADE_GEN_MOD).ml 
LABLGLADE_DEPENDERS= gui.ml

## Application:
APP_NAME= locoseq
APP_MODS=  $(LABLGLADE_GEN_MOD)  midi log jackSequencer tracker inputManager midiFile stringServer seqApp guiEditor gui main

## JACK-MIDI Interface:
JACK_VERSION=$(shell pkg-config --modversion jack)
JACK_VERSION_FIRST=$(shell \
    echo "$(JACK_VERSION)" | sed 's/\([^.]*\)\.[^.]*\.[^.]*/\1/')
JACK_VERSION_SECOND=$(shell \
    echo "$(JACK_VERSION)" | sed 's/[^.]*\.\([^.]*\)\.[^.]*/\1/')

JACK_MIDI_COMPATIBILTY="not-set-so-that-compilation-fails"
if $(and $(equal $(JACK_VERSION_FIRST), 0), $(lt $(JACK_VERSION_SECOND), 105))
  JACK_MIDI_COMPATIBILTY=-DJACK_MIDI_NEEDS_NFRAMES=$(JACK_VERSION_SECOND)
  export
else
  JACK_MIDI_COMPATIBILTY=
  export

JACKITF_NAME=jackseq
JACKITF_FLAGS= $(JACK_MIDI_COMPATIBILTY)\
  -ansi -pedantic -Wall -Wextra -Wpointer-arith -Wbad-function-cast

## The library of C interfaces (currently only JACKITF_NAME):
ITF_LIB=interfaces

## Code documentation:
DOC_SOURCES=src/midi.ml src/log.ml src/jackSequencer.ml src/tracker.ml src/inputManager.ml src/midiFile.ml src/stringServer.ml src/seqApp.ml src/guiEditor.ml src/gui.ml src/main.ml
HTML_DIR=doc/ref/html
LATEX_DIR=doc/ref/latex
CODEDOC_CSS=codedoc.css

## Inspection:
INSPECTION_OUTPUT=Inspection
INSPECTION_DIR=InspectionData

## Compilation variables:
OCAMLFLAGS = -dtypes -thread -ccopt -pthread
NATIVE_ENABLED = true
BYTE_ENABLED = false 

USE_OCAMLFIND = true
OCAMLPACKS[] = unix,threads.posix,lablgtk2,lablgtk2.glade,lablgtk2.init,xml-light

OCAML_CLIBS= $(ITF_LIB)
OCAML_NATIVE_LINK_FLAGS= -cclib -ljack

## Some targets:
.PHONY: clean install inspection package license unlicense codedoc

clean: # The Big clean:
  find . \
  -name "*.cmo" -o \
  -name "*.cmxa" -o \
  -name "*.cma" -o \
  -name "*.cmi" -o \
  -name "*.cmx" -o \
  -name "*.o" -o \
  -name "*.so" -o \
  -name "*.a" -o \
  -name "*.annot" -o \
  -name "*.omc" -o \
  -name "*.opt" -o \
  -name "$(APP_NAME)" -o \
  -name ".omakedb*"  | xargs rm -f 
  rm -rf $(INSPECTION_DIR)
  rm -f $(HTML_DIR)/*.html
  rm -f src/$(LABLGLADE_GEN_FILE)
  echo "Cleaned "


## Make inspection and genrate human readable reports:
inspection:src/$(APP_NAME)
  mkdir -p $(INSPECTION_DIR)
  src/$(APP_NAME) -inspect $(INSPECTION_DIR)/$(INSPECTION_OUTPUT).t2t
  # cp  $(README_CSS_FILE) $(INSPECTION_DIR)/inspect.css
  txt2tags --toc --enum-title -t man $(INSPECTION_DIR)/$(INSPECTION_OUTPUT).t2t
  txt2tags --toc -t xhtml $(INSPECTION_DIR)/$(INSPECTION_OUTPUT).t2t


MakePackage ()=
  DATE_FOR_NAME = $(shell date +"%Y-%m-%d_%Hh%Mm%S")
  DIR_NAME = $(APP_NAME)_$(DATE_FOR_NAME)
  mkdir $(DIR_NAME)
  mkdir $(DIR_NAME)/src
  mkdir $(DIR_NAME)/src/gui_files
  mkdir $(DIR_NAME)/test/
  cp  src/*.ml src/*.c $(DIR_NAME)/src/
  cp  src/gui_files/app.glade  $(DIR_NAME)/src/gui_files/
  cp  test/*  $(DIR_NAME)/test/
  cp  OMakefile OMakeroot README license.bsd $(DIR_NAME)/
  tar cvfz $(DIR_NAME).tar.gz $(DIR_NAME)
  rm -rf $(DIR_NAME)

package:
  MakePackage ()


codedoc: $(DOC_SOURCES)
  ocamlfind ocamldoc -package $(OCAMLPACKS) -d $(HTML_DIR) -I src\
  -html -css-style $(CODEDOC_CSS) -colorize-code $(DOC_SOURCES)


## this function defines what will be done in src/ subdirectory:
MakeExec () =
  echo "[My Omake] <MakeApp>"
  # 1: Genrate the GUI module:
  $(LABLGLADE_GEN_FILE): $(LABLGLADE_FILE)
    lablgladecc2 $(LABLGLADE_OPT) $(LABLGLADE_FILE) > $(LABLGLADE_GEN_MOD).ml
  $(LABLGLADE_DEPENDERS):$(LABLGLADE_GEN_FILE)
  # 2: The alsa wrapper lib:
  $(ITF_LIB).a: $(JACKITF_NAME).o
    ar -crv $(ITF_LIB).a $(JACKITF_NAME).o
  $(JACKITF_NAME).o:$(JACKITF_NAME).c
    gcc $(JACKITF_FLAGS) -c $(JACKITF_NAME).c
  # 3: The native program:
  OCamlProgram($(APP_NAME), $(APP_MODS) )
  .DEFAULT:  $(APP_NAME)


.SUBDIRS: src
  MakeExec ()

.SUBDIRS: doc/manual/src/



<commit_msg>Now locoseq builds in the 'build' directory<commit_after>
## Glade management:
LABLGLADE_OPT= -embed 
LABLGLADE_FILE= gui_files/app.glade
LABLGLADE_GEN_MOD= generatedGui
LABLGLADE_GEN_FILE=$(LABLGLADE_GEN_MOD).ml 
LABLGLADE_DEPENDERS= gui.ml

## Application:
APP_NAME= locoseq
APP_MODS=  $(LABLGLADE_GEN_MOD)  midi log jackSequencer tracker inputManager midiFile stringServer seqApp guiEditor gui main

## JACK-MIDI Interface:
JACK_VERSION=$(shell pkg-config --modversion jack)
JACK_VERSION_FIRST=$(shell \
    echo "$(JACK_VERSION)" | sed 's/\([^.]*\)\.[^.]*\.[^.]*/\1/')
JACK_VERSION_SECOND=$(shell \
    echo "$(JACK_VERSION)" | sed 's/[^.]*\.\([^.]*\)\.[^.]*/\1/')

JACK_MIDI_COMPATIBILTY="not-set-so-that-compilation-fails"
if $(and $(equal $(JACK_VERSION_FIRST), 0), $(lt $(JACK_VERSION_SECOND), 105))
  JACK_MIDI_COMPATIBILTY=-DJACK_MIDI_NEEDS_NFRAMES=$(JACK_VERSION_SECOND)
  export
else
  JACK_MIDI_COMPATIBILTY=
  export

JACKITF_NAME=jackseq
JACKITF_FLAGS= $(JACK_MIDI_COMPATIBILTY)\
  -ansi -pedantic -Wall -Wextra -Wpointer-arith -Wbad-function-cast

## The library of C interfaces (currently only JACKITF_NAME):
ITF_LIB=interfaces

## Code documentation:
DOC_SOURCES=src/midi.ml src/log.ml src/jackSequencer.ml src/tracker.ml src/inputManager.ml src/midiFile.ml src/stringServer.ml src/seqApp.ml src/guiEditor.ml src/gui.ml src/main.ml
HTML_DIR=doc/ref/html
LATEX_DIR=doc/ref/latex
CODEDOC_CSS=codedoc.css

## Inspection:
INSPECTION_OUTPUT=Inspection
INSPECTION_DIR=InspectionData

## Compilation variables:
OCAMLFLAGS = -dtypes -thread -ccopt -pthread
NATIVE_ENABLED = true
BYTE_ENABLED = false 

USE_OCAMLFIND = true
OCAMLPACKS[] = unix,threads.posix,lablgtk2,lablgtk2.glade,lablgtk2.init,xml-light

OCAML_CLIBS= $(ITF_LIB)
OCAML_NATIVE_LINK_FLAGS= -cclib -ljack

## Some targets:
.PHONY: clean install inspection package license unlicense codedoc

clean: # The Big clean:
  find . \
  -name "*.cmo" -o \
  -name "*.cmxa" -o \
  -name "*.cma" -o \
  -name "*.cmi" -o \
  -name "*.cmx" -o \
  -name "*.o" -o \
  -name "*.so" -o \
  -name "*.a" -o \
  -name "*.annot" -o \
  -name "*.omc" -o \
  -name "*.opt" -o \
  -name "$(APP_NAME)" -o \
  -name ".omakedb*"  | xargs rm -f 
  rm -rf $(INSPECTION_DIR)
  rm -f $(HTML_DIR)/*.html
  rm -f src/$(LABLGLADE_GEN_FILE)
  echo "Cleaned "


## Make inspection and genrate human readable reports:
inspection:src/$(APP_NAME)
  mkdir -p $(INSPECTION_DIR)
  src/$(APP_NAME) -inspect $(INSPECTION_DIR)/$(INSPECTION_OUTPUT).t2t
  # cp  $(README_CSS_FILE) $(INSPECTION_DIR)/inspect.css
  txt2tags --toc --enum-title -t man $(INSPECTION_DIR)/$(INSPECTION_OUTPUT).t2t
  txt2tags --toc -t xhtml $(INSPECTION_DIR)/$(INSPECTION_OUTPUT).t2t


MakePackage ()=
  DATE_FOR_NAME = $(shell date +"%Y-%m-%d_%Hh%Mm%S")
  DIR_NAME = $(APP_NAME)_$(DATE_FOR_NAME)
  mkdir $(DIR_NAME)
  mkdir $(DIR_NAME)/src
  mkdir $(DIR_NAME)/src/gui_files
  mkdir $(DIR_NAME)/test/
  cp  src/*.ml src/*.c $(DIR_NAME)/src/
  cp  src/gui_files/app.glade  $(DIR_NAME)/src/gui_files/
  cp  test/*  $(DIR_NAME)/test/
  cp  OMakefile OMakeroot README license.bsd $(DIR_NAME)/
  tar cvfz $(DIR_NAME).tar.gz $(DIR_NAME)
  rm -rf $(DIR_NAME)

package:
  MakePackage ()


codedoc: $(DOC_SOURCES)
  ocamlfind ocamldoc -package $(OCAMLPACKS) -d $(HTML_DIR) -I src\
  -html -css-style $(CODEDOC_CSS) -colorize-code $(DOC_SOURCES)


## this function defines what will be done in src/ subdirectory:
MakeExec () =
  echo "[My Omake] <MakeApp>"
  # 1: Genrate the GUI module:
  $(LABLGLADE_GEN_FILE): $(LABLGLADE_FILE)
    lablgladecc2 $(LABLGLADE_OPT) $(LABLGLADE_FILE) > $(LABLGLADE_GEN_MOD).ml
  $(LABLGLADE_DEPENDERS):$(LABLGLADE_GEN_FILE)
  # 2: The alsa wrapper lib:
  $(ITF_LIB).a: $(JACKITF_NAME).o
    ar -crv $(ITF_LIB).a $(JACKITF_NAME).o
  $(JACKITF_NAME).o:$(JACKITF_NAME).c
    gcc $(JACKITF_FLAGS) -c $(JACKITF_NAME).c
  # 3: The native program:
  OCamlProgram($(APP_NAME), $(APP_MODS) )
  .DEFAULT:  $(APP_NAME)

vmount(-l, src, build)
.SUBDIRS: build
  MakeExec ()

.SUBDIRS: doc/manual/src/




{'fraction_non_alphanumeric': 0.16102756892230577, 'fraction_numerical': 0.004511278195488722, 'mean_word_length': 4.195963541666667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '841465', 'n_tokens_mistral': 3498, 'n_tokens_neox': 3341, 'n_words': 651}