Nokia Networks Home

Nokia nmake Product Builder

Quick Links

Related Products

Release Notes -- Nokia nmake 3.0

1994
[Table of Contents] [Previous Section] [Next Section]

3. Changes Impacting 2.2 Makefiles

3.1 Changes in Variables

  1. Engine Variable MAKEBUFFERSIZE Has Been Deleted.
    now dynamically allocates buffer space.
  2. Change in Default Value of RMFLAGS.
    The default value of RMFLAGS has been changed from -rf to -f.

3.2 Changes in Assertion Operators

  1. The Variable Expansion Time Changed in :IDENTIFIER: Assertion Operators.
    The variables used in the target and prerequisite positions of the :IDENTIFIER: assertion operator will be expanded at compile time instead of at execution time. For example:
        Tmps = $$(!$(TSPEC):N=*.tbl:B:S=.tmp)
        $(GENHDRS) $(Tmps) :JOINT: $(TSPEC)
        
    To have this 2.2 makefile work in 3.0, $(Tmps) has to be changed to $$(Tmps).
     
    Another example of this is:
        $$(LBINDIR) :INSTALLDIR: pgm
        LBINDIR = $(INSTALLROOT)/lbin
        
    has to be changed to:
        LBINDIR = $(INSTALLROOT)/lbin
        $(LBINDIR) :INSTALLDIR: pgm
        
    so that $(LBINDIR) will have the desired value at the makefile compile time.
  2. :INSTALLDIR: Now Makes Directories to Any Depth
    :INSTALLDIR: now makes the directory specified on the lhs of the operator to the depth as specified. For example,
        $(INCLUDEDIR)/subA/suba :INSTALLDIR: myfile
        
    Here, make the directories of $(INCLUDEDIR), $(INCLUDEDIR/subA, and $(INCLUDEDIR)/subA/suba, if those directories don't exist at installation time.
  3. Changes file permissions in :INSTALLDIR:
    The syntax of change file permissions at installation by using :INSTALLDIR: is changed. The new syntax is
        $(BINDIR) :INSTALLDIR: user=root group=adm mode=4755 file1
        
    where user= is for changing user ID, group= is for, changing group ID, and mode= is for changing permissions of the file.
  4. :LIBRARY: Only Makes .a by Default
    :LIBRARY: makes .a only by default, even if CCFLAGS+=$$(CC.PIC) is on. To make a shared library, one has to have :ALL: in the beginning of the makefile, or give the all or the install common action on the command line.
  5. Output Format of :COMMAND:
    changes the blank space to a new-line ("\n") character after each shell output to the lhs variable of :COMMAND:. For example,
        LIST :COMMAND:
    	    echo A
    	    echo B
        
    The content of LIST was "A B" in 2.2, but now is "A\nB". If one wants to change the new-line character to be a space, one has to edit the variable by using edit operator :C. For example:
        $(LIST:C/$("\n")//)
        

3.3 Changes in Command Line Options

  1. -H (headerstate)
    The Command line Option headerstate (-H) has been deleted.
  2. -x (expandview)
    A new option expandview (-x) has been added. The expandview command line option should be used when using the 3DFS(tm) on the main machine and using coshell to access non-3D machines. The expandview option forces to generate full path names for viewpathing.
  3. -M (mam)
    The -M used with -k (keepgoing) and -x (expandview) causes to generate different output. This may be necessary under certain circumstances. See Section 4.4.3 for details.
  4. User-defined Options
    The definition and usage of a user-defined option, option, have been changed. The definition of the option is now
        -o option=<flag>,<name>[,<type>,<function>]
        
    The flag is the option flag that can be used on the command line associated with - or +. (e.g. -u); the name is the option name that can be used with -o (e.g. -o unconditional); the type is the type of the option, which must be one of b (boolean), s (string), or n (numeric); function is the function name in the Makefile which acts on the value assigned to the option name, given:
        .set.opt: .FUNCTION
    	    set $(%:/0/no/:/1//)force
        
        set option=u,unconditional,b,.set.opt
        
    the usage is either
        nmake -u
        
    or
        nmake -o unconditional
        
    In this example, the flag of the user-defined option is u; the name is unconditional; and the type is boolean; the function name is .set.opt. When the option is used, the function .set.opt will be invoked. In this example, the function sets force or noforce option, depending on whether the user-defined option is used or not.
     
    nmake now also passes the user-defined options to $(-) and $(+).

3.4 Changes in Special Atoms

  1. The special atoms .UNTOUCH, .MAKEPPFLAGS, .MAKEPREREQ, .MAKESCAN, and .PRECIOUS have been deleted.
  2. The special atom .TOUCH has been replaced by .REBIND. The special atom .REBIND supports targets generated in .SOURCE directories.
  3. The special atom .DEBUG now is aliased to .QUERY.
  4. The action of special atom .DONE is now saved in the state files.

3.5 Changes in Edit Operators

  1. :M now uses the egrep pattern matching scheme. For example:
        STRING = abcd 1234 efgh 5678
        SOMEFILE = $(STRING:M=.*[cf8].*)
        

3.6 Changes in Scan Rules

  1. $(.SCAN.)
    $(%) instead of $(.SCAN.) is used in SCAN syntax M (map).
     
    For example, in the following INFORMIX 4gl scan rules:
        .SCAN.4gl : .SCAN
    	    OS
    	    Q|{|}||C|
    	    Q|//||\|LC|
    	    Q|"|"|\|LQ|
    	    Q|'|'|\|LQ|
    	    Q|\|||CS|
    	    I| globals '%' |A.4GL.INCLUDE|
    	    I| globals "%" |A.4GL.INCLUDE|
    	    I| GLOBALS '%' |A.4GL.INCLUDE|
    	    I| GLOBALS "%" |A.4GL.INCLUDE|
    	    I| # FORMDEF '%' |M$$(.SCAN.:/.*/&.frm/)|
    	    I| # formdef '%' |M$$(.SCAN.:/.*/&.frm/)|
    	    I| # FORMDEF "%" |M$$(.SCAN.:/.*/&.frm/)|
    	    I| # formdef "%" |M$$(.SCAN.:/.*/&.frm/)|
        
    the last four lines must be changed to:
    	    I| # FORMDEF '%' |M$$(%:/.*/&.frm/)|
    	    I| # formdef '%' |M$$(%:/.*/&.frm/)|
    	    I| # FORMDEF "%" |M$$(%:/.*/&.frm/)|
    	    I| # formdef "%" |M$$(%:/.*/&.frm/)|
        
    Scanrules are now documented in detail in Appendix G of nmake User's Reference Guide.
  2. Moved $include from .SCAN.F to .SCAN.sql
    The file including format, $include, has been moved from .SCAN.F to .SCAN.sql. If one used .SCAN.F for searching $include, .SCAN.sql should be used for the purpose.

3.7 Changes in cpp

  1. Changes in Option -D
    The notation of -D"#define A a" of cpp has changed to -D"%define A a".
  2. Change in Option -D-M
    By default, 3.0 cpp includes files as they are seen. The meaning of option -D-M is to include files just one time. Files with #pragma pp:multiple on the first line will be included multiple times even if -D-M flag is on.
  3. Change in Option -D-D
    -D-Q replaces -D-D to produce checkpoint dump.
  4. Change in Option -D-dlevel
    -D-dlevel option now is -D-Dlevel to set debugging trace.
  5. Deleted Options -D-K and -D-Q
    -D-K and -D-Q options have been deleted.
  6. Change in Pragma pp:map
    The directive mapping format, %, has been removed. A new scheme of mapping has been added. The format is,
        #pragma pp:map "matching pattern" "editing expression"
        
    For example:
        #pragma pp:map "/#c_include>/" "/#c_include(.*)/__C_INCLUDE__(1)/"
        #define __C_INCLUDE__(x) #include x
        
    This example maps the #c_include directive to be a #include directive.
     
    If one used #pragma pp:map in C source code or modified in probe configuration files, one should change them to the new format.
  7. Deleted Pragmas
    pp:hosted, pp:keyword, pp:passthrough, and pp:quote pragmas have been deleted.

3.8 Change in probe Output

  1. Variable CC.PATH has been changed to CC.CC.

3.9 Changes in coshell

  1. coshell is the network shell coprocess server
    It can establish shell coprocesses to machines producing compatible executables on the local area network and send user jobs to these shells. If coshell is not present in <nmake_install_root>/bin, coshell is not supported for your environment.
  2. ksh version
    The ksh version 11/16/88i (or later) is absolutely required when using coshell. The command what $(whence ksh) should return this version as its output. The SHELL environment variable needs to be set to the ksh 11/16/88i (or later) version for coshell to work.
  3. .profile and $ENV
    The environment of remote shells is initialized by .profile and $ENV. Interactive queries within .profile and $ENV must be disabled for non-interactive shells; otherwise coshell will fail:
        case $- in
        *i*)
    	    query
    	    ...
    	    ;;
        esac
        
    The following variables are set up by coshell and can be referenced in .profile: HOSTNAME, HOSTTYPE, COTEMP.
  4. Generating the Local Host Attribute File
    Local host attribute file contains the names of all the machines that are available in the local area network along with some other pertinent information. The file local.ast provided with the distributed nmake software package (located in <nmake_install_root>/share/lib/cs) is an example.
     
    Two shell scripts, genlocal and genshare, are provided with the distributed nmake software package; they are located in <nmake_install_root>/bin and can be used to generate the local host attribute file. The local host attribute file is shared by all the coshell users. It should be manually updated as hosts are added to or deleted from the local network.
     
    The genshare script is run first to generate information on servers for the network. By default, this information is stored in <nmake_install_root>/lib/cs/share. After this information has been stored, the genlocal script is run to generate the local host attribute file. By default, this information is stored in <nmake_install_root>/share/lib/cs/local.
     
    If the share file generated by the genshare script is not stored in the default path, you must pass its path to the genlocal script using the -f option. For example,
        genlocal -f path_to_share_file
        
    You may modify the generated files to meet your needs.
     
    Please note: coshell requires that the directory <nmake_install_root>/share be at the same location on all the hosts specified in the local file.
     
    The <nmake_install_root>/bin/ss command displays host status information.
  5. Starting coshell
    A ksh function cosh is included in the nmake software package to start/quit coshell. This function resides in the <nmake_install_root>/fun directory. You may access it by including this directory in your FPATH environment variable. cosh starts coshell, cosh -Q kills the coshell server and appends the output of the date and the coshell -t -sl -Q commands to $HOME/.cosh.
     
    This function also adds the word 'coshell' to the title bar of the window which the coshell server is started. The environment variable NPROC is set to 10. The nmake -j command line option takes precedence over the NPROC environment variable. In addition, the environment variable COSHELL is set to coshell.
     
    The value of NPROC can be set to a higher number, and the resulting number of concurrent jobs can be based on the values of the percpu, peruser, perserver, and maxload coshell global attributes. (Please see coshell(1) for details).
     
    coshell uses /tmp to write files. If /tmp is mounted as a swap file system, coshell does not work due to a /tmp bug. To work around this, an environment variable CS_MOUNT_LOCAL needs to be set to another file system where the user has read and write permissions. For example:
        export CS_MOUNT_LOCAL=$nmake_install_root/tmp
        

     
    Files under <nmake_install_root>/share/lib/ss are generated after coshell starts. Each host entry in <nmake_install_root>/share/lib/cs/local has a file of the same name as the host in this directory. For efficiency the system status of the host is compressed into 8 bytes and stored in the time stamp field of each file status and the status is updated every minute. If the contents of <nmake_install_root>/share/lib/cs/local gets changed, the deleted host names should be removed from the <nmake_install_root>/share/lib/ss directory.
  6. Tips on Taking Advantage of coshell
    • A new special atom, .LOCAL has been added to make sure the $(MAKE) command is executed on the local machine (see Section 2.4.1).
          target: .VIRTUAL .LOCAL
      	    cd a
      	    $(MAKE) $(-) $(=)
      	
    • If you have :MAKE: in your makefile, you need to set the base rule variable recurse to an appropriate number n for coshell to distribute jobs from n directories at a time. recurse is set to 1 by default.
    • The environment variable COATTRIBUTES may be used to select machines for job distribution. For example,
          export COATTRIBUTES="(type=='sun3|sun4')"
      	
      can be used when one builds the system for the target machines using a cross-compiler. One may also use this variable in the prerequisite list so that actions in the assertion may be executed on specific machine(s). For example:
          x.o : COATTRIBUTES="(name=='dodo')"
      	    your action
      	
    • The environment variables set or changed after the coshell server has been started can be passed to shells using the COEXPORT environment variable. For example, if PS4 and CHOME are changed to have the following values:
          export PS4='+co'
          export CHOME=$HOME/C++
      	
      the command
          export COEXPORT=PS4:CHOME
      	
      causes these changes to take effect on the other shells.
    • Never put 'coshell -r' in makefiles since coshell does not talk to daemons on other machines.
    • If 3d exists in <nmake_install_root>/bin and COSHELL=coshell, 3DFS(tm) is used.

3.10 Miscellaneous

  1. Change in Metarule Processing
    nmake now supports metarules with multiple rhs patterns:
        %.o : %.ch %.sz 
    	    action
        
  2. Changes in Output
    Two output changes are listed below:
    • The message output starting with *** has make: inserted at the beginning with error level 2. This is consistent with all the other error message formats from nmake.
    • nmake always gives the -I-D option, which points to the probe configuration file name for the compiler used. This option replaces the -D-Xcompiler_path option to speed up cpp preprocessing time.
  3. nmake Won't Create the .mo File in the Top View
    When using viewpathing, nmake now won't drop the .mo file into the top view if the lower level *.mo is up to date.
  4. Main Target Needed in Makefiles
    If there is no main target in a makefile, the probe configuration file name was the prerequisite of .MAIN in 2.2. Now an error message is displayed to notify the user.

[Table of Contents] [Previous Section] [Next Section]

Last Update: Friday,12-Aug-2016 12:29:03 EDT