Skip to content

Commit 2bf00bb

Browse files
committed
zproject_nodejs.gsl : use same (parent) dir for git clones as developer checkouts
1 parent ab53ebb commit 2bf00bb

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

zproject_nodejs.gsl

+12-16
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Makefile
2626
logs
2727
*.log
2828
npm-debug.log*
29-
tmp-deps/
3029
.for project.use where !optional
3130
$(use.project)/
3231
.endfor
@@ -94,24 +93,20 @@ done
9493

9594
BUILD_ROOT=`pwd`
9695
cd ../../..
97-
rm -rf tmp-deps
98-
mkdir -p tmp-deps
96+
# Note: here we go to parent directory that contains current project,
97+
# so the checkout is nearby, same as expected for usual developer work
9998

10099
.for project.use where !optional & defined (use.repository)
101100
# Check dependent projects
102-
BASE_PWD=${PWD}
103-
cd tmp-deps
104101
if [ ! -d $(use.project) ]; then
105102
echo "I: cloning $(use.repository) into `pwd`/$(use.project)..."
106103
.# TODO: Should there be a use of "release" (git branch) like elsewhere?
107104
git clone $QUIET $(use.repository) || exit
108105
fi
109106
if [ ! -f $(use.project)/builds/gyp/project.gyp ]; then
110-
.# Note: We removed tmp-deps before, so the checkout is assumed most-recent and clean
111107
echo "E: `pwd`/$(use.project) out of date (builds/gyp/project.gyp missing)" >&2
112108
exit 1
113109
fi
114-
cd ${BASE_PWD}
115110

116111
.endfor
117112

@@ -154,11 +149,12 @@ $(project.GENERATED_WARNING_HEADER:)
154149
'target_name': '$(project.name)',
155150
'sources': [
156151
. for project.use where !optional
157-
. if file.exists ("../tmp-deps/$(use.project)/$(topdir)/binding.cc")
158-
'../../../tmp-deps/$(use.project)/$(topdir)/binding.cc',
152+
.# Note: the file.exists() paths are relative to current project.xml during zproject regen
153+
. if file.exists ("../$(use.project)/$(topdir)/binding.cc")
154+
'../../../$(use.project)/$(topdir)/binding.cc',
159155
. else
160-
. if !file.exists ("../tmp-deps/$(use.project)")
161-
. abort "E: please checkout $(use.project) into ../../../tmp-deps/$(use.project)"
156+
. if !file.exists ("../$(use.project)")
157+
. abort "E: please checkout $(use.project) into ../../../$(use.project)"
162158
. endif
163159
. endif
164160
. endfor
@@ -167,7 +163,7 @@ $(project.GENERATED_WARNING_HEADER:)
167163
'include_dirs': [
168164
"<!(node -e \\"require('nan')\\")",
169165
. for project.use where !optional
170-
'../../../tmp-deps/$(use.project)/include',
166+
'../../../$(use.project)/include',
171167
. endfor
172168
'../../include'
173169
],
@@ -251,11 +247,11 @@ $(project.GENERATED_WARNING_HEADER:)
251247
#define $(PROJECT.PREFIX)_BUILD_DRAFT_API
252248

253249
. for project.use where !optional
254-
. if file.exists ("../tmp-deps/$(use.project)/$(topdir)/binding.h")
255-
#include "../../../tmp-deps/$(use.project)/$(topdir)/binding.h"
250+
. if file.exists ("../$(use.project)/$(topdir)/binding.h")
251+
#include "../../../$(use.project)/$(topdir)/binding.h"
256252
. else
257-
. if !file.exists ("../tmp-deps/$(use.project)")
258-
. abort "E: please checkout $(use.project) into ../tmp-deps/$(use.project)"
253+
. if !file.exists ("../$(use.project)")
254+
. abort "E: please checkout $(use.project) into ../$(use.project)"
259255
. endif
260256
. endif
261257
. endfor

0 commit comments

Comments
 (0)