Kaydet (Commit) b0b969c9 authored tarafından Martin Hollmichel's avatar Martin Hollmichel

preparation for autoconf and automake for dmake

üst d3e05102
bin_PROGRAMS = dmake
dmake_SOURCES = \
infer.c make.c stat.c expand.c dmstring.c hash.c dag.c dmake.c\
path.c imacs.c sysintf.c parse.c getinp.c quit.c state.c\
dmdump.c macparse.c rulparse.c percent.c function.c
dmake_LDADD = unix/libunix.a
SUBDIRS = unix startup
EXTRA_DIST = make.c
bin_PROGRAMS = dmake
# set the include path found by configure
INCLUDES = -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/unix/linux -I$(top_srcdir)/unix -I$(top_srcdir)/unix/linux/gnu
dmake NEWS
Version 4.2
* give dmake automake/autoconf -> configure
## -*- autoconf -*-
dnl set the dmake root
AC_DEFUN(AC_SET_DMAKEROOT,
[
if test "${prefix}" != NONE; then
DMAKEROOT=${prefix}/share/startup/startup.mk
export DMAKEROOT
else
DMAKEROOT=startup.mk
export DMAKEROOT
fi
])
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
PROJECT=dmake
TEST_TYPE=-f
FILE=make.c
DIE=0
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $PROJECT."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile $PROJECT."
echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
test $TEST_TYPE $FILE || {
echo "You must run this script in the top-level $PROJECT directory"
exit 1
}
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
case $CC in
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
esac
if test -z "$ACLOCAL_FLAGS"; then
acdir=`aclocal --print-ac-dir`
m4list="glib.m4 gettext.m4"
for file in $m4list
do
if [ ! -f "$acdir/$file" ]; then
echo "WARNING: aclocal's directory is $acdir, but..."
echo " no file $acdir/$file"
echo " You may see fatal macro warnings below."
echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
echo " environment variable to \"-I /some/dir\", or install"
echo " $acdir/$file."
echo ""
fi
done
fi
echo "Running gettextize... Ignore non-fatal messages."
# Hmm, we specify --force here, since otherwise things dont'
# get added reliably, but we don't want to overwrite intl
# while making dist.
echo "no" | gettextize --copy --force
#
# Really bad hack
echo "Munging po/Makefile.in.in"
sed s%@PACKAGE@%@GETTEXT_PACKAGE@% < po/Makefile.in.in > po/Makefile.in.in.new
mv po/Makefile.in.in.new po/Makefile.in.in
aclocal $ACLOCAL_FLAGS
# optionally feature autoheader
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
automake -a $am_opt
autoconf
cd $ORIGDIR
$srcdir/configure --enable-maintainer-mode --prefix=/usr/local/test "$@"
echo
echo "Now type 'make' to compile $PROJECT."
This diff is collapsed.
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define to empty if the keyword does not work. */
#undef const
/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT
/* Define if utime(file, NULL) sets file's timestamp to the present. */
#undef HAVE_UTIME_NULL
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
/* Define if the setvbuf function takes the buffering type as its second
argument and the buffer pointer as the third, as on System V
before release 3. */
#undef SETVBUF_REVERSED
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
/* Define if you have the getwd function. */
#undef HAVE_GETWD
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
/* Define if you have the strcspn function. */
#undef HAVE_STRCSPN
/* Define if you have the strerror function. */
#undef HAVE_STRERROR
/* Define if you have the strspn function. */
#undef HAVE_STRSPN
/* Define if you have the strstr function. */
#undef HAVE_STRSTR
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define if you have the <sys/dir.h> header file. */
#undef HAVE_SYS_DIR_H
/* Define if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
/* Define if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
This diff is collapsed.
This diff is collapsed.
dnl Process this file with autoconf to produce a configure script.
AC_INIT(acconfig.h)
dnl set the DMAKEROOT
#AC_FUNC_SET_DMAKEROOT
dnl Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
dnl Checks for libraries.
dnl Initialize libtool
#AM_PROG_LIBTOOL
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/file.h sys/time.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
dnl Checks for library functions.
AC_FUNC_MEMCMP
AC_FUNC_SETVBUF_REVERSED
AC_TYPE_SIGNAL
AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(getcwd getwd putenv strcspn strerror strspn strstr)
AC_OUTPUT(Makefile unix/Makefile startup/Makefile startup/unix/Makefile \
startup/unix/linux/Makefile dmakeroot.h )
#AC_OUTPUT(unix/bsd43/Makefile Makefile makefile unix/solaris/Makefile dbug/malloc/makefile unix/Makefile)
dnl ******************************
dnl *** output the whole stuff ***
dnl ******************************
AC_OUTPUT_COMMANDS([
## Generate `dmakeroot.h' in two cases
## 1. `config.status' is run either explicitly, or via configure.
## Esp. not when it is run in `Makefile' to generate makefiles and
## config.h
## 2. CONFIG_OTHER is set explicitly
##
## Case 1 is difficult. We know that `automake' sets one of
## CONFIG_FILES or CONFIG_HEADERS to empty. This heuristic works
## only when AM_CONFIG_HEADER is set, however.
if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
# Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
CONFIG_OTHER=${CONFIG_OTHER:-dmakeroot.h}
fi
outfile=dmakeroot.h-tmp
cat > $outfile <<\_______EOF
/* dmakeroot.h
*
* This is a generated file. Please modify `configure.in'
*/
_______EOF
if test x$prefix != x; then
echo '"DMAKEROOT := '$prefix'/share/startup",' >> $outfile
echo '"OS := '`uname`'",' >> $outfile
fi
if cmp -s $outfile dmakeroot.h; then
echo dmakeroot.h is unchanged
rm -f $outfile
else
mv $outfile dmakeroot.h
fi
])
dnl set the DMAKEROOT
AC_SET_DMAKEROOT
This diff is collapsed.
This diff is collapsed.
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs,v 1.1 2001-04-20 14:15:45 mh Exp $
errstatus=0
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment