Skip to content

Commit b7a97b0

Browse files
committed
Improve formatting and change some options help url.
1 parent 4acf0ac commit b7a97b0

File tree

3 files changed

+62
-58
lines changed

3 files changed

+62
-58
lines changed

yasm.props

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@
1212
<YASM>
1313
<Preprocessor>0</Preprocessor>
1414
<Parser>0</Parser>
15-
<OutputFormat>$(IntDir)%(FileName).obj</OutputFormat>
16-
<CommandLineTemplate>"$(YasmPath)"yasm.exe -Xvc -f win$(PlatformArchitecture) [AllOptions] [AdditionalOptions] "%(FullPath)"</CommandLineTemplate>
15+
<ObjectFileName>$(IntDir)%(FileName).obj</ObjectFileName>
16+
<GenerateDebugInformation>true</GenerateDebugInformation>
17+
<CommandLineTemplate Condition="'$(Platform)' == 'Win32'">"$(YasmPath)"yasm.exe -Xvc -f win32 [AllOptions] [AdditionalOptions] "%(FullPath)"</CommandLineTemplate>
18+
<CommandLineTemplate Condition="'$(Platform)' == 'x64'">"$(YasmPath)"yasm.exe -Xvc -f win64 [AllOptions] [AdditionalOptions] "%(FullPath)"</CommandLineTemplate>
19+
<CommandLineTemplate Condition="'$(Platform)' != 'Win32' and '$(Platform)' != 'x64'">echo YASM not supported on this platform
20+
exit 1</CommandLineTemplate>
1721
<ExecutionDescription>%(Identity)</ExecutionDescription>
1822
</YASM>
1923
</ItemDefinitionGroup>

yasm.targets

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
BeforeTargets="$(YASMBeforeTargets)"
2929
AfterTargets="$(YASMAfterTargets)"
3030
Condition="'@(YASM)' != ''"
31-
Outputs="%(YASM.OutputFormat)"
31+
Outputs="%(YASM.ObjectFileName)"
3232
Inputs="%(YASM.Identity);%(YASM.AdditionalDependencies);$(MSBuildProjectFile)"
3333
DependsOnTargets="_SelectedFiles">
3434
<ItemGroup Condition="'@(SelectedFiles)' != ''">
3535
<YASM Remove="@(YASM)" Condition="'%(Identity)' != '@(SelectedFiles)'" />
3636
</ItemGroup>
3737
<ItemGroup>
38-
<YASM_tlog Include="%(YASM.OutputFormat)" Condition="'%(YASM.OutputFormat)' != '' and '%(YASM.ExcludedFromBuild)' != 'true'">
38+
<YASM_tlog Include="%(YASM.ObjectFileName)" Condition="'%(YASM.ObjectFileName)' != '' and '%(YASM.ExcludedFromBuild)' != 'true'">
3939
<Source>@(YASM, '|')</Source>
4040
</YASM_tlog>
4141
</ItemGroup>
@@ -50,7 +50,7 @@
5050
<YASM
5151
Condition="'@(YASM)' != '' and '%(YASM.ExcludedFromBuild)' != 'true'"
5252
Inputs="%(YASM.Inputs)"
53-
OutputFormat="%(YASM.OutputFormat)"
53+
ObjectFileName="%(YASM.ObjectFileName)"
5454
GenerateDebugInformation="%(YASM.GenerateDebugInformation)"
5555
IncludePaths="%(YASM.IncludePaths)"
5656
PreIncludeFiles="%(YASM.PreIncludeFiles)"
@@ -67,8 +67,8 @@
6767
Name="ComputeYASMOutput"
6868
Condition="'@(YASM)' != ''">
6969
<ItemGroup>
70-
<Link Include="@(YASM->Metadata('OutputFormat')->Distinct()->ClearMetadata())" Condition="'%(YASM.ExcludedFromBuild)' != 'true'"/>
71-
<Lib Include="@(YASM->Metadata('OutputFormat')->Distinct()->ClearMetadata())" Condition="'%(YASM.ExcludedFromBuild)' != 'true'"/>
70+
<Link Include="@(YASM->Metadata('ObjectFileName')->Distinct()->ClearMetadata())" Condition="'%(YASM.ExcludedFromBuild)' != 'true'"/>
71+
<Lib Include="@(YASM->Metadata('ObjectFileName')->Distinct()->ClearMetadata())" Condition="'%(YASM.ExcludedFromBuild)' != 'true'"/>
7272
</ItemGroup>
7373
</Target>
7474
</Project>

yasm.xml

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
<sys:String>General</sys:String>
1818
</Category.DisplayName>
1919
</Category>
20-
<Category
20+
<Category
2121
Name="Preprocessor">
2222
<Category.DisplayName>
2323
<sys:String>Preprocessing Options</sys:String>
2424
</Category.DisplayName>
2525
</Category>
26-
<Category
26+
<Category
2727
Name="Assembler Options">
2828
<Category.DisplayName>
2929
<sys:String>Assembler Options</sys:String>
@@ -49,53 +49,53 @@
4949
</StringProperty.DataSource>
5050
</StringProperty>
5151
<StringProperty
52-
Name="OutputFormat"
52+
Name="ObjectFileName"
5353
Category="Assembler Options"
54-
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html"
5554
DisplayName="Output File Name"
5655
Description="Specify Output Filename."
57-
Switch="-o &quot;[value]&quot;" />
58-
<BoolProperty
59-
Name="GenerateDebugInformation"
60-
Category="Assembler Options"
61-
DisplayName="Generate Debug Information"
62-
Description="Generates Debug Information."
63-
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html"
64-
Switch="-g cv8" />
65-
<StringListProperty
66-
Name="IncludePaths"
67-
Category="General"
68-
DisplayName="Include File Search Directories"
69-
Description="Sets path for include files."
70-
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html"
71-
Switch="-I&quot;[value]/&quot;" />
72-
<StringListProperty
73-
Name="PreIncludeFiles"
74-
Category="General"
75-
DisplayName="Pre-Include a File"
76-
Description="Force files to be pre-included into source file."
77-
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html"
78-
Switch="-P&quot;[value]&quot;" />
79-
<StringListProperty
80-
Name="PreprocessorDefinitions"
56+
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html#yasm-option-objfile"
57+
Switch="-o &quot;[value]&quot;" />
58+
<BoolProperty
59+
Name="GenerateDebugInformation"
60+
Category="Assembler Options"
61+
DisplayName="Generate Debug Information"
62+
Description="Generates Debug Information."
63+
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html#yasm-option-dformat"
64+
Switch="-g cv8" />
65+
<StringListProperty
66+
Name="IncludePaths"
67+
Category="General"
68+
DisplayName="Include File Search Directories"
69+
Description="Sets path for include files."
70+
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html#yasm-option-i"
71+
Switch="-I&quot;[value]/&quot;" />
72+
<StringListProperty
73+
Name="PreIncludeFiles"
74+
Category="General"
75+
DisplayName="Pre-Include a File"
76+
Description="Force files to be pre-included into source file."
77+
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html#yasm-option-p"
78+
Switch="-P&quot;[value]&quot;" />
79+
<StringListProperty
80+
Name="PreprocessorDefinitions"
8181
Category="Preprocessor"
82-
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html"
8382
DisplayName="Preprocessor Definitions"
8483
Description="Defines a text macro with the given name."
85-
Switch="-D[value]" />
84+
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html#yasm-option-d"
85+
Switch="-D[value]" />
8686
<StringListProperty
87-
Name="UndefinePreprocessorDefinitions"
88-
Category="Preprocessor"
89-
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html"
90-
DisplayName="Undefine Preprocessor Definitions"
91-
Description="Undefines a text macro with the given name."
92-
Switch="-U[value]" />
87+
Name="UndefinePreprocessorDefinitions"
88+
Category="Preprocessor"
89+
DisplayName="Undefine Preprocessor Definitions"
90+
Description="Undefines a text macro with the given name."
91+
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html#yasm-option-u"
92+
Switch="-U[value]" />
9393
<EnumProperty
94-
Name="Preprocessor"
95-
Category="Preprocessor"
96-
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html"
94+
Name="Preprocessor"
95+
Category="Preprocessor"
9796
DisplayName="Pre-Processor"
98-
Description="Select the pre-processor to use on the input file">
97+
Description="Select the pre-processor to use on the input file"
98+
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html#yasm-option-preproc">
9999
<EnumValue
100100
Name="0"
101101
DisplayName="Nasm"
@@ -106,11 +106,11 @@
106106
Switch="-rraw" />
107107
</EnumProperty>
108108
<EnumProperty
109-
Name="Parser"
110-
Category="Preprocessor"
111-
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html"
109+
Name="Parser"
110+
Category="Preprocessor"
112111
DisplayName="Parser"
113-
Description="Select the parser (the assembler syntax)">
112+
Description="Select the parser (the assembler syntax)"
113+
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html#yasm-option-parser">
114114
<EnumValue
115115
Name="0"
116116
DisplayName="Nasm"
@@ -120,13 +120,13 @@
120120
DisplayName="Gas"
121121
Switch="-pgas" />
122122
</EnumProperty>
123-
<BoolProperty
124-
Name="TreatWarningsAsErrors"
125-
Category="Assembler Options"
126-
DisplayName="Treat Warnings As Errors"
127-
Description="Returns an error code if warnings are generated."
128-
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html"
129-
Switch="-Werror" />
123+
<BoolProperty
124+
Name="TreatWarningsAsErrors"
125+
Category="Assembler Options"
126+
DisplayName="Treat Warnings As Errors"
127+
Description="Returns an error code if warnings are generated."
128+
HelpUrl="http://www.tortall.net/projects/yasm/manual/html/yasm-options.html#yasm-option-werror"
129+
Switch="-Werror" />
130130
<StringProperty
131131
Name="CommandLineTemplate"
132132
DisplayName="Command Line"

0 commit comments

Comments
 (0)