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

chore: use opam to simplify makefile #361

Merged
merged 2 commits into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,16 @@ clean:
# This takes a while but ensures we use the correct versions of the atd tools.
.PHONY: setup
setup:
opam update -y
opam install -y --deps-only ./semgrep-interfaces.opam
# Please install check-jsonschema (Python tool) if this fails:
check-jsonschema --version
opam update -y
opam install -y --deps-only ./dev.opam

.PHONY: setup-ALPINE
setup-ALPINE: setup-PYTHON

.PHONY: setup-MACOS
setup-MACOS:
brew install check-jsonschema

.PHONY: setup-PYTHON
setup-PYTHON:
pip install check-jsonschema

# The tests require semgrep-core, among other things.
#
.PHONY: test
test:
$(MAKE) -C tests
Expand Down
15 changes: 0 additions & 15 deletions dev.opam

This file was deleted.

31 changes: 31 additions & 0 deletions semgrep-interfaces.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This is meant to be installed with 'opam install --deps-only . '
#
opam-version: "2.0"
maintainer: "semgrep"
authors: "r2c"
homepage: "n/a"
bug-reports: "n/a"
synopsis: "Interfaces for Semgrep"
dev-repo: "git+https://github.com/semgrep/semgrep-interfaces.git"
license: "LGPL-2.1-only"

build: []
install: []

depends: [
"atd" {>= "2.6.0"}
"atdpy" {>= "2.12.0"}
"atdts" {>= "2.13.0"}
"atdgen" {>= "2.10.0"}
]

#TODO: we don't build on ubuntu or debian ever, and they are not packages there,
# so let's just ignore it for now
#["check-jsonschema"] {os-family = "debian"}
#["check-jsonschema"] {os-family = "ubuntu"}
depexts: [
["check-jsonschema"] {os-distribution = "alpine"}
["check-jsonschema"] {os = "macos" & os-distribution = "homebrew"}
["check-jsonschema"] {os = "macos" & os-distribution = "macports"}
["check-jsonschema"] {os = "win32" & os-distribution = "macports"}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is macports on win32??

]