Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#8640) Target "*.ruleset" at data/nation/Makefile
Home

[Freeciv-Dev] Re: (PR#8640) Target "*.ruleset" at data/nation/Makefile

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8640) Target "*.ruleset" at data/nation/Makefile
From: "Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx>
Date: Mon, 3 May 2004 09:35:17 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8640 >

Jason Short wrote:

  > 1.  I don't like the use of an extra generated file.  Seems like you
> should be able to use an internal variable here instead.

  You mean writing whole 'file' into one variable? Without really 
knowing, I were afraid that there is systems where env variables have 
max size too small for this. Is it portable solution?
  I guess I can write it to compare lines from ruleset_list.txt to 
contents of directory one at a time and to regenerate ruleset_list.txt 
if some line differs. But that would be quite monstrous Makefile line.

> 2.  Are you sure , will never be present in the path?  I recently had a
> similar problem in tests/*.sh and I used \ as the regex separator.  We
> should be consistent here, but I don't know what is best.

  Oh, I noticed that but as I did not found any immediate solution, I 
later forget it.

  I think something like this should work:

  # Escape all '/' characters from $DIR
  SED_FRIENDLY_DIR=$(echo $DIR | sed 's/\//\\\//g')
  echo "do_not_remove_$DIR_do_not_remove" | sed "s/$SED_FRIENDLY_DIR//"

  ...but when I tried to test it in cygwin environment I got only 
segfault :(


  - Caz




[Prev in Thread] Current Thread [Next in Thread]