Skip to content

Commit 1cdfb34

Browse files
committed
Use export in Mac Makefiles to reduce command-line args in submake invocations.
1 parent fc4b69a commit 1cdfb34

File tree

6 files changed

+44
-32
lines changed

6 files changed

+44
-32
lines changed

build.macos32x86/common/Makefile.app

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ else # default CONFIGURATION=product => $(APPNAMEDEF).app
4646
APP:=$(APPNAMEDEF).app
4747
VM_IDENTIFIER:=$(APPIDENTIFIER)
4848
endif
49+
export APP
4950

5051
default: $(APP)
5152

build.macos32x86/common/Makefile.vm

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,20 @@
2222
# and its short name, e.g. Squeak or Newspeak, used to choose app icon files.
2323

2424
VM?=Squeak
25+
export VM
2526
SYSTEM?=$(VM)
2627

2728
# PLUGINSRCDIR defines the locaton of the plugin source, the subsets of which
2829
# selected by plugins.int and plugins.ext will be built.
2930

3031
PLUGINSRCDIR?=../../src/plugins
32+
export PLUGINSRCDIR
3133

3234
# CONFIGURATION defines what version of the VM to build, product, assert or
3335
# debug. The default is overridden in the mvm script
3436

3537
CONFIGURATION?=product
38+
export CONFIGURATION
3639

3740

3841
#############################################################################
@@ -48,9 +51,11 @@ else # default CONFIGURATION=product
4851
endif
4952
$(shell mkdir -p deps >/dev/null) # deps is the dependencies directory
5053
BLDDIR:= $(BUILD)
54+
export BLDDIR
5155
OBJDIR:= $(BLDDIR)/vm
5256

5357
PLATDIR:=../../platforms
58+
export PLATDIR
5459
CROSSDIR:=$(PLATDIR)/Cross/vm
5560
TPDIR:=$(PLATDIR)/Cross/third-party
5661
OSXDIR:=$(PLATDIR)/iOS/vm/OSX
@@ -266,10 +271,10 @@ $(OBJDIR)/%.lib: FORCE
266271
rm -f $(BUILD)/vm/$(*F).ignore
267272
$(MAKE) $(MFLAGS) BUILD=$(BUILD) \
268273
-f $(call plugin-makefile,$(*F)) MAKEFILE=$(call plugin-makefile,$(*F)) \
269-
CONFIGURATION=$(CONFIGURATION) ARCH=$(TARGET_ARCH) \
270-
PLATDIR=$(PLATDIR) PLUGINSRCDIR=$(PLUGINSRCDIR) VMSRCDIR=$(VMSRCDIR) \
274+
ARCH=$(TARGET_ARCH) TARGET_VERSION_MIN=$(TARGET_VERSION_MIN) \
275+
VMSRCDIR=$(VMSRCDIR) \
271276
LIBNAME=$(*F) COGDEFS="$(COGDEFS)" XDEFS=-DSQUEAK_BUILTIN_PLUGIN \
272-
$(PLUGINHACK) \
277+
CXXVERFLAGS="$(CXXVERFLAGS)" $(PLUGINHACK) \
273278
$(OBJDIR)/$(*F).lib
274279

275280
prereqs/%.lib:
@@ -290,12 +295,11 @@ $(OBJDIR)/%.bundle: FORCE
290295
rm -f $(BUILD)/vm/$(*F).ignore
291296
$(MAKE) $(MFLAGS) BUILD=$(BUILD) \
292297
-f $(call plugin-makefile,$(*F)) MAKEFILE=$(call plugin-makefile,$(*F)) \
293-
CONFIGURATION=$(CONFIGURATION) ARCH=$(TARGET_ARCH) \
294-
PLATDIR=$(PLATDIR) PLUGINSRCDIR=$(PLUGINSRCDIR) VMSRCDIR=$(VMSRCDIR) \
298+
ARCH=$(TARGET_ARCH) TARGET_VERSION_MIN=$(TARGET_VERSION_MIN) \
299+
VMSRCDIR=$(VMSRCDIR) \
295300
LIBNAME=$(*F) COGDEFS="$(COGDEFS)" \
296-
APP=$(APP) VM=$(VM) BLDDIR=$(BLDDIR) \
297301
THIRDPARTYOUTDIR=$(THIRDPARTYOUTDIR) \
298-
$(PLUGINHACK) \
302+
CXXVERFLAGS="$(CXXVERFLAGS)" $(PLUGINHACK) \
299303
$(OBJDIR)/$(*F).bundle
300304

301305
# External plugin. Made in the "Pharo way": as a simple dylib to be included in
@@ -306,12 +310,11 @@ $(OBJDIR)/%.dylib: FORCE
306310
rm -f $(BUILD)/vm/$(*F).ignore
307311
$(MAKE) $(MFLAGS) BUILD=$(BUILD) \
308312
-f $(call plugin-makefile,$(*F)) MAKEFILE=$(call plugin-makefile,$(*F)) \
309-
CONFIGURATION=$(CONFIGURATION) ARCH=$(TARGET_ARCH) \
310-
PLATDIR=$(PLATDIR) PLUGINSRCDIR=$(PLUGINSRCDIR) VMSRCDIR=$(VMSRCDIR) \
311-
LIBNAME=$(*F) COGDEFS="$(COGDEFS)" \
312-
APP=$(APP) VM=$(VM) BLDDIR=$(BLDDIR) USEPLUGINASDYLIB=TRUE \
313+
ARCH=$(TARGET_ARCH) TARGET_VERSION_MIN=$(TARGET_VERSION_MIN) \
314+
VMSRCDIR=$(VMSRCDIR) \
315+
LIBNAME=$(*F) USEPLUGINASDYLIB=TRUE COGDEFS="$(COGDEFS)" \
313316
THIRDPARTYOUTDIR=$(THIRDPARTYOUTDIR) \
314-
$(PLUGINHACK) \
317+
CXXVERFLAGS="$(CXXVERFLAGS)" $(PLUGINHACK) \
315318
$(OBJDIR)/$(*F).dylib
316319

317320
# It would be nice to have this abbreviation but it creates havoc eem 2/2016

build.macos64ARMv8/common/Makefile.app

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ else # default CONFIGURATION=product => $(APPNAMEDEF).app
4646
APP:=$(APPNAMEDEF).app
4747
VM_IDENTIFIER:=$(APPIDENTIFIER)
4848
endif
49+
export APP
4950

5051
default: $(APP)
5152

build.macos64ARMv8/common/Makefile.vm

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,20 @@
2222
# and its short name, e.g. Squeak or Newspeak, used to choose app icon files.
2323

2424
VM?=Squeak
25+
export VM
2526
SYSTEM?=$(VM)
2627

2728
# PLUGINSRCDIR defines the locaton of the plugin source, the subsets of which
2829
# selected by plugins.int and plugins.ext will be built.
2930

3031
PLUGINSRCDIR?=../../src/plugins
32+
export PLUGINSRCDIR
3133

3234
# CONFIGURATION defines what version of the VM to build, product, assert or
3335
# debug. The default is overridden in the mvm script
3436

3537
CONFIGURATION?=product
38+
export CONFIGURATION
3639

3740

3841
#############################################################################
@@ -53,9 +56,11 @@ else
5356
endif
5457
$(shell mkdir -p deps >/dev/null) # deps is the dependencies directory
5558
BLDDIR:= $(BUILD)
59+
export BLDDIR
5660
OBJDIR:= $(BLDDIR)/vm
5761

5862
PLATDIR:=../../platforms
63+
export PLATDIR
5964
CROSSDIR:=$(PLATDIR)/Cross/vm
6065
TPDIR:=$(PLATDIR)/Cross/third-party
6166
OSXDIR:=$(PLATDIR)/iOS/vm/OSX
@@ -274,8 +279,8 @@ $(OBJDIR)/%.lib: FORCE
274279
rm -f $(BUILD)/vm/$(*F).ignore
275280
$(MAKE) $(MFLAGS) BUILD=$(BUILD) \
276281
-f $(call plugin-makefile,$(*F)) MAKEFILE=$(call plugin-makefile,$(*F)) \
277-
CONFIGURATION=$(CONFIGURATION) ARCH=$(TARGET_ARCH) TARGET_VERSION_MIN=$(TARGET_VERSION_MIN) \
278-
PLATDIR=$(PLATDIR) PLUGINSRCDIR=$(PLUGINSRCDIR) VMSRCDIR=$(VMSRCDIR) \
282+
ARCH=$(TARGET_ARCH) TARGET_VERSION_MIN=$(TARGET_VERSION_MIN) \
283+
VMSRCDIR=$(VMSRCDIR) \
279284
LIBNAME=$(*F) COGDEFS="$(COGDEFS)" XDEFS=-DSQUEAK_BUILTIN_PLUGIN \
280285
CXXVERFLAGS="$(CXXVERFLAGS)" $(PLUGINHACK) \
281286
$(OBJDIR)/$(*F).lib
@@ -298,10 +303,9 @@ $(OBJDIR)/%.bundle: FORCE
298303
rm -f $(BUILD)/vm/$(*F).ignore
299304
$(MAKE) $(MFLAGS) BUILD=$(BUILD) \
300305
-f $(call plugin-makefile,$(*F)) MAKEFILE=$(call plugin-makefile,$(*F)) \
301-
CONFIGURATION=$(CONFIGURATION) ARCH=$(TARGET_ARCH) TARGET_VERSION_MIN=$(TARGET_VERSION_MIN) \
302-
PLATDIR=$(PLATDIR) PLUGINSRCDIR=$(PLUGINSRCDIR) VMSRCDIR=$(VMSRCDIR) \
306+
ARCH=$(TARGET_ARCH) TARGET_VERSION_MIN=$(TARGET_VERSION_MIN) \
307+
VMSRCDIR=$(VMSRCDIR) \
303308
LIBNAME=$(*F) COGDEFS="$(COGDEFS)" \
304-
APP=$(APP) VM=$(VM) BLDDIR=$(BLDDIR) \
305309
THIRDPARTYOUTDIR=$(THIRDPARTYOUTDIR) \
306310
CXXVERFLAGS="$(CXXVERFLAGS)" $(PLUGINHACK) \
307311
$(OBJDIR)/$(*F).bundle
@@ -314,12 +318,11 @@ $(OBJDIR)/%.dylib: FORCE
314318
rm -f $(BUILD)/vm/$(*F).ignore
315319
$(MAKE) $(MFLAGS) BUILD=$(BUILD) \
316320
-f $(call plugin-makefile,$(*F)) MAKEFILE=$(call plugin-makefile,$(*F)) \
317-
CONFIGURATION=$(CONFIGURATION) ARCH=$(TARGET_ARCH) \
318-
PLATDIR=$(PLATDIR) PLUGINSRCDIR=$(PLUGINSRCDIR) VMSRCDIR=$(VMSRCDIR) \
319-
LIBNAME=$(*F) COGDEFS="$(COGDEFS)" \
320-
APP=$(APP) VM=$(VM) BLDDIR=$(BLDDIR) USEPLUGINASDYLIB=TRUE \
321+
ARCH=$(TARGET_ARCH) TARGET_VERSION_MIN=$(TARGET_VERSION_MIN) \
322+
VMSRCDIR=$(VMSRCDIR) \
323+
LIBNAME=$(*F) USEPLUGINASDYLIB=TRUE COGDEFS="$(COGDEFS)" \
321324
THIRDPARTYOUTDIR=$(THIRDPARTYOUTDIR) \
322-
$(PLUGINHACK) \
325+
CXXVERFLAGS="$(CXXVERFLAGS)" $(PLUGINHACK) \
323326
$(OBJDIR)/$(*F).dylib
324327

325328
# It would be nice to have this abbreviation but it creates havoc eem 2/2016

build.macos64x64/common/Makefile.app

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ else # default CONFIGURATION=product => $(APPNAMEDEF).app
4646
APP:=$(APPNAMEDEF).app
4747
VM_IDENTIFIER:=$(APPIDENTIFIER)
4848
endif
49+
export APP
4950

5051
default: $(APP)
5152

build.macos64x64/common/Makefile.vm

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,20 @@
2222
# and its short name, e.g. Squeak or Newspeak, used to choose app icon files.
2323

2424
VM?=Squeak
25+
export VM
2526
SYSTEM?=$(VM)
2627

2728
# PLUGINSRCDIR defines the locaton of the plugin source, the subsets of which
2829
# selected by plugins.int and plugins.ext will be built.
2930

3031
PLUGINSRCDIR?=../../src/plugins
32+
export PLUGINSRCDIR
3133

3234
# CONFIGURATION defines what version of the VM to build, product, assert or
3335
# debug. The default is overridden in the mvm script
3436

3537
CONFIGURATION?=product
38+
export CONFIGURATION
3639

3740

3841
#############################################################################
@@ -53,9 +56,11 @@ else
5356
endif
5457
$(shell mkdir -p deps >/dev/null) # deps is the dependencies directory
5558
BLDDIR:= $(BUILD)
59+
export BLDDIR
5660
OBJDIR:= $(BLDDIR)/vm
5761

5862
PLATDIR:=../../platforms
63+
export PLATDIR
5964
CROSSDIR:=$(PLATDIR)/Cross/vm
6065
TPDIR:=$(PLATDIR)/Cross/third-party
6166
OSXDIR:=$(PLATDIR)/iOS/vm/OSX
@@ -274,8 +279,8 @@ $(OBJDIR)/%.lib: FORCE
274279
rm -f $(BUILD)/vm/$(*F).ignore
275280
$(MAKE) $(MFLAGS) BUILD=$(BUILD) \
276281
-f $(call plugin-makefile,$(*F)) MAKEFILE=$(call plugin-makefile,$(*F)) \
277-
CONFIGURATION=$(CONFIGURATION) ARCH=$(TARGET_ARCH) TARGET_VERSION_MIN=$(TARGET_VERSION_MIN) \
278-
PLATDIR=$(PLATDIR) PLUGINSRCDIR=$(PLUGINSRCDIR) VMSRCDIR=$(VMSRCDIR) \
282+
ARCH=$(TARGET_ARCH) TARGET_VERSION_MIN=$(TARGET_VERSION_MIN) \
283+
VMSRCDIR=$(VMSRCDIR) \
279284
LIBNAME=$(*F) COGDEFS="$(COGDEFS)" XDEFS=-DSQUEAK_BUILTIN_PLUGIN \
280285
CXXVERFLAGS="$(CXXVERFLAGS)" $(PLUGINHACK) \
281286
$(OBJDIR)/$(*F).lib
@@ -298,10 +303,9 @@ $(OBJDIR)/%.bundle: FORCE
298303
rm -f $(BUILD)/vm/$(*F).ignore
299304
$(MAKE) $(MFLAGS) BUILD=$(BUILD) \
300305
-f $(call plugin-makefile,$(*F)) MAKEFILE=$(call plugin-makefile,$(*F)) \
301-
CONFIGURATION=$(CONFIGURATION) ARCH=$(TARGET_ARCH) TARGET_VERSION_MIN=$(TARGET_VERSION_MIN) \
302-
PLATDIR=$(PLATDIR) PLUGINSRCDIR=$(PLUGINSRCDIR) VMSRCDIR=$(VMSRCDIR) \
306+
ARCH=$(TARGET_ARCH) TARGET_VERSION_MIN=$(TARGET_VERSION_MIN) \
307+
VMSRCDIR=$(VMSRCDIR) \
303308
LIBNAME=$(*F) COGDEFS="$(COGDEFS)" \
304-
APP=$(APP) VM=$(VM) BLDDIR=$(BLDDIR) \
305309
THIRDPARTYOUTDIR=$(THIRDPARTYOUTDIR) \
306310
CXXVERFLAGS="$(CXXVERFLAGS)" $(PLUGINHACK) \
307311
$(OBJDIR)/$(*F).bundle
@@ -314,12 +318,11 @@ $(OBJDIR)/%.dylib: FORCE
314318
rm -f $(BUILD)/vm/$(*F).ignore
315319
$(MAKE) $(MFLAGS) BUILD=$(BUILD) \
316320
-f $(call plugin-makefile,$(*F)) MAKEFILE=$(call plugin-makefile,$(*F)) \
317-
CONFIGURATION=$(CONFIGURATION) ARCH=$(TARGET_ARCH) \
318-
PLATDIR=$(PLATDIR) PLUGINSRCDIR=$(PLUGINSRCDIR) VMSRCDIR=$(VMSRCDIR) \
319-
LIBNAME=$(*F) COGDEFS="$(COGDEFS)" \
320-
APP=$(APP) VM=$(VM) BLDDIR=$(BLDDIR) USEPLUGINASDYLIB=TRUE \
321+
ARCH=$(TARGET_ARCH) TARGET_VERSION_MIN=$(TARGET_VERSION_MIN) \
322+
VMSRCDIR=$(VMSRCDIR) \
323+
LIBNAME=$(*F) USEPLUGINASDYLIB=TRUE COGDEFS="$(COGDEFS)" \
321324
THIRDPARTYOUTDIR=$(THIRDPARTYOUTDIR) \
322-
$(PLUGINHACK) \
325+
CXXVERFLAGS="$(CXXVERFLAGS)" $(PLUGINHACK) \
323326
$(OBJDIR)/$(*F).dylib
324327

325328
# It would be nice to have this abbreviation but it creates havoc eem 2/2016

0 commit comments

Comments
 (0)