ROS_BUILDNOSTRIP environment variable to control building of non-symbol-stripped...
authorCasper Hornstrup <chorns@users.sourceforge.net>
Sat, 23 Apr 2005 18:41:02 +0000 (18:41 +0000)
committerCasper Hornstrup <chorns@users.sourceforge.net>
Sat, 23 Apr 2005 18:41:02 +0000 (18:41 +0000)
svn path=/branches/xmlbuildsystem/; revision=14788

reactos/Makefile
reactos/tools/rbuild/backend/mingw/modulehandler.cpp
reactos/tools/rbuild/backend/mingw/modulehandler.h

index 509522d..a6bf8cc 100644 (file)
 #        without source code) or no (to not build any map files). The variable
 #        defaults to no.
 #
+#    ROS_BUILDNOSTRIP
+#        This variable controls if non-symbol-stripped versions are to be built
+#        of executable output files. Non-symbol-stripped executable output files
+#        have .nostrip added to the filename just before the extension. The value
+#        can be either yes (to build non-symbol-stripped versions of executable
+#        output files) or no (to not build non-symbol-stripped versions of
+#        executable output files). The variable defaults to no.
+#
 #    ROS_RBUILDFLAGS
 #        Pass parameters to rbuild.
 
index fe15b2e..d18cf9e 100644 (file)
@@ -1146,6 +1146,32 @@ MingwModuleHandler::GenerateBuildMapCode ()
                  "endif\n" );\r
 }\r
 \r
+void\r
+MingwModuleHandler::GenerateBuildNonSymbolStrippedCode ()\r
+{\r
+       fprintf ( fMakefile,\r
+                 "ifeq ($(ROS_BUILDNOSTRIP),yes)\n" );\r
+\r
+       string filename = module.GetPath ();\r
+       string outputFilename = PassThruCacheDirectory (\r
+               filename,\r
+               backend->outputDirectory );\r
+       string nostripFilename = PassThruCacheDirectory (\r
+               GetBasename ( filename ) + ".nostrip" + GetExtension ( filename ),\r
+               backend->outputDirectory );\r
+       CLEAN_FILE ( nostripFilename );\r
+       \r
+       fprintf ( fMakefile,\r
+                 "\t$(ECHO_CP)\n" );\r
+       fprintf ( fMakefile,\r
+                         "\t${cp} %s %s 1>$(NUL)\n",\r
+                         outputFilename.c_str (),\r
+                 nostripFilename.c_str () );\r
+       \r
+       fprintf ( fMakefile,\r
+                 "endif\n" );\r
+}\r
+\r
 void\r
 MergeStringVector ( const vector<string>& input,\r
                        vector<string>& output )\r
@@ -1289,6 +1315,8 @@ MingwModuleHandler::GenerateLinkerCommand (
 \r
        GenerateBuildMapCode ();\r
 \r
+       GenerateBuildNonSymbolStrippedCode ();\r
+\r
        fprintf ( fMakefile,\r
                  "\t$(ECHO_RSYM)\n" );\r
        fprintf ( fMakefile,\r
index e6fcb9a..8b63e48 100644 (file)
@@ -169,6 +169,7 @@ private:
        std::string GetDefinitionFilename () const;\r
        static std::string RemoveVariables ( std::string path);\r
        void GenerateBuildMapCode ();\r
+       void GenerateBuildNonSymbolStrippedCode ();\r
 public:\r
        const Module& module;\r
        string_list clean_files;\r