linux: move dependancy handling out of linux.cf and into new lnxDep.rules file.
[oweals/cde.git] / cde / config / cf / lnxDep.rules
1 XCOMM dependency handling for linux, included by linux.cf.
2 XCOMM We do not want builds to fail if dependencies cannot
3 XCOMM be generated.  In some cases, checking will always fail
4 XCOMM because the relevant files have not been generated yet.
5 XCOMM Not ignoring errors can cause make to go into an infinite
6 XCOMM loop during depend processing.
7 XCOMM
8
9 #ifndef DependDependency
10 #define DependDependency() /**/
11 #endif
12
13 #ifdef DependTarget
14 # undef DependTarget
15 #endif
16
17 #define DependTarget()                                                  @@@@\
18 DependDependency()                                                      @@@@\
19                                                                         @@@@\
20 depend:: DependFileName                                                 @@@@\
21                                                                         @@@@\
22 DependFileName::                                                        @@@@\
23         -RunProgram(DEPEND,$(DEPENDFLAGS) $(ALLDEFINES) $(DEPEND_DEFINES) $(SRCS)) > $@
24
25 #ifdef DependTarget3
26 # undef DependTarget3
27 #endif
28
29 #define DependTarget3(srcs1,srcs2,srcs3)                                @@@@\
30 DependDependency()                                                      @@@@\
31                                                                         @@@@\
32 depend:: DependFileName                                                 @@@@\
33                                                                         @@@@\
34 DependFileName::                                                        @@@@\
35         -RunProgram(DEPEND,$(DEPENDFLAGS) $(ALLDEFINES) $(DEPEND_DEFINES) srcs1) > $@   @@@@\
36         -RunProgram(DEPEND,$(DEPENDFLAGS) $(ALLDEFINES) $(DEPEND_DEFINES) srcs2) >> $@  @@@@\
37         -RunProgram(DEPEND,$(DEPENDFLAGS) $(ALLDEFINES) $(DEPEND_DEFINES) srcs3) >> $@