source: LFS/master.sh@ 63b87af

2.3 2.3.x 2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since 63b87af was 8426d1f, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Skip linux-headers reinstallation from iterative builds.

  • Property mode set to 100644
File size: 17.3 KB
RevLine 
[91ff6a9]1#!/bin/bash
[877cc6a]2
3# $Id$
4
5###################################
6### FUNCTIONS ###
7###################################
8
9
[045b2dc]10#############################################################
11
12
[877cc6a]13#----------------------------#
[045b2dc]14chapter4_Makefiles() { #
[877cc6a]15#----------------------------#
[045b2dc]16 echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter4 ( SETUP ) ${R_arrow}"
[877cc6a]17
[6ad5a2f]18# If /home/$LUSER is already present in the host, we asume that the
[877cc6a]19# lfs user and group are also presents in the host, and a backup
20# of their bash init files is made.
21(
22 cat << EOF
23020-creatingtoolsdir:
24 @\$(call echo_message, Building)
[cee9568]25 @mkdir \$(MOUNT_PT)/tools && \\
26 rm -f /tools && \\
27 ln -s \$(MOUNT_PT)/tools / && \\
[e2ef100]28 touch \$@ && \\
[4a444f1]29 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
30 echo --------------------------------------------------------------------------------\$(WHITE)
[877cc6a]31
32021-addinguser: 020-creatingtoolsdir
33 @\$(call echo_message, Building)
[6ad5a2f]34 @if [ ! -d /home/\$(LUSER) ]; then \\
35 groupadd \$(LGROUP); \\
36 useradd -s /bin/bash -g \$(LGROUP) -m -k /dev/null \$(LUSER); \\
[877cc6a]37 else \\
[6ad5a2f]38 touch luser-exist; \\
[877cc6a]39 fi;
[6ad5a2f]40 @chown \$(LUSER) \$(MOUNT_PT)/tools && \\
[ac35c8e]41 chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
42 chmod a+wt \$(SRCSDIR) && \\
[e2ef100]43 touch \$@ && \\
[4a444f1]44 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
45 echo --------------------------------------------------------------------------------\$(WHITE)
[877cc6a]46
47022-settingenvironment: 021-addinguser
48 @\$(call echo_message, Building)
[6ad5a2f]49 @if [ -f /home/\$(LUSER)/.bashrc -a ! -f /home/\$(LUSER)/.bashrc.XXX ]; then \\
50 mv /home/\$(LUSER)/.bashrc /home/\$(LUSER)/.bashrc.XXX; \\
[877cc6a]51 fi;
[6ad5a2f]52 @if [ -f /home/\$(LUSER)/.bash_profile -a ! -f /home/\$(LUSER)/.bash_profile.XXX ]; then \\
53 mv /home/\$(LUSER)/.bash_profile /home/\$(LUSER)/.bash_profile.XXX; \\
[877cc6a]54 fi;
[6ad5a2f]55 @echo "set +h" > /home/\$(LUSER)/.bashrc && \\
56 echo "umask 022" >> /home/\$(LUSER)/.bashrc && \\
57 echo "LFS=\$(MOUNT_PT)" >> /home/\$(LUSER)/.bashrc && \\
58 echo "LC_ALL=POSIX" >> /home/\$(LUSER)/.bashrc && \\
59 echo "PATH=/tools/bin:/bin:/usr/bin" >> /home/\$(LUSER)/.bashrc && \\
60 echo "export LFS LC_ALL PATH" >> /home/\$(LUSER)/.bashrc && \\
61 echo "source $JHALFSDIR/envars" >> /home/\$(LUSER)/.bashrc && \\
62 chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
[877cc6a]63 touch envars && \\
[045b2dc]64 chown \$(LUSER) envars && \\
[e2ef100]65 touch \$@ && \\
[4a444f1]66 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
67 echo --------------------------------------------------------------------------------\$(WHITE)
[877cc6a]68EOF
[045b2dc]69) > $MKFILE.tmp
70
71 chapter4=" 020-creatingtoolsdir 021-addinguser 022-settingenvironment"
[877cc6a]72}
73
[045b2dc]74
75
[877cc6a]76#----------------------------#
77chapter5_Makefiles() {
78#----------------------------#
[045b2dc]79 echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter5 ( LUSER ) ${R_arrow}"
[877cc6a]80
81 for file in chapter05/* ; do
82 # Keep the script file name
83 this_script=`basename $file`
84
85 # If no testsuites will be run, then TCL, Expect and DejaGNU aren't needed
[a241c33]86 # Fix also locales creation when running chapter05 testsuites (ugly)
[877cc6a]87 case "${this_script}" in
88 *tcl) [[ "${TEST}" = "0" ]] && continue ;;
89 *expect) [[ "${TEST}" = "0" ]] && continue ;;
90 *dejagnu) [[ "${TEST}" = "0" ]] && continue ;;
[401f81e]91 *stripping) [[ "${STRIP}" = "n" ]] && continue ;;
[a241c33]92 *glibc) [[ "${TEST}" = "3" ]] && \
[d46a46e]93 sed -i 's@/usr/lib/locale@/tools/lib/locale@' $file ;;
[877cc6a]94 esac
95
96 # First append each name of the script files to a list (this will become
97 # the names of the targets in the Makefile
[4eba1ea]98 # DO NOT append the changingowner script, it need be run as root.
[045b2dc]99 # A hack is necessary: create script in chap5 BUT run as a dependency for
[4eba1ea]100 # SUDO target
[045b2dc]101 case "${this_script}" in
[4eba1ea]102 *changingowner) runasroot="$runasroot ${this_script}" ;;
[045b2dc]103 *) chapter5="$chapter5 ${this_script}" ;;
104 esac
[877cc6a]105
106 # Grab the name of the target (minus the -pass1 or -pass2 in the case of gcc
107 # and binutils in chapter 5)
108 name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@' -e 's@-pass[0-9]\{1\}@@'`
109
110 # Set the dependency for the first target.
111 if [ -z $PREV ] ; then PREV=022-settingenvironment ; fi
112
113 #--------------------------------------------------------------------#
114 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
115 #--------------------------------------------------------------------#
116 #
117 # Drop in the name of the target on a new line, and the previous target
118 # as a dependency. Also call the echo_message function.
[045b2dc]119 LUSER_wrt_target "${this_script}" "$PREV"
[877cc6a]120
121 # Find the version of the command files, if it corresponds with the building of
122 # a specific package
[a160d86]123 pkg_tarball=$(get_package_tarball_name $name)
[b7faa5a]124
[a160d86]125 # If $pkg_tarball isn't empty, we've got a package...
126 if [ "$pkg_tarball" != "" ] ; then
[877cc6a]127 # Insert instructions for unpacking the package and to set the PKGDIR variable.
[045b2dc]128 LUSER_wrt_unpack "$pkg_tarball"
[a229600]129 # If the testsuites must be run, initialize the log file
[045b2dc]130 [[ "$TEST" = "3" ]] && LUSER_wrt_test_log "${this_script}"
[a229600]131 # If using optimizations, write the instructions
[1b65a84]132 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
[877cc6a]133 fi
134
135 # Insert date and disk usage at the top of the log file, the script run
136 # and date and disk usage again at the bottom of the log file.
[a241c33]137 # The changingowner script must be run as root.
138 case "${this_script}" in
[8f2c086]139 *changingowner) wrt_RunAsRoot "$file" ;;
[045b2dc]140 *) LUSER_wrt_RunAsUser "$file" ;;
[a241c33]141 esac
[877cc6a]142
143 # Remove the build directory(ies) except if the package build fails
144 # (so we can review config.cache, config.log, etc.)
[a160d86]145 if [ "$pkg_tarball" != "" ] ; then
[045b2dc]146 LUSER_RemoveBuildDirs "$name"
[877cc6a]147 fi
148
149 # Include a touch of the target name so make can check
150 # if it's already been made.
[e2ef100]151 wrt_touch
[877cc6a]152 #
153 #--------------------------------------------------------------------#
154 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
155 #--------------------------------------------------------------------#
156
157 # Keep the script file name for Makefile dependencies.
158 PREV=${this_script}
159 done # end for file in chapter05/*
160}
161
[045b2dc]162
[877cc6a]163#----------------------------#
164chapter6_Makefiles() {
165#----------------------------#
[045b2dc]166
[45f82718]167 # Set envars and scripts for iteration targets
168 if [[ -z "$1" ]] ; then
169 local N=""
170 else
171 local N=-build_$1
172 local chapter6=""
173 mkdir chapter06$N
174 cp chapter06/* chapter06$N
175 for script in chapter06$N/* ; do
176 # Overwrite existing symlinks, files, and dirs
177 sed -e 's/ln -sv/&f/g' \
178 -e 's/mv -v/&f/g' \
179 -e 's/mkdir -v/&p/g' -i ${script}
[10c8b78]180 # Rename the scripts
181 mv ${script} ${script}$N
[45f82718]182 done
183 # Remove Bzip2 binaries before make install
[10c8b78]184 sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i chapter06$N/*-bzip2$N
[45f82718]185 fi
186
[045b2dc]187 echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter6$N ( CHROOT ) ${R_arrow}"
[45f82718]188
189 for file in chapter06$N/* ; do
[877cc6a]190 # Keep the script file name
191 this_script=`basename $file`
192
193 # We'll run the chroot commands differently than the others, so skip them in the
194 # dependencies and target creation.
[8426d1f]195 # Skip also linux-headers in iterative builds.
[877cc6a]196 case "${this_script}" in
197 *chroot) continue ;;
[401f81e]198 *stripping*) [[ "${STRIP}" = "n" ]] && continue ;;
[8426d1f]199 *linux-headers*) [[ -n "$N" ]] && continue ;;
[877cc6a]200 esac
201
[4eba1ea]202 # Grab the name of the target.
[10c8b78]203 name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@' -e 's,'$N',,'`
[877cc6a]204
[45f82718]205 # Find the version of the command files, if it corresponds with the building of
206 # a specific package. We need this here to can skip scripts not needed for
207 # iterations rebuilds
[a160d86]208 pkg_tarball=$(get_package_tarball_name $name)
[45f82718]209
[a160d86]210 if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then
[45f82718]211 case "${this_script}" in
212 *stripping*) ;;
213 *) continue ;;
214 esac
215 fi
216
217 # Append each name of the script files to a list (this will become
218 # the names of the targets in the Makefile)
[4eba1ea]219 # The kernfs script must be run as part of SUDO target.
220 case "${this_script}" in
221 *kernfs) runasroot="$runasroot ${this_script}" ;;
[10c8b78]222 *) chapter6="$chapter6 ${this_script}" ;;
[4eba1ea]223 esac
[45f82718]224
[877cc6a]225 #--------------------------------------------------------------------#
226 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
227 #--------------------------------------------------------------------#
228 #
229 # Drop in the name of the target on a new line, and the previous target
230 # as a dependency. Also call the echo_message function.
[8bea2c8]231 # In the mount of kernel filesystems we need to set LFS
232 # and not to use chroot.
233 case "${this_script}" in
234 *kernfs) LUSER_wrt_target "${this_script}" "$PREV" ;;
[10c8b78]235 *) CHROOT_wrt_target "${this_script}" "$PREV" ;;
[8bea2c8]236 esac
[877cc6a]237
[a160d86]238 # If $pkg_tarball isn't empty, we've got a package...
[877cc6a]239 # Insert instructions for unpacking the package and changing directories
[a160d86]240 if [ "$pkg_tarball" != "" ] ; then
[045b2dc]241 CHROOT_Unpack "$pkg_tarball"
[a229600]242 # If the testsuites must be run, initialize the log file
243 case $name in
244 binutils | gcc | glibc )
[10c8b78]245 [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}"
[a229600]246 ;;
247 * )
[10c8b78]248 [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}"
[a229600]249 ;;
250 esac
251 # If using optimizations, write the instructions
[1b65a84]252 [[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
[877cc6a]253 fi
254
255 # In the mount of kernel filesystems we need to set LFS
256 # and not to use chroot.
257 case "${this_script}" in
[8f2c086]258 *kernfs) wrt_RunAsRoot "$file" ;;
[045b2dc]259 *) CHROOT_wrt_RunAsRoot "$file" ;;
[877cc6a]260 esac
261
262 # Remove the build directory(ies) except if the package build fails.
[a160d86]263 if [ "$pkg_tarball" != "" ] ; then
[045b2dc]264 CHROOT_wrt_RemoveBuildDirs "$name"
[877cc6a]265 fi
266
267 # Include a touch of the target name so make can check
268 # if it's already been made.
[e2ef100]269 wrt_touch
[877cc6a]270 #
271 #--------------------------------------------------------------------#
272 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
273 #--------------------------------------------------------------------#
274
275 # Keep the script file name for Makefile dependencies.
[10c8b78]276 PREV=${this_script}
[45f82718]277 # Set system_build envar for iteration targets
278 system_build=$chapter6
[877cc6a]279 done # end for file in chapter06/*
280}
281
282#----------------------------#
[14eaa9f]283chapter78_Makefiles() {
[877cc6a]284#----------------------------#
[14eaa9f]285 echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter7/8 ( BOOT ) ${R_arrow}"
[877cc6a]286
[14eaa9f]287 for file in chapter0{7,8}/* ; do
[877cc6a]288 # Keep the script file name
289 this_script=`basename $file`
290
291 # Grub must be configured manually.
[14eaa9f]292 # Handle fstab creation.
[877cc6a]293 # If no .config file is supplied, the kernel build is skipped
294 case ${this_script} in
295 *grub) continue ;;
[045b2dc]296 *fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;;
[877cc6a]297 *kernel) [[ -z ${CONFIG} ]] && continue
298 cp ${CONFIG} $BUILDDIR/sources/kernel-config ;;
299 esac
300
301 # First append each name of the script files to a list (this will become
302 # the names of the targets in the Makefile
[14eaa9f]303 chapter78="$chapter78 ${this_script}"
[877cc6a]304
305 #--------------------------------------------------------------------#
306 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
307 #--------------------------------------------------------------------#
308 #
309 # Drop in the name of the target on a new line, and the previous target
310 # as a dependency. Also call the echo_message function.
[045b2dc]311 CHROOT_wrt_target "${this_script}" "$PREV"
[877cc6a]312
313 # Find the bootscripts and kernel package names
314 case "${this_script}" in
315 *bootscripts)
[a160d86]316 name="lfs-bootscripts"
317 pkg_tarball=$(get_package_tarball_name $name)
[045b2dc]318 CHROOT_Unpack "$pkg_tarball"
[877cc6a]319 ;;
320 *kernel)
[a160d86]321 name="linux"
322 pkg_tarball=$(get_package_tarball_name $name)
[045b2dc]323 CHROOT_Unpack "$pkg_tarball"
[877cc6a]324 ;;
325 esac
326
327 # Check if we have a real /etc/fstab file
328 case "${this_script}" in
329 *fstab) if [[ -n $FSTAB ]]; then
[045b2dc]330 CHROOT_wrt_CopyFstab
[877cc6a]331 else
[045b2dc]332 CHROOT_wrt_RunAsRoot "$file"
[877cc6a]333 fi
334 ;;
[045b2dc]335 *) CHROOT_wrt_RunAsRoot "$file"
[877cc6a]336 ;;
337 esac
338
339 case "${this_script}" in
[045b2dc]340 *bootscripts) CHROOT_wrt_RemoveBuildDirs "dummy" ;;
341 *kernel) CHROOT_wrt_RemoveBuildDirs "dummy" ;;
[877cc6a]342 esac
343
344 # Include a touch of the target name so make can check
345 # if it's already been made.
[e2ef100]346 wrt_touch
[877cc6a]347 #
348 #--------------------------------------------------------------------#
349 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
350 #--------------------------------------------------------------------#
351
352 # Keep the script file name for Makefile dependencies.
353 PREV=${this_script}
[14eaa9f]354 done # for file in chapter0{7,8}/*
[453bef0]355
[877cc6a]356}
357
358
[045b2dc]359
[877cc6a]360#----------------------------#
[045b2dc]361build_Makefile() { #
[877cc6a]362#----------------------------#
[045b2dc]363
[c7c5a53]364 echo "Creating Makefile... ${BOLD}START${OFF}"
[045b2dc]365
[877cc6a]366 cd $JHALFSDIR/${PROGNAME}-commands
367
368 # Start with a clean Makefile.tmp file
[045b2dc]369 >$MKFILE
[877cc6a]370
371 chapter4_Makefiles
372 chapter5_Makefiles
373 chapter6_Makefiles
[45f82718]374 # Add the iterations targets, if needed
[401f81e]375 [[ "$COMPARE" = "y" ]] && wrt_compare_targets
[14eaa9f]376 chapter78_Makefiles
[045b2dc]377 # Add the BLFS_TOOL targets, if needed
378 [[ "$BLFS_TOOL" = "y" ]] && wrt_blfs_tool_targets
[877cc6a]379
380 # Add a header, some variables and include the function file
381 # to the top of the real Makefile.
[195ed9f]382 wrt_Makefile_header
[877cc6a]383
384 # Add chroot commands
[6ad5a2f]385 CHROOT_LOC="`whereis -b chroot | cut -d " " -f2`"
[877cc6a]386 i=1
387 for file in chapter06/*chroot* ; do
[6ad5a2f]388 chroot=`cat $file | \
389 sed -e "s@chroot@$CHROOT_LOC@" \
[d3802b1]390 -e '/#!\/bin\/bash/d' \
[6ad5a2f]391 -e 's@ \\\@ @g' | \
392 tr -d '\n' | \
393 sed -e 's/ */ /g' \
394 -e 's|\\$|&&|g' \
395 -e 's|exit||g' \
396 -e 's|$| -c|' \
397 -e 's|"$$LFS"|$(MOUNT_PT)|' \
[f3a7f3b]398 -e 's|set -e||' \
399 -e 's|set +h||'`
[877cc6a]400 echo -e "CHROOT$i= $chroot\n" >> $MKFILE
401 i=`expr $i + 1`
402 done
403
404 # Drop in the main target 'all:' and the chapter targets with each sub-target
405 # as a dependency.
406(
407 cat << EOF
[045b2dc]408
409all: ck_UID mk_SETUP mk_LUSER mk_SUDO mk_CHROOT mk_BOOT create-sbu_du-report mk_BLFS_TOOL
410 @sudo make do_housekeeping
[ac35c8e]411 @echo "$VERSION - jhalfs build" > lfs-release && \\
412 sudo mv lfs-release \$(MOUNT_PT)/etc
[877cc6a]413 @\$(call echo_finished,$VERSION)
414
[045b2dc]415ck_UID:
416 @if [ \`id -u\` = "0" ]; then \\
417 echo "--------------------------------------------------"; \\
418 echo "You cannot run this makefile from the root account"; \\
419 echo "--------------------------------------------------"; \\
420 exit 1; \\
421 fi
422
423mk_SETUP:
424 @\$(call echo_SU_request)
[e6b660f]425 @sudo make SHELL=/bin/bash SETUP
[045b2dc]426 @touch \$@
427
428mk_LUSER: mk_SETUP
429 @\$(call echo_SULUSER_request)
[a2133cb]430 @( sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make SHELL=/bin/bash LUSER" )
[045b2dc]431 @sudo make restore-luser-env
432 @touch \$@
433
434mk_SUDO: mk_LUSER
[a2133cb]435 @sudo make SHELL=/bin/bash SUDO
[045b2dc]436 touch \$@
437#
438# The convoluted piece of code below is necessary to provide 'make' with a valid shell in the
439# chroot environment. (Unless someone knows a different way)
440# Manually create the /bin directory and provide link to the /tools dir.
441# Also change the original symlink creation to include (f)orce to prevent failure due to
442# pre-existing links.
443#
444mk_CHROOT: mk_SUDO
445 @if [ ! -e \$(MOUNT_PT)/bin ]; then \\
446 mkdir \$(MOUNT_PT)/bin; \\
447 cd \$(MOUNT_PT)/bin && \\
448 ln -sf /tools/bin/bash bash; ln -sf bash sh; \\
449 sudo chown -R 0:0 \$(MOUNT_PT)/bin; \\
450 fi;
[14eaa9f]451 @sudo sed -e 's|^ln -sv |ln -svf |' -i \$(CMDSDIR)/chapter06/*-createfiles
[045b2dc]452 @\$(call echo_CHROOT_request)
453 @( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT")
454 @touch \$@
[877cc6a]455
[045b2dc]456mk_BOOT: mk_CHROOT
457 @\$(call echo_CHROOT_request)
458 @( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BOOT")
459 @touch \$@
[877cc6a]460
[1838bc7]461mk_BLFS_TOOL: create-sbu_du-report
462 @\$(call echo_PHASE,Building BLFS-TOOLS)
463 @if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
464 sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\
465 sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BLFS_TOOL"; \\
466 fi;
467 @touch \$@
[877cc6a]468
469
[1838bc7]470SETUP: $chapter4
471LUSER: $chapter5
[4eba1ea]472SUDO: $runasroot
[1838bc7]473CHROOT: $chapter6
[14eaa9f]474BOOT: $chapter78
[1838bc7]475BLFS_TOOL: $blfs_tool
[fe24ca6]476
[045b2dc]477
[1838bc7]478create-sbu_du-report: mk_BOOT
479 @\$(call echo_message, Building)
480 @if [ "\$(ADD_REPORT)" = "y" ]; then \\
481 ./create-sbu_du-report.sh logs $VERSION; \\
482 \$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\
483 fi;
484 @touch \$@
[045b2dc]485
[6ad5a2f]486restore-luser-env:
[877cc6a]487 @\$(call echo_message, Building)
[6ad5a2f]488 @if [ -f /home/\$(LUSER)/.bashrc.XXX ]; then \\
489 mv -f /home/\$(LUSER)/.bashrc.XXX /home/\$(LUSER)/.bashrc; \\
[877cc6a]490 fi;
[6ad5a2f]491 @if [ -f /home/\$(LUSER)/.bash_profile.XXX ]; then \\
492 mv /home/\$(LUSER)/.bash_profile.XXX /home/\$(LUSER)/.bash_profile; \\
[877cc6a]493 fi;
[6ad5a2f]494 @chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bash* && \\
[e2ef100]495 touch \$@ && \\
[4a444f1]496 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
497 echo --------------------------------------------------------------------------------\$(WHITE)
[a858a78]498
[7d9a82d]499do_housekeeping:
[4524fb2]500 @-umount \$(MOUNT_PT)/sys
501 @-umount \$(MOUNT_PT)/proc
502 @-umount \$(MOUNT_PT)/dev/shm
503 @-umount \$(MOUNT_PT)/dev/pts
504 @-umount \$(MOUNT_PT)/dev
[045b2dc]505 @-rm /tools
[6ad5a2f]506 @-if [ ! -f luser-exist ]; then \\
507 userdel \$(LUSER); \\
508 rm -rf /home/\$(LUSER); \\
[7d9a82d]509 fi;
[a858a78]510
[fe24ca6]511
[877cc6a]512EOF
513) >> $MKFILE
514
515 # Bring over the items from the Makefile.tmp
516 cat $MKFILE.tmp >> $MKFILE
517 rm $MKFILE.tmp
[c7c5a53]518 echo "Creating Makefile... ${BOLD}DONE${OFF}"
519}
Note: See TracBrowser for help on using the repository browser.