Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / groff / src / xditview / Imakefile.in
1 srcdir=@srcdir@
2 top_srcdir=@top_srcdir@
3 VPATH=@srcdir@
4 top_builddir=@groff_top_builddir@
5
6 version=`cat $(top_srcdir)/VERSION`
7 # No additional number if revision is zero
8 revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION`
9
10 GROFF_PREFIX = @prefix@
11 GROFF_DATADIR = $(GROFF_PREFIX)/share
12 GROFF_DATAPROGRAMDIR = $(GROFF_DATADIR)/groff
13 GROFF_DATASUBDIR = $(GROFF_DATAPROGRAMDIR)/$(version)$(revision)
14 GROFF_FONTDIR = $(GROFF_DATASUBDIR)/font
15 GROFF_LOCALFONTDIR = $(GROFF_DATAPROGRAMDIR)/site-font
16 GROFF_FONTPATH = $(GROFF_FONTDIR):$(GROFF_LOCALFONTDIR):/usr/lib/font
17 DPIS = 75 100
18
19 PROGRAMS = \
20   gxditview \
21   xtotroff
22 DEPLIBS = XawClientDepLibs
23 #if defined(HPArchitecture) && (OSMajorVersion > 9)
24 LOCAL_LIBRARIES = -L/usr/contrib/X11R6/lib XawClientLibs
25 #else
26 LOCAL_LIBRARIES = XawClientLibs
27 #endif
28 SRCS1 = \
29   $(srcdir)/xditview.c \
30   $(srcdir)/Dvi.c \
31   $(srcdir)/draw.c \
32   $(srcdir)/font.c \
33   $(srcdir)/lex.c \
34   $(srcdir)/page.c \
35   $(srcdir)/parse.c \
36   $(srcdir)/XFontName.c \
37   $(srcdir)/DviChar.c \
38   $(srcdir)/device.c
39 OBJS1 = \
40   xditview.o \
41   Dvi.o \
42   draw.o \
43   font.o \
44   lex.o \
45   page.o \
46   parse.o \
47   XFontName.o \
48   DviChar.o \
49   device.o
50 SRCS2 = \
51   $(srcdir)/xtotroff.c \
52   $(srcdir)/XFontName.c \
53   $(srcdir)/DviChar.c
54 OBJS2 = \
55   xtotroff.o \
56   XFontName.o \
57   DviChar.o
58 #if defined(HPArchitecture) && (OSMajorVersion > 9)
59 INCLUDES = \
60   -I/usr/contrib/X11R6/include \
61   -I$(TOOLKITSRC) \
62   -I$(TOP)
63 #else
64 INCLUDES = \
65   -I$(TOOLKITSRC) \
66   -I$(TOP)
67 #endif
68 MATHLIB = -lm
69 DEFINES = \
70   $(SIGNAL_DEFINES) \
71   -DFONTPATH=\"$(GROFF_FONTPATH)\" # -DX_NOT_STDC_ENV
72
73 DEVDIR = $(top_builddir)/font
74 MKINSTALLDIRS = $(top_srcdir)/mkinstalldirs
75
76 #undef ProgramTargetHelper
77 #define ProgramTargetHelper ProgramTargetHelperNoMan
78 ComplexProgramTarget_1(gxditview,$(LOCAL_LIBRARIES),$(MATHLIB))
79 InstallManPageLong($(srcdir)/gxditview,$(MANDIR),gxditview)
80 NormalProgramTarget(xtotroff,$(OBJS2),$(DEPXLIB),$(XLIB), /**/)
81
82 InstallAppDefaults(GXditview)
83
84 fonts: xtotroff $(srcdir)/DESC $(srcdir)/FontMap
85         @dir=`pwd`; \
86         fonts=`sed -e 's/[       ].*//' $(srcdir)/FontMap`; \
87         for dpi in $(DPIS); do \
88           echo Making devX$$dpi; \
89           test -d $(DEVDIR)/devX$$dpi || \
90             $(MKINSTALLDIRS) $(DEVDIR)/devX$$dpi; \
91           rm -f $(DEVDIR)/devX$$dpi/DESC; \
92           sed -e "s/res 75/res $$dpi/" $(srcdir)/DESC \
93             >$(DEVDIR)/devX$$dpi/DESC; \
94           (cd $(DEVDIR)/devX$$dpi; \
95           rm -f Makefile.sub; \
96           echo DEV=X$$dpi >Makefile.sub; \
97           echo DEVFILES=DESC $$fonts >>Makefile.sub; \
98           $$dir/xtotroff -g -r $$dpi -s 10 $(srcdir)/FontMap); \
99           echo Making devX$$dpi-12; \
100           test -d $(DEVDIR)/devX$$dpi-12 || \
101             $(MKINSTALLDIRS) $(DEVDIR)/devX$$dpi-12; \
102           rm -f $(DEVDIR)/devX$$dpi-12/DESC; \
103           sed -e "s/res 75/res $$dpi/" \
104               -e 's/unitwidth 10/unitwidth 12/' $(srcdir)/DESC \
105             >$(DEVDIR)/devX$$dpi-12/DESC; \
106           (cd $(DEVDIR)/devX$$dpi-12; \
107           rm -f Makefile.sub; \
108           echo DEV=X$$dpi-12 >Makefile.sub; \
109           echo DEVFILES=DESC $$fonts >>Makefile.sub; \
110           $$dir/xtotroff -g -r $$dpi -s 12 $(srcdir)/FontMap); \
111         done
112
113 GXditview-ad.h: $(srcdir)/GXditview.ad
114         /bin/sh $(srcdir)/ad2c $(srcdir)/GXditview.ad >GXditview-ad.h
115
116 extraclean: clean
117         -rm -f junk tmp grot old Makefile Imakefile
118
119 FORCE: