4 # This script is intended to run on any platform supported by X.Org.
5 # The Autoconf generated configure script is a good reference as to what is permitted.
6 # Basically, it should be able to run in a Bourne shell.
10 Environment variables specific to build.sh:
11 PREFIX Install architecture-independent files in PREFIX [/usr/local]
12 Each module/components is invoked with --prefix
13 EPREFIX Install architecture-dependent files in EPREFIX [PREFIX]
14 Each module/components is invoked with --exec-prefix
15 BINDIR Install user executables [EPREFIX/bin]
16 Each module/components is invoked with --bindir
17 DATAROOTDIR Install read-only arch-independent data root [PREFIX/share]
18 Each module/components is invoked with --datarootdir
19 DATADIR Install read-only architecture-independent data [DATAROOTDIR]
20 Each module/components is invoked with --datadir
21 LIBDIR Install object code libraries [EPREFIX/lib]
22 Each module/components is invoked with --libdir
23 LOCALSTATEDIR Modifiable single-machine data [PREFIX/var]
24 Each module/components is invoked with --localstatedir
25 QUIET Do not print messages saying which checks are being made
26 Each module/components is invoked with --quite
27 GITROOT Source code repository path [git://anongit.freedesktop.org/git]
28 Optional when using --clone to update source code before building
29 CONFFLAGS Configure options to pass to all Autoconf configure scripts
30 Refer to 'configure --help' from any module/components
32 Environment variables defined by the GNU Build System:
33 ACLOCAL The aclocal cmd name [aclocal -I \${DESTDIR}/\${DATADIR}/aclocal]
34 DESTDIR Path to the staging area where installed objects are relocated
35 MAKE The name of the make command [make]
36 MAKEFLAGS: Options to pass to all \$(MAKE) invocations
38 CFLAGS C compiler flags
39 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
40 nonstandard directory <lib dir>
41 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
42 you have headers in a nonstandard directory <include dir>
45 Environment variables defined by the shell:
46 PATH List of directories that the shell searches for commands
47 \$DESTDIR/\$BINDIR is prepended
49 Environment variables defined by the dynamic linker:
50 LD_LIBRARY_PATH List directories that the linker searches for shared objects
51 \$DESTDIR/\$LIBDIR is prepended
53 Environment variables defined by the pkg-config system:
54 PKG_CONFIG_PATH List directories that pkg-config searches for libraries
55 \$DESTDIR/\$DATADIR/pkgconfig and
56 \$DESTDIR/\$LIBDIR/pkgconfig are prepended
62 # Remember if the user had supplied a value through env var or cmd line
63 # A value from cmd line takes precedence of the shell environment
64 PREFIX_USER
=${PREFIX:+yes}
65 EPREFIX_USER
=${EPREFIX:+yes}
66 BINDIR_USER
=${BINDIR:+yes}
67 DATAROOTDIR_USER
=${DATAROOTDIR:+yes}
68 DATADIR_USER
=${DATADIR:+yes}
69 LIBDIR_USER
=${LIBDIR:+yes}
70 LOCALSTATEDIR_USER
=${LOCALSTATEDIR:+yes}
72 # Assign a default value if no value was supplied by the user
73 PREFIX
=${PREFIX:-/usr/local}
74 EPREFIX
=${EPREFIX:-$PREFIX}
75 BINDIR
=${BINDIR:-$EPREFIX/bin}
76 DATAROOTDIR
=${DATAROOTDIR:-$PREFIX/share}
77 DATADIR
=${DATADIR:-$DATAROOTDIR}
78 LIBDIR
=${LIBDIR:-$EPREFIX/lib}
79 LOCALSTATEDIR
=${LOCALSTATEDIR:-$PREFIX/var}
81 # Support previous usage of LIBDIR which was a subdir relative to PREFIX
82 # We use EPREFIX as this is what PREFIX really meant at the time
83 if [ X
"`expr substr $LIBDIR 1 1`" != X
/ ]; then
85 echo "Warning: this usage of \$LIBDIR is deprecated. Use a full path name."
86 echo "The supplied value \"$LIBDIR\" has been replaced with $EPREFIX/$LIBDIR."
88 LIBDIR
=$EPREFIX/$LIBDIR
91 # All directories variables must be full path names
92 check_full_path
$PREFIX PREFIX
93 check_full_path
$EPREFIX EPREFIX
94 check_full_path
$BINDIR BINDIR
95 check_full_path
$DATAROOTDIR DATAROOTDIR
96 check_full_path
$DATADIR DATADIR
97 check_full_path
$LIBDIR LIBDIR
98 check_full_path
$LOCALSTATEDIR LOCALSTATEDIR
100 # This will catch the case where user forgets to set PREFIX
101 # and does not have write permission in the /usr/local default location
102 check_writable_dir
${DESTDIR}${PREFIX} PREFIX
104 # Must create local aclocal dir or aclocal fails
105 ACLOCAL_LOCALDIR
="${DESTDIR}${DATADIR}/aclocal"
106 $SUDO mkdir
-p ${ACLOCAL_LOCALDIR}
108 # The following is required to make aclocal find our .m4 macros
109 ACLOCAL
=${ACLOCAL:="aclocal"}
110 ACLOCAL
="${ACLOCAL} -I ${ACLOCAL_LOCALDIR}"
113 # The following is required to make pkg-config find our .pc metadata files
114 PKG_CONFIG_PATH
=${DESTDIR}${DATADIR}/pkgconfig:${DESTDIR}${LIBDIR}/pkgconfig${PKG_CONFIG_PATH+:$PKG_CONFIG_PATH}
115 export PKG_CONFIG_PATH
117 # Set the library path so that locally built libs will be found by apps
118 LD_LIBRARY_PATH
=${DESTDIR}${LIBDIR}${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}
119 export LD_LIBRARY_PATH
121 # Set the path so that locally built apps will be found and used
122 PATH
=${DESTDIR}${BINDIR}${PATH+:$PATH}
125 # Choose which make program to use
128 # Create the log file directory
129 $SUDO mkdir
-p ${DESTDIR}${LOCALSTATEDIR}/log
132 # explain where a failure occurred
133 # if you find this message in the build output it can help tell you where the failure occurred
135 # $1 - which command failed
136 # $2/$3 - which module/component failed
143 echo "build.sh: \"$cmd\" failed on $module/$component"
144 failed_components
="$failed_components $module/$component"
147 # print a pretty title to separate the processing of each module
157 if [ X
"$module" = X
]; then
162 echo "======================================================================"
163 echo "== Processing module/component: \"$module/$component\""
172 "cursors") component
="xcursor-themes" ;;
173 "bitmaps") component
="xbitmaps" ;;
177 if [ X
"$component" != X
"encodings" ]; then
178 component
="font-$component"
183 "libXRes") component
="libXres" ;;
184 "libxtrans") component
="xtrans" ;;
193 "x11proto") component
="xproto" ;;
198 "cf") component
="xorg-cf-files" ;;
199 "macros") component
="util-macros" ;;
206 component
="xcb-proto"
209 module
="xcb/pthread-stubs"
210 component
="libpthread-stubs"
235 component
="xkeyboard-config"
238 component
="xorg-server"
241 for ii
in $module .
; do
243 TARFILE
=`ls -1rt $ii/$component-*.tar.$jj 2> /dev/null | tail -n 1`
244 if [ X
"$TARFILE" != X
]; then
245 SRCDIR
=`echo $TARFILE | sed "s,.tar.$jj,,"`
246 SRCDIR
=`echo $SRCDIR | sed "s,MesaLib,Mesa,"`
247 if [ ! -d $SRCDIR ]; then
249 if [ X
"$jj" = X
"gz" ]; then
252 tar $TAROPTS $TARFILE -C $ii
253 if [ $?
-ne 0 ]; then
254 failed
tar $module $component
266 # perform a clone of a git repository
267 # this function provides the mapping between module/component names
268 # and their location in the fd.o repository
271 # $2 - component (optional)
279 if [ X
"$module" = X
]; then
280 echo "clone() required first argument is missing"
302 DIR
="$module/$component"
303 GITROOT
=${GITROOT:="git://anongit.freedesktop.org/git"}
305 if [ ! -d "$DIR" ]; then
306 git clone
"$GITROOT/$BASEDIR$DIR" "$DIR"
307 if [ $?
-ne 0 ]; then
308 echo "Failed to clone $module module component $component. Ignoring."
309 clonefailed_components
="$clonefailed_components $module/$component"
313 echo "git cannot clone into an existing directory $module/$component"
320 # perform processing of each module/component
323 # $2 - component (optional)
333 if [ X
"$module" = X
]; then
334 echo "process() required first argument is missing"
338 module_title
$module $component
342 if [ -f $module/$component/autogen.sh
]; then
343 SRCDIR
="$module/$component"
345 elif [ X
"$CLONE" != X
]; then
346 clone
$module $component
347 if [ $?
-eq 0 ]; then
348 SRCDIR
="$module/$component"
353 checkfortars
$module $component
357 if [ X
"$SRCDIR" = X
]; then
358 echo "$module module component $component does not exist, skipping."
359 nonexistent_components
="$nonexistent_components $module/$component"
363 if [ X
"$BUILT_MODULES_FILE" != X
]; then
364 echo "$module/$component" >> $BUILT_MODULES_FILE
369 if [ $?
-ne 0 ]; then
370 failed cd1
$module $component
374 if [ X
"$GITCMD" != X
]; then
379 if [ $rtn -ne 0 ]; then
380 failed
"$GITCMD" $module $component
386 if [ X
"$PULL" != X
]; then
388 if [ $?
-ne 0 ]; then
389 failed
"git pull" $module $component
395 # Build outside source directory
396 if [ X
"$DIR_ARCH" != X
] ; then
398 if [ $?
-ne 0 ]; then
399 failed mkdir
$module $component
404 if [ $?
-ne 0 ]; then
405 failed cd2
$module $component
411 # Use "sh autogen.sh" since some scripts are not executable in CVS
412 if [ $needs_config -eq 1 ] ||
[ X
"$NOAUTOGEN" = X
]; then
413 sh
${DIR_CONFIG}/${CONFCMD} \
414 ${PREFIX_USER:+--prefix="$PREFIX"} \
415 ${EPREFIX_USER:+--exec-prefix="$EPREFIX"} \
416 ${BINDIR_USER:+--bindir="$BINDIR"} \
417 ${DATAROOTDIR_USER:+--datarootdir="$DATAROOTDIR"} \
418 ${DATADIR_USER:+--datadir="$DATADIR"} \
419 ${LIBDIR_USER:+--libdir="$LIBDIR"} \
420 ${LOCALSTATEDIR_USER:+--localstatedir="$LOCALSTATEDIR"} \
425 ${CPPFLAGS:+CPPFLAGS="$CPPFLAGS"} \
426 ${CFLAGS:+CFLAGS="$CFLAGS"} \
427 ${LDFLAGS:+LDFLAGS="$LDFLAGS"}
428 if [ $?
-ne 0 ]; then
429 failed
${CONFCMD} $module $component
435 # A custom 'make' target list was supplied through --cmd option
436 if [ X
"$MAKECMD" != X
]; then
437 ${MAKE} $MAKEFLAGS $MAKECMD
441 if [ $rtn -ne 0 ]; then
442 failed
"$MAKE $MAKEFLAGS $MAKECMD" $module $component
449 if [ $?
-ne 0 ]; then
450 failed
"$MAKE $MAKEFLAGS" $module $component
455 if [ X
"$CHECK" != X
]; then
456 ${MAKE} $MAKEFLAGS check
457 if [ $?
-ne 0 ]; then
458 failed
"$MAKE $MAKEFLAGS check" $module $component
464 if [ X
"$CLEAN" != X
]; then
465 ${MAKE} $MAKEFLAGS clean
466 if [ $?
-ne 0 ]; then
467 failed
"$MAKE $MAKEFLAGS clean" $module $component
473 if [ X
"$DIST" != X
]; then
474 ${MAKE} $MAKEFLAGS dist
475 if [ $?
-ne 0 ]; then
476 failed
"$MAKE $MAKEFLAGS dist" $module $component
482 if [ X
"$DISTCHECK" != X
]; then
483 ${MAKE} $MAKEFLAGS distcheck
484 if [ $?
-ne 0 ]; then
485 failed
"$MAKE $MAKEFLAGS distcheck" $module $component
491 $SUDO env LD_LIBRARY_PATH
=$LD_LIBRARY_PATH ${MAKE} $MAKEFLAGS install
492 if [ $?
-ne 0 ]; then
493 failed
"$SUDO env LD_LIBRARY_PATH=$LD_LIBRARY_PATH $MAKE $MAKEFLAGS install" $module $component
502 # process each module/component and handle:
503 # LISTONLY, RESUME, NOQUIT, and BUILD_ONE
506 # $2 - component (optional)
513 if [ X
"$LISTONLY" != X
]; then
514 echo "$module/$component"
518 if [ X
"$RESUME" != X
]; then
519 if [ X
"$RESUME" = X
"$module/$component" ]; then
521 # Resume build at this module
523 echo "Skipping $module module component $component..."
528 process
$module $component
529 if [ $?
-ne 0 ]; then
530 echo "build.sh: error processing module/component: \"$module/$component\""
531 if [ X
"$NOQUIT" = X
]; then
536 if [ X
"$BUILD_ONE" != X
]; then
537 echo "Single-component build complete"
542 # protocol headers have no build order dependencies
546 build proto applewmproto
549 build proto windowswmproto
554 build proto bigreqsproto
555 build proto compositeproto
556 build proto damageproto
558 build proto dri2proto
559 build proto fixesproto
560 build proto fontsproto
562 build proto inputproto
564 build proto randrproto
565 build proto recordproto
566 build proto renderproto
567 build proto resourceproto
568 build proto scrnsaverproto
569 build proto videoproto
571 build proto xcmiscproto
572 build proto xextproto
573 build proto xf86bigfontproto
574 build proto xf86dgaproto
575 build proto xf86driproto
576 build proto xf86vidmodeproto
577 build proto xineramaproto
581 # bitmaps is needed for building apps, so has to be done separately first
582 # cursors depends on apps/xcursorgen
583 # xkbdata is obsolete - use xkbdesc from xkeyboard-config instead
589 # All protocol modules must be installed before the libs (okay, that's an
590 # overstatement, but all protocol modules should be installed anyway)
592 # the libraries have a dependency order:
593 # xtrans, Xau, Xdmcp before anything else
594 # fontenc before Xfont
597 # (X11 and SM) before Xt
598 # Xt before Xmu and Xpm
599 # Xext before any other extension library
600 # Xfixes before Xcomposite
601 # Xp before XprintUtil before XprintAppUtil
607 build xcb pthread-stubs
617 build lib libWindowsWM
632 build lib libXcomposite
639 build lib libXinerama
643 build lib libXScrnSaver
647 build lib libXxf86dga
649 build lib libpciaccess
653 # Most apps depend at least on libX11.
655 # bdftopcf depends on libXfont
656 # mkfontscale depends on libfontenc and libfreetype
657 # mkfontdir depends on mkfontscale
659 # TODO: detailed breakdown of which apps require which libs
663 build app beforelight
673 build app mkcomposecache
675 build app mkfontscale
678 build app rendercheck
753 # The server requires at least the following libraries:
754 # Xfont, Xau, Xdmcp, pciaccess
759 build_driver_input
() {
760 # Some drivers are only buildable on some OS'es
763 build driver xf86-input-aiptek
764 build driver xf86-input-evdev
765 build driver xf86-input-joystick
767 FreeBSD | NetBSD | OpenBSD | Dragonfly | GNU
/kFreeBSD
)
768 build driver xf86-input-joystick
774 # And some drivers are only buildable on some CPUs.
776 i
*86 | amd64 | x86_64
)
777 build driver xf86-input-vmmouse
783 build driver xf86-input-acecad
784 build driver xf86-input-keyboard
785 build driver xf86-input-mouse
786 build driver xf86-input-penmount
787 build driver xf86-input-synaptics
788 build driver xf86-input-void
791 build_driver_video
() {
792 # Some drivers are only buildable on some OS'es
797 build driver xf86-video-sunffb
804 build driver xf86-video-wsfb
805 build driver xf86-video-sunffb
808 build driver xf86-video-sisusb
809 build driver xf86-video-sunffb
810 build driver xf86-video-v4l
811 build driver xf86-video-xgixp
814 # AMD Geode CPU. Driver contains 32 bit assembler code
815 build driver xf86-video-geode
823 # Some drivers are only buildable on some architectures
826 build driver xf86-video-suncg14
827 build driver xf86-video-suncg3
828 build driver xf86-video-suncg6
829 build driver xf86-video-sunleo
830 build driver xf86-video-suntcx
832 i
*86 | amd64 | x86_64
)
833 build driver xf86-video-i740
834 build driver xf86-video-intel
840 build driver xf86-video-apm
841 build driver xf86-video-ark
842 build driver xf86-video-ast
843 build driver xf86-video-ati
844 build driver xf86-video-chips
845 build driver xf86-video-cirrus
846 build driver xf86-video-dummy
847 build driver xf86-video-fbdev
848 # build driver xf86-video-glide
849 build driver xf86-video-glint
850 build driver xf86-video-i128
851 build driver xf86-video-mach64
852 build driver xf86-video-mga
853 build driver xf86-video-neomagic
854 build driver xf86-video-newport
855 build driver xf86-video-nv
856 build driver xf86-video-qxl
857 build driver xf86-video-rendition
858 build driver xf86-video-r128
859 build driver xf86-video-s3
860 build driver xf86-video-s3virge
861 build driver xf86-video-savage
862 build driver xf86-video-siliconmotion
863 build driver xf86-video-sis
864 build driver xf86-video-tdfx
865 build driver xf86-video-tga
866 build driver xf86-video-trident
867 build driver xf86-video-tseng
868 build driver xf86-video-vesa
869 build driver xf86-video-vmware
870 build driver xf86-video-voodoo
871 build driver xf86-video-xgi
874 # The server must be built before the drivers
876 # XQuartz doesn't need these...
885 # All fonts require mkfontscale and mkfontdir to be available
887 # The following fonts require bdftopcf to be available:
888 # adobe-100dpi, adobe-75dpi, adobe-utopia-100dpi, adobe-utopia-75dpi,
889 # arabic-misc, bh-100dpi, bh-75dpi, bh-lucidatypewriter-100dpi,
890 # bh-lucidatypewriter-75dpi, bitstream-100dpi, bitstream-75dpi,
891 # cronyx-cyrillic, cursor-misc, daewoo-misc, dec-misc, isas-misc,
892 # jis-misc, micro-misc, misc-cyrillic, misc-misc, mutt-misc,
893 # schumacher-misc, screen-cyrillic, sony-misc, sun-misc and
896 # The font util component must be built before any of the fonts, since they
897 # use the fontutil.m4 installed by it. (As do several other modules, such
898 # as libfontenc and app/xfs, which is why it is moved up to the top.)
900 # The alias component is recommended to be installed after the other fonts
901 # since the fonts.alias files reference specific fonts installed from the
902 # other font components
905 build font adobe-100dpi
906 build font adobe-75dpi
907 build font adobe-utopia-100dpi
908 build font adobe-utopia-75dpi
909 build font adobe-utopia-type1
910 build font arabic-misc
913 build font bh-lucidatypewriter-100dpi
914 build font bh-lucidatypewriter-75dpi
917 build font bitstream-100dpi
918 build font bitstream-75dpi
919 build font bitstream-speedo
920 build font bitstream-type1
921 build font cronyx-cyrillic
922 build font cursor-misc
923 build font daewoo-misc
928 build font micro-misc
929 build font misc-cyrillic
930 build font misc-ethiopic
931 build font misc-meltho
934 build font schumacher-misc
935 build font screen-cyrillic
938 build font winitzki-cyrillic
939 build font xfree86-type1
943 # makedepend requires xproto
947 build util gccmakedep
950 build xkeyboard-config
""
953 # xorg-docs requires xorg-sgml-doctools
955 build doc xorg-sgml-doctools
959 # just process the sub-projects supplied in the given file ($MODFILE)
960 # in the order in which they are found in the list
961 # (prerequisites and ordering are the responsibility of the user)
963 # $MODFILE - readable file containing list of modules to process
969 process_module_file
() {
971 if [ X
"$MODFILE" = X
]; then
972 echo "internal process_module_file() error, \$MODFILE is empty"
975 if [ ! -r "$MODFILE" ]; then
976 echo "module file '$MODFILE' is not readable or does not exist"
980 # read from input file, skipping blank and comment lines
983 if [ X
"$line" = X
]; then
988 echo "$line" |
grep "^#" > /dev
/null
989 if [ $?
-eq 0 ]; then
993 module
=`echo $line | cut -d'/' -f1`
994 component
=`echo $line | cut -d'/' -f2`
995 build
$module $component
1002 basename="`expr "//$0" : '.*/\([^/]*\)'`"
1003 echo "Usage: $basename [options] [prefix]"
1005 echo " -a Do NOT run auto config tools (autogen.sh, configure)"
1006 echo " -b Use .build.unknown build directory"
1007 echo " -c Run make clean in addition to \"all install\""
1008 echo " -D Run make dist in addition to \"all install\""
1009 echo " -d Run make distcheck in addition \"all install\""
1010 echo " -g Compile and link with debug information"
1011 echo " -h, --help Display this help and exit successfully"
1012 echo " -n Do not quit after error; just print error message"
1013 echo " -o <module/component> Build just this <module/component>"
1014 echo " -p Update source code before building (git pull --rebase)"
1015 echo " -s <sudo> The command name providing superuser privilege"
1016 echo " --autoresume <file> Append module being built to, and autoresume from, <file>"
1017 echo " --check Run make check in addition \"all install\""
1018 echo " --clone Clone non-existing repositories (uses \$GITROOT if set)"
1019 echo " --cmd <cmd> Execute arbitrary git, gmake, or make command <cmd>"
1020 echo " --confflags <options> Pass options to autgen.sh/configure"
1021 echo " --modfile <file> Only process the module/components specified in <file>"
1023 echo "Usage: $basename -L"
1024 echo " -L : just list modules to build"
1029 # Ensure the named variable value contains a full path name
1031 # $1 - the variable value (the path to examine)
1032 # $2 - the name of the variable
1034 # returns nothing or exit on error with message
1035 check_full_path
() {
1038 if [ X
"`expr substr $path 1 1`" != X
/ ]; then
1039 echo "The path \"$path\" supplied by \"$varname\" must be a full path name"
1046 # Ensure the named variable value contains a writable directory
1048 # $1 - the variable value (the path to examine)
1049 # $2 - the name of the variable
1051 # returns nothing or exit on error with message
1052 check_writable_dir
() {
1055 if [ X
"$SUDO" = X
]; then
1056 if [ ! -d "$path" ] ||
[ ! -w "$path" ]; then
1057 echo "The path \"$path\" supplied by \"$varname\" must be a writable directory"
1065 # perform sanity checks on cmdline args which require arguments
1067 # $1 - the option being examined
1068 # $2 - the argument to the option
1070 # if it returns, everything is good
1071 # otherwise it exit's
1076 if [ X
"$option" = X
]; then
1077 echo "internal required_arg() error, missing first argument"
1081 # check for an argument
1082 if [ X
"$arg" = X
]; then
1083 echo "the '$option' option is missing its required argument"
1089 # does the argument look like an option?
1090 echo $arg |
grep "^-" > /dev
/null
1091 if [ $?
-eq 0 ]; then
1092 echo "the argument '$arg' of option '$option' looks like an option itself"
1099 #------------------------------------------------------------------------------
1101 #------------------------------------------------------------------------------
1103 # Initialize variables controlling end of run reports
1104 failed_components
=""
1105 nonexistent_components
=""
1106 clonefailed_components
=""
1108 # Set variables supporting multiple binaries for a single source tree
1109 HAVE_ARCH
="`uname -i`"
1113 # Set variables for conditionally building some components
1119 # Process command line args
1127 DIR_ARCH
=".build.$HAVE_ARCH"
1140 CFLAGS
="${CFLAGS} -g3 -O0"
1169 BUILT_MODULES_FILE
=$1
1170 [ -f $1 ] && RESUME
=`tail -n 1 $1`
1181 cmd1
=`echo $1 | cut -d' ' -f1`
1182 cmd2
=`echo $1 | cut -d' ' -f2`
1184 # verify the command exists
1185 which $cmd1 > /dev
/null
2>&1
1186 if [ $?
-ne 0 ]; then
1187 echo "The specified command '$cmd1' does not appear to exist"
1201 echo "The script can only process 'make', 'gmake', or 'git' commands"
1202 echo "It can't process '$cmd1' commands"
1216 if [ ! -r "$1" ]; then
1217 echo "can't find/read file '$1'"
1223 if [ X
"$too_many" = Xyes
]; then
1224 echo "unrecognized and/or too many command-line arguments"
1225 echo " PREFIX: $PREFIX"
1226 echo " Extra arguments: $1"
1232 # check that 'prefix' doesn't look like an option
1233 echo $1 |
grep "^-" > /dev
/null
1234 if [ $?
-eq 0 ]; then
1235 echo "'prefix' appears to be an option"
1249 # All user input has been obtained, set-up the user shell variables
1250 if [ X
"$LISTONLY" = X
]; then
1252 echo "Building to run $HOST_OS / $HOST_CPU ($HOST)"
1256 if [ X
"$MODFILE" = X
]; then
1257 # We must install the global macros before anything else
1261 build util makedepend
1279 if [ X
"$LISTONLY" != X
]; then
1283 # Print the end date/time to compare with the start date/time
1286 # Report about components that failed for one reason or another
1287 if [ X
"$nonexistent_components" != X
]; then
1289 echo "***** Skipped components (not available) *****"
1290 echo "Could neither find a git repository (at the <module/component> paths)"
1291 echo "or a tarball (at the <module/> paths or ./) for:"
1292 echo " <module/component>"
1293 for mod
in $nonexistent_components; do
1296 echo "You may want to provide the --clone option to build.sh"
1297 echo "to automatically git-clone the missing components"
1301 if [ X
"$failed_components" != X
]; then
1303 echo "***** Failed components *****"
1304 for mod
in $failed_components; do
1310 if [ X
"$CLONE" != X
] && [ X
"$clonefailed_components" != X
]; then
1312 echo "***** Components failed to clone *****"
1313 for mod
in $clonefailed_components; do