Make.rules.in: Add a new make variable "C_GEN_SRCS" for C files that need to be generated before makedep can be run on them.

Robert Shearman rob at codeweavers.com
Wed Oct 4 10:38:53 CDT 2006


---
  Make.rules.in |    7 ++++---
  1 files changed, 4 insertions(+), 3 deletions(-)

This is useful for generated files such as *_i.c and *_p.c (when widl 
can generate them).
-------------- next part --------------
diff --git a/Make.rules.in b/Make.rules.in
index 9e7ec07..68544dc 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -8,6 +8,7 @@ # MODULE       : name of the module bein
 #
 # Each individual makefile may define the following additional variables:
 # C_SRCS       : C sources for the module
+# C_GEN_SRCS   : C sources that are generated for the module
 # C_SRCS16     : 16-bit C sources for the module
 # RC_SRCS      : resource source files
 # EXTRA_SRCS   : extra source files for make depend
@@ -111,7 +112,7 @@ conf_manext     = 5
 CLEAN_FILES     = *.o *.a *.so *.ln *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \
                   *.flc *.res *.mc.rc *.tab.[ch] *.yy.c core
 
-OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(EXTRA_OBJS)
+OBJS = $(C_SRCS:.c=.o) $(C_GEN_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(EXTRA_OBJS)
 
 RCOBJS = $(RC_SRCS:.rc=.res.o)
 LINTS  = $(C_SRCS:.c=.ln)
@@ -215,12 +216,12 @@ winapi_check:: dummy
 
 # Rules for dependencies
 
-DEPEND_SRCS = $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(IDL_SRCS) $(BISON_SRCS) $(LEX_SRCS) $(EXTRA_SRCS)
+DEPEND_SRCS = $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(IDL_SRCS) $(BISON_SRCS) $(LEX_SRCS) $(C_GEN_SRCS) $(EXTRA_SRCS)
 
 $(SUBDIRS:%=%/__depend__): dummy
 	@cd `dirname $@` && $(MAKE) depend
 
-depend: $(SUBDIRS:%=%/__depend__) dummy
+depend: $(SUBDIRS:%=%/__depend__) $(C_GEN_SRCS) dummy
 	$(MAKEDEP) -C$(SRCDIR) -S$(TOPSRCDIR) -T$(TOPOBJDIR) $(EXTRAINCL) $(DEPEND_SRCS)
 
 .PHONY: depend $(SUBDIRS:%=%/__depend__)


More information about the wine-patches mailing list