Skip to content

Commit e9ff544

Browse files
committed
make: Fix archive_dotnet generation
1 parent 9440987 commit e9ff544

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

makefiles/Makefile.dotnet.mk

+17-9
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ endif
134134
$(TEMP_DOTNET_DIR)$S$1$S$$*$S$$*.csproj
135135
$(SED) -i -e 's/@PROJECT_VERSION_PATCH@/$(OR_TOOLS_PATCH)/' \
136136
$(TEMP_DOTNET_DIR)$S$1$S$$*$S$$*.csproj
137-
$(SED) -i -e 's/@FILE_NAME@/$$*.cs/' \
137+
$(SED) -i -e 's/@COMPONENT_NAME@/$1/' \
138+
$(TEMP_DOTNET_DIR)$S$1$S$$*$S$$*.csproj
139+
$(SED) -i -e 's/@SAMPLE_FILE_NAME@/$$*.cs/' \
138140
$(TEMP_DOTNET_DIR)$S$1$S$$*$S$$*.csproj
139141

140142
$(TEMP_DOTNET_DIR)/$1/%/%.cs: \
@@ -175,10 +177,10 @@ $(TEMP_DOTNET_DIR)/$1/%: \
175177

176178
$(TEMP_DOTNET_DIR)/$1/%/%.csproj: \
177179
$(SRC_DIR)/examples/$1/%.cs \
178-
${SRC_DIR}/ortools/dotnet/Sample.csproj.in \
180+
${SRC_DIR}/ortools/dotnet/Example.csproj.in \
179181
| $(TEMP_DOTNET_DIR)/$1/%
180182
$(SED) -e "s/@DOTNET_PACKAGES_DIR@/..\/..\/..\/$(BUILD_DIR)\/dotnet\/packages/" \
181-
ortools$Sdotnet$SSample.csproj.in \
183+
ortools$Sdotnet$SExample.csproj.in \
182184
> $(TEMP_DOTNET_DIR)$S$1$S$$*$S$$*.csproj
183185
$(SED) -i -e 's/@DOTNET_SAMPLE_LANG@/9.0/' \
184186
$(TEMP_DOTNET_DIR)$S$1$S$$*$S$$*.csproj
@@ -196,7 +198,7 @@ else
196198
endif
197199
$(SED) -i -e 's/@DOTNET_PROJECT@/$(DOTNET_ORTOOLS_ASSEMBLY_NAME)/' \
198200
$(TEMP_DOTNET_DIR)$S$1$S$$*$S$$*.csproj
199-
$(SED) -i -e 's/@SAMPLE_NAME@/$$*/' \
201+
$(SED) -i -e 's/@EXAMPLE_NAME@/$$*/' \
200202
$(TEMP_DOTNET_DIR)$S$1$S$$*$S$$*.csproj
201203
$(SED) -i -e 's/@PROJECT_VERSION@/$(OR_TOOLS_VERSION)/' \
202204
$(TEMP_DOTNET_DIR)$S$1$S$$*$S$$*.csproj
@@ -206,7 +208,9 @@ endif
206208
$(TEMP_DOTNET_DIR)$S$1$S$$*$S$$*.csproj
207209
$(SED) -i -e 's/@PROJECT_VERSION_PATCH@/$(OR_TOOLS_PATCH)/' \
208210
$(TEMP_DOTNET_DIR)$S$1$S$$*$S$$*.csproj
209-
$(SED) -i -e 's/@FILE_NAME@/$$*.cs/' \
211+
$(SED) -i -e 's/@COMPONENT_NAME@/$1/' \
212+
$(TEMP_DOTNET_DIR)$S$1$S$$*$S$$*.csproj
213+
$(SED) -i -e 's/@EXAMPLE_FILE_NAME@/$$*.cs/' \
210214
$(TEMP_DOTNET_DIR)$S$1$S$$*$S$$*.csproj
211215

212216
$(TEMP_DOTNET_DIR)/$1/%/%.cs: \
@@ -658,10 +662,12 @@ $(TEMP_DOTNET_DIR)/ortools_examples/examples/dotnet/%.csproj: \
658662
$(SED) -i -e 's/@DOTNET_TFM@/<TargetFrameworks>netcoreapp3.1;net6.0<\/TargetFrameworks>/' \
659663
$(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples$Sdotnet$S$$*.csproj
660664
$(SED) -i -e 's/@DOTNET_PROJECT@/$(DOTNET_ORTOOLS_ASSEMBLY_NAME)/' \
665+
$(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples$Sdotnet$S$$*.csproj
666+
$(SED) -i -e 's/@COMPONENT_NAME@/$1/' \
661667
$(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples$Sdotnet$S$$*.csproj
662668
$(SED) -i -e 's/@SAMPLE_NAME@/$$*/' \
663669
$(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples$Sdotnet$S$$*.csproj
664-
$(SED) -i -e 's/@FILE_NAME@/$$*.cs/' \
670+
$(SED) -i -e 's/@SAMPLE_FILE_NAME@/$$*.cs/' \
665671
$(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples$Sdotnet$S$$*.csproj
666672
endef
667673

@@ -674,7 +680,7 @@ $(TEMP_DOTNET_DIR)/ortools_examples/examples/dotnet/%.csproj: \
674680
| $(TEMP_DOTNET_DIR)/ortools_examples/examples/dotnet
675681
$(COPY) $(SRC_DIR)$Sexamples$S$1$S$$*.cs \
676682
$(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples$Sdotnet
677-
$(COPY) ortools$Sdotnet$SSample.csproj.in \
683+
$(COPY) ortools$Sdotnet$SExample.csproj.in \
678684
$(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples$Sdotnet$S$$*.csproj
679685
$(SED) -i -e 's/@PROJECT_VERSION@/$(OR_TOOLS_VERSION)/' \
680686
$(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples$Sdotnet$S$$*.csproj
@@ -692,9 +698,11 @@ $(TEMP_DOTNET_DIR)/ortools_examples/examples/dotnet/%.csproj: \
692698
$(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples$Sdotnet$S$$*.csproj
693699
$(SED) -i -e 's/@DOTNET_PROJECT@/$(DOTNET_ORTOOLS_ASSEMBLY_NAME)/' \
694700
$(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples$Sdotnet$S$$*.csproj
695-
$(SED) -i -e 's/@SAMPLE_NAME@/$$*/' \
701+
$(SED) -i -e 's/@COMPONENT_NAME@/$1/' \
696702
$(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples$Sdotnet$S$$*.csproj
697-
$(SED) -i -e 's/@FILE_NAME@/$$*.cs/' \
703+
$(SED) -i -e 's/@EXAMPLE_NAME@/$$*/' \
704+
$(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples$Sdotnet$S$$*.csproj
705+
$(SED) -i -e 's/@EXAMPLE_FILE_NAME@/$$*.cs/' \
698706
$(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples$Sdotnet$S$$*.csproj
699707
endef
700708

0 commit comments

Comments
 (0)