INTEGRATION: CWS dmake48 (1.6.16); FILE MERGED
2007/03/17 19:00:37 vq 1.6.16.1: #i73499# Add new .WINPATH attribute to generate Windows style paths (with regular slashes) instead of the default cygwin style (POSIX) paths for dmake's dynamic macros. This attribute is specific for cygwin dmake executables and non-cygwin environments ignore this attribute. The windows style paths use regular slashes ('/') instead of the usual windows backslash ('\') as directory separator to avoid quoting problems (It still is a cygwin dmake!) and cygwin as well as native windows programs should have no problems using this (c:/foo/bar) path representation. The affected macros are $@, $*, $>, $?, $<, $&, $^ and $(PWD), $(MAKEDIR) and $(TMD). Examples: Content of $(PWD) without .WINPATH (default): /cygdrive/c/temp Content of $(PWD) with .WINPATH set: c:/temp
This commit is contained in:
parent
4df2659091
commit
fba970162f
1 changed files with 10 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
/* $RCSfile: infer.c,v $
|
/* $RCSfile: infer.c,v $
|
||||||
-- $Revision: 1.6 $
|
-- $Revision: 1.7 $
|
||||||
-- last change: $Author: ihi $ $Date: 2006-06-29 11:24:00 $
|
-- last change: $Author: obo $ $Date: 2007-06-12 06:06:11 $
|
||||||
--
|
--
|
||||||
-- SYNOPSIS
|
-- SYNOPSIS
|
||||||
-- Infer how to make a target.
|
-- Infer how to make a target.
|
||||||
|
@ -523,18 +523,23 @@ static char *
|
||||||
buildname( tg, meta, per )/*
|
buildname( tg, meta, per )/*
|
||||||
============================
|
============================
|
||||||
Replace '%' with per in meta. Expand the result and return it. */
|
Replace '%' with per in meta. Expand the result and return it. */
|
||||||
char *tg;
|
char *tg; /* Current target name. */
|
||||||
char *meta;
|
char *meta;
|
||||||
char *per;
|
char *per;
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
name = Apply_edit( meta, "%", per, FALSE, FALSE );
|
name = Apply_edit( meta, "%", per, FALSE, FALSE );
|
||||||
|
/* Handle infered dynamic prerequisites. */
|
||||||
if( strchr(name, '$') ) {
|
if( strchr(name, '$') ) {
|
||||||
HASHPTR m_at;
|
HASHPTR m_at;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
|
|
||||||
m_at = Def_macro( "@", tg, M_MULTI );
|
/* Set $@ so that a Expand() can use it and remove it afterwards. */
|
||||||
|
/* Is $@ already expanded? FIXME: Remove this check later. */
|
||||||
|
if( *DmStrPbrk( tg, "${}" ) != '\0' )
|
||||||
|
Fatal("$@ [%s] not fully expanded!", tg);
|
||||||
|
m_at = Def_macro( "@", DO_WINPATH(tg), M_MULTI|M_EXPANDED );
|
||||||
tmp = Expand( name );
|
tmp = Expand( name );
|
||||||
|
|
||||||
if( m_at->ht_value != NIL(char) ) {
|
if( m_at->ht_value != NIL(char) ) {
|
||||||
|
@ -542,6 +547,7 @@ char *per;
|
||||||
m_at->ht_value = NIL(char);
|
m_at->ht_value = NIL(char);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Free name if Apply_edit() did something. */
|
||||||
if( name != meta ) FREE( name );
|
if( name != meta ) FREE( name );
|
||||||
name = tmp;
|
name = tmp;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue