1.0.15.40: more portable contrib module installation
[sbcl/pkhuong.git] / contrib / asdf-module.mk
blob549928110e1fc04e1ab90e74e8efd79eb7d1952e
1 CC=gcc
3 # We need to extend flags to the C compiler and the linker
4 # here. sb-posix, sb-grovel, and sb-bsd-sockets depends upon these
5 # being set on x86_64. Setting these in their Makefiles is not
6 # adequate since, while we're building contrib, they can be compiled
7 # directly via ASDF from a non-C-aware module which has these tricky
8 # ones as dependencies.
10 UNAME:=$(shell uname -s)
12 ifeq (SunOS,$(UNAME))
13 EXTRA_CFLAGS=-D_XOPEN_SOURCE=500 -D__EXTENSIONS__
14 endif
15 ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
16 EXTRA_CFLAGS=-mno-cygwin
17 endif
19 export CC SBCL EXTRA_CFLAGS EXTRA_LDFLAGS
21 all: $(EXTRA_ALL_TARGETS)
22 $(MAKE) -C ../asdf
23 $(SBCL) --eval '(defvar *system* "$(SYSTEM)")' --load ../asdf-stub.lisp --eval '(quit)'
25 test: all
26 echo "(asdf:operate (quote asdf:load-op) :$(SYSTEM))" \
27 "(asdf:operate (quote asdf:test-op) :$(SYSTEM))" | \
28 $(SBCL) --eval '(load "../asdf/asdf")'
30 # KLUDGE / FIXME: Perhaps each module should have it's own list of
31 # files to install? At any rate, this is a portable (we hope) way of
32 # installing all the files needed -- as long as all the files are in
33 # the first level directory...
34 install: $(EXTRA_INSTALL_TARGETS)
35 cp -p $(SYSTEM).asd *.lisp *.fasl "$(BUILD_ROOT)$(INSTALL_DIR)"
36 find "$(BUILD_ROOT)$(INSTALL_DIR)" -type f -exec chown `id -u`:`id -g` {} \;