TABLE OF CONTENTS


::pwtk::outdir_postfix

SYNOPSIS

proc ::pwtk::outdir_postfix {{postfix {}}} {

PURPOSE

Set (or query) the outdir_postfix.

Note that the full "outdir" is: $outdir_prefix/$outdir_postfix. Beware that prior to calling this routine in set mode, the ::pwtk::outdir_prefix command should be called.

RETURN VALUE

SOURCE

    variable QEdir
    
    if { $postfix == "" } {
        return [varvalue QEdir(outdirPostfix)]
    }

    set QEdir(outdirPostfix) $postfix
    
    if { ! [info exists QEdir(outdirPrefix)] } {
        if { [info exists ::env(ESPRESSO_TMPDIR)] } {
            set QEdir(outdirPrefix) $::env(ESPRESSO_TMPDIR)
        }
        ifset QEdir(outdirPrefix) [::fileutil::tempdir]
        warning "do not use outdir_postfix if outdir_prefix is not defined, setting outdir_prefix to $QEdir(outdirPrefix)"
    }
    return [outdir [file join $QEdir(outdirPrefix) $postfix]]
}