File: doc-make.in

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 (88 lines) | stat: -rw-r--r-- 2,774 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
86
87
88
# -*- makefile -*-
## PSPP - a program for statistical analysis.
## Copyright (C) 2020 Free Software Foundation, Inc.
##
## 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/>.

# This makefile is used to generate the artifacts needed by the
# user manual.


# In order to get this makefile to work there are several programs
# which need to be found on $PATH.  Using debian 10.5 you can install
# these with:
#  apt-get install xdotool xvfb imagemagick x11-apps
# and optionally:
#  apt-get install xserver-xephyr


MKDIR_P=%MKDIR_P%
top_srcdir=%top_srcdir%
abs_builddir=%abs_builddir%
src_ui_gui_psppiredir=%src_ui_gui_psppiredir%

IMAGES=%IMAGES%

UI_FILES=%UI_FILES%

all: $(IMAGES)

## The ui files must be installed in order for screenshots to succeed
installed_ui_files=${subst src/ui/gui,$(src_ui_gui_psppiredir),$(UI_FILES)}

src/ui/gui/psppire:
	$(MAKE) -f Makefile $@

XSERVER?=xvfb

# Generate a X11 window dump based on a .grab file

# Default theme for web pages
$(top_srcdir)/doc/screenshots/%-ad.xwd: src/ui/gui/psppire $(top_srcdir)/doc/screengrab $(top_srcdir)/doc/screenshots/%.grab $(installed_ui_files)
	@$(MKDIR_P) ${dir $@}
	bash ${word 2,$^} --application=$< --topsrcdir=$(top_srcdir) --x-server=$(XSERVER) --theme=Adwaita --payload=${word 3,$^} $@

# High Contrast theme for printed manuals
$(top_srcdir)/doc/screenshots/%-hc.xwd: src/ui/gui/psppire $(top_srcdir)/doc/screengrab $(top_srcdir)/doc/screenshots/%.grab $(installed_ui_files)
	@$(MKDIR_P) ${dir $@}
	bash ${word 2,$^} --application=$< --topsrcdir=$(top_srcdir) --x-server=$(XSERVER) --theme=HighContrast --payload=${word 3,$^} $@

.PRECIOUS: $(top_srcdir)/doc/screenshots/%-ad.xwd $(top_srcdir)/doc/screenshots/%-hc.xwd


%.png: %.xwd
	convert -strip $< $@

%.eps: %.xwd
	convert -strip $< $@,tmp.eps
	sed -e '/^%%CreationDate: /d' -e '/^%%Title: /s|$(top_srcdir)/||'  $@,tmp.eps > $@

$(src_ui_gui_psppiredir)/%.ui: $(top_srcdir)/src/ui/gui/%.ui
	@$(MKDIR_P) ${dir $@}
	cp $< $@


# Syntax examples

src/ui/terminal/pspp:
	$(MAKE) -f Makefile $@

.PHONY: md5
md5:
	(cd $(top_srcdir)/doc/screenshots; md5sum *.xwd)

.PHONY: clean
clean:
	$(RM) $(IMAGES)
	$(RM) $(top_srcdir)/doc/screenshots/*.xwd