128 | @@ -129,9 +129,9 @@ $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) $(OSX_BACKGROUND_IMAGE)
129 | $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2 -volname $(OSX_VOLNAME)
130 |
131 | $(OSX_BACKGROUND_IMAGE).png: contrib/macdeploy/$(OSX_BACKGROUND_SVG)
132 | - sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d 36 -p 36 -o $@
133 | + sed -e 's/PACKAGE_NAME/$(PACKAGE_NAME)/' -e 's/PACKAGE_VERSION/$(PACKAGE_VERSION)/' -e 's/PACKAGE_YEAR/$(PACKAGE_YEAR)/' -e 's/COPYRIGHT_YEAR/$(COPYRIGHT_YEAR)/' -e 's/COPYRIGHT_HOLDERS_FINAL/$(COPYRIGHT_HOLDERS_FINAL)/' contrib/macdeploy/$(OSX_BACKGROUND_SVG) < "$<" | $(RSVG_CONVERT) -f png -d 36 -p 36 -o $@
Is sed -e or multiple arguments portable? (Alternatives are semicolons in a single argument, or multiple sed pipes)
The semicolon syntax didn’t play well with the $(RSVG_CONVERT) piping - But I will take another look at it.
As far as I know the -e substitution syntax is more portable than the semicolon syntax because it treats every substitution as a separate “session”. Then the final state of the file is piped to the rsvg-convert library.
Cleaned up this code block so it is readable - but kept the multiple -e substitutions for clarity and easier changes in the future. I looked. into it and the -e substitution syntax is widely supported.