Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
bingbingbingbing
mono
提交
29a2d0db
M
mono
项目概览
bingbingbingbing
/
mono
与 Fork 源项目一致
从无法访问的项目Fork
通知
35
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mono
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
29a2d0db
编写于
4月 18, 2014
作者:
M
Miguel de Icaza
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[genproj] Steps towards making pre-build scripts cross platform; Lots more build now
上级
d7928067
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
32 addition
and
25 deletion
+32
-25
msvc/scripts/Makefile
msvc/scripts/Makefile
+5
-2
msvc/scripts/System.Xml.pre
msvc/scripts/System.Xml.pre
+6
-6
msvc/scripts/csproj.tmpl
msvc/scripts/csproj.tmpl
+0
-2
msvc/scripts/genproj.cs
msvc/scripts/genproj.cs
+21
-15
未找到文件。
msvc/scripts/Makefile
浏览文件 @
29a2d0db
all
:
genproj.exe
all
:
genproj.exe
prepare.exe
mono genproj.exe
genproj.exe
:
genproj.cs
mcs genproj.cs
-pkg
:dotnet
-r
:System.Xml.Linq
\ No newline at end of file
mcs genproj.cs
-r
:System.Xml.Linq
prepare.exe
:
prepare.cs
mcs prepare.cs
msvc/scripts/System.Xml.pre
浏览文件 @
29a2d0db
$(ProjectDir)\..\..\..\mono
\msvc\scripts\prepare.exe $(ProjectDir)..\.. xml
$(ProjectDir)\..\..\jay\jay
.exe
-ct < $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\System.Xml.XPath\Parser.jay > $(ProjectDir)\System.Xml.XPath\Parser.cs
echo
#define XSLT_PATTERN
> $(ProjectDir)\Mono.Xml.Xsl\PatternParser.cs
$(ProjectDir)\..\..\jay\jay
.exe
-ct < $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Mono.Xml.Xsl\PatternParser.jay >> $(ProjectDir)\Mono.Xml.Xsl\PatternParser.cs
echo
#define XSLT_PATTERN
> $(ProjectDir)\Mono.Xml.Xsl\PatternTokenizer.cs
type
$(ProjectDir)\System.Xml.XPath\Tokenizer.cs >> $(ProjectDir)\Mono.Xml.Xsl\PatternTokenizer.cs
@MONO@ $(ProjectDir)\..\..\..
\msvc\scripts\prepare.exe $(ProjectDir)..\.. xml
$(ProjectDir)\..\..\jay\jay -ct < $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\System.Xml.XPath\Parser.jay > $(ProjectDir)\System.Xml.XPath\Parser.cs
echo
"#define XSLT_PATTERN"
> $(ProjectDir)\Mono.Xml.Xsl\PatternParser.cs
$(ProjectDir)\..\..\jay\jay -ct < $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Mono.Xml.Xsl\PatternParser.jay >> $(ProjectDir)\Mono.Xml.Xsl\PatternParser.cs
echo
"#define XSLT_PATTERN"
> $(ProjectDir)\Mono.Xml.Xsl\PatternTokenizer.cs
@CAT@
$(ProjectDir)\System.Xml.XPath\Tokenizer.cs >> $(ProjectDir)\Mono.Xml.Xsl\PatternTokenizer.cs
\ No newline at end of file
msvc/scripts/csproj.tmpl
浏览文件 @
29a2d0db
...
...
@@ -53,9 +53,7 @@
</Target>
-->
<PropertyGroup>
<PreBuildEvent>
@PREBUILD@
</PreBuildEvent>
@POSTBUILD@
</PropertyGroup>
<ItemGroup>
...
...
msvc/scripts/genproj.cs
浏览文件 @
29a2d0db
...
...
@@ -630,11 +630,26 @@ class MsbuildGenerator {
// inputs/LIBRARY.pre
//
string
prebuild
=
Load
(
library
+
".pre"
);
string
prebuild_windows
,
prebuild_unix
;
int
q
=
library
.
IndexOf
(
"-"
);
if
(
q
!=
-
1
)
prebuild
=
prebuild
+
Load
(
library
.
Substring
(
0
,
q
)
+
".pre"
);
if
(
prebuild
.
IndexOf
(
"@MONO@"
)
!=
-
1
){
prebuild_unix
=
prebuild
.
Replace
(
"@MONO@"
,
"mono"
).
Replace
(
"@CAT@"
,
"cat"
);
prebuild_windows
=
prebuild
.
Replace
(
"@MONO@"
,
""
).
Replace
(
"@CAT@"
,
"type"
);
}
else
{
prebuild_unix
=
prebuild
;
prebuild_windows
=
prebuild
;
}
const
string
condition_unix
=
"Condition=\" '$(OS)' != 'Windows_NT' \""
;
const
string
condition_windows
=
"Condition=\" '$(OS)' == 'Windows_NT' \""
;
prebuild
=
" <PreBuildEvent "
+
condition_unix
+
">\n"
+
prebuild_unix
+
"\n </PreBuildEvent>\n"
+
" <PreBuildEvent "
+
condition_windows
+
">\n"
+
prebuild_windows
+
"\n </PreBuildEvent>\n"
;
var
all_args
=
new
Queue
<
string
[
]>
();
all_args
.
Enqueue
(
flags
.
Split
());
while
(
all_args
.
Count
>
0
)
{
...
...
@@ -794,8 +809,6 @@ class MsbuildGenerator {
build_output_dir
=
"bin\\Debug\\"
+
library
;
const
string
condition_unix
=
"Condition=\" '$(OS)' != 'Windows_NT' \""
;
const
string
condition_windows
=
"Condition=\" '$(OS)' == 'Windows_NT' \""
;
string
postbuild_unix
=
string
.
Empty
;
string
postbuild_windows
=
string
.
Empty
;
...
...
@@ -850,23 +863,16 @@ class MsbuildGenerator {
refs
.
AppendFormat
(
" <ProjectReference Include=\"{0}\">{1}"
,
GetRelativePath
(
result
.
csprojFileName
,
lastMatching
.
csprojFileName
),
NewLine
);
refs
.
Append
(
" <Project>"
+
lastMatching
.
projectGuid
+
"</Project>"
+
NewLine
);
refs
.
Append
(
" <Name>"
+
Path
.
GetFileNameWithoutExtension
(
lastMatching
.
csprojFileName
)
+
"</Name>"
+
NewLine
);
//refs.Append(" <HintPath>" + r + "</HintPath>" + NewLine);
refs
.
Append
(
" </ProjectReference>"
+
NewLine
);
if
(!
result
.
projReferences
.
Contains
(
lastMatching
))
result
.
projReferences
.
Add
(
lastMatching
);
}
static
string
GetRelativePath
(
string
referencerPath
,
string
referenceePath
)
static
string
GetRelativePath
(
string
from
,
string
to
)
{
// F:\src\mono\msvc\scripts\
//..\..\mcs\class\System\System-net_2_0.csproj
//..\..\mcs\class\corlib\corlib-net_2_0.csproj
// So from \System\, corlib needs to be referenced as:
// ..\corlib\corlib-net_2_0.csproj
// Could be possible to use PathRelativePathTo, but this is a P/Invoke to Win32 API.
// For now, simpler but less robust:
return
referenceePath
.
Replace
(
@"..\..\mcs\class"
,
".."
).
Replace
(
"/"
,
"\\"
);
var
fromUri
=
new
Uri
(
Path
.
GetFullPath
(
from
));
var
toUri
=
new
Uri
(
Path
.
GetFullPath
(
to
));
return
fromUri
.
MakeRelativeUri
(
toUri
).
ToString
();
}
static
VsCsproj
GetMatchingCsproj
(
string
dllReferenceName
,
List
<
VsCsproj
>
projects
)
...
...
@@ -1032,4 +1038,4 @@ public class Driver {
return
false
;
}
}
\ No newline at end of file
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录