1.0.30.43: LVAR-MATCHES needs to deal with unnamed leaves
[sbcl/pkhuong.git] / contrib / asdf-module.mk
blob132a25af3f96e38b565236eb822c1c0ebf5270a0
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 # SBCL can't read cygwin symlinks, and cygwin likes to symlink
18 # gcc. To further complicate things, SBCL can't handle cygwin
19 # paths, either.
20 CC:=$(shell cygpath -m $(shell readlink -fn $(shell which $(CC))))
21 endif
23 export CC SBCL EXTRA_CFLAGS EXTRA_LDFLAGS
25 all: $(EXTRA_ALL_TARGETS)
26 $(MAKE) -C ../asdf
27 $(SBCL) --eval '(defvar *system* "$(SYSTEM)")' --load ../asdf-stub.lisp --eval '(quit)'
29 test: all
30 echo "(asdf:operate (quote asdf:load-op) :$(SYSTEM))" \
31 "(asdf:operate (quote asdf:test-op) :$(SYSTEM))" | \
32 $(SBCL) --eval '(load "../asdf/asdf")'
34 # KLUDGE: There seems to be no portable way to tell tar to not to
35 # preserve owner, so chown after installing for the current user.
36 install: $(EXTRA_INSTALL_TARGETS)
37 tar cf - . | ( cd "$(BUILD_ROOT)$(INSTALL_DIR)" && tar xpvf - )
38 find "$(BUILD_ROOT)$(INSTALL_DIR)" -type f -exec chown `id -u`:`id -g` {} \;