diff --git a/.hgignore b/.hgignore index 320ab928..71eab2df 100644 --- a/.hgignore +++ b/.hgignore @@ -24,6 +24,7 @@ syntax: regexp ^import/ ^bin/ldc2?$ ^bin/ldc2?\.conf$ +^bin/ldc2?\.rebuild\.conf$ ^idgen\.make$ ^impcnvgen\.make$ ^ldc\.make$ diff --git a/CMakeLists.txt b/CMakeLists.txt index 6532a0dc..452087fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -227,6 +227,7 @@ get_target_property(LDC_LOC ${LDC_EXE} LOCATION) install(TARGETS ${LDC_EXE} DESTINATION bin) install(FILES ${PROJECT_BINARY_DIR}/bin/${LDC_EXE}.conf DESTINATION ${CONF_INST_DIR}) +install(FILES ${PROJECT_BINARY_DIR}/bin/${LDC_EXE}.rebuild.conf DESTINATION ${CONF_INST_DIR}) install(DIRECTORY ${PROJECT_BINARY_DIR}/lib DESTINATION . USE_SOURCE_PERMISSIONS) add_subdirectory(runtime EXCLUDE_FROM_ALL) diff --git a/ldc-posix-tango b/ldc-posix-tango index fe7b5ea1..d5c67c40 100644 --- a/ldc-posix-tango +++ b/ldc-posix-tango @@ -1,7 +1,7 @@ ignore=object compiler=ldc -inifile=ldc.conf +inifile=ldc.rebuild.conf exeext= objext=o diff --git a/ldc.rebuild.conf.in b/ldc.rebuild.conf.in new file mode 100644 index 00000000..1905600c --- /dev/null +++ b/ldc.rebuild.conf.in @@ -0,0 +1,2 @@ +[Environment] +DFLAGS=-I@RUNTIME_DIR@ -I@RUNTIME_DIR@/lib/common -L-L%@P%/../lib -d-version=Tango -defaultlib=@RUNTIME_AIO@ -debuglib=@RUNTIME_AIO@ diff --git a/ldc2.conf.in b/ldc2.conf.in index 4e9fe969..000f2fac 100644 --- a/ldc2.conf.in +++ b/ldc2.conf.in @@ -1,2 +1,15 @@ -[Environment] -DFLAGS=-I@RUNTIME_DIR@/import -L-L%@P%/../lib +// This configuration file uses libconfig. +// See http://www.hyperrealm.com/libconfig/ for syntax details. + +// The default group is required +default: +{ + // 'switches' holds array of string that are appends to the command line + // arguments before they are parsed. + switches = [ + "-I@RUNTIME_DIR@/import", + "-L-L@PROJECT_BINARY_DIR@/../lib", + "-defaultlib=@RUNTIME_AIO@", + "-debuglib=@RUNTIME_AIO@" + ]; +}; diff --git a/ldc2.rebuild.conf.in b/ldc2.rebuild.conf.in new file mode 100644 index 00000000..dc91fbe3 --- /dev/null +++ b/ldc2.rebuild.conf.in @@ -0,0 +1,2 @@ +[Environment] +DFLAGS=-I@RUNTIME_DIR@/import -L-L%@P%/../lib -defaultlib=@RUNTIME_AIO@ -debuglib=@RUNTIME_AIO@ diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index 114ad007..2df10547 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -85,6 +85,7 @@ if(NOT LDC_LOC) endif(NOT LDC_LOC) configure_file(${PROJECT_PARENT_DIR}/${LDC_EXE}.conf.in ${PROJECT_BINARY_DIR}/../bin/${LDC_EXE}.conf) +configure_file(${PROJECT_PARENT_DIR}/${LDC_EXE}.rebuild.conf.in ${PROJECT_BINARY_DIR}/../bin/${LDC_EXE}.rebuild.conf) # patch runtime source, uses LDC_EXE for ldc2 if(D_VERSION EQUAL 2)