Makefile.am: Use global substitutions

This allows us to make more than one of the same replacement in a .in file

https://bugzilla.gnome.org/show_bug.cgi?id=668429
This commit is contained in:
Jasper St. Pierre 2012-01-18 19:39:11 -05:00
parent 46caf6d673
commit d1d4142052

View File

@ -48,15 +48,15 @@ uninstall-hook:
rm -f $(DESTDIR)$(bindir)/gnome-shell rm -f $(DESTDIR)$(bindir)/gnome-shell
generated_script_substitutions = \ generated_script_substitutions = \
-e "s|@bindir[@]|$(bindir)|" \ -e "s|@bindir[@]|$(bindir)|g" \
-e "s|@datadir[@]|$(datadir)|" \ -e "s|@datadir[@]|$(datadir)|g" \
-e "s|@libexecdir[@]|$(libexecdir)|" \ -e "s|@libexecdir[@]|$(libexecdir)|g" \
-e "s|@libdir[@]|$(libdir)|" \ -e "s|@libdir[@]|$(libdir)|g" \
-e "s|@JHBUILD_TYPELIBDIR[@]|$(JHBUILD_TYPELIBDIR)|" \ -e "s|@JHBUILD_TYPELIBDIR[@]|$(JHBUILD_TYPELIBDIR)|g" \
-e "s|@pkgdatadir[@]|$(pkgdatadir)|" \ -e "s|@pkgdatadir[@]|$(pkgdatadir)|g" \
-e "s|@PYTHON[@]|$(PYTHON)|" \ -e "s|@PYTHON[@]|$(PYTHON)|g" \
-e "s|@VERSION[@]|$(VERSION)|" \ -e "s|@VERSION[@]|$(VERSION)|g" \
-e "s|@sysconfdir[@]|$(sysconfdir)|" -e "s|@sysconfdir[@]|$(sysconfdir)|g"
gnome-shell-jhbuild: gnome-shell-jhbuild.in gnome-shell-real Makefile gnome-shell-jhbuild: gnome-shell-jhbuild.in gnome-shell-real Makefile
$(AM_V_GEN) sed $(generated_script_substitutions) $< > $@.tmp && mv $@.tmp $@ && chmod a+x $@ $(AM_V_GEN) sed $(generated_script_substitutions) $< > $@.tmp && mv $@.tmp $@ && chmod a+x $@