~ubuntu-branches/ubuntu/lucid/graphviz/lucid-security

« back to all changes in this revision

Viewing changes to tools/expr/Makefile.nmake

  • Committer: Bazaar Package Importer
  • Author(s): Stephen M Moraco
  • Date: 2002-02-05 18:52:12 UTC
  • Revision ID: james.westby@ubuntu.com-20020205185212-8i04c70te00rc40y
Tags: upstream-1.7.16
ImportĀ upstreamĀ versionĀ 1.7.16

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * expression library
 
3
 */
 
4
 
 
5
 
 
6
.SOURCE.h : ../ast /home/erg/src/gviz/build/sgi.mips3/include
 
7
 
 
8
CCFLAGS = $(CC.OPTIMIZE) $(CC.SUFFIX.DYNAMIC:@?$(CC.DLL)??)
 
9
 
 
10
/* NOTE: -o mam bug in -I for exparse.c if exparse.y not first */
 
11
 
 
12
expr 2.0 :LIBRARY: RELEASE expr.h exlib.h exgram.h exparse.y \
 
13
                excc.c excontext.c exdata.c exeval.c exexpr.c \
 
14
                exerror.c exopen.c exrewind.c extoken.c extype.c \
 
15
                exzero.c
 
16
 
 
17
if CC.HOSTTYPE == "*.i386" || "$(-mam)" == "static*"
 
18
exeval.o : .CC.NOOPTIMIZE
 
19
end
 
20
 
 
21
exop.h : exparse.h
 
22
        {
 
23
        echo "static const char* exop[] = {"
 
24
        $(SED) -e '/^[  ]*#[    ]*define[       ][      ]*[A-Z]/!d' -e 's/^[    ]*#[    ]*define[       ]*\([A-Z0-9_]*\).*/     "\1",/'
 
25
        echo "};"
 
26
        } < $(*) > $(<)
 
27
 
 
28
$(INCLUDEDIR) :INSTALLPROTO: expr.h
 
29
 
 
30
$(INCLUDEDIR) :INSTALLDIR: exparse.h
 
31
 
 
32
YACCFIX.exparse = ex
 
33
 
 
34
/*
 
35
 * NOTE: the solaris yacc botches the yyact[] indices (large positive)
 
36
 */
 
37
 
 
38
YACC.BOTCH.PATTERN = ',[0-9][0-9][0-9][0-9][0-9]*,'
 
39
 
 
40
YACC.BOTCH.FIX : .VIRTUAL .FORCE .AFTER
 
41
        if      $(GREP) -c $(YACC.BOTCH.PATTERN) $(<<:N=*.c) >/dev/null
 
42
        then    : $(YACC) is botched : yyact indices are bogus :
 
43
                $(CP) $(<<:N=*.c:/^/O/:T=F) $(<<:N=*.c)
 
44
                $(CP) $(<<:N=*.h:/^/O/:T=F) $(<<:N=*.h)
 
45
        else    for i in $(<<:N=*.h) $(<<:N=*.c)
 
46
                do      $(SED) -e '1i\
 
47
/* : : generated by a yacc that works -- solaris take note : : */' -e '/^[      ]*#[    ]*[il][di][en][ne][t]*[         ]["0-9].*/s,,/* & */,' -e '/^[  ]*#[    ]*include[      ]*"exlib\.h"/i\
 
48
#ifndef gettxt\
 
49
#define gettxt(h,t)     (t)\
 
50
#endif' $i > O$i
 
51
                done
 
52
        fi
 
53
 
 
54
%.c %.h : %.y YACC.BOTCH.FIX
 
55
 
 
56
:SAVE: Oexparse.c Oexparse.h