Skip to content

Commit

Permalink
Simplify autogen.sh using autoreconf only
Browse files Browse the repository at this point in the history
Add AC_CONFIG_AUX_DIR([config]) to configure.ac
AM_INIT_AUTOMAKE after AC_CONFIG_AUX_DIR to avoid one error in
autotools
Not add foreign to AM_INIT_AUTOMAKE, instead add subdir-objects

Use symlinks to required files:
Makefile.am: error: required file './AUTHORS' not found
Makefile.am: error: required file './ChangeLog' not found
Makefile.am: installing './COPYING' using GNU General Public License v3 file
  • Loading branch information
sergiomb2 committed Mar 25, 2018
1 parent 4af9c18 commit 8f5d145
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 44 deletions.
49 changes: 8 additions & 41 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,50 +35,17 @@ if expr "$confver" \> "$gettext_version" >/dev/null; then
exit 1
fi

# Force intl regenration to get last update from installed gettext templates
rm -rf intl/*
#if [ ! -d intl ]; then
echo "Setting up internationalization files."
autopoint --force
if grep -q datarootdir po/Makefile.in.in; then
echo autopoint honors dataroot variable, not patching.
else
echo autopoint does not honor dataroot variable, patching.
sed -e '/^datadir *=/a\
datarootdir = @datarootdir@' po/Makefile.in.in > po/Makefile.in.in.tmp && mv -f po/Makefile.in.in.tmp po/Makefile.in.in
sed -e '/^datadir *=/a\
datarootdir = @datarootdir@' intl/Makefile.in > intl/Makefile.in.tmp && mv -f intl/Makefile.in.tmp intl/Makefile.in
fi
UNAME=`uname`
if [ x$UNAME = x"Darwin" ]; then
echo Not patching po/Makefile.in.in - sed is too old.
else
sed -e '/^clean:/a\
rm -f *.gmo' po/Makefile.in.in > po/Makefile.in.in.tmp && mv -f po/Makefile.in.in.tmp po/Makefile.in.in
fi
# if [ -f Makefile -a -x config.status ]; then
# CONFIG_FILES=intl/Makefile CONFIG_HEADERS= /bin/sh ./config.status
# fi
# gettextize --intl -f --no-changelog
# echo "restoring Makefile.am and configure.ac"
# cp -f Makefile.am~ Makefile.am
# cp -f configure.ac~ configure.ac
#fi

echo "Running aclocal -I m4"
aclocal -I m4

echo "Running autoheader"
autoheader

echo "Running autoconf"
autoconf

echo "Creating pixmaps Makefile.am"
OLDPWD="`pwd`"
cd src/pixmaps/flags_xpm
./makeflags.sh
cd "$OLDPWD"

echo "Running automake --foreign -a -c -f"
automake --foreign -a -c -f
touch NEWS
ln -s docs/README
ln -s docs/AUTHORS
ln -s docs/Changelog ChangeLog
ln -s docs/COPYING

echo "Running autoreconf --install"
autoreconf --install
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@
#

AC_INIT([aMule],[SVN],[[email protected]])
AM_INIT_AUTOMAKE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])

AC_PREREQ(2.59)

AC_CONFIG_SRCDIR([src/amule.cpp])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE([subdir-objects])
AM_MAINTAINER_MODE

dnl Check host system.
Expand Down
3 changes: 1 addition & 2 deletions docs/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
SUBDIRS = man

dist_doc_DATA = \
ABOUT-NLS \
amulesig.txt \
Changelog \
INSTALL \
license.txt \
COPYING \
README \
TODO \
EC_Protocol.txt
Expand Down

0 comments on commit 8f5d145

Please sign in to comment.