diff --git a/rconfigure.py b/rconfigure.py index 1c52bdbb6..2741d9d56 100644 --- a/rconfigure.py +++ b/rconfigure.py @@ -113,7 +113,6 @@ def open_utf8(fpath, flags): with open_utf8(os.path.join('src', 'Makevars.in'), 'r') as f: text = f.read() -text = text.replace('{{ SOURCES }}', object_list) text = text.replace('{{ INCLUDES }}', include_list) if len(libraries) == 0: text = text.replace('PKG_LIBS={{ LINK_FLAGS }}', '') @@ -130,10 +129,15 @@ def open_utf8(fpath, flags): text = f.read() include_list += " -DDUCKDB_PLATFORM_RTOOLS=1" -text = text.replace('{{ SOURCES }}', object_list) text = text.replace('{{ INCLUDES }}', include_list) text = text.replace('{{ LINK_FLAGS }}', "-lws2_32") # now write it to the output Makevars with open_utf8(os.path.join('src', 'Makevars.win'), 'w+') as f: f.write(text) + +# write sources.mk +text = "SOURCES=" + object_list + '\n' + +with open_utf8(os.path.join('src', 'sources.mk'), 'w') as f: + f.write(text) diff --git a/src/Makevars.in b/src/Makevars.in index 9c727835b..fdfe0069d 100644 --- a/src/Makevars.in +++ b/src/Makevars.in @@ -1,4 +1,5 @@ +include sources.mk CXX_STD = CXX17 PKG_CPPFLAGS = -Iinclude -I../inst/include -DDUCKDB_DISABLE_PRINT -DDUCKDB_R_BUILD {{ INCLUDES }} -OBJECTS=database.o connection.o statement.o register.o relational.o scan.o transform.o utils.o reltoaltrep.o types.o cpp11.o {{ SOURCES }} +OBJECTS=database.o connection.o statement.o register.o relational.o scan.o transform.o utils.o reltoaltrep.o types.o cpp11.o $(SOURCES) PKG_LIBS={{ LINK_FLAGS }}