Skip to content

Commit d132a51

Browse files
author
cage
committed
- simplified Makefile (used asdf to build the executable in a portable way).
1 parent 02ade8d commit d132a51

File tree

3 files changed

+10
-24
lines changed

3 files changed

+10
-24
lines changed

Makefile.am

+4-12
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,10 @@ scripts/welcome-bot.lisp
5757
dist_man1_MANS = doc/tinmop.man
5858

5959
$(PACKAGE): $(CONF_PATH_FILE) *.asd src/*
60-
if test $$(basename "$(LISP_COMPILER)") = "sbcl"; then \
61-
$(LISP_COMPILER) \
62-
--eval "(asdf:load-system '$(PACKAGE))" \
63-
--eval "(in-package main)" \
64-
--eval "(sb-ext:save-lisp-and-die \"$(PACKAGE)\" :toplevel 'main::main :executable t :purify t :save-runtime-options t)"; \
65-
else \
66-
$(LISP_COMPILER) \
67-
--eval "(asdf:load-system '$(PACKAGE))" \
68-
--eval "(in-package main)" \
69-
--eval "(asdf:make-build :tinmop :type :program :move-here #P\"./\" :epilogue-code '(main::main))" \
70-
--eval "(si:exit)"; \
71-
fi
60+
$(LISP_COMPILER) \
61+
--eval "(asdf:make '$(PACKAGE) :build-pathname \"../$(PACKAGE)\")" \
62+
--eval "(uiop:quit)"
63+
mv src/tinmop $(PACKAGE)
7264
$(CONF_PATH_FILE):
7365
grep "^;" $(CONF_PATH_FILE_IN) > $(CONF_PATH_FILE)
7466
echo -e "(in-package :config)\n" >> $(CONF_PATH_FILE);

Makefile.in

+4-12
Original file line numberDiff line numberDiff line change
@@ -1048,18 +1048,10 @@ uninstall-man: uninstall-man1
10481048

10491049

10501050
$(PACKAGE): $(CONF_PATH_FILE) *.asd src/*
1051-
if test $$(basename "$(LISP_COMPILER)") = "sbcl"; then \
1052-
$(LISP_COMPILER) \
1053-
--eval "(asdf:load-system '$(PACKAGE))" \
1054-
--eval "(in-package main)" \
1055-
--eval "(sb-ext:save-lisp-and-die \"$(PACKAGE)\" :toplevel 'main::main :executable t :purify t :save-runtime-options t)"; \
1056-
else \
1057-
$(LISP_COMPILER) \
1058-
--eval "(asdf:load-system '$(PACKAGE))" \
1059-
--eval "(in-package main)" \
1060-
--eval "(asdf:make-build :tinmop :type :program :move-here #P\"./\" :epilogue-code '(main::main))" \
1061-
--eval "(si:exit)"; \
1062-
fi
1051+
$(LISP_COMPILER) \
1052+
--eval "(asdf:make '$(PACKAGE) :build-pathname \"../$(PACKAGE)\")" \
1053+
--eval "(uiop:quit)"
1054+
mv src/tinmop $(PACKAGE)
10631055
$(CONF_PATH_FILE):
10641056
grep "^;" $(CONF_PATH_FILE_IN) > $(CONF_PATH_FILE)
10651057
echo -e "(in-package :config)\n" >> $(CONF_PATH_FILE);

tinmop.asd

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
:percent-encoding
5454
:trivial-clipboard
5555
:uiop)
56+
:entry-point "main::main"
57+
:build-operation program-op
5658
:components ((:file "package")
5759
(:file "idn")
5860
(:file "config")

0 commit comments

Comments
 (0)