Changeset c62275f6 for BLFS/libs/func_makefile
- Timestamp:
- 06/13/2006 01:00:46 PM (18 years ago)
- Branches:
- experimental
- Children:
- d3f24df
- Parents:
- 5d93cec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/libs/func_makefile
r5d93cec rc62275f6 13 13 declare TRACKING_DIR=/var/lib/jhalfs/BLFS 14 14 declare BUILDDIR=~/TRIAL 15 declare LOGDIR=$BUILDDIR/logs 15 16 16 17 17 #----------------------------------# … … 25 25 $i: $PREV 26 26 @\$(call echo_message, Building) 27 @./progress_bar.sh \$@ & 27 28 EOF 28 29 ) >> $MKFILE.tmp … … 32 33 33 34 #----------------------------------# 34 __write_build_cmd() { # Some scripts must be run as root..35 __write_build_cmd() { # 35 36 #----------------------------------# 36 37 local this_script=$1 … … 38 39 ( 39 40 cat << EOF 40 @( time { export LFS=\$(MOUNT_PT) && ${BUILD_SCRIPTS}/$ file >>\$(LOGDIR)/$this_script 2>&1 ; } ) 2>>\$(LOGDIR)/$this_script41 @( time { export LFS=\$(MOUNT_PT) && ${BUILD_SCRIPTS}/${file} >>logs/${this_script} 2>&1 ; } ) 2>>logs/${this_script} 41 42 EOF 42 43 ) >> $MKFILE.tmp … … 46 47 __wrt_touch() { # 47 48 #----------------------------------# 49 local pkg_name=$1 48 50 ( 49 51 cat << EOF 50 52 @touch \$@ && \\ 51 touch /var/lib/jhalfs/BLFS/${1#*-} && \\53 touch \$(TRACKING_DIR)/${pkg_name#*-} && \\ 52 54 sleep .25 && \\ 53 55 echo -e "\n\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ … … 61 63 __write_entry() { # 62 64 #----------------------------# 63 local pkg_name=$165 local script_name=$1 64 66 65 echo "${tab_}${tab_} entry for <$pkg_name>"67 echo -n "${tab_}${tab_} entry for <$script_name>" 66 68 67 69 #--------------------------------------------------------------------# … … 71 73 # Drop in the name of the target on a new line, and the previous target 72 74 # 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}" 75 77 76 78 # Include a touch of the target name so make can check 77 79 # if it's already been made. 78 __wrt_touch "${ pkg_name}"80 __wrt_touch "${script_name}" 79 81 # 80 82 #--------------------------------------------------------------------# 81 83 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< # 82 84 #--------------------------------------------------------------------# 83 85 echo " .. OK" 84 86 } 85 87 … … 114 116 SRC= /sources 115 117 MOUNT_PT= $BUILDDIR 116 LOGDIR= $LOGDIR117 118 PACKAGE= "`basename $PKGXML .xml`" 119 TRACKING_DIR= $TRACKING_DIR 118 120 119 121 BOLD= "[0;1m" … … 144 146 ) > $MKFILE 145 147 146 147 148 cat $MKFILE.tmp >> $MKFILE 148 149 149 echo "${tab_}Creating Makefile... ${BOLD}DONE${OFF}" 150 150 151 rm $MKFILE.tmp 152 151 153 }
Note:
See TracChangeset
for help on using the changeset viewer.