Mercurial > mxe-octave
annotate 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 |
rev | line source |
---|---|
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
1 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
2 ifeq ($(STABLE_BUILD),yes) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
3 OCTAVE_DIST_NAME := octave-$($(OCTAVE_TARGET)_VERSION) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
4 else |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
5 OCTAVE_DIST_NAME := octave-$(DATE) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
6 endif |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
7 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
8 OCTAVE_DIST_DIR := $(TOP_DIR)/dist/$(OCTAVE_DIST_NAME) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
9 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
10 OCTAVE_NSI_FILE := $(TOP_DIR)/dist/octave.nsi |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
11 |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
12 ifeq ($(MXE_WINDOWS_BUILD),yes) |
3522
9bc3862c2091
update binary-dist rules for new way of building gcc
John W. Eaton <jwe@octave.org>
parents:
3517
diff
changeset
|
13 TAR_H_OPTION := -h |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
14 WINDOWS_BINARY_DIST_DEPS := \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
15 msys-base \ |
3522
9bc3862c2091
update binary-dist rules for new way of building gcc
John W. Eaton <jwe@octave.org>
parents:
3517
diff
changeset
|
16 native-binutils \ |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
17 native-gcc \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
18 npp |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
19 endif |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
20 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
21 BINARY_DIST_DEPS := \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
22 $(OCTAVE_TARGET) \ |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3468
diff
changeset
|
23 blas-packages \ |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
24 octave-forge-packages \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 units \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
26 transfig \ |
3435
9fcc72373e24
build stable-octave package by default
John W. Eaton <jwe@octave.org>
parents:
3433
diff
changeset
|
27 $(WINDOWS_BINARY_DIST_DEPS) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
29 define delete-dist-directory |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
30 echo "deleting previous dist directory..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
31 rm -rf $(TOP_DIR)/dist |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
32 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
33 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
34 define make-dist-directory |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
35 echo "creating dist directory..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
36 mkdir -p $(OCTAVE_DIST_DIR) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
37 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
38 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
39 define copy-dist-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
40 echo "copying files..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
41 echo " octave and dependencies..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
42 cd $(HOST_PREFIX) \ |
3522
9bc3862c2091
update binary-dist rules for new way of building gcc
John W. Eaton <jwe@octave.org>
parents:
3517
diff
changeset
|
43 && tar -c $(TAR_H_OPTION) -f - . | ( cd $(OCTAVE_DIST_DIR) ; tar xpf - ) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
44 echo " octaverc file..." |
3522
9bc3862c2091
update binary-dist rules for new way of building gcc
John W. Eaton <jwe@octave.org>
parents:
3517
diff
changeset
|
45 cp $(TOP_DIR)/octaverc $(OCTAVE_DIST_DIR)/share/octave/site/m/startup/octaverc |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
46 echo " build_packages.m..." |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
47 cp $(TOP_DIR)/build_packages.m $(OCTAVE_DIST_DIR)/src |
3522
9bc3862c2091
update binary-dist rules for new way of building gcc
John W. Eaton <jwe@octave.org>
parents:
3517
diff
changeset
|
48 echo " DLL files..." |
9bc3862c2091
update binary-dist rules for new way of building gcc
John W. Eaton <jwe@octave.org>
parents:
3517
diff
changeset
|
49 cp $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/*.dll $(OCTAVE_DIST_DIR)/bin |
9bc3862c2091
update binary-dist rules for new way of building gcc
John W. Eaton <jwe@octave.org>
parents:
3517
diff
changeset
|
50 cp $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/*.dll $(OCTAVE_DIST_DIR)/bin |
9bc3862c2091
update binary-dist rules for new way of building gcc
John W. Eaton <jwe@octave.org>
parents:
3517
diff
changeset
|
51 cp $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/4.8.2/*.dll $(OCTAVE_DIST_DIR)/bin |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
52 endef |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
53 |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
54 ifeq ($(MXE_WINDOWS_BUILD),yes) |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
55 define copy-windows-dist-files |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
56 echo " libgcc_s_dw2-1.dll to bin directory" |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
57 cd $(OCTAVE_DIST_DIR) \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
58 && cp lib/gcc/i686-pc-mingw32/libgcc_s_dw2-1.dll bin |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
59 echo " msys base files..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
60 cd $(TOP_DIR)/msys-base \ |
3468
24356fc32aa0
* binary-dist-rules.mk: Only use -h tar option for Windows builds.
John W. Eaton <jwe@octave.org>
parents:
3467
diff
changeset
|
61 && tar -c $(TAR_H_OPTION) -f - . | ( cd $(OCTAVE_DIST_DIR) ; tar xpf - ) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
62 echo " msys extension files..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
63 cd $(TOP_DIR)/msys-extension \ |
3468
24356fc32aa0
* binary-dist-rules.mk: Only use -h tar option for Windows builds.
John W. Eaton <jwe@octave.org>
parents:
3467
diff
changeset
|
64 && tar -c $(TAR_H_OPTION) -f - . | ( cd $(OCTAVE_DIST_DIR) ; tar xpf - ) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
65 echo " notepad++..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
66 cd $(TOP_DIR) \ |
3468
24356fc32aa0
* binary-dist-rules.mk: Only use -h tar option for Windows builds.
John W. Eaton <jwe@octave.org>
parents:
3467
diff
changeset
|
67 && tar -c $(TAR_H_OPTION) -f - notepad++ | ( cd $(OCTAVE_DIST_DIR) ; tar xpf - ) |
3453
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3446
diff
changeset
|
68 echo " README.html..." |
70b110956a4e
nsis-installer: Use custom page for shortcuts and install for all users.
John Donoghue <john.donoghue@ieee.org>
parents:
3446
diff
changeset
|
69 cp $(TOP_DIR)/installer-files/README.html $(OCTAVE_DIST_DIR)/ |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3468
diff
changeset
|
70 echo " refblas..." |
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3468
diff
changeset
|
71 cp $(OCTAVE_DIST_DIR)/bin/libblas.dll $(OCTAVE_DIST_DIR)/bin/librefblas.dll |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
72 endef |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
73 endif |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
74 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
75 define make-dist-files-writable |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
76 echo "making all dist files writable by user..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
77 chmod -R u+w $(OCTAVE_DIST_DIR) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
78 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
79 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
80 ifeq ($(STRIP_DIST_FILES),yes) |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
81 ifeq ($(MXE_WINDOWS_BUILD),yes) |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
82 define strip-dist-files |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
83 echo "stripping files..." |
3446
f827586fef9c
* binary-dist-rules.mk: don't use $(shell ...) in shell for loop
John W. Eaton <jwe@octave.org>
parents:
3444
diff
changeset
|
84 for f in `find $(OCTAVE_DIST_DIR) -name '*.dll' -o -name '*.exe'`; do \ |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
85 $(MXE_STRIP) $$f; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
86 done |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
87 endef |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
88 else |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
89 define strip-dist-files |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
90 echo "stripping files..." |
3446
f827586fef9c
* binary-dist-rules.mk: don't use $(shell ...) in shell for loop
John W. Eaton <jwe@octave.org>
parents:
3444
diff
changeset
|
91 for f in `find $(OCTAVE_DIST_DIR) -type f -a -perm /a+x`; do \ |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
92 case "`file $$f`" in \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
93 *script*) \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
94 ;; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
95 *executable* | *archive* | *"shared object"*) \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
96 $(MXE_STRIP) $$f; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
97 ;; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
98 esac; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
99 done |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
100 endef |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
101 endif |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
102 else |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
103 define strip-dist-files |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
104 echo "not stripping files..." |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
105 endef |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
106 endif |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
107 |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
108 OCTAVE_WRAPPER_SCRIPTS = octave octave-cli octave-config |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
109 |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
110 ifeq ($(MXE_SYSTEM), gnu-linux) |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
111 define install-octave-wrapper-scripts |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
112 echo "installing octave wrapper scripts..." |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
113 for f in $(OCTAVE_WRAPPER_SCRIPTS); do \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
114 mv $(OCTAVE_DIST_DIR)/bin/$$f-$($(OCTAVE_TARGET)_VERSION) \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
115 $(OCTAVE_DIST_DIR)/bin/$$f-$($(OCTAVE_TARGET)_VERSION).real; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
116 $(SED) < octave-wrapper.in \ |
3466
cf594095a7dc
* octave-wrapper.in: Use version in real program name.
John W. Eaton <jwe@octave.org>
parents:
3465
diff
changeset
|
117 -e "s|@OCTAVE_VERSION@|$($(OCTAVE_TARGET)_VERSION)|" \ |
cf594095a7dc
* octave-wrapper.in: Use version in real program name.
John W. Eaton <jwe@octave.org>
parents:
3465
diff
changeset
|
118 -e "s|@GNUPLOT_MAJOR_MINOR_VERSION@|$(shell echo $(gnuplot_VERSION) | $(SED) -e 's/\(^[0-9]+\.[0-9]+\)/\1/')|" \ |
cf594095a7dc
* octave-wrapper.in: Use version in real program name.
John W. Eaton <jwe@octave.org>
parents:
3465
diff
changeset
|
119 -e "s|@PROGRAM_NAME@|$$f|" > $$f-t \ |
3465
32b09e905e9e
ensure octave wrapper programs are executable
John W. Eaton <jwe@octave.org>
parents:
3464
diff
changeset
|
120 && $(INSTALL) -m 755 $$f-t $(OCTAVE_DIST_DIR)/bin/$$f-$($(OCTAVE_TARGET)_VERSION); \ |
3464
23efd381ae4a
binary-dist-rules.mk: Ensure that octave, octave-config, and
John W. Eaton <jwe@octave.org>
parents:
3453
diff
changeset
|
121 rm -f $(OCTAVE_DIST_DIR)/bin/$$f; \ |
23efd381ae4a
binary-dist-rules.mk: Ensure that octave, octave-config, and
John W. Eaton <jwe@octave.org>
parents:
3453
diff
changeset
|
122 ln -s $$f-$($(OCTAVE_TARGET)_VERSION) $(OCTAVE_DIST_DIR)/bin/$$f; \ |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
123 done |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
124 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
125 else |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
126 define install-octave-wrapper-scripts |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
127 echo "no octave wrapper scripts to install for this system..." |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
128 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
129 endif |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
130 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
131 .PHONY: binary-dist-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
132 binary-dist-files: $(BINARY_DIST_DEPS) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
133 @$(delete-dist-directory) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
134 @$(make-dist-directory) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
135 @$(copy-dist-files) |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
136 @$(copy-windows-dist-files) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
137 @$(make-dist-files-writable) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
138 @$(strip-dist-files) |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
139 @$(install-octave-wrapper-scripts) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
140 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
141 define make-installer-file |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
142 echo "generating installer script..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
143 ./makeinst-script.sh $(OCTAVE_DIST_DIR) $(OCTAVE_NSI_FILE) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
144 echo "generating installer..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
145 $(TARGET)-makensis $(OCTAVE_NSI_FILE) > $(TOP_DIR)/dist/nsis.log |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
146 echo "deleting installer script..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
147 rm -f $(OCTAVE_NSI_FILE) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
148 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
149 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
150 $(OCTAVE_DIST_NAME)-installer.exe: nsis binary-dist-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
151 @$(make-installer-file) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
152 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
153 .PHONY: nsis-installer |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
154 nsis-installer: $(OCTAVE_DIST_NAME)-installer.exe |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
155 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
156 define make-zip-dist |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
157 echo "generating zip file..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
158 cd $(TOP_DIR)/dist \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
159 && zip -q -9 -r $(OCTAVE_DIST_NAME).zip $(OCTAVE_DIST_NAME) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
160 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
161 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
162 .PHONY: zip-dist |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
163 zip-dist: binary-dist-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
164 @$(make-zip-dist) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
165 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
166 define make-tar-dist |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
167 echo "generating tar file..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
168 cd $(TOP_DIR)/dist \ |
3432
5fc3d674ca3a
Correctly name output of dist-tar with .tgz, not .zip, extension.
Rik <rik@octave.org>
parents:
3431
diff
changeset
|
169 && tar -c -z -f $(OCTAVE_DIST_NAME).tgz $(OCTAVE_DIST_NAME) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
170 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
171 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
172 .PHONY: tar-dist |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
173 tar-dist: binary-dist-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
174 @$(make-tar-dist) |