~ubuntu-branches/ubuntu/jaunty/mawk/jaunty

« back to all changes in this revision

Viewing changes to v7/Makefile.v7

  • Committer: Bazaar Package Importer
  • Author(s): James Troup
  • Date: 2001-07-18 20:40:37 UTC
  • Revision ID: james.westby@ubuntu.com-20010718204037-8hrndw7iapy9yj3w
Tags: upstream-1.3.3
ImportĀ upstreamĀ versionĀ 1.3.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
# ###################################################
 
3
# This is a makefile for mawk,
 
4
# an implementation of The AWK Programmin Language, 1988.
 
5
 
6
 
7
 
 
8
SHELL=/bin/sh
 
9
 
 
10
####################################
 
11
# user settable macros
 
12
#
 
13
 
 
14
CC = cc
 
15
#CC = gcc 
 
16
 
 
17
#CFLAGS =   -O
 
18
#CFLAGS = -O -YSYSTEM_FIVE # ultrix_vax 4.1 (no SYSTEM_FIVE on MIPS)
 
19
#CFLAGS - -O -YSYSTEM_FIVE -DHAVE_VOID_PTR=0 #ultrix 3.1
 
20
#CFLAGS = -O -f68881  # sun3 with coprocessor
 
21
CFLAGS = -O -Dvoid=int  # V7
 
22
LDFLAGS =
 
23
 
 
24
# use your favorite yacc
 
25
# if you don't change parse.y or parse2.xc
 
26
# then you can use the parse.c and parse.h provided and don't need yacc
 
27
# The parse.c and parse.h in the distribution were made with
 
28
# Berkeley yacc
 
29
#
 
30
YACC=yacc -d
 
31
#YACC=bison -dy
 
32
#YACC=byacc -d
 
33
 
 
34
#######################################
 
35
 
 
36
# The following stuff is for compilers whose symbols are unique only
 
37
# to 7 (external) or 8 (local) characters.
 
38
 
 
39
.SUFFIXES :
 
40
.SUFFIXES : .o .c .cl .y .h .hl
 
41
 
 
42
.cl.o:
 
43
        hash8 -r va_alist -r va_start encode TABLE <$< >$*.c
 
44
        $(CC) $(CFLAGS) $(CFLAGS2) -c $*.c 2>&1 | hash8 decode TABLE
 
45
        rm $*.c
 
46
 
 
47
.c.o:
 
48
        $(CC) $(CFLAGS) $(CFLAGS2) -c $*.c 2>&1 | hash8 decode TABLE
 
49
 
 
50
.cl.c:
 
51
        hash8 -r va_alist -r va_start encode TABLE <$< >$*.c
 
52
 
 
53
.hl.h:
 
54
        hash8 -r va_alist -r va_start encode TABLE <$< >$@
 
55
 
 
56
#######################################
 
57
 
 
58
O=parse.o scan.o memory.o main.o hash.o execute.o code.o\
 
59
  da.o error.o init.o bi_vars.o cast.o print.o bi_funct.o\
 
60
  kw.o jmp.o array.o field.o  split.o re_cmpl.o zmalloc.o\
 
61
  fin.o files.o  scancode.o matherr.o  fcall.o version.o
 
62
 
 
63
REXP_O=rexp/rexp.o rexp/rexp0.o rexp/rexp1.o rexp/rexp2.o\
 
64
    rexp/rexp3.o rexp/rexpdb.o
 
65
 
 
66
 
 
67
mawk_and_test :  mawk  mawk_test  fpe_test
 
68
 
 
69
mawk : $(O)  rexp/regexp.a
 
70
        $(CC) $(LDFLAGS) -o mawk $(O) -lm rexp/regexp.a
 
71
 
 
72
mawk_test :  mawk  # test that we have a sane mawk
 
73
        @cp mawk test/mawk
 
74
        cd test ; ./mawk_test.v7
 
75
        @rm test/mawk
 
76
 
 
77
fpe_test :  mawk # test FPEs are handled OK
 
78
        @cp mawk test/mawk
 
79
        @echo ; echo testing floating point exception handling
 
80
        cd test ; ./fpe_test.v7
 
81
        @rm test/mawk
 
82
 
 
83
rexp/regexp.a :  $(REXP_O)
 
84
        cd  rexp ; make  CC=$(CC)
 
85
 
 
86
 
 
87
parse.cl  : parse.y  parse2.xcl
 
88
        @echo  expect 4 shift/reduce conflicts
 
89
        $(YACC)  parse.y
 
90
        cat  y.tab.c parse2.xcl > parse.cl && rm y.tab.c
 
91
        -if cmp -s y.tab.h parse.hl ;\
 
92
           then rm y.tab.h ;\
 
93
           else mv y.tab.h parse.hl ; fi
 
94
 
 
95
scancode.cl :  makescan.cl  scan.h
 
96
        hash8 -r va_alist -r va_start encode TABLE <makescan.cl >makescan.c
 
97
        $(CC) -o makescan.exe  $(CFLAGS) makescan.c
 
98
        ./makescan.exe > scancode.cl
 
99
        rm makescan.c makescan.exe
 
100
 
 
101
clean :
 
102
        rm -f *.o rexp/*.o rexp/regexp.a test/mawk core test/core
 
103
 
 
104
 
 
105
# output from  mawk -f deps.awk *.c
 
106
array.o : bi_vars.h sizes.h zmalloc.h memory.h types.h field.h mawk.h config.h symtype.h config/Idefault.h
 
107
bi_funct.o : fin.h bi_vars.h sizes.h memory.h zmalloc.h regexp.h types.h field.h repl.h files.h bi_funct.h mawk.h config.h symtype.h init.h config/Idefault.h
 
108
bi_vars.o : bi_vars.h sizes.h memory.h zmalloc.h types.h field.h mawk.h config.h symtype.h config/Idefault.h init.h
 
109
cast.o : parse.h sizes.h memory.h zmalloc.h types.h field.h scan.h repl.h mawk.h config.h symtype.h config/Idefault.h
 
110
code.o : sizes.h memory.h zmalloc.h types.h field.h code.h jmp.h mawk.h config.h symtype.h config/Idefault.h init.h
 
111
da.o : sizes.h memory.h zmalloc.h types.h field.h repl.h code.h bi_funct.h mawk.h config.h symtype.h config/Idefault.h
 
112
error.o : parse.h bi_vars.h sizes.h types.h scan.h mawk.h config.h symtype.h config/Idefault.h
 
113
execute.o : bi_vars.h fin.h sizes.h memory.h zmalloc.h regexp.h types.h field.h code.h repl.h bi_funct.h mawk.h config.h symtype.h config/Idefault.h
 
114
fcall.o : sizes.h memory.h zmalloc.h types.h code.h mawk.h config.h symtype.h config/Idefault.h
 
115
field.o : parse.h bi_vars.h sizes.h memory.h zmalloc.h regexp.h types.h field.h scan.h repl.h mawk.h config.h symtype.h config/Idefault.h init.h
 
116
files.o : fin.h sizes.h memory.h zmalloc.h types.h files.h mawk.h config.h config/Idefault.h
 
117
fin.o : parse.h fin.h bi_vars.h sizes.h memory.h zmalloc.h types.h field.h scan.h mawk.h config.h symtype.h config/Idefault.h
 
118
hash.o : sizes.h memory.h zmalloc.h types.h mawk.h config.h symtype.h config/Idefault.h
 
119
init.o : bi_vars.h sizes.h memory.h zmalloc.h types.h field.h code.h mawk.h config.h symtype.h config/Idefault.h init.h
 
120
jmp.o : sizes.h memory.h zmalloc.h types.h code.h mawk.h jmp.h config.h symtype.h config/Idefault.h init.h
 
121
kw.o : parse.h sizes.h types.h mawk.h config.h symtype.h config/Idefault.h init.h
 
122
main.o : fin.h bi_vars.h sizes.h memory.h zmalloc.h types.h field.h code.h files.h mawk.h config.h symtype.h config/Idefault.h init.h
 
123
makescan.o : parse.h scan.h symtype.h
 
124
matherr.o : sizes.h types.h mawk.h config.h config/Idefault.h
 
125
memory.o : sizes.h memory.h zmalloc.h types.h mawk.h config.h config/Idefault.h
 
126
parse.o : bi_vars.h sizes.h memory.h zmalloc.h types.h field.h code.h files.h bi_funct.h mawk.h jmp.h config.h symtype.h config/Idefault.h
 
127
print.o : bi_vars.h parse.h sizes.h memory.h zmalloc.h types.h field.h scan.h files.h bi_funct.h mawk.h config.h symtype.h config/Idefault.h
 
128
re_cmpl.o : parse.h sizes.h memory.h zmalloc.h regexp.h types.h scan.h repl.h mawk.h config.h symtype.h config/Idefault.h
 
129
scan.o : parse.h fin.h sizes.h memory.h zmalloc.h types.h field.h scan.h repl.h code.h files.h mawk.h config.h symtype.h config/Idefault.h init.h
 
130
split.o : bi_vars.h parse.h sizes.h memory.h zmalloc.h regexp.h types.h field.h scan.h bi_funct.h mawk.h config.h symtype.h config/Idefault.h
 
131
version.o : patchlev.h sizes.h types.h mawk.h config.h config/Idefault.h
 
132
zmalloc.o : sizes.h zmalloc.h types.h mawk.h config.h config/Idefault.h