Skip to content

Commit 54fda26

Browse files
committed
Makefile: Fix creation of templates_parser-version.adb on Windows.
On some Windows machines the bash build-in printf does not work properly. Fixes T309-046.
1 parent 6811705 commit 54fda26

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,19 @@ force:
143143
makefile.setup: setup
144144

145145
version_path := src/templates_parser-version.adb
146-
version_data := -- $() Generated by ../Makefile.\nseparate \
147-
(Templates_Parser)\nfunction Version return String is\nbegin\n $() $() \
148-
return "$(VERSION)";\nend Version;\n
149146

150147
setup: tp_xmlada.gpr $(version_path) force
151148
printf " $(foreach v,$(ALL_OPTIONS),$(v) = $($(v))\n)" > makefile.setup
152149

153150
build: $(version_path)
154151

155152
$(version_path):
156-
printf -- '$(version_data)' > $(version_path)
153+
echo "-- Generated, by ../Makefile" > $(version_path)
154+
echo "separate(Templates_Parser)" >> $(version_path)
155+
echo "function Version return String is" >> $(version_path)
156+
echo "begin" >> $(version_path)
157+
echo " return \"$(VERSION)\";" >> $(version_path)
158+
echo "end Version;" >> $(version_path)
157159

158160
#######################################################################
159161
# install

0 commit comments

Comments
 (0)