2008-05-18 19:17:49 +02:00
|
|
|
#!/bin/sh
|
2018-01-04 22:59:07 +01:00
|
|
|
# vgmstream autotools script - automake/autoconf init
|
2008-05-18 19:17:49 +02:00
|
|
|
|
2017-05-01 13:33:45 +02:00
|
|
|
|
|
|
|
# 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
|
|
|
|
VGMSTREAM_SRCS=`(cd ./src/ && ls *.c) | tr '\n' ' '`
|
|
|
|
VGMSTREAM_HDRS=`(cd ./src/ && ls *.h) | tr '\n' ' '`
|
|
|
|
CODING_SRCS=`(cd ./src/coding/ && ls *.c) | tr '\n' ' '`
|
|
|
|
CODING_HDRS=`(cd ./src/coding/ && ls *.h) | tr '\n' ' '`
|
|
|
|
LAYOUT_SRCS=`(cd ./src/layout/ && ls *.c) | tr '\n' ' '`
|
|
|
|
LAYOUT_HDRS=`(cd ./src/layout/ && ls *.h) | tr '\n' ' '`
|
|
|
|
META_SRCS=`(cd ./src/meta/ && ls *.c) | tr '\n' ' '`
|
|
|
|
META_HDRS=`(cd ./src/meta/ && ls *.h) | tr '\n' ' '`
|
2017-05-01 17:08:52 +02:00
|
|
|
AUDACIOUS_SRCS=`(cd ./audacious/ && ls *.cc) | tr '\n' ' '`
|
|
|
|
AUDACIOUS_HDRS=`(cd ./audacious/ && ls *.h) | tr '\n' ' '`
|
2018-01-04 22:59:07 +01:00
|
|
|
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/libcoding_la_SOURCES =.*/libcoding_la_SOURCES = $CODING_SRCS/g" ./src/coding/Makefile.autotools.am
|
|
|
|
sed -i -e "s/EXTRA_DIST =.*/EXTRA_DIST = $CODING_HDRS/g" ./src/coding/Makefile.autotools.am
|
|
|
|
sed -i -e "s/liblayout_la_SOURCES =.*/liblayout_la_SOURCES = $LAYOUT_SRCS/g" ./src/layout/Makefile.autotools.am
|
|
|
|
sed -i -e "s/EXTRA_DIST =.*/EXTRA_DIST = $LAYOUT_HDRS/g" ./src/layout/Makefile.autotools.am
|
|
|
|
sed -i -e "s/libmeta_la_SOURCES =.*/libmeta_la_SOURCES = $META_SRCS/g" ./src/meta/Makefile.autotools.am
|
|
|
|
sed -i -e "s/EXTRA_DIST =.*/EXTRA_DIST = $META_HDRS/g" ./src/meta/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
|
2017-05-01 13:33:45 +02:00
|
|
|
|
|
|
|
# get version to show in about dialogs
|
|
|
|
# again, not very pretty
|
|
|
|
VGMSTREAM_VERSION=`./version.sh`
|
2018-01-04 22:59:07 +01:00
|
|
|
sed -i -e "s/VGMSTREAM_VERSION/$VGMSTREAM_VERSION/g" ./audacious/Makefile.autotools.am
|
2017-05-01 13:33:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
# create fake files expected by automake and process
|
2008-05-18 22:45:30 +02:00
|
|
|
touch README AUTHORS NEWS ChangeLog
|
2008-05-18 19:17:49 +02:00
|
|
|
aclocal
|
|
|
|
autoheader
|
|
|
|
autoconf
|
|
|
|
libtoolize --copy --force
|
2008-05-18 22:45:30 +02:00
|
|
|
automake -a
|