summaryrefslogtreecommitdiffstats
path: root/src/devices/xditview/xditview.am
blob: 7bb32ba0a29bab1644b09b34ae3f382ad18c28b0 (plain)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Copyright (C) 2014-2020 Free Software Foundation, Inc.
#
# This file is part of groff.
#
# groff 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.
#
# groff 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/>.

GXDITVIEWSOURCES = \
  src/devices/xditview/device.c \
  src/devices/xditview/draw.c \
  src/devices/xditview/draw.h \
  src/devices/xditview/Dvi.c \
  src/devices/xditview/font.c \
  src/devices/xditview/font.h \
  src/devices/xditview/lex.c \
  src/devices/xditview/lex.h \
  src/devices/xditview/page.c \
  src/devices/xditview/page.h \
  src/devices/xditview/parse.c \
  src/devices/xditview/parse.h \
  src/devices/xditview/xditview.c \
  src/devices/xditview/device.h \
  src/devices/xditview/DviP.h \
  src/devices/xditview/Menu.h \
  src/devices/xditview/Dvi.h

GXDITVIEW_GROFF_VERSION_H=src/devices/xditview/groff_version.h

$(GXDITVIEW_GROFF_VERSION_H): $(top_srcdir)/.version
	$(AM_V_at)$(MKDIR_P) `dirname $@`
	$(AM_V_GEN)printf \
	  'const char *Version_string = "%s";\n' '@VERSION@' > $@

if WITHOUT_X11
GXDITVIEW_MAN1 =
EXTRA_DIST += $(GXDITVIEWSOURCES)
else
GXDITVIEW_MAN1 = src/devices/xditview/gxditview.1
xditview_srcdir = $(top_srcdir)/src/devices/xditview
bin_PROGRAMS += gxditview
gxditview_CPPFLAGS = $(AM_CPPFLAGS) $(X_CFLAGS) -Dlint \
  -I$(top_builddir)/src/devices/xditview
gxditview_LDADD = $(X_LIBS) $(X_PRE_LIBS) -lXaw -lXmu -lXt -lX11 \
  $(X_EXTRA_LIBS) $(LIBM) libxutil.a lib/libgnu.a
XDITVIEW_GENHDRS = \
 src/devices/xditview/GXditview-ad.h \
 $(GXDITVIEW_GROFF_VERSION_H)
gxditview_SOURCES = $(GXDITVIEWSOURCES)
nodist_gxditview_SOURCES = $(XDITVIEW_GENHDRS)
CLEANFILES += $(XDITVIEW_GENHDRS)

man1_MANS += $(GXDITVIEW_MAN1)

# Because we defined gxditview_CPPFLAGS, automake renames all of
# xditview's objects, adding an "gxditview-" prefix.
src/devices/xditview/gxditview-device.$(OBJEXT): defs.h
src/devices/xditview/gxditview-xditview.$(OBJEXT): $(XDITVIEW_GENHDRS)

src/devices/xditview/GXditview-ad.h: $(xditview_srcdir)/GXditview.ad
	$(AM_V_GEN)$(SHELL) $(xditview_srcdir)/ad2c \
	  $(xditview_srcdir)/GXditview.ad > $@
endif

EXTRA_DIST += \
  src/devices/xditview/ad2c \
  src/devices/xditview/ChangeLog \
  src/devices/xditview/DESC.in \
  src/devices/xditview/FontMap-X11 \
  src/devices/xditview/GXditview-color.ad \
  src/devices/xditview/GXditview.ad \
  src/devices/xditview/README \
  src/devices/xditview/TODO \
  src/devices/xditview/gray1.bm \
  src/devices/xditview/gray2.bm \
  src/devices/xditview/gray3.bm \
  src/devices/xditview/gray4.bm \
  src/devices/xditview/gray5.bm \
  src/devices/xditview/gray6.bm \
  src/devices/xditview/gray7.bm \
  src/devices/xditview/gray8.bm \
  src/devices/xditview/xdit.bm \
  src/devices/xditview/xdit_mask.bm \
  src/devices/xditview/gxditview.1.man

# Custom installation of GXditview.ad and GXditview-color.ad
install-data-local: install_xditview
uninstall-local: uninstall_xditview

if WITHOUT_X11
install_xditview:
uninstall_xditview:
else
install_xditview: \
  $(xditview_srcdir)/FontMap-X11 \
  $(xditview_srcdir)/GXditview.ad \
  $(xditview_srcdir)/GXditview-color.ad
	$(MKDIR_P) $(DESTDIR)$(fontdir)
	$(INSTALL_DATA) $(xditview_srcdir)/FontMap-X11 \
	  $(DESTDIR)$(fontdir)/FontMap-X11
	-test -d $(DESTDIR)$(appdefdir) \
	  || $(mkinstalldirs) $(DESTDIR)$(appdefdir)
	$(INSTALL_DATA) $(xditview_srcdir)/GXditview.ad \
	  $(DESTDIR)$(appdefdir)/GXditview
	$(INSTALL_DATA) $(xditview_srcdir)/GXditview-color.ad \
	  $(DESTDIR)$(appdefdir)/GXditview-color

uninstall_xditview:
	rm -f $(DESTDIR)$(appdefdir)/GXditview
	rm -f $(DESTDIR)$(appdefdir)/GXditview-color
	rm -f $(DESTDIR)$(fontdir)/FontMap-X11
	-rmdir $(DESTDIR)$(fontdir) 2>/dev/null

endif


# Local Variables:
# fill-column: 72
# mode: makefile-automake
# End:
# vim: set autoindent filetype=automake textwidth=72: