1
0
forked from alex-eg/sex

infra: pepper some GNU on top of Makefile

This commit is contained in:
2025-10-31 15:57:55 +03:00
parent e2fb4adae5
commit 22936e68e3
3 changed files with 30 additions and 1 deletions

View File

@@ -14,6 +14,15 @@ CSC_FLAGS += -K prefix -static
# error.
# -c: Stop after compilation to object files. This one is obvious.
# GNU directory variables. Command line overrides, e.g.
# make prefix=$(HOME)/.local install
# make DESTDIR=/tmp/stage prefix=/usr install
prefix = /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
INSTALL = install
INSTALL_PROGRAM = $(INSTALL)
MODULE_FLAGS = -emit-all-import-libraries -module-registration -c
# Order matters, since module check correctness on compilation
@@ -129,6 +138,12 @@ clean:
rm -f *.import.scm
rm -f *.link
rm -f sexc sex-tests sextest
$(MAKE) -C ./tests clean
$(MAKE) -C ./tests/modules clean
$(MAKE) -C ./tools/sextest clean
.PHONY: clean depclean deps run-tests sex-tests sextest check-modules check-exit-code
deps-clean:
rm -rf $(EGGS_DIR)
.PHONY: all check run-tests check-modules check-exit-code install install-strip installdirs
uninstall deps deps-update clean depsclean sex-tests sextest

View File

@@ -38,6 +38,18 @@ tree's ~.eggs~ path):
make CSC_FLAGS='-K prefix'
#+end_src
** Installation
GNU directory variables: ~prefix~, ~exec_prefix~, ~bindir~, ~DESTDIR~.
#+begin_src sh
# default installation (/usr/local/bin/)
make install
# customize the prefix (installs to ~/.local/bin)
make prefix=$(HOME)/.local install
# staged install for packaging
make DESTDIR=/tmp/stage prefix=/usr install
#+end_src
* Usage
** Summary
#+begin_src

View File

@@ -46,3 +46,5 @@ clean:
rm -f *.import.scm
rm -f *.link
rm -f sex-tests
.PHONY: clean