1
defineReplace(findFile) {
2
    FILE=$$1
3
4
    # LIST=$$(PATH)
5
    # for a reason beyond my knowledge, if i get path list from $$(PATH) and replace all :'s with space,
6
    # i cant iterate the entries with qmake's for loop.
7
    # SO, here's a list of predefined places where to look for executable files..
8
    # Also, i cant rely to find doxygen via system() call since doxygen returns error every time its called
9
    # if it cant find Doxyfile =(
10
11
    LIST  = /bin/ /usr/bin /usr/local/bin /usr/X11R6/bin ~/bin .
12
    LIST += /scratchbox/devkits/cputransp/bin /scratchbox/devkits/maemo3-tools/bin
13
    LIST += /scratchbox/devkits/debian-etch/bin /scratchbox/devkits/doctools/bin
14
    LIST += /scratchbox/devkits/perl/bin /scratchbox/tools/bin /targets/links/arch_tools/bin
15
    LIST += /host_usr/bin /scratchbox/compilers/bin
16
17
    LOCATED=
18
    for(path,LIST) {
19
        exists($${path}/$${FILE}): {
20
            isEmpty(LOCATED):LOCATED=$${path}/$${FILE}
21
        }
22
    }
23
24
    return($${LOCATED})
25
}