comparison binary-dist-rules.mk @ 3522:9bc3862c2091

update binary-dist rules for new way of building gcc
author John W. Eaton <jwe@octave.org>
date Fri, 14 Feb 2014 18:01:52 -0500
parents 6a6f257372b7
children 897cd1614109
comparison
equal deleted inserted replaced
3521:2aaa6f511434 3522:9bc3862c2091
8 OCTAVE_DIST_DIR := $(TOP_DIR)/dist/$(OCTAVE_DIST_NAME) 8 OCTAVE_DIST_DIR := $(TOP_DIR)/dist/$(OCTAVE_DIST_NAME)
9 9
10 OCTAVE_NSI_FILE := $(TOP_DIR)/dist/octave.nsi 10 OCTAVE_NSI_FILE := $(TOP_DIR)/dist/octave.nsi
11 11
12 ifeq ($(MXE_WINDOWS_BUILD),yes) 12 ifeq ($(MXE_WINDOWS_BUILD),yes)
13 TAR_H_OPTION := -h
13 WINDOWS_BINARY_DIST_DEPS := \ 14 WINDOWS_BINARY_DIST_DEPS := \
14 msys-base \ 15 msys-base \
16 native-binutils \
15 native-gcc \ 17 native-gcc \
16 native-binutils \
17 npp 18 npp
18 TAR_H_OPTION := -h
19 endif 19 endif
20 20
21 BINARY_DIST_DEPS := \ 21 BINARY_DIST_DEPS := \
22 $(OCTAVE_TARGET) \ 22 $(OCTAVE_TARGET) \
23 blas-packages \ 23 blas-packages \
34 define make-dist-directory 34 define make-dist-directory
35 echo "creating dist directory..." 35 echo "creating dist directory..."
36 mkdir -p $(OCTAVE_DIST_DIR) 36 mkdir -p $(OCTAVE_DIST_DIR)
37 endef 37 endef
38 38
39 ifeq ($(MXE_NATIVE_BUILD),yes)
40 define generate-dist-exclude-list
41 echo "generating (empty) lists of files to exclude..."
42 echo " native files..."
43 rm -f $(TOP_DIR)/excluded-native-files
44 touch $(TOP_DIR)/excluded-native-files
45 echo " gcc cross compiler files..."
46 rm -f $(TOP_DIR)/excluded-gcc-files
47 touch $(TOP_DIR)/excluded-gcc-files
48 endef
49 else
50 define generate-dist-exclude-list
51 echo "generating lists of files to exclude..."
52 echo " native files..."
53 echo "./$(TARGET)" > $(TOP_DIR)/excluded-native-files
54 echo "./bin/$(TARGET)-*.exe" >> $(TOP_DIR)/excluded-native-files
55 echo " gcc cross compiler files..."
56 cd $(TOP_DIR)/cross-tools/$(HOST_PREFIX) \
57 && find . -type f -o -type l | sed "s,./,," > $(TOP_DIR)/excluded-gcc-files
58 endef
59 endif
60
61 define copy-dist-files 39 define copy-dist-files
62 echo "copying files..." 40 echo "copying files..."
63 echo " octave and dependencies..." 41 echo " octave and dependencies..."
64 cd $(HOST_PREFIX) \ 42 cd $(HOST_PREFIX) \
65 && tar -c $(TAR_H_OPTION) -X $(TOP_DIR)/excluded-gcc-files -f - . | ( cd $(OCTAVE_DIST_DIR) ; tar xpf - ) 43 && tar -c $(TAR_H_OPTION) -f - . | ( cd $(OCTAVE_DIST_DIR) ; tar xpf - )
66 echo " octaverc file..." 44 echo " octaverc file..."
67 cp $(TOP_DIR)/build_packages.m $(OCTAVE_DIST_DIR)/src \ 45 cp $(TOP_DIR)/octaverc $(OCTAVE_DIST_DIR)/share/octave/site/m/startup/octaverc
68 && cp $(TOP_DIR)/octaverc $(OCTAVE_DIST_DIR)/share/octave/site/m/startup/octaverc
69 echo " build_packages.m..." 46 echo " build_packages.m..."
70 cp $(TOP_DIR)/build_packages.m $(OCTAVE_DIST_DIR)/src 47 cp $(TOP_DIR)/build_packages.m $(OCTAVE_DIST_DIR)/src
48 echo " DLL files..."
49 cp $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/*.dll $(OCTAVE_DIST_DIR)/bin
50 cp $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/*.dll $(OCTAVE_DIST_DIR)/bin
51 cp $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/4.8.2/*.dll $(OCTAVE_DIST_DIR)/bin
71 endef 52 endef
72 53
73 ifeq ($(MXE_WINDOWS_BUILD),yes) 54 ifeq ($(MXE_WINDOWS_BUILD),yes)
74 define copy-windows-dist-files 55 define copy-windows-dist-files
75 echo " libgcc_s_dw2-1.dll to bin directory" 56 echo " libgcc_s_dw2-1.dll to bin directory"
149 130
150 .PHONY: binary-dist-files 131 .PHONY: binary-dist-files
151 binary-dist-files: $(BINARY_DIST_DEPS) 132 binary-dist-files: $(BINARY_DIST_DEPS)
152 @$(delete-dist-directory) 133 @$(delete-dist-directory)
153 @$(make-dist-directory) 134 @$(make-dist-directory)
154 @$(generate-dist-exclude-list)
155 @$(copy-dist-files) 135 @$(copy-dist-files)
156 @$(copy-windows-dist-files) 136 @$(copy-windows-dist-files)
157 @$(make-dist-files-writable) 137 @$(make-dist-files-writable)
158 @$(strip-dist-files) 138 @$(strip-dist-files)
159 @$(install-octave-wrapper-scripts) 139 @$(install-octave-wrapper-scripts)