<< 10/15 >>
First Last

Functions

  define transform-y-to-cpp
  @mkdir -p $(dir $@)
  @echo "Yacc: $(PRIVATE_MODULE) <= $<"
  $(YACC) $(PRIVATE_YACCFLAGS) -o $@ $<
  touch $(@:$1=$(YACC_HEADER_SUFFIX))
  echo '#ifndef '$(@F:$1=_h) > $(@:$1=.h)
  echo '#define '$(@F:$1=_h) >> $(@:$1=.h)
  cat $(@:$1=$(YACC_HEADER_SUFFIX)) >> $(@:$1=.h)
  echo '#endif' >> $(@:$1=.h)
  endef
  
  $(y_yacc_cpps): $(intermediates)/%$(LOCAL_CPP_EXTENSION): \
      $(TOPDIR)$(LOCAL_PATH)/%.y \
      $(lex_cpps) $(my_additional_dependencies)
          $(call transform-y-to-cpp,$(PRIVATE_CPP_EXTENSION))