build your config w/o fancy sed (#43)

This commit is contained in:
Abram Hindle
2018-03-12 16:43:12 -06:00
committed by Mischa Spiegelmock
parent e0a94c4b76
commit a8bb9846bf
3 changed files with 20 additions and 4 deletions

View File

@ -20,3 +20,14 @@ pm_shaders__DATA = src/libprojectM/Renderer/blur.cg \
install-data-local:
test -z $(pkgdatadir) || $(MKDIR_P) $(pm_presets_dir)
find "$(PRESETSDIR)" -type f -exec $(INSTALL_DATA) {} $(pm_presets_dir) \;
# from https://stackoverflow.com/questions/30897170/ac-subst-does-not-expand-variable answer: https://stackoverflow.com/a/30960268
# ptomato https://stackoverflow.com/users/172999/ptomato
src/libprojectM/config.inp: src/libprojectM/config.inp.in Makefile
$(AM_V_GEN)rm -f $@ $@.tmp && \
$(SED) -e "s,%datadir%,$(datadir),"g $< >$@.tmp && \
chmod a-w $@.tmp && \
mv $@.tmp $@
CLEANFILES += src/libprojectM/config.inp

View File

@ -32,9 +32,14 @@ AC_CONFIG_FILES([
src/libprojectM/NativePresetFactory/Makefile
src/libprojectM/MilkdropPresetFactory/Makefile
])
dnl FIXME
dnl AC_CONFIG_FILES([src/libprojectM/config.inp],
dnl [cat src/libprojectM/config.inp | sed -e"s,\${prefix},$prefix," > src/libprojectM/config.inp.b])
dnl from https://stackoverflow.com/questions/30897170/ac-subst-does-not-expand-variable answer: https://stackoverflow.com/a/30960268
dnl ptomato https://stackoverflow.com/users/172999/ptomato
AC_SUBST([PACKAGE])
AC_PROG_SED
AC_CONFIG_FILES([src/libprojectM/config.inp.in])
AC_PREFIX_DEFAULT([/usr/local])

View File

@ -16,6 +16,6 @@ Easter Egg Parameter = 1
Hard Cut Sensitivity = 10 # Lower to make hard cuts more frequent
Aspect Correction = true # Custom Shape Aspect Correction
Preset Path = @datarootdir@/presets # preset location
Preset Path = %datadir%/@PACKAGE@/presets # preset location
Title Font = Vera.ttf
Menu Font = VeraMono.ttf