first version.
[build-srcpkg.git] / shlib / build-srcpkg / misc / cmdline.shlib
blob6d5ca9087185e5d11ba3e6db01fdee30037f5c5a
3 # features:
4 # @ src list compile
5 # @ gen src list from a subdir, and compile
6 # @ compile a subdir by invoke build in subdir.
7 # @ compile & link for a target in target list.
9 # @ EXT_OBJ_LIST
11 inc fname.shlib
12 inc toolchain.shlib
13 inc param-load.shlib
16 # fsyntax: taskinfo_dbgout <output-string>
17 # fdesc: output string by dbgout switch.
19 taskinfo_dbgout ()
21         if [[ ! "${dbgout_opt}" =~ taskinfo ]]; then
22                 return
23         fi
25         dbgoutd "$@"
26         echo -ne "$@" >> ${OUTDIR}/buildinfo.log
27         return
30 build_subcmd_help ()
32         [[ -n "$usage" ]] && echo $usage
33         exit 0
36 build_subcmd_clean ()
38         echo cleaning ...
39         
40         OBJDIR="$(eval echo ${OBJDIR_FMT})"
42         rm $OBJ_LIST ${OBJDIR} $OUTDIR -rf
43         
44         while read dst; do
45                 [[ -z $dst ]] && continue
46                 eval echo rm "${OUTDIR}${DST_FMT}" -rf
47                 eval rm ${OUTDIR}${DST_FMT} -rf
48         done <<< "$DST_LIST"
49         
50         dirbuild "$@"
53 build_subcmd_all ()
55         construct_init
56         
57         # build src to executables
58         TASK_RUNNING "STEP_BUILD_DEST"
59         
60         # build doc
61         build_subcmd_doc
62 #       TASK_RUNNING "STEP_ODC"
64         # build instpkg
65         build_subcmd_genpkg
66 #       TASK_RUNNING "STEP_INSTPKG"
69 build_subcmd_full ()
71         construct_init
72         
73         # build default platform
74         TASK_RUNNING "STEP_BUILD_DEST"
75         
76         for hwplat in $ARCH_LIST_Y; do
77                 ARCH=$hwplat
78                 echo "===================================="
79                 echo "= build for ARCH=$ARCH"
80                 echo "===================================="
81                 TASK_RUNNING "STEP_BUILD_DEST"
82         done
84         # build doc
85         build_subcmd_doc
87         # build instpkg
88         build_subcmd_instpkg
91 build_subcmd_arch ()
93         ARCH=$1
94         construct_init
95         
96         # build src to executables
97         TASK_RUNNING "STEP_BUILD_DEST"
100 build_subcmd_example ()
102         construct_init
103         
104         [[ ! -e "build/dest/dest-example" ]] && echo "there is no dest named example defined." && exit
106         TASK_RUNNING "STEP_DEFAULT_DEST" example
109 build_subcmd_install ()
111         :
114 build_subcmd_test ()
116         scripttest
119 build_subcmd_doc ()
121         :
124 build_subcmd_config ()
126         :
129 build_subcmd_genpkg ()
131         :
136 # fdesc: general subcmd proc.
138 cmd_opt()
140         while test $# -gt 0; do
141           case $1 in
142                         -f)          force=1;;
143                         -v)          shift; outdir=$1;;
144                         -h)          shift; dirargs="$dirargs -I '$1'"; dirs="$dirs $1";;
145                         bak)
146                                 $0 clean
147                                 dir="$(basename $PWD)"
148                                 file="${dir}-$(date +%Y%m%d).zip"
149                                 cd ..
150                                 mkdir -pv $(dirname $file)
151                                 rm ${file} 2>/dev/null
152                                 echo "zip -r ${file} ${dir}"
153                                 zip -r ${file} ${dir}
154                                 cd - 2>/dev/null
155                                 [[ $SRCBAK_DIR != '../' && $SRCBAK_DIR != '..' ]] && mkdir -pv $SRCBAK_DIR && mv ../$file ${SRCBAK_DIR}/ -f
156                                 exit 0
157                         ;;
158                         gz)         echo TBD; exit 0;;
159                         bz)         echo TBD; exit 0;;
160                         xz)         echo TBD; exit 0;;
161                         
162                         -v)          echo "version: $scriptversion"; exit 0;;
163                         -h)          echo "$usage"; exit 0;;
164                         
165                         help)
166                                 shift
167                                 build_subcmd_help "$@"
168                                 ;;
169                         clean)
170                                 buildflag=clean
171                                 build_subcmd_clean "$@"
172                                 ;;
173                         all)
174                                 buildflag=all
175                                 build_subcmd_all "$@"
176                                 ;;
177                         full)
178                                 buildflag=full
179                                 build_subcmd_full "$@"
180                                 ;;
181                         arch)
182                                 buildflag=arch
183                                 build_subcmd_arch "$@"
184                                 ;;
185                         example)
186                                 buildflag=example
187                                 build_subcmd_example "$@"
188                                 ;;
189                         install)
190                                 buildflag=install
191                                 build_subcmd_install "$@"
192                                 ;;
193                         test)
194                                 buildflag=test
195                                 build_subcmd_test "$@"
196                                 ;;
197                         doc)
198                                 buildflag=doc
199                                 build_subcmd_doc "$@"
200                                 ;;
201                         config)
202                                 buildflag=config
203                                 build_subcmd_config "$@"
204                                 ;;
205                         genpkg)
206                                 buildflag=genpkg
207                                 build_subcmd_genpkg "$@"
208                                 ;;
210                         --version)   echo "$version"; exit 0;;
211                         --help)      echo "$usage"; exit 0;;
212                         -*)
213                                 echo "$0: Unknown option \`$1'." >&2
214                                 echo "$0: Try \`--help' for more information." >&2
215                                 exit 1;;
216                         *)
217                                 if test -z "$PACKAGE"; then
218                                         PACKAGE=$1
219                                 elif test -z "$MANUAL_TITLE"; then
220                                         MANUAL_TITLE=$1
221                                 else
222                                         echo "$0: extra non-option argument \`$1'." >&2
223                                         exit 1
224                                 fi;;
225                 esac
226                 shift
227         done
230 # one_dest_init() in param-load.shlib
231 build_init()
233         [[ ! -z $@ ]] && force=1
234         
235 #       cmpl_load_param
236         
237 #       OBJ_LIST=""
238 #       OBJDIR="$(eval echo ${OBJDIR_FMT})"
240 #       DEST_CFG_DIR_NAME=${DST_LIST}
241 #       fname_dstdir
242 #       fname_objdir
245 srclist ()
247         SRC_LIST="$(
248                 echo
249                 while read line; do
250                         if [[ -n $line ]]; then
251                                 echo ${line}.c
252                                 [[ -f "${line}_test.c" ]] && echo ${line}_test.c
253                         fi
254                 done <<< "$DST_LIST"
255                 echo
256         )"
259 dirbuild ()
261         [[ -z $SUB_SRCDIR_LIST ]] && return
263         for subdir in $SUB_SRCDIR_LIST; do
264                 cd $subdir
265                 [[ ! -f "cmpl.sh" ]] && echo "err: there no cmpl.sh file exist in subdir '$subdir'." && exit -1
267                 # running in subscript, parameters are not changed by sub-script.
268                 ( SUB_SRCDIR_LIST="" ./cmpl.sh "$@" )
269                 [[ $? != 0 ]] && echo "err: builld dir $subdir failed." && exit -1
270                 
271                 cd - 2>/dev/null
272                 STATIC_LIBS+=" ${OUTDIR}lib${subdir##*/}.a"
273 #               STATIC_LIBS+=" ${STATIC_LIB}"
274         done
277 dest_cmpl ()
279         local listname=${1^^}_SRC_LIST_Y
281         if [[ ${1^^} == ASM || ${1^^} == C || ${1^^} == CXX || ${1^^} == CPP ]] ;then
282                 :
283         else
284                 return
285         fi
287         echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
289         OBJDIR="$(eval echo ${OBJDIR_FMT})"
291         echo OBJDIR=$OBJDIR
292         
293         echo \$SRC_LIST=$SRC_LIST
294         
295         for srcfile in ${!listname}; do
296 #               objfile=${srcfile##*/}
297                 objfile="${OBJDIR}${srcfile//\.(S|s|asm|c|cxx|cpp)/\.o}"
298                 echo $srcfile gcc compile to $objfile ...
299                 
300                 if [[ $srcfile -nt $objfile
301 #                       || cmpl.sh -nt $srcfile
302                         || $force == 1
303                         || ! -f $objfile ]]; then
304         #               touch $srcfile
305                         mkdir -p $(dirname $objfile)
306 #                       depfile=${objfile//\.o/\.dep}
307                         
308 #                       SRC_FILE[0]="${srcfile}"
309 #                       DST_FILE[0]="${objfile}"
310 #                       DST_FILE[1]="${objfile//.o/.dep}"
311                         [[ $EN_SRCHDR_DEP == 1 ]] && CCFLAGS_DEPHDR="$CCFLAGS_DEPHDR_EVL"
312                         
313                         tpchk ${srcfile} ${objfile}
314                         [[ $? != 1 ]] && continue;
316 #                       echo $CC ${CFLAGS} $CCFLAGS_DEPHDR -c $srcfile -o $objfile
317 #                       $CC ${CFLAGS} $CCFLAGS_DEPHDR -c $srcfile -o $objfile
319                         echo c2o $srcfile $objfile # $depfile
320                         c2o $srcfile $objfile # $depfile
322                         [[ $? != 0 ]] && echo "gcc($CC) compile ($objfile) failed." && exit -1
324                         size $objfile
325                         force=1
326                 fi
327         done
329         OBJ_LIST=""
330         for srcfile in $${!listname}; do
331 #               objfile=${srcfile##*/}
332                 objfile="$OBJDIR${srcfile%.*}.o"
333                 OBJ_LIST+=" $objfile"
334         done
335         echo OBJ_LIST=$OBJ_LIST
336 exit
339 compile ()
341         local listname=${1^^}_SRC_LIST_Y
343         if [[ ${1^^} == ASM || ${1^^} == C || ${1^^} == CXX || ${1^^} == CPP ]] ;then
344                 :
345         else
346                 return
347         fi
349         echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
351         OBJDIR="$(eval echo ${OBJDIR_FMT})"
353         echo OBJDIR=$OBJDIR
354         
355         echo \$SRC_LIST=$SRC_LIST
356         
357         for srcfile in ${!listname}; do
358 #               objfile=${srcfile##*/}
359                 objfile="${OBJDIR}${srcfile//\.c/\.o}"
360 #               objfile="${srcfile//\.c/\.o}"
361                 echo $srcfile gcc compile to $objfile ...
362                 
363                 if [[ $srcfile -nt $objfile
364 #                       || cmpl.sh -nt $srcfile
365                         || $force == 1
366                         || ! -f $objfile ]]; then
367         #               touch $srcfile
368                         mkdir -p $(dirname $objfile)
369 #                       depfile=${objfile//\.o/\.dep}
370                         
371 #                       SRC_FILE[0]="${srcfile}"
372 #                       DST_FILE[0]="${objfile}"
373 #                       DST_FILE[1]="${objfile//.o/.dep}"
374                         [[ $EN_SRCHDR_DEP == 1 ]] && CCFLAGS_DEPHDR="$CCFLAGS_DEPHDR_EVL"
375                         
376                         tpchk ${srcfile} ${objfile} dest-$2
377                         [[ $? = 1 ]] && continue;
378                         
379 #                       echo $CC ${CFLAGS} $CCFLAGS_DEPHDR -c $srcfile -o $objfile
380 #                       $CC ${CFLAGS} $CCFLAGS_DEPHDR -c $srcfile -o $objfile
382 #                       echo c2o $srcfile $objfile # $depfile
383                         c2o $srcfile $objfile # $depfile
385                         [[ $? != 0 ]] && echo "gcc($CC) compile ($objfile) failed." && exit -1
387                         size $objfile
388                         force=1
389                 fi
390         done
392         OBJ_LIST=""
393         for srcfile in ${!listname}; do
394 #               objfile=${srcfile##*/}
395                 objfile="$OBJDIR${srcfile%\.*}.o"
396                 OBJ_LIST+=" $objfile"
397         done
398 #       echo OBJ_LIST=$OBJ_LIST
401 staticlib ()
403         if [[ true || "${DST_FMT}" == '${dst}' ]]; then
404                 outputfile="${DST_NAME}"
405                 outputfile="${OUTDIR}/${DST_NAME}.a"
407                 flag_link=""
408 #               echo outputfile=$outputfile
409                 objfile=""
410                 [[ ! -f $outputfile ]] && echo dest file is not exist && flag_link=1
411                 for srcfile in $ASM_SRC_LIST_Y $C_SRC_LIST_Y $CXX_SRC_LIST_Y $CPP_SRC_LIST_Y; do
412                         objfile+="${OBJDIR}${srcfile%\.*}.o "
413                         [[ -z $flag_link && "$srcfile" -nt "$outputfile" ]] && flag_link=1 \
414                                 #&& echo $srcfile '-nt' $outputfile && ls -l $srcfile $outputfile
415                         [[ -z $flag_link && "$objfile" -nt "$outputfile" ]] && flag_link=1 \
416                                 #&& echo $objfile '-nt' $outputfile && ls -l $objfile $outputfile
417                 done
418                 [[ $flag_link != 1 ]] && return 2
419                 echo ${outputfile} gcc static lib link ...
420                 
421                 SRC_FILE=( $objfile )
422                 o2lib "" ${DEST_NAME}.a
424                 [[ $? != 0 ]] && echo "gcc link ($(echo $outputfile)) failed." && exit -1
425                 size ${outputfile}
426                 ls -l ${outputfile}
427                 
428                 return
429         fi
432 dynamiclib ()
434         if [[ true || "${DST_FMT}" == '${dst}' ]]; then
435                 outputfile="${DST_NAME}"
436                 outputfile="${OUTDIR}/${DST_NAME}.a"
438                 flag_link=""
439 #               echo outputfile=$outputfile
440                 objfile=""
441                 [[ ! -f $outputfile ]] && echo dest file is not exist && flag_link=1
442                 for srcfile in $ASM_SRC_LIST_Y $C_SRC_LIST_Y $CXX_SRC_LIST_Y $CPP_SRC_LIST_Y; do
443                         objfile+="${OBJDIR}${srcfile%\.*}.o "
444                         [[ -z $flag_link && "$srcfile" -nt "$outputfile" ]] && flag_link=1 \
445                                 #&& echo $srcfile '-nt' $outputfile && ls -l $srcfile $outputfile
446                         [[ -z $flag_link && "$objfile" -nt "$outputfile" ]] && flag_link=1 \
447                                 #&& echo $objfile '-nt' $outputfile && ls -l $objfile $outputfile
448                 done
449                 [[ $flag_link != 1 ]] && return 2
450                 echo ${outputfile} gcc static lib link ...
451                 
452                 SRC_FILE=( $objfile )
453                 o2dll $srcfile ${DEST_NAME}.a
455                 [[ $? != 0 ]] && echo "gcc link ($(echo $outputfile)) failed." && exit -1
456                 size ${outputfile}
457                 ls -l ${outputfile}
458                 
459                 return
460         fi
463 link ()
465         if [[ true || "${DST_FMT}" == '${dst}' ]]; then
466                 outputfile="${DST_LIST%%[[:blank:]]}"
467                 outputfile="${OUTDIR}/${outputfile#*[[:blank:]]}"
469                 flag_link=""
470                 objfile=""
471                 [[ ! -f $outputfile ]] && echo dest file is not exist && flag_link=1
472                 for srcfile in $ASM_SRC_LIST_Y $C_SRC_LIST_Y $CXX_SRC_LIST_Y $CPP_SRC_LIST_Y; do
473                         objfile+="${OBJDIR}${srcfile%\.*}.o "
474                         [[ -z $flag_link && "$srcfile" -nt "$outputfile" ]] && flag_link=1 \
475                                 #&& echo $srcfile '-nt' $outputfile && ls -l $srcfile $outputfile
476                         [[ -z $flag_link && "$objfile" -nt "$outputfile" ]] && flag_link=1 \
477                                 #&& echo $objfile '-nt' $outputfile && ls -l $objfile $outputfile
478                 done
479                 [[ $flag_link != 1 ]] && return
480                 echo $outputfile gcc link ...
481                 
482                 #
483                 # XXX: pay attenssion on the sequence of -lxxx parameter.
484                 # it would leading link error in un-suitable sequence.
485                 #
486                 SRC_FILE=( $objfile )
487                 o2exe "" $(basename $outputfile)
489                 [[ $? != 0 ]] && echo "gcc link ($(echo $outputfile)) failed." && exit -1
490                 size $outputfile
491                 ls -l $outputfile
492                 
493                 return
494         fi
497 exelist ()
499 #       OBJDIR="$(eval echo ${OBJDIR_FMT})"
501         if [[ true || "${DST_FMT}" == '${dst}' ]]; then
502                 outputfile="${DST_LIST%%[[:blank:]]}"
503                 outputfile="${OUTDIR}/${outputfile#*[[:blank:]]}"
505 #               OBJ_LIST=""
506                 flag_link=""
507                 echo outputfile=$outputfile
508                 objfile=""
509                 [[ ! -f $outputfile ]] && echo dest file is not exist && flag_link=1
510                 for srcfile in $ASM_SRC_LIST_Y $C_SRC_LIST_Y $CXX_SRC_LIST_Y $CPP_SRC_LIST_Y; do
511 #                       srcfile=${srcfile##*/}
512                         objfile+="${OBJDIR}${srcfile%\.*}.o "
513                         echo srcfile=$srcfile
514                         echo objfile=$objfile
515 #                       OBJ_LIST+=" $objfile"
516                         [[ -z $flag_link && "$srcfile" -nt "$outputfile" ]] && flag_link=1 \
517                                 #&& echo $srcfile '-nt' $outputfile && ls -l $srcfile $outputfile
518                         [[ -z $flag_link && "$objfile" -nt "$outputfile" ]] && flag_link=1 \
519                                 #&& echo $objfile '-nt' $outputfile && ls -l $objfile $outputfile
520                 done
521                 [[ $flag_link != 1 ]] && return
522                 echo $outputfile gcc link ...
523                 
524         for file in $STATIC_LIBS; do
525             file="${file//.a/}";
526             STATIC_LINK_LIBS+=" ${file//*lib/-l}";
527         done
529                 #
530                 # XXX: pay attenssion on the sequence of -lxxx parameter.
531                 # it would leading link error in un-suitable sequence.
532                 #
534 #               echo "$LINK -L${OUTDIR} $OBJ_LIST -o $outputfile ${STATIC_LINK_LIBS}  $LDFLAGS "
535 #               $LINK -L${OUTDIR} $OBJ_LIST -o $outputfile ${STATIC_LINK_LIBS} $LDFLAGS 
537                 SRC_FILE=( $objfile )
538                 echo SRC_FILE=${SRC_FILE[@]}
539                 o2exe "" $(basename $outputfile)
541                 [[ $? != 0 ]] && echo "gcc link ($(echo $outputfile)) failed." && exit -1
542                 size $outputfile
543                 ls -l $outputfile
544                 
545                 return
546         fi
547         
548         for dst in $DST_LIST; do
549                 outputfile="${OUTDIR}$(eval echo ${DST_FMT})"
550                 echo $outputfile gcc build ...
551                 
552                 objfile1="${OBJDIR}${dst}.o"
553                 objfile2="${OBJDIR}${dst}_test.o"
554                 if [[ $outputfile -nt $objfile1 || $outputfile -nt $objfile2
555                         || build.sh -nt $outputfile
556                         || $force == 1
557                         || ! -f $outputfile ]]; then
558                         echo "$LINK $LDFLAGS $SLIB_LIST $objfile1 $objfile2 -o $outputfile"
559                         $LINK $LDFLAGS $SLIB_LIST $objfile1 $objfile2 -o $outputfile
560                         [[ $? != 0 ]] && echo "gcc($CC) link ($outputfile) failed." && exit -1
561                         size $outputfile
562                 fi
563         done
566 update_param ()
568         CFLAGS="${MACRO_DEF} ${INC_PATHS} ${MISC_CFLAGS} "
569         echo CFLAGS="\"$CFLAGS\""
570         LDFLAGS="${INC_LIBS} ${MISC_LDFLAGS} "
573 pre_build ()
575         g_pre_build
578 build_all_dest ()
580         local DEST=
582         pre_build
583 #       g_pre_build
585         for DEST in $(cat build/dest/dest.list); do
586                 [[ -z $DEST ]] && continue
587                 one_dest_init $DEST
588                 build_dest $DEST
589         done
592 build_dest ()
594 #       src_param_init
595         build_init
596 #       update_param
597 #       srclist
598 #       dirbuild "$@"
599         compile C
600         link
601 #       link > link.txt 2>&1
604 build_proc ()
606         if [[ $flag_clean != 1 ]]; then
607                 construct_init
608                 
609                 TASK_RUNNING "STEP_BUILD_DEST"
610         else
611                 build_clean
612                 dirbuild "$@"
613         fi
617 ##########################################################################
626 link_bak ()
628 #       OBJDIR="$(eval echo ${OBJDIR_FMT})"
630         if [[ true || "${DST_FMT}" == '${dst}' ]]; then
631                 outputfile="${DST_LIST%%[[:blank:]]}"
632                 outputfile="${OUTDIR}/${outputfile#*[[:blank:]]}"
634 #               OBJ_LIST=""
635                 flag_link=""
636                 echo outputfile=$outputfile
637                 objfile=""
638                 [[ ! -f $outputfile ]] && echo dest file is not exist && flag_link=1
639                 for srcfile in $ASM_SRC_LIST_Y $C_SRC_LIST_Y $CXX_SRC_LIST_Y $CPP_SRC_LIST_Y; do
640 #                       srcfile=${srcfile##*/}
641                         objfile+="${OBJDIR}${srcfile%\.*}.o "
642                         echo srcfile=$srcfile
643                         echo objfile=$objfile
644 #                       OBJ_LIST+=" $objfile"
645                         [[ -z $flag_link && "$srcfile" -nt "$outputfile" ]] && flag_link=1 \
646                                 #&& echo $srcfile '-nt' $outputfile && ls -l $srcfile $outputfile
647                         [[ -z $flag_link && "$objfile" -nt "$outputfile" ]] && flag_link=1 \
648                                 #&& echo $objfile '-nt' $outputfile && ls -l $objfile $outputfile
649                 done
650                 [[ $flag_link != 1 ]] && return
651                 echo $outputfile gcc link ...
652                 
653         for file in $STATIC_LIBS; do
654             file="${file//.a/}";
655             STATIC_LINK_LIBS+=" ${file//*lib/-l}";
656         done
658                 #
659                 # XXX: pay attenssion on the sequence of -lxxx parameter.
660                 # it would leading link error in un-suitable sequence.
661                 #
663 #               echo "$LINK -L${OUTDIR} $OBJ_LIST -o $outputfile ${STATIC_LINK_LIBS}  $LDFLAGS "
664 #               $LINK -L${OUTDIR} $OBJ_LIST -o $outputfile ${STATIC_LINK_LIBS} $LDFLAGS 
666                 SRC_FILE=( $objfile )
667                 echo SRC_FILE=${SRC_FILE[@]}
668                 o2exe "" $(basename $outputfile)
670                 [[ $? != 0 ]] && echo "gcc link ($(echo $outputfile)) failed." && exit -1
671                 size $outputfile
672                 ls -l $outputfile
673                 
674                 return
675         fi
676         
677         for dst in $DST_LIST; do
678                 outputfile="${OUTDIR}$(eval echo ${DST_FMT})"
679                 echo $outputfile gcc build ...
680                 
681                 objfile1="${OBJDIR}${dst}.o"
682                 objfile2="${OBJDIR}${dst}_test.o"
683                 if [[ $outputfile -nt $objfile1 || $outputfile -nt $objfile2
684                         || build.sh -nt $outputfile
685                         || $force == 1
686                         || ! -f $outputfile ]]; then
687                         echo "$LINK $LDFLAGS $SLIB_LIST $objfile1 $objfile2 -o $outputfile"
688                         $LINK $LDFLAGS $SLIB_LIST $objfile1 $objfile2 -o $outputfile
689                         [[ $? != 0 ]] && echo "gcc($CC) link ($outputfile) failed." && exit -1
690                         size $outputfile
691                 fi
692         done
695 #########################################################################
697 if [[ false ]]; then
699 # . platform/
701 # default param
703 CC="gcc"
704 LINK="gcc"
705 AR="ar"
706 O2LIB_CMD_EVL='${AR} ${ARFLAGS} ${outputfile}.a $(echo ${OBJ_LIST})'
707 ARFLAGS=" cr"
708 DST_FMT='${dst}'
709 OUTDIR_FMT='${PWD}/output/'
710 [[ -z $OUTDIR ]] && export OUTDIR="$PWD/output/"        # it must have a '/' at last.
711 OBJDIR_FMT='${DSTDIR}/obj/'
712 OBJDIR="${OUTDIR}/obj/"
713 SRCBAK_DIR=${SRCBAK_DIR='../'}