Re: How not to override existing file

2002-08-31 Thread Tom Tromey

> "Sean" == Sean MacLennan <[EMAIL PROTECTED]> writes:

Sean> Ok, I have done that. Now one last question. What is the "correct" way
Sean> to remove a directory when I do not want an error if the directory is
Sean> non-empty.

Sean> rmdir $(DESTDIR)$(rootdir)

If you want to ignore the error, prefix the command with `-'.  That
tells make to ignore it.

If you want to delete the directory even if it has contents, use "rm -rf".
(This is dangerous.)

Tom





Re: How not to override existing file

2002-08-31 Thread Sean MacLennan

Tom Tromey writes:
 > There's no automatic way to do this.
 > But you can write an install-local rule and do it by hand.

Ok, I have done that. Now one last question. What is the "correct" way
to remove a directory when I do not want an error if the directory is
non-empty.

Currently I just do:

  rmdir $(DESTDIR)$(rootdir)

Is this ok?

Cheers,
   Sean






Re: How not to override existing file

2002-08-31 Thread Tom Tromey

> "Sean" == Sean MacLennan <[EMAIL PROTECTED]> writes:

Sean>   sysconf_DATA = gofish.conf

Sean> This works great at installing the conf file. Now I want to
Sean> change it so it will not overwrite an exiting file. Preferably,
Sean> if the file does not exist, it will be installed. If it does,
Sean> the file will be installed as gofish.conf.new but leave the old
Sean> file alone.

There's no automatic way to do this.
But you can write an install-local rule and do it by hand.

Tom





How not to override existing file

2002-08-31 Thread Sean MacLennan


Hi,

I am a beginner to automake. I have setup a simple automake/autoconf
for the GoFish project . The project
has a .conf file. I have the following line in the Makefile.am:

  sysconf_DATA = gofish.conf

This works great at installing the conf file. Now I want to change it
so it will not overwrite an exiting file. Preferably, if the file does
not exist, it will be installed. If it does, the file will be
installed as gofish.conf.new but leave the old file alone.

Thanks,
   Sean MacLennan