xiaoxiang781216 commented on a change in pull request #1271:
URL: https://github.com/apache/incubator-nuttx/pull/1271#discussion_r442709270



##########
File path: syscall/Makefile
##########
@@ -76,27 +88,43 @@ $(BIN1): $(PROXY_OBJS)
 $(BIN2): $(STUB_OBJS)
        $(call ARCHIVE, $@, $(STUB_OBJS))
 
+$(BIN3): $(WRAP_OBJS)
+       $(call ARCHIVE, $@, $(WRAP_OBJS))
+
+$(SYSCALLIST): .context
+
 .depend: Makefile $(SRCS)
-       $(Q) $(MKDEP) $(PROXYDEPPATH) $(STUBDEPPATH) \
+       $(Q) $(MKDEP) $(PROXYDEPPATH) $(STUBDEPPATH) $(WRAPDEPPATH) \
          "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
        $(Q) touch $@
 
 depend: .depend
 
 .context: syscall.csv
        $(Q) $(MAKE) -C $(TOPDIR)$(DELIM)tools -f Makefile.host mksyscall
+ifeq ($(CONFIG_LIB_SYSCALL),y)
        $(Q) (cd proxies; $(MKSYSCALL) -p $(CSVFILE);)
        $(Q) (cd stubs; $(MKSYSCALL) -s $(CSVFILE);)
+else
+ifeq ($(CONFIG_SCHED_INSTRUMENTATION_SYSCALL),y)
+       $(Q) (cd wraps; $(MKSYSCALL) -w $(CSVFILE);)
+       $(Q) $(MKSYSCALL) -l $(CSVFILE) > $(SYSCALLLIST:.txt=.h)
+       $(Q) $(call PREPROCESS, $(SYSCALLLIST:.txt=.h), $(SYSCALLLIST))
+       $(Q) sed -i -n -e '/^[^#]/p' $(SYSCALLLIST)

Review comment:
       cpp is a general tool which can handle any text file, for example:
   1.This commit process nuttx-names.dat by cpp:
   
https://github.com/apache/incubator-nuttx/pull/1262/commits/abf77a6dc1bec20b38df2ae2d37bed6109ad125c
   2.This commit process shell script by cpp:
   
https://github.com/apache/incubator-nuttx/pull/793/commits/925d0107451dd50b8637f2a07f1dceb2b90d09d2
   The key point is that we have to stop the normal step(compile) after 
preprocess.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to