[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Build system (was Re: Future of KDE Development)
From:       Alexander Neundorf <neundorf () kde ! org>
Date:       2005-02-20 22:40:01
Message-ID: 200502202340.01067.neundorf () kde ! org
[Download RAW message or body]

On Sunday 20 February 2005 12:02, Harri Porten wrote:
...
> One challenge not so visible yet: portability of commands. We'll have to
> solve the task of accomplishing rules like
>
>   parser:
> 	cd $(srcdir) && \
> 	perl scripts/makeattrs && \
> 	bash scripts/maketags && \
> 	bash scripts/makeprop
>
> in a cross-platform manner. Using conditionals might be one solution but
> this would result in maintenance nightmare. A solution for being able to
> express common tasks like copying of files and execution of commands in a
> platform neutral manner would be advisable IMO.


cmake on the command line:
hammer:~$ cmake -E
CMake Error: cmake version 2.1-20041208
Usage: cmake -E [command] [arguments ...]
Available commands:
  chdir dir cmd [args]... - run command in a given directory
  copy file destination   - copy file to destination (either file or 
directory)
  copy_if_different in-file out-file   - copy file if input has changed
  echo [string]...        - displays arguments as text
  remove file1 file2 ...  - remove the file(s)
  time command [args] ... - run command and return elapsed time

hammer:~$

and from within a makefile:

CONFIGURE_FILE 
Copy a file to another location and modify its contents. 


  CONFIGURE_FILE(InputFile OutputFile 
                 [COPYONLY] [ESCAPE_QUOTES] 
                 [IMMEDIATE] [@ONLY]) 


The Input and Ouput files have to have full paths. This command replaces any 
variables in the input file referenced as ${VAR} or @VAR@ with their values 
as determined by CMake. If a variable is not defined, it will be replaced 
with nothing. If COPYONLY is specified, then then no variable expansion will 
take place.

Bye
Alex
-- 
Work: alexander.neundorf@jenoptik.com - http://www.jenoptik-los.de
Home: neundorf@kde.org                - http://www.kde.org
      alex@neundorf.net               - http://www.neundorf.net
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic