xref: /aoo4110/main/solenv/inc/startup/startup.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# This is the root DMAKE startup file.
22#
23# Definitions common to all environments are given at the root.
24# Definitions parameterized at the root have their parameters specified
25# in sub-makefiles which are included based on the values of the three
26# make variables:
27#
28#	OS		- core operating system flavour
29#
30# See the file 'summary', found in this directory for a list of
31# environments supported by this release.
32
33# Disable warnings for macros given on the command line but redefined here.
34__.silent !:= $(.SILENT)	# Preserve user's .SILENT flag
35.SILENT   !:= yes
36.NOTABS	  !:= yes
37.ERROR :
38	@echo '---* $(MKFILENAME) *---'
39
40# Define the directory separator string.
41/ *=  $(DIRSEPSTR)
42
43.IMPORT .IGNORE : .EVERYTHING
44
45.IF "$(TNR)" == ""
46
47CALLMACROS:=$(MAKEMACROS)
48.EXPORT : CALLMACROS
49
50CALLTARGETS=$(MAKETARGETS)
51.ENDIF			# "$(TNR)" == ""
52
53.INCLUDEDIRS : $(DMAKE_INC) $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT) $(SOLARENV)$/inc
54
55# Grab key definitions from the environment
56# .IMPORT .IGNORE : OS TMPDIR UPD INPATH OUTPATH GUI COM EX CLASSPATH PRODUCT GUIBASE SOLARENV SOLARVER GUIENV CPU CPUNAME CVER GVER COMPATH LIB INCLUDE TR SORT UNIQ ROOTDIR SED AWK TOUCH IENV ILIB PRODUCT_ENV COMEX UPD BUILD DEVROOT VCL SO3 ENVCFLAGS
57
58.IF "$(OS)" == "" || "$(OS)" == "Windows_NT"
59.ERROR : ; @echo Forced error: Environment variable OS has to be set for OOo build!
60OS_variable_needed
61.ENDIF
62
63# Customize macro definitions based on seting of OS.
64# This must come before the default macro definitions which follow.
65.IF "$(OS)" == "OS2"
66.INCLUDE: $(INCFILENAME:d)OS2/macros.mk
67.ELIF "$(OS)" == "WNT"
68.INCLUDE: $(INCFILENAME:d)wnt/macros.mk
69.END
70
71# ----------------- Default Control Macro definitions -----------------------
72# Select appropriate defaults for basic macros
73MAKE          *=  $(MAKECMD) $(MFLAGS)
74TMPDIR        *:= $/tmp
75DIVFILE       *=  $(TMPFILE)
76
77MAXLINELENGTH	= 65530
78
79# Recipe execution configuration
80SHELL := $(OOO_SHELL)
81SHELLFLAGS := -c
82SHELLMETAS := !"\#$$%&'()*;<=>?[\]`{{|}}~
83    # the colon (":") utility is typically only available as a shell built-in,
84    # so it should be included in SHELLMETAS; however, this would result in very
85    # many false positives on Windows where ":" is used in drive letter notation
86GROUPSHELL := $(SHELL)
87GROUPFLAGS :=
88GROUPSUFFIX :=
89
90# Intermediate target removal configuration
91RM            *:= rm
92RMFLAGS       *=  -f
93RMTARGET      *=  $<
94
95# Default recipe that is used to remove intermediate targets.
96.REMOVE :; #echo dummy remove #$(RM) $(RMFLAGS) $(RMTARGET)
97#.REMOVE :; echo $(RM) $(RMFLAGS) $(RMTARGET)
98
99# Directory caching configuration.
100.DIRCACHE         *:= yes
101.DIRCACHERESPCASE *:= yes
102
103# Define the special NULL Prerequisite
104NULLPRQ *:= __.NULLPRQ
105
106# Primary suffixes in common use
107E *:= # Executables
108
109# Other Compilers, Tools and their flags
110MV *:= mv     # File rename command
111
112
113# Finally, define the default construction strategy
114.ROOT .PHONY .NOSTATE .SEQUENTIAL :- .INIT .TARGETS .DONE;
115.INIT .DONE .PHONY: $(NULLPRQ);
116
117# Define the NULL Prerequisite as having no recipe.
118$(NULLPRQ) .PHONY :;
119
120# Reset warnings back to previous setting.
121.SILENT !:= $(__.silent)
122
123# Check for a Local project file, gets parsed before user makefile.
124.INCLUDE .IGNORE .NOINFER: "project.mk"
125
126.MAKEFILES :- makefile.mk MAKEFILE.MK $(CONFIG_PROJECT)$/makefile.rc $(SOLARENV)$/inc$/found_no.mk
127
128LANG=C
129.EXPORT : LANG
130