2011-03-17 01:47:30 -04:00
## Need 1.7 for subdir support. (Well, 1.4 doesn't work, I don't know if anything between does.)
AUTOMAKE_OPTIONS = 1.7 foreign
2014-02-10 13:38:53 -06:00
SUBDIRS = bundle src
2011-03-17 01:47:30 -04:00
ACLOCAL_AMFLAGS = -I autoconf/m4
## Black magic (read: sed) for getting the product ID as defined in code, not by the autotools.
## Quotes are making vim's highlighting of this even worse, so just escape everything,
## including the escapes. Make it lowercase to match ArchHooks::MountInitialFileSystems().
2014-09-08 11:01:29 -07:00
## Replace space with - so package build tools won't choke on the installation directory.
productID := $( shell sed -nr /define\\ s+PRODUCT_ID_BARE/\{ s/.*define\\ s+PRODUCT_ID_BARE\\ s+\( .+\) /\\ 1/\; y/ABCDEFGHIJKLMNOPQRSTUVWXYZ\ /abcdefghijklmnopqrstuvwxyz-/\; p\; q\} $( srcdir) /src/ProductInfo.h)
2011-03-17 01:47:30 -04:00
installFiles = src/stepmania
i f H A V E _ G T K
installFiles += src/GtkModule.so
e n d i f
2011-10-10 00:21:53 +02:00
installData = $( srcdir) /Announcers $( srcdir) /BGAnimations $( srcdir) /Themes $( srcdir) /Characters $( srcdir) /Scripts $( srcdir) /Courses $( srcdir) /BackgroundEffects $( srcdir) /Data $( srcdir) /BackgroundTransitions $( srcdir) /Docs $( srcdir) /NoteSkins
2011-03-17 01:47:30 -04:00
.PHONY : SMData
SMData :
$( srcdir) /Utils/CreatePackage.pl $( srcdir) .
dist-hook : SMData
2012-01-12 03:26:08 +02:00
mkdir -p " $( distdir) /Packages "
mv GameData.smzip " $( distdir) /Packages "
cp -r " $( srcdir) /Docs " " $( distdir) "
2011-10-10 00:21:53 +02:00
cp -r -t " $( distdir) " $( installFiles)
install-exec-hook :
2014-09-08 11:09:31 -07:00
mkdir -p " $( DESTDIR) $( prefix) / $( productID) "
$( INSTALL) $( installFiles) " $( DESTDIR) $( prefix) / $( productID) "
2011-03-17 01:47:30 -04:00
2011-10-10 00:21:53 +02:00
install-data-local :
2014-09-08 11:09:31 -07:00
mkdir -p " $( DESTDIR) $( prefix) / $( productID) /Songs "
2014-09-08 11:11:28 -07:00
cp -r -t " $( DESTDIR) $( prefix) / $( productID) " $( installData)
2011-03-17 01:47:30 -04:00
uninstall-hook :
2014-09-08 11:09:31 -07:00
rm -f " $( DESTDIR) $( prefix) / $( productID) /stepmania "
rm -f " $( DESTDIR) $( prefix) / $( productID) /GtkModule.so "
2011-10-10 00:21:53 +02:00
# todo: properly remove data