[lttng-dev] [PATCH] Adding makefile target for preprocessor

Francis Giraldeau francis.giraldeau at gmail.com
Thu May 10 11:44:28 EDT 2012


By specifying .i target, it runs gcc preprocessor for that file. Example:

  make myfile.i

will read myfile.c and output preprocessor to myfile.i
---
 Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 6bd203d..bab6e7c 100644
--- a/Makefile
+++ b/Makefile
@@ -56,4 +56,6 @@ modules_install:
 clean:
 	$(MAKE) -C $(KERNELDIR) M=$(PWD) clean
 
+%.i: %.c
+	$(MAKE) -C $(KERNELDIR) M=$(PWD) $@
 endif
-- 
1.7.5.4




More information about the lttng-dev mailing list