1
1
mirror of https://github.com/kanaka/mal.git synced 2024-10-26 22:28:26 +03:00

go: update to ubuntu:24.04 and convert to go.mod style

This commit is contained in:
Joel Martin 2024-08-05 16:57:03 -05:00
parent e4a92b1c1c
commit 61323306c2
18 changed files with 71 additions and 68 deletions

View File

@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:24.04
MAINTAINER Joel Martin <github@martintribe.org>
##########################################################
@ -19,4 +19,6 @@ WORKDIR /mal
# Specific implementation requirements
##########################################################
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install g++ golang libedit-dev pkg-config
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install g++ golang libreadline-dev libedit-dev pkg-config
ENV HOME /mal

View File

@ -1,5 +1,3 @@
export GOPATH := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
#####################
SOURCES_BASE = src/types/types.go src/readline/readline.go \
@ -24,7 +22,7 @@ mal: $(word $(words $(BINS)),$(BINS))
define dep_template
$(1): $(SOURCES_BASE) src/$(1)/$(1).go
go build $$@
go build -o $$@ ./src/$(1)
endef
$(foreach b,$(BINS),$(eval $(call dep_template,$(b))))

3
impls/go/go.mod Normal file
View File

@ -0,0 +1,3 @@
module mal
go 1.22.2

View File

@ -9,10 +9,10 @@ import (
)
import (
"printer"
"reader"
"readline"
. "types"
"mal/src/printer"
"mal/src/reader"
"mal/src/readline"
. "mal/src/types"
)
// Errors/Exceptions

View File

@ -6,7 +6,7 @@ import (
)
import (
. "types"
. "mal/src/types"
)
type Env struct {

View File

@ -6,7 +6,7 @@ import (
)
import (
"types"
"mal/src/types"
)
func Pr_list(lst []types.MalType, pr bool,

View File

@ -9,7 +9,7 @@ import (
)
import (
. "types"
. "mal/src/types"
)
type Reader interface {

View File

@ -6,7 +6,7 @@ import (
)
import (
"readline"
"mal/src/readline"
)
// read

View File

@ -6,10 +6,10 @@ import (
)
import (
"printer"
"reader"
"readline"
. "types"
"mal/src/printer"
"mal/src/reader"
"mal/src/readline"
. "mal/src/types"
)
// read

View File

@ -7,10 +7,10 @@ import (
)
import (
"printer"
"reader"
"readline"
. "types"
"mal/src/printer"
"mal/src/reader"
"mal/src/readline"
. "mal/src/types"
)
// read

View File

@ -7,11 +7,11 @@ import (
)
import (
. "env"
"printer"
"reader"
"readline"
. "types"
. "mal/src/env"
"mal/src/printer"
"mal/src/reader"
"mal/src/readline"
. "mal/src/types"
)
// read

View File

@ -7,12 +7,12 @@ import (
)
import (
"core"
. "env"
"printer"
"reader"
"readline"
. "types"
"mal/src/core"
. "mal/src/env"
"mal/src/printer"
"mal/src/reader"
"mal/src/readline"
. "mal/src/types"
)
// read

View File

@ -7,12 +7,12 @@ import (
)
import (
"core"
. "env"
"printer"
"reader"
"readline"
. "types"
"mal/src/core"
. "mal/src/env"
"mal/src/printer"
"mal/src/reader"
"mal/src/readline"
. "mal/src/types"
)
// read

View File

@ -8,12 +8,12 @@ import (
)
import (
"core"
. "env"
"printer"
"reader"
"readline"
. "types"
"mal/src/core"
. "mal/src/env"
"mal/src/printer"
"mal/src/reader"
"mal/src/readline"
. "mal/src/types"
)
// read

View File

@ -8,12 +8,12 @@ import (
)
import (
"core"
. "env"
"printer"
"reader"
"readline"
. "types"
"mal/src/core"
. "mal/src/env"
"mal/src/printer"
"mal/src/reader"
"mal/src/readline"
. "mal/src/types"
)
// read

View File

@ -8,12 +8,12 @@ import (
)
import (
"core"
. "env"
"printer"
"reader"
"readline"
. "types"
"mal/src/core"
. "mal/src/env"
"mal/src/printer"
"mal/src/reader"
"mal/src/readline"
. "mal/src/types"
)
// read

View File

@ -8,12 +8,12 @@ import (
)
import (
"core"
. "env"
"printer"
"reader"
"readline"
. "types"
"mal/src/core"
. "mal/src/env"
"mal/src/printer"
"mal/src/reader"
"mal/src/readline"
. "mal/src/types"
)
// read

View File

@ -8,12 +8,12 @@ import (
)
import (
"core"
. "env"
"printer"
"reader"
"readline"
. "types"
"mal/src/core"
. "mal/src/env"
"mal/src/printer"
"mal/src/reader"
"mal/src/readline"
. "mal/src/types"
)
// read