summaryrefslogtreecommitdiff
path: root/packages/bison/bison-native_2.3.bb
blob: af6249ac9de5c13e2aebc94b9ec1545868d180c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require bison_${PV}.bb
SECTION = "devel"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/bison-${PV}"
S = "${WORKDIR}/bison-${PV}"
PR="r1"

inherit native autotools

do_stage() {
	rm -f ${STAGING_BINDIR}/yacc
	rm -f ${STAGING_BINDIR}/bison
	install -m 0755 src/bison ${STAGING_BINDIR}/
	cat >${STAGING_BINDIR}/yacc <<EOF
#!/bin/sh
exec ${STAGING_BINDIR}/bison -y "\$@"
EOF
	chmod a+rx ${STAGING_BINDIR}/yacc
	install -d ${STAGING_DATADIR}/bison/m4sugar
	install -m 0755 data/c.m4 data/c++.m4 data/glr.c data/glr.cc data/lalr1.cc data/location.cc data/yacc.c ${STAGING_DATADIR}/bison/

	install -m 0755 data/m4sugar/m4sugar.m4 ${STAGING_DATADIR}/bison/m4sugar/
}