mirror of
https://github.com/corda/corda.git
synced 2025-01-01 02:36:44 +00:00
fix build breakage due to makefile syntax confusion
Consider the following makefile construct: target: dep0 target: dep1 dep2 command -o $(@) $(^) With some versions of make, $(^) will expand to "dep1 dep2", but on others it will expand to "dep0 dep1 dep2". The commit ensures that we no longer rely on the former behavior (nor the latter, for that matter).
This commit is contained in:
parent
1f67aea456
commit
1ed03b9096
34
makefile
34
makefile
@ -649,23 +649,24 @@ $(classpath-object-dep): $(classpath-libraries)
|
||||
for x in $(classpath-libraries); do ar x $${x}; done)
|
||||
@touch $(@)
|
||||
|
||||
$(executable): $(classpath-object-dep)
|
||||
$(executable): \
|
||||
$(vm-objects) $(jni-objects) $(driver-object) $(vm-heapwalk-objects) \
|
||||
$(boot-object) $(vm-classpath-object)
|
||||
executable-objects = $(vm-objects) $(jni-objects) $(driver-object) \
|
||||
$(vm-heapwalk-objects) $(boot-object) $(vm-classpath-object)
|
||||
|
||||
$(executable): $(classpath-object-dep) $(executable-objects)
|
||||
@echo "linking $(@)"
|
||||
ifeq ($(platform),windows)
|
||||
ifdef msvc
|
||||
$(ld) $(lflags) $(^) -out:$(@) -PDB:$(@).pdb -IMPLIB:$(@).lib \
|
||||
-MANIFESTFILE:$(@).manifest
|
||||
$(ld) $(lflags) $(executable-objects) -out:$(@) -PDB:$(@).pdb \
|
||||
-IMPLIB:$(@).lib -MANIFESTFILE:$(@).manifest
|
||||
$(mt) -manifest $(@).manifest -outputresource:"$(@);1"
|
||||
else
|
||||
$(dlltool) -z $(@).def $(^) $(call classpath-objects)
|
||||
$(dlltool) -z $(@).def $(executable-objects) $(call classpath-objects)
|
||||
$(dlltool) -d $(@).def -e $(@).exp
|
||||
$(ld) $(@).exp $(^) $(call classpath-objects) $(lflags) -o $(@)
|
||||
$(ld) $(@).exp $(executable-objects) $(call classpath-objects) $(lflags) \
|
||||
-o $(@)
|
||||
endif
|
||||
else
|
||||
$(ld) $(^) $(call classpath-objects) $(rdynamic) $(lflags) \
|
||||
$(ld) $(executable-objects) $(call classpath-objects) $(rdynamic) $(lflags) \
|
||||
$(bootimage-lflags) -o $(@)
|
||||
endif
|
||||
$(strip) $(strip-all) $(@)
|
||||
@ -696,17 +697,18 @@ else
|
||||
$(ld) $(^) $(rdynamic) $(lflags) -o $(@)
|
||||
endif
|
||||
|
||||
$(dynamic-library): $(classpath-object-dep)
|
||||
$(dynamic-library): \
|
||||
$(vm-objects) $(dynamic-object) $(jni-objects) $(vm-heapwalk-objects) \
|
||||
$(boot-object) $(vm-classpath-object) $(classpath-libraries)
|
||||
dynamic-library-objects = $(vm-objects) $(dynamic-object) $(jni-objects) \
|
||||
$(vm-heapwalk-objects) $(boot-object) $(vm-classpath-object) \
|
||||
$(classpath-libraries)
|
||||
|
||||
$(dynamic-library): $(classpath-object-dep) $(dynamic-library-objects)
|
||||
@echo "linking $(@)"
|
||||
ifdef msvc
|
||||
$(ld) $(shared) $(lflags) $(^) -out:$(@) -PDB:$(@).pdb \
|
||||
-IMPLIB:$(build)/$(name).lib -MANIFESTFILE:$(@).manifest
|
||||
$(ld) $(shared) $(lflags) $(dynamic-library-objects) -out:$(@) \
|
||||
-PDB:$(@).pdb -IMPLIB:$(build)/$(name).lib -MANIFESTFILE:$(@).manifest
|
||||
$(mt) -manifest $(@).manifest -outputresource:"$(@);2"
|
||||
else
|
||||
$(ld) $(^) -Wl,--version-script=openjdk.ld \
|
||||
$(ld) $(dynamic-library-objects) -Wl,--version-script=openjdk.ld \
|
||||
$(call classpath-objects) $(shared) $(lflags) $(bootimage-lflags) -o $(@)
|
||||
endif
|
||||
$(strip) $(strip-all) $(@)
|
||||
|
Loading…
Reference in New Issue
Block a user