Changeset c62275f6 for BLFS/libs


Ignore:
Timestamp:
06/13/2006 01:00:46 PM (18 years ago)
Author:
George Boudreau <georgeb@…>
Branches:
experimental
Children:
d3f24df
Parents:
5d93cec
Message:

housekeeping on func_makefile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BLFS/libs/func_makefile

    r5d93cec rc62275f6  
    1313declare TRACKING_DIR=/var/lib/jhalfs/BLFS
    1414declare BUILDDIR=~/TRIAL
    15 declare LOGDIR=$BUILDDIR/logs
     15
    1616
    1717#----------------------------------#
     
    2525$i:  $PREV
    2626        @\$(call echo_message, Building)
     27        @./progress_bar.sh \$@ &
    2728EOF
    2829) >> $MKFILE.tmp
     
    3233
    3334#----------------------------------#
    34 __write_build_cmd() {              # Some scripts must be run as root..
     35__write_build_cmd() {              #
    3536#----------------------------------#
    3637  local this_script=$1
     
    3839(
    3940cat << EOF
    40         @( time { export LFS=\$(MOUNT_PT) && ${BUILD_SCRIPTS}/$file >>\$(LOGDIR)/$this_script 2>&1 ; } ) 2>>\$(LOGDIR)/$this_script
     41        @( time { export LFS=\$(MOUNT_PT) && ${BUILD_SCRIPTS}/${file} >>logs/${this_script} 2>&1 ; } ) 2>>logs/${this_script}
    4142EOF
    4243) >> $MKFILE.tmp
     
    4647__wrt_touch() {                    #
    4748#----------------------------------#
     49  local pkg_name=$1
    4850(
    4951cat << EOF
    5052        @touch  \$@ && \\
    51         touch /var/lib/jhalfs/BLFS/${1#*-} && \\
     53        touch \$(TRACKING_DIR)/${pkg_name#*-} && \\
    5254        sleep .25 && \\
    5355        echo -e "\n\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
     
    6163__write_entry() {            #
    6264#----------------------------#
    63   local pkg_name=$1
     65  local script_name=$1
    6466
    65   echo "${tab_}${tab_} entry for <$pkg_name>"
     67  echo -n "${tab_}${tab_} entry for <$script_name>"
    6668
    6769  #--------------------------------------------------------------------#
     
    7173  # Drop in the name of the target on a new line, and the previous target
    7274  # as a dependency. Also call the echo_message function.
    73   __wrt_target "${pkg_name}" "$PREV_PACKAGE"
    74   __write_build_cmd "${pkg_name}" "${pkg_name}"
     75  __wrt_target "${script_name}" "$PREV_PACKAGE"
     76  __write_build_cmd "${script_name}" "${script_name}"
    7577
    7678  # Include a touch of the target name so make can check
    7779  # if it's already been made.
    78   __wrt_touch "${pkg_name}"
     80  __wrt_touch "${script_name}"
    7981  #
    8082  #--------------------------------------------------------------------#
    8183  #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
    8284  #--------------------------------------------------------------------#
    83 
     85  echo " .. OK"
    8486}
    8587
     
    114116SRC= /sources
    115117MOUNT_PT= $BUILDDIR
    116 LOGDIR= $LOGDIR
    117118PACKAGE= "`basename $PKGXML .xml`"
     119TRACKING_DIR= $TRACKING_DIR
    118120
    119121BOLD= "[0;1m"
     
    144146) > $MKFILE
    145147
    146  
    147148  cat $MKFILE.tmp >> $MKFILE
    148 
    149149  echo "${tab_}Creating Makefile... ${BOLD}DONE${OFF}"
    150150
     151  rm $MKFILE.tmp
     152
    151153}
Note: See TracChangeset for help on using the changeset viewer.