File: Makefile.old

package info (click to toggle)
graphviz 2.8-3%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 20,480 kB
  • ctags: 22,071
  • sloc: ansic: 163,260; cpp: 36,565; sh: 25,024; yacc: 2,358; tcl: 1,808; makefile: 1,745; cs: 805; perl: 801; ml: 649; awk: 160; lex: 153; python: 105; ruby: 32; php: 6
file content (57 lines) | stat: -rw-r--r-- 1,515 bytes parent folder | download | duplicates (6)
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
#   libexpr.a (short version) make file
#   Written by Emden R. Gansner (1 Mar 2001)
ROOT=../..
include $(ROOT)/Config.mk
include $(ROOT)/makearch/$(ARCH)

LOC_INCDIR=../include
LOC_LIBDIR=../lib

INCS = -I. -I$(LOC_INCDIR) -I$(ROOT) -I../cdt

DEFINES = -DHAVE_CONFIG_H

OBJS = exparse.o excc.o excontext.o exdata.o exeval.o exexpr.o \
       exerror.o exopen.o exrewind.o extoken.o extype.o exzero.o

all : install

install : libexpr.a
	$(MKPATH) $(LOC_INCDIR)
	cp expr.h exparse.h $(LOC_INCDIR)
	$(MKPATH) $(LOC_LIBDIR)
	cp libexpr.a $(LOC_LIBDIR)
	-(ranlib $(LOC_LIBDIR)/libexpr.a; exit 0) >/dev/null 2>&1

libexpr.a : $(OBJS)
	$(AR) cr libexpr.a $(OBJS)

OBJS :  exlib.h expr.h exparse.h

exparse.o : exparse.c exgram.h exparse.h

exeval.o exlexname.o : exop.h

exparse.c exparse.h : exparse.y
	$(YACC) -dtv exparse.y
	$(SED) "s/yy/ex/g" < y.tab.c | $(SED) "s/YY/EX/g" > tmp
	$(SED) "s/printf(/sfprintf(sfstderr,/g" < tmp > exparse.c
	echo "#ifndef _EXPARSE_H" > exparse.h
	echo "#define _EXPARSE_H" >> exparse.h
	$(SED) "s/yy/ex/g" < y.tab.h | $(SED) "s/YY/EX/g" >> exparse.h
	echo "#endif /* _EXPARSE_H */" >> exparse.h
	$(RM) tmp y.tab.c y.tab.h

exop.h : exparse.h
	echo "static const char* exop[] = {" > exop.h
	echo "	\"MINTOKEN\"," >> exop.h
	$(SED) -e '1,/MINTOKEN/d' -e '/^[ 	]*#[ 	]*define[ 	][ 	]*[A-Z]/!d' -e 's/^[ 	]*#[ 	]*define[ 	]*\([A-Z0-9_]*\).*/	"\1",/' < exparse.h >> exop.h
	echo "};" >> exop.h

clean : 
	$(RM) *.o

distclean : clean
	$(RM) y.output exparse.c exparse.h exop.h libexpr.a