#75 minor src/directories.c build tweaks

Craig Leres

The source distribution contains a generated file,
src/directories.c. It probably shouldn't.

For one thing, if the distribution is unpacked by one
user but built by another, make fails trying to update

Making all in trio
Making all in src
make all-recursive
Making all in .
echo "const char *const system_config_file =
\"/usr/local/etc/bogofilter.cf\";" >"directories.c" \ || rm -f "directories.c"
sh: directories.c: cannot create
source='directories.c' object='directories.o' libtool=no \ depfile='.deps/directories.Po'
tmpdepfile='.deps/directories.TPo' \ depmode=gcc /usr/xpg4/bin/sh ../depcomp \ gcc -DHAVE_CONFIG_H -I. -I. -I. -I../trio -I..
-I/usr/local/BerkeleyDB.4.1/include -DBOGOFILTER -g
-O2 -Wall -W -Wstrict-prototypes -Wmissing-prototypes
-Wshadow -Wbad-function-cast -Wcast-qual -Wcast-align
-Wwrite-strings -Waggregate-return
-Wmissing-declarations -Wnested-externs -fno-common
-Wchar-subscripts -Wcomment -Wimplicit -Wreturn-type
-Wformat -Wformat=2 -c directories.c
gcc: directories.c: No such file or directory
gcc: No input files
*** Error code 1
make: Fatal error: Command failed for target
Current working directory
*** Error code 1

The rule for creating directories.c removes it if it
fails; it seems like another improvement might be to
remove directories.c before trying to create it.

- The distribution probably shouldn't include
- The rule for creating directories.c should
probably remove it first.


  • David Relson

    David Relson - 2004-02-16
    • status: open --> closed
  • David Relson

    David Relson - 2004-02-16

    Logged In: YES

    Hi Craig,

    I commend you for your attention to detail and thank you for
    your suggestion.

    The handling of directories.c was changed in
    bogofilter/src/Makefile.am two weeks ago (on 31 January) and
    now works as you've suggested. Update to 0.17.1 to get the
    changed file.


  • Matthias Andree

    Matthias Andree - 2004-02-16
    • status: closed --> closed-fixed
  • Matthias Andree

    Matthias Andree - 2004-02-16

    Logged In: YES

    Craig's point was that a direct overwrite of the file owned
    by anohter user (probably in a shared directory that belongs
    to a user group) failed.

    As an extra rm -f in src/Makefile.am doesn't hurt, I've
    added one.

    Other than that, you're right, the "don't ship" behaviour
    went into bogofilter on --01-31, src/Makefile.am version 1.79.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks