vgmstream/bootstrap

32 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

#!/bin/sh
# vgmstream autotools script - automake/autoconf init
# gets all files and updates .am scripts to avoid having to do manually (frowned upon by automake, whatevs)
# maybe there is a better way or place for this
2024-02-11 22:38:35 +01:00
VGMSTREAM_SRCS=`(cd ./src/ && ls *.c */*.c */*/*.c) | tr '\n' ' '`
VGMSTREAM_HDRS=`(cd ./src/ && ls *.h */*.h */*/*.h) | tr '\n' ' '`
AUDACIOUS_SRCS=`(cd ./audacious/ && ls *.cc) | tr '\n' ' '`
AUDACIOUS_HDRS=`(cd ./audacious/ && ls *.h) | tr '\n' ' '`
2021-08-26 22:16:31 +02:00
# in case some distro sed doesn't support | separator and must use /, all slashes need to be escaped first
#VGMSTREAM_SRCS=$(echo "$VGMSTREAM_SRCS" | sed 's/\//\\\//g')
sed -i -e "s|libvgmstream_la_SOURCES =.*|libvgmstream_la_SOURCES = $VGMSTREAM_SRCS|g" ./src/Makefile.autotools.am
sed -i -e "s|EXTRA_DIST =.*|EXTRA_DIST = $VGMSTREAM_HDRS|g" ./src/Makefile.autotools.am
sed -i -e "s|libvgmstream_la_SOURCES =.*|libvgmstream_la_SOURCES = $AUDACIOUS_SRCS|g" ./audacious/Makefile.autotools.am
sed -i -e "s|EXTRA_DIST =.*|EXTRA_DIST = $AUDACIOUS_HDRS|g" ./audacious/Makefile.autotools.am
# make version to show in about dialogs
# again, not very pretty
sh version-make.sh
# create fake files expected by automake and process
touch README AUTHORS NEWS ChangeLog
aclocal
autoheader
autoconf
libtoolize --copy --force
automake -a