xref: /trunk/main/solenv/inc/tg_dep.mk (revision cdf0e10c)
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
11# OpenOffice.org is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License version 3
13# only, as published by the Free Software Foundation.
14#
15# OpenOffice.org is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18# GNU Lesser General Public License version 3 for more details
19# (a copy is included in the LICENSE file that accompanied this code).
20#
21# You should have received a copy of the GNU Lesser General Public License
22# version 3 along with OpenOffice.org.  If not, see
23# <http://www.openoffice.org/license.html>
24# for a copy of the LGPLv3 License.
25#
26#*************************************************************************
27
28.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)"!=""
29ALLDEP .PHONY:
30	@-$(IFEXIST) $(SRS)/$(TARGET).*.dpr $(THEN) $(RM:s/+//) $(SRS)/$(TARGET).*.dpr >& $(NULLDEV) $(FI)
31	@@-$(RM) $(MISC)/$(TARGET).dpr
32	@@-$(RM) $(MISC)/$(TARGET).*.dprr
33	@@-$(RM) $(MISC)/$(TARGET).dpj
34	@@-$(RM) $(MISC)/$(TARGET).dpz
35	@@-$(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
36.IF "$(nodep)"==""
37.IF "$(DEPFILE_SLO)"!=""
38	@@-$(RM) $(DEPFILE_SLO)
39	$(foreach,i,$(all_local_slo) $(shell @$(MAKEDEPEND) @$(mktmp -f - -p$(SLO) $(MKDEPFLAGS) $(CDEFS) $(CDEFSSLO) $(CDEFSMT) $i ) > $(MISC)/s_$(i:b).dpcc ))
40	$(foreach,i,$(all_misc_slo) $(shell @$(MAKEDEPEND) @$(mktmp -f - -p$(SLO) $(MKDEPFLAGS) $(CDEFS) $(CDEFSSLO) $(CDEFSMT) $i ) > $(MISC)/s_$(i:b).dpcc ))
41.ENDIF			# "$(DEPFILE_SLO)"!=""
42.IF "$(DEPFILE_OBJ)"!=""
43	@@-$(RM) $(DEPFILE_OBJ)
44	$(foreach,i,$(all_local_obj) $(shell @$(MAKEDEPEND) @$(mktmp -f - -p$(OBJ) $(MKDEPFLAGS) $(CDEFS) $(CDEFSOBJ) $(CDEFSMT) $i ) > $(MISC)/o_$(i:b).dpcc ))
45	$(foreach,i,$(all_misc_obj) $(shell @$(MAKEDEPEND) @$(mktmp -f - -p$(OBJ) $(MKDEPFLAGS) $(CDEFS) $(CDEFSOBJ) $(CDEFSMT) $i ) > $(MISC)/o_$(i:b).dpcc ))
46.ENDIF			# "$(DEPFILE_OBJ)"!=""
47.ENDIF			# "$(nodep)"==""
48.IF "$(DEPFILES)" != ""
49	echo xxx$(DEPFILES)xxx
50	@@-$(RM) $(DEPFILES)
51.ENDIF			# "$(DEPFILES)" != ""
52
53
54ALLDPC: \
55		$(DEPFILES) \
56		$(RCFILES) \
57		$(IDLFILES) \
58		$(HDBDEPNTARGET)
59.IF "$(nodep)"!=""
60	@echo NOT-Making: Depend-Lists
61	@echo ttt: ppp > $(MISC)/$(TARGET).dpc
62.ELSE
63	@echo Making : Dependencies
64.IF "$(CFILES)$(CXXFILES)"!=""
65.IF "$(SLOFILES)$(OBJFILES)$(DEPOBJFILES)"==""
66	@echo ++++++++++++++++++++++++++++++++++++++++++++++++
67	@echo 		something is wrong!!
68	@echo 		source files but no obj
69	@echo ++++++++++++++++++++++++++++++++++++++++++++++++
70	force_dmake_to_error
71.ENDIF
72.ENDIF
73.IF "$(HDBDEPNTARGET)$(OBJFILES)$(SLOFILES)$(DEPOBJFILES)$(RCFILES)$(PARFILES)"!=""
74	@$(IFEXIST) $(MISC)/$(TARGET).dpj $(THEN) $(RM:s/+//) $(MISC)/$(TARGET).dpj >& $(NULLDEV) $(FI)
75	@$(IFEXIST) $(MISC)/genjava.mk $(THEN) $(RM:s/+//) $(MISC)/genjava.mk >& $(NULLDEV) $(FI)
76	$(TOUCH) $(MISC)/$(TARGET).dpc
77.IF "$($(SECOND_BUILD)_SLOFILES)"!=""
78	@$(TYPE) $(mktmp $(foreach,i,$($(SECOND_BUILD)_SLOFILES) $(i:d:^"\n")$(SECOND_BUILD)_$(i:f) : $i )) >> $(MISC)/$(TARGET).dpc
79.ENDIF
80.IF "$($(SECOND_BUILD)_OBJFILES)"!=""
81	@$(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
82.ENDIF
83.ELSE			# "$(HDBDEPNTARGET)$(OBJFILES)$(SLOFILES)$(DEPOBJFILES)$(RCFILES)"!=""
84	@echo ttt: ppp > $(MISC)/$(TARGET).dpc
85.ENDIF			# "$(HDBDEPNTARGET)$(OBJFILES)$(SLOFILES)$(DEPOBJFILES)$(RCFILES)"!=""
86.ENDIF			# "$(nodep)"!=""
87.ELSE		# anything requiring dependencies
88
89ALLDPC:
90	@echo $(EMQ)# > $(MISC)/$(TARGET).dpc
91
92ALLDEP:
93    @echo nothing to do here...
94
95.ENDIF
96
97