Mercurial > mxe-octave
annotate binary-dist-rules.mk @ 4111:d53c492ab48d
pkg-install.py append to inst/PKG_ADD/DEL it it exists (Bug #47481)
* tools/pkg-install.py
(create_pkgadddel): append to inst/ PKG_ADD/DEL if exists
author | John Donoghue |
---|---|
date | Tue, 22 Mar 2016 08:19:53 -0400 |
parents | e5e0b3f7244b |
children | 0db86306c404 |
rev | line source |
---|---|
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
1 |
3721
933b99febcf1
Expand options to support 3 possible sources of octave
John Donoghue <john.donoghue@ieee.org>
parents:
3717
diff
changeset
|
2 ifeq ($(OCTAVE_TARGET),stable-octave) |
3431
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 |
4066 | 8 OCTAVE_DIST_DIR := $(TOP_BUILD_DIR)/dist/$(OCTAVE_DIST_NAME) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
9 |
4066 | 10 OCTAVE_NSI_FILE := $(TOP_BUILD_DIR)/dist/octave.nsi |
3431
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 := \ |
3709
c8546fe79bc9
download src files for msys packages when building Windows zip file or installer
John W. Eaton <jwe@octave.org>
parents:
3673
diff
changeset
|
15 msys-base \ |
c8546fe79bc9
download src files for msys packages when building Windows zip file or installer
John W. Eaton <jwe@octave.org>
parents:
3673
diff
changeset
|
16 msys-base-sources |
3673
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
17 |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
18 ifeq ($(MXE_NATIVE_BUILD),no) |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
19 WINDOWS_BINARY_DIST_DEPS += \ |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
20 native-binutils \ |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
21 native-gcc \ |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
22 npp |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
23 endif |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
24 |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 endif |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
26 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
27 BINARY_DIST_DEPS := \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 $(OCTAVE_TARGET) \ |
3471
6a97f4d1dedb
installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents:
3468
diff
changeset
|
29 blas-packages \ |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
30 octave-forge-packages \ |
3958
ac3abcea55e8
Add --enable-devel-tools option to configure
John Donoghue <john.donoghue@ieee.org>
parents:
3862
diff
changeset
|
31 devel-packages \ |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
32 units \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
33 transfig \ |
3435
9fcc72373e24
build stable-octave package by default
John W. Eaton <jwe@octave.org>
parents:
3433
diff
changeset
|
34 $(WINDOWS_BINARY_DIST_DEPS) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
35 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
36 define delete-dist-directory |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
37 echo "deleting previous dist directory..." |
4066 | 38 rm -rf $(TOP_BUILD_DIR)/dist |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
39 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
40 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
41 define make-dist-directory |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
42 echo "creating dist directory..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
43 mkdir -p $(OCTAVE_DIST_DIR) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
44 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
45 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
46 define copy-dist-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
47 echo "copying files..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
48 echo " octave and dependencies..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
49 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
|
50 && 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
|
51 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
|
52 cp $(TOP_DIR)/octaverc $(OCTAVE_DIST_DIR)/share/octave/site/m/startup/octaverc |
4078
e5e0b3f7244b
Dont copy src directory if binary packages enabled
John Donoghue <john.donoghue@ieee.org>
parents:
4066
diff
changeset
|
53 if [ $(ENABLE_BINARY_PACKAGES) = no ]; then \ |
e5e0b3f7244b
Dont copy src directory if binary packages enabled
John Donoghue <john.donoghue@ieee.org>
parents:
4066
diff
changeset
|
54 echo " build_packages.m..."; \ |
e5e0b3f7244b
Dont copy src directory if binary packages enabled
John Donoghue <john.donoghue@ieee.org>
parents:
4066
diff
changeset
|
55 cp $(TOP_DIR)/build_packages.m $(OCTAVE_DIST_DIR)/src; \ |
e5e0b3f7244b
Dont copy src directory if binary packages enabled
John Donoghue <john.donoghue@ieee.org>
parents:
4066
diff
changeset
|
56 fi |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
57 endef |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
58 |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
59 ifeq ($(MXE_WINDOWS_BUILD),yes) |
3673
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
60 ifeq ($(MXE_NATIVE_BUILD),no) |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
61 define copy-windows-dist-files |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
62 echo " DLL files..." |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
63 cp $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/*.dll $(OCTAVE_DIST_DIR)/bin |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
64 cp $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/*.dll $(OCTAVE_DIST_DIR)/bin |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
65 cp $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/$(build-gcc_VERSION)/*.dll $(OCTAVE_DIST_DIR)/bin |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
66 echo " msys base files..." |
4066 | 67 cd $(TOP_BUILD_DIR)/msys-base \ |
3673
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
68 && tar -c $(TAR_H_OPTION) -f - . | ( cd $(OCTAVE_DIST_DIR) ; tar xpf - ) |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
69 echo " msys extension files..." |
4066 | 70 cd $(TOP_BUILD_DIR)/msys-extension \ |
3673
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
71 && tar -c $(TAR_H_OPTION) -f - . | ( cd $(OCTAVE_DIST_DIR) ; tar xpf - ) |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
72 echo " notepad++..." |
4066 | 73 cd $(TOP_BUILD_DIR) \ |
3673
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
74 && tar -c $(TAR_H_OPTION) -f - notepad++ | ( cd $(OCTAVE_DIST_DIR) ; tar xpf - ) |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
75 echo " README.html..." |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
76 cp $(TOP_DIR)/installer-files/README.html $(OCTAVE_DIST_DIR)/ |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
77 echo " refblas..." |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
78 cp $(OCTAVE_DIST_DIR)/bin/libblas.dll $(OCTAVE_DIST_DIR)/bin/librefblas.dll |
3717
70480095b6ed
Use a bat file to run octave in windows (Bug #43164)
John Donoghue
parents:
3709
diff
changeset
|
79 echo " octave.bat..." |
70480095b6ed
Use a bat file to run octave in windows (Bug #43164)
John Donoghue
parents:
3709
diff
changeset
|
80 cp $(TOP_DIR)/installer-files/octave.bat $(OCTAVE_DIST_DIR)/ |
3817
6daa158a7018
nsis installer: use octave.vbs as laucher (Bug #41074)
John Donoghue <john.donoghue@ieee.org>
parents:
3721
diff
changeset
|
81 cp $(TOP_DIR)/installer-files/octave.vbs $(OCTAVE_DIST_DIR)/ |
4028
8803dfa40236
nsis installer: set directory to userprofile on startof octave from installer (Bug #45899)
John Donoghue
parents:
3963
diff
changeset
|
82 cp $(TOP_DIR)/installer-files/octave-firsttime.vbs $(OCTAVE_DIST_DIR)/ |
3961
808ff354717a
binary-dist-rules: fix paths of distributes .pc and .la files
John D
parents:
3958
diff
changeset
|
83 echo " updating libtool references..." |
3963
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
3961
diff
changeset
|
84 find '$(OCTAVE_DIST_DIR)/' -type f -name "*.la" \ |
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
3961
diff
changeset
|
85 -exec $(SED) -i 's|$(HOST_PREFIX)|/usr|g;s|$(BUILD_TOOLS_PREFIX)|/usr|g' {} \; ; |
3961
808ff354717a
binary-dist-rules: fix paths of distributes .pc and .la files
John D
parents:
3958
diff
changeset
|
86 echo " updating pkg-config .pc references..." |
3963
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
3961
diff
changeset
|
87 find '$(OCTAVE_DIST_DIR)/lib/pkgconfig' -type f -name "*.pc" \ |
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
3961
diff
changeset
|
88 -exec $(SED) -i 's|$(HOST_PREFIX)|/usr|g;s|$(BUILD_TOOLS_PREFIX)|/usr|g' {} \; ; |
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
3961
diff
changeset
|
89 if [ "$(ENABLE_DEVEL_TOOLS)" = "yes" ]; then \ |
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
3961
diff
changeset
|
90 cp $(TOP_DIR)/installer-files/cmdshell.bat $(OCTAVE_DIST_DIR)/; \ |
9d402d735dd1
nsis-installer: add bash window menu if devel tools enabled
John Donoghue
parents:
3961
diff
changeset
|
91 fi |
3673
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
92 endef |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
93 else |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
94 define copy-windows-dist-files |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
95 echo " DLL files..." |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
96 cp /mingw/bin/*.dll $(OCTAVE_DIST_DIR)/bin |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
97 echo " README.html..." |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
98 cp $(TOP_DIR)/installer-files/README.html $(OCTAVE_DIST_DIR)/ |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
99 echo " refblas..." |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
100 cp $(OCTAVE_DIST_DIR)/bin/libblas.dll $(OCTAVE_DIST_DIR)/bin/librefblas.dll |
3717
70480095b6ed
Use a bat file to run octave in windows (Bug #43164)
John Donoghue
parents:
3709
diff
changeset
|
101 echo " octave.bat..." |
70480095b6ed
Use a bat file to run octave in windows (Bug #43164)
John Donoghue
parents:
3709
diff
changeset
|
102 cp $(TOP_DIR)/installer-files/octave.bat $(OCTAVE_DIST_DIR)/ |
3673
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
103 endef |
972f2d9c76ca
tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents:
3588
diff
changeset
|
104 endif |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
105 endif |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
106 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
107 define make-dist-files-writable |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
108 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
|
109 chmod -R u+w $(OCTAVE_DIST_DIR) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
110 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
111 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
112 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
|
113 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
|
114 define strip-dist-files |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
115 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
|
116 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
|
117 $(MXE_STRIP) $$f; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
118 done |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
119 endef |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
120 else |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
121 define strip-dist-files |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
122 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
|
123 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
|
124 case "`file $$f`" in \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
125 *script*) \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
126 ;; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
127 *executable* | *archive* | *"shared object"*) \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
128 $(MXE_STRIP) $$f; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
129 ;; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
130 esac; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
131 done |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
132 endef |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
133 endif |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
134 else |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
135 define strip-dist-files |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
136 echo "not stripping files..." |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
137 endef |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
138 endif |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
139 |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
140 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
|
141 |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
142 ifeq ($(MXE_SYSTEM), gnu-linux) |
3530
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
143 define install-octave-wrapper-scripts |
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
144 echo "installing octave wrapper scripts..." |
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
145 for f in $(OCTAVE_WRAPPER_SCRIPTS); do \ |
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
146 mv $(OCTAVE_DIST_DIR)/bin/$$f-$($(OCTAVE_TARGET)_VERSION) \ |
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
147 $(OCTAVE_DIST_DIR)/bin/$$f-$($(OCTAVE_TARGET)_VERSION).real; \ |
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
148 $(SED) < octave-wrapper.in \ |
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
149 -e "s|@OCTAVE_VERSION@|$($(OCTAVE_TARGET)_VERSION)|" \ |
3862
c08abc3f5bf3
correctly extract first two digits of gnuplot version number
John W. Eaton <jwe@octave.org>
parents:
3817
diff
changeset
|
150 -e "s|@GNUPLOT_MAJOR_MINOR_VERSION@|$(shell echo $(gnuplot_VERSION) | $(SED) -e 's/\(^[0-9][0-9]*\.[0-9][0-9]*\)\..*/\1/')|" \ |
3530
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
151 -e "s|@PROGRAM_NAME@|$$f|" > $$f-t \ |
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
152 && $(INSTALL) -m 755 $$f-t $(OCTAVE_DIST_DIR)/bin/$$f-$($(OCTAVE_TARGET)_VERSION); \ |
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
153 rm -f $(OCTAVE_DIST_DIR)/bin/$$f; \ |
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
154 ln -s $$f-$($(OCTAVE_TARGET)_VERSION) $(OCTAVE_DIST_DIR)/bin/$$f; \ |
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
155 done |
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
156 endef |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
157 else |
3530
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
158 define install-octave-wrapper-scripts |
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
159 echo "no octave wrapper scripts to install for this system..." |
1e09264307e8
binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
3529
diff
changeset
|
160 endef |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
161 endif |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
162 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
163 .PHONY: binary-dist-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
164 binary-dist-files: $(BINARY_DIST_DEPS) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
165 @$(delete-dist-directory) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
166 @$(make-dist-directory) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
167 @$(copy-dist-files) |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
168 @$(copy-windows-dist-files) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
169 @$(make-dist-files-writable) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
170 @$(strip-dist-files) |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
171 @$(install-octave-wrapper-scripts) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
172 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
173 define make-installer-file |
3571
44eb8941c35f
fix make nsis-installer
John Donoghue <john.donoghue@ieee.org>
parents:
3569
diff
changeset
|
174 if [ -f $(OCTAVE_NSI_FILE) ]; then \ |
44eb8941c35f
fix make nsis-installer
John Donoghue <john.donoghue@ieee.org>
parents:
3569
diff
changeset
|
175 echo "deleting previous installer script..."; \ |
44eb8941c35f
fix make nsis-installer
John Donoghue <john.donoghue@ieee.org>
parents:
3569
diff
changeset
|
176 rm -f $(OCTAVE_NSI_FILE); \ |
3569
c53ea91b338b
don't delete generated installer script
John W. Eaton <jwe@octave.org>
parents:
3544
diff
changeset
|
177 fi |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
178 echo "generating installer script..." |
4066 | 179 $(TOP_DIR)/makeinst-script.sh $(OCTAVE_DIST_DIR) $(OCTAVE_NSI_FILE) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
180 echo "generating installer..." |
4066 | 181 $(TARGET)-makensis $(OCTAVE_NSI_FILE) > $(TOP_BUILD_DIR)/dist/nsis.log |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
182 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
183 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
184 $(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
|
185 @$(make-installer-file) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
186 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
187 .PHONY: nsis-installer |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
188 nsis-installer: $(OCTAVE_DIST_NAME)-installer.exe |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
189 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
190 define make-zip-dist |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
191 echo "generating zip file..." |
4066 | 192 cd $(TOP_BUILD_DIR)/dist \ |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
193 && 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
|
194 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
195 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
196 .PHONY: zip-dist |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
197 zip-dist: binary-dist-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
198 @$(make-zip-dist) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
199 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
200 define make-tar-dist |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
201 echo "generating tar file..." |
4066 | 202 cd $(TOP_BUILD_DIR)/dist \ |
3432
5fc3d674ca3a
Correctly name output of dist-tar with .tgz, not .zip, extension.
Rik <rik@octave.org>
parents:
3431
diff
changeset
|
203 && 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
|
204 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
205 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
206 .PHONY: tar-dist |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
207 tar-dist: binary-dist-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
208 @$(make-tar-dist) |