source: CLFS3/master.sh@ 12d1136

2.3 2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since 12d1136 was 6100211, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

CLFS3: added INSTALL_LOG support to cross_tools_Makefiles to can track Linux-Headers and uClibc installed files.

  • Property mode set to 100644
File size: 20.3 KB
RevLine 
[91ff6a9]1#!/bin/bash
[837797e]2# $Id$
3
4###################################
5### FUNCTIONS ###
6###################################
7
8
9#----------------------------#
10host_prep_Makefiles() { # Initialization of the system
11#----------------------------#
12 local CLFS_HOST
13
14 echo "${tab_}${GREEN}Processing... ${L_arrow}host prep files ( SETUP ) ${R_arrow}"
15
16 # defined here, only for ease of reading
17 CLFS_HOST="$(echo $MACHTYPE | sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")"
18(
19cat << EOF
20
[9ae0875]21025-addinguser:
[837797e]22 @\$(call echo_message, Building)
[962793a]23 @if [ ! -d \$(LUSER_HOME) ]; then \\
[837797e]24 groupadd \$(LGROUP); \\
25 useradd -s /bin/bash -g \$(LGROUP) -m -k /dev/null \$(LUSER); \\
26 else \\
27 touch luser-exist; \\
28 fi;
[dbcdfd7]29 @\$(call housekeeping)
[837797e]30
31026-settingenvironment: 025-addinguser
32 @\$(call echo_message, Building)
[962793a]33 @if [ -f \$(LUSER_HOME)/.bashrc -a ! -f \$(LUSER_HOME)/.bashrc.XXX ]; then \\
34 mv \$(LUSER_HOME)/.bashrc \$(LUSER_HOME)/.bashrc.XXX; \\
[837797e]35 fi;
[962793a]36 @if [ -f \$(LUSER_HOME)/.bash_profile -a ! -f \$(LUSER_HOME)/.bash_profile.XXX ]; then \\
37 mv \$(LUSER_HOME)/.bash_profile \$(LUSER_HOME)/.bash_profile.XXX; \\
[837797e]38 fi;
[962793a]39 @echo "set +h" > \$(LUSER_HOME)/.bashrc && \\
40 echo "umask 022" >> \$(LUSER_HOME)/.bashrc && \\
41 echo "CLFS=\$(MOUNT_PT)" >> \$(LUSER_HOME)/.bashrc && \\
42 echo "LC_ALL=POSIX" >> \$(LUSER_HOME)/.bashrc && \\
43 echo "PATH=\$(MOUNT_PT)/cross-tools/bin:/bin:/usr/bin" >> \$(LUSER_HOME)/.bashrc && \\
44 echo "export CLFS LC_ALL PATH" >> \$(LUSER_HOME)/.bashrc && \\
45 echo "" >> \$(LUSER_HOME)/.bashrc && \\
46 echo "unset CFLAGS" >> \$(LUSER_HOME)/.bashrc && \\
47 echo "unset CXXFLAGS" >> \$(LUSER_HOME)/.bashrc && \\
48 echo "" >> \$(LUSER_HOME)/.bashrc && \\
49 echo "export CLFS_HOST=\"${CLFS_HOST}\"" >> \$(LUSER_HOME)/.bashrc && \\
50 echo "export CLFS_TARGET=\"${TARGET}\"" >> \$(LUSER_HOME)/.bashrc && \\
51 echo "export CLFS_MIPS_LEVEL=\"${MIPS_LEVEL}\"" >> \$(LUSER_HOME)/.bashrc && \\
52 echo "export BUILD=\"${ABI}\"" >> \$(LUSER_HOME)/.bashrc && \\
53 echo "source $JHALFSDIR/envars" >> \$(LUSER_HOME)/.bashrc
54 @chown \$(LUSER):\$(LGROUP) \$(LUSER_HOME)/.bashrc && \\
[837797e]55 touch envars && \\
[9ae0875]56 chown \$(LUSER):\$(LGROUP) envars
[dbcdfd7]57 @\$(call housekeeping)
[837797e]58
59027-create-directories: 026-settingenvironment
60 @\$(call echo_message, Building)
61
62 @mkdir -p \$(MOUNT_PT)/{bin,boot,dev,{etc/,}opt,home,lib,mnt}
63 @mkdir -p \$(MOUNT_PT)/{proc,media/{floppy,cdrom},sbin,srv,sys}
64 @mkdir -p \$(MOUNT_PT)/var/{lock,log,mail,run,spool}
65 @mkdir -p \$(MOUNT_PT)/var/{opt,cache,lib/{misc,locate},local}
66 @install -d -m 0750 \$(MOUNT_PT)/root
67 @install -d -m 1777 \$(MOUNT_PT){/var,}/tmp
68 @mkdir -p \$(MOUNT_PT)/usr/{,local/}{bin,include,lib,sbin,src}
69 @mkdir -p \$(MOUNT_PT)/usr/{,local/}share/{doc,info,locale,man}
70 @mkdir -p \$(MOUNT_PT)/usr/{,local/}share/{misc,terminfo,zoneinfo}
71 @mkdir -p \$(MOUNT_PT)/usr/{,local/}share/man/man{1,2,3,4,5,6,7,8}
72 @for dir in \$(MOUNT_PT)/usr{,/local}; do \\
73 ln -s share/{man,doc,info} \$\$dir ; \\
74 done
[dbcdfd7]75 @\$(call housekeeping)
[837797e]76
77028-creating-sysfile: 027-create-directories
78 @\$(call echo_message, Building)
79
80 @touch \$(MOUNT_PT)/etc/mtab
[8b23a0e]81 @echo "root::0:0:root:/root:/bin/ash" >> \$(MOUNT_PT)/etc/passwd
[837797e]82 @echo "root:x:0:" >> \$(MOUNT_PT)/etc/group
83 @echo "bin:x:1:" >> \$(MOUNT_PT)/etc/group
84 @echo "sys:x:2:" >> \$(MOUNT_PT)/etc/group
85 @echo "kmem:x:3" >> \$(MOUNT_PT)/etc/group
86 @echo "tty:x:4:" >> \$(MOUNT_PT)/etc/group
87 @echo "tape:x:5:" >> \$(MOUNT_PT)/etc/group
88 @echo "daemon:x:6:" >> \$(MOUNT_PT)/etc/group
89 @echo "floppy:x:7:" >> \$(MOUNT_PT)/etc/group
90 @echo "disk:x:8:" >> \$(MOUNT_PT)/etc/group
91 @echo "lp:x:9:" >> \$(MOUNT_PT)/etc/group
92 @echo "dialout:x:10:" >> \$(MOUNT_PT)/etc/group
93 @echo "audio:x:11:" >> \$(MOUNT_PT)/etc/group
94 @echo "video:x:12:" >> \$(MOUNT_PT)/etc/group
95 @echo "utmp:x:13:" >> \$(MOUNT_PT)/etc/group
96 @echo "usb:x:14:" >> \$(MOUNT_PT)/etc/group
97 @echo "cdrom:x:15:" >> \$(MOUNT_PT)/etc/group
98
99 @touch \$(MOUNT_PT)/var/run/utmp \$(MOUNT_PT)/var/log/{btmp,lastlog,wtmp}
100 @chmod 664 \$(MOUNT_PT)/var/run/utmp \$(MOUNT_PT)/var/log/lastlog
[de22e80]101 @chown -R \$(LUSER) \$(MOUNT_PT) && \\
[535fd45]102 chmod -R a+w \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
103 chmod -R a+w \$(SRCSDIR)
[dbcdfd7]104 @\$(call housekeeping)
[837797e]105
106EOF
107) >> $MKFILE.tmp
108
[9ae0875]109 host_prep=" 025-addinguser 026-settingenvironment 027-create-directories 028-creating-sysfile"
[837797e]110}
111
[9bbf240]112#-----------------------------#
113systemprep_Makefiles() { #
114#-----------------------------#
115 echo "${tab_}${GREEN}Processing... ${L_arrow}system prep tools ( LUSER ) ${R_arrow}"
[81f7dc1]116
117 for file in systemprep/* ; do
[9bbf240]118 # Keep the script file name
119 this_script=`basename $file`
120
121 # Set the dependency for the first target.
122 if [ -z $PREV ] ; then PREV=028-creating-sysfile ; fi
123
124 # First append each name of the script files to a list (this will become
125 # the names of the targets in the Makefile)
126 cross_tools="$cross_tools $this_script"
127
128 # Grab the name of the target (minus the -headers or -cross in the case of gcc
129 # and binutils in chapter 5)
130 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'`
131
132 pkg_tarball=$(get_package_tarball_name $name)
133 #--------------------------------------------------------------------#
134 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
135 #--------------------------------------------------------------------#
136 #
137 # Drop in the name of the target on a new line, and the previous target
138 # as a dependency. Also call the echo_message function.
139 LUSER_wrt_target "${this_script}" "$PREV"
140 #
141 # If $pkg_tarball isn't empty, we've got a package...
142 if [ "$pkg_tarball" != "" ] ; then
143 LUSER_wrt_unpack "$pkg_tarball"
144 fi
145 #
146 LUSER_wrt_RunAsUser "${file}"
147 #
148 [[ "$pkg_tarball" != "" ]] && LUSER_RemoveBuildDirs "${name}"
149 #
150 # Include a touch of the target name so make can check if it's already been made.
151 wrt_touch
152 #
153 #--------------------------------------------------------------------#
154 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
155 #--------------------------------------------------------------------#
156 #
157 # Keep the script file name for Makefile dependencies.
158 PREV=$this_script
159
160 done # for file in ....
161}
162
[837797e]163
164#-----------------------------#
165cross_tools_Makefiles() { #
166#-----------------------------#
167 echo "${tab_}${GREEN}Processing... ${L_arrow}cross tools ( LUSER ) ${R_arrow}"
[81f7dc1]168
169 for file in cross-tools/* ; do
[837797e]170 # Keep the script file name
171 this_script=`basename $file`
172 #
173 # Skip this script...
174 # NOTE.. the book indicated you only needed to install groff or file if the host
175 # had older versions. The packages would be installed in the target directory
176 # and not the host.
177 case $this_script in
[2512414]178 *cflags* | *variables* | *abi | *toolchain*) # work done in host_prep_Makefiles
[837797e]179 continue ;;
180 *) ;;
181 esac
182
183 #
184 # Set the dependency for the first target.
185 if [ -z $PREV ] ; then PREV=028-creating-sysfile ; fi
186
187 # First append each name of the script files to a list (this will become
188 # the names of the targets in the Makefile)
189 cross_tools="$cross_tools $this_script"
190
191 # Grab the name of the target (minus the -headers or -cross in the case of gcc
192 # and binutils in chapter 5)
193 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \
194 -e 's@-static@@' \
195 -e 's@-final@@' \
196 -e 's@-64@@' \
197 -e 's@-n32@@'`
198 case $name in
199 uclibc*) name="uClibc" ;;
200 esac
201 pkg_tarball=$(get_package_tarball_name $name)
202 #--------------------------------------------------------------------#
203 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
204 #--------------------------------------------------------------------#
205 #
206 # Drop in the name of the target on a new line, and the previous target
207 # as a dependency. Also call the echo_message function.
208 LUSER_wrt_target "${this_script}" "$PREV"
209 #
210 # If $pkg_tarball isn't empty, we've got a package...
211 if [ "$pkg_tarball" != "" ] ; then
212 LUSER_wrt_unpack "$pkg_tarball"
[6100211]213 # Touch timestamp file if installed files logs will be created.
214 if [ "${INSTALL_LOG}" = "y" ] ; then
215 LUSER_wrt_TouchTimestamp
216 fi
[837797e]217 # If using optimizations, write the instructions
218 [[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
219 fi
220 #
221 LUSER_wrt_RunAsUser "${file}"
222 #
[6100211]223 # Write installed files log and remove the build directory(ies)
224 # except if the package build fails.
225 if [ "$pkg_tarball" != "" ] ; then
226 LUSER_RemoveBuildDirs "${name}"
227 if [ "${INSTALL_LOG}" = "y" ] ; then
228 LUSER_wrt_LogNewFiles "$name"
229 fi
230 fi
[837797e]231 #
232 # Include a touch of the target name so make can check if it's already been made.
233 wrt_touch
234 #
235 #--------------------------------------------------------------------#
236 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
237 #--------------------------------------------------------------------#
238 #
239 # Keep the script file name for Makefile dependencies.
240 PREV=$this_script
241
242 done # for file in ....
243}
244
245
246
247#-----------------------------#
248final_system_Makefiles() { #
249#-----------------------------#
250 echo "${tab_}${GREEN}Processing... ${L_arrow}final system ( LUSER ) ${R_arrow}"
251
252 for file in final-system/* ; do
253 # Keep the script file name
254 this_script=`basename $file`
255
256 # Grab the name of the target, strip id number, XXX-script
257 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \
258 -e 's@temp-@@' \
259 -e 's@-64bit@@' \
260 -e 's@-64@@' \
261 -e 's@64@@' \
262 -e 's@n32@@'`
263
264 # Find the version of the command files, if it corresponds with the building of
265 # a specific package.
266 pkg_tarball=$(get_package_tarball_name $name)
267
268 # Append each name of the script files to a list (this will become
269 # the names of the targets in the Makefile
270 basicsystem="$basicsystem ${this_script}"
271
272 #--------------------------------------------------------------------#
273 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
274 #--------------------------------------------------------------------#
275 #
276 # Drop in the name of the target on a new line, and the previous target
277 # as a dependency. Also call the echo_message function.
278 LUSER_wrt_target "${this_script}" "$PREV"
279 #
280 # If $pkg_tarball isn't empty, we've got a package...
281 if [ "$pkg_tarball" != "" ] ; then
[f546320]282 # Touch timestamp file if installed files logs will be created.
283 if [ "${INSTALL_LOG}" = "y" ] ; then
284 LUSER_wrt_TouchTimestamp
285 fi
[837797e]286 LUSER_wrt_unpack "$pkg_tarball"
287 # If using optimizations, write the instructions
288 [[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
289 fi
290 #
291 LUSER_wrt_RunAsUser "${file}"
292 #
[f546320]293 # Write installed files log and remove the build directory(ies)
294 # except if the package build fails.
295 if [ "$pkg_tarball" != "" ] ; then
296 LUSER_RemoveBuildDirs "${name}"
297 if [ "${INSTALL_LOG}" = "y" ] ; then
298 LUSER_wrt_LogNewFiles "$name"
299 fi
300 fi
[837797e]301 #
302 # Include a touch of the target name so make can check if it's already been made.
303 wrt_touch
304 #
305 #--------------------------------------------------------------------#
306 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
307 #--------------------------------------------------------------------#
308 #
309 # Keep the script file name for Makefile dependencies.
310 PREV=${this_script}
311 done # for file in final-system/* ...
312}
313
314
315
316#-----------------------------#
317bootscripts_Makefiles() { #
318#-----------------------------#
319 echo "${tab_}${GREEN}Processing... ${L_arrow}bootscripts ( LUSER ) ${R_arrow}"
320
321 for file in bootscripts/* ; do
322 # Keep the script file name
323 this_script=`basename $file`
324
325 case $this_script in
326 *console*) continue ;; # Use the files that came with the bootscripts
327 *network*) continue ;; # Manually create these files
328 *) ;;
329 esac
330
331 # First append each name of the script files to a list (this will become
332 # the names of the targets in the Makefile
333 bootscripttools="$bootscripttools $this_script"
334
335 # Grab the name of the target, strip id number, XXX-script
336 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'\
337 -e 's@-64bit@@' \
338 -e 's@-64@@' \
339 -e 's@64@@' \
340 -e 's@n32@@'`
341 case $name in
[3c38ab0]342 *bootscripts*) name=clfs-embedded-bootscripts ;;
[837797e]343 esac
344
345 pkg_tarball=$(get_package_tarball_name $name)
346
347 #--------------------------------------------------------------------#
348 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
349 #--------------------------------------------------------------------#
350 #
351 # Drop in the name of the target on a new line, and the previous target
352 # as a dependency. Also call the echo_message function.
353 LUSER_wrt_target "${this_script}" "$PREV"
354 #
355 # If $pkg_tarball isn't empty, we've got a package...
[f546320]356 if [ "$pkg_tarball" != "" ] ; then
357 LUSER_wrt_unpack "$pkg_tarball"
358 if [ "${INSTALL_LOG}" = "y" ] ; then
359 LUSER_wrt_TouchTimestamp
360 fi
361 fi
[837797e]362 #
363 LUSER_wrt_RunAsUser "${file}"
364 #
[f546320]365 if [ "$pkg_tarball" != "" ] ; then
366 LUSER_RemoveBuildDirs "${name}"
367 if [ "${INSTALL_LOG}" = "y" ] ; then
368 LUSER_wrt_LogNewFiles "$name"
369 fi
370 fi
[837797e]371 #
372 # Include a touch of the target name so make can check if it's already been made.
373 wrt_touch
374 #
375 #--------------------------------------------------------------------#
376 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
377 #--------------------------------------------------------------------#
378 #
379 # Keep the script file name for Makefile dependencies.
380 PREV=$this_script
381
382 done # for file in bootscripts/* ...
383
384}
385
386
387#-----------------------------#
388bootable_Makefiles() { #
389#-----------------------------#
390 echo "${tab_}${GREEN}Processing... ${L_arrow}make bootable ( LUSER ) ${R_arrow}"
391
392 for file in bootable/* ; do
393 # Keep the script file name
394 this_script=`basename $file`
395
396 # A little housekeeping on the scripts
397 case $this_script in
398 *grub | *aboot | *colo | *silo | *arcload | *lilo | *reboot* ) continue ;;
399 *fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;;
400 *kernel) # if there is no kernel config file do not build the kernel
401 [[ -z $CONFIG ]] && continue
402 # Copy the config file to /sources with a standardized name
403 cp $CONFIG $BUILDDIR/sources/kernel-config
404 ;;
405 esac
406 #
407 # First append each name of the script files to a list (this will become
408 # the names of the targets in the Makefile
409 # NOTE: new makfile format forces the last script, *chowning, into a separate
410 # phase.
411 case ${this_script} in
412 *chowning) chowning=${this_script} ;;
413 *) bootable="$bootable $this_script" ;;
414 esac
415 #
416 # Grab the name of the target, strip id number and misc words.
417 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's@-build@@' `
418 case $this_script in
419 *kernel*) name=linux
420 ;;
421 esac
422
423 pkg_tarball=$(get_package_tarball_name $name)
424
425 #--------------------------------------------------------------------#
426 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
427 #--------------------------------------------------------------------#
428 #
429 # Drop in the name of the target on a new line, and the previous target
430 # as a dependency. Also call the echo_message function.
431 LUSER_wrt_target "${this_script}" "$PREV"
432 #
433 # If $pkg_tarball isn't empty, we've got a package...
[f546320]434 if [ "$pkg_tarball" != "" ] ; then
435 LUSER_wrt_unpack "$pkg_tarball"
436 if [ "${INSTALL_LOG}" = "y" ] ; then
437 LUSER_wrt_TouchTimestamp
438 fi
439 fi
[837797e]440 #
441 # Select a script execution method
442 case $this_script in
443 *fstab*) if [[ -n "$FSTAB" ]]; then
444 LUSER_wrt_CopyFstab
445 else
446 LUSER_wrt_RunAsUser "${file}"
447 fi
448 ;;
[8f2c086]449 *chowning) wrt_RunAsRoot "${file}"
[837797e]450 ;;
451 *) LUSER_wrt_RunAsUser "${file}"
452 ;;
453 esac
454 #
455 # Housekeeping...remove any build directory(ies) except if the package build fails.
[f546320]456 if [ "$pkg_tarball" != "" ] ; then
457 LUSER_RemoveBuildDirs "${name}"
458 if [ "${INSTALL_LOG}" = "y" ] ; then
459 LUSER_wrt_LogNewFiles "$name"
460 fi
461 fi
[837797e]462 #
463 # Include a touch of the target name so make can check if it's already been made.
464 wrt_touch
465 #
466 #--------------------------------------------------------------------#
467 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
468 #--------------------------------------------------------------------#
469 #
470 # Keep the script file name for Makefile dependencies.
471 PREV=$this_script
472
473 done
474
475}
476
477
478#-----------------------------#
479build_Makefile() { # Construct a Makefile from the book scripts
480#-----------------------------#
481 echo "Creating Makefile... ${BOLD}START${OFF}"
482
483 cd $JHALFSDIR/${PROGNAME}-commands
484 # Start with a clean Makefile.tmp file
485 >$MKFILE.tmp
486
487 host_prep_Makefiles
[9bbf240]488 [[ "${PLATFORM% -*}" = "WRT" ]] && systemprep_Makefiles # $cross_tools
[837797e]489 cross_tools_Makefiles # $cross_tools
490 final_system_Makefiles # $basicsystem
491 bootscripts_Makefiles # $bootscripttools
492 bootable_Makefiles # $bootable
[3e7ceed]493 # Add the CUSTOM_TOOLS targets, if needed
494 [[ "$CUSTOM_TOOLS" = "y" ]] && wrt_CustomTools_target
[837797e]495
496 # Add a header, some variables and include the function file
497 # to the top of the real Makefile.
[195ed9f]498 wrt_Makefile_header
[837797e]499
500 # Drop in the main target 'all:' and the chapter targets with each sub-target
501 # as a dependency.
502(
503cat << EOF
504
[4fef116]505all: ck_UID mk_SETUP mk_LUSER create-sbu_du-report mk_CUSTOM_TOOLS mk_ROOT
[5cbb44c]506 @sudo make restore-luser-env
[837797e]507 @sudo make do-housekeeping
508 @\$(call echo_finished,$VERSION)
509
510ck_UID:
511 @if [ \`id -u\` = "0" ]; then \\
512 echo "--------------------------------------------------"; \\
513 echo "You cannot run this makefile from the root account"; \\
514 echo "--------------------------------------------------"; \\
515 exit 1; \\
516 fi
517
518mk_SETUP:
519 @\$(call echo_SU_request)
[dbcdfd7]520 @sudo make BREAKPOINT=\$(BREAKPOINT) SETUP
[837797e]521 @touch \$@
522
523mk_LUSER: mk_SETUP
524 @\$(call echo_SULUSER_request)
[dbcdfd7]525 @(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) LUSER" )
[837797e]526 @touch \$@
527
[3e7ceed]528mk_CUSTOM_TOOLS: create-sbu_du-report
[b4cf321]529 @if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
[3bc6078]530 \$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
[3e7ceed]531 (sudo \$(SU_LUSER) "mkdir -p $BUILDDIR$TRACKING_DIR"); \\
[dbcdfd7]532 (sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CUSTOM_TOOLS"); \\
[3e7ceed]533 fi;
534 @touch \$@
535
[b230bd6]536mk_ROOT:
[3e7ceed]537 @\$(call echo_SU_request)
[de22e80]538 @echo "$VERSION-embedded - jhalfs build" > clfs-release && \\
539 sudo mv clfs-release \$(MOUNT_PT)/etc
[dbcdfd7]540 @sudo make BREAKPOINT=\$(BREAKPOINT) ROOT
[837797e]541 @touch \$@
542
543
[3e7ceed]544SETUP: $host_prep
545LUSER: $cross_tools $basicsystem $bootscripttools $bootable
546CUSTOM_TOOLS: $custom_list
547ROOT: $chowning
[837797e]548
549
[5cbb44c]550create-sbu_du-report: mk_LUSER
[1838bc7]551 @\$(call echo_message, Building)
552 @if [ "\$(ADD_REPORT)" = "y" ]; then \\
553 ./create-sbu_du-report.sh logs $VERSION; \\
554 \$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\
555 fi;
556 @touch \$@
557
[837797e]558restore-luser-env:
559 @\$(call echo_message, Building)
[962793a]560 @if [ -f \$(LUSER_HOME)/.bashrc.XXX ]; then \\
561 mv -f \$(LUSER_HOME)/.bashrc.XXX \$(LUSER_HOME)/.bashrc; \\
[837797e]562 fi;
[962793a]563 @if [ -f \$(LUSER_HOME)/.bash_profile.XXX ]; then \\
564 mv \$(LUSER_HOME)/.bash_profile.XXX \$(LUSER_HOME)/.bash_profile; \\
[837797e]565 fi;
[962793a]566 @chown \$(LUSER):\$(LGROUP) \$(LUSER_HOME)/.bash* && \\
[837797e]567 touch \$@ && \\
568 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
569 echo --------------------------------------------------------------------------------\$(WHITE)
570
571do-housekeeping:
572 @-if [ ! -f luser-exist ]; then \\
573 userdel \$(LUSER); \\
[962793a]574 rm -rf \$(LUSER_HOME); \\
[837797e]575 fi;
576
577EOF
578) >> $MKFILE
579
580 # Bring over the items from the Makefile.tmp
581 cat $MKFILE.tmp >> $MKFILE
582 rm $MKFILE.tmp
583 echo "Creating Makefile... ${BOLD}DONE${OFF}"
584
585}
586
Note: See TracBrowser for help on using the repository browser.