VirtualBox

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

Last change on this file since 43476 was 43401, checked in by vboxsync, 13 years ago

gen-slickedit-workspace: haiku update.

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

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