Skip to content

Commit

Permalink
autoconf, makefile, build cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
chu11 committed Apr 19, 2005
1 parent ea4f30b commit 5b843e3
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 76 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2005-04-19 Albert Chu <[email protected]>

* Autoconf, Makefile, Built cleanup.

2005-02-03 Albert Chu <[email protected]>

* tagged pre_dist2_err_msg_cleanup
Expand Down
14 changes: 14 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
##
# $Id: autogen.sh,v 1.1 2005-04-19 23:53:52 achu Exp $
##

PATH=/bin:/usr/bin:/usr/local/bin

set -x
aclocal -I config || exit 1
libtoolize --copy || exit 1
autoheader || exit 1
automake --add-missing --copy --gnu || exit 1
autoconf --warnings=all || exit 1
exit 0
16 changes: 0 additions & 16 deletions bootstrap

This file was deleted.

32 changes: 32 additions & 0 deletions config/ac_perl_install_destdir.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
##*****************************************************************************
## $Id: ac_perl_install_destdir.m4,v 1.1 2005-04-19 23:53:52 achu Exp $
##*****************************************************************************

# - Used almost exclusively so perl install works with rpm builds
AC_DEFUN([AC_PERL_INSTALL_DESTDIR],
[
AC_MSG_CHECKING(for --with-perl-install-destdir )
AC_ARG_WITH(perl-install-destdir,
AC_HELP_STRING([--with-perl-install-destdir=path],
[define perl modules install prefix]),
[ case "$withval" in
yes)
withperllinstalldestdir=yes
;;
no)
;;
*)
withperllinstalldestdir=yes
PERL_INSTALL_DESTDIR="$withval"
;;
esac ]
)
AC_MSG_RESULT(${withperllinstalldestdir=no})
if test -z "$PERL_INSTALL_DESTDIR"; then
PERL_INSTALL_PREFIX='${prefix}'
else
PERL_INSTALL_PREFIX='${PERL_INSTALL_DESTDIR}${prefix}'
fi
AC_SUBST(PERL_INSTALL_DESTDIR)
AC_SUBST(PERL_INSTALL_PREFIX)
])
38 changes: 7 additions & 31 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##*****************************************************************************
## $Id: configure.ac,v 1.17 2005-01-10 23:42:25 achu Exp $
## $Id: configure.ac,v 1.18 2005-04-19 23:53:52 achu Exp $
##*****************************************************************************
## Process this file with autoconf to produce a configure script.
##*****************************************************************************
Expand Down Expand Up @@ -46,32 +46,6 @@ PERLGENDERSLLNL_MINOR=01
PERLGENDERSLLNL_VERSION=$PERLGENDERSLLNL_MAJOR.$PERLGENDERSLLNL_MINOR
AC_SUBST([PERLGENDERSLLNL_VERSION])

# Perl Install Destdir
# - Used almost exclusively so perl install works with rpm builds
AC_MSG_CHECKING(for --with-perl-install-destdir )
AC_ARG_WITH(perl-install-destdir,
AC_HELP_STRING([--with-perl-install-destdir=path], [define perl modules ins\tall prefix]),
[ case "$withval" in
yes)
withperllinstalldestdir=yes
;;
no)
;;
*)
withperllinstalldestdir=yes
PERL_INSTALL_DESTDIR="$withval"
;;
esac ]
)
AC_MSG_RESULT(${withperllinstalldestdir=no})
if test -z "$PERL_INSTALL_DESTDIR"; then
PERL_INSTALL_PREFIX='${prefix}'
else
PERL_INSTALL_PREFIX='${PERL_INSTALL_DESTDIR}${prefix}'
fi
AC_SUBST(PERL_INSTALL_DESTDIR)
AC_SUBST(PERL_INSTALL_PREFIX)

##
# Checks for programs.
##
Expand All @@ -80,6 +54,7 @@ AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
AM_CONDITIONAL(WITH_GNU_LD, test "$with_gnu_ld" = "yes")
AC_PATH_PROG(PERL, perl)
AC_DEBUG

##
# Checks for header files.
Expand All @@ -94,6 +69,11 @@ AC_CHECK_HEADERS( \
genders.h \
)

#
# Check for perl install destdir
#
AC_PERL_INSTALL_DESTDIR

##
# Checks for typedefs, structures, and compiler characteristics.
##
Expand Down Expand Up @@ -121,10 +101,6 @@ AC_CHECK_FUNCS( \
AC_CHECK_LIB(genders, genders_handle_create, ,
AC_MSG_ERROR([libgenders must be installed]))

# Do this last, you could add compile options which can make
# function checks fail
AC_DEBUG

##
# Epilogue.
##
Expand Down
14 changes: 5 additions & 9 deletions src/Gendersllnl/Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ use ExtUtils::MakeMaker;
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'Gendersllnl',
'VERSION_FROM' => 'Gendersllnl.pm', # finds $VERSION
'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'Gendersllnl.pm', # retrieve abstract from module
AUTHOR => 'A. U. Thor <[email protected]>') : ()),
'LIBS' => [''], # e.g., '-lm'
'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
# Insert -I. if you add *.h files later:
'INC' => '', # e.g., '-I/usr/include/other'
'VERSION_FROM' => 'Gendersllnl.pm',
'PREREQ_PM' => {},
($] >= 5.005 ?
(ABSTRACT_FROM => 'Gendersllnl.pm',
AUTHOR => 'Albert Chu <[email protected]>') : ()),
);
8 changes: 5 additions & 3 deletions src/Gendersllnl/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##*****************************************************************************
## $Id: Makefile.am,v 1.14 2005-01-10 23:42:25 achu Exp $
## $Id: Makefile.am,v 1.15 2005-04-19 23:53:52 achu Exp $
##*****************************************************************************
## Process this file with automake to produce Makefile.in.
##*****************************************************************************
Expand All @@ -12,8 +12,10 @@
PERL_INSTALL_DESTDIR = @PERL_INSTALL_DESTDIR@
PERL_INSTALL_PREFIX = @PERL_INSTALL_PREFIX@

MAKEMAKERFLAGS = INSTALLDIRS=site SITEPREFIX=$(PERL_INSTALL_PREFIX) \
MAKEFILE=Makefile.xs FIRST_MAKEFILE=Makefile.xs
MAKEMAKERFLAGS = INSTALLDIRS=site \
SITEPREFIX=$(PERL_INSTALL_PREFIX) \
MAKEFILE=Makefile.xs \
FIRST_MAKEFILE=Makefile.xs

all: Makefile.xs
$(MAKE) -f Makefile.xs
Expand Down
14 changes: 4 additions & 10 deletions src/Libgendersllnl/Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@ use ExtUtils::MakeMaker;
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'Libgendersllnl',
'VERSION_FROM' => 'Libgendersllnl.pm', # finds $VERSION
'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'Libgendersllnl.pm', # retrieve abstract from module
'VERSION_FROM' => 'Libgendersllnl.pm',
'PREREQ_PM' => {},
($] >= 5.005 ?
(ABSTRACT_FROM => 'Libgendersllnl.pm',
AUTHOR => 'Albert Chu <[email protected]>') : ()),
'LIBS' => ['-lgenders'], # e.g., '-lm'
'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
# Insert -I. if you add *.h files later:
'INC' => '', # e.g., '-I/usr/include/other'
# Un-comment this if you add C files to link with later:
'OBJECT'=> '$(O_FILES)', # link all the C files too
);
18 changes: 11 additions & 7 deletions src/Libgendersllnl/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##*****************************************************************************
## $Id: Makefile.am,v 1.13 2005-01-10 23:42:25 achu Exp $
## $Id: Makefile.am,v 1.14 2005-04-19 23:53:52 achu Exp $
##*****************************************************************************
## Process this file with automake to produce Makefile.in.
##*****************************************************************************
Expand All @@ -11,17 +11,21 @@
# make time, so this is our work around
PERL_INSTALL_PREFIX = @PERL_INSTALL_PREFIX@

MAKEMAKERFLAGS = INSTALLDIRS=site SITEPREFIX=$(PERL_INSTALL_PREFIX) \
MAKEFILE=Makefile.xs FIRST_MAKEFILE=Makefile.xs
PERL_INC = "-I../../config -I$(srcdir)/../libgendersllnl"

PERL_LIBS = "-L../libgendersllnl/.libs -lgendersllnl"

MAKEMAKERFLAGS = INSTALLDIRS=site \
SITEPREFIX=$(PERL_INSTALL_PREFIX) \
INC=$(PERL_INC) \
LIBS=$(PERL_LIBS) \
MAKEFILE=Makefile.xs \
FIRST_MAKEFILE=Makefile.xs

all: Makefile.xs
$(MAKE) -f Makefile.xs

Makefile.xs: Makefile.PL Libgendersllnl.xs Libgendersllnl.pm
cp $(srcdir)/../libgendersllnl/gendersllnl.c .
cp $(srcdir)/../libgendersllnl/gendersllnl.h .
cp $(srcdir)/../libgendersllnl/hostlist.c .
cp $(srcdir)/../libgendersllnl/hostlist.h .
# Hacks to make distcheck work
if ! test -a Makefile.PL; then \
cp $(srcdir)/Makefile.PL .; \
Expand Down

0 comments on commit 5b843e3

Please sign in to comment.