Subject: Re: BSD-make won't do the right thing
To: tech-userlevel <tech-userlevel@netbsd.org>
From: Dave <dgriffi@cs.csubak.edu>
List: tech-userlevel
Date: 10/08/2001 12:41:35
On Mon, 8 Oct 2001, Dave wrote:
> The Very Big Problem I've run into is that I can't do a "make clean" or
> "make distclean" using BSD's make. Rather than make recursing through the
Oops, I should have posted a test case. Following is the simplest source
tree I could think of that demonstrates the problem.
Run generate.sh to set things up and then run configure. Typing "make"
with no parameters will cause src/hello.c to be compiled to hello. Typing
"make clean" or "make distclean" causes:
*** Error code 1
Stop.
Here's the tree:
#!/bin/sh
mkdir badclean
cd badclean
mkdir src
cat << EOF > src/hello.c
#include <stdio.h>
int main(int argc, char *argv[]){printf("Hello World!\n");}
EOF
cat << EOF > src/Makefile.am
bin_PROGRAMS = hello
AUTOMAKE_OPTIONS = foreign
hello_SOURCES = hello.c
EOF
cat << EOF > configure.in
AC_INIT(src/hello.c)
AM_INIT_AUTOMAKE(hello, 1.0)
AC_PROG_CC
AC_OUTPUT(Makefile src/Makefile)
EOF
cat << EOF > Makefile.am
SUBDIRS = src
AUTOMAKE_OPTIONS = foreign
EOF
cat << EOF > generate.sh
#!/bin/sh
# Run this to regenerate configure and Makefile.in and add the usual files
# they want to see.
#
aclocal ; autoheader ; autoconf ; automake --add-missing --foreign
EOF
chmod 755 generate.sh
--
David Griffith
dgriffi@cs.csubak.edu