Subversion Repositories DevTools

Rev

Rev 261 | Rev 321 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 261 Rev 303
Line 85... Line 85...
85
space		:= $(empty) $(empty)
85
space		:= $(empty) $(empty)
86
spacealt	:= %20
86
spacealt	:= %20
87
 
87
 
88
#
88
#
89
###############################################################################
89
###############################################################################
-
 
90
# Macros to assist in the handling of paths with spaces
-
 
91
#	encodepath - Uses spacealt, uses /, space-sep-list
-
 
92
#		     Used to conatins lists of paths that may contain
-
 
93
#		     spaces. Used for INCLUDE and LIB paths
-
 
94
#
-
 
95
#	decodepath - Decodes an encoded path-list.
-
 
96
#		     User specifies the item prefix and suffix.
-
 
97
#		     Return list uses \ and may have spaces in pathnames
-
 
98
#	             Prefix items with 1st-arg
-
 
99
#                    Join items with 2nd arg
-
 
100
#
-
 
101
# Usage:
-
 
102
#	aa = $(call encodepath,c:\Program Files)
-
 
103
#	$(call decodepath,-I,;,$(aa))
-
 
104
#
-
 
105
###############################################################################
-
 
106
#
-
 
107
encodepath = $(subst //,/,$(subst \,/,$(subst $(space),$(spacealt),$(strip $(1)))))
-
 
108
decodepath = $(subst $(spacealt),$(space),$(subst $(space),$(empty),$(patsubst %,$(1)%$(2),$(subst /,\,$(3)))))
-
 
109
 
-
 
110
#
-
 
111
###############################################################################
-
 
112
#
-
 
113
#  Macros to convert relative to absolute paths
-
 
114
#
-
 
115
#   Work around for a bug in make 3.81 where abspath assumes that the input
-
 
116
#   is a relative path. The work around checks for paths that have a : or start
-
 
117
#   with a '/ - and assumes these are absolute.
-
 
118
#   It will only call makes 'abspath' for relative paths.
-
 
119
#
-
 
120
###############################################################################
-
 
121
#
-
 
122
myabspath = $(foreach dir,$1,$(call myabs1path,$(dir)))
-
 
123
myabs1path = $(if $(or $(findstring :,$1),$(filter /%,$1)),$1,$(abspath $1))
-
 
124
 
-
 
125
#
-
 
126
###############################################################################
90
# A little macro used within each of the rules for translating a file from 
127
# A little macro used within each of the rules for translating a file from 
91
# one type to another to print the environment if the variable SHOWENV has 
128
# one type to another to print the environment if the variable SHOWENV has 
92
# been defined.
129
# been defined.
93
###############################################################################
130
###############################################################################
94
#
131
#
Line 100... Line 137...
100
define show_environment
137
define show_environment
101
endef
138
endef
102
endif
139
endif
103
 
140
 
104
#
141
#
-
 
142
################################################################################
-
 
143
# A macro to dump out command files if the ARGS or ALLARGS option is set
-
 
144
# Usage: $(call show_cmdfile,<PathOfCommandFile>)
-
 
145
################################################################################
-
 
146
#
-
 
147
ifeq ($(SHOWARGS),NONE)
-
 
148
show_cmdfile =
-
 
149
else
-
 
150
show_cmdfile = echo "Using command file: $(1)";cat $(1);echo "End of Command file"
-
 
151
endif
-
 
152
 
-
 
153
#
105
###############################################################################
154
###############################################################################
106
# Support macros
155
# Support macros
107
###############################################################################
156
###############################################################################
108
#
157
#
109
 
158