Skip to content

Commit fc599c2

Browse files
committed
Move all generated files to output directory
1 parent 8b303fa commit fc599c2

File tree

2 files changed

+33
-14
lines changed

2 files changed

+33
-14
lines changed

build.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ output_gen=$1
33
platform=$2
44
mode=$3
55

6-
base_output_gen=`dirname ${output_gen}`
7-
86
current_dir=`pwd`
97
if [ -z $output_gen ];
108
then
11-
output_gen="."
9+
output_gen=`pwd`
1210
platform="desktop"
1311
fi
1412

13+
output_gen=`readlink -f ${output_gen}`
14+
base_output_gen=`dirname ${output_gen}`
15+
1516
if [ -z $platform ];
1617
then
1718
platforms="desktop flip"

wd.gyp

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
'include_dirs': [
3232
'inc/',
3333
'src/',
34+
'<(INTERMEDIATE_DIR)',
3435
'<(QT_INC_PATH)',
3536
],
3637

@@ -212,6 +213,30 @@
212213
],
213214
} ]
214215
],
216+
'actions': [{
217+
'action_name' : 'input_dir',
218+
'inputs' : [],
219+
'outputs': [
220+
'<(INTERMEDIATE_DIR)',
221+
],
222+
'action': ['mkdir', '-p', '<(INTERMEDIATE_DIR)'],
223+
}],
224+
225+
'rules': [
226+
{
227+
'rule_name': 'generate_ui',
228+
'extension': 'ui',
229+
'outputs': [ '<(RULE_INPUT_DIRNAME)/ui_<(RULE_INPUT_ROOT).h' ],
230+
'action': [ '<(QT_BIN_PATH)/uic', '<(RULE_INPUT_PATH)', '-o', '<(INTERMEDIATE_DIR)/ui_<(RULE_INPUT_ROOT).h' ],
231+
'message': 'Generating ui_<(RULE_INPUT_ROOT).h',
232+
},
233+
{
234+
'rule_name': 'generate_moc',
235+
'extension': 'h',
236+
'outputs': [ '<(RULE_INPUT_DIRNAME)/moc_<(RULE_INPUT_ROOT).cc' ],
237+
'action': [ '<(QT_BIN_PATH)/moc', '<(RULE_INPUT_PATH)', '-o', '<(INTERMEDIATE_DIR)/moc_<(RULE_INPUT_ROOT).cc' ],
238+
'message': 'Generating <(RULE_INPUT_ROOT).cc.',
239+
} ],
215240
},
216241

217242
'targets': [
@@ -227,6 +252,7 @@
227252
'inc/',
228253
'src/',
229254
'<(QT_INC_PATH)',
255+
'<(INTERMEDIATE_DIR)',
230256
'<(MONGOOSE_INC_PATH)',
231257
],
232258

@@ -357,9 +383,9 @@
357383
'src/chrome/test/webdriver/webdriver_switches.cc',
358384
'src/chrome/test/webdriver/webdriver_util.cc',
359385
'src/content/public/common/content_switches.cc',
360-
'src/moc_qtaskrunner.cc',
361-
'src/moc_qwebviewext.cc',
362-
'src/moc_webdriver_automation.cc',
386+
'<(INTERMEDIATE_DIR)/moc_qtaskrunner.cc',
387+
'<(INTERMEDIATE_DIR)/moc_qwebviewext.cc',
388+
'<(INTERMEDIATE_DIR)/moc_webdriver_automation.cc',
363389
'src/net/base/file_stream.cc',
364390
'src/net/base/file_stream_metrics.cc',
365391
'src/net/base/file_stream_net_log_parameters.cc',
@@ -383,14 +409,6 @@
383409
'src/viewfactory.cc',
384410
],
385411

386-
'rules': [ {
387-
'rule_name': 'generate_moc',
388-
'extension': 'h',
389-
'outputs': [ '<(RULE_INPUT_DIRNAME)/moc_<(RULE_INPUT_ROOT).cc' ],
390-
'action': [ '<(QT_BIN_PATH)/moc', '<(RULE_INPUT_PATH)', '-o', 'src/moc_<(RULE_INPUT_ROOT).cc' ],
391-
'message': 'Generating <(RULE_INPUT_ROOT).cc.',
392-
} ],
393-
394412
'conditions': [
395413
[ '<(WD_BUILD_MONGOOSE) == 1', {
396414
'sources': [

0 commit comments

Comments
 (0)