File: automake.mk

package info (click to toggle)
pspp 2.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 66,676 kB
  • sloc: ansic: 267,210; xml: 18,446; sh: 5,534; python: 2,881; makefile: 125; perl: 64
file content (85 lines) | stat: -rw-r--r-- 3,360 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#   Copyright (C) 2021 John Darrington
#
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program.  If not, see <http://www.gnu.org/licenses/>.

EXTRA_DIST+=Windows/build-dependencies \
Windows/AdvUninstLog.nsh \
Windows/MUI_EXTRAPAGES.nsh \
Windows/README \
Windows/pspp.nsi

nsis_installer_deps=$(DESTDIR)$(prefix)/share/doc/pspp/pspp.html \
	$(DESTDIR)$(prefix)/share/doc/pspp/pspp.pdf \
	Windows/AdvUninstLog.nsh Windows/MUI_EXTRAPAGES.nsh

environment_dir = $$(echo $(LDFLAGS) | $(SED) -e 's/^-L//' -e 's|/lib$$||')
libgcc_dir = $$(dirname $$($(CC) -print-libgcc-file-name))

# Note that install is a PHONY target.  Therefore this rule is always executed.
Windows/nsis-bin: install
	@$(RM) -r $@
	@$(MKDIR_P) $@
	cp $(DESTDIR)$(prefix)/bin/* $@
	cp `$(CC) -print-file-name=libwinpthread-1.dll` $@
	cp $(environment_dir)/bin/*.dll $@
	cp $(environment_dir)/bin/*.exe $@
	cp $(libgcc_dir)/*.dll $@


# Create a hash from everything in Windows/nsis-bin, but don't
# update it unless it has changed
Windows/nsis-bin-hashes: Windows/nsis-bin
	md5sum Windows/nsis-bin/* > $@,tmp
	@diff -q $@,tmp $@ || mv $@,tmp $@

# Copy Windows/nsis-bin/* into Windows/nsis-bin-stripped and then strip everything
Windows/nsis-bin-stripped: Windows/nsis-bin-hashes
	@$(MKDIR_P) $@
	cp Windows/nsis-bin/* $@
	$(STRIP) $@/*

# Create a hash from everything in Windows/nsis-bin-stripped, but don't
# update it unless it has changed
Windows/nsis-bin-stripped-hashes: Windows/nsis-bin-stripped
	md5sum Windows/nsis-bin-stripped/* > $@,tmp
	@diff -q $@,tmp $@ || mv $@,tmp $@


Windows/pspp-$(binary_width)bit-debug-install.exe: Windows/pspp.nsi  Windows/nsis-bin-hashes $(nsis_installer_deps)
	@$(top_builddir)/config.status --config | grep -e --enable-relocatable > /dev/null || \
	(echo "PSPP must be configured with --enable-relocatable"; false)
	@$(MKDIR_P) ${@D}
	makensis -Dpspp_version=$(PACKAGE_VERSION) \
	 -DDEBUG=1 \
	 -DPtrSize=$(binary_width) \
	 -DPrefix=$(DESTDIR)$(prefix) \
	 -DBinDir=$(abs_top_builddir)/Windows/nsis-bin \
	 -DEnvDir=$(environment_dir) \
	 -DSourceDir=$(abs_top_srcdir) \
	 -DOutExe=$(abs_builddir)/$@ $<

Windows/pspp-$(binary_width)bit-install.exe: Windows/pspp.nsi Windows/nsis-bin-stripped-hashes $(nsis_installer_deps)
	@$(top_builddir)/config.status --config | grep -e --enable-relocatable > /dev/null || \
	(echo "PSPP must be configured with --enable-relocatable"; false)
	@$(MKDIR_P) ${@D}
	makensis -Dpspp_version=$(PACKAGE_VERSION) \
	 -DDEBUG=0 \
	 -DPtrSize=$(binary_width) \
	 -DPrefix=$(DESTDIR)$(prefix) \
	 -DBinDir=$(abs_top_builddir)/Windows/nsis-bin-stripped \
	 -DEnvDir=$(environment_dir) \
	 -DSourceDir=$(abs_top_srcdir) \
	 -DOutExe=$(abs_builddir)/$@ $<

Windows/installers: Windows/pspp-$(binary_width)bit-install.exe Windows/pspp-$(binary_width)bit-debug-install.exe