<commit_before># -*- Makefile -*-
# <NAME> 2015
# ----------------------------------------------------------------------

MAKEFLAGS = -w

# override in command line
ifneq ($(findstring install,$(MAKECMDGOALS)),)
ifeq ($(ANTIGENIC_MAP_VIEWER_INSTALL),)
  $(error ANTIGENIC_MAP_VIEWER_INSTALL not set)
endif
endif

# ----------------------------------------------------------------------

AMV_TEST = amv-config.js test-3d.ts test.less test-3d.json test-2d.ts test-3d.html test-2d.html
AMV_LIB = acmacs-plot-data.ts amv-level1.ts amv-level2.ts \
	  amv-manipulator.ts amv-manipulator-2d.ts amv-manipulator-3d.ts amv-2d.ts amv-3d.ts \
	  amv-utils.ts acmacs-toolkit.ts amv-state.ts
AMV_LESS = acmacs-toolkit.less amv.less
AMV_TYPINGS = antigenic-map-viewer.d.ts
AMV_FONTS = fonts/helvetiker_regular.typeface.js fonts/helvetiker_bold.typeface.js

LIB_JS = jquery jquery-ui three.js require.js

AMV = $(AMV_LIB) $(AMV_TEST)

# ----------------------------------------------------------------------

TARGET_JS = $(TS_TO_JS) $(patsubst %.js,$(DIST)/%.js,$(filter %.js,$(AMV))) $(patsubst %.json,$(DIST)/%.json,$(filter %.json,$(AMV))) $(patsubst fonts/%.js,$(DIST)/%.js,$(AMV_FONTS))
  # $(patsubst %,$(DIST)/%.js,$(LIB_JS))
TARGET_CSS = $(patsubst %.less,$(DIST)/%.css,$(filter %.less,$(AMV)))
TARGET_HTML = $(patsubst %,$(DIST)/%,$(filter %.html,$(AMV)))

# BUILD_TYPINGS = $(patsubst %,$(BUILD)/%.d.ts,$(LIB_TYPINGS)) $(AMV_TYPINGS)

# ----------------------------------------------------------------------

TS_TO_JS = $(patsubst %.ts,$(DIST)/%.js,$(filter %.ts,$(AMV)))

INSTALL_FILES = $(patsubst %.ts,$(DIST)/%.js,$(filter %.ts,$(AMV_LIB))) \
		$(AMV_LESS) $(patsubst fonts/%.js,$(DIST)/%.js,$(AMV_FONTS))

VERSION = $(shell cat VERSION.txt)
PKG_CONFIG_PATH = $(firstword $(subst :, ,$(shell pkg-config --variable pc_path pkg-config)))

# ----------------------------------------------------------------------

BUILD = build
DIST = dist

all: $(TARGET_JS) $(TARGET_CSS) $(TARGET_HTML)
	@#echo 'rebuilt  ' $?
	@#echo 'all      ' $^
	@#echo 'TARGET_JS' $(TARGET_JS)

# ----------------------------------------------------------------------

EUPA_MAKEFILE ?= eupa/Makefile.eupa
EUPA_DIST ?= dist
EUPA_BUILD ?= build

ifeq ($(findstring clean,$(MAKECMDGOALS)),)
ifeq ($(wildcard $(EUPA_MAKEFILE)),)
  $(shell git clone https://github.com/skepner/eupa.git)
endif
include $(EUPA_MAKEFILE)
endif

TYPINGS_DIR = $(EUPA_BUILD)

# ----------------------------------------------------------------------

test: all
ifeq ($(shell uname -s),Darwin)
	open $(TARGET_HTML)
endif

install: all
	/usr/bin/install -d -m 0755 $(ANTIGENIC_MAP_VIEWER_INSTALL)
	/usr/bin/install -pvC -m 0644 $(INSTALL_FILES) $(AMV_TYPINGS) $(ANTIGENIC_MAP_VIEWER_INSTALL)

clean:
	rm -rf $(DIST)

distclean: clean
	rm -rf $(BUILD) eupa

# ----------------------------------------------------------------------<commit_msg>install command switches fixed for linux<commit_after># -*- Makefile -*-
# <NAME> 2015
# ----------------------------------------------------------------------

MAKEFLAGS = -w

# override in command line
ifneq ($(findstring install,$(MAKECMDGOALS)),)
ifeq ($(ANTIGENIC_MAP_VIEWER_INSTALL),)
  $(error ANTIGENIC_MAP_VIEWER_INSTALL not set)
endif
endif

# ----------------------------------------------------------------------

AMV_TEST = amv-config.js test-3d.ts test.less test-3d.json test-2d.ts test-3d.html test-2d.html
AMV_LIB = acmacs-plot-data.ts amv-level1.ts amv-level2.ts \
	  amv-manipulator.ts amv-manipulator-2d.ts amv-manipulator-3d.ts amv-2d.ts amv-3d.ts \
	  amv-utils.ts acmacs-toolkit.ts amv-state.ts
AMV_LESS = acmacs-toolkit.less amv.less
AMV_TYPINGS = antigenic-map-viewer.d.ts
AMV_FONTS = fonts/helvetiker_regular.typeface.js fonts/helvetiker_bold.typeface.js

LIB_JS = jquery jquery-ui three.js require.js

AMV = $(AMV_LIB) $(AMV_TEST)

# ----------------------------------------------------------------------

TARGET_JS = $(TS_TO_JS) $(patsubst %.js,$(DIST)/%.js,$(filter %.js,$(AMV))) $(patsubst %.json,$(DIST)/%.json,$(filter %.json,$(AMV))) $(patsubst fonts/%.js,$(DIST)/%.js,$(AMV_FONTS))
  # $(patsubst %,$(DIST)/%.js,$(LIB_JS))
TARGET_CSS = $(patsubst %.less,$(DIST)/%.css,$(filter %.less,$(AMV)))
TARGET_HTML = $(patsubst %,$(DIST)/%,$(filter %.html,$(AMV)))

# BUILD_TYPINGS = $(patsubst %,$(BUILD)/%.d.ts,$(LIB_TYPINGS)) $(AMV_TYPINGS)

# ----------------------------------------------------------------------

TS_TO_JS = $(patsubst %.ts,$(DIST)/%.js,$(filter %.ts,$(AMV)))

INSTALL_FILES = $(patsubst %.ts,$(DIST)/%.js,$(filter %.ts,$(AMV_LIB))) \
		$(AMV_LESS) $(patsubst fonts/%.js,$(DIST)/%.js,$(AMV_FONTS))

VERSION = $(shell cat VERSION.txt)
PKG_CONFIG_PATH = $(firstword $(subst :, ,$(shell pkg-config --variable pc_path pkg-config)))

# ----------------------------------------------------------------------

BUILD = build
DIST = dist

all: $(TARGET_JS) $(TARGET_CSS) $(TARGET_HTML)
	@#echo 'rebuilt  ' $?
	@#echo 'all      ' $^
	@#echo 'TARGET_JS' $(TARGET_JS)

# ----------------------------------------------------------------------

EUPA_MAKEFILE ?= eupa/Makefile.eupa
EUPA_DIST ?= dist
EUPA_BUILD ?= build

ifeq ($(findstring clean,$(MAKECMDGOALS)),)
ifeq ($(wildcard $(EUPA_MAKEFILE)),)
  $(shell git clone https://github.com/skepner/eupa.git)
endif
include $(EUPA_MAKEFILE)
endif

TYPINGS_DIR = $(EUPA_BUILD)

# ----------------------------------------------------------------------

test: all
ifeq ($(shell uname -s),Darwin)
	open $(TARGET_HTML)
endif

install: all
	/usr/bin/install -d -m 0755 $(ANTIGENIC_MAP_VIEWER_INSTALL)
	/usr/bin/install -vC -m 0644 $(INSTALL_FILES) $(AMV_TYPINGS) $(ANTIGENIC_MAP_VIEWER_INSTALL)

clean:
	rm -rf $(DIST)

distclean: clean
	rm -rf $(BUILD) eupa

# ----------------------------------------------------------------------
{'fraction_non_alphanumeric': 0.35477178423236516, 'fraction_numerical': 0.007952973720608575, 'mean_word_length': 1.9974093264248705, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '1280285', 'n_tokens_mistral': 2162, 'n_tokens_neox': 2027, 'n_words': 353}