Build system (was Re: Future of KDE Development)

Alexander Neundorf neundorf at kde.org
Sun Feb 20 22:40:01 GMT 2005


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 at jenoptik.com - http://www.jenoptik-los.de
Home: neundorf at kde.org                - http://www.kde.org
      alex at neundorf.net               - http://www.neundorf.net




More information about the kde-core-devel mailing list