Skip to content

Commit

Permalink
Update build system to use automake, for out-of-source-tree builds
Browse files Browse the repository at this point in the history
Signed-off-by: Miro Kropacek <miro.kropacek@gmail.com>
  • Loading branch information
th-otto authored and mikrosk committed Oct 4, 2018
1 parent 6665773 commit e22a433
Show file tree
Hide file tree
Showing 16 changed files with 506 additions and 274 deletions.
22 changes: 18 additions & 4 deletions .gitignore
@@ -1,17 +1,31 @@
**/CVS
autom4te.cache/
*.o
*.a
/Makefile
/Makefile.in
/src/Makefile
/src/Makefile.in
/DOC/Makefile
/DOC/Makefile.in
/src/atari800
/src/config.h
/src/config.h.in
/src/config.log
/src/config.status
/src/configure
/src/android/bin
/src/android/gen
/src/android/jni/Android.mk
/src/android/libs
/src/android/obj
/src/android/local.properties
/src/android/proguard-project.txt
/config.log
/config.status
/configure
/compile
/missing
/depcomp
/install-sh
autom4te.cache/
/aclocal.m4
.deps
.dirstamp
stamp-*
14 changes: 6 additions & 8 deletions .travis/build.sh
Expand Up @@ -36,8 +36,6 @@ case $tag in
;;
esac

pushd src

NO_CONFIGURE=1 ./autogen.sh

targets="sdl"
Expand All @@ -53,18 +51,20 @@ linux)
do
./configure $common_opts `eval echo \\\$options_${target}`
make
mv atari800 atari800-${target}
mv src/${P} src/${P}-${target}
make clean
done
touch atari800

make DESTDIR="${BUILDROOT}" install || exit 1
for target in $targets
do
install -m 755 src/${P}-${target} "${BUILDROOT}${bindir}"
done
pushd "${BUILDROOT}${bindir}"
ln -sf ${P}-${maintarget} ${P}
popd

popd

install debian/changelog "${BUILDROOT}$docdir/changelog.Debian"
install DOC/ChangeLog "${BUILDROOT}$docdir/ChangeLog"
install DOC/NEWS "${BUILDROOT}$docdir/NEWS"
Expand Down Expand Up @@ -100,14 +100,12 @@ osx)
DMG="${PROJECT_LOWER}-${VERSION}${archive_tag}.dmg"
ARCHIVE="${PROJECT_LOWER}-${ATAG}.dmg"

push src/macosx
pushd src/macosx
xcodebuild -derivedDataPath "$OUT" -project atari800.xcodeproj -configuration Release -scheme Packaging
popd

mv "$OUT/Build/Products/Release/$DMG" "$OUT/$ARCHIVE" || exit 1

popd

;;

esac
Expand Down
37 changes: 37 additions & 0 deletions DOC/Makefile.am
@@ -0,0 +1,37 @@
doc_DATA = README INSTALL USAGE NEWS

EXTRA_DIST = $(doc_DATA) \
BUGS \
BUILD.PS2 \
BUILD.RPI \
BUILD.windows \
CHANGES.OLD \
CHANGES.dc \
CREDITS \
ChangeLog \
FAQ \
HOWTO-DIRTYRECT \
HOWTO-DIRTYSPAN \
INSTALL.dos \
INSTALL.falcon \
INSTALL.ps2 \
INSTALL.wince \
LPTjoy.txt \
PORTING \
PortMaintainers \
README.RPI \
README.android \
README.dc \
README.ps2 \
TESTS.dc \
TODO \
cart.txt \
coverage.txt \
directx.txt \
emuos.txt \
pokeysnd.txt \
r_device.txt \
rdevice_faq.txt \
readme.html.in \
trainer.txt \
$(empty)
8 changes: 8 additions & 0 deletions Makefile.am
@@ -0,0 +1,8 @@
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = foreign

SUBDIRS = DOC src

doc_DATA = COPYING README.1ST

EXTRA_DIST = $(doc_DATA) act data debian util
5 changes: 2 additions & 3 deletions atari800.spec
Expand Up @@ -201,12 +201,11 @@ options_sdl="--with-video=sdl --with-sound=sdl"
#options_ncurses="--with-video=ncurses --with-sound=oss"
#options_x11="--target=x11 --with-sound=oss"

cd src
for target in %{targets}
do
%configure `eval echo \\\$options_${target}`
%{__make} %{?jobs:-j%jobs}
mv atari800 atari800-${target}
mv src/%{name} src/%{name}-${target}
%{__make} clean
done
touch atari800
Expand All @@ -218,7 +217,7 @@ mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_mandir}/man1
for target in %{targets}
do
install -m 755 atari800-$target %{buildroot}/%{_bindir}
install -m 755 %{name}-$target %{buildroot}/%{_bindir}
done
(
cd %{buildroot}/%{_bindir}
Expand Down
6 changes: 6 additions & 0 deletions src/autogen.sh → autogen.sh
@@ -1,7 +1,13 @@
#! /bin/sh

rm -rf autom4te.cache

aclocal -I m4
autoheader
autoconf
automake --add-missing

rm -rf autom4te.cache

echo
echo "Now you need to run the configure script. The configure script may take the"
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit e22a433

Please sign in to comment.