• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1##
2##
3## Copyright 2008 The Android Open Source Project
4##
5
6ifeq ($(HOST_OS),linux)
7LOCAL_BISON := $(HOST_OUT_EXECUTABLES)/bison$(HOST_EXECUTABLES_SUFFIX)
8LOCAL_YACC := $(LOCAL_BISON) -d
9else
10LOCAL_YACC := $(YACC)
11endif
12
13define local-transform-y-to-cpp
14@mkdir -p $(dir $@)
15@echo "WebCore Yacc: $(PRIVATE_MODULE) <= $<"
16@$(LOCAL_YACC) $(PRIVATE_YACCFLAGS) -o $@ $<
17@touch $(@:$1=$(YACC_HEADER_SUFFIX))
18@echo '#ifndef '$(@F:$1=_h) > $(@:$1=.h)
19@echo '#define '$(@F:$1=_h) >> $(@:$1=.h)
20@cat $(@:$1=$(YACC_HEADER_SUFFIX)) >> $(@:$1=.h)
21@echo '#endif' >> $(@:$1=.h)
22@rm -f $(@:$1=$(YACC_HEADER_SUFFIX))
23endef
24
25