mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2024-11-23 20:09:41 +00:00
6cf4f15970
The install of headers excludes the support directory, so these chmod calls fail on non-existent directories, as seen on this bot: http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_build/2801/console This reverts commit r224300. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224317 91177308-0d34-0410-b5e6-96231b3b80d8
57 lines
1.4 KiB
Makefile
57 lines
1.4 KiB
Makefile
##
|
|
# libc++ Makefile
|
|
##
|
|
|
|
SRCDIRS = .
|
|
DESTDIR = $(DSTROOT)
|
|
|
|
OBJROOT=.
|
|
SYMROOT=.
|
|
export TRIPLE=-apple-
|
|
|
|
ifeq (,$(RC_INDIGO))
|
|
INSTALL_PREFIX=""
|
|
else
|
|
INSTALL_PREFIX="$(SDKROOT)"
|
|
endif
|
|
INSTALL_DIR=$(DSTROOT)/$(INSTALL_PREFIX)
|
|
|
|
.PHONY: help installsrc clean installheaders install
|
|
|
|
help::
|
|
@echo "Use make install DSTROOT=<destination>"
|
|
|
|
installsrc:: $(SRCROOT)
|
|
|
|
ditto $(SRCDIRS)/include $(SRCROOT)/include
|
|
ditto $(SRCDIRS)/lib $(SRCROOT)/lib
|
|
ditto $(SRCDIRS)/src $(SRCROOT)/src
|
|
ditto $(SRCDIRS)/Makefile $(SRCROOT)/Makefile
|
|
|
|
clean::
|
|
|
|
# The installheaders target is used by clang's runtime/libcxx makefile.
|
|
installheaders::
|
|
mkdir -p $(HEADER_DIR)/c++/v1/ext
|
|
(cd $(SRCDIRS)/include && \
|
|
tar cf - --exclude=".*" --exclude=support \
|
|
--exclude=CMakeLists.txt *) | \
|
|
(cd $(HEADER_DIR)/c++/v1 && tar xf -)
|
|
chmod 755 $(HEADER_DIR)/c++/v1
|
|
chmod 644 $(HEADER_DIR)/c++/v1/*
|
|
chmod 755 $(HEADER_DIR)/c++/v1/ext
|
|
chmod 644 $(HEADER_DIR)/c++/v1/ext/*
|
|
chmod 755 $(HEADER_DIR)/c++/v1/experimental
|
|
chmod 644 $(HEADER_DIR)/c++/v1/experimental/*
|
|
|
|
install::
|
|
|
|
cd lib && ./buildit
|
|
ditto lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib
|
|
cd lib && dsymutil -o $(SYMROOT)/libc++.1.dylib.dSYM \
|
|
$(SYMROOT)/usr/lib/libc++.1.dylib
|
|
mkdir -p $(INSTALL_DIR)/usr/lib
|
|
strip -S -o $(INSTALL_DIR)/usr/lib/libc++.1.dylib \
|
|
$(SYMROOT)/usr/lib/libc++.1.dylib
|
|
cd $(INSTALL_DIR)/usr/lib && ln -s libc++.1.dylib libc++.dylib
|