From cd4a80d3cb2cf9478be6ff8abbaf18637f269755 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Fri, 29 Jun 2018 18:43:58 +0200 Subject: [PATCH] build: add makefile, build bin/gash * bin/gash.in: New file. * bin/gash: Remove * makefile: New file. --- .gitignore | 3 +++ bin/gash | 1 - bin/gash.in | 5 +++++ makefile | 10 ++++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .gitignore delete mode 100755 bin/gash create mode 100644 bin/gash.in create mode 100644 makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..04fd279 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.go +*~ +/bin/gash diff --git a/bin/gash b/bin/gash deleted file mode 100755 index 45aae8b..0000000 --- a/bin/gash +++ /dev/null @@ -1 +0,0 @@ -guile -L $(dirname $0)/.. -e '(@ (gash gash) main)' -s $(dirname $0)/../gash/gash.scm $* diff --git a/bin/gash.in b/bin/gash.in new file mode 100644 index 0000000..40b5f04 --- /dev/null +++ b/bin/gash.in @@ -0,0 +1,5 @@ +#!@GUILE@ \ +-L . --no-auto-compile -s +!# +(setenv "SHELL" ((compose canonicalize-path car command-line))) +((@ (gash gash) main) (command-line)) diff --git a/makefile b/makefile new file mode 100644 index 0000000..915aa0a --- /dev/null +++ b/makefile @@ -0,0 +1,10 @@ +all: bin/gash + +GUILE = $(shell $(SHELL) -c "command -v guile") + +bin/gash: bin/gash.in + sed s,@GUILE@,$(GUILE), $< > $@ + chmod +x $@ + +clean: + rm -f bin/gash