Nokia Networks Home

Nokia nmake Product Builder

Quick Links

Related Products


Feature Description

The viewpath defines a virtual directory structure, which allows multiple, parallel trees to be viewed as a single tree. Only the topmost node is writable, other nodes are read only. The viewpath allows developers to share code and object files and reference a common base while maintaining private development areas that contain only the files being modified. It allows projects to easily scale to hundreds of users with minimal overhead - each user can have their own viewpath.

The viewpath is often used to separate generated files from source files. This is useful for building on multiple platforms, for working with more then one compiler and for building with different compiler options (eg. -g/-p) while distributing existing generated targets.

Unlike other SCM tools, viewpathing is implemented completely at application level and uses unmodified native file systems.




Build Accuracy

Consequence of Not Having the Feature


The viewpath is defined by the VPATH environment variable, which contains a colon separated list of nodes. Each node is the root of a parallel tree structure. In the following example the current working directory is under the first node (as it must be for the viewpath to be in affect) and all the source code is in the second node. The current directory is initially empty. We copy hello.c from the second node to our work node, make a change, and then rebuild it. hello.c is compiled from our work node but main.o is reused from the second node. The viewpathing is completely automatic after defining the VPATH variable. The Makefile author need not do anything special.

$ pwd

$ export VPATH=/home/richb/work:/build/official

$ ls -l
total 0

$ ls -l /build/official/src
total 44
-rw-r--r--    1 richb    richb          24 Aug 19 15:07 Makefile
-rw-r--r--    1 richb    richb        5911 Aug 19 15:25
-rw-r--r--    1 richb    richb       14324 Aug 19 15:25
-rwxr-xr-x    1 richb    richb        7180 Aug 19 15:25 hello
-rw-r--r--    1 richb    richb          79 Aug 19 15:07 hello.c
-rw-r--r--    1 richb    richb        1280 Aug 19 15:25 hello.o
-rw-r--r--    1 richb    richb          42 Aug 19 15:06 main.c
-rw-r--r--    1 richb    richb        1128 Aug 19 15:25 main.o

$ cat /build/official/src/Makefile
hello :: main.c hello.c

$ cp /build/official/src/hello.c .

$ vi hello.c

$ nmake
+ cc -O -I- -c hello.c
+ cc -O -o hello /build/official/src/main.o hello.o

Example using standard make tool

Standard make tools do not have the notion of the viewpath. Note, the GNU make VPATH is quite different since it specifies a list of regular directories to search for prerequisite files, where nmake specifies a list of parallel trees to treat as a single virtual tree.

Last Update: Friday,12-Aug-2016 10:53:14 EDT