Lines Matching +full:- +full:- +full:libs
2 set -e
7 # Usage: makesetup [-s dir] [-c file] [-m file] [Setup] ... [-n [Setup] ...]
10 # -s directory: alternative source directory (default .)
11 # -l directory: library source directory (default derived from $0)
12 # -c file: alternative config.c template (default $libdir/config.c.in)
13 # -c -: don't write config.c
14 # -m file: alternative Makefile template (default ./Makefile.pre)
15 # -m -: don't write Makefile
18 # Setup files after a -n option are used for their variables, modules
26 # - insert an identifying comment at the start
27 # - for each <module> mentioned in Setup before *noconfig*:
32 # - insert an identifying comment at the start
33 # - replace _MODBUILT_NAMES_ by the list of *static* and *shared* modules
35 # - replace _MODBSHARED_NAMES_ by the list of *shared* modules from Setup
36 # - replace _MODDISABLED_NAMES_ by the list of *disabled* modules from Setup
37 # - replace _MODOBJS_ by the list of objects from Setup (except for
38 # Setup files after a -n option)
39 # - replace _MODLIBS_ by the list of libraries from Setup
40 # - for each object file mentioned in Setup, append a rule
42 # - for each module mentioned in Setup, append a rule
44 # - for each variable definition found in Setup, insert the definition
49 usage: makesetup [-s srcdir] [-l libdir] [-c config.c.in] [-m Makefile.pre]
50 [Setup] ... [-n [Setup] ...]'
60 -s) shift; srcdir=$1; shift;;
61 -l) shift; libdir=$1; shift;;
62 -c) shift; config=$1; shift;;
63 -m) shift; makepre=$1; shift;;
64 --) shift; break;;
65 -n) noobjects=yes;;
66 -*) echo "$usage" 1>&2; exit 2;;
92 case `uname -s` in
99 ExtraLibs="-L$ExtraLibDir -lpython\$(LDVERSION)";;
103 for i in ${*-Setup}
106 -n) echo '*noobjects*';;
110 sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
113 trap 'rm -f $rulesf' 0 1 2 3
125 LIBS=
145 *) LOCALLIBS=$LIBS; LIBS=;;
157 libs=
164 libs) libs="$libs $arg"; skip=; continue;;
169 -framework) libs="$libs $arg"; skip=libs;
172 -[IDUCfF]*) cpps="$cpps $arg";;
173 -Xcompiler) skip=cpps;;
174 -Xlinker) libs="$libs $arg"; skip=libs;;
175 -rpath) libs="$libs $arg"; skip=libs;;
176 --rpath) libs="$libs $arg"; skip=libs;;
177 -[A-Zl]*) libs="$libs $arg";;
178 *.a) libs="$libs $arg";;
179 *.so) libs="$libs $arg";;
180 *.sl) libs="$libs $arg";;
181 /*.o) libs="$libs $arg";;
182 *.def) libs="$libs $arg";;
185 *.m) srcs="$srcs $arg";; # Objective-C src
192 \$\(*_LIBS\)) libs="$libs $arg";;
193 \$\(*_LDFLAGS\)) libs="$libs $arg";;
194 \$\(*_RPATH\)) libs="$libs $arg";;
195 \$*) libs="$libs $arg"
199 -u) skip=libs; libs="$libs -u";;
200 [a-zA-Z_]*)
202 mods_upper=$(echo $mods | tr '[a-z]' '[A-Z]');;
207 if test -z "$cpps" -a -z "$libs"; then
209 libs="\$(MODULE_${mods_upper}_LDFLAGS)"
224 LIBS="$LIBS $libs"
249 *.m) obj=`basename $src .m`.o; cc='$(CC)';; # Obj-C
263 # custom flags first, PY_STDMODULE_CFLAGS may contain -I with system libmpdec
270 …"$obj: $src \$(MODULE_${mods_upper}_DEPS) \$(PYTHON_HEADERS) Modules/config.c; $cc -c $src -o $obj"
286 rule="$rule; \$(BLDSHARED) $objs $libs $ExtraLibs -o $file"
297 yes) BASELIBS=$LIBS;;
298 *) LOCALLIBS=$LIBS;;
300 LIBS='$(LOCALMODLIBS) $(BASEMODLIBS)'
314 -) ;;
315 *) sed -e "
326 -) ;;
332 trap 'rm -f $sedf $sedr' 0 1 2 3
341 echo "s%_MODLIBS_%$LIBS%" >>$sedf
343 sed -f $sedf $makepre >Makefile
345 rm -f $sedf $sedr
349 rm -f $rulesf