@@ -27,6 +27,8 @@ rule SharedLibrary
2727# Then turn those .o files into a single .so file
2828SharedLibraryFromObjects $(<) : $(>:S=$(SUFOBJ)) ;
2929# Remove .o file after .so is made
30+ # NOTE: commenting this line out allows rebuilds to skip compiling .cpp
31+ # files that haven't been changed.
3032RmTemps $(<) : $(>:S=$(SUFOBJ)) ;
3133}
3234
@@ -37,17 +39,15 @@ actions SoftLink
3739$(RM) $(<) && $(LN) -sr $(>) $(<)
3840}
3941
40-
41- ruleCreateSymlinks
42+ # Create multiple symlinks to a single file
43+ ruleSymlink
4244{
43- # Create all the symlinks to Be.so
44- for sourceFile in $(sourceFiles) {
45- # replace sourceFile's suffix (aka file extension) with .so
46- libFile = $(sourceFile:S=.so) ;
45+ for targetFile in $(<) {
46+ # Put target file into LOCATE_TARGET directory
47+ MakeLocate $(targetFile) : $(LOCATE_TARGET) ;
4748
48- # $(libFile) can be made by symlinking to Be.so
49- SoftLink $(<)/$(libFile) : Be.so ;
50- }
49+ SoftLink $(targetFile) : $(>) ;
50+ }
5151}
5252
5353## Main build file
@@ -107,6 +107,9 @@ local sourceFiles =
107107# The shared library Be.so can be built from the sourceFiles
108108SharedLibrary Be.so : $(sourceFiles) ;
109109
110+ # The symlinked libraries can be built by linking to Be.so
111+ Symlink $(sourceFiles:S=.so) : Be.so ;
110112
111-
112- InstallLib /boot/system/lib/python$(py) : $(LOCATE_TARGET) ;
113+ # As part of `jam install`, copy the following files:
114+ InstallLib /boot/system/non-packaged/lib/python$(py)/site-packages/haiku-pyapi
115+ : $(sourceFiles:S=.so) Be.so ;