Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. # Sources
  2.  
  3. AUTOGEN_PARSERS := $(shell $(PERL) -pe'$$_="" unless /^([^\#][^:]+):/;$$_=$$1 . " "' $(DIR)properties.gen)
  4.  
  5. # Dodgy use of define/eval to bypass DIR changing
  6. define build_gen_parser
  7.  
  8. $(BUILDDIR)/gen_parser: $(DIR)css_property_parser_gen.c
  9.         $$(VQ)$$(ECHO) $$(ECHOFLAGS) " PREPARE: $$@"
  10.         $$(Q)$$(HOST_CC) -o $$@ $$^
  11.  
  12. endef
  13.  
  14. $(eval $(build_gen_parser))
  15.  
  16. define gen_prop_parser
  17.  
  18. $(DIR)autogenerated_$1.c: $(DIR)properties.gen $(BUILDDIR)/gen_parser
  19.         $$(VQ)$$(ECHO) $$(ECHOFLAGS) "GENERATE: $$@"
  20.         $$(Q)$$(BUILDDIR)/gen_parser -o $$@ '$(shell $(GREP) "^$1:" $(DIR)properties.gen)'
  21.  
  22. AUTOGEN_SOURCES := $$(AUTOGEN_SOURCES) autogenerated_$1.c
  23.  
  24. endef
  25.  
  26. AUTOGEN_SOURCES :=
  27.  
  28. $(eval $(foreach PROP,$(AUTOGEN_PARSERS),$(call gen_prop_parser,$(PROP))))
  29.  
  30.  
  31.  
  32. DIR_SOURCES :=                          \
  33.         azimuth.c                       \
  34.         background.c                    \
  35.         background_position.c           \
  36.         border.c                        \
  37.         border_color.c                  \
  38.         border_spacing.c                \
  39.         border_style.c                  \
  40.         border_width.c                  \
  41.         clip.c                          \
  42.         columns.c                       \
  43.         column_rule.c                   \
  44.         content.c                       \
  45.         cue.c                           \
  46.         cursor.c                        \
  47.         elevation.c                     \
  48.         font.c                          \
  49.         font_family.c                   \
  50.         font_weight.c                   \
  51.         list_style.c                    \
  52.         list_style_type.c               \
  53.         margin.c                        \
  54.         opacity.c                       \
  55.         outline.c                       \
  56.         padding.c                       \
  57.         pause.c                         \
  58.         play_during.c                   \
  59.         properties.c                    \
  60.         quotes.c                        \
  61.         text_decoration.c               \
  62.         utils.c                         \
  63.         voice_family.c
  64.  
  65. DIR_SOURCES := $(DIR_SOURCES) $(AUTOGEN_SOURCES)
  66.  
  67. PRE_TARGETS := $(foreach AP,$(AUTOGEN_PARSERS),src/parse/properties/autogenerated_$(AP).c)
  68.  
  69. DISTCLEAN_ITEMS := $(foreach AP,$(AUTOGEN_PARSERS),src/parse/properties/autogenerated_$(AP).c)
  70.  
  71. include $(NSBUILD)/Makefile.subdir
  72.