annotate binary-dist-rules.mk @ 3673:972f2d9c76ca

tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874) * binary-dist-rules.mk: only include windows dist deps of native-*, npp and msys-base if not native mingw build. change copy-windows-dist-files for same.
author John Donoghue
date Thu, 31 Jul 2014 11:23:18 -0400
parents ba8987374138
children c8546fe79bc9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 := \
3673
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
15 msys-base
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
16
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
17 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
18 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
19 native-binutils \
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
20 native-gcc \
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
21 npp
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
22 endif
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
23
3431
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
24 endif
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26 BINARY_DIST_DEPS := \
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27 $(OCTAVE_TARGET) \
3471
6a97f4d1dedb installer: Add ref BLAS/OpenBLAS install option
John Donoghue <john.donoghue@ieee.org>
parents: 3468
diff changeset
28 blas-packages \
3431
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
29 octave-forge-packages \
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
30 units \
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
31 transfig \
3435
9fcc72373e24 build stable-octave package by default
John W. Eaton <jwe@octave.org>
parents: 3433
diff changeset
32 $(WINDOWS_BINARY_DIST_DEPS)
3431
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 delete-dist-directory
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
35 echo "deleting previous dist directory..."
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
36 rm -rf $(TOP_DIR)/dist
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 make-dist-directory
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
40 echo "creating dist directory..."
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
41 mkdir -p $(OCTAVE_DIST_DIR)
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
42 endef
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
43
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
44 define copy-dist-files
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
45 echo "copying files..."
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
46 echo " octave and dependencies..."
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
47 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
48 && 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
49 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
50 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
51 echo " build_packages.m..."
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
52 cp $(TOP_DIR)/build_packages.m $(OCTAVE_DIST_DIR)/src
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
53 endef
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
54
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
55 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
56 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
57 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
58 echo " DLL files..."
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
59 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
60 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
61 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
62 echo " msys base files..."
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
63 cd $(TOP_DIR)/msys-base \
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
64 && 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
65 echo " msys extension files..."
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
66 cd $(TOP_DIR)/msys-extension \
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
67 && 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
68 echo " notepad++..."
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
69 cd $(TOP_DIR) \
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
70 && 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
71 echo " README.html..."
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
72 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
73 echo " refblas..."
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
74 cp $(OCTAVE_DIST_DIR)/bin/libblas.dll $(OCTAVE_DIST_DIR)/bin/librefblas.dll
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
75 endef
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
76 else
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
77 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
78 echo " DLL files..."
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
79 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
80 echo " README.html..."
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
81 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
82 echo " refblas..."
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
83 cp $(OCTAVE_DIST_DIR)/bin/libblas.dll $(OCTAVE_DIST_DIR)/bin/librefblas.dll
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
84 endef
972f2d9c76ca tar-dist: update dist rules for native-mingw tar-dist to work (Bug #42874)
John Donoghue
parents: 3588
diff changeset
85 endif
3442
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
86 endif
3431
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
87
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
88 define make-dist-files-writable
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
89 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
90 chmod -R u+w $(OCTAVE_DIST_DIR)
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
91 endef
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
92
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
93 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
94 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
95 define strip-dist-files
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
96 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
97 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
98 $(MXE_STRIP) $$f; \
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 else
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
102 define strip-dist-files
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
103 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
104 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
105 case "`file $$f`" in \
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
106 *script*) \
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 *executable* | *archive* | *"shared object"*) \
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
109 $(MXE_STRIP) $$f; \
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
110 ;; \
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
111 esac; \
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
112 done
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
113 endef
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
114 endif
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
115 else
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
116 define strip-dist-files
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
117 echo "not stripping files..."
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
118 endef
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
119 endif
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
120
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
121 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
122
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
123 ifeq ($(MXE_SYSTEM), gnu-linux)
3530
1e09264307e8 binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents: 3529
diff changeset
124 define install-octave-wrapper-scripts
1e09264307e8 binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents: 3529
diff changeset
125 echo "installing octave wrapper scripts..."
1e09264307e8 binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents: 3529
diff changeset
126 for f in $(OCTAVE_WRAPPER_SCRIPTS); do \
1e09264307e8 binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents: 3529
diff changeset
127 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
128 $(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
129 $(SED) < octave-wrapper.in \
1e09264307e8 binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents: 3529
diff changeset
130 -e "s|@OCTAVE_VERSION@|$($(OCTAVE_TARGET)_VERSION)|" \
1e09264307e8 binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents: 3529
diff changeset
131 -e "s|@GNUPLOT_MAJOR_MINOR_VERSION@|$(shell echo $(gnuplot_VERSION) | $(SED) -e 's/\(^[0-9]+\.[0-9]+\)/\1/')|" \
1e09264307e8 binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents: 3529
diff changeset
132 -e "s|@PROGRAM_NAME@|$$f|" > $$f-t \
1e09264307e8 binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents: 3529
diff changeset
133 && $(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
134 rm -f $(OCTAVE_DIST_DIR)/bin/$$f; \
1e09264307e8 binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents: 3529
diff changeset
135 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
136 done
1e09264307e8 binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents: 3529
diff changeset
137 endef
3431
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
138 else
3530
1e09264307e8 binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents: 3529
diff changeset
139 define install-octave-wrapper-scripts
1e09264307e8 binary-dist-rules.mk: Style fixes.
John W. Eaton <jwe@octave.org>
parents: 3529
diff changeset
140 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
141 endef
3431
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
142 endif
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
143
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
144 .PHONY: binary-dist-files
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
145 binary-dist-files: $(BINARY_DIST_DEPS)
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
146 @$(delete-dist-directory)
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
147 @$(make-dist-directory)
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
148 @$(copy-dist-files)
3442
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
149 @$(copy-windows-dist-files)
3431
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
150 @$(make-dist-files-writable)
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
151 @$(strip-dist-files)
3442
ebe73c541a16 allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents: 3435
diff changeset
152 @$(install-octave-wrapper-scripts)
3431
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
153
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
154 define make-installer-file
3571
44eb8941c35f fix make nsis-installer
John Donoghue <john.donoghue@ieee.org>
parents: 3569
diff changeset
155 if [ -f $(OCTAVE_NSI_FILE) ]; then \
44eb8941c35f fix make nsis-installer
John Donoghue <john.donoghue@ieee.org>
parents: 3569
diff changeset
156 echo "deleting previous installer script..."; \
44eb8941c35f fix make nsis-installer
John Donoghue <john.donoghue@ieee.org>
parents: 3569
diff changeset
157 rm -f $(OCTAVE_NSI_FILE); \
3569
c53ea91b338b don't delete generated installer script
John W. Eaton <jwe@octave.org>
parents: 3544
diff changeset
158 fi
3431
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
159 echo "generating installer script..."
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
160 ./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
161 echo "generating installer..."
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
162 $(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
163 endef
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
164
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
165 $(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
166 @$(make-installer-file)
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
167
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
168 .PHONY: nsis-installer
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
169 nsis-installer: $(OCTAVE_DIST_NAME)-installer.exe
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
170
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
171 define make-zip-dist
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
172 echo "generating zip file..."
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
173 cd $(TOP_DIR)/dist \
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
174 && 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
175 endef
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
176
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
177 .PHONY: zip-dist
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
178 zip-dist: binary-dist-files
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
179 @$(make-zip-dist)
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
180
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
181 define make-tar-dist
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
182 echo "generating tar file..."
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
183 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
184 && 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
185 endef
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: tar-dist
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
188 tar-dist: binary-dist-files
a7c772aa106f Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
189 @$(make-tar-dist)