File: multicompobj

package info (click to toggle)
icmake 13.05.01-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,132 kB
  • sloc: cpp: 11,595; fortran: 883; makefile: 853; sh: 546; pascal: 342
file content (60 lines) | stat: -rw-r--r-- 1,337 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# loaded and called from program's build scripts once icm-spch
# and icm-multicomp are available

#   $1 is, e.g., /usr/libexec/icmake/icm-dep

. ../buildscripts/precomp
  
jobs()
{    
    count=0     # use o-file numbers to avoid name collisions

        # all directories to process

    rm -f jobs

    for dir in `find ./ -mindepth 1 -maxdepth 1 -type d | sed 's;./;;'`
    do
        [ $dir == "xerr" ] && continue

        cd $dir

        ls *.cc > /dev/null 2>&1
        if [ $? -eq 0 ] ; 
        then
            echo : $dir . $count >> ../jobs
    
            for file in *.cc            # compile all .cc files in $dir
            do
                echo $file >> ../jobs
            done
        fi 
        cd ..
        let count=$count+1          # next directory nr.
    done
}

build()
{
    precomp -n                  # construct the .gch file and soft-links
    jobs                        # make the multicomp jobs file
                                # use -O2
    export ICMAKE_CPPSTD="${ICMAKE_CPPSTD} -O2"
                                # multi-compile
    ../tmp/usr/libexec/icmake/icm-multicomp -q jobs
                                # created the o-files .tgz
#    tar czf ../tmp/usr/share/icmake/ofiles.tgz *.o
                                # clean up
#    rm -rf spch *.o */*.gch tmp
}