Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <sora@morimoto.io>
  • Loading branch information
smorimoto committed Aug 4, 2024
1 parent 9882630 commit ec5b8ef
Show file tree
Hide file tree
Showing 17 changed files with 43 additions and 197 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,4 @@ jobs:
satysfi-external: git+https://github.com/gfngfn/satysfi-external-repo.git
default: git+https://github.com/ocaml/opam-repository.git
- name: Lint opam
uses: ocaml/setup-ocaml/lint-opam@v3
- uses: ocaml/setup-ocaml/lint-opam@v3
78 changes: 6 additions & 72 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,72 +1,6 @@
.DS_Store
\#*
.\#*
*~
*.exe
*.tex
*.log
*.aux
*.dvi
*.pdf
*.out
*.html
obsolete/*.txt
old/
*.png
satysfi
*.ttf
*.otf
*.ttc
*.dfont
*.afm
*.t1a
*.svg
!/logo/macrodown.svg
*.dat
*.ttx
*.jpg
!/demo/satysfi-logo.jpg
!/tests/images/satysfi-logo-cmyk.jpg
!/tests/images/satysfi-logo-gray.jpg
!/tests/images/satysfi-logo-rgb.jpg
!/tests/images/peppers-cmyk.jpg
!/tests/images/peppers-gray.jpg
!/tests/images/peppers-rgb.jpg
*.satysfi-aux
external/

# Created by https://www.toptal.com/developers/gitignore/api/ocaml
# Edit at https://www.toptal.com/developers/gitignore?templates=ocaml

### OCaml ###
*.annot
*.cmo
*.cma
*.cmi
*.a
*.o
*.cmx
*.cmxs
*.cmxa

# ocamlbuild working directory
_build/

# ocamlbuild targets
*.byte
*.native

# oasis generated files
setup.data
setup.log

# Merlin configuring file for Vim and Emacs
.merlin

# Dune generated files
*.install

# Local OPAM switch
_opam

# End of https://www.toptal.com/developers/gitignore/api/ocaml
/_build/
/_opam/
/lib-satysfi/dist/fonts/
/temp/IPAexfont00401/
/temp/latinmodern-math-1959/
/temp/*.zip
24 changes: 7 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
PREFIX=/usr/local
LIBDIR=$(PREFIX)/share/satysfi
TARGET=satysfi
BINDIR=$(PREFIX)/bin
RM=rm -f
DUNE=dune

.PHONY: all install lib uninstall clean
.PHONY: all clean install uninstall

all:
$(DUNE) build --root .
cp _build/install/default/bin/$(TARGET) .
dune build

install: $(TARGET)
mkdir -p $(BINDIR)
install $(TARGET) $(BINDIR)
clean:
dune clean

#preliminary:
# [ -d .git ] && git submodule update -i || echo "Skip git submodule update -i"
install:
dune install --bindir=$(BINDIR)

uninstall:
rm -rf $(BINDIR)/$(TARGET)
rm -rf $(LIBDIR)

clean:
$(DUNE) clean
$(RM) satysfi
dune uninstall --bindir=$(BINDIR)
2 changes: 1 addition & 1 deletion download-fonts.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash

set -ue

Expand Down
14 changes: 4 additions & 10 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

(name satysfi)

(version 0.0.11)

(license LGPL-3.0-only)

(authors "Takashi Suwa")
Expand Down Expand Up @@ -40,19 +38,16 @@
(core_kernel
(and
(>= v0.15)
(< v0.17)))
(< v0.18)))
(cppo
(and
:build
(>= 1.6.4)
(< 1.7.0)))
(< 1.7)))
dune-build-info
(menhir
(and
:build
(>= 20231231)))
(>= 20231231))
(menhirLib
(>= 20231231))
(ocamlfind :build)
(omd
(and
(>= 1.3.2)
Expand All @@ -67,7 +62,6 @@
(< 6.0)))
(re
(and
:build
(>= 1.10.4)
(< 2.0)))
(uutf
Expand Down
2 changes: 1 addition & 1 deletion install-libs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash

LIBDIR=${1:-/usr/local/share/satysfi}

Expand Down
33 changes: 18 additions & 15 deletions satysfi.opam
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "0.0.11"
synopsis: "A statically-typed, functional typesetting system"
description:
"SATySFi is a typesetting system equipped with a statically-typed, functional programming language. It consists mainly of two “layers” ― the text layer and the program layer. The former is for writing documents in LaTeX-like syntax. The latter, which has OCaml-like syntax, is for defining functions and commands. SATySFi enables you to write documents markuped with flexible commands of your own making. In addition, its informative type error reporting will be a good help to your writing."
Expand All @@ -15,27 +14,31 @@ depends: [
"batteries" {>= "3.6.0" & < "4.0"}
"camlimages" {>= "5.0.1" & < "5.0.5"}
"camlpdf" {= "2.3.1+satysfi"}
"core_kernel" {>= "v0.15" & < "v0.17"}
"cppo" {build & >= "1.6.4" & < "1.7.0"}
"menhir" {build & >= "20231231"}
"core_kernel" {>= "v0.15" & < "v0.18"}
"cppo" {>= "1.6.4" & < "1.7"}
"dune-build-info"
"menhir" {>= "20231231"}
"menhirLib" {>= "20231231"}
"ocamlfind" {build}
"omd" {>= "1.3.2" & < "2.0"}
"otfed" {>= "0.3.1" & < "0.4"}
"ppx_deriving" {>= "5.2.1" & < "6.0"}
"re" {build & >= "1.10.4" & < "2.0"}
"re" {>= "1.10.4" & < "2.0"}
"uutf" {>= "1.0.3" & < "2.0"}
"yojson-with-position" {= "1.4.2+satysfi"}
"odoc" {with-doc}
]
dev-repo: "git+https://github.com/gfngfn/SATySFi.git"
build: [
["mkdir" "-p" "temp"]
[make "-f" "Makefile" "PREFIX=%{prefix}%"]
]
install: [
[make "-f" "Makefile" "install" "PREFIX=%{prefix}%"]
]
remove: [
[make "-f" "Makefile" "uninstall" "PREFIX=%{prefix}%"]
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/gfngfn/SATySFi.git"
10 changes: 0 additions & 10 deletions satysfi.opam.template

This file was deleted.

27 changes: 0 additions & 27 deletions src/backend/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions src/backend/how-to-compile.md

This file was deleted.

11 changes: 1 addition & 10 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
camlpdf
core_kernel
core_kernel.pairing_heap
dune-build-info
menhirLib
otfed
uutf
Expand Down Expand Up @@ -47,16 +48,6 @@
(flags
(--table --explain)))

(rule
(targets version.ml)
(deps
../tools/genversion/genversion.exe
(:src ../satysfi.opam))
(action
(with-stdout-to
%{targets}
(run %{deps}))))

(rule
(targets types.ml)
(deps
Expand Down
4 changes: 4 additions & 0 deletions src/version.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
let version =
match Build_info.V1.version () with
| None -> "dev"
| Some v -> Build_info.V1.Version.to_string v
3 changes: 0 additions & 3 deletions temp/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion tools/gencode/dune-project

This file was deleted.

3 changes: 0 additions & 3 deletions tools/genversion/dune

This file was deleted.

1 change: 0 additions & 1 deletion tools/genversion/dune-project

This file was deleted.

21 changes: 0 additions & 21 deletions tools/genversion/genversion.ml

This file was deleted.

0 comments on commit ec5b8ef

Please sign in to comment.