projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e026f28
)
Encode shared/static configuration into stamps to do the right thing when rebuilding
author
Clemens Fruhwirth
<clemens@endorphin.org>
Mon, 13 Oct 2008 22:15:30 +0000
(22:15 +0000)
committer
Clemens Fruhwirth
<clemens@endorphin.org>
Mon, 13 Oct 2008 22:15:30 +0000
(22:15 +0000)
libffi/Makefile
patch
|
blob
|
history
diff --git
a/libffi/Makefile
b/libffi/Makefile
index
3f71e50
..
3f674c4
100644
(file)
--- a/
libffi/Makefile
+++ b/
libffi/Makefile
@@
-57,6
+57,15
@@
LIBFFI_TARBALL := $(firstword $(wildcard libffi*.tar.gz))
LIBFFI_DIR := $(subst .tar.gz,,$(LIBFFI_TARBALL))
BINDIST_STAMPS = stamp.ffi
LIBFFI_DIR := $(subst .tar.gz,,$(LIBFFI_TARBALL))
BINDIST_STAMPS = stamp.ffi
+
+ifeq "$(BuildSharedLibs)" "YES"
+STAMP_BUILD = stamp.ffi.build-shared
+STAMP_CONFIGURE = stamp.ffi.configure-shared
+else
+STAMP_BUILD = stamp.ffi.build
+STAMP_CONFIGURE = stamp.ffi.configure
+endif
+
INSTALL_HEADERS += ffi.h
STATIC_LIB = libffi.a
INSTALL_LIBS += libHSffi.a HSffi.o
INSTALL_HEADERS += ffi.h
STATIC_LIB = libffi.a
INSTALL_LIBS += libHSffi.a HSffi.o
@@
-95,7
+104,7
@@
install all :: $(INSTALL_HEADERS) $(INSTALL_LIBS) $(INSTALL_PROGS)
# will use cygwin symbolic linkks which cannot be read by mingw gcc.
# The same trick is played by the GMP build in ../gmp.
# will use cygwin symbolic linkks which cannot be read by mingw gcc.
# The same trick is played by the GMP build in ../gmp.
-stamp.ffi.configure:
+$(STAMP_CONFIGURE):
$(RM) -rf $(LIBFFI_DIR) build
$(TAR) -zxf $(LIBFFI_TARBALL)
mv $(LIBFFI_DIR) build
$(RM) -rf $(LIBFFI_DIR) build
$(TAR) -zxf $(LIBFFI_TARBALL)
mv $(LIBFFI_DIR) build
@@
-116,15
+125,15
@@
stamp.ffi.configure:
sed -e s/soname_spec=.*/soname_spec="$(HS_DYN_LIB_NAME)"/ build/libtool.orig > build/libtool
touch $@
sed -e s/soname_spec=.*/soname_spec="$(HS_DYN_LIB_NAME)"/ build/libtool.orig > build/libtool
touch $@
-ffi.h: stamp.ffi.configure
+ffi.h: $(STAMP_CONFIGURE)
$(CP) build/include/ffi.h .
$(CP) build/include/ffi.h .
-stamp.ffi.build: stamp.ffi.configure
+$(STAMP_BUILD): $(STAMP_CONFIGURE)
$(MAKE) -C build MAKEFLAGS=
(cd build; ./libtool --mode=install cp libffi.la $(FPTOOLS_TOP_ABS)/libffi)
touch $@
$(MAKE) -C build MAKEFLAGS=
(cd build; ./libtool --mode=install cp libffi.la $(FPTOOLS_TOP_ABS)/libffi)
touch $@
-$(STATIC_LIB) $(DYNAMIC_LIBS) $(DYNAMIC_PROG): stamp.ffi.build
+$(STATIC_LIB) $(DYNAMIC_LIBS) $(DYNAMIC_PROG): $(STAMP_BUILD)
libHSffi.a libHSffi_p.a: $(STATIC_LIB)
$(CP) $(STATIC_LIB) $@
libHSffi.a libHSffi_p.a: $(STATIC_LIB)
$(CP) $(STATIC_LIB) $@
@@
-150,7
+159,7
@@
all :: $(HS_DYN_LIB_NAME)
endif
clean distclean maintainer-clean ::
endif
clean distclean maintainer-clean ::
- $(RM) -f stamp.ffi.configure stamp.ffi.build ffi.h empty.c
+ $(RM) -f stamp.ffi.* ffi.h empty.c
$(RM) -f libffi.a libffi.la $(DYNAMIC_PROG) $(DYNAMIC_LIBS) $(ORIG_DYNAMIC_LIBS)
$(RM) -rf build
$(RM) -f libffi.a libffi.la $(DYNAMIC_PROG) $(DYNAMIC_LIBS) $(ORIG_DYNAMIC_LIBS)
$(RM) -rf build