f93d2a136b3101971d93eaa177265ec6900ea64a
[oweals/cde.git] / cde / programs / dthelp / parser / canon1 / build / Imakefile
1 XCOMM $XConsortium: Imakefile /main/3 1995/11/08 09:24:32 rswiston $
2 /* build Imakefile */
3
4 ARCCMD = arc u
5 UNARCCMD = arc x
6 ARCDELCMD = arc d
7
8 HELPTAG       = ..
9 HELPTAGSRC    = $(HELPTAG)/helptag
10 HELPPARSERSRC = $(HELPTAG)/parser
11 HELPELTDEFSRC = $(HELPTAG)/eltdef
12 HELPDTDFILE   = $(HELPTAGSRC)/hptag.dtd
13 HELPUTILSRC   = $(HELPTAG)/util
14 HELPBUILDSRC  = $(HELPTAG)/build
15 HELPUTILLIB   = $(HELPTAG)/util/libutil.a
16
17 INCLUDES = -I. -I$(HELPUTILSRC)
18
19 SRCS = \
20         build.c buildutl.c eltree.c except.c fsa.c out.c param.c \
21         scan.c sref.c tree.c
22
23 OBJS = \
24         build.o buildutl.o eltree.o except.o fsa.o out.o param.o \
25         scan.o sref.o tree.o
26
27 CHPRODS = context.h delim.h
28 CCPRODS = case.c
29
30 BHPRODS = arc.h dtd.h entity.h
31 BCPRODS =
32
33 CTRASH  = error delim.dat
34 BTRASH  = error template
35
36 CPRODS  = $(CHPRODS) $(CCPRODS)
37 BPRODS  = $(BHPRODS) $(BCPRODS)
38 TRASH   = error delim.dat template
39
40 PRODUCTS = $(CPRODS) $(BPRODS)
41
42 LOCAL_LIBRARIES = $(HELPUTILLIB)
43
44 /* Don't use shared libs for hp */
45 #ifdef HPArchitecture
46 #if OSMajorVersion > 7
47 EXTRA_LOAD_FLAGS = -Wl,-a archive
48 #endif
49 #endif
50
51 #ifdef SunArchitecture
52 .NO_PARALLEL:
53 #endif
54
55 all:: $(PRODUCTS)
56
57 $(BPRODS): build $(HELPDTDFILE)
58         $(RM) $(BPRODS) $(BTRASH)
59         ./build -m < $(HELPDTDFILE)
60
61 NormalLibraryObjectRule()
62 NormalProgramTarget(build,$(OBJS),delim.h $(LOCAL_LIBRARIES),$(LOCAL_LIBRARIES),)
63
64 $(CPRODS):  $(HELPUTILSRC)/context $(HELPTAGSRC)/delim.bld context.dat
65         $(RM) $(CPRODS) $(CTRASH)
66         /* get application-specific delim.dat */
67         $(CP) $(HELPTAGSRC)/delim.bld delim.dat
68         $(HELPUTILSRC)/context sparse
69
70 $(HELPUTILSRC)/context:
71         cd $(HELPUTILSRC); make context
72
73
74 arc package :
75         if exist util.arc $(CP) build.arc old.arc
76         $(ARCCMD) util.arc *.c *.h makefile
77
78 unarc dearc :
79         $(UNARCCMD) util.arc
80
81 clean::
82         $(RM) $(PRODUCTS) $(TRASH)
83
84 depend:: $(SRCS)
85 DependTarget()
86
87 includes:: $(PRODUCTS)