VirtualBox

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

Last change on this file since 90687 was 88326, checked in by vboxsync, 4 years ago

gen-slickedit-workspace.sh: Fix for multiple openssl dirs.

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 57.8 KB
Line 
1# !kmk_ash
2# $Id: gen-slickedit-workspace.sh 88326 2021-03-31 00:11:50Z vboxsync $
3## @file
4# Script for generating a SlickEdit workspace.
5#
6
7#
8# Copyright (C) 2009-2020 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/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/debug \
42out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/release \
43out/linux.amd64/debug \
44out/linux.x86/debug \
45out/win.amd64/debug \
46out/win.x86/debug \
47out/darwin.amd64/debug \
48out/darwin.x86/debug \
49out/haiku.amd64/debug \
50out/haiku.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=""
65MY_OPT_USE_WILDCARDS="yes"
66
67
68##
69# Gets the absolute path to an existing directory.
70#
71# @param $1 The path.
72my_abs_dir()
73{
74 if test -n "${PWD}"; then
75 MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && echo ${PWD}`
76
77 else
78 # old cygwin shell has no PWD and need adjusting.
79 MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && pwd | ${MY_SED} -e 's,^/cygdrive/\(.\)/,\1:/,'`
80 fi
81 if test -z "${MY_ABS_DIR}"; then
82 MY_ABS_DIR="${1}"
83 fi
84}
85
86##
87# Gets the file name part of a path.
88#
89# @param $1 The path.
90my_get_name()
91{
92 SAVED_IFS=$IFS
93 IFS=":/ "
94 set $1
95 while test $# -gt 1 -a -n "${2}";
96 do
97 shift;
98 done
99
100 IFS=$SAVED_IFS
101 #echo "$1"
102 export MY_GET_NAME=$1
103}
104
105##
106# Gets the newest version of a library (like openssl).
107#
108# @param $1 The library base path relative to root.
109my_get_newest_ver()
110{
111 cd "${MY_ROOT_DIR}" > /dev/null
112 latest=
113 for ver in "$1"*;
114 do
115 if test -z "${latest}" || "${MY_EXPR}" "${ver}" ">" "${latest}" > /dev/null; then
116 latest="${ver}"
117 fi
118 done
119 if test -z "${latest}"; then
120 echo "error: could not find any version of: $1" >&2;
121 exit 1;
122 fi
123 echo "${latest}"
124 return 0;
125}
126
127
128##
129# Generate file entry for the specified file if it was found to be of interest.
130#
131# @param $1 The output file name base.
132# @param $2 The file name.
133# @param $3 Optional folder override.
134my_file()
135{
136 # sort and filter by file type.
137 case "$2" in
138 # drop these.
139 *.kup|*~|*.pyc|*.exe|*.sys|*.dll|*.o|*.obj|*.lib|*.a|*.ko)
140 return 0
141 ;;
142
143 # by prefix or directory component.
144 tst*|*/testcase/*)
145 MY_FOLDER="$1-Testcases.lst"
146 ;;
147
148 # by extension.
149 *.c|*.cpp|*.m|*.mm|*.pl|*.py|*.as|*.c.h|*.cpp.h|*.java)
150 MY_FOLDER="$1-Sources.lst"
151 ;;
152
153 *.h|*.hpp|*.mm)
154 MY_FOLDER="$1-Headers.lst"
155 ;;
156
157 *.asm|*.s|*.S|*.inc|*.mac)
158 MY_FOLDER="$1-Assembly.lst"
159 ;;
160
161 *)
162 MY_FOLDER="$1-Others.lst"
163 ;;
164 esac
165 if test -n "$3";
166 then
167 MY_FOLDER="$1-$3.lst"
168 fi
169
170 ## @todo only files which are in subversion.
171# if ${MY_SVN} info "${2}" > /dev/null 2>&1; then
172 my_get_name "${2}"
173 echo ' <!-- sortkey: '"${MY_GET_NAME}"' --> <F N="'"${2}"'"/>' >> "${MY_FOLDER}"
174# fi
175}
176
177##
178# Generate file entry for the specified file if it was found to be of interest.
179#
180# @param $1 The output file name base.
181# @param $2 The wildcard spec.
182# @param $3 Optional folder override.
183my_wildcard()
184{
185 if test -n "$3"; then
186 MY_FOLDER="$1-$3.lst"
187 else
188 MY_FOLDER="$1-All.lst"
189 fi
190 EXCLUDES="*.log;*.kup;*~;*.bak;*.bak?;*.pyc;*.exe;*.sys;*.dll;*.o;*.obj;*.lib;*.a;*.ko;*.class;*.cvsignore;*.done;*.project;*.actionScriptProperties;*.scm-settings;*.svnpatch.rej;*.svn-base;.svn/*;*.gitignore;*.gitattributes;*.gitmodules;*.swagger-codegen-ignore;*.png;*.bmp;*.jpg"
191 echo ' <F N="'"${2}"'/*" Recurse="1" Excludes="'"${EXCLUDES}"'"/>' >> "${MY_FOLDER}"
192}
193
194##
195# Generate file entries for the specified sub-directory tree.
196#
197# @param $1 The output filename.
198# @param $2 The sub-directory.
199# @param $3 Optional folder override.
200my_sub_tree()
201{
202 if test -n "$MY_DBG"; then echo "dbg: my_sub_tree: ${2}"; fi
203
204 # Skip .svn directories.
205 case "$2" in
206 */.svn|*/.svn)
207 return 0
208 ;;
209 esac
210
211 # Process the files in the directory.
212 for f in $2/*;
213 do
214 if test -d "${f}";
215 then
216 my_sub_tree "${1}" "${f}" "${3}"
217 else
218 my_file "${1}" "${f}" "${3}"
219 fi
220 done
221 return 0;
222}
223
224
225##
226# Generate folders for the specified directories and files.
227#
228# @param $1 The output (base) file name.
229# @param $2+ The files and directories to traverse.
230my_generate_folder()
231{
232 MY_FILE="$1"
233 shift
234
235 # Zap existing file collections.
236 > "${MY_FILE}-All.lst"
237 > "${MY_FILE}-Sources.lst"
238 > "${MY_FILE}-Headers.lst"
239 > "${MY_FILE}-Assembly.lst"
240 > "${MY_FILE}-Testcases.lst"
241 > "${MY_FILE}-Others.lst"
242
243 # Traverse the directories and files.
244 while test $# -ge 1 -a -n "${1}";
245 do
246 for f in ${MY_ROOT_DIR}/$1;
247 do
248 if test -d "${f}";
249 then
250 if test -z "${MY_OPT_USE_WILDCARDS}";
251 then
252 my_sub_tree "${MY_FILE}" "${f}"
253 else
254 case "${f}" in
255 ${MY_ROOT_DIR}/include*)
256 #my_sub_tree "${MY_FILE}" "${f}" "Headers"
257 my_wildcard "${MY_FILE}" "${f}" "Headers"
258 ;;
259 *) my_wildcard "${MY_FILE}" "${f}"
260 ;;
261 esac
262 fi
263 else
264 my_file "${MY_FILE}" "${f}"
265 fi
266 done
267 shift
268 done
269
270 # Generate the folders.
271 if test -s "${MY_FILE}-All.lst";
272 then
273 ${MY_SORT} "${MY_FILE}-All.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
274 fi
275 if test -s "${MY_FILE}-Sources.lst";
276 then
277 echo ' <Folder Name="Sources" Filters="*.c;*.cpp;*.cpp.h;*.c.h;*.m;*.mm;*.pl;*.py;*.as">' >> "${MY_FILE}"
278 ${MY_SORT} "${MY_FILE}-Sources.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
279 echo ' </Folder>' >> "${MY_FILE}"
280 fi
281 if test -s "${MY_FILE}-Headers.lst";
282 then
283 if test -z "${MY_OPT_USE_WILDCARDS}";
284 then
285 echo ' <Folder Name="Headers" Filters="*.h;*.hpp">' >> "${MY_FILE}"
286 else
287 echo ' <Folder Name="Headers" Filters="">' >> "${MY_FILE}"
288 fi
289 ${MY_SORT} "${MY_FILE}-Headers.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
290 echo ' </Folder>' >> "${MY_FILE}"
291 fi
292 if test -s "${MY_FILE}-Assembly.lst";
293 then
294 echo ' <Folder Name="Assembly" Filters="*.asm;*.s;*.S;*.inc;*.mac">' >> "${MY_FILE}"
295 ${MY_SORT} "${MY_FILE}-Assembly.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
296 echo ' </Folder>' >> "${MY_FILE}"
297 fi
298 if test -s "${MY_FILE}-Testcases.lst";
299 then
300 echo ' <Folder Name="Testcases" Filters="tst*;">' >> "${MY_FILE}"
301 ${MY_SORT} "${MY_FILE}-Testcases.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
302 echo ' </Folder>' >> "${MY_FILE}"
303 fi
304 if test -s "${MY_FILE}-Others.lst";
305 then
306 echo ' <Folder Name="Others" Filters="">' >> "${MY_FILE}"
307 ${MY_SORT} "${MY_FILE}-Others.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
308 echo ' </Folder>' >> "${MY_FILE}"
309 fi
310
311 # Cleanup
312 ${MY_RM} "${MY_FILE}-All.lst" "${MY_FILE}-Sources.lst" "${MY_FILE}-Headers.lst" "${MY_FILE}-Assembly.lst" \
313 "${MY_FILE}-Testcases.lst" "${MY_FILE}-Others.lst"
314}
315
316##
317# Function generating a project build config.
318#
319# @param $1 The project file name.
320# @param $2 Build config name.
321# @param $3 Extra kBuild command line options, variant 1.
322# @param $4 Extra kBuild command line options, variant 2.
323# @param $4+ Include directories.
324# @param $N --end-includes
325my_generate_project_config()
326{
327 MY_FILE="${1}";
328 MY_CFG_NAME="${2}";
329 MY_KMK_EXTRAS1="${3}";
330 MY_KMK_EXTRAS2="${4}";
331 MY_KMK_EXTRAS3="${5}";
332 MY_KMK_EXTRAS4="${6}";
333 shift; shift; shift; shift; shift; shift;
334
335 echo ' <Config Name="'"${MY_CFG_NAME}"'" OutputFile="" CompilerConfigName="Latest Version">' >> "${MY_FILE}"
336 echo ' <Menu>' >> "${MY_FILE}"
337
338 echo ' <Target Name="Compile" MenuCaption="&amp;Compile" CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}"
339 echo ' SaveOption="SaveCurrent" RunFromDir="%p" ClearProcessBuffer="1">' >> "${MY_FILE}"
340 echo -n ' <Exec CmdLine="'"${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS1}"' -C %p %n.o' >> "${MY_FILE}"
341 if test -n "${MY_KMK_EXTRAS2}"; then
342 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS2} -C %p %n.o" >> "${MY_FILE}"
343 fi
344 if test -n "${MY_KMK_EXTRAS3}"; then
345 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS3} -C %p %n.o" >> "${MY_FILE}"
346 fi
347 if test -n "${MY_KMK_EXTRAS4}"; then
348 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS4} -C %p %n.o" >> "${MY_FILE}"
349 fi
350 echo '"/>' >> "${MY_FILE}"
351 echo ' </Target>' >> "${MY_FILE}"
352
353 echo ' <Target Name="Build" MenuCaption="&amp;Build"CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}"
354 echo ' SaveOption="SaveWorkspaceFiles" RunFromDir="%rw" ClearProcessBuffer="1">' >> "${MY_FILE}"
355 echo -n ' <Exec CmdLine="'"${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS1}"' -C %rw' >> "${MY_FILE}"
356 if test -n "${MY_KMK_EXTRAS2}"; then
357 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS2} -C %rw" >> "${MY_FILE}"
358 fi
359 if test -n "${MY_KMK_EXTRAS3}"; then
360 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS3} -C %rw" >> "${MY_FILE}"
361 fi
362 if test -n "${MY_KMK_EXTRAS4}"; then
363 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS4} -C %rw" >> "${MY_FILE}"
364 fi
365 echo '"/>' >> "${MY_FILE}"
366 echo ' </Target>' >> "${MY_FILE}"
367
368 echo ' <Target Name="Rebuild" MenuCaption="&amp;Rebuild" CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}"
369 echo ' SaveOption="SaveWorkspaceFiles" RunFromDir="%rw" ClearProcessBuffer="1">' >> "${MY_FILE}"
370 echo -n ' <Exec CmdLine="'"${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS1}"' -C %rw' >> "${MY_FILE}"
371 if test -n "${MY_KMK_EXTRAS2}"; then
372 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS2} -C %rw rebuild" >> "${MY_FILE}"
373 fi
374 if test -n "${MY_KMK_EXTRAS3}"; then
375 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS3} -C %rw rebuild" >> "${MY_FILE}"
376 fi
377 if test -n "${MY_KMK_EXTRAS4}"; then
378 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS4} -C %rw rebuild" >> "${MY_FILE}"
379 fi
380 echo '"/>' >> "${MY_FILE}"
381 echo ' </Target>' >> "${MY_FILE}"
382
383 #echo ' <Target Name="Debug" MenuCaption="&amp;Debug" SaveOption="SaveNone" RunFromDir="%rw">' >> "${MY_FILE}"
384 #echo ' <Exec/>' >> "${MY_FILE}"
385 #echo ' </Target>' >> "${MY_FILE}"
386 #echo ' <Target Name="Execute" MenuCaption="E&amp;xecute" SaveOption="SaveNone" RunFromDir="%rw">'>> "${MY_FILE}"
387 #echo ' <Exec/>' >> "${MY_FILE}"
388 #echo ' </Target>' >> "${MY_FILE}"
389 echo ' </Menu>' >> "${MY_FILE}"
390
391 #
392 # Include directories.
393 #
394 echo ' <Includes>' >> "${MY_FILE}"
395 while test $# -ge 1 -a "${1}" != "--end-includes";
396 do
397 for f in $1;
398 do
399 my_abs_dir ${f}
400 echo ' <Include Dir="'"${MY_ABS_DIR}/"'"/>' >> "${MY_FILE}"
401 done
402 shift
403 done
404 shift
405 echo ' </Includes>' >> "${MY_FILE}"
406 echo ' </Config>' >> "${MY_FILE}"
407}
408
409
410##
411# Function generating a project.
412#
413# @param $1 The project file name.
414# @param $2 The project working directory.
415# @param $3 Dummy separator.
416# @param $4+ Include directories.
417# @param $N --end-includes
418# @param $N+1 Directory sub-trees and files to include in the project.
419#
420my_generate_project()
421{
422 MY_FILE="${MY_PRJ_PRF}${1}.vpj";
423 echo "Generating ${MY_FILE}..."
424 MY_WRK_DIR="${2}"
425 shift
426 shift
427 shift
428
429 # Add it to the project list for workspace construction later on.
430 MY_PROJECT_FILES="${MY_PROJECT_FILES} ${MY_FILE}"
431
432
433 #
434 # Generate the head bits.
435 #
436 echo '<!DOCTYPE Project SYSTEM "http://www.slickedit.com/dtd/vse/10.0/vpj.dtd">' > "${MY_FILE}"
437 echo '<Project' >> "${MY_FILE}"
438 echo ' Version="10.0"' >> "${MY_FILE}"
439 echo ' VendorName="SlickEdit"' >> "${MY_FILE}"
440 echo ' VCSProject="Subversion:"' >> "${MY_FILE}"
441# echo ' Customized="1"' >> "${MY_FILE}"
442# echo ' WorkingDir="."' >> "${MY_FILE}"
443 my_abs_dir "${MY_WRK_DIR}" >> "${MY_FILE}"
444 echo ' WorkingDir="'"${MY_ABS_DIR}"'"' >> "${MY_FILE}"
445 echo ' >' >> "${MY_FILE}"
446 my_generate_project_config "${MY_FILE}" "Default" "" "" "" "" $*
447 my_generate_project_config "${MY_FILE}" "Debug + hardening" "KBUILD_TYPE=debug VBOX_WITH_HARDENING=1" "" "" "" $*
448 my_generate_project_config "${MY_FILE}" "Release + hardening" "KBUILD_TYPE=release VBOX_WITH_HARDENING=1" "" "" "" $*
449 my_generate_project_config "${MY_FILE}" "Debug+Release + hardening" \
450 "KBUILD_TYPE=debug VBOX_WITH_HARDENING=1" \
451 "KBUILD_TYPE=release VBOX_WITH_HARDENING=1" \
452 "" "" $*
453 my_generate_project_config "${MY_FILE}" "Debug w/o hardening" "KBUILD_TYPE=debug VBOX_WITHOUT_HARDENING=1" "" "" $*
454 my_generate_project_config "${MY_FILE}" "Release w/o hardening" "KBUILD_TYPE=release VBOX_WITHOUT_HARDENING=1" "" "" $*
455 my_generate_project_config "${MY_FILE}" "Debug+Release w/o hardening" \
456 "KBUILD_TYPE=debug VBOX_WITHOUT_HARDENING=1" \
457 "KBUILD_TYPE=release VBOX_WITHOUT_HARDENING=1" \
458 "" "" $*
459 my_generate_project_config "${MY_FILE}" "Debug+Release with and without hardening" \
460 "KBUILD_TYPE=debug VBOX_WITH_HARDENING=1" \
461 "KBUILD_TYPE=release VBOX_WITH_HARDENING=1" \
462 "KBUILD_TYPE=debug VBOX_WITHOUT_HARDENING=1" \
463 "KBUILD_TYPE=release VBOX_WITHOUT_HARDENING=1" \
464 $*
465
466 while test $# -ge 1 -a "${1}" != "--end-includes";
467 do
468 shift;
469 done;
470 shift;
471
472 #
473 # Process directories+files and create folders.
474 #
475 echo ' <Files>' >> "${MY_FILE}"
476 my_generate_folder "${MY_FILE}" $*
477 echo ' </Files>' >> "${MY_FILE}"
478
479 #
480 # The tail.
481 #
482 echo '</Project>' >> "${MY_FILE}"
483
484 return 0
485}
486
487
488##
489# Generate the workspace
490#
491my_generate_workspace()
492{
493 MY_FILE="${MY_WS_NAME}"
494 echo "Generating ${MY_FILE}..."
495 echo '<!DOCTYPE Workspace SYSTEM "http://www.slickedit.com/dtd/vse/10.0/vpw.dtd">' > "${MY_FILE}"
496 echo '<Workspace Version="10.0" VendorName="SlickEdit">' >> "${MY_FILE}"
497 echo ' <Projects>' >> "${MY_FILE}"
498 for i in ${MY_PROJECT_FILES};
499 do
500 echo ' <Project File="'"${i}"'" />' >> "${MY_FILE}"
501 done
502 echo ' </Projects>' >> "${MY_FILE}"
503 echo '</Workspace>' >> "${MY_FILE}"
504 return 0;
505}
506
507
508##
509# Generate stuff
510#
511my_generate_usercpp_h()
512{
513 #
514 # Probe the slickedit user config, picking the most recent version.
515 #
516 MY_VSLICK_DB_OLD=
517 if test -z "${MY_SLICK_CONFIG}"; then
518 if test -d "${HOME}/Library/Application Support/SlickEdit"; then
519 MY_SLICKDIR_="${HOME}/Library/Application Support/SlickEdit"
520 MY_USERCPP_H="unxcpp.h"
521 MY_VSLICK_DB="vslick.sta" # was .stu earlier, 24 is using .sta.
522 MY_VSLICK_DB_OLD="vslick.stu"
523 elif test -d "${HOMEDRIVE}${HOMEPATH}/Documents/My SlickEdit Config"; then
524 MY_SLICKDIR_="${HOMEDRIVE}${HOMEPATH}/Documents/My SlickEdit Config"
525 MY_USERCPP_H="usercpp.h"
526 MY_VSLICK_DB="vslick.sta"
527 else
528 MY_SLICKDIR_="${HOME}/.slickedit"
529 MY_USERCPP_H="unxcpp.h"
530 MY_VSLICK_DB="vslick.sta"
531 MY_VSLICK_DB_OLD="vslick.stu"
532 fi
533 else
534 MY_SLICKDIR_="${MY_SLICK_CONFIG}"
535 if test -n "${MY_WINDOWS_HOST}"; then
536 MY_USERCPP_H="usercpp.h"
537 MY_VSLICK_DB="vslick.sta"
538 else
539 MY_USERCPP_H="unxcpp.h"
540 MY_VSLICK_DB="vslick.sta"
541 MY_VSLICK_DB_OLD="vslick.stu"
542 fi
543 # MacOS: Implement me!
544 fi
545
546 MY_VER_NUM="0"
547 MY_VER="0.0.0"
548 for subdir in "${MY_SLICKDIR_}/"*;
549 do
550 if test -f "${subdir}/${MY_USERCPP_H}" \
551 -o -f "${subdir}/${MY_VSLICK_DB}" \
552 -o '(' -n "${MY_VSLICK_DB_OLD}" -a -f "${subdir}/${MY_VSLICK_DB_OLD}" ')'; then
553 MY_CUR_VER_NUM=0
554 MY_CUR_VER=`echo "${subdir}" | ${MY_SED} -e 's,^.*/,,g'`
555
556 # Convert the dotted version number to an integer, checking that
557 # it is all numbers in the process.
558 set `echo "${MY_CUR_VER}" | ${MY_SED} 's/\./ /g' `
559 i=24010000 # == 70*70*70*70; max major version 89.
560 while test $# -gt 0;
561 do
562 if ! ${MY_EXPR} "$1" + 1 > /dev/null 2> /dev/null; then
563 MY_CUR_VER_NUM=0;
564 break
565 fi
566 if test "$i" -gt 0; then
567 MY_CUR_VER_NUM=$((${MY_CUR_VER_NUM} + $1 * $i))
568 i=$(($i / 70))
569 fi
570 shift
571 done
572
573 # More recent that what we have?
574 if test "${MY_CUR_VER_NUM}" -gt "${MY_VER_NUM}"; then
575 MY_VER_NUM="${MY_CUR_VER_NUM}"
576 MY_VER="${MY_CUR_VER}"
577 fi
578 fi
579 done
580
581 MY_SLICKDIR="${MY_SLICKDIR_}/${MY_VER}"
582 MY_USERCPP_H_FULL="${MY_SLICKDIR}/${MY_USERCPP_H}"
583 if test -d "${MY_SLICKDIR}"; then
584 echo "Found SlickEdit v${MY_VER} preprocessor file: ${MY_USERCPP_H_FULL}"
585 else
586 echo "Failed to locate SlickEdit preprocessor file. You need to manually merge ${MY_USERCPP_H}."
587 echo "dbg: MY_SLICKDIR=${MY_SLICKDIR} MY_USERCPP_H_FULL=${MY_USERCPP_H_FULL}"
588 MY_USERCPP_H_FULL=""
589 fi
590
591 # Generate our
592 MY_FILE="${MY_USERCPP_H}"
593 ${MY_CAT} > ${MY_FILE} <<EOF
594#define IN_SLICKEDIT
595#define RT_C_DECLS_BEGIN
596#define RT_C_DECLS_END
597#define RT_NOTHROW_PROTO
598#define RT_NOTHROW_DEF
599#define RT_NO_THROW_PROTO
600#define RT_NO_THROW_DEF
601#define RT_NOEXCEPT
602#define RT_OVERRIDE
603#define RT_THROW(type) throw(type)
604#define RT_GCC_EXTENSION
605#define RT_COMPILER_GROKS_64BIT_BITFIELDS
606#define RT_COMPILER_WITH_80BIT_LONG_DOUBLE
607#define RT_DECL_NTAPI(type) type
608
609#define ATL_NO_VTABLE
610#define BEGIN_COM_MAP(a)
611#define COM_INTERFACE_ENTRY(a)
612#define COM_INTERFACE_ENTRY2(a,b)
613#define COM_INTERFACE_ENTRY3(a,b,c)
614#define COM_INTERFACE_ENTRY4(a,b,c,d)
615#define END_COM_MAP(a)
616
617#define COM_DECL_READONLY_ENUM_AND_COLLECTION(a)
618#define COMGETTER(n) n
619#define COMSETTER(n) n
620#define ComSafeArrayIn(t,a) t a[]
621#define ComSafeArrayOut(t,a) t * a[]
622#define DECLARE_CLASSFACTORY(a)
623#define DECLARE_CLASSFACTORY_SINGLETON(a)
624#define DECLARE_REGISTRY_RESOURCEID(a)
625#define DECLARE_NOT_AGGREGATABLE(a)
626#define DECLARE_PROTECT_FINAL_CONSTRUCT(a)
627#define DECLARE_EMPTY_CTOR_DTOR(a) a(); ~a();
628#define DEFINE_EMPTY_CTOR_DTOR(a) a::a() {} a::~a() {}
629#define NS_DECL_ISUPPORTS
630#define NS_IMETHOD virtual nsresult
631#define NS_IMETHOD_(type) virtual type
632#define NS_IMETHODIMP nsresult
633#define NS_IMETHODIMP_(type) type
634#define PARSERS_EXPORT
635EOF
636 if test -n "${MY_WINDOWS_HOST}"; then
637 ${MY_CAT} >> ${MY_FILE} <<EOF
638#define COM_STRUCT_OR_CLASS(I) struct I
639#define STDMETHOD(m) virtual HRESULT m
640#define STDMETHOD_(type,m) virtual type m
641#define STDMETHODIMP HRESULT
642#define STDMETHODIMP_(type) type
643EOF
644 else
645 ${MY_CAT} >> ${MY_FILE} <<EOF
646#define COM_STRUCT_OR_CLASS(I) class I
647#define STDMETHOD(m) virtual nsresult m
648#define STDMETHOD_(type,m) virtual type m
649#define STDMETHODIMP nsresult
650#define STDMETHODIMP_(type) type
651EOF
652 fi
653 ${MY_CAT} >> ${MY_FILE} <<EOF
654#define VBOX_SCRIPTABLE(a) public a
655#define VBOX_SCRIPTABLE_IMPL(a)
656#define VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(a)
657
658#define CTX_SUFF(var) var##R3
659#define CTXAllSUFF(var) var##R3
660#define CTXSUFF(var) var##HC
661#define OTHERCTXSUFF(var) var##GC
662#define CTXALLMID(first, last) first##R3##last
663#define CTXMID(first, last) first##HC##last
664#define OTHERCTXMID(first, last) first##GC##last
665#define CTXTYPE(GCType, R3Type, R0Type) R3Type
666#define RCTYPE(RCType, HCType) RCType
667#define GCTYPE(GCType, HCType) GCType
668#define RCPTRTYPE(RCType) RCType
669#define GCPTRTYPE(GCType) GCType
670#define HCPTRTYPE(HCType) HCType
671#define R3R0PTRTYPE(HCType) HCType
672#define R0PTRTYPE(R3Type) R3Type
673#define R3PTRTYPE(R0Type) R0Type
674#define RT_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__
675#define RT_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction
676#define RT_SRC_POS_ARGS pszFile, iLine, pszFunction
677#define RTCALL
678#define RT_IPRT_FORMAT_ATTR(a_iFmt, a_iArgs)
679#define RT_IPRT_FORMAT_ATTR_MAYBE_NULL(a_iFmt, a_iArgs)
680#define DECLINLINE(type) inline type
681#define DECL_INLINE_THROW(type) inline type
682#define DECL_FORCE_INLINE(type) inline type
683#define DECL_INVALID(type) type
684
685#define PDMDEVINSINT_DECLARED 1
686#define VBOX_WITH_HGCM 1
687#define VBOXCALL
688
689#define HM_NAMELESS_UNION_TAG(a_Tag)
690#define HM_UNION_NM(a_Nm)
691#define HM_STRUCT_NM(a_Nm)
692
693#define PGM_ALL_CB_DECL(type) type
694#define PGM_ALL_CB2_DECL(type) type
695#define PGM_CTX(a,b) b
696#define PGM_CTX3(a,b,c) c
697#define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name)
698#define PGM_GST_NAME_REAL(name) pgmGstReal##name
699#define PGM_GST_NAME_PROT(name) pgmGstProt##name
700#define PGM_GST_NAME_32BIT(name) pgmGst32Bit##name
701#define PGM_GST_NAME_PAE(name) pgmGstPAE##name
702#define PGM_GST_NAME_AMD64(name) pgmGstAMD64##name
703#define PGM_GST_DECL(type, name) type PGM_GST_NAME(name)
704#define PGM_SHW_NAME(name) PGM_GST_NAME_AMD64(name)
705#define PGM_SHW_NAME_32BIT(name) pgmShw32Bit##name
706#define PGM_SHW_NAME_PAE(name) pgmShwPAE##name
707#define PGM_SHW_NAME_AMD64(name) pgmShwAMD64##name
708#define PGM_SHW_NAME_NESTED(name) pgmShwNested##name
709#define PGM_SHW_NAME_EPT(name) pgmShwEPT##name
710#define PGM_SHW_DECL(type, name) type PGM_SHW_NAME(name)
711#define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_AMD64(name)
712#define PGM_BTH_NAME_32BIT_REAL(name) pgmBth##name
713#define PGM_BTH_NAME_32BIT_PROT(name) pgmBth##name
714#define PGM_BTH_NAME_32BIT_32BIT(name) pgmBth##name
715#define PGM_BTH_NAME_PAE_REAL(name) pgmBth##name
716#define PGM_BTH_NAME_PAE_PROT(name) pgmBth##name
717#define PGM_BTH_NAME_PAE_32BIT(name) pgmBth##name
718#define PGM_BTH_NAME_PAE_PAE(name) pgmBth##name
719#define PGM_BTH_NAME_AMD64_PROT(name) pgmBth##name
720#define PGM_BTH_NAME_AMD64_AMD64(name) pgmBth##name
721#define PGM_BTH_NAME_NESTED_REAL(name) pgmBth##name
722#define PGM_BTH_NAME_NESTED_PROT(name) pgmBth##name
723#define PGM_BTH_NAME_NESTED_32BIT(name) pgmBth##name
724#define PGM_BTH_NAME_NESTED_PAE(name) pgmBth##name
725#define PGM_BTH_NAME_NESTED_AMD64(name) pgmBth##name
726#define PGM_BTH_NAME_EPT_REAL(name) pgmBth##name
727#define PGM_BTH_NAME_EPT_PROT(name) pgmBth##name
728#define PGM_BTH_NAME_EPT_32BIT(name) pgmBth##name
729#define PGM_BTH_NAME_EPT_PAE(name) pgmBth##name
730#define PGM_BTH_NAME_EPT_AMD64(name) pgmBth##name
731#define PGM_BTH_DECL(type, name) type PGM_BTH_NAME(name)
732
733#define FNIEMOP_STUB(a_Name) VBOXSTRICTRC a_Name(PIEMCPU pIemCpu) { return VERR_NOT_IMPLEMENTED; }
734#define FNIEMOP_DEF(a_Name) VBOXSTRICTRC a_Name(PIEMCPU pIemCpu)
735#define FNIEMOP_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, a_Type0 a_Name0)
736#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)
737#define FNIEMOPRM_DEF(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, uint8_t bBm)
738#define IEM_CIMPL_DEF_0(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu)
739#define IEM_CIMPL_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0)
740#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)
741#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)
742#define IEM_DECL_IMPL_DEF(a_RetType, a_Name, a_ArgList) a_RetType a_Name a_ArgList
743#define IEM_MC_LOCAL(a_Type, a_Name) a_Type a_Name
744#define IEM_MC_ARG(a_Type, a_Name, a_iArg) a_Type a_Name
745#define IEM_MC_ARG_CONST(a_Type, a_Name, a_Value, a_iArg) a_Type const a_Name = a_Value
746#define IEM_STATIC
747
748#define RTASN1_IMPL_GEN_SEQ_OF_TYPEDEFS_AND_PROTOS(a_SeqOfType, a_ItemType, a_DeclMacro, a_ImplExtNm) typedef struct a_SeqOfType { RTASN1SEQUENCECORE SeqCore; RTASN1ALLOCATION Allocation; uint32_t cItems; RT_CONCAT(P,a_ItemType) paItems; } a_SeqOfType; typedef a_SeqOfType *P##a_SeqOfType, const *PC##a_SeqOfType; int a_ImplExtNm##_DecodeAsn1(struct RTASN1CURSOR *pCursor, uint32_t fFlags, P##a_SeqOfType pThis, const char *pszErrorTag); int a_ImplExtNm##_Compare(PC##a_SeqOfType pLeft, PC##a_SeqOfType pRight)
749#define RTASN1_IMPL_GEN_SET_OF_TYPEDEFS_AND_PROTOS(a_SetOfType, a_ItemType, a_DeclMacro, a_ImplExtNm) typedef struct a_SetOfType { RTASN1SETCORE SetCore; RTASN1ALLOCATION Allocation; uint32_t cItems; RT_CONCAT(P,a_ItemType) paItems; } a_SetOfType; typedef a_SetOfType *P##a_SetOfType, const *PC##a_SetOfType; int a_ImplExtNm##_DecodeAsn1(struct RTASN1CURSOR *pCursor, uint32_t fFlags, P##a_SetOfType pThis, const char *pszErrorTag); int a_ImplExtNm##_Compare(PC##a_SetOfType pLeft, PC##a_SetOfType pRight)
750#define RTASN1TYPE_STANDARD_PROTOTYPES_NO_GET_CORE(a_TypeNm, a_DeclMacro, a_ImplExtNm) int a_ImplExtNm##_Init(P##a_TypeNm pThis, PCRTASN1ALLOCATORVTABLE pAllocator); int a_ImplExtNm##_Clone(P##a_TypeNm pThis, PC##a_TypeNm) pSrc, PCRTASN1ALLOCATORVTABLE pAllocator); void a_ImplExtNm##_Delete(P##a_TypeNm pThis); int a_ImplExtNm##_Enum(P##a_TypeNm pThis, PFNRTASN1ENUMCALLBACK pfnCallback, uint32_t uDepth, void *pvUser); int a_ImplExtNm##_Compare(PC##a_TypeNm) pLeft, PC##a_TypeNm pRight); int a_ImplExtNm##_DecodeAsn1(PRTASN1CURSOR pCursor, uint32_t fFlags, P##a_TypeNm pThis, const char *pszErrorTag); int a_ImplExtNm##_CheckSanity(PC##a_TypeNm pThis, uint32_t fFlags, PRTERRINFO pErrInfo, const char *pszErrorTag)
751#define RTASN1TYPE_STANDARD_PROTOTYPES(a_TypeNm, a_DeclMacro, a_ImplExtNm, a_Asn1CoreNm) inline PRTASN1CORE a_ImplExtNm##_GetAsn1Core(PC##a_TypeNm pThis) { return (PRTASN1CORE)&pThis->a_Asn1CoreNm; } inline bool a_ImplExtNm##_IsPresent(PC##a_TypeNm pThis) { return pThis && RTASN1CORE_IS_PRESENT(&pThis->a_Asn1CoreNm); } RTASN1TYPE_STANDARD_PROTOTYPES_NO_GET_CORE(a_TypeNm, a_DeclMacro, a_ImplExtNm)
752
753#define RTLDRELF_NAME(name) rtldrELF64##name
754#define RTLDRELF_SUFF(name) name##64
755#define RTLDRELF_MID(pre,suff) pre##64##suff
756
757#define BS3_DECL(type) type
758#define BS3_DECL_CALLBACK(type) type
759#define TMPL_NM(name) name##_mmm
760#define TMPL_FAR_NM(name) name##_mmm_far
761#define BS3_CMN_NM(name) name
762#define BS3_CMN_FAR_NM(name) name
763#define BS3_CMN_FN_NM(name) name
764#define BS3_DATA_NM(name) name
765#define BS3_FAR
766#define BS3_FAR_CODE
767#define BS3_FAR_DATA
768#define BS3_NEAR
769#define BS3_NEAR_CODE
770#define BS3_CMN_PROTO_STUB(a_RetType, a_Name, a_Params) a_RetType a_Name a_Params
771#define BS3_CMN_PROTO_NOSB(a_RetType, a_Name, a_Params) a_RetType a_Name a_Params
772#define BS3_CMN_DEF( a_RetType, a_Name, a_Params) a_RetType a_Name a_Params
773#define BS3_MODE_PROTO_STUB(a_RetType, a_Name, a_Params) \
774 a_RetType a_Name##_mmm a_Params; \
775 a_RetType a_Name##_mmm_far a_Params; \
776 a_RetType a_Name##_rm a_Params; \
777 a_RetType a_Name##_pe16 a_Params; \
778 a_RetType a_Name##_pe16_32 a_Params; \
779 a_RetType a_Name##_pe16_v86 a_Params; \
780 a_RetType a_Name##_pe32 a_Params; \
781 a_RetType a_Name##_pe32_16 a_Params; \
782 a_RetType a_Name##_pev86 a_Params; \
783 a_RetType a_Name##_pp16 a_Params; \
784 a_RetType a_Name##_pp16_32 a_Params; \
785 a_RetType a_Name##_pp16_v86 a_Params; \
786 a_RetType a_Name##_pp32 a_Params; \
787 a_RetType a_Name##_pp32_16 a_Params; \
788 a_RetType a_Name##_ppv86 a_Params; \
789 a_RetType a_Name##_pae16 a_Params; \
790 a_RetType a_Name##_pae16_32 a_Params; \
791 a_RetType a_Name##_pae16_v86 a_Params; \
792 a_RetType a_Name##_pae32 a_Params; \
793 a_RetType a_Name##_pae32_16 a_Params; \
794 a_RetType a_Name##_paev86 a_Params; \
795 a_RetType a_Name##_lm16 a_Params; \
796 a_RetType a_Name##_lm32 a_Params; \
797 a_RetType a_Name##_lm64 a_Params; \
798 a_RetType a_Name##_rm_far a_Params; \
799 a_RetType a_Name##_pe16_far a_Params; \
800 a_RetType a_Name##_pe16_v86_far a_Params; \
801 a_RetType a_Name##_pe32_16_far a_Params; \
802 a_RetType a_Name##_pev86_far a_Params; \
803 a_RetType a_Name##_pp16_far a_Params; \
804 a_RetType a_Name##_pp16_v86_far a_Params; \
805 a_RetType a_Name##_pp32_16_far a_Params; \
806 a_RetType a_Name##_ppv86_far a_Params; \
807 a_RetType a_Name##_pae16_far a_Params; \
808 a_RetType a_Name##_pae16_v86_far a_Params; \
809 a_RetType a_Name##_pae32_16_far a_Params; \
810 a_RetType a_Name##_paev86_far a_Params; \
811 a_RetType a_Name##_lm16_far a_Params
812#define BS3_MODE_PROTO_NOSB(a_RetType, a_Name, a_Params) \
813 a_RetType a_Name##_mmm a_Params; \
814 a_RetType a_Name##_mmm_far a_Params; \
815 a_RetType a_Name##_rm a_Params; \
816 a_RetType a_Name##_pe16 a_Params; \
817 a_RetType a_Name##_pe16_32 a_Params; \
818 a_RetType a_Name##_pe16_v86 a_Params; \
819 a_RetType a_Name##_pe32 a_Params; \
820 a_RetType a_Name##_pe32_16 a_Params; \
821 a_RetType a_Name##_pev86 a_Params; \
822 a_RetType a_Name##_pp16 a_Params; \
823 a_RetType a_Name##_pp16_32 a_Params; \
824 a_RetType a_Name##_pp16_v86 a_Params; \
825 a_RetType a_Name##_pp32 a_Params; \
826 a_RetType a_Name##_pp32_16 a_Params; \
827 a_RetType a_Name##_ppv86 a_Params; \
828 a_RetType a_Name##_pae16 a_Params; \
829 a_RetType a_Name##_pae16_32 a_Params; \
830 a_RetType a_Name##_pae16_v86 a_Params; \
831 a_RetType a_Name##_pae32 a_Params; \
832 a_RetType a_Name##_pae32_16 a_Params; \
833 a_RetType a_Name##_paev86 a_Params; \
834 a_RetType a_Name##_lm16 a_Params; \
835 a_RetType a_Name##_lm32 a_Params; \
836 a_RetType a_Name##_lm64 a_Params; \
837 a_RetType a_Name##_rm_far a_Params; \
838 a_RetType a_Name##_pe16_far a_Params; \
839 a_RetType a_Name##_pe16_v86_far a_Params; \
840 a_RetType a_Name##_pe32_16_far a_Params; \
841 a_RetType a_Name##_pev86_far a_Params; \
842 a_RetType a_Name##_pp16_far a_Params; \
843 a_RetType a_Name##_pp16_v86_far a_Params; \
844 a_RetType a_Name##_pp32_16_far a_Params; \
845 a_RetType a_Name##_ppv86_far a_Params; \
846 a_RetType a_Name##_pae16_far a_Params; \
847 a_RetType a_Name##_pae16_v86_far a_Params; \
848 a_RetType a_Name##_pae32_16_far a_Params; \
849 a_RetType a_Name##_paev86_far a_Params; \
850 a_RetType a_Name##_lm16_far a_Params
851#define BS3_MODE_EXPAND_EXTERN_DATA16(a_VarType, a_VarName, a_Suffix) \
852 extern a_VarType a_VarName##_rm a_Suffix; \
853 extern a_VarType a_VarName##_pe16 a_Suffix; \
854 extern a_VarType a_VarName##_pe16_32 a_Suffix; \
855 extern a_VarType a_VarName##_pe16_v86 a_Suffix; \
856 extern a_VarType a_VarName##_pe32 a_Suffix; \
857 extern a_VarType a_VarName##_pe32_16 a_Suffix; \
858 extern a_VarType a_VarName##_pev86 a_Suffix; \
859 extern a_VarType a_VarName##_pp16 a_Suffix; \
860 extern a_VarType a_VarName##_pp16_32 a_Suffix; \
861 extern a_VarType a_VarName##_pp16_v86 a_Suffix; \
862 extern a_VarType a_VarName##_pp32 a_Suffix; \
863 extern a_VarType a_VarName##_pp32_16 a_Suffix; \
864 extern a_VarType a_VarName##_ppv86 a_Suffix; \
865 extern a_VarType a_VarName##_pae16 a_Suffix; \
866 extern a_VarType a_VarName##_pae16_32 a_Suffix; \
867 extern a_VarType a_VarName##_pae16_v86 a_Suffix; \
868 extern a_VarType a_VarName##_pae32 a_Suffix; \
869 extern a_VarType a_VarName##_pae32_16 a_Suffix; \
870 extern a_VarType a_VarName##_paev86 a_Suffix; \
871 extern a_VarType a_VarName##_lm16 a_Suffix; \
872 extern a_VarType a_VarName##_lm32 a_Suffix; \
873 extern a_VarType a_VarName##_lm64 a_Suffix
874
875EOF
876
877 MY_HDR_FILES=` echo ${MY_ROOT_DIR}/include/VBox/*.h ${MY_ROOT_DIR}/include/VBox/vmm/*.h \
878 | ${MY_SED} -e 's,${MY_ROOT_DIR}/include/VBox/err.h,,' `
879 MY_HDR_FILES="${MY_HDR_FILES} ${MY_ROOT_DIR}/include/iprt/cdefs.h"
880 ${MY_SED} \
881 -e '/__cdecl/d' \
882 -e '/^ *# *define.*DECL/!d' \
883 -e '/DECLS/d' \
884 -e '/DECLARE_CLS_/d' \
885 -e '/_SRC_POS_DECL/d' \
886 -e '/declspec/d' \
887 -e '/__attribute__/d' \
888 -e 's/# */#/g' \
889 -e 's/ */ /g' \
890 -e '/ DECLEXPORT_CLASS/d' \
891 -e 's/ *VBOXCALL//' \
892 -e 's/ *RTCALL//' \
893 -e '/ DECLASM(type) type/d' \
894 -e '/define *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \
895 -e '/define *DECLINLINE(type)/d' \
896 -e '/define *DECL_FORCE_INLINE(type)/d' \
897 -e '/ *DECL_INVALID(/d' \
898 \
899 -e 's/(type) DECLHIDDEN(type)/(type) type/' \
900 -e 's/(type) DECLEXPORT(type)/(type) type/' \
901 -e 's/(type) DECLIMPORT(type)/(type) type/' \
902 -e 's/(type) DECL_HIDDEN_NOTHROW(type)/(type) type/' \
903 -e 's/(type) DECL_EXPORT_NOTHROW(type)/(type) type/' \
904 -e 's/(type) DECL_IMPORT_NOTHROW(type)/(type) type/' \
905 -e 's/(a_Type) DECLHIDDEN(a_Type)/(a_Type) a_Type/' \
906 -e 's/(a_Type) DECLEXPORT(a_Type)/(a_Type) a_Type/' \
907 -e 's/(a_Type) DECLIMPORT(a_Type)/(a_Type) a_Type/' \
908 -e 's/(a_Type) DECL_HIDDEN_NOTHROW(a_Type)/(a_Type) a_Type/' \
909 -e 's/(a_Type) DECL_EXPORT_NOTHROW(a_Type)/(a_Type) a_Type/' \
910 -e 's/(a_Type) DECL_IMPORT_NOTHROW(a_Type)/(a_Type) a_Type/' \
911 \
912 --append "${MY_FILE}" \
913 ${MY_HDR_FILES}
914
915 ${MY_CAT} "${MY_FILE}" \
916 | ${MY_SED} -e 's/_/\x1F/g' -e 's/(/\x1E/g' -e 's/[[:space:]][[:space:]]*/\x1C/g' \
917 | ${MY_SED} -e 's/\x1F/_/g' -e 's/\x1E/(/g' -e 's/\x1C/ /g' \
918 | ${MY_SORT} \
919 | ${MY_SED} -e '/#define/s/$/ \/\/ vbox/' --output "${MY_FILE}.2"
920
921 # Eliminate duplicates.
922 > "${MY_FILE}.3"
923 exec < "${MY_FILE}.2"
924 MY_PREV_DEFINE=""
925 while read MY_LINE;
926 do
927 MY_DEFINE=`echo "${MY_LINE}" | ${MY_SED} -e 's/^#define \([^ ()]*\).*$/\1/' `
928 if test "${MY_DEFINE}" != "${MY_PREV_DEFINE}"; then
929 MY_PREV_DEFINE=${MY_DEFINE}
930 echo "${MY_LINE}" >> "${MY_FILE}.3"
931 fi
932 done
933
934 # Append non-vbox bits from the current user config.
935 if test -n "${MY_USERCPP_H_FULL}" -a -f "${MY_USERCPP_H_FULL}"; then
936 ${MY_SED} -e '/ \/\/ vbox$/d' -e '/^[[:space:]]*$/d' --append "${MY_FILE}.3" "${MY_USERCPP_H_FULL}"
937 fi
938
939 # Finalize the file (sort + blank lines).
940 ${MY_CAT} "${MY_FILE}.3" \
941 | ${MY_SED} -e 's/$/\n/' --output "${MY_FILE}"
942 ${MY_RM} -f "${MY_FILE}.2" "${MY_FILE}.3"
943
944 # Install it.
945 if test -n "${MY_USERCPP_H_FULL}" -a -d "${MY_SLICKDIR}"; then
946 if test -f "${MY_USERCPP_H_FULL}"; then
947 ${MY_MV} -vf "${MY_USERCPP_H_FULL}" "${MY_USERCPP_H_FULL}.bak"
948 ${MY_CP} "${MY_FILE}" "${MY_USERCPP_H_FULL}"
949 echo "Updated the SlickEdit preprocessor file. (Previous version renamed to .bak.)"
950 else
951 ${MY_CP} "${MY_FILE}" "${MY_USERCPP_H_FULL}"
952 echo "Created the SlickEdit preprocessor file."
953 fi
954 fi
955}
956
957###### end of functions ####
958
959
960#
961# Parse arguments.
962#
963while test $# -ge 1;
964do
965 ARG=$1
966 shift
967 case "$ARG" in
968
969 --rootdir)
970 if test $# -eq 0; then
971 echo "error: missing --rootdir argument." 1>&2
972 exit 1;
973 fi
974 MY_ROOT_DIR="$1"
975 shift
976 ;;
977
978 --outdir)
979 if test $# -eq 0; then
980 echo "error: missing --outdir argument." 1>&2
981 exit 1;
982 fi
983 MY_OUT_DIR="$1"
984 shift
985 ;;
986
987 --project-base)
988 if test $# -eq 0; then
989 echo "error: missing --project-base argument." 1>&2
990 exit 1;
991 fi
992 MY_PRJ_PRF="$1"
993 shift
994 ;;
995
996 --workspace)
997 if test $# -eq 0; then
998 echo "error: missing --workspace argument." 1>&2
999 exit 1;
1000 fi
1001 MY_WS_NAME="$1"
1002 shift
1003 ;;
1004
1005 --windows-host)
1006 MY_WINDOWS_HOST=1
1007 ;;
1008
1009 --minimal)
1010 MY_OPT_MINIMAL=1
1011 ;;
1012
1013 --slickedit-config)
1014 MY_SLICK_CONFIG="$1"
1015 shift
1016 ;;
1017
1018 # usage
1019 --h*|-h*|-?|--?)
1020 echo "usage: $0 [--rootdir <rootdir>] [--outdir <outdir>] [--project-base <prefix>] [--workspace <name>] [--minimal] [--slickedit-config <DIR>]"
1021 echo ""
1022 echo "If --outdir is specified, you must specify a --rootdir relative to it as well."
1023 exit 1;
1024 ;;
1025
1026 # default
1027 *)
1028 echo "error: Invalid parameter '$ARG'" 1>&2
1029 exit 1;
1030
1031 esac
1032done
1033
1034
1035#
1036# From now on everything *MUST* succeed.
1037#
1038set -e
1039
1040
1041#
1042# Make sure the output directory exists, is valid and clean.
1043#
1044${MY_RM} -f \
1045 "${MY_OUT_DIR}/${MY_PRJ_PRF}"*.vpj \
1046 "${MY_OUT_DIR}/${MY_WS_NAME}" \
1047 "${MY_OUT_DIR}/`echo ${MY_WS_NAME} | ${MY_SED} -e 's/\.vpw$/.vtg/'`"
1048${MY_MKDIR} -p "${MY_OUT_DIR}"
1049cd "${MY_OUT_DIR}"
1050
1051
1052#
1053# Determine the invocation to conjure up kmk.
1054#
1055my_abs_dir "tools"
1056if test -n "${MY_WINDOWS_HOST}"; then
1057 MY_KMK_INVOCATION="cscript.exe /Nologo ${MY_ABS_DIR}/envSub.vbs --quiet -- kmk.exe"
1058else
1059 MY_KMK_INVOCATION="/usr/bin/env LANG=C ${MY_ABS_DIR}/env.sh --quiet --no-wine kmk"
1060fi
1061
1062
1063#
1064# Generate the projects and workspace.
1065#
1066# Note! The configs aren't optimal yet, lots of adjustment wrt headers left to be done.
1067#
1068
1069# src/VBox/Runtime
1070my_generate_project "IPRT" "src/VBox/Runtime" --begin-incs "include" "src/VBox/Runtime/include" --end-includes "include/iprt" "src/VBox/Runtime"
1071
1072# src/VBox/VMM
1073my_generate_project "VMM" "src/VBox/VMM" --begin-incs "include" "src/VBox/VMM" --end-includes "src/VBox/VMM" \
1074 "include/VBox/vmm/cfgm.h" \
1075 "include/VBox/vmm/cpum.*" \
1076 "include/VBox/vmm/dbgf.h" \
1077 "include/VBox/vmm/em.h" \
1078 "include/VBox/vmm/gim.h" \
1079 "include/VBox/vmm/apic.h" \
1080 "include/VBox/vmm/gmm.*" \
1081 "include/VBox/vmm/gvm.*" \
1082 "include/VBox/vmm/hm*.*" \
1083 "include/VBox/vmm/iom.h" \
1084 "include/VBox/vmm/mm.h" \
1085 "include/VBox/vmm/patm.*" \
1086 "include/VBox/vmm/pdm*.h" \
1087 "include/VBox/vmm/pgm.*" \
1088 "include/VBox/vmm/selm.*" \
1089 "include/VBox/vmm/ssm.h" \
1090 "include/VBox/vmm/stam.*" \
1091 "include/VBox/vmm/tm.h" \
1092 "include/VBox/vmm/trpm.*" \
1093 "include/VBox/vmm/vm.*" \
1094 "include/VBox/vmm/vmm.*"
1095
1096# src/VBox/Additions
1097my_generate_project "Add-darwin" "src/VBox/Additions/darwin" --begin-incs "include" "src/VBox/Additions/darwin" --end-includes "src/VBox/Additions/darwin"
1098my_generate_project "Add-freebsd" "src/VBox/Additions/freebsd" --begin-incs "include" "src/VBox/Additions/freebsd" --end-includes "src/VBox/Additions/freebsd"
1099my_generate_project "Add-haiku" "src/VBox/Additions/haiku" --begin-incs "include" "src/VBox/Additions/haiku" --end-includes "src/VBox/Additions/haiku"
1100my_generate_project "Add-linux" "src/VBox/Additions/linux" --begin-incs "include" "src/VBox/Additions/linux" --end-includes "src/VBox/Additions/linux"
1101my_generate_project "Add-os2" "src/VBox/Additions/os2" --begin-incs "include" "src/VBox/Additions/os2" --end-includes "src/VBox/Additions/os2"
1102my_generate_project "Add-solaris" "src/VBox/Additions/solaris" --begin-incs "include" "src/VBox/Additions/solaris" --end-includes "src/VBox/Additions/solaris"
1103my_generate_project "Add-win" "src/VBox/Additions/WINNT" --begin-incs "include" "src/VBox/Additions/WINNT" --end-includes "src/VBox/Additions/WINNT"
1104if test -z "$MY_OPT_MINIMAL"; then
1105 my_generate_project "Add-x11" "src/VBox/Additions/x11" --begin-incs "include" "src/VBox/Additions/x11" --end-includes "src/VBox/Additions/x11"
1106fi
1107my_generate_project "Add-Control" "src/VBox/Additions/common/VBoxControl" --begin-incs "include" "src/VBox/Additions/common/VBoxControl" --end-includes "src/VBox/Additions/common/VBoxControl"
1108my_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*.*"
1109my_generate_project "Add-Lib" "src/VBox/Additions/common/VBoxGuest/lib" --begin-incs "include" "src/VBox/Additions/common/VBoxGuest/lib" --end-includes "src/VBox/Additions/common/VBoxGuest/lib" "include/VBox/VBoxGuest/lib/*.*"
1110my_generate_project "Add-Service" "src/VBox/Additions/common/VBoxService" --begin-incs "include" "src/VBox/Additions/common/VBoxService" --end-includes "src/VBox/Additions/common/VBoxService"
1111my_generate_project "Add-VBoxVideo" "src/VBox/Additions/common/VBoxVideo" --begin-incs "include" "src/VBox/Additions/common/VBoxVideo" --end-includes "src/VBox/Additions/common/VBoxVideo"
1112if test -z "$MY_OPT_MINIMAL"; then
1113 my_generate_project "Add-pam" "src/VBox/Additions/common/pam" --begin-incs "include" "src/VBox/Additions/common/pam" --end-includes "src/VBox/Additions/common/pam"
1114 my_generate_project "Add-cmn-test" "src/VBox/Additions/common/testcase" --begin-incs "include" "src/VBox/Additions/common/testcase" --end-includes "src/VBox/Additions/common/testcase"
1115 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"
1116 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"
1117fi
1118
1119# src/VBox/Debugger
1120my_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"
1121
1122# src/VBox/Devices
1123my_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"
1124## @todo split this up.
1125
1126# src/VBox/Disassembler
1127my_generate_project "DIS" "src/VBox/Disassembler" --begin-incs "include" "src/VBox/Disassembler" --end-includes "src/VBox/Disassembler" "include/VBox/dis*.h"
1128
1129# src/VBox/Frontends
1130if test -z "$MY_OPT_MINIMAL"; then
1131 my_generate_project "FE-VBoxBalloonCtrl" "src/VBox/Frontends/VBoxBalloonCtrl" --begin-incs "include" "src/VBox/Frontends/VBoxBalloonCtrl" --end-includes "src/VBox/Frontends/VBoxBalloonCtrl"
1132fi
1133my_generate_project "FE-VBoxManage" "src/VBox/Frontends/VBoxManage" --begin-incs "include" "src/VBox/Frontends/VBoxManage" --end-includes "src/VBox/Frontends/VBoxManage"
1134my_generate_project "FE-VBoxHeadless" "src/VBox/Frontends/VBoxHeadless" --begin-incs "include" "src/VBox/Frontends/VBoxHeadless" --end-includes "src/VBox/Frontends/VBoxHeadless"
1135my_generate_project "FE-VBoxSDL" "src/VBox/Frontends/VBoxSDL" --begin-incs "include" "src/VBox/Frontends/VBoxSDL" --end-includes "src/VBox/Frontends/VBoxSDL"
1136my_generate_project "FE-VBoxShell" "src/VBox/Frontends/VBoxShell" --begin-incs "include" "src/VBox/Frontends/VBoxShell" --end-includes "src/VBox/Frontends/VBoxShell"
1137# noise - my_generate_project "FE-VBoxBFE" "src/VBox/Frontends/VBoxBFE" --begin-incs "include" "src/VBox/Frontends/VBoxBFE" --end-includes "src/VBox/Frontends/VBoxBFE"
1138FE_VBOX_WRAPPERS=""
1139for d in ${MY_OUT_DIRS};
1140do
1141 if test -d "${MY_ROOT_DIR}/${d}/obj/VirtualBox/include"; then
1142 FE_VBOX_WRAPPERS="${d}/obj/VirtualBox/include"
1143 break
1144 fi
1145done
1146if test -n "${FE_VBOX_WRAPPERS}"; then
1147 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"
1148else
1149 my_generate_project "FE-VirtualBox" "src/VBox/Frontends/VirtualBox" --begin-incs "include" --end-includes "src/VBox/Frontends/VirtualBox"
1150fi
1151
1152# src/VBox/GuestHost
1153my_generate_project "HGSMI-GH" "src/VBox/GuestHost/HGSMI" --begin-incs "include" --end-includes "src/VBox/GuestHost/HGSMI"
1154if test -z "$MY_OPT_MINIMAL"; then
1155 my_generate_project "DnD-GH" "src/VBox/GuestHost/DragAndDrop" --begin-incs "include" --end-includes "src/VBox/GuestHost/DragAndDrop"
1156fi
1157my_generate_project "ShClip-GH" "src/VBox/GuestHost/SharedClipboard" --begin-incs "include" --end-includes "src/VBox/GuestHost/SharedClipboard"
1158
1159# src/VBox/HostDrivers
1160my_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"
1161my_generate_project "VBoxNetAdp" "src/VBox/HostDrivers/VBoxNetAdp" --begin-incs "include" "src/VBox/HostDrivers/VBoxNetAdp" --end-includes "src/VBox/HostDrivers/VBoxNetAdp" "include/VBox/intnet.h"
1162my_generate_project "VBoxNetFlt" "src/VBox/HostDrivers/VBoxNetFlt" --begin-incs "include" "src/VBox/HostDrivers/VBoxNetFlt" --end-includes "src/VBox/HostDrivers/VBoxNetFlt" "include/VBox/intnet.h"
1163my_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"
1164my_generate_project "AdpCtl" "src/VBox/HostDrivers/adpctl" --begin-incs "include" --end-includes "src/VBox/HostDrivers/adpctl"
1165
1166# src/VBox/HostServices
1167my_generate_project "GuestCntl" "src/VBox/HostServices/GuestControl" --begin-incs "include" "src/VBox/HostServices/GuestControl" --end-includes "src/VBox/HostServices/GuestControl"
1168my_generate_project "DragAndDrop" "src/VBox/HostServices/DragAndDrop" --begin-incs "include" "src/VBox/HostServices/DragAndDrop" --end-includes "src/VBox/HostServices/DragAndDrop"
1169my_generate_project "GuestProps" "src/VBox/HostServices/GuestProperties" --begin-incs "include" "src/VBox/HostServices/GuestProperties" --end-includes "src/VBox/HostServices/GuestProperties"
1170my_generate_project "ShClip-HS" "src/VBox/HostServices/SharedClipboard" --begin-incs "include" "src/VBox/HostServices/SharedClipboard" --end-includes "src/VBox/HostServices/SharedClipboard"
1171my_generate_project "SharedFolders" "src/VBox/HostServices/SharedFolders" --begin-incs "include" "src/VBox/HostServices/SharedFolders" --end-includes "src/VBox/HostServices/SharedFolders" "include/VBox/shflsvc.h"
1172
1173# src/VBox/ImageMounter
1174my_generate_project "ImageMounter" "src/VBox/ImageMounter" --begin-incs "include" "src/VBox/ImageMounter" --end-includes "src/VBox/ImageMounter"
1175
1176# src/VBox/Installer
1177my_generate_project "Installers" "src/VBox/Installer" --begin-incs "include" --end-includes "src/VBox/Installer"
1178
1179# src/VBox/Main
1180my_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"
1181## @todo seperate webservices and Main. pick the right headers. added generated headers.
1182
1183# src/VBox/Network
1184my_generate_project "Net-DHCP" "src/VBox/NetworkServices/Dhcpd" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/Dhcpd"
1185my_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"
1186my_generate_project "Net-NetLib" "src/VBox/NetworkServices/NetLib" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/NetLib"
1187
1188# src/VBox/RDP
1189my_generate_project "RDP-Client" "src/VBox/RDP/client-1.8.4" --begin-incs "include" "src/VBox/RDP/client-1.8.4" --end-includes "src/VBox/RDP/client-1.8.4"
1190my_generate_project "RDP-Server" "src/VBox/RDP/server" --begin-incs "include" "src/VBox/RDP/server" --end-includes "src/VBox/RDP/server"
1191my_generate_project "RDP-WebClient" "src/VBox/RDP/webclient" --begin-incs "include" "src/VBox/RDP/webclient" --end-includes "src/VBox/RDP/webclient"
1192my_generate_project "RDP-Misc" "src/VBox/RDP" --begin-incs "include" --end-includes "src/VBox/RDP/auth" "src/VBox/RDP/tscpasswd" "src/VBox/RDP/x11server"
1193
1194# src/VBox/Storage
1195my_generate_project "Storage" "src/VBox/Storage" --begin-incs "include" "src/VBox/Storage" --end-includes "src/VBox/Storage"
1196
1197# src/VBox/ValidationKit
1198my_generate_project "ValidationKit" "src/VBox/ValidationKit" --begin-incs "include" --end-includes "src/VBox/ValidationKit"
1199
1200# src/VBox/ExtPacks
1201my_generate_project "ExtPacks" "src/VBox/ExtPacks" --begin-incs "include" --end-includes "src/VBox/ExtPacks"
1202
1203# src/bldprogs
1204my_generate_project "bldprogs" "src/bldprogs" --begin-incs "include" --end-includes "src/bldprogs"
1205
1206# A few things from src/lib
1207lib=$(my_get_newest_ver src/libs/zlib)
1208my_generate_project "zlib" "${lib}" --begin-incs "include" --end-includes "${lib}/*.c" "${lib}/*.h"
1209lib=$(my_get_newest_ver src/libs/liblzf)
1210my_generate_project "liblzf" "${lib}" --begin-incs "include" --end-includes "${lib}"
1211lib=$(my_get_newest_ver src/libs/libpng)
1212my_generate_project "libpng" "${lib}" --begin-incs "include" --end-includes "${lib}/*.c" "${lib}/*.h"
1213lib=$(my_get_newest_ver src/libs/openssl)
1214my_generate_project "openssl" "${lib}" --begin-incs "include" "${lib}/crypto" --end-includes "${lib}"
1215lib=$(my_get_newest_ver src/libs/curl)
1216my_generate_project "curl" "${lib}" --begin-incs "include" "${lib}/include" --end-includes "${lib}"
1217
1218# webtools
1219my_generate_project "webtools" "webtools" --begin-incs "include" "webtools/tinderbox/server/Tinderbox3" --end-includes "webtools"
1220
1221# include/VBox
1222my_generate_project "VBoxHeaders" "include" --begin-incs "include" --end-includes "include/VBox"
1223
1224# Misc
1225my_generate_project "misc" "." --begin-incs "include" --end-includes \
1226 "configure" \
1227 "configure.vbs" \
1228 "Config.kmk" \
1229 "Makefile.kmk" \
1230 "src/Makefile.kmk" \
1231 "src/VBox/Makefile.kmk" \
1232 "tools/env.sh" \
1233 "tools/env.cmd" \
1234 "tools/envSub.vbs" \
1235 "tools/envSub.cmd" \
1236 "tools/win/vbscript"
1237
1238
1239# out/x.y/z/bin/sdk/bindings/xpcom
1240XPCOM_INCS="src/libs/xpcom18a4"
1241for d in \
1242 "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/dist/sdk/bindings/xpcom" \
1243 "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/bin/sdk/bindings/xpcom" \
1244 "out/linux.amd64/debug/bin/sdk/bindings/xpcom" \
1245 "out/linux.x86/debug/bin/sdk/bindings/xpcom" \
1246 "out/darwin.amd64/debug/dist/sdk/bindings/xpcom" \
1247 "out/darwin.x86/debug/bin/dist/bindings/xpcom" \
1248 "out/haiku.amd64/debug/bin/sdk/bindings/xpcom" \
1249 "out/haiku.x86/debug/bin/sdk/bindings/xpcom" \
1250 "out/solaris.amd64/debug/bin/sdk/bindings/xpcom" \
1251 "out/solaris.x86/debug/bin/sdk/bindings/xpcom";
1252do
1253 if test -d "${MY_ROOT_DIR}/${d}"; then
1254 my_generate_project "SDK-xpcom" "${d}" --begin-incs "include" "${d}/include" --end-includes "${d}"
1255 XPCOM_INCS="${d}/include"
1256 break
1257 fi
1258done
1259
1260# lib/xpcom
1261my_generate_project "xpcom" "src/libs/xpcom18a4" --begin-incs "include" "${XPCOM_INCS}" --end-includes "src/libs/xpcom18a4"
1262
1263my_generate_workspace
1264
1265
1266#
1267# Update the history file if present.
1268#
1269MY_FILE="${MY_WS_NAME}histu"
1270if test -f "${MY_FILE}"; then
1271 echo "Updating ${MY_FILE}..."
1272 ${MY_MV} -f "${MY_FILE}" "${MY_FILE}.old"
1273 ${MY_SED} -n \
1274 -e '/PROJECT_CACHE/d' \
1275 -e '/\[TreeExpansion2\]/d' \
1276 -e '/^\[/p' \
1277 -e '/: /p' \
1278 -e '/^CurrentProject/p' \
1279 "${MY_FILE}.old" > "${MY_FILE}"
1280fi
1281
1282
1283#
1284# Generate and update the usercpp.h/unxcpp.h file.
1285#
1286my_generate_usercpp_h
1287
1288
1289echo "done"
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