VirtualBox

source: vbox/trunk/tools/bin/gen-slickedit-workspace.sh@ 39408

Last change on this file since 39408 was 39403, checked in by vboxsync, 13 years ago

more bug fixing.

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 41.0 KB
Line 
1# !kmk_ash
2# $Id: gen-slickedit-workspace.sh 39403 2011-11-23 16:27:46Z vboxsync $
3## @file
4# Script for generating a SlickEdit workspace.
5#
6
7#
8# Copyright (C) 2009-2011 Oracle Corporation
9#
10# This file is part of VirtualBox Open Source Edition (OSE), as
11# available from http://www.virtualbox.org. This file is free software;
12# you can redistribute it and/or modify it under the terms of the GNU
13# General Public License (GPL) as published by the Free Software
14# Foundation, in version 2 as it comes in the "COPYING" file of the
15# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17#
18
19#
20# Some constants.
21#
22MY_CAT="kmk_cat"
23MY_MKDIR="kmk_mkdir"
24MY_MV="kmk_mv"
25MY_SED="kmk_sed"
26MY_RM="kmk_rm"
27MY_SLEEP="kmk_sleep"
28MY_EXPR="kmk_expr"
29MY_SVN="svn"
30
31#MY_SORT="kmk_cat"
32MY_SORT="sort"
33
34#
35# Globals.
36#
37MY_PROJECT_FILES=""
38MY_OUT_DIRS="\
39out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE} \
40out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/${BUILD_TYPE} \
41out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/debug \
42out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/debug \
43out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/release \
44out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/release \
45out/linux.amd64/debug \
46out/linux.x86/debug \
47out/win.amd64/debug \
48out/win.x86/debug \
49out/darwin.amd64/debug \
50out/darwin.x86/debug \
51out/solaris.amd64/debug \
52out/solaris.x86/debug";
53
54
55#
56# Parameters w/ defaults.
57#
58MY_ROOT_DIR=".."
59MY_OUT_DIR="SlickEdit"
60MY_PRJ_PRF="VBox-"
61MY_WS_NAME="VirtualBox.vpw"
62MY_DBG=""
63MY_WINDOWS_HOST=""
64MY_OPT_MINIMAL=""
65
66#MY_KBUILD_PATH="${KBUILD_PATH}"
67#test -z "${MY_KBUILD_PATH}" && MY_KBUILD_PATH="${PATH_KBUILD}"
68#MY_KBUILD=""
69
70
71##
72# Gets the absolute path to an existing directory.
73#
74# @param $1 The path.
75my_abs_dir()
76{
77 if test -n "${PWD}"; then
78 MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && echo ${PWD}`
79 else
80 # old cygwin shell has no PWD and need adjusting.
81 MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && pwd | ${MY_SED} -e 's,^/cygdrive/\(.\)/,\1:/,'`
82 fi
83 if test -z "${MY_ABS_DIR}"; then
84 MY_ABS_DIR="${1}"
85 fi
86}
87
88##
89# Gets the file name part of a path.
90#
91# @param $1 The path.
92my_get_name()
93{
94 SAVED_IFS=$IFS
95 IFS=":/ "
96 set $1
97 while test $# -gt 1 -a -n "${2}";
98 do
99 shift;
100 done
101
102 IFS=$SAVED_IFS
103 #echo "$1"
104 export MY_GET_NAME=$1
105}
106
107##
108# Generate file entry for the specified file if it was found to be of interest.
109#
110# @param $1 The output file name base.
111# @param $2 The file name.
112my_file()
113{
114 # sort and filter by file type.
115 case "$2" in
116 # drop these.
117 *.kup|*~|*.pyc|*.exe|*.sys|*.dll|*.o|*.obj|*.lib|*.a|*.ko)
118 return 0
119 ;;
120
121 # by prefix or directory component.
122 tst*|*/testcase/*)
123 MY_FOLDER="$1-Testcases.lst"
124 ;;
125
126 # by extension.
127 *.c|*.cpp|*.m|*.mm|*.pl|*.py|*.as|*.c.h|*.cpp.h)
128 MY_FOLDER="$1-Sources.lst"
129 ;;
130
131 *.h|*.hpp|*.mm)
132 MY_FOLDER="$1-Headers.lst"
133 ;;
134
135 *.asm|*.s|*.S|*.inc|*.mac)
136 MY_FOLDER="$1-Assembly.lst"
137 ;;
138
139 *)
140 MY_FOLDER="$1-Others.lst"
141 ;;
142 esac
143
144 ## @todo only files which are in subversion.
145# if ${MY_SVN} info "${2}" > /dev/null 2>&1; then
146 my_get_name "${2}"
147 echo ' <!-- sortkey: '"${MY_GET_NAME}"' --> <F N="'"${2}"'"/>' >> "${MY_FOLDER}"
148# fi
149}
150
151##
152# Generate file entries for the specified sub-directory tree.
153#
154# @param $1 The output filename.
155# @param $2 The sub-directory.
156my_sub_tree()
157{
158 if test -n "$MY_DBG"; then echo "dbg: my_sub_tree: ${2}"; fi
159
160 # Skip .svn directories.
161 case "$2" in
162 */.svn|*/.svn)
163 return 0
164 ;;
165 esac
166
167 # Process the files in the directory.
168 for f in $2/*;
169 do
170 if test -d "${f}";
171 then
172 my_sub_tree "${1}" "${f}"
173 else
174 my_file "${1}" "${f}"
175 fi
176 done
177 return 0;
178}
179
180
181##
182# Generate folders for the specified directories and files.
183#
184# @param $1 The output (base) file name.
185# @param $2+ The files and directories to traverse.
186my_generate_folder()
187{
188 MY_FILE="$1"
189 shift
190
191 # Zap existing file collections.
192 > "${MY_FILE}-Sources.lst"
193 > "${MY_FILE}-Headers.lst"
194 > "${MY_FILE}-Assembly.lst"
195 > "${MY_FILE}-Testcases.lst"
196 > "${MY_FILE}-Others.lst"
197
198 # Traverse the directories and files.
199 while test $# -ge 1 -a -n "${1}";
200 do
201 for f in ${MY_ROOT_DIR}/$1;
202 do
203 if test -d "${f}";
204 then
205 my_sub_tree "${MY_FILE}" "${f}"
206 else
207 my_file "${MY_FILE}" "${f}"
208 fi
209 done
210 shift
211 done
212
213 # Generate the folders.
214 if test -s "${MY_FILE}-Sources.lst";
215 then
216 echo ' <Folder Name="Sources" Filters="*.c;*.cpp;*.cpp.h;*.c.h;*.m;*.mm;*.pl;*.py;*.as">' >> "${MY_FILE}"
217 ${MY_SORT} "${MY_FILE}-Sources.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
218 echo ' </Folder>' >> "${MY_FILE}"
219 fi
220 if test -s "${MY_FILE}-Headers.lst";
221 then
222 echo ' <Folder Name="Headers" Filters="*.h;*.hpp">' >> "${MY_FILE}"
223 ${MY_SORT} "${MY_FILE}-Headers.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
224 echo ' </Folder>' >> "${MY_FILE}"
225 fi
226 if test -s "${MY_FILE}-Assembly.lst";
227 then
228 echo ' <Folder Name="Assembly" Filters="*.asm;*.s;*.S;*.inc;*.mac">' >> "${MY_FILE}"
229 ${MY_SORT} "${MY_FILE}-Assembly.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
230 echo ' </Folder>' >> "${MY_FILE}"
231 fi
232 if test -s "${MY_FILE}-Testcases.lst";
233 then
234 echo ' <Folder Name="Testcases" Filters="tst*;">' >> "${MY_FILE}"
235 ${MY_SORT} "${MY_FILE}-Testcases.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
236 echo ' </Folder>' >> "${MY_FILE}"
237 fi
238 if test -s "${MY_FILE}-Others.lst";
239 then
240 echo ' <Folder Name="Others" Filters="">' >> "${MY_FILE}"
241 ${MY_SORT} "${MY_FILE}-Others.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
242 echo ' </Folder>' >> "${MY_FILE}"
243 fi
244
245 # Cleanup
246 ${MY_RM} "${MY_FILE}-Sources.lst" "${MY_FILE}-Headers.lst" "${MY_FILE}-Assembly.lst" "${MY_FILE}-Testcases.lst" "${MY_FILE}-Others.lst"
247}
248
249
250##
251# Function generating a project.
252#
253# @param $1 The project file name.
254# @param $2 The project working directory.
255# @param $3 Dummy separator.
256# @param $4+ Include directories.
257# @param $N --end-includes
258# @param $N+1 Directory sub-trees and files to include in the project.
259#
260my_generate_project()
261{
262 MY_FILE="${MY_PRJ_PRF}${1}.vpj";
263 echo "Generating ${MY_FILE}..."
264 MY_WRK_DIR="${2}"
265 shift
266 shift
267 shift
268
269 # Add it to the project list for workspace construction later on.
270 MY_PROJECT_FILES="${MY_PROJECT_FILES} ${MY_FILE}"
271
272
273 #
274 # Generate the head bits.
275 #
276 echo '<!DOCTYPE Project SYSTEM "http://www.slickedit.com/dtd/vse/10.0/vpj.dtd">' > "${MY_FILE}"
277 echo '<Project' >> "${MY_FILE}"
278 echo ' Version="10.0"' >> "${MY_FILE}"
279 echo ' VendorName="SlickEdit"' >> "${MY_FILE}"
280 echo ' VCSProject="Subversion:"' >> "${MY_FILE}"
281# echo ' Customized="1"' >> "${MY_FILE}"
282# echo ' WorkingDir="."' >> "${MY_FILE}"
283 my_abs_dir "${MY_WRK_DIR}" >> "${MY_FILE}"
284 echo ' WorkingDir="'"${MY_ABS_DIR}"'"' >> "${MY_FILE}"
285 echo ' >' >> "${MY_FILE}"
286 echo ' <Config Name="Release" OutputFile="" CompilerConfigName="Latest Version">' >> "${MY_FILE}"
287 echo ' <Menu>' >> "${MY_FILE}"
288 echo ' <Target Name="Compile" MenuCaption="&amp;Compile" CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}"
289 echo ' SaveOption="SaveCurrent" RunFromDir="%p" ClearProcessBuffer="1">' >> "${MY_FILE}"
290 echo ' <Exec CmdLine="'"${MY_KMK_INVOCATION}"' -C %p %n.o"/>' >> "${MY_FILE}"
291 echo ' </Target>' >> "${MY_FILE}"
292 echo ' <Target Name="Build" MenuCaption="&amp;Build"CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}"
293 echo ' SaveOption="SaveWorkspaceFiles" RunFromDir="%rw" ClearProcessBuffer="1">' >> "${MY_FILE}"
294 echo ' <Exec CmdLine="'"${MY_KMK_INVOCATION}"' -C %rw"/>' >> "${MY_FILE}"
295 echo ' </Target>' >> "${MY_FILE}"
296 echo ' <Target Name="Rebuild" MenuCaption="&amp;Rebuild" CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}"
297 echo ' SaveOption="SaveWorkspaceFiles" RunFromDir="%rw" ClearProcessBuffer="1">' >> "${MY_FILE}"
298 echo ' <Exec CmdLine="'"${MY_KMK_INVOCATION}"' -C %rw rebuild"/>' >> "${MY_FILE}"
299 echo ' </Target>' >> "${MY_FILE}"
300 echo ' <Target Name="Debug" MenuCaption="&amp;Debug" SaveOption="SaveNone" RunFromDir="%rw">' >> "${MY_FILE}"
301 echo ' <Exec/>' >> "${MY_FILE}"
302 echo ' </Target>' >> "${MY_FILE}"
303 echo ' <Target Name="Execute" MenuCaption="E&amp;xecute" SaveOption="SaveNone" RunFromDir="%rw">' >> "${MY_FILE}"
304 echo ' <Exec/>' >> "${MY_FILE}"
305 echo ' </Target>' >> "${MY_FILE}"
306 echo ' </Menu>' >> "${MY_FILE}"
307
308 #
309 # Include directories.
310 #
311 echo ' <Includes>' >> "${MY_FILE}"
312 while test $# -ge 1 -a "${1}" != "--end-includes";
313 do
314 for f in $1;
315 do
316 my_abs_dir ${f}
317 echo ' <Include Dir="'"${MY_ABS_DIR}/"'"/>' >> "${MY_FILE}"
318 done
319 shift
320 done
321 shift
322 echo ' </Includes>' >> "${MY_FILE}"
323 echo ' </Config>' >> "${MY_FILE}"
324
325
326 #
327 # Process directories+files and create folders.
328 #
329 echo ' <Files>' >> "${MY_FILE}"
330 my_generate_folder "${MY_FILE}" $*
331 echo ' </Files>' >> "${MY_FILE}"
332
333 #
334 # The tail.
335 #
336 echo '</Project>' >> "${MY_FILE}"
337
338 return 0
339}
340
341
342##
343# Generate the workspace
344#
345my_generate_workspace()
346{
347 MY_FILE="${MY_WS_NAME}"
348 echo "Generating ${MY_FILE}..."
349 echo '<!DOCTYPE Workspace SYSTEM "http://www.slickedit.com/dtd/vse/10.0/vpw.dtd">' > "${MY_FILE}"
350 echo '<Workspace Version="10.0" VendorName="SlickEdit">' >> "${MY_FILE}"
351 echo ' <Projects>' >> "${MY_FILE}"
352 for i in ${MY_PROJECT_FILES};
353 do
354 echo ' <Project File="'"${i}"'" />' >> "${MY_FILE}"
355 done
356 echo ' </Projects>' >> "${MY_FILE}"
357 echo '</Workspace>' >> "${MY_FILE}"
358 return 0;
359}
360
361
362##
363# Generate stuff
364#
365my_generate_usercpp_h()
366{
367 #
368 # Probe the slickedit user config, picking the most recent version.
369 #
370 if test -d "${HOME}/Library/Application Support/Slickedit"; then
371 MY_SLICKDIR_="${HOME}/Library/Application Support/Slickedit"
372 MY_USERCPP_H="unxcpp.h"
373 elif test -d "${HOMEDRIVE}${HOMEPATH}/Documents/My SlickEdit Config"; then
374 MY_SLICKDIR_="${HOMEDRIVE}${HOMEPATH}/Documents/My SlickEdit Config"
375 MY_USERCPP_H="usercpp.h"
376 else
377 MY_SLICKDIR_="${HOME}/.slickedit"
378 MY_USERCPP_H="unxcpp.h"
379 fi
380
381 MY_VER_NUM="0"
382 MY_VER="0.0.0"
383 for subdir in "${MY_SLICKDIR_}/"*;
384 do
385 if test -f "${subdir}/${MY_USERCPP_H}" -o -f "${subdir}/vslick.stu"; then
386 MY_CUR_VER_NUM=0
387 MY_CUR_VER=`echo "${subdir}" | ${MY_SED} -e 's,^.*/,,g'`
388
389 # Convert the dotted version number to an integer, checking that
390 # it is all numbers in the process.
391 set `echo "${MY_CUR_VER}" | ${MY_SED} 's/\./ /g' `
392 i=100000000
393 while test $# -gt 0;
394 do
395 if ! ${MY_EXPR} "$1" + 1 > /dev/null 2> /dev/null; then
396 MY_CUR_VER_NUM=0;
397 break
398 fi
399 if test "$i" -gt 0; then
400 MY_CUR_VER_NUM=$((${MY_CUR_VER_NUM} + $1 * $i))
401 i=$(($i / 100))
402 fi
403 shift
404 done
405
406 # More recent that what we have?
407 if test "${MY_CUR_VER_NUM}" -gt "${MY_VER_NUM}"; then
408 MY_VER_NUM="${MY_CUR_VER_NUM}"
409 MY_VER="${MY_CUR_VER}"
410 fi
411 fi
412 done
413
414 MY_SLICKDIR="${MY_SLICKDIR_}/${MY_VER}"
415 MY_USERCPP_H_FULL="${MY_SLICKDIR}/${MY_USERCPP_H}"
416 if test -d "${MY_SLICKDIR}"; then
417 echo "Found SlickEdit v${MY_VER} preprocessor file: ${MY_USERCPP_H_FULL}"
418 else
419 echo "Failed to locate SlickEdit preprocessor file. You need to manually merge ${MY_USERCPP_H}."
420 MY_USERCPP_H_FULL=""
421 fi
422
423 # Generate our
424 MY_FILE="${MY_USERCPP_H}"
425 ${MY_CAT} > ${MY_FILE} <<EOF
426#define IN_SLICKEDIT
427#define RT_C_DECLS_BEGIN
428#define RT_C_DECLS_END
429#define RT_NO_THROW
430#define RT_THROW(type) throw(type)
431#define RT_GCC_EXTENSION'
432#define RT_COMPILER_GROKS_64BIT_BITFIELDS'
433#define RT_COMPILER_WITH_80BIT_LONG_DOUBLE'
434
435#define ATL_NO_VTABLE
436#define BEGIN_COM_MAP(a)
437#define COM_INTERFACE_ENTRY(a)
438#define COM_INTERFACE_ENTRY2(a,b)
439#define COM_INTERFACE_ENTRY3(a,b,c)
440#define COM_INTERFACE_ENTRY4(a,b,c,d)
441#define END_COM_MAP(a)
442
443#define COM_DECL_READONLY_ENUM_AND_COLLECTION(a)
444#define COMGETTER(n) n
445#define COMSETTER(n) n
446#define ComSafeArrayIn(t,a) t a[]
447#define ComSafeArrayOut(t,a) t * a[]
448#define DECLARE_CLASSFACTORY(a)
449#define DECLARE_CLASSFACTORY_SINGLETON(a)
450#define DECLARE_REGISTRY_RESOURCEID(a)
451#define DECLARE_NOT_AGGREGATABLE(a)
452#define DECLARE_PROTECT_FINAL_CONSTRUCT(a)
453#define DECLARE_EMPTY_CTOR_DTOR(a) a(); ~a();
454#define DEFINE_EMPTY_CTOR_DTOR(a) a::a() {} a::~a() {}
455#define NS_DECL_ISUPPORTS
456#define NS_IMETHOD virtual nsresult
457#define NS_IMETHOD_(type) virtual type
458#define NS_IMETHODIMP nsresult
459#define NS_IMETHODIMP_(type) type
460#define PARSERS_EXPORT
461EOF
462 if test -n "${MY_WINDOWS_HOST}"; then
463 ${MY_CAT} >> ${MY_FILE} <<EOF
464#define COM_STRUCT_OR_CLASS(I) struct I
465#define STDMETHOD(m) virtual HRESULT m
466#define STDMETHOD_(type,m) virtual type m
467#define STDMETHODIMP HRESULT
468#define STDMETHODIMP_(type) type
469EOF
470 else
471 ${MY_CAT} >> ${MY_FILE} <<EOF
472#define COM_STRUCT_OR_CLASS(I) class I
473#define STDMETHOD(m) virtual nsresult m
474#define STDMETHOD_(type,m) virtual type m
475#define STDMETHODIMP nsresult
476#define STDMETHODIMP_(type) type
477EOF
478 fi
479 ${MY_CAT} >> ${MY_FILE} <<EOF
480#define VBOX_SCRIPTABLE(a) public a
481#define VBOX_SCRIPTABLE_IMPL(a)
482#define VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(a)
483
484#define CTX_SUFF(var) var##R3
485#define CTXAllSUFF(var) var##R3
486#define CTXSUFF(var) var##HC
487#define OTHERCTXSUFF(var) var##GC
488#define CTXALLMID(first, last) first##R3##last
489#define CTXMID(first, last) first##HC##last
490#define OTHERCTXMID(first, last) first##GC##last
491#define CTXTYPE(GCType, R3Type, R0Type) R3Type
492#define RCTYPE(RCType, HCType) RCType
493#define GCTYPE(GCType, HCType) GCType
494#define RCPTRTYPE(RCType) RCType
495#define GCPTRTYPE(GCType) GCType
496#define HCPTRTYPE(HCType) HCType
497#define R3R0PTRTYPE(HCType) HCType
498#define R0PTRTYPE(R3Type) R3Type
499#define R3PTRTYPE(R0Type) R0Type
500#define RT_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__
501#define RT_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction
502#define RT_SRC_POS_ARGS pszFile, iLine, pszFunction
503#define RTCALL
504#define DECLINLINE(type) inline type
505#define DECL_FORCE_INLINE(type) inline type
506#define DECL_INVALID(type) type
507
508#define PDMDEVINSINT_DECLARED 1
509#define VBOX_WITH_HGCM 1
510#define VBOXCALL
511
512#define PGM_CTX(a,b) b
513#define PGM_CTX3(a,b,c) c
514#define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name)
515#define PGM_GST_NAME_REAL(name) PGM_CTX3(name)
516#define PGM_GST_NAME_PROT(name) PGM_CTX3(pgm,GstProt,name)
517#define PGM_GST_NAME_32BIT(name) PGM_CTX3(pgm,Gst32Bit,name)
518#define PGM_GST_NAME_PAE(name) PGM_CTX3(pgm,GstPAE,name)
519#define PGM_GST_NAME_AMD64(name) PGM_CTX3(pgm,GstAMD64,name)
520#define PGM_GST_DECL(type, name) type PGM_GST_NAME(name)
521#define PGM_SHW_NAME(name) PGM_GST_NAME_AMD64(name)
522#define PGM_SHW_NAME_32BIT(name) PGM_CTX3(pgm,Shw32Bit,name)
523#define PGM_SHW_NAME_PAE(name) PGM_CTX3(pgm,ShwPAE,name)
524#define PGM_SHW_NAME_AMD64(name) PGM_CTX3(pgm,ShwAMD64,name)
525#define PGM_SHW_NAME_NESTED(name) PGM_CTX3(pgm,ShwNested,name)
526#define PGM_SHW_NAME_EPT(name) PGM_CTX3(pgm,ShwEPT,name)
527#define PGM_SHW_DECL(type, name) type PGM_SHW_NAME(name)
528#define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_AMD64(name)
529#define PGM_BTH_NAME_32BIT_REAL(name) PGM_CTX3(pgm,Bth,name)
530#define PGM_BTH_NAME_32BIT_PROT(name) PGM_CTX3(pgm,Bth,name)
531#define PGM_BTH_NAME_32BIT_32BIT(name) PGM_CTX3(pgm,Bth,name)
532#define PGM_BTH_NAME_PAE_REAL(name) PGM_CTX3(pgm,Bth,name)
533#define PGM_BTH_NAME_PAE_PROT(name) PGM_CTX3(pgm,Bth,name)
534#define PGM_BTH_NAME_PAE_32BIT(name) PGM_CTX3(pgm,Bth,name)
535#define PGM_BTH_NAME_PAE_PAE(name) PGM_CTX3(pgm,Bth,name)
536#define PGM_BTH_NAME_AMD64_PROT(name) PGM_CTX3(pgm,Bth,name)
537#define PGM_BTH_NAME_AMD64_AMD64(name) PGM_CTX3(pgm,Bth,name)
538#define PGM_BTH_NAME_NESTED_REAL(name) PGM_CTX3(pgm,Bth,name)
539#define PGM_BTH_NAME_NESTED_PROT(name) PGM_CTX3(pgm,Bth,name)
540#define PGM_BTH_NAME_NESTED_32BIT(name) PGM_CTX3(pgm,Bth,name)
541#define PGM_BTH_NAME_NESTED_PAE(name) PGM_CTX3(pgm,Bth,name)
542#define PGM_BTH_NAME_NESTED_AMD64(name) PGM_CTX3(pgm,Bth,name)
543#define PGM_BTH_NAME_EPT_REAL(name) PGM_CTX3(pgm,Bth,name)
544#define PGM_BTH_NAME_EPT_PROT(name) PGM_CTX3(pgm,Bth,name)
545#define PGM_BTH_NAME_EPT_32BIT(name) PGM_CTX3(pgm,Bth,name)
546#define PGM_BTH_NAME_EPT_PAE(name) PGM_CTX3(pgm,Bth,name)
547#define PGM_BTH_NAME_EPT_AMD64(name) PGM_CTX3(pgm,Bth,name)
548#define PGM_BTH_DECL(type, name) type PGM_BTH_NAME(name)
549
550#define FNIEMOP_STUB(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu) { return VERR_NOT_IMPLEMENTED; }
551#define FNIEMOP_DEF(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu)
552#define FNIEMOP_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, a_Type0 a_Name0)
553#define FNIEMOP_DEF_2(a_Name, a_Type0, a_Name0, a_Type1, a_Name1) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, a_Type0 a_Name0, a_Type1 a_Name1)
554#define IEM_CIMPL_DEF_0(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu)
555#define IEM_CIMPL_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0)
556#define IEM_CIMPL_DEF_2(a_Name, a_Type0, a_Name0, a_Type1, a_Name1) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0, a_Type1 a_Name1)
557#define IEM_CIMPL_DEF_3(a_Name, a_Type0, a_Name0, a_Type1, a_Name1, a_Type2, a_Name2) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0, a_Type1 a_Name1, , a_Type2 a_Name2)
558#define IEM_MC_LOCAL(a_Type, a_Name) a_Type a_Name
559#define IEM_MC_ARG(a_Type, a_Name, a_iArg) a_Type a_Name
560#define IEM_MC_ARG_CONST(a_Type, a_Name, a_Value, a_iArg) a_Type const a_Name = a_Value
561EOF
562
563 MY_HDR_FILES=` echo ${MY_ROOT_DIR}/include/VBox/*.h ${MY_ROOT_DIR}/include/VBox/vmm/*.h \
564 | ${MY_SED} -e 's,${MY_ROOT_DIR}/include/VBox/err.h,,' `
565 MY_HDR_FILES="${MY_HDR_FILES} ${MY_ROOT_DIR}/include/iprt/cdefs.h"
566 ${MY_SED} \
567 -e '/__cdecl/d' \
568 -e '/^ *# *define.*DECL/!d' \
569 -e '/DECLS/d' \
570 -e '/DECLARE_CLS_/d' \
571 -e '/_SRC_POS_DECL/d' \
572 -e '/declspec/d' \
573 -e '/__attribute__/d' \
574 -e 's/# */#/g' \
575 -e 's/ */ /g' \
576 -e '/ DECLEXPORT_CLASS/d' \
577 -e 's/ *VBOXCALL//' \
578 -e 's/ *RTCALL//' \
579 -e '/ DECLASM(type) type/d' \
580 -e '/define *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \
581 -e '/define *DECLINLINE(type)/d' \
582 -e '/define *DECL_FORCE_INLINE(type)/d' \
583 -e '/ *DECL_INVALID(/d' \
584 \
585 -e 's/(type) DECLHIDDEN(type)/(type) type/' \
586 -e 's/(type) DECLEXPORT(type)/(type) type/' \
587 -e 's/(type) DECLIMPORT(type)/(type) type/' \
588 -e 's/(a_Type) DECLHIDDEN(a_Type)/(a_Type) a_Type/' \
589 -e 's/(a_Type) DECLEXPORT(a_Type)/(a_Type) a_Type/' \
590 -e 's/(a_Type) DECLIMPORT(a_Type)/(a_Type) a_Type/' \
591 \
592 --append "${MY_FILE}" \
593 ${MY_HDR_FILES}
594
595 ${MY_CAT} "${MY_FILE}" \
596 | ${MY_SED} -e 's/_/\x1F/g' -e 's/(/\x1E/g' -e 's/[[:space:]][[:space:]]*/\x1C/g' \
597 | ${MY_SED} -e 's/\x1F/_/g' -e 's/\x1E/(/g' -e 's/\x1C/ /g' \
598 | ${MY_SORT} \
599 | ${MY_SED} -e '/#define/s/$/ \/\/ vbox/' --output "${MY_FILE}.2"
600
601 # Eliminate duplicates.
602 > "${MY_FILE}.3"
603 exec < "${MY_FILE}.2"
604 MY_PREV_DEFINE=""
605 while read MY_LINE;
606 do
607 MY_DEFINE=`echo "${MY_LINE}" | ${MY_SED} -e 's/^#define \([^ ()]*\).*$/\1/' `
608 if test "${MY_DEFINE}" != "${MY_PREV_DEFINE}"; then
609 MY_PREV_DEFINE=${MY_DEFINE}
610 echo "${MY_LINE}" >> "${MY_FILE}.3"
611 fi
612 done
613
614 # Append non-vbox bits from the current user config.
615 if test -n "${MY_USERCPP_H_FULL}" -a -f "${MY_USERCPP_H_FULL}"; then
616 ${MY_SED} -e '/ \/\/ vbox$/d' -e '/^[[:space:]]*$/d' --append "${MY_FILE}.3" "${MY_USERCPP_H_FULL}"
617 fi
618
619 # Finalize the file (sort + blank lines).
620 ${MY_CAT} "${MY_FILE}.3" \
621 | ${MY_SED} -e 's/$/\n/' --output "${MY_FILE}"
622 ${MY_RM} -f "${MY_FILE}.2" "${MY_FILE}.3"
623
624 # Install it.
625 if test -n "${MY_USERCPP_H_FULL}" -a -d "${MY_SLICKDIR}"; then
626 if test -f "${MY_USERCPP_H_FULL}"; then
627 ${MY_MV} -vf "${MY_USERCPP_H_FULL}" "${MY_USERCPP_H_FULL}.bak"
628 ${MY_CP} "${MY_FILE}" "${MY_USERCPP_H_FULL}"
629 echo "Updated the SlickEdit preprocessor file. (Previous version renamed to .bak.)"
630 else
631 ${MY_CP} "${MY_FILE}" "${MY_USERCPP_H_FULL}"
632 echo "Created the SlickEdit preprocessor file."
633 fi
634 fi
635}
636
637###### end of functions ####
638
639
640#
641# Parse arguments.
642#
643while test $# -ge 1;
644do
645 ARG=$1
646 shift
647 case "$ARG" in
648
649 --rootdir)
650 if test $# -eq 0; then
651 echo "error: missing --rootdir argument." 1>&2
652 exit 1;
653 fi
654 MY_ROOT_DIR="$1"
655 shift
656 ;;
657
658 --outdir)
659 if test $# -eq 0; then
660 echo "error: missing --outdir argument." 1>&2
661 exit 1;
662 fi
663 MY_OUT_DIR="$1"
664 shift
665 ;;
666
667 --project-base)
668 if test $# -eq 0; then
669 echo "error: missing --project-base argument." 1>&2
670 exit 1;
671 fi
672 MY_PRJ_PRF="$1"
673 shift
674 ;;
675
676 --workspace)
677 if test $# -eq 0; then
678 echo "error: missing --workspace argument." 1>&2
679 exit 1;
680 fi
681 MY_WS_NAME="$1"
682 shift
683 ;;
684
685 --windows-host)
686 MY_WINDOWS_HOST=1
687 ;;
688
689 --minimal)
690 MY_OPT_MINIMAL=1
691 ;;
692
693 # usage
694 --h*|-h*|-?|--?)
695 echo "usage: $0 [--rootdir <rootdir>] [--outdir <outdir>] [--project-base <prefix>] [--workspace <name>] [--minimal]"
696 echo ""
697 echo "If --outdir is specified, you must specify a --rootdir relative to it as well."
698 exit 1;
699 ;;
700
701 # default
702 *)
703 echo "error: Invalid parameter '$ARG'" 1>&2
704 exit 1;
705
706 esac
707done
708
709
710#
711# From now on everything *MUST* succeed.
712#
713set -e
714
715
716#
717# Make sure the output directory exists, is valid and clean.
718#
719${MY_RM} -f \
720 "${MY_OUT_DIR}/${MY_PRJ_PRF}"*.vpj \
721 "${MY_OUT_DIR}/${MY_WS_NAME}" \
722 "${MY_OUT_DIR}/`echo ${MY_WS_NAME} | ${MY_SED} -e 's/\.vpw$/.vtg/'`"
723${MY_MKDIR} -p "${MY_OUT_DIR}"
724cd "${MY_OUT_DIR}"
725
726
727#
728# Determine the invocation to conjure up kmk.
729#
730my_abs_dir "tools"
731if test -n "${MY_WINDOWS_HOST}"; then
732 MY_KMK_INVOCATION="${MY_ABS_DIR}/win.x86/bin/rexx.exe ${MY_ABS_DIR}/envSub.cmd kmk.exe"
733else
734 MY_KMK_INVOCATION="${MY_ABS_DIR}/env.sh --quiet --no-wine kmk"
735fi
736
737
738#
739# Generate the projects and workspace.
740#
741# Note! The configs aren't optimal yet, lots of adjustment wrt headers left to be done.
742#
743
744# src/VBox/Runtime
745my_generate_project "IPRT" "src/VBox/Runtime" --begin-incs "include" "src/VBox/Runtime/include" --end-includes "include/iprt" "src/VBox/Runtime"
746
747# src/VBox/VMM
748my_generate_project "VMM" "src/VBox/VMM" --begin-incs "include" "src/VBox/VMM" --end-includes "src/VBox/VMM" \
749 "include/VBox/vmm/cfgm.h" \
750 "include/VBox/vmm/cpum.*" \
751 "include/VBox/vmm/dbgf.h" \
752 "include/VBox/vmm/em.h" \
753 "include/VBox/vmm/gmm.*" \
754 "include/VBox/vmm/gvm.*" \
755 "include/VBox/vmm/hw*.*" \
756 "include/VBox/vmm/iom.h" \
757 "include/VBox/vmm/mm.h" \
758 "include/VBox/vmm/patm.*" \
759 "include/VBox/vmm/pdm*.h" \
760 "include/VBox/vmm/pgm.*" \
761 "include/VBox/vmm/rem.h" \
762 "include/VBox/vmm/selm.*" \
763 "include/VBox/vmm/ssm.h" \
764 "include/VBox/vmm/stam.*" \
765 "include/VBox/vmm/tm.h" \
766 "include/VBox/vmm/trpm.*" \
767 "include/VBox/vmm/vm.*" \
768 "include/VBox/vmm/vmm.*"
769
770# src/recompiler
771my_generate_project "REM" "src/recompiler" --begin-incs \
772 "include" \
773 "src/recompiler" \
774 "src/recompiler/target-i386" \
775 "src/recompiler/tcg/i386" \
776 "src/recompiler/Sun/crt" \
777 --end-includes \
778 "src/recompiler" \
779 "src/VBox/VMM/REMInternal.h" \
780 "src/VBox/VMM/VMMAll/REMAll.cpp"
781
782# src/VBox/Additions
783my_generate_project "Add-freebsd" "src/VBox/Additions/freebsd" --begin-incs "include" "src/VBox/Additions/freebsd" --end-includes "src/VBox/Additions/freebsd"
784my_generate_project "Add-linux" "src/VBox/Additions/linux" --begin-incs "include" "src/VBox/Additions/linux" --end-includes "src/VBox/Additions/linux"
785my_generate_project "Add-os2" "src/VBox/Additions/os2" --begin-incs "include" "src/VBox/Additions/os2" --end-includes "src/VBox/Additions/os2"
786my_generate_project "Add-solaris" "src/VBox/Additions/solaris" --begin-incs "include" "src/VBox/Additions/solaris" --end-includes "src/VBox/Additions/solaris"
787my_generate_project "Add-win" "src/VBox/Additions/WINNT" --begin-incs "include" "src/VBox/Additions/WINNT" --end-includes "src/VBox/Additions/WINNT"
788test -z "$MY_OPT_MINIMAL" && \
789my_generate_project "Add-x11" "src/VBox/Additions/x11" --begin-incs "include" "src/VBox/Additions/x11" --end-includes "src/VBox/Additions/x11"
790my_generate_project "Add-Control" "src/VBox/Additions/common/VBoxControl" --begin-incs "include" "src/VBox/Additions/common/VBoxControl" --end-includes "src/VBox/Additions/common/VBoxControl"
791my_generate_project "Add-GuestDrv" "src/VBox/Additions/common/VBoxGuest" --begin-incs "include" "src/VBox/Additions/common/VBoxGuest" --end-includes "src/VBox/Additions/common/VBoxGuest" "include/VBox/VBoxGuest*.*"
792my_generate_project "Add-Lib" "src/VBox/Additions/common/VBoxGuestLib" --begin-incs "include" "src/VBox/Additions/common/VBoxGuestLib" --end-includes "src/VBox/Additions/common/VBoxGuestLib" "include/VBox/VBoxGuest*.*"
793my_generate_project "Add-Service" "src/VBox/Additions/common/VBoxService" --begin-incs "include" "src/VBox/Additions/common/VBoxService" --end-includes "src/VBox/Additions/common/VBoxService"
794test -z "$MY_OPT_MINIMAL" && \
795my_generate_project "Add-crOpenGL" "src/VBox/Additions/common/crOpenGL" --begin-incs "include" "src/VBox/Additions/common/crOpenGL" --end-includes "src/VBox/Additions/common/crOpenGL"
796
797# src/VBox/Debugger
798my_generate_project "Debugger" "src/VBox/Debugger" --begin-incs "include" "src/VBox/Debugger" --end-includes "src/VBox/Debugger" "include/VBox/dbggui.h" "include/VBox/dbg.h"
799
800# src/VBox/Devices
801my_generate_project "Devices" "src/VBox/Devices" --begin-incs "include" "src/VBox/Devices" --end-includes "src/VBox/Devices" "include/VBox/pci.h" "include/VBox/pdm*.h"
802## @todo split this up.
803
804# src/VBox/Disassembler
805my_generate_project "DIS" "src/VBox/Disassembler" --begin-incs "include" "src/VBox/Disassembler" --end-includes "src/VBox/Disassembler" "include/VBox/dis*.h"
806
807# src/VBox/Frontends
808my_generate_project "FE-VBoxManage" "src/VBox/Frontends/VBoxManage" --begin-incs "include" "src/VBox/Frontends/VBoxManage" --end-includes "src/VBox/Frontends/VBoxManage"
809my_generate_project "FE-VBoxHeadless" "src/VBox/Frontends/VBoxHeadless" --begin-incs "include" "src/VBox/Frontends/VBoxHeadless" --end-includes "src/VBox/Frontends/VBoxHeadless"
810my_generate_project "FE-VBoxSDL" "src/VBox/Frontends/VBoxSDL" --begin-incs "include" "src/VBox/Frontends/VBoxSDL" --end-includes "src/VBox/Frontends/VBoxSDL"
811my_generate_project "FE-VBoxShell" "src/VBox/Frontends/VBoxShell" --begin-incs "include" "src/VBox/Frontends/VBoxShell" --end-includes "src/VBox/Frontends/VBoxShell"
812# noise - my_generate_project "FE-VBoxBFE" "src/VBox/Frontends/VBoxBFE" --begin-incs "include" "src/VBox/Frontends/VBoxBFE" --end-includes "src/VBox/Frontends/VBoxBFE"
813FE_VBOX_WRAPPERS=""
814for d in ${MY_OUT_DIRS};
815do
816 if test -d "${MY_ROOT_DIR}/${d}/obj/VirtualBox/include"; then
817 FE_VBOX_WRAPPERS="${d}/obj/VirtualBox/include"
818 break
819 fi
820done
821if test -n "${FE_VBOX_WRAPPERS}"; then
822 my_generate_project "FE-VirtualBox" "src/VBox/Frontends/VirtualBox" --begin-incs "include" "${FE_VBOX_WRAPPERS}" --end-includes "src/VBox/Frontends/VirtualBox" "${FE_VBOX_WRAPPERS}/COMWrappers.cpp" "${FE_VBOX_WRAPPERS}/COMWrappers.h"
823else
824 my_generate_project "FE-VirtualBox" "src/VBox/Frontends/VirtualBox" --begin-incs "include" --end-includes "src/VBox/Frontends/VirtualBox"
825fi
826
827# src/VBox/GuestHost
828my_generate_project "HGSMI-GH" "src/VBox/GuestHost/HGSMI" --begin-incs "include" --end-includes "src/VBox/GuestHost/HGSMI"
829test -z "$MY_OPT_MINIMAL" && \
830my_generate_project "OpenGL-GH" "src/VBox/GuestHost/OpenGL" --begin-incs "include" "src/VBox/GuestHost/OpenGL" --end-includes "src/VBox/GuestHost/OpenGL"
831my_generate_project "ShClip-GH" "src/VBox/GuestHost/SharedClipboard" --begin-incs "include" --end-includes "src/VBox/GuestHost/SharedClipboard"
832
833# src/VBox/HostDrivers
834my_generate_project "SUP" "src/VBox/HostDrivers/Support" --begin-incs "include" "src/VBox/HostDrivers/Support" --end-includes "src/VBox/HostDrivers/Support" "include/VBox/sup.h" "include/VBox/sup.mac"
835my_generate_project "VBoxNetAdp" "src/VBox/HostDrivers/VBoxNetAdp" --begin-incs "include" "src/VBox/HostDrivers/VBoxNetAdp" --end-includes "src/VBox/HostDrivers/VBoxNetAdp" "include/VBox/intnet.h"
836my_generate_project "VBoxNetFlt" "src/VBox/HostDrivers/VBoxNetFlt" --begin-incs "include" "src/VBox/HostDrivers/VBoxNetFlt" --end-includes "src/VBox/HostDrivers/VBoxNetFlt" "include/VBox/intnet.h"
837my_generate_project "VBoxUSB" "src/VBox/HostDrivers/VBoxUSB" --begin-incs "include" "src/VBox/HostDrivers/VBoxUSB" --end-includes "src/VBox/HostDrivers/VBoxUSB" "include/VBox/usblib*.h" "include/VBox/usbfilter.h"
838
839# src/VBox/HostServices
840my_generate_project "GuestProps" "src/VBox/HostServices/GuestProperties" --begin-incs "include" "src/VBox/HostServices/GuestProperties" --end-includes "src/VBox/HostServices/GuestProperties"
841my_generate_project "ShClip-HS" "src/VBox/HostServices/SharedClipboard" --begin-incs "include" "src/VBox/HostServices/SharedClipboard" --end-includes "src/VBox/HostServices/SharedClipboard"
842my_generate_project "SharedFolders" "src/VBox/HostServices/SharedFolders" --begin-incs "include" "src/VBox/HostServices/SharedFolders" --end-includes "src/VBox/HostServices/SharedFolders" "include/VBox/shflsvc.h"
843my_generate_project "OpenGL-HS" "src/VBox/HostServices/SharedOpenGL" --begin-incs "include" "src/VBox/HostServices/SharedOpenGL" --end-includes "src/VBox/HostServices/SharedOpenGL"
844
845# src/VBox/ImageMounter
846my_generate_project "ImageMounter" "src/VBox/ImageMounter" --begin-incs "include" "src/VBox/ImageMounter" --end-includes "src/VBox/ImageMounter"
847
848# src/VBox/Installer
849my_generate_project "Installers" "src/VBox/Installer" --begin-incs "include" --end-includes "src/VBox/Installer"
850
851# src/VBox/Main
852my_generate_project "Main" "src/VBox/Main" --begin-incs "include" "src/VBox/Main/include" --end-includes "src/VBox/Main" "include/VBox/com" "include/VBox/settings.h"
853## @todo seperate webservices and Main. pick the right headers. added generated headers.
854
855# src/VBox/Network
856my_generate_project "Net-DHCP" "src/VBox/NetworkServices/DHCP" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/DHCP"
857my_generate_project "Net-NAT" "src/VBox/NetworkServices/NAT" --begin-incs "include" "src/VBox/NetworkServices/NAT" --end-includes "src/VBox/NetworkServices/NAT" "src/VBox/Devices/Network/slirp"
858my_generate_project "Net-NetLib" "src/VBox/NetworkServices/NetLib" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/NetLib"
859
860# src/VBox/RDP
861my_generate_project "RDP-Client" "src/VBox/RDP/client" --begin-incs "include" "src/VBox/RDP/client" --end-includes "src/VBox/RDP/client"
862my_generate_project "RDP-Server" "src/VBox/RDP/server" --begin-incs "include" "src/VBox/RDP/server" --end-includes "src/VBox/RDP/server"
863my_generate_project "RDP-WebClient" "src/VBox/RDP/webclient" --begin-incs "include" "src/VBox/RDP/webclient" --end-includes "src/VBox/RDP/webclient"
864my_generate_project "RDP-Misc" "src/VBox/RDP" --begin-incs "include" --end-includes "src/VBox/RDP/auth" "src/VBox/RDP/tscpasswd" "src/VBox/RDP/x11server"
865
866# src/VBox/Testsuite
867my_generate_project "Testsuite" "src/VBox/Testsuite" --begin-incs "include" --end-includes "src/VBox/Testsuite"
868
869# src/apps/adpctl - misplaced.
870my_generate_project "adpctl" "src/apps/adpctl" --begin-incs "include" --end-includes "src/apps/adpctl"
871
872# src/bldprogs
873my_generate_project "bldprogs" "src/bldprogs" --begin-incs "include" --end-includes "src/bldprogs"
874
875# A few things from src/lib
876my_generate_project "zlib" "src/libs/zlib-1.2.1" --begin-incs "include" --end-includes "src/libs/zlib-1.2.1/*.c" "src/libs/zlib-1.2.1/*.h"
877my_generate_project "liblzf" "src/libs/liblzf-3.4" --begin-incs "include" --end-includes "src/libs/liblzf-3.4"
878my_generate_project "libpng" "src/libs/libpng-1.2.8" --begin-incs "include" --end-includes "src/libs/libpng-1.2.8/*.c" "src/libs/libpng-1.2.8/*.h"
879my_generate_project "openssl" "src/libs/openssl-0.9.8p" --begin-incs "include" "src/libs/openssl-0.9.8p/crypto" --end-includes "src/libs/openssl-0.9.8p"
880my_generate_project "kStuff" "src/libs/kStuff" --begin-incs "include" "src/libs/kStuff/kStuff/include" --end-includes "src/libs/kStuff"
881
882
883# include/VBox
884my_generate_project "VBoxHeaders" "include" --begin-incs "include" --end-includes "include/VBox"
885
886# Misc
887my_generate_project "misc" "src/testcase" --begin-incs "include" --end-includes \
888 "src/testcase" \
889 "configure" \
890 "configure.vbs" \
891 "Config.kmk" \
892 "Makefile.kmk" \
893 "src/Makefile.kmk" \
894 "src/VBox/Makefile.kmk"
895
896
897# out/x.y/z/bin/sdk/bindings/xpcom
898XPCOM_INCS="src/libs/xpcom18a4"
899for d in \
900 "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/dist/sdk/bindings/xpcom" \
901 "out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/${BUILD_TYPE}/dist/sdk/bindings/xpcom" \
902 "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/bin/sdk/bindings/xpcom" \
903 "out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/${BUILD_TYPE}/bin/sdk/bindings/xpcom" \
904 "out/linux.amd64/debug/bin/sdk/bindings/xpcom" \
905 "out/linux.x86/debug/bin/sdk/bindings/xpcom" \
906 "out/darwin.amd64/debug/dist/sdk/bindings/xpcom" \
907 "out/darwin.x86/debug/bin/dist/bindings/xpcom" \
908 "out/solaris.amd64/debug/bin/sdk/bindings/xpcom" \
909 "out/solaris.x86/debug/bin/sdk/bindings/xpcom";
910do
911 if test -d "${MY_ROOT_DIR}/${d}"; then
912 my_generate_project "SDK-xpcom" "${d}" --begin-incs "include" "${d}/include" --end-includes "${d}"
913 XPCOM_INCS="${d}/include"
914 break
915 fi
916done
917
918# lib/xpcom
919my_generate_project "xpcom" "src/libs/xpcom18a4" --begin-incs "include" "${XPCOM_INCS}" --end-includes "src/libs/xpcom18a4"
920
921my_generate_workspace
922
923
924#
925# Update the history file if present.
926#
927MY_FILE="${MY_WS_NAME}histu"
928if test -f "${MY_FILE}"; then
929 echo "Updating ${MY_FILE}..."
930 ${MY_MV} -f "${MY_FILE}" "${MY_FILE}.old"
931 ${MY_SED} -n \
932 -e '/PROJECT_CACHE/d' \
933 -e '/\[TreeExpansion2\]/d' \
934 -e '/^\[/p' \
935 -e '/: /p' \
936 -e '/^CurrentProject/p' \
937 "${MY_FILE}.old" > "${MY_FILE}"
938fi
939
940
941#
942# Generate and update the usercpp.h/unxcpp.h file.
943#
944my_generate_usercpp_h
945
946
947echo "done"
948
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette