diff --git a/Makefile-std b/Makefile-std index 7ac6fa26..dd30d680 100644 --- a/Makefile-std +++ b/Makefile-std @@ -38,7 +38,7 @@ install-data-hook: file=$(DESTDIR)/$$i ;\ for var in $(REPLACE_VARS) ;\ do \ - perl -p -i -e "s|^$$var\s*=.*|$$var=\"$${!var}\"|" $$file;\ + var="$$var" perl -p -i -e 's|^\Q$$ENV{var}\E\s*=.*|$$ENV{var}="$$ENV{$$ENV{var}}"|' $$file;\ done ;\ done @@ -48,7 +48,7 @@ install-exec-hook: file=$(DESTDIR)/$$i ;\ for var in $(REPLACE_VARS) ;\ do \ - perl -p -i -e "s|^$$var\s*=.*|$$var=\"$${!var}\"|" $$file;\ + var="$$var" perl -p -i -e 's|^\Q$$ENV{var}\E\s*=.*|$$ENV{var}="$$ENV{$$ENV{var}}"|' $$file;\ done ;\ done diff --git a/src/python/Makefile.am b/src/python/Makefile.am index 693b6d9d..6aca9688 100644 --- a/src/python/Makefile.am +++ b/src/python/Makefile.am @@ -29,5 +29,5 @@ src/python/_vars.py: src/python/libsmbios_c/_vars.py configure Makefile config. cp $< $@ for var in $(REPLACE_VARS) ;\ do \ - perl -p -i -e "s|^$$var\s*=.*|$$var=\"$${!var}\"|" $@;\ + var="$$var" perl -p -i -e 's|^\Q$$ENV{var}\E\s*=.*|$$ENV{var}="$$ENV{$$ENV{var}}"|' $@;\ done