xref: /aoo4110/main/solenv/inc/tg_dep.mk (revision b1cdbd2c)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24.IF "$(SLOFILES)$(OBJFILES)$(DEPOBJFILES)$(SRCFILES)$(SRC1FILES)$(SRC2FILES)$(SRC3FILES)$(RCFILES)$(HDBDEPNTARGET)$(IDLFILES)$(PARFILES)$(ZIP1TARGET)$(ZIP2TARGET)$(ZIP3TARGET)$(ZIP4TARGET)$(ZIP5TARGET)$(ZIP6TARGET)$(ZIP7TARGET)$(ZIP8TARGET)$(ZIP9TARGET)$(COMP1TYPELIST)$(COMP2TYPELIST)$(COMP3TYPELIST)$(COMP4TYPELIST)$(COMP5TYPELIST)$(COMP6TYPELIST)$(COMP7TYPELIST)$(COMP8TYPELIST)$(COMP9TYPELIST)"!=""
25ALLDEP .PHONY:
26	@-$(IFEXIST) $(SRS)/$(TARGET).*.dpr $(THEN) $(RM:s/+//) $(SRS)/$(TARGET).*.dpr >& $(NULLDEV) $(FI)
27	@@-$(RM) $(MISC)/$(TARGET).dpr
28	@@-$(RM) $(MISC)/$(TARGET).*.dprr
29	@@-$(RM) $(MISC)/$(TARGET).dpj
30	@@-$(RM) $(MISC)/$(TARGET).dpz
31	@@-$(RM) $(MISC)/$(COMP1TYPELIST).mk $(MISC)/$(COMP2TYPELIST).mk $(MISC)/$(COMP3TYPELIST).mk $(MISC)/$(COMP4TYPELIST).mk $(MISC)/$(COMP5TYPELIST).mk $(MISC)/$(COMP6TYPELIST).mk $(MISC)/$(COMP7TYPELIST).mk $(MISC)/$(COMP8TYPELIST).mk $(MISC)/$(COMP9TYPELIST).mk
32.IF "$(nodep)"==""
33.IF "$(DEPFILE_SLO)"!=""
34	@@-$(RM) $(DEPFILE_SLO)
35	$(foreach,i,$(all_local_slo) $(shell @$(MAKEDEPEND) @$(mktmp -f - -p$(SLO) $(MKDEPFLAGS) $(CDEFS) $(CDEFSSLO) $(CDEFSMT) $i ) > $(MISC)/s_$(i:b).dpcc ))
36	$(foreach,i,$(all_misc_slo) $(shell @$(MAKEDEPEND) @$(mktmp -f - -p$(SLO) $(MKDEPFLAGS) $(CDEFS) $(CDEFSSLO) $(CDEFSMT) $i ) > $(MISC)/s_$(i:b).dpcc ))
37.ENDIF			# "$(DEPFILE_SLO)"!=""
38.IF "$(DEPFILE_OBJ)"!=""
39	@@-$(RM) $(DEPFILE_OBJ)
40	$(foreach,i,$(all_local_obj) $(shell @$(MAKEDEPEND) @$(mktmp -f - -p$(OBJ) $(MKDEPFLAGS) $(CDEFS) $(CDEFSOBJ) $(CDEFSMT) $i ) > $(MISC)/o_$(i:b).dpcc ))
41	$(foreach,i,$(all_misc_obj) $(shell @$(MAKEDEPEND) @$(mktmp -f - -p$(OBJ) $(MKDEPFLAGS) $(CDEFS) $(CDEFSOBJ) $(CDEFSMT) $i ) > $(MISC)/o_$(i:b).dpcc ))
42.ENDIF			# "$(DEPFILE_OBJ)"!=""
43.ENDIF			# "$(nodep)"==""
44.IF "$(DEPFILES)" != ""
45	echo xxx$(DEPFILES)xxx
46	@@-$(RM) $(DEPFILES)
47.ENDIF			# "$(DEPFILES)" != ""
48
49
50ALLDPC: \
51		$(DEPFILES) \
52		$(RCFILES) \
53		$(IDLFILES) \
54		$(HDBDEPNTARGET)
55.IF "$(nodep)"!=""
56	@echo NOT-Making: Depend-Lists
57	@echo ttt: ppp > $(MISC)/$(TARGET).dpc
58.ELSE
59	@echo Making : Dependencies
60.IF "$(CFILES)$(CXXFILES)"!=""
61.IF "$(SLOFILES)$(OBJFILES)$(DEPOBJFILES)"==""
62	@echo ++++++++++++++++++++++++++++++++++++++++++++++++
63	@echo 		something is wrong!!
64	@echo 		source files but no obj
65	@echo ++++++++++++++++++++++++++++++++++++++++++++++++
66	force_dmake_to_error
67.ENDIF
68.ENDIF
69.IF "$(HDBDEPNTARGET)$(OBJFILES)$(SLOFILES)$(DEPOBJFILES)$(RCFILES)$(PARFILES)"!=""
70	@$(IFEXIST) $(MISC)/$(TARGET).dpj $(THEN) $(RM:s/+//) $(MISC)/$(TARGET).dpj >& $(NULLDEV) $(FI)
71	@$(IFEXIST) $(MISC)/genjava.mk $(THEN) $(RM:s/+//) $(MISC)/genjava.mk >& $(NULLDEV) $(FI)
72	$(TOUCH) $(MISC)/$(TARGET).dpc
73.IF "$($(SECOND_BUILD)_SLOFILES)"!=""
74	@$(TYPE) $(mktmp $(foreach,i,$($(SECOND_BUILD)_SLOFILES) $(i:d:^"\n")$(SECOND_BUILD)_$(i:f) : $i )) >> $(MISC)/$(TARGET).dpc
75.ENDIF
76.IF "$($(SECOND_BUILD)_OBJFILES)"!=""
77	@$(TYPE) $(mktmp $(foreach,i,$($(SECOND_BUILD)_OBJFILES) $(i:d:^"\n")$(SECOND_BUILD)_$(i:f) : $(i:d:s/obj/slo/)$(i:b).obj )) >> $(MISC)/$(TARGET).dpc
78.ENDIF
79.ELSE			# "$(HDBDEPNTARGET)$(OBJFILES)$(SLOFILES)$(DEPOBJFILES)$(RCFILES)"!=""
80	@echo ttt: ppp > $(MISC)/$(TARGET).dpc
81.ENDIF			# "$(HDBDEPNTARGET)$(OBJFILES)$(SLOFILES)$(DEPOBJFILES)$(RCFILES)"!=""
82.ENDIF			# "$(nodep)"!=""
83.ELSE		# anything requiring dependencies
84
85ALLDPC:
86	@echo $(EMQ)# > $(MISC)/$(TARGET).dpc
87
88ALLDEP:
89    @echo nothing to do here...
90
91.ENDIF
92
93