include $(APPDIR)/Make.defs
CSRCS = builtin_list.c
PDATLIST = $(strip $(call RWILDCARD, registry, *.pdat))
BDATLIST = $(strip $(call RWILDCARD, registry, *.bdat))
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
PDATLIST := $(subst /,\,$(PDATLIST))
BDATLIST := $(subst /,\,$(BDATLIST))
endif
builtin_list.c: builtin_list.h builtin_proto.h
registry$(DELIM).updated:
$(Q) touch registry$(DELIM).updated
define CONFILE
if [ -n "$(strip $(2))" ]; then cat $(2) >> $1; fi
endef
builtin_list.h: registry$(DELIM).updated
ifeq ($(BDATLIST),)
$(call DELFILE, builtin_list.h)
$(Q) touch builtin_list.h
else
$(shell echo '' > builtin_list.h)
$(call SPLITVARIABLE,BDA,$(BDATLIST),50) \
$(foreach BATCH, $(BDA_TOTAL), \
$(shell $(call CONFILE, builtin_list.h, $(BDA_$(BATCH)))) \
)
endif
builtin_proto.h: registry$(DELIM).updated
ifeq ($(PDATLIST),)
$(call DELFILE, builtin_proto.h)
$(Q) touch builtin_proto.h
else
$(shell echo '' > builtin_proto.h)
$(call SPLITVARIABLE,PDA,$(PDATLIST),50) \
$(foreach BATCH, $(PDA_TOTAL), \
$(shell $(call CONFILE, builtin_proto.h, $(PDA_$(BATCH)))) \
)
endif
depend:: builtin_list.h builtin_proto.h
clean::
$(call DELFILE, builtin_list.h)
$(call DELFILE, builtin_proto.h)
clean_context::
$(call DELFILE, $(PDATLIST))
$(call DELFILE, $(BDATLIST))
distclean:: clean_context clean
$(call DELFILE, registry$(DELIM).updated)
include $(APPDIR)/Application.mk