File: Makefile.am

package info (click to toggle)
libsmi 0.4.3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 22,180 kB
  • ctags: 8,219
  • sloc: ansic: 41,578; java: 13,722; yacc: 9,003; sh: 8,191; lex: 1,477; makefile: 442
file content (86 lines) | stat: -rw-r--r-- 3,029 bytes parent folder | download
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#
# Makefile.am --
#
#      Template to generate libsmi Makefile.in using automake.
#
# Copyright (c) 1999 Frank Strauss, Technical University of Braunschweig.
#
# See the file "COPYING" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# @(#) $Id: Makefile.am 1675 2004-08-10 10:55:30Z strauss $
#

EXTRA_DIST		= parser-sming.y parser-smi.y \
			  scanner-sming.l scanner-smi.l \
			  errormacros.h data.h check.h error.h util.h \
			  snprintf.h \
			  scanner-smi.h parser-smi.h parser-smi.tab.h \
			  scanner-sming.h parser-sming.h parser-sming.tab.h \
			  $(man_MANS)
include_HEADERS		= smi.h
CLEANFILES		= parser-smi.output parser-sming.output
man_MANS		= libsmi.3 smi_config.3 smi_module.3 smi_macro.3 \
			  smi_node.3 smi_type.3 smi_render.3
lib_LTLIBRARIES		= libsmi.la
libsmi_la_SOURCES	= data.c check.c error.c util.c snprintf.c smi.c \
		  	  parser-smi.c scanner-smi.c \
		  	  parser-sming.c scanner-sming.c
libsmi_la_LDFLAGS	= -version-info @VERSION_LIBTOOL@

parser-smi.c: parser-smi.y scanner-smi.h parser-smi.h
	@if [ "$(BISON)" ] ; then \
	    echo "$(BISON)" -v -t -d -psmi parser-smi.y ; \
	    "$(BISON)" -v -t -d -psmi parser-smi.y ; \
	else \
	    echo "" ; \
	    echo "NOTE: we cannot build the new parser-smi.c from parser-smi.y" ; \
	    echo "" ; \
	fi
#	# bison-1.25 has a wrong yyparse() definition for pure reentrant code.
	sed -e 's/int yyparse (void);/int yyparse ();/' \
	    parser-smi.tab.c > parser-smi.tmp && \
	mv parser-smi.tmp parser-smi.c
	rm parser-smi.tab.c

parser-sming.c: parser-sming.y scanner-sming.h parser-sming.h
	@if [ "$(BISON)" ] ; then \
	    echo "$(BISON)" -v -t -d -psming parser-sming.y ; \
	    "$(BISON)" -v -t -d -psming parser-sming.y ; \
	else \
	    echo "" ; \
	    echo "NOTE: we cannot build the new parser-sming.c from parser-sming.y" ; \
	    echo "" ; \
	fi
#	# bison-1.25 has a wrong yyparse() definition for pure reentrant code.
	sed -e 's/int yyparse (void);/int yyparse ();/' \
	    parser-sming.tab.c > parser-sming.tmp && \
	mv parser-sming.tmp parser-sming.c
	rm parser-sming.tab.c

scanner-smi.c: scanner-smi.l scanner-smi.h parser-smi.tab.h
	@if [ "$(FLEX)" ] ; then \
	    echo "$(FLEX) -Cfe -Psmi -t scanner-smi.l > scanner-smi.c" ; \
	    "$(FLEX)" -Cfe -Psmi -t scanner-smi.l > scanner-smi.c ; \
	else \
	    echo "" ; \
	    echo "NOTE: we cannot build the new scanner-smi.c from scanner-smi.l" ; \
	    echo "" ; \
	fi

scanner-sming.c: scanner-sming.l scanner-sming.h parser-sming.tab.h
	@if [ "$(FLEX)" ] ; then \
	    echo "$(FLEX) -Cfe -Psming -t scanner-sming.l > scanner-sming.c" ; \
	    "$(FLEX)" -Cfe -Psming -t scanner-sming.l > scanner-sming.c ; \
	else \
	    echo "" ; \
	    echo "NOTE: we cannot build the new scanner-sming.c from scanner-sming.l" ; \
	    echo "" ; \
	fi

error.h data.lo: errormacros.h

errormacros.h: error.c
	cat error.c | grep ERR_ | \
	sed -e 's/^.*\(ERR_[a-zA-Z0-9_]*\).*$$/\1/' | \
	awk '{printf "#define %-50s %d\n", $$1, NR-1}' > errormacros.h