Export Makefile
Posted
by Joseph Dziedzic
on August 7th, 1998
Installing the macro:
- Create a file "ExportMakefile.dsm" using the code at the end of this article and copy to the \ProgramFiles\DevStudio\SharedIDE\Macros directory.
- Start Visual C++ (Developer Studio), select the Tools->Customize menu item, select the "Add-ins and Macro Files" tab, click the check box next to ExportMakefile, then click the Close pushbutton.
Using the macro:
Invoke the macro at a command line prompt via:
MSDEV [/nologo] project.DSP /Execute ExportMakefile
Then you can invoke the makefile via NMAKE /f project.MAK.
Note: If your project has already been opened by Developer Studio (i.e., if a .DSW file already exists in the same directory as the .DSP file), Developer Studio will display a dialog box that requires you to click on "OK". I haven't figured out if there's a way to suppress that dialog.
(Editors note: try renaming the DSW file before generating the MAK file then restoring it after the build.)
'--------------------------------------------------------------------------- 'FILE: ExportMakefile.dsm 'FILE DESCRIPTION: Exports a makefile from a project and exits Visual Studio '--------------------------------------------------------------------------- Sub ExportMakefile Application.Visible = False Application.ExecuteCommand "BuildProjectExport" Documents.SaveAll True Application.ExecuteCommand "WorkspaceClose" Application.Quit end Sub
Updated 21 March 1998

Comments
Export
Posted by janneman on 05/06/2005 12:28pmClose to what I'm looking for.
ReplyRenaming DSW-Files
Posted by Legacy on 07/16/2003 12:00amOriginally posted by: Thomas Fenske
Hi,
I use this macro with VS 6.0.
Problems occur if a dsw file exists.
Renaming to .dsw_ calling msdev und renaming back to .dsw seems not to work.
Reason: Calling 'msdev' starts msdev.com(!) which starts msdev.exe(!) then msdev.com ends and the batch job goes to the next statement which is renaming dsw_ to dsw.
Unfortunately this normally happens before VS is started and reads the dsp file. So it will find the dsw file and the brings the message box.
Therefor it is important to call
msdev.exe project.DSP /Execute ExportMakefile
to be sure the batch job waits until VS is closed.
Maybe this information saves someone an hour of searching.
Thomas
Replygo to next function as macro
Posted by Legacy on 07/07/2003 12:00amOriginally posted by: rajib
I tried recording a macro that'd go to next function.
So I ran the wizard bar and kept clicking on "Go To Next Function"
After clicking that menu 3 times I got the following.
ExecuteCommand "WBMembersActivate"
ExecuteCommand "WBMembersActivate"
ExecuteCommand "WBMembersActivate"
What I'd like to do is get the name of the function and it's parameters?
I tried something like
dim m
m = ActiveDocument.Selection
to get the details I wanted ... but nothing happened.
What am I doing wrong? Is there a good reference ExecuteCommand?
For the sake of simplicity I am staying away from regular expression at this time.
When I try to run the above I go nowhere...
Replycreating a makefile for visual .net project
Posted by Legacy on 05/30/2003 12:00amOriginally posted by: fabrizio
how do I create a makefile (a batch file of commands) to compile a project with visual studio .net? Moreover, I didn't find an easy way to compile resources file (is there a resources compiler available?).
Reply
Export Makefile
Posted by Legacy on 01/06/2002 12:00amOriginally posted by: Muthukumaran
I would like to know the purpose of this Export Makefile and where i can use this? I dont know even a single word about MSDEV:-) Thanks for your help
Best Regards
ReplyMuthukumaran
Export Makefile
Posted by Legacy on 03/22/2000 12:00amOriginally posted by: Mike Morley
Replyuse VC++ 6 MSDEV.EXE cmdline options without .MAK file
Posted by Legacy on 01/05/2000 12:00amOriginally posted by: Walter Lederer
There is an easy way to avoid .MAK files and problems with multiple projects in VC++ 6. See online help under "Building a Project from the Command Line". This does not require .MAK files.
Example command line for MSDEV.EXE:
%MSDevDir%\Bin\MSDEV.EXE x:\x\dz_ol.dsw /MAKE "dz_ol - Win32 Debug" /OUT x:\x\msdev_log.txt
ReplyHow to add this macro to Visual Studio 4.2
Posted by Legacy on 12/22/1999 12:00amOriginally posted by: unni
How can i add this macro to visual C++ ver. 4.2
ReplyMultiple Projects
Posted by Legacy on 04/21/1999 12:00amOriginally posted by: Narasimhan
Have multiple projects and then use this macro :-). A dialog box is thrown on attempting to export this macro when there are multiple projects, so this might pose problems.
Reply