From 7d47671b9d85d03ac2fa5d3b852a6e5073508aa8 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 18 Aug 2018 11:37:23 -0600 Subject: [PATCH] apps/builtin/Makefile: Fix an error introduced with commit 904d68cd1f7394b1c3cb6f0b67651aa4fbee5e62: If there are no built-in functions, then the CATFILE function hangs. --- builtin/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/builtin/Makefile b/builtin/Makefile index 55386431d..492e91118 100644 --- a/builtin/Makefile +++ b/builtin/Makefile @@ -62,8 +62,8 @@ VPATH = # Registry entry lists -PDATLIST = $(call RWILDCARD, registry, *.pdat) -BDATLIST = $(call RWILDCARD, registry, *.bdat) +PDATLIST = $(strip $(call RWILDCARD, registry, *.pdat)) +BDATLIST = $(strip $(call RWILDCARD, registry, *.bdat)) # Build Targets @@ -85,13 +85,17 @@ builtin_list$(OBJEXT): builtin_list.h builtin_proto.h builtin_list.h: registry$(DELIM).updated $(call DELFILE, .xx_builtin_list.h) $(Q) touch .xx_builtin_list.h +ifneq ($(BDATLIST),) $(call CATFILE, .xx_builtin_list.h, $(BDATLIST)) +endif $(Q) mv .xx_builtin_list.h builtin_list.h builtin_proto.h: registry$(DELIM).updated $(call DELFILE, .xx_builtin_proto.h) $(Q) touch .xx_builtin_proto.h +ifneq ($(PDATLIST),) $(call CATFILE, .xx_builtin_proto.h, $(PDATLIST)) +endif $(Q) mv .xx_builtin_proto.h builtin_proto.h .built: $(OBJS)