![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: How do I change the file name of a project's Makefile Topic Summary: Created On: 16-May-2005 23:51 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I have a Rhapsody project "X" and when I generate source code the Makefile for the project defaults to "X.mak". How can I change to something else? Like "Makefile"?
Thanks, - Francisco |
|
![]() |
|
![]() |
|
Just to add a little more information, I'm using Rhapsody in C++ 5.0.1 (build 467818).
|
|
![]() |
|
![]() |
|
The generated makefile name is derived from the active component name (e.g. if the component name is cmp then the makefile name is cmp<extension>
![]() So in order to create a makefile named "Makefile" for VxWorks in C++ you should: - Set the component name to "Makefile" - Set the CPP_CG:VxWorks:MakeExtension property to "" (if the property doesn't exist you can add it using COM-API/VBA or in the site.prp file). |
|
![]() |
|
![]() |
|
Hello All -
I think I've reached a solution based on your responses. I added/modified the following two properties under CPP_CG::<Environment>: Subject CPP_CG Metaclass MY_OS Property MakeFileName String "Makefile" Property MakeExtension String "." end end These changes allowed me to generate a makefile named "Makefile" without modifying anything else. I tried setting MakeExtension blank (i.e. an empty string "") but it didn't work, it was still appending ".mak" at the end. Thanks for all your help, - Francisco |
|
![]() |
|
![]() |
|
I tried your solution (thanks!) but found that the target name generated into the makefile was set the same as the makefile name. ie. the following line was generated into my makefile:
TARGET_NAME=<value of MakeFileName property> Did you find the same? If so, (and assuming this is not what you wanted) did you find a way around it? best regards, Simon PS. I'm intending to report this to I-Logix support. ------------------------- Simon Morrish simon.morrish@eu.panasonic.com http://panasonic.co.uk Panasonic ideas for life |
|
![]() |
|
![]() |
|
Here's another way to get what you want on a windows host.
Create a batch file, e.g. c:\rename_makefile.bat, with contents similar to this: --------------------- @echo off set my_app_gen_dir=C:\MyAppGenerationDir if exist %my_app_gen_dir%\MyApp.mak goto found goto end :found echo Found %my_app_gen_dir%\MyApp.mak echo Renaming to %my_app_gen_dir%\makefile move /Y %my_app_gen_dir%\MyApp.mak %my_app_gen_dir%\makefile echo Done. :end ---------------------- Then, for the component you are generating, set the CG::File::InvokePostProcessor property to "C:\rename_makefile.bat $file". When you regenerate your code, the .mak file will be renamed "makefile". The drawback to this solution is that the .bat file gets called for every file that is generated, but on a reasonably fast machine, the added generation time isn't even noticable. Hope this helps. |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.