Skip to content

Commit

Permalink
Merge pull request #1324 from braddr/install
Browse files Browse the repository at this point in the history
draft install target
  • Loading branch information
yebblies committed Jun 3, 2013
2 parents cee7de0 + 4221421 commit f5c2417
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions posix.mak
Expand Up @@ -56,6 +56,7 @@ endif
override PIC:=$(if $(PIC),-fPIC,)

# Configurable stuff that's rarely edited
INSTALL_DIR = ../install
DRUNTIME_PATH = ../druntime
ZIPFILE = phobos.zip
ROOT_OF_THEM_ALL = generated
Expand Down Expand Up @@ -251,6 +252,8 @@ debug :
unittest :
$(MAKE) --no-print-directory -f $(MAKEFILE) OS=$(OS) MODEL=$(MODEL) BUILD=debug unittest
$(MAKE) --no-print-directory -f $(MAKEFILE) OS=$(OS) MODEL=$(MODEL) BUILD=release unittest
install :
$(MAKE) --no-print-directory -f $(MAKEFILE) OS=$(OS) MODEL=$(MODEL) BUILD=release INSTALL_DIR=$(INSTALL_DIR) DMD=$(DMD) install2
else
# This branch is normally taken in recursive builds. All we need to do
# is set the default build to $(BUILD) (which is either debug or
Expand Down Expand Up @@ -315,8 +318,15 @@ clean :
zip :
zip $(ZIPFILE) $(MAKEFILE) $(ALL_D_FILES) $(ALL_C_FILES) win32.mak win64.mak

install : release
sudo cp $(LIB) /usr/lib/
install2 : release
mkdir -p $(INSTALL_DIR)/lib
cp $(LIB) $(INSTALL_DIR)/lib/
mkdir -p $(INSTALL_DIR)/import/etc
mkdir -p $(INSTALL_DIR)/import/std
cp crc32.d $(INSTALL_DIR)/import/
cp -r std/* $(INSTALL_DIR)/import/std/
cp -r etc/* $(INSTALL_DIR)/import/etc/
cp LICENSE_1_0.txt $(INSTALL_DIR)/phobos-LICENSE.txt

$(DRUNTIME) :
$(MAKE) -C $(DRUNTIME_PATH) -f posix.mak MODEL=$(MODEL)
Expand Down

0 comments on commit f5c2417

Please sign in to comment.