autobuild 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. #!/bin/sh
  2. #
  3. # BEGIN COPYRIGHT BLOCK
  4. # This Program is free software; you can redistribute it and/or modify it under
  5. # the terms of the GNU General Public License as published by the Free Software
  6. # Foundation; version 2 of the License.
  7. #
  8. # This Program is distributed in the hope that it will be useful, but WITHOUT
  9. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  10. # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  11. #
  12. # You should have received a copy of the GNU General Public License along with
  13. # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
  14. # Place, Suite 330, Boston, MA 02111-1307 USA.
  15. #
  16. # In addition, as a special exception, Red Hat, Inc. gives You the additional
  17. # right to link the code of this Program with code not covered under the GNU
  18. # General Public License ("Non-GPL Code") and to distribute linked combinations
  19. # including the two, subject to the limitations in this paragraph. Non-GPL Code
  20. # permitted under this exception must only link to the code of this Program
  21. # through those well defined interfaces identified in the file named EXCEPTION
  22. # found in the source code files (the "Approved Interfaces"). The files of
  23. # Non-GPL Code may instantiate templates or use macros or inline functions from
  24. # the Approved Interfaces without causing the resulting work to be covered by
  25. # the GNU General Public License. Only Red Hat, Inc. may make changes or
  26. # additions to the list of Approved Interfaces. You must obey the GNU General
  27. # Public License in all respects for all of the Program code and other code used
  28. # in conjunction with the Program except the Non-GPL Code covered by this
  29. # exception. If you modify this file, you may extend this exception to your
  30. # version of the file, but you are not obligated to do so. If you do not wish to
  31. # provide this exception without modification, you must delete this exception
  32. # statement from your version and license this file solely under the GPL without
  33. # exception.
  34. #
  35. #
  36. # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  37. # Copyright (C) 2005 Red Hat, Inc.
  38. # All rights reserved.
  39. # END COPYRIGHT BLOCK
  40. #
  41. UNAME=`../nsarch`
  42. NSUNAME=`uname -s | sed -e 's%/%_%g'``uname -r`
  43. DATE="`date +%d-%h`"
  44. # OS tweaks
  45. if [ "$UNAME" = "SUNOS4" ]; then
  46. PATH=/usr/local/sun4/bin:/usr/bin/X11:$PATH; export PATH
  47. GTAR=/share/builds/f/gtar/bin/sunos-gtar
  48. HTTPDLIB=ns-httpd.so
  49. elif [ "$UNAME" = "SOLARIS" ]; then
  50. PATH=/usr/ccs/bin:/usr/openwin/bin:$PATH; export PATH
  51. OPENWINHOME=/usr/openwin; export OPENWINHOME
  52. GTAR=/share/builds/f/gtar/bin/solaris-gtar
  53. HTTPDLIB=ns-httpd.so
  54. elif [ "$UNAME" = "SOLARISx86" ]; then
  55. PATH=/usr/ccs/bin:/usr/openwin/bin:$PATH; export PATH
  56. OPENWINHOME=/usr/openwin; export OPENWINHOME
  57. HTTPDLIB=ns-httpd.so
  58. elif [ "$UNAME" = "HPUX" ]; then
  59. PATH=/usr/local/hpux/bin:/usr/bin/X11:$PATH; export PATH
  60. GTAR=/share/builds/f/gtar/bin/hpux-gtar
  61. ARCH=`uname -m`
  62. if [ "$ARCH" = "ia64" ]; then
  63. HTTPDLIB=libnshttpd.so
  64. else
  65. HTTPDLIB=libnshttpd.sl
  66. fi
  67. elif [ "$UNAME" = "BSDI" ]; then
  68. PATH=/usr/local/bin:/usr/X11/bin:$PATH; export PATH
  69. GTAR=/share/builds/f/gtar/bin/bsdi-gtar
  70. elif [ "$UNAME" = "OSF1" ]; then
  71. # NOJAVA=true
  72. PATH=/usr/local/dec/bin:/usr/bin/X11:$PATH; export PATH
  73. GTAR=/share/builds/f/gtar/bin/osf1-gtar
  74. HTTPDLIB=ns-httpd.so
  75. elif [ "$UNAME" = "AIX" ]; then
  76. PATH=/usr/local/aix32/bin:/usr/bin/X11:$PATH; export PATH
  77. GTAR=/share/builds/f/gtar/bin/aix-gtar
  78. HTTPDLIB=ns-httpd.a
  79. elif [ "$UNAME" = "IRIX" ]; then
  80. GTAR=/share/builds/f/gtar/bin/irix-gtar
  81. HTTPDLIB=ns-httpd.so
  82. elif [ "$UNAME" = "SONY" ]; then
  83. PATH=/usr/bin/X11:$PATH; export PATH
  84. HTTPDLIB=ns-httpd.so
  85. elif [ "$UNAME" = "NECSVR4" ]; then
  86. PATH=/u/malmer/nec/usr/local/bin:/usr/bin/X11:$PATH; export PATH
  87. HTTPDLIB=ns-httpd.so
  88. elif [ "$UNAME" = "ReliantUNIX" ]; then
  89. PATH=/usr/local/bin:$PATH; export PATH
  90. GTAR=tar
  91. HTTPDLIB=ns-httpd.so
  92. elif [ "$UNAME" = "SCO" ]; then
  93. PATH=/usr/local/bin:/usr/bin/X11:$PATH; export PATH
  94. GTAR=/usr/local/bin/gtar
  95. HTTPDLIB=ns-httpd.so
  96. elif [ "$UNAME" = "UNIXWARE" ]; then
  97. PATH=/usr/local/bin:/usr/bin/X11:$PATH; export PATH
  98. GTAR=/usr/local/bin/gtar
  99. HTTPDLIB=ns-httpd.so
  100. fi
  101. set -- `getopt p: $*` || {
  102. echo "### `basename $0`: ERROR: unknown option" 1>&2
  103. exit 1
  104. }
  105. BuildInPhases=0
  106. while [ "$1" != "--" ] ; do
  107. case "$1" in
  108. -p) BuildInPhases=1; shift; Phase=$1
  109. ;;
  110. esac
  111. shift
  112. done
  113. shift
  114. buildit() {
  115. # Initialize some variables
  116. ADMINDIR=../built/$UNAME-$SECTYPE-admserv
  117. if [ "$PRODUCT" = "personal" ]; then
  118. BINDIR=httpd
  119. TARNAME=nshttpd.tar
  120. elif [ "$PRODUCT" = "catalog" ]; then
  121. BINDIR=catalog
  122. TARNAME=ns-catalog.tar
  123. elif [ "$PRODUCT" = "rds" ]; then
  124. BINDIR=rds
  125. TARNAME=ns-rds.tar
  126. elif [ "$PRODUCT" = "cms" ]; then
  127. BINDIR=https
  128. TARNAME=ns-cms.tar
  129. else
  130. BINDIR=https
  131. TARNAME=nshttps.tar
  132. fi
  133. SOURCEDIR=../built/$UNAME-$SECTYPE-$BINDIR
  134. TARGETDIR=$TYPE/$UNAME-$SECTYPE-$BINDIR
  135. TARGETUNTAR=$TYPE/$UNAME-$SECTYPE-$BINDIR/untarred
  136. TARGETHTBIN=$TYPE/$UNAME-$SECTYPE-$BINDIR/untarred/bin/$BINDIR
  137. mkdir -p $TARGETUNTAR 2> /dev/null
  138. if [ $BuildInPhases = 1 ]
  139. then
  140. if [ "$Phase" = "server" ]
  141. then
  142. buildserver
  143. elif [ "$Phase" = "admin" ]
  144. then
  145. buildadmin
  146. elif [ "$Phase" = "batman" ]
  147. then
  148. buildbatman
  149. elif [ "$Phase" = "tar" ]
  150. then
  151. (cd $TARGETUNTAR; tar cvf ../$TARNAME *)
  152. else
  153. echo "`basename $0`: ERROR: unknown build phase"
  154. exit 1
  155. fi
  156. else
  157. buildserver
  158. buildadmin
  159. buildbatman
  160. (cd $TARGETUNTAR; tar cvf ../$TARNAME *)
  161. fi
  162. }
  163. buildserver() {
  164. (cd ..; ./config $BOMB $PRODUCT $SECCONFIG $OPTIMIZE)
  165. gmake
  166. if [ $? -ne 0 ]; then
  167. exit 2
  168. fi
  169. (cd ../mc-icons; gmake)
  170. if [ $? -ne 0 ]; then
  171. exit 2
  172. fi
  173. (cd ../include; gmake)
  174. if [ $? -ne 0 ]; then
  175. exit 2
  176. fi
  177. (cd nsapi; gmake)
  178. if [ $? -ne 0 ]; then
  179. exit 2
  180. fi
  181. (cd extras; gmake)
  182. if [ $? -ne 0 ]; then
  183. exit 2
  184. fi
  185. if [ "$NOJAVA" != "true" ]; then
  186. (cd ../lib/sjava; gmake)
  187. if [ $? -ne 0 ]; then
  188. exit 2
  189. fi
  190. fi
  191. # generate DBMs in admin/bin directory
  192. (cd $SOURCEDIR/admin/bin; ./mkdbm)
  193. # Each product has different manuals
  194. if [ "$BINDIR" = "catalog" -o "$BINDIR" = "rds" ]; then
  195. # Batman
  196. ADMINMANUALS="html/manual/ag html/manual/design html/manual/beta2"
  197. else
  198. # Enterprise and FastTrack
  199. ADMINMANUALS="html/manual/ag html/manual/pg html/manual/javascript"
  200. fi
  201. for i in icons html html/info html/manual $ADMINMANUALS bin; do
  202. mkdir -p $TARGETUNTAR/bin/$BINDIR/admin/$i
  203. cp $SOURCEDIR/admin/$i/* $TARGETHTBIN/admin/$i
  204. done
  205. /bin/rm -f $TARGETHTBIN/admin/bin/*.o
  206. $STRIP $TARGETHTBIN/admin/bin/*
  207. for i in misc icons html bin; do
  208. mkdir -p $TARGETHTBIN/install/$i
  209. cp $SOURCEDIR/install/$i/* $TARGETHTBIN/install/$i
  210. done
  211. $STRIP $TARGETHTBIN/install/bin/*
  212. mv $TARGETHTBIN/install/bin/ns-setup $TARGETDIR
  213. mv $TARGETHTBIN/install/bin/ns-config $TARGETHTBIN/ns-config
  214. mkdir -p $TARGETUNTAR/ns-icons
  215. cp $SOURCEDIR/mc-icons/* $TARGETUNTAR/ns-icons
  216. if [ -d $SOURCEDIR/nsapi -a "$UNAME" != "BSDI" ]; then
  217. mkdir -p $TARGETUNTAR/nsapi
  218. cp -r $SOURCEDIR/nsapi/* $TARGETUNTAR/nsapi
  219. fi
  220. mkdir -p $TARGETUNTAR/extras
  221. cp -r $SOURCEDIR/extras/* $TARGETUNTAR/extras
  222. $STRIP $TARGETUNTAR/extras/*/*
  223. cp $SOURCEDIR/ns-httpd $TARGETHTBIN/ns-httpd
  224. if [ "$HTTPDLIB" != "" ]; then
  225. cp $SOURCEDIR/$HTTPDLIB $TARGETHTBIN/$HTTPDLIB
  226. fi
  227. $STRIP $TARGETHTBIN/ns-httpd
  228. if [ "$UNAME" != "IRIX" -a "$UNAME" != "SUNOS4" ]; then
  229. $STRIP $TARGETHTBIN/$HTTPDLIB
  230. fi
  231. if [ "$UNAME" = "AIX" ]; then
  232. cp /usr/lib/libsvld.a $TARGETHTBIN/libsvld.a
  233. fi
  234. cp README $TARGETDIR
  235. cp newinst/misc/license.txt $TARGETDIR
  236. mkdir -p $TARGETUNTAR/userdb
  237. mkdir -p $TARGETUNTAR/httpacl
  238. mkdir -p $TARGETUNTAR/authdb
  239. mkdir -p $TARGETUNTAR/authdb/default
  240. if [ "$PRODUCT" = "enterprise" ]; then
  241. mkdir -p $TARGETUNTAR/plugins/search/admin
  242. mkdir -p $TARGETUNTAR/plugins/search/tmp
  243. chmod a+w $TARGETUNTAR/plugins/search/tmp
  244. mkdir -p $TARGETUNTAR/plugins/search/collections
  245. chmod a+w $TARGETUNTAR/plugins/search/collections
  246. cp -r plugins/search $TARGETUNTAR/plugins
  247. (cd $TARGETUNTAR/plugins/search; rm -r `find . -name CVS -print`)
  248. cp $SOURCEDIR/lib/vsearch $TARGETUNTAR/plugins/search/vsearch
  249. cp $SOURCEDIR/admin/bin/ia* $TARGETUNTAR/plugins/search/vsearch
  250. $STRIP $TARGETUNTAR/plugins/search/vsearch/ia*
  251. cp ../lib/libsearch/searching/query.err $TARGETUNTAR/plugins/search/vsearch
  252. mkdir -p $TARGETUNTAR/plugins/search/ui/icons
  253. mkdir -p $TARGETUNTAR/plugins/search/ui/usa
  254. cp ../lib/libsearch/searching/ui/icons/* $TARGETUNTAR/plugins/search/ui/icons
  255. cp ../lib/libsearch/searching/ui/usa/* $TARGETUNTAR/plugins/search/ui/usa
  256. mkdir -p $TARGETUNTAR/plugins/snmp
  257. mkdir -p $TARGETUNTAR/plugins/snmp/magt
  258. mkdir -p $TARGETUNTAR/plugins/snmp/sagt
  259. if [ -d $SOURCEDIR/plugin/snmp -a -f $SOURCEDIR/plugin/snmp/httpagt ]; then
  260. cp $SOURCEDIR/plugin/snmp/httpagt $TARGETUNTAR/plugins/snmp/httpagt
  261. fi
  262. cp plugins/snmp/netscape.pub $TARGETUNTAR/plugins/snmp/netscape.mib
  263. mkdir -p $TARGETUNTAR/plugins/mks/bin
  264. cp $SOURCEDIR/plugins/mks/bin/*.so $TARGETUNTAR/plugins/mks/bin
  265. if [ "$UNAME" = "SUNOS4" ]; then
  266. cp ../../../peer/sunos/magt/* $TARGETUNTAR/plugins/snmp/magt
  267. cp ../../../peer/sunos/sagt/* $TARGETUNTAR/plugins/snmp/sagt
  268. elif [ "$UNAME" = "SOLARIS" ]; then
  269. cp ../../../peer/solaris/magt/* $TARGETUNTAR/plugins/snmp/magt
  270. cp ../../../peer/solaris/sagt/* $TARGETUNTAR/plugins/snmp/sagt
  271. elif [ "$UNAME" = "HPUX" ]; then
  272. cp ../../../peer/hp/magt/* $TARGETUNTAR/plugins/snmp/magt
  273. cp ../../../peer/hp/sagt/* $TARGETUNTAR/plugins/snmp/sagt
  274. elif [ "$UNAME" = "OSF1" ]; then
  275. cp ../../../peer/osf/magt/* $TARGETUNTAR/plugins/snmp/magt
  276. cp ../../../peer/osf/sagt/* $TARGETUNTAR/plugins/snmp/sagt
  277. elif [ "$UNAME" = "AIX" ]; then
  278. cp ../../../peer/aix/magt/* $TARGETUNTAR/plugins/snmp/magt
  279. cp ../../../peer/aix/sagt/* $TARGETUNTAR/plugins/snmp/sgat
  280. elif [ "$UNAME" = "IRIX" ]; then
  281. cp ../../../peer/irix/magt/* $TARGETUNTAR/plugins/snmp/magt
  282. cp ../../../peer/irix/sagt/* $TARGETUNTAR/plugins/snmp/sagt
  283. fi
  284. fi # PRODUCT = enterprise
  285. if [ "$NOJAVA" != "true" ]; then
  286. mkdir -p $TARGETUNTAR/plugins/java/bin
  287. cp $SOURCEDIR/lib/libsjava.so $TARGETUNTAR/plugins/java/bin
  288. mkdir -p $TARGETUNTAR/plugins/java/classes
  289. cp ../../sun-java/classsrc/serv2_0.zip $TARGETUNTAR/plugins/java/classes
  290. cp plugins/java/javac $TARGETUNTAR/plugins/java
  291. cp plugins/java/README $TARGETUNTAR/plugins/java
  292. mkdir -p $TARGETUNTAR/plugins/java/applets
  293. cp plugins/java/applets/* $TARGETUNTAR/plugins/java/applets
  294. # mkdir -p $TARGETUNTAR/plugins/java/local-classes
  295. # cp plugins/java/local-classes/* $TARGETUNTAR/plugins/java/local-classes
  296. # XXXrobm these docs assume that we have Sun's HTML and images
  297. # mkdir -p $TARGETUNTAR/plugins/java/docs/images
  298. # cp plugins/java/docs/*.html $TARGETUNTAR/plugins/java/docs
  299. # cp ../../sun-java/javadoc/*.gif $TARGETUNTAR/plugins/java/docs/images
  300. fi
  301. mkdir $TARGETUNTAR/install
  302. cp ./newinst/src/upgrade $TARGETUNTAR/install
  303. cp ./newinst/src/ObjConf.pm $TARGETUNTAR/install
  304. cp ./newinst/src/Magnus.pm $TARGETUNTAR/install
  305. cp ./newinst/src/start $TARGETUNTAR/install
  306. cp ./newinst/src/stop $TARGETUNTAR/install
  307. cp ./newinst/src/restart $TARGETUNTAR/install
  308. cp ./newinst/src/rotate $TARGETUNTAR/install
  309. cp ./newinst/perl5/$UNAME-perl5/perl $TARGETUNTAR/install
  310. cp ./newinst/perl5/artistic $TARGETUNTAR/install
  311. if [ "$UNAME" = "IRIX" ] || [ "$UNAME" = "SOLARIS" ] || [ "$UNAME" = "OSF1" ] ; then
  312. cp ./newinst/src/kernelThreads.pl $TARGETUNTAR/install/threads.pl
  313. fi
  314. cp $SOURCEDIR/extras/database/mkuser $TARGETUNTAR/install
  315. cp $SOURCEDIR/extras/database/ndbmdump $TARGETUNTAR/install
  316. cp $SOURCEDIR/extras/database/rcert11 $TARGETUNTAR/install
  317. cp $SOURCEDIR/extras/database/rkey11 $TARGETUNTAR/install
  318. $STRIP $TARGETUNTAR/install/*
  319. if [ "$DO_LIVEWIRE" = "yes" ]; then
  320. if [ "$UNAME" = "IRIX" ] ; then
  321. PLATSFX=sgi
  322. elif [ "$UNAME" = "SOLARIS" ] ; then
  323. PLATSFX=sol
  324. elif [ "$UNAME" = "HPUX" ] ; then
  325. PLATSFX=hpx
  326. fi
  327. LIVEWIRETAR=livewire_$PLATSFX.tar
  328. if [ -d $TARGETUNTAR/LiveWire ]; then
  329. rm -rf $TARGETUNTAR/LiveWire
  330. fi
  331. mkdir $TARGETUNTAR/LiveWire
  332. cp ./newinst/src/$LIVEWIRETAR.gz $TARGETUNTAR/LiveWire
  333. gunzip $TARGETUNTAR/LiveWire/$LIVEWIRETAR
  334. (cd $TARGETUNTAR/LiveWire; tar xf livewire*.tar)
  335. cp $TARGETUNTAR/LiveWire/server/* $TARGETUNTAR/bin/$BINDIR
  336. cp $TARGETUNTAR/LiveWire/bin/* $TARGETUNTAR/bin/$BINDIR
  337. rm -rf $TARGETUNTAR/LiveWire/server $TARGETUNTAR/LiveWire/bin
  338. rm $TARGETUNTAR/LiveWire/livewire*.tar
  339. fi
  340. (cd $TARGETUNTAR; find . -name \*.o -print | xargs rm -f)
  341. }
  342. buildadmin() {
  343. # BONEHEAD
  344. (cd ..; ./config $BOMB admin $SECCONFIG $OPTIMIZE)
  345. (cd ../admserv; gmake)
  346. if [ $? -ne 0 ]; then
  347. exit 2
  348. fi
  349. mkdir -p $TARGETUNTAR/admserv
  350. cp $ADMINDIR/ns-admin $TARGETUNTAR/admserv
  351. $STRIP $TARGETUNTAR/admserv/ns-admin
  352. for i in icons html html/info bin cfgstuff; do
  353. mkdir -p $TARGETUNTAR/bin/admserv/$i
  354. cp $ADMINDIR/cgi/$i/* $TARGETUNTAR/bin/admserv/$i
  355. done
  356. $STRIP $TARGETUNTAR/bin/admserv/bin/*
  357. }
  358. buildbatman() {
  359. # For AutoCatalog from Batman -Darren
  360. if [ "$DO_AUTOCATALOG" = "yes" ]; then
  361. # We need to re-run config to get our own library versions, etc.
  362. (cd ..; ./config $BOMB batman $SECCONFIG $OPTIMIZE)
  363. # This ugly hack is needed because nspr.a must be rebuilt on
  364. # SOLARIS for batman. There are symbols required by the gcc
  365. # generated code that SparcWorks doesn't provide - nothing links.
  366. if [ "$UNAME" = "SOLARIS" ]; then
  367. NSPRDIR=../../nspr/src/${NSUNAME}_${NSTAG}.OBJ
  368. mv $NSPRDIR/nspr.a $NSPRDIR/GCCnspr.a
  369. if [ -f $NSPRDIR/SPARCWKnspr.a ] ; then
  370. mv $NSPRDIR/SPARCWKnspr.a $NSPRDIR/nspr.a
  371. else
  372. rm -f $NSPRDIR/*.o
  373. fi
  374. fi
  375. (NS_USE_NATIVE=1; export NS_USE_NATIVE; cd ../batman; gmake MINIRDS_INSTALLDIR="../../httpd/$TARGETUNTAR/plugins" NSAPIDIR="$TARGETUNTAR/nsapi" minirds)
  376. if [ $? -ne 0 ]; then
  377. exit 2
  378. fi
  379. $STRIP $TARGETUNTAR/plugins/autocatalog/bin/*
  380. $STRIP $TARGETUNTAR/plugins/autocatalog/*
  381. if [ "$UNAME" = "SOLARIS" ] ; then
  382. mv $NSPRDIR/nspr.a $NSPRDIR/SPARCWKnspr.a
  383. mv $NSPRDIR/GCCnspr.a $NSPRDIR/nspr.a
  384. fi
  385. fi
  386. }
  387. if [ "`echo $* | grep final`" != "" ]; then
  388. TYPE=final
  389. BOMB=nobomb
  390. elif [ "`echo $* | grep beta`" != "" ]; then
  391. TYPE=beta
  392. BOMB=bomb
  393. else
  394. echo "You must choose to build either a beta or final version."
  395. exit 2
  396. fi
  397. if [ "$NOJAVA" = "" -a "`echo $* | grep java`" != "" ]; then
  398. NOJAVA=false
  399. else
  400. NOJAVA=true
  401. fi
  402. if [ "$DO_AUTOCATALOG" = "" -a "`echo $* | grep autocatalog`" != "" ]; then
  403. DO_AUTOCATALOG=yes
  404. else
  405. DO_AUTOCATALOG=no
  406. fi
  407. # need to export DO_AUTOCATALOG so that it's passed down through all gmakes
  408. export DO_AUTOCATALOG
  409. if [ "$DO_LIVEWIRE" = "" ]; then
  410. if [ "`echo $* | grep livewire`" != "" ]; then
  411. DO_LIVEWIRE=yes
  412. else
  413. DO_LIVEWIRE=no
  414. fi
  415. fi
  416. export DO_LIVEWIRE
  417. OPTIMIZE=optimize
  418. NSTAG=OPT
  419. STRIP=strip
  420. if [ "`echo $* | grep debug`" != "" ]; then
  421. OPTIMIZE=debug
  422. NSTAG=DBG
  423. STRIP=echo
  424. fi
  425. NSDISTDIR=../../dist/${NSUNAME}_${NSTAG}.OBJ
  426. if [ "`echo $* | grep personal`" != "" ]; then
  427. PRODUCT=personal
  428. elif [ "`echo $* | grep ns_catalog`" != "" ]; then
  429. PRODUCT=catalog
  430. elif [ "`echo $* | grep ns_rds`" != "" ]; then
  431. PRODUCT=rds
  432. elif [ "`echo $* | grep cms`" != "" ]; then
  433. PRODUCT=cms
  434. else
  435. PRODUCT=enterprise
  436. fi
  437. if [ "`echo $* | grep unsecure`" != "" -o "`echo $* | grep all`" != "" ]; then
  438. SECTYPE=none
  439. SECCONFIG=unsecure
  440. buildit
  441. fi
  442. if [ "`echo $* | grep export`" != "" -o "`echo $* | grep all`" != "" ]; then
  443. SECTYPE=export
  444. SECCONFIG=export
  445. buildit
  446. fi
  447. if [ "`echo $* | grep domestic`" != "" -o "`echo $* | grep all`" != "" ]; then
  448. SECTYPE=domestic
  449. SECCONFIG=domestic
  450. buildit
  451. fi