ace-6.4.5+dfsg.orig/0000775000175000017500000000000013157240624012266 5ustar tggtggace-6.4.5+dfsg.orig/contrib/0000775000175000017500000000000013157240624013726 5ustar tggtggace-6.4.5+dfsg.orig/contrib/FaCE/0000775000175000017500000000000013157240624014464 5ustar tggtggace-6.4.5+dfsg.orig/contrib/FaCE/CE_ARGV.h0000644000175000017500000000402013154167357015745 0ustar tggtgg// -*- C++ -*- //============================================================================= /** * @file CE_ARGV.h * * @author Si Mong Park */ //============================================================================= #ifndef CE_ARGV_H #define CE_ARGV_H #include #include /** * @class CE_ARGV * * @brief This class is to hash input parameters, argc and argv, for WinCE platform. * * Since WinCE only supports wchar_t as an input from OS, some implementation detail, * especially for CORBA spec, will not support wchar_t (wchar_t) type parameter. * Moreover, WinCE's input parameter type is totally different than any other OS; * all command line parameters will be stored in a single wide-character string with * each unit parameter divided by blank space, and it does not provide the name of * executable (generally known as argv[0]). * This class is to convert CE's command line parameters and simulate as in the same * manner as other general platforms, adding 'root' as a first argc, which is for the * name of executable in other OS. */ class CE_ARGV { public: /** * Ctor accepts CE command line as a parameter. */ CE_ARGV(wchar_t* cmdLine); /** * Default Dtor that deletes any memory allocated for the converted string. */ ~CE_ARGV(void); /** * Returns the number of command line parameters, same as argc on Unix. */ int argc(void); /** * Returns the 'char**' that contains the converted command line parameters. */ wchar_t** argv(void); private: /** * Copy Ctor is not allowed. */ CE_ARGV(void); /** * Copy Ctor is not allowed. */ CE_ARGV(CE_ARGV&); /** * Pointer of converted command line parameters. */ wchar_t** ce_argv_; /** * Integer that is same as argc on other OS's. */ int ce_argc_; }; inline int CE_ARGV::argc() { return ce_argc_; } inline wchar_t** CE_ARGV::argv() { return ce_argv_; } #endif // CE_ARGV_H ace-6.4.5+dfsg.orig/contrib/FaCE/FaCE.rc0000644000175000017500000001461013154167357015560 0ustar tggtgg//Microsoft Developer Studio generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "newres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDI_FACE ICON DISCARDABLE "FACE.ico" #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE DISCARDABLE BEGIN "resource.h\0" END 2 TEXTINCLUDE DISCARDABLE BEGIN "#include ""newres.h""\r\n" "\0" END 3 TEXTINCLUDE DISCARDABLE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Data // IDM_MENU SHMENUBAR MOVEABLE PURE BEGIN IDM_MENU, 2, I_IMAGENONE, ID_SETTING, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_CAP_SETTING, 0, 0, I_IMAGENONE, IDM_MAIN_COMMAND1, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_HELP, 0, 1, END ///////////////////////////////////////////////////////////////////////////// // // Menubar // IDM_MENU MENU DISCARDABLE BEGIN POPUP "Setting" BEGIN MENUITEM "Command Line", ID_SETTING_COMMANDLINE MENUITEM "Run", ID_SETTING_RUN MENUITEM SEPARATOR MENUITEM "Exit", ID_SETTING_EXIT END POPUP "Tools" BEGIN MENUITEM "About", IDM_HELP_ABOUT MENUITEM "Save To File", ID_TOOLS_SAVETOFILE END END ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 148, 161 STYLE WS_POPUP | WS_CAPTION EXSTYLE 0x80000000L CAPTION "About FACE" FONT 8, "System" BEGIN CONTROL 113,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,33,6, 69,52 CTEXT "Static",IDC_COPYRIGHT,7,86,128,68 CONTROL 114,IDC_TAO,"Static",SS_BITMAP,7,61,134,22 END IDD_CMDLINE DIALOG DISCARDABLE 0, 0, 125, 50 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Command Line" FONT 8, "System" BEGIN DEFPUSHBUTTON "OK",IDOK,7,29,50,14 PUSHBUTTON "Cancel",IDCANCEL,68,29,50,14 COMBOBOX IDC_CMDEDIT,7,7,111,80,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_OEMCONVERT | CBS_SORT | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP END IDD_OUTFILE DIALOG DISCARDABLE 0, 0, 127, 49 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Output File Name" FONT 8, "System" BEGIN DEFPUSHBUTTON "OK",IDOK,7,28,50,14 PUSHBUTTON "Cancel",IDCANCEL,70,28,50,14 EDITTEXT IDC_SAVEFILE,7,7,113,14,ES_AUTOHSCROLL END IDD_ERRFILE DIALOG DISCARDABLE 0, 0, 124, 49 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "ERROR" FONT 8, "System" BEGIN DEFPUSHBUTTON "OK",IDOK,37,28,50,14 CTEXT "File Creation Error!",IDC_ERRFILE,13,7,98,17, SS_CENTERIMAGE END IDD_FILEEXIST DIALOG DISCARDABLE 0, 0, 114, 90 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "File Exists" FONT 8, "System" BEGIN DEFPUSHBUTTON "Overwrite",IDOVERWRITE,32,32,50,14 PUSHBUTTON "Cancel",IDCANCEL,32,68,50,14 PUSHBUTTON "Append",IDC_APPEND,32,50,50,14 CTEXT "File already exists!",IDC_STATIC,7,15,100,11 END ///////////////////////////////////////////////////////////////////////////// // // Accelerator // IDC_FACE ACCELERATORS DISCARDABLE BEGIN "A", IDM_HELP_ABOUT, VIRTKEY, CONTROL, NOINVERT "Q", IDOK, VIRTKEY, CONTROL, NOINVERT END ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO DISCARDABLE BEGIN IDD_ABOUTBOX, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 141 TOPMARGIN, 6 BOTTOMMARGIN, 154 END IDD_CMDLINE, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 118 TOPMARGIN, 7 BOTTOMMARGIN, 43 END IDD_OUTFILE, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 120 TOPMARGIN, 7 BOTTOMMARGIN, 42 END IDD_ERRFILE, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 117 TOPMARGIN, 7 BOTTOMMARGIN, 42 END IDD_FILEEXIST, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 107 TOPMARGIN, 7 BOTTOMMARGIN, 82 END END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Bitmap // IDB_ACERACER BITMAP DISCARDABLE "ACE_Racer.bmp" IDB_TAO BITMAP DISCARDABLE "TAO.bmp" ///////////////////////////////////////////////////////////////////////////// // // String Table // STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "FaCE" IDC_FACE "FaCE" END STRINGTABLE DISCARDABLE BEGIN IDS_HELP "Tools" END STRINGTABLE DISCARDABLE BEGIN IDS_COMMAND1 "Done " END STRINGTABLE DISCARDABLE BEGIN IDS_CAP_SETTING "Setting" END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED ace-6.4.5+dfsg.orig/contrib/FaCE/FaCE.h0000644000175000017500000000247313154167357015407 0ustar tggtgg// -*- C++ -*- //============================================================================= /** * @file FaCE.h * * @author Si Mong Park */ //============================================================================= #if !defined(AFX_FACE_H__1043241E_A6A9_4246_A9E4_7A774E19EE73__INCLUDED_) #define AFX_FACE_H__1043241E_A6A9_4246_A9E4_7A774E19EE73__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #if (_WIN32_WCE <= 211) #error This project can not be built for H/PC Pro 2.11 or earlier platforms. #endif #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers ////// // BEGIN FaCE specific preprocessor #ifdef NO_ACE #include #include "CE_Screen_Output.h" #define ACE_TCHAR wchar_t #define ACE_TEXT(STRING) L##STRING #define ACE_CE_Screen_Output CE_Screen_Output int main_i(int, wchar_t**); #else #include int ace_main_i(int, ACE_TCHAR**); #endif // NO_ACE // END FaCE specific ////// #include "resource.h" #define MENU_HEIGHT 26 #define MAX_LOADSTRING 101 #define MAX_COMMAND_LINE 1001 // Max number of characters + 1 (null at the end) for user-input argv extern ACE_CE_Screen_Output cout; // Replacement of std::cout #endif // !defined(AFX_FACE_H__1043241E_A6A9_4246_A9E4_7A774E19EE73__INCLUDED_) ace-6.4.5+dfsg.orig/contrib/FaCE/resource.h0000644000175000017500000000315313154167357016474 0ustar tggtgg//{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. // Used by FaCE.rc // #define IDS_APP_TITLE 1 #define IDC_FACE 3 #define IDI_FACE 101 #define IDM_MENU 102 #define IDD_ABOUTBOX 103 #define IDS_HELP 104 #define IDD_CMDLINE 104 #define IDD_OUTFILE 105 #define IDD_ERRFILE 107 #define IDD_FILEEXIST 109 #define IDB_ACERACER 113 #define IDB_TAO 114 #define IDS_COMMAND1 301 #define IDC_CMDEDIT 1001 #define IDC_SAVEFILE 1002 #define IDC_ERRFILE 1003 #define IDOVERWRITE 1004 #define IDC_APPEND 1005 #define IDC_COPYRIGHT 1007 #define IDC_TAO 1008 #define IDM_MAIN_COMMAND1 40001 #define IDM_HELP_ABOUT 40003 #define ID_SETTING 40004 #define IDS_CAP_SETTING 40006 #define ID_SETTING_COMMANDLINE 40007 #define ID_SETTING_RUN 40008 #define ID_SETTING_EXIT 40011 #define ID_TOOLS_SAVETOFILE 40012 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 116 #define _APS_NEXT_COMMAND_VALUE 40013 #define _APS_NEXT_CONTROL_VALUE 1009 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif ace-6.4.5+dfsg.orig/contrib/FaCE/CE_Screen_Output.cpp0000644000175000017500000000603213154167357020345 0ustar tggtgg#include "CE_Screen_Output.h" #include // This utility does not use ACE, and shouldn't. //FUZZ: disable check_for_lack_ACE_OS HWND CE_Screen_Output::handler_ = 0; CE_Screen_Output::CE_Screen_Output() : pFile_(0) { } CE_Screen_Output::~CE_Screen_Output() { if (pFile_ != 0) { fclose(pFile_); } } void CE_Screen_Output::SetOutputWindow(HWND hEdit) { handler_ = hEdit; } void CE_Screen_Output::clear() { SetWindowText(handler_, 0); } CE_Screen_Output& CE_Screen_Output::operator << (wchar_t* output) { int length = GetWindowTextLength(handler_); SendMessage(handler_, EM_SETSEL, length, length); SendMessage(handler_, EM_REPLACESEL, 0, (LPARAM)output); if (pFile_ != 0) { fwprintf(pFile_, L"%s", output); } return *this; } CE_Screen_Output& CE_Screen_Output::operator << (const wchar_t* output) { wchar_t* buffer = _wcsdup(output); if (buffer != 0) { *this << buffer; delete buffer; } return *this; } CE_Screen_Output& CE_Screen_Output::operator << (char* output) { int len = MultiByteToWideChar(CP_OEMCP, MB_PRECOMPOSED, output, -1, 0, 0); wchar_t* w_output = new wchar_t[len]; MultiByteToWideChar(CP_OEMCP, MB_PRECOMPOSED, output, -1, w_output, len); *this << w_output; delete w_output; return *this; } CE_Screen_Output& CE_Screen_Output::operator << (const char* output) { int len = MultiByteToWideChar(CP_OEMCP, MB_PRECOMPOSED, output, -1, 0, 0); wchar_t* w_output = new wchar_t[len]; MultiByteToWideChar(CP_OEMCP, MB_PRECOMPOSED, output, -1, w_output, len); *this << w_output; delete w_output; return *this; } CE_Screen_Output& CE_Screen_Output::operator << (char output) { *this << (int)output; return *this; } CE_Screen_Output& CE_Screen_Output::operator << (unsigned char output) { *this << (int)output; return *this; } CE_Screen_Output& CE_Screen_Output::operator << (unsigned short output) { wchar_t buffer[20]; wsprintf(buffer, L"%u", output); *this << buffer; return *this; } CE_Screen_Output& CE_Screen_Output::operator << (int output) { wchar_t buffer[20]; wsprintf(buffer, L"%d", output); *this << buffer; return *this; } CE_Screen_Output& CE_Screen_Output::operator << (unsigned int output) { wchar_t buffer[20]; wsprintf(buffer, L"%du", output); *this << buffer; return *this; } CE_Screen_Output& CE_Screen_Output::operator << (float output) { wchar_t buffer[20]; swprintf(buffer, L"%f", output); *this << buffer; return *this; } CE_Screen_Output& CE_Screen_Output::operator << (long output) { wchar_t buffer[20]; wsprintf(buffer, L"%l", output); *this << buffer; return *this; } CE_Screen_Output& CE_Screen_Output::operator << (unsigned long output) { wchar_t buffer[20]; wsprintf(buffer, L"%lu", output); *this << buffer; return *this; } CE_Screen_Output& CE_Screen_Output::operator << (FILE* pFile) { pFile_ = pFile; return *this; } //FUZZ: enable check_for_lack_ACE_OS ace-6.4.5+dfsg.orig/contrib/FaCE/ACE.ico0000644000175000017500000000206613154167357015562 0ustar tggtgg &(( @Lwwwwwwwwwwwwp~wwwxwwwwwwLwq@ qww~wwwwpwwwwwL~yq@ qwwwwwp~wwwLwwwwwp qwww~Lwwwww|@ wwxww~Lw|@ qwwww~L|@ L@ ????( |wwgwwpxwwwNq|~pqwNww|y@|pN|@p?ace-6.4.5+dfsg.orig/contrib/FaCE/README0000644000175000017500000002710613154167357015360 0ustar tggtgg=== === FaCE (Front-end for ACE CE) === === Object Computing, Inc. === St. Louis, Missouri === Copyright (C) 2002. All rights reserved. === === V1.01, March 30th, 2002 === == What's FaCE? FaCE is a simple front-end framework for testing and debugging non-Windows CE applications on the Pocket PC 2002 platform. Originally, FaCE was developed to test ACE and TAO components internally in Object Computing, Inc. However, since it has shown dramatic increase of productivity in a lot shorter amount of time, it has been prepared as a package for all programmers who want to test and run existing codes (non-WinCE native codes) on Pocket PC 2002 and WinCE 3.0. The features of FaCE are: 1. command line parameter support 2. command line history support (never type in same command line again) 3. output displayed on the windows screen 4. output to file (with append and overwrite support) 5. does not use MFC 6. almost no modification to existing user code 7. easy to enable and disable after install * Default project files only contain Pocket PC 2002 platform configuration. A new configuration can be added for other WinCE 3.0 platform from eVC. == Package Contents Files contained in FaCE package are: Main Framework Files for both ACE users and non-ACE users - ACE_Racer.bmp - FaCE.h & cpp - FaCE.ico - FaCE.rc - newres.h - resource.h - TAO.bmp ACE entry point definition file - FaCE_OS.h Additional Framework files for non-ACE users - CE_ARGV.h & cpp - CE_Screen_Output.h & cpp Files for loading skeleton FaCE from eVC - FaCE.vcp & vcw : FaCE Project files for ACE users - FaCENOACE.vcp & vcw : FaCE Project files for non-ACE users - Main.cpp : almost empty entry point function Misc. Files - ACE.ico : a bonus icon of ACE logo - License.txt : license and warranty information - ReadMe.txt : this document == Requirement - Microsoft(C) eMbedded Visual Studio/C++ (eVC) 3.0 - Pocket PC 2002 SDK ** For ACE-users only: - ACE+TAO installed and configured for WinCE build only for ACE-users - ace and ace_os libraries built for WinCE and loaded on machine == Important Note It has been reported that certain Pocket PC 2002 machines with ARM processor can be totally dead and will not even respond to the hard reset. While the real cause of this problem is unknown, HP has released a patch for this problem. We have tested it, and it seems working fine on our machine (HP Jornada 568), which is our 5th machine that has been running fine for the longest time. As this has been identified by hardware manufacturer and can be fixed as HP did, Object Computing, Inc. (OCI) or any member of ACE+TAO community cannot be responsible for this problem. If this problem happens during debugging, contact your hardware manufacturer for fix or replacement. It has found that almost all Pocket PC 2002 machines regardless of manufacturers have same problem. Also, Phil Mesnier at OCI has found that virtual function calls under certain situation can cause a problem that randomly changes parameter and pointer values over function calls. This is due to the incorrect instructions generated by eVC for ARM processor. So far, no solution or patch has been released by compiler vendor, although vendor is aware of this problem. Since Pocket PC 2002 is based on WinCE 3.0, ACE+TAO as well as FaCE should be able to run on any WinCE 3.0 platform by adding a new configuration with minimal change. == Installation & Setup 1. Create a subdirectory named 'FaCE' (or anything in your taste) under your current project directory. 2. Copy FaCE_OS.h to the ACE_ROOT/ace directory, and add following line at the end of your ACE_ROOT/ace/config.h file: #include "FaCE_OS.h" 3. Copy main framework files listed above and add them into "your" project (NOT FaCE.vcw/vcp). For non-ACE users, copy additional framework files for non-ACE users in addition to the main framework files. It would be a good idea to create a new folder in your project and put all FaCE files into it. This way, it will be easy to disable FaCE by setting the folder excluded from the build on the folder property option. ** IMPORTANT! ** FaCE does NOT use MFC. Thus, if your project is already set for 'Not using MFC', then do not change the setting. * Note: Make sure those files are not shared by multiple executables. Each project must have its own copy of those files. It is a good idea to create a separate folder on your project and put FaCE related files into that folder. In that case, if you want to disable FaCE and run by using normal 'main', then you can simply set the whole FaCE folder excluded from build in the project setting menu. 4. Change your 'main()' function part similar to the following example. #ifdef ACE_HAS_WINCE #include "FaCE/FaCE.h" // use the name of subdirectory you created int FaCE_MAIN (int argc, ACE_TCHAR *argv[]) #else int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) // ACE normal entry point #endif Change the directory name for "FaCE/FaCE.h" if necessary. For non-ACE users, use 'UNDER_CE' instead of 'ACE_HAS_WINCE'. == Possible Additional Change Above change will be the only change if your program compiles and links fine under eVC. It does not mean that your program is WinCE-ready but just means that your program does not include the libraries that are not supported by WinCE, such as iostream. For ACE users, good examples will be the ACE test programs under $ACE_ROOT/test. For non-ACE users, I highly recommend to create a project for WinCE first if it has not already been done and write your code using wmain. Try compile and link your program without FaCE to check your program does not include any libraries not supported by WinCE. FaCE supports text output by aliasing 'cout' in FaCE.h; however, it is NOT a real iostream but an alias for CE_Screen_Output class. You may need to use '#ifdef UNDER_CE' for your iostream includes, if you want to share the code among different platforms. Also, it is important to match the parameter types for 'wmain' function. For WinCE, it MUST be in the format of: int FaCE_MAIN (int, wchar_t**) and you can leave your original wmain type as it was for non-CE platform definition. 5. Go to 'ResourceView' or double-click on the 'FaCE.rc'. Open 'String Table -> String Table' from the resource browse view, and change the string value (caption) defined for 'IDS_APP_TITLE' from 'FaCE' to your program name. This will help identifying multiple FaCE-fied applications when you browse them through system memory -> running programs in case of crash. 6. That's it! ** Optionally, you can personalize the icons defined for FaCE for your own. To do this easily, load "FaCE.vcw" (requires ACE library) or "FaCENOACE.vcw" from eVC. Also, FaCENOACE.vcw can be used as 'hello world'-type starting frame-work for non-WinCE programmers. ** Non-ACE users may see the warning messages saying, "Could not find the file xxx", for ace.h, Log_Msg.h, OS.h, and CE_Screen_Output.h. This is due to the eVC's not-so-perfect precompilation file checking and totally harmless. ** Later if you don't want to use FaCE anymore, simply restore your original main function and remove FaCE files from your project (or exclude FaCE files from build). ACE library does not have to be rebuilt as FaCE_OS.h only contains macro. == Running FaCE 1. Command line option User can specify the command line option for the program by using 'Settings -> Command Line' from the FaCE menu. FaCE will automatically save all user-entered command line parameters as a ASCII format file named 'Parameters.txt' in the root directory of WinCE device/emulator. User can edit and change by opening this file from any text editor and save as a ASCII text file with DOS standard CR/LF combo. This will greatly save time especially when you are working on the Pocket PC machine that does not have keyboard. Remember NOT to convert file format to Unicode; it must be standard DOS ASCII text file. 2. Output Saving You can save output to file by selecting 'Tools -> Save To File'. By default, FaCE will not create/save any file. Also, any output received before setting up this feature will not be saved. If the file with specified name exists, FaCE will ask whether you want to append to the end of file or erase and overwrite. All output files will be saved in the root directory of the system. 3. Running Your Program 'Setting -> Run' will execute your program. Two tags, 'START' and 'END' indicate the beginning and end of your code. For ACE users, any log message sent to ACE message log (ACE_DEBUG, for example) will be displayed on the screen. Also, if you have setup to save to file, the same contents will be saved to the file as well. Note that the output will NOT have ACE internal tags (i.e. Dec 04 14:51:12.000 2001@LM_DEBUG@) because FaCE uses callback message function, and ACE does not pass those tags along with the output message. For non-ACE users, you can declare your own local copy of CE_Screen_Output object. For example, you can declare CE_Screen_Output object in your cpp file like: CE_Screen_Output cout; and use it like, int a = 100; wchar_t* strTemp = L"Hello, world!"; cout << L"String : " << strTemp << L"a = " << a << endl; Remember, CE_Screen_Output is just a simple text output function and does not have the full capabilities of iostream, which is not available for WinCE 3.0. 4. In case of crash If you have started your code, but the code crashes, which can be easily identified by looking for the 'END' tag, then you can use Windows CE's memory program to kill the process (Start -> Settings -> System tag -> Memory -> Running Programs tag). If you have changed IDS_APP_TITLE in the resource viewer, then you will see the name you have specified; otherwise, FaCE will be listed. You can select the name and stop the process by clicking 'Stop' button. Sometimes, you may need to reset the machine if you cannot access memory program. == Note - This FaCE framework does not use any MFC; it only uses general Win32 API, thus, your project setting does not have to be changed. - FaCE is for the 'legacy' Unix/DOS style console applications that do not use any Win32 and MFC for Windows OS. Programs that are already using native Windows/WinCE API's will not need FaCE framework. - If you run your application from FaCE (Settings -> Run), 'START' and 'END' will appear at the beginning and end of output messages from your application. If you see 'END' lable after execution, you can run your program again without exit and start up FaCE again. - Make sure to terminate FaCE by selecting 'Settings -> Exit'. It will completely terminate FaCE session; Clicking on the 'X' button at the top-left corner of the screen will not, just like most WinCE programs. - FaCE_MAIN is only for the WinCE port of ACE, ensuring proper windows system message filtering along with proper registraion so that user can see the process from memory setting and task switcher applications. - ACE and FaCE do not overrides native WinMain. If you are developing for Windows OS only, your WinMain should be just safe from any overrides. In this case, of course, you don't need to use FaCE package. == Question or Comment If you have question and/or comment specific to the FaCE, please contact Si Park at spark@ociweb.com or Justin Michel at michel_j@ociweb.com. For general ACE+TAO support, please refer to comp.soft-sys.ace or contact Object Computing, Inc. at http://www.ociweb.com. ace-6.4.5+dfsg.orig/contrib/FaCE/FACE.ico0000644000175000017500000000206613154167357015670 0ustar tggtgg &(( @wwwwwwwwwwwwwwwwwwwwwwwwwwwwDDDDDDDDD@DDDDDDDDDGpwpDDDDDDDDDGpwpDDDDDDDDDDDDDDwwwwwwwwwwwwww(  뻻 뺫  ?!ace-6.4.5+dfsg.orig/contrib/FaCE/License.txt0000644000175000017500000000241513154167357016617 0ustar tggtgg== == Copyright and Licensing Information == == ACE(tm) and TAO(tm) are copyrighted by Dr. Douglas C. Schmidt and the Center for Distributed Object Computing ('DOC' group) at Washington University, Copyright (C) 1993 - 2002, all rights reserved. Since ACE and TAO are open source, free software, you are free to use, modify, and distribute the ACE and TAO source code and object code produced from the source, as long as you include this copyright statement along with code built using ACE and TAO. Please refer to ACE and TAO documentations for detailed copyright and license information on ACE and TAO. FaCE is an additional front-end shell package designed for ACE and TAO testing work for Pocket PC 2002 platform, created and released by Object Computing, Inc. (OCI) and distributed with ACE and TAO under the same licensing terms. You can modify and change the source of FaCE for your own use as long as you provide attribution to OCI by including its copyright statement in your distributions of source and object code. OCI welcomes submissions of improvements to the FaCE code base. FaCE is copyrighted by Object Computing, Inc., St. Louis Missouri, Copyright (C) 2002, all rights reserved. == == Warranty Information == FaCE is provided 'as is' without warranties of any kind. ace-6.4.5+dfsg.orig/contrib/FaCE/Main.cpp0000644000175000017500000000212213154167357016057 0ustar tggtgg// ************************************************ // ** This file is NOT to be used for framework. ** // ************************************************ // This file defines the entry point for Windows CE, which is defined in OS.h for real applications. #include "FaCE.h" extern BOOL InitInstance (HINSTANCE, int); extern void InitSetup(); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, ACE_TCHAR*, int nCmdShow) { MSG msg; HACCEL hAccelTable; if (!InitInstance (hInstance, nCmdShow)) return FALSE; hAccelTable = LoadAccelerators(hInstance, (const ACE_TCHAR*)IDC_FACE); InitSetup(); while (GetMessage(&msg, 0, 0, 0)) { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return msg.wParam; } #ifdef NO_ACE int main_i(int, ACE_TCHAR**) { // this function will be replaced by user's main_ce function return 0; } #else int ace_main_i(int, ACE_TCHAR**) { // this function will be replaced by user's main_ce function return 0; } #endif // NO_ACE ace-6.4.5+dfsg.orig/contrib/FaCE/FaCE.cpp0000644000175000017500000004435413154167357015746 0ustar tggtgg#include "FaCE.h" #ifdef NO_ACE #include "CE_ARGV.h" #else #include #include #include #endif // NO_ACE #include #include #include // This utility does not use ACE, and shouldn't. //FUZZ: disable check_for_lack_ACE_OS const ACE_TCHAR* g_ParameterFileName = ACE_TEXT("Parameters.txt"); /** * This simple and small class manages user-input command line * parameters and parameter history file. * * @author Si Mong Park (spark@ociweb.com) * @version $Revision$ $Date$ */ class ParameterList { public: /** * Default Ctor. */ ParameterList() : next_(0), param_(0) {}; /** * Dtor: deletes all sub-PameterList objects as well as * memory block allocated for the param_ by _wcsdup(). */ ~ParameterList() { free(param_); delete next_; }; /** * Add a new parameter to the list. */ void addParameter(char*); /** * Add a new parameter to the list. */ void addParameter(ACE_TCHAR*); /** * Save all parameters stored in the list to the * file. * Note that 'outputFile' is only for the internal use * and user must call this function without any parameter. */ void saveParameter(FILE* outputFile = 0); /** * Send out windows message to load/update parameters. */ void sendParameterMSG(HWND, UINT); private: /** * A pointer to the next ParameterList object. * This attribute is totally hidden from user. */ ParameterList* next_; /** * User-specified command line parameter. * This attribute is totally hidden from user. */ ACE_TCHAR* param_; }; void ParameterList::addParameter(char* newParameter) { #ifdef NO_ACE int len = MultiByteToWideChar(CP_OEMCP, MB_PRECOMPOSED, newParameter, -1, 0, 0); wchar_t* w_output = new wchar_t[len]; MultiByteToWideChar(CP_OEMCP, MB_PRECOMPOSED, newParameter, -1, w_output, len); this->addParameter(w_output); delete w_output; #else this->addParameter(ACE_TEXT_CHAR_TO_TCHAR(newParameter)); #endif // NO_ACE } void ParameterList::addParameter(ACE_TCHAR* newParameter) { if (this->param_ == 0) { this->param_ = _wcsdup(newParameter); this->next_ = new ParameterList(); // create and add a new ParameterList object } else { if (wcscmp(this->param_, newParameter) != 0) { this->next_->addParameter(newParameter); } } } void ParameterList::saveParameter(FILE* outputFile) { if ( (outputFile == 0) && (this->param_ != 0) ) { outputFile = _wfopen(g_ParameterFileName, ACE_TEXT("w+")); } if (outputFile != 0) { if (this->param_ != 0) { fwprintf(outputFile, ACE_TEXT("%s\n"), this->param_); this->next_->saveParameter(outputFile); } else { fclose(outputFile); } } } void ParameterList::sendParameterMSG(HWND hDlg, UINT message) { if (param_ != 0) { SendDlgItemMessage(hDlg, IDC_CMDEDIT, message, 0, (LPARAM)this->param_); this->next_->sendParameterMSG(hDlg, message); } } // Global Variables: HINSTANCE g_hInst; // The current instance HWND g_hwndCB; // The command bar handle HWND hWndEdit; // Read only edit box for output display FILE* g_OutputFile; // File handler for output save ParameterList g_Parameter; // command line parameter list ACE_CE_Screen_Output cout; // Replacement of std::cout ACE_TCHAR g_CommandLine[MAX_COMMAND_LINE]; // User-specified command line parameter ACE_TCHAR g_SaveFileName[MAX_LOADSTRING]; // Name of the output file static SHACTIVATEINFO s_sai; // Forward declarations of functions included in this code module: ATOM MyRegisterClass (HINSTANCE, ACE_TCHAR*); BOOL InitInstance (HINSTANCE, int); LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK About (HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK CommandLine (HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK SaveFileName (HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK FileError (HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK FileExist (HWND, UINT, WPARAM, LPARAM); HWND CreateRpCommandBar(HWND); void InitSetup() { g_OutputFile = 0; memset(g_CommandLine, 0, MAX_COMMAND_LINE * sizeof(ACE_TCHAR)); memset(g_SaveFileName, 0, MAX_LOADSTRING * sizeof(ACE_TCHAR)); } void LoadParameterHistory() { FILE* parameterFile = _wfopen(g_ParameterFileName, ACE_TEXT("r")); if (parameterFile != 0) { while (feof(parameterFile) == 0) { // Note: Remember that fwprintf takes wide-character format specifier but // save string as ASCII. Thus, history must be read as ASCII then converted // to wide-character (Unicode on WinCE). char singleParameter[MAX_COMMAND_LINE]; int size = 0; fread(&singleParameter[size], sizeof(char), 1, parameterFile); // WinCE does not have function that reads upto the end of line. while (singleParameter[size] != '\n') { fread(&singleParameter[++size], sizeof(char), 1, parameterFile); } if (size > 0) { singleParameter[size] = 0; // NULL terminator g_Parameter.addParameter(singleParameter); } } fclose(parameterFile); } } // // FUNCTION: MyRegisterClass() // // PURPOSE: Registers the window class. // // COMMENTS: // // It is important to call this function so that the application // will get 'well formed' small icons associated with it. // ATOM MyRegisterClass(HINSTANCE hInstance, ACE_TCHAR* szWindowClass) { WNDCLASS wc; wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = (WNDPROC) WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_FACE)); wc.hCursor = 0; wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wc.lpszMenuName = 0; wc.lpszClassName = szWindowClass; return RegisterClass(&wc); } // // FUNCTION: InitInstance(HANDLE, int) // // PURPOSE: Saves instance handle and creates main window // // COMMENTS: // // In this function, we save the instance handle in a global variable and // create and display the main program window. // BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) { HWND hWnd = 0; ACE_TCHAR szTitle[MAX_LOADSTRING]; // The title bar text ACE_TCHAR szWindowClass[MAX_LOADSTRING]; // The window class name g_hInst = hInstance; // Store instance handle in our global variable // Initialize global strings LoadString(hInstance, IDC_FACE, szWindowClass, MAX_LOADSTRING); LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); //If it is already running, then focus on the window hWnd = FindWindow(szWindowClass, szTitle); if (hWnd) { // set focus to foremost child window // The "| 0x01" is used to bring any owned windows to the foreground and // activate them. SetForegroundWindow((HWND)((ULONG) hWnd | 0x00000001)); return 0; } MyRegisterClass(hInstance, szWindowClass); RECT rect; GetClientRect(hWnd, &rect); hWnd = CreateWindow(szWindowClass, szTitle, WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, hInstance, 0); if (!hWnd) { int error = 0; error = GetLastError(); return FALSE; } //When the main window is created using CW_USEDEFAULT the height of the menubar (if one // is created is not taken into account). So we resize the window after creating it // if a menubar is present { RECT rc; GetWindowRect(hWnd, &rc); rc.bottom -= MENU_HEIGHT; if (g_hwndCB) MoveWindow(hWnd, rc.left, rc.top, rc.right, rc.bottom, FALSE); } ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); return TRUE; } // // FUNCTION: WndProc(HWND, unsigned, WORD, LONG) // // PURPOSE: Processes messages for the main window. // // WM_COMMAND - process the application menu // WM_PAINT - Paint the main window // WM_DESTROY - post a quit message and return // LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc; int wmId, wmEvent, nCmdHt; PAINTSTRUCT ps; RECT textRect; switch (message) { case WM_COMMAND: wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); // Parse the menu selections: switch (wmId) { case IDM_HELP_ABOUT: DialogBox(g_hInst, (const ACE_TCHAR*)IDD_ABOUTBOX, hWnd, (DLGPROC)About); break; case IDOK: SendMessage(hWnd, WM_ACTIVATE, MAKEWPARAM(WA_INACTIVE, 0), (LPARAM)hWnd); SendMessage(hWnd, WM_CLOSE, 0, 0); break; case ID_SETTING_RUN: { #ifdef NO_ACE cout << ACE_TEXT("START with command line: ") << g_CommandLine << endl; CE_ARGV ce_argv(g_CommandLine); main_i(ce_argv.argc(), ce_argv.argv()); cout << ACE_TEXT("END") << endl << endl; #else cout << ACE_TEXT("START with command line: ") << g_CommandLine << endl; ACE_ARGV ce_argv(g_CommandLine); ACE::init(); ACE_LOG_MSG->msg_callback(&cout); // register call back ACE_LOG_MSG->set_flags(ACE_Log_Msg::MSG_CALLBACK); // set call back flag ace_main_i(ce_argv.argc(), ce_argv.argv()); ACE::fini(); cout << ACE_TEXT("END") << endl << endl; #endif // NO_ACE } break; case ID_SETTING_EXIT: SendMessage(hWnd, WM_DESTROY, 0, 0); break; case ID_TOOLS_SAVETOFILE: // create a dialog box to get the file name DialogBox(g_hInst, (const ACE_TCHAR*)IDD_OUTFILE, hWnd, (DLGPROC)SaveFileName); break; case ID_SETTING_COMMANDLINE: // create a dialog box to get the command line DialogBox(g_hInst, (const ACE_TCHAR*)IDD_CMDLINE, hWnd, (DLGPROC)CommandLine); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } break; case WM_CREATE: SHMENUBARINFO mbi; memset(&mbi, 0, sizeof(SHMENUBARINFO)); mbi.cbSize = sizeof(SHMENUBARINFO); mbi.hwndParent = hWnd; mbi.nToolBarId = IDM_MENU; mbi.hInstRes = g_hInst; mbi.nBmpId = 0; mbi.cBmpImages = 0; if (!SHCreateMenuBar(&mbi)) return 0; g_hwndCB = mbi.hwndMB; // Initialize the shell activate info structure memset (&s_sai, 0, sizeof (s_sai)); s_sai.cbSize = sizeof (s_sai); GetClientRect(hWnd, &textRect); nCmdHt = CommandBar_Height(mbi.hwndMB); hWndEdit = CreateWindow(ACE_TEXT("EDIT"), 0, WS_CHILD | WS_VISIBLE | ES_READONLY | ES_MULTILINE | WS_VSCROLL | WS_HSCROLL, 0, 0, textRect.right, textRect.bottom - MENU_HEIGHT, hWnd, 0, g_hInst, 0); cout.SetOutputWindow(hWndEdit); LoadParameterHistory(); break; case WM_PAINT: RECT rt; hdc = BeginPaint(hWnd, &ps); GetClientRect(hWnd, &rt); EndPaint(hWnd, &ps); break; case WM_ACTIVATE: // Notify shell of our activate message SHHandleWMActivate(hWnd, wParam, lParam, &s_sai, FALSE); break; case WM_SETTINGCHANGE: SHHandleWMSettingChange(hWnd, wParam, lParam, &s_sai); break; case WM_HIBERNATE: // low power case WM_CLOSE: case WM_DESTROY: g_Parameter.saveParameter(); // save parameters to history file CommandBar_Destroy(g_hwndCB); PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return 0; } HWND CreateRpCommandBar(HWND hwnd) { SHMENUBARINFO mbi; memset(&mbi, 0, sizeof(SHMENUBARINFO)); mbi.cbSize = sizeof(SHMENUBARINFO); mbi.hwndParent = hwnd; mbi.nToolBarId = IDM_MENU; mbi.hInstRes = g_hInst; mbi.nBmpId = 0; mbi.cBmpImages = 0; if (!SHCreateMenuBar(&mbi)) return 0; return mbi.hwndMB; } // Mesage handler for the About box. LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM) { SHINITDLGINFO shidi; const ACE_TCHAR* copyrightNote = ACE_TEXT("ACE and TAO are copyrighted by Dr. Douglas C. Schmidt and Center for Distributed Object") \ ACE_TEXT("Computing at Washington University, 1993-2002, all rights reserved.") \ ACE_TEXT("FaCE is copyrighted by Object Computing, Inc., 2002,\n all rights reserved.\n") \ ACE_TEXT("See License.txt for more information."); switch (message) { case WM_INITDIALOG: // Create a Done button and size it. shidi.dwMask = SHIDIM_FLAGS; shidi.dwFlags = SHIDIF_DONEBUTTON | SHIDIF_SIPDOWN | SHIDIF_SIZEDLGFULLSCREEN; shidi.hDlg = hDlg; SHInitDialog(&shidi); SetDlgItemText(hDlg, IDC_COPYRIGHT, copyrightNote); return TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK) { EndDialog(hDlg, LOWORD(wParam)); return TRUE; } break; } return FALSE; } LRESULT CALLBACK CommandLine(HWND hDlg, UINT message, WPARAM wParam, LPARAM) { int wmId; int wmEvent; switch (message) { case WM_INITDIALOG: g_Parameter.sendParameterMSG(hDlg, CB_INSERTSTRING); SetDlgItemText(hDlg, IDC_CMDEDIT, g_CommandLine); // pass existing command line for display return TRUE; case WM_COMMAND: wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); // Parse the menu selections: switch (wmId) { case IDOK: // new command line accepted GetDlgItemText(hDlg, IDC_CMDEDIT, g_CommandLine, MAX_COMMAND_LINE - 1); EndDialog(hDlg, wmId); g_Parameter.addParameter(g_CommandLine); return TRUE; case IDCANCEL: EndDialog(hDlg, wmId); return TRUE; default: return FALSE; } break; default: return FALSE; } return FALSE; } LRESULT CALLBACK SaveFileName(HWND hDlg, UINT message, WPARAM wParam, LPARAM) { int wmId; int wmEvent; ACE_TCHAR tempBuffer[MAX_LOADSTRING]; ACE_TCHAR fileMode[3] = { 0, '+', 0 }; // mode will either be "a+" or "w+" FILE* tempFile; switch (message) { case WM_INITDIALOG: SetDlgItemText(hDlg, IDC_SAVEFILE, g_SaveFileName); return TRUE; case WM_COMMAND: wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); // Parse the menu selections: switch (wmId) { case IDOK: GetDlgItemText(hDlg, IDC_SAVEFILE, tempBuffer, MAX_LOADSTRING - 1); EndDialog(hDlg, wmId); tempFile = _wfopen(tempBuffer, ACE_TEXT("r")); if (tempFile != 0) // if file exists { fclose(tempFile); // close temp handler int choice = DialogBox(g_hInst, (const ACE_TCHAR*)IDD_FILEEXIST, hDlg, (DLGPROC)FileExist); switch (choice) { case IDOVERWRITE: // overwrite existing file fileMode[0] = 'w'; break; case IDC_APPEND: // append to existing file fileMode[0] = 'a'; break; case IDCANCEL: // cancel operation without changing g_OutputFile return TRUE; } } else // if file does not exist { fileMode[0] = 'w'; } tempFile = _wfopen(tempBuffer, fileMode); if (tempFile == 0) { DialogBox(g_hInst, (const ACE_TCHAR*)IDD_ERRFILE, hDlg, (DLGPROC)FileError); } else { wcscpy(g_SaveFileName, tempBuffer); if (g_OutputFile != 0) { fclose(g_OutputFile); // close any open file } g_OutputFile = tempFile; cout << g_OutputFile; // update FILE* for the CE_Screen_Output class object. } return TRUE; case IDCANCEL: EndDialog(hDlg, wmId); return TRUE; default: return FALSE; } break; default: return FALSE; } return FALSE; } LRESULT CALLBACK FileError(HWND hDlg, UINT message, WPARAM wParam, LPARAM) { switch (message) { case WM_INITDIALOG: return TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK) { EndDialog(hDlg, LOWORD(wParam)); return TRUE; } break; } return FALSE; } LRESULT CALLBACK FileExist(HWND hDlg, UINT message, WPARAM wParam, LPARAM) { switch (message) { case WM_INITDIALOG: return TRUE; case WM_COMMAND: EndDialog(hDlg, LOWORD(wParam)); return TRUE; default: return FALSE; } return FALSE; } //FUZZ: enable check_for_lack_ACE_OS ace-6.4.5+dfsg.orig/contrib/FaCE/CE_Screen_Output.h0000644000175000017500000000452313154167357020015 0ustar tggtgg/** * @file CE_Screen_Output.h * * @author Si Mong Park */ //============================================================================= #ifndef CE_Screen_Output_h #define CE_Screen_Output_h #include #include const wchar_t endl[] = L"\r\n"; const wchar_t tab[] = L"\t"; /** * @class CE_Screen_Output * * @brief Replacement of text output for Windows CE. * * This class allows standard text output to be displayed on * text window for Windows CE. Generally, all ACE output will * go through under CE if and only if user uses WindozeCE * implementation by using main_ce instead of main. * Also, for the easier debugging purpose, object pointer of * this class can be gotten from ACE_Log_Msg::msg_callback() * and then can be used directly by user just like cout stream. */ class CE_Screen_Output { public: /** * Default Ctor */ CE_Screen_Output(); /** * Default Dtor */ virtual ~CE_Screen_Output(); /** * Interface to specify active window handle. */ void SetOutputWindow(HWND hWnd); /** * Clears text screen. */ void clear(); /** * << operator that performs actual print out. * * Note: This is the only one operator that performs * output. All other perators convert the type and * use this operator underneath. */ CE_Screen_Output& operator << (wchar_t*); CE_Screen_Output& operator << (const wchar_t*); CE_Screen_Output& operator << (char* output); CE_Screen_Output& operator << (const char* output); CE_Screen_Output& operator << (char output); CE_Screen_Output& operator << (unsigned char output); CE_Screen_Output& operator << (unsigned short output); CE_Screen_Output& operator << (int output); CE_Screen_Output& operator << (unsigned int output); CE_Screen_Output& operator << (float output); CE_Screen_Output& operator << (long output); CE_Screen_Output& operator << (unsigned long output); CE_Screen_Output& operator << (FILE* pFile); private: /** * Copy Ctor */ CE_Screen_Output(CE_Screen_Output&); static HWND handler_; /** * File pointer that used to save output to file. * This class does not own the file handler pointer. */ FILE* pFile_; }; #endif // CE_Screen_Output_h ace-6.4.5+dfsg.orig/contrib/FaCE/FaCE.mpc0000644000175000017500000000042213154167357015727 0ustar tggtgg// -*- MPC -*- project: aceexe { exename = FaCE // This is just a dummy_label to prevent the example from being compiled // in MPC builds requires += dummy_label requires += wince lit_libs += aygshell commctrl Source_Files { FaCE.cpp Main.cpp } } ace-6.4.5+dfsg.orig/contrib/FaCE/FaCE_OS.h0000644000175000017500000000206113154167357016001 0ustar tggtgg// -*- C++ -*- //============================================================================= /** * @file FaCE_OS.h * * @author Si Mong Park */ //============================================================================= #ifndef FaCE_OS_h #define FaCE_OS_h // This definition is for the "int FaCE_MAIN(int, wchar_t**)" using FaCE. # define FaCE_MAIN \ ace_main_i (int, ACE_TCHAR**); \ extern BOOL InitInstance (HINSTANCE, int); \ extern void InitSetup(); \ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, ACE_TCHAR* lpCmdLine, int nCmdShow) \ { \ MSG msg; \ HACCEL hAccelTable; \ if (!InitInstance (hInstance, nCmdShow)) return FALSE; \ hAccelTable = LoadAccelerators(hInstance, (const ACE_TCHAR*)IDC_FACE); \ InitSetup(); \ while (GetMessage(&msg, 0, 0, 0)) { \ if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { \ TranslateMessage(&msg); \ DispatchMessage(&msg); \ } \ } \ return msg.wParam; \ } \ int ace_main_i #endif // FaCE_OS_h ace-6.4.5+dfsg.orig/contrib/FaCE/newres.h0000644000175000017500000000174613154167357016156 0ustar tggtgg#ifndef __NEWRES_H__ #define __NEWRES_H__ #if !defined(UNDER_CE) #define UNDER_CE _WIN32_WCE #endif #if defined(_WIN32_WCE) #if !defined(WCEOLE_ENABLE_DIALOGEX) #define DIALOGEX DIALOG DISCARDABLE #endif #include #define SHMENUBAR RCDATA #if defined(WIN32_PLATFORM_PSPC) && (_WIN32_WCE >= 300) #include #define AFXCE_IDR_SCRATCH_SHMENU 28700 #else #define I_IMAGENONE (-2) #define NOMENU 0xFFFF #define IDS_SHNEW 1 #define IDM_SHAREDNEW 10 #define IDM_SHAREDNEWDEFAULT 11 #endif // _WIN32_WCE_PSPC #define AFXCE_IDD_SAVEMODIFIEDDLG 28701 #endif // _WIN32_WCE #ifdef RC_INVOKED #ifndef _INC_WINDOWS #define _INC_WINDOWS #include "winuser.h" // extract from windows header #include "winver.h" #include "windows.h" #endif #endif #ifdef IDC_STATIC #undef IDC_STATIC #endif #define IDC_STATIC (-1) #endif //__NEWRES_H__ ace-6.4.5+dfsg.orig/contrib/FaCE/CE_ARGV.cpp0000644000175000017500000000716313154167357016313 0ustar tggtgg#include "CE_ARGV.h" CE_ARGV::CE_ARGV(wchar_t* cmdLine) : ce_argv_(0) , ce_argc_(0) { const wchar_t* dummyArgv = L"root"; // dummy for the first argv const wchar_t* separator = L" "; // blank space is a separator int formattedCmdLineLength = wcslen(dummyArgv) + wcslen(separator) + 1; // 1 is for the NULL at the end if (wcslen(cmdLine) > 0) { formattedCmdLineLength += wcslen(cmdLine); formattedCmdLineLength += wcslen(separator); } // formattedCmdLine will have dummyArgv and a separator at the beginning of cmdLine // and a separator at the end to generalize format and reduce the amount of code wchar_t* formattedCmdLine = 0; formattedCmdLine = new wchar_t[formattedCmdLineLength]; wcscpy(formattedCmdLine, dummyArgv); wcscat(formattedCmdLine, separator); int max_possible_argc = 1; // start with 1 because of the dummyArgv at the beginning if (wcslen(cmdLine) > 0) { int formattedPos = wcslen(formattedCmdLine); int cmdLineLength = wcslen(cmdLine); // Inside of this for loop, it does same thing as strcat except it // checks and puts only one single white space between two argv entries. for (int i = 0; i < cmdLineLength; ++i) { if (iswspace(cmdLine[i]) != 0) { ++max_possible_argc; // counting the number of white spaces } formattedCmdLine[formattedPos++] = cmdLine[i]; if (iswspace(cmdLine[i]) != 0) { // make sure there is only one white space between two argv entries. while ((i < cmdLineLength) && (iswspace(cmdLine[i + 1]) != 0)) { ++i; } } } formattedCmdLine[formattedPos] = 0; wcscat(formattedCmdLine, separator); // make sure formattedCmdLine ends with a blank } int formattedCmdLength = wcslen(formattedCmdLine); bool insideQuotation = false; int* argv_strlen = 0; int entry_size = 0; argv_strlen = new int[max_possible_argc]; // determine argc for (int i = 0; i < formattedCmdLength; ++i) { if (formattedCmdLine[i] == '\\') { ++i; // ignore the following character ++entry_size; } else if (formattedCmdLine[i] == '"') { insideQuotation = !insideQuotation; } else if ((!insideQuotation) && (iswspace(formattedCmdLine[i]) != 0)) { // new argv entry end found argv_strlen[ce_argc_++] = entry_size; // cache the size of this entry entry_size = 0; } else { ++entry_size; } } ce_argv_ = new wchar_t*[ce_argc_ + 1]; ce_argv_[ce_argc_] = 0; // Last command line entry is a NULL. for (int j = 0, cmdLinePos = 0; j < ce_argc_; ++j, ++cmdLinePos) { int length = argv_strlen[j]; ce_argv_[j] = new wchar_t[length + 1]; ce_argv_[j][length] = 0; // string termination null if (iswspace(formattedCmdLine[cmdLinePos]) != 0) { // This is where prior argv has trailing '"' at the end. ++cmdLinePos; } for (int n = 0; n < length; ++n, ++cmdLinePos) { if ((formattedCmdLine[cmdLinePos] == '\\') || (formattedCmdLine[cmdLinePos] == '"')) { ++cmdLinePos; } ce_argv_[j][n] = formattedCmdLine[cmdLinePos]; } } delete argv_strlen; delete formattedCmdLine; } CE_ARGV::~CE_ARGV(void) { for (int i = 0; i < ce_argc_; ++i) { delete [] ce_argv_[i]; } delete [] ce_argv_; } ace-6.4.5+dfsg.orig/contrib/FaCE/TAO.bmp0000644000175000017500000005244613154167357015630 0ustar tggtggBM&U6($T荍NPQ}}}FFF늊LNO񷷵GGGkkl~~___TTT|||㤤̓ᰰ۷瞞߯ծ湹䟟巵ᘘᮮΩϨ鲲NNNkkkxxyuvw眜ÇNMO癘뱱ͬ衢թȑ===xutᚚsst||}Ŕjjj\\\ٹۡ졡ܡӵ뮮壢WXZ[[[̐Û顡᭭Βvwx[\^...|||ôࢢߨĐ᷷NMNmmmGGGzzzXXWqqqmmm\\[\\[kjn.-3QOQQQTppo}}}HHHsrr___opu\\]ooozzwTUU{z{IHIghi/.2BBBRQRDDD777NNOzzzBBB878..3?>D{{{DDD XXXwwwaaaEEEPPPFFJZYYjih}}}```hihRSR>>>DDD444yyyNNN@@@;;;MMMrrrJJJʗwwweee{{{kkkJJJooolll~}~SSSlkj++.|||sssQQQmmm@@@:;=}}}ijj~abbUUU225cccNNNlkjOON```[[[qqq768edhegiKMM555SSPeffqqqbbb,,,~~~cce888ҸBBBddeiijiig0/0򼼼<<<===cccddauuu888VTVXXVyzy>>>FGGttqggg779˹PQQvvv555>>>USUYYY???ڬǡ444knpTRUMMMhgjoooppp444ퟟ<<=@@A|||HHHUUUbbbVUZQQSmmm|}CCEךBBBGGGiiibbbmmmedcCDE>>>VVV443㤤[[[ssspppghi.//opqyyy@?@ګ555EEE񴴳]]]IIISSSwyzfgh]]]:::gggGFFEEE>=?bbbNPQ555YYXqrpXXYʮ000iii===GGFqqoWWXߪ---888>>>IJISSS`_^$$$GGGooo}}y::8UUU\]^000uvt?>C[[[UUUCCC¿JJJjkl >>>[Z[iii|}HHIHHH;;;ggglmnPOPHJKxxxOOOMML%%%pppSSSeeeonqRQTdcd&&&FFGljmCCCfgh-,2EDGwww>?@KKKUUUNNNddd___}}~AAB<<>>AAA889RRRIII000ppnPPPRRPz{|!!!kjk---EDHPPP222ֳڛ`__[\]xxxhfh[Y[\\\]]]߃kjjZ[[pprvvvccc```_^\׏USUdddUUU؊Ş\\\RRRɧ>>>[[[}}}mmm555mmmܜ~sssffedd_пgggrtwZ[\|~bcdcbdʹ[[[[Z[CACrrrZYZދ^]^KKK@@@MMM===kkkqqqeeeHHHVVVaddhggyx|``_rsu׳^^^^^\}}{DDDұuuu[Z\mlnxxxlllMOP\[\ppp֒sspcaczyzyxz0/0]]Z߀popfff܍ZZZghkllheegvvvUUUߎ[[[kkk}}}@?@qoqKKKkkkَ===TTT>>>```iiiKKKܫuurՎKJKDFGdddAA@mooXYZKKK׆888𫫩[^_pppHHHtttDCIrswzzzƊ^^_뤤pop㶶ֱxyvuwtܹjlnηƺ垞kkkᱱv_v_w_fttbvbmĸp^p^q`~hbDW5Z6bFltcwbwbpxbxbn^ꢌ{baEW4V2_@oVyǿouaxbxbxbxbxbxbxbxbxbxbxbxbxbyb靆y\cEU7S4Z=oSnĴzs_w_q_~ho_wbr`~r_xbxbxbxbxbxbxbxbxbxb~dwɩǾ1 ),6hF%(+ },)$lRqB#..'%,.@%lA",+- oǹP.*'- ]G90///.,1 F*{fóL)*,,,,,,,,,,,,,-X1[B4,,,,,-4> gP_A&,p\%'(-rR),,,,,,,,,,18 9L2gE".35}'0*v\ƶ;/+W8n0*-,@C!,-,-rYm23/O,õF!0'K"H-(/32,,,/0,) V8˿lG5333,,,,,,,,,,)==%-23.,,32,*:qf43%Z9s["30S6˿- 3330,,,,,,32-,1 [;ŶW;.33i.2,_BO*-.F5+*<uɺ時C($) rN',36~^>0 _?X=)13,6 `:tS^8:+0/*T0c6335S0Y3X0X0X0X0X0X0X0X0V0[9ĵ;)03/; ]5uSkIC1.1+0 ~f?31C;/25 o6338KX0X0X0X0X0W/C5+/1)_=hK)1+eCB,'C+kK-./hK#.2 I&L'iG%30H!~70~b,.3,M'gI,02-mL> 33< ²kH%20*\:t<*21-vE/3(p+ 31H#J+15 ib>./2)o3 13M&Z5',7v-3-gD#&+X6[C 23HdAeEdCdCdCdCfEcCG 32&z\=*32K~a- 015}E 030: 334lHS7+2-.̿U0/3&lP&322c`<*32oLfJ,2$V5;/3; wX%/-q4 2(bEó8(-Y64*3,%%#####$,3+0 ?*3*]=''"L2Q4/3'lz(30D"F&+2(\8tP33+gA|310I%˿}a&3/Y<3-%;G&-3- --*nU˽H"-&F+4(3: K%N+M*M*M*M*N*O*O*L*ru\&1334/,,,,043&9̾8.1:÷H4T8dElhI03*mItQ-32gDv/ /3/o53-FĶR000+p/31M'5.%8Z8*2.~aõ:--X5]>)*6ȼ8'30. 0////. +) bCĸG$+3/GmHnJmImIkGZ0: 1%F)4.-O'̿j0 14S,c?,20z^ȼO2,2'mJ?237ŶgF22'dE703AmP.1"L-sY+1(_>K"*3>v[+0+~M.$11lKϝ̜̟͛σh<--eCy3 1+O);-&_A3.-T.//2:˼ɺɺɺɺɺɺɺɺɺfC,20{_f/ 0/GI).33f>basVP/413,kĵE+36jHԪ֩֩֩֨՗}cD7 1-- yy/ 1'I&lJ+33|[3 0&nSt[#++jĻA)'*dC\:.10 x4*({Z6 .-G ; 033L [0Y/Y/Y/Y/Y/Y/Y/X/Q/mxW-24sQ;033X?-3330/*'+133BO+kNiE'336 =>====7 -16Fh71/:s-33A;,'M*1 ),O(Ȼ4,+rS;0*Bu.)){9+16 R/,333333333332-V4t*34a8ƹP)231 qR.232($$$$&''000<ss#332,))))*013DȸD%+1*233.=}2 .,=ȸoQ*2,_>ķôX9+22eJ-2%x\w]))- ŶA)3-eJ%23/!)+ ,/E#\<-21rr1 038pOh‚dddqQ`?>&32+6$33322 111/##/; [=U6*1" xcD.32&- eCouW9.3(P-˾S0,2*>nKnLA"+23Y/=.11ɽbC)-=fF-32dAo$ 23Av\{ňvÈvÈvÈvÈvÈvÈvÈvÉvH#*14 p^@+21r2-36|_,32)Z<6 ,39zY۽޺ݺݷ۝oR5-)* v~c.2+[9ZA(3< a:?  !+1,%vʾd?4 +(""&22I!vZ-1&nJG+')Q+{+/3= 3)1DuT*3.N/ŸV-331 ~ʾF,.3, p63.6X9$33j;-%,, 3/A&ôp[&26 ówTC$434<|awV3:434?iIóH).3=ǽB$*)cCB#+33fBeE_?rRh:)16110-{b>03. a<*20yZP$3.)oX!3+eGiL13tY50.3v,.+sUǸ䫗՞Τ츤ۤҟϣѺk- 10eA~?,,qSw^/13,*'"' yQ*&1- ghG+3-8qT120=˻rY&14Y:Z23.)x|)1+P.uX43^@M)*14 r8**Z5S2039L ;07lO1*2(6|X=+2*H,ŷwW)20fAƹE.3.Cxj703*tQx-12D#ʻB3.+6*,8P/03 cGҖ˗ʗʗʑvJ/35Y.wɚ̗ʗʗʕI-)0D233333@@*2)4 b?uƧҪՒxZ6-3/( f'33Gd͗ʗʗʗʗʗʗʗʔɾ<+1-7c>zɩէԕye?7/3,>Ⱥ9-39 wTΘ̗ʗʗʗ~^L%33,?H'(10mJ͘˗~ʗʗ̈jU.11/ rU/2 6 6 6 6 633346 7 6 6 6 0_>*-/^?(3333GE"*-/05 :;5 032)S8/ 1347 7 6 6 6 6 6 6 6 6 / qWB '/026 ::7 313*6D&)34776 6 6 6 6 803.(sWaB(3347 6 6 6 6 511/F&ɾgI"&))),,,,+)))))$jv]#"m+(,,)I!cD)%&,000-(*[=@%,,+))))))))) C Ǹ]@/ ''/0010(&C!Y9!,,+)))))),+%*^Aǹ}c(,*)))))*)%(G):=@@@@@@@@@@@@@@uT@#;6yYxX7@@?kM]@=/'#(8 M.wlH7@@@@@@@@@@@@<>bCB4%%'2 H(v_ùo:=@@@@@@@@>J$]=x<:@@@@@@?AN*`@uͿͿͿͿͿͿͿͿͿͿͿͿͿͿͿͿ̾ʽ̾ͿͿͿ豝ؠϙ̧ʼͿͿͿͿͿͿͿͿͿͿͿͿ;ʽ鳣٠ϠϤҺ̿;ͿͿͿͿͿͿͿͿ˽ͿͿͿͿͿͿͿace-6.4.5+dfsg.orig/contrib/FaCE/FaCENOACE.mpc0000644000175000017500000000034213154167357016476 0ustar tggtgg// -*- MPC -*- project: vc_warnings { exename = FaCENOACE requires += wince macros += NO_ACE lit_libs += aygshell commctrl Source_Files { FaCE.cpp Main.cpp CE_ARGV.cpp CE_Screen_Output.cpp } } ace-6.4.5+dfsg.orig/contrib/FaCE/ACE_Racer.bmp0000644000175000017500000002327613154167357016710 0ustar tggtggBM&6(gU"{{ltQsi{JkrdZT[LRD\R;JCȼ:Bž9ŵõŽILCK|{zuqz:mxjsiyo~aycue{{{{[tf8|ndtWsuyuRk[sssplqQiZkK0nfJ`IjDaMaR]RfAfff`[bA[Jc<,eub;Z@ZI\`bUGWA\:TBZESBZ2ZZZN?U0S1P;L;OAL:W*K/P)I+RRRK={P#&P]J@40::::9D2+U30)33330&N)"-0'(#:)))%%%!!!,)  001$" 06SVTTTSN9$"DLTTTK$ETSSSSTTTF06STTTSSSST9 DTSSSSSSSVTN+ ESTSSSSSSVP00TTSSSSSSSTTP0CSVTSSSSSVFPVSSSSSSSSSVS0 9SVTSSSSTTCCTSSSSSSSSSSVP"0LTTSSSSVT9+PTSSSSSSSSSTTC$FSTSSSSTK6ETSSSSSSSSSSTP9+CLTTSSSTP6$LVSSSSSSSSSST0STTTE6"+FSVSSSTS99STSSSSSSSSSVDSTSSSTTTPE6DLTTSSTSEFTTSSSSSSSSVC $VVSSSSSSSSTTTLE0"CSTTTTTL4"LTTSSSSSSSTN$CLLTTTSSSSSSSSTTVPF0$ELTTTTSC"$PTSSSSSSSTN $9LLTTTTSSSSSSSTTTPFD$1CSVTTTL9"FTSSSSSSVE / 4CFSSTTTSSSSSSSSVSFE4$ELTVVVL9+LTSSSSSVD4CFPPTTTTSSSSSTTTPE9$  6LLYYYKEESSSSSSSV+/b$0EEPSVVTTTTTTTVTNN9$+ELTVVTSSSSSSSSff "4CFFLSTTTTTTTTTLEE0$ $DPTTTTSSSTPmh/"49EEFPPTVVVVVTSEE6$4DFSSSSV0Zh޹m@  $09EFFLSSVVVVSSFFCCPSSSSSz@"+0DEEFFHHHKSVVFO!zz/ $4mՌ@/mbOʀ!ވ@Omb mm]mr͹z z!brrZ@ @zZbb/ @Zh m /@OOZz O @@r Մrfrh}r! hzz͛bZz/!QOm]@zOӵQZ@f@/ ᤷ@ Z@!@bZ٤@m O/ @ƫm/bO! hh@fٰչ/rn/hƤ! O"AƵvk !//$An ɊxkQ& &q͛m/4Mc r//m̜eq֍] 3e]ބ/4AzXƫeOOkeZ0A@q3hhXńb//h/0MPrQ@!rűeB fOh 0T;z3Br /z O1TMcm&rf{{mm$TT;@33mQB $6DC9 TSSc Xq zf!z6FSTTTVPSSS;q!m@ͨzO 4FTTTSSSSTC LSSS;@ 3@O{ rhO! 0PVTSSSSSSST9ETSSSSXk !BX0HTSSSSSSSSSSS46TSSSASOBXB+EPPPSSSSSSSSSSS+TSSSSASj_qB $9EEENNLSSSSSSSSSP SSSSSSSSt k0D9998ENNLSSSSSSSTCETSSSSSSMLZf_166666DD88NNPPSSSSST40TSSSSSSSTPfrxX$11440066688ENNSSSSSSSTSSSSSSSSSS$// "$$$$$440066D88FFFSSSSSFFTSSSSSSSSSVC!]zm! """"$$$$$44006668ENNPSSST44TSSSSSSSSSSVS$%%""$$$$44006D88FFHKSSSLTSSSSSSSSSSSVP"%%%"$$$-44066D8EFFPSTD6VSSSSSSSSSSSSSTF4%%""$$$4406698FFFSTSSSSSSSSSSSSSSSTTPE+%%"$$-44006D8ENNSC6TSSSSSSSSSSSSSSSSTTSNC4"%%$$$$4406698FFKKSSSSSSSSSSSSSSSSSSSSTKKN89900444$$$%%%""$$4400998EP6+VSSSSSSSSSSSSSSSSSSSSLFE8896001$$$%%%"$$-400668EEEVSSSSSSSSSSSSSSSSSSSPF8896604--$"%%""$$110699F"PSSSSSSSSSSSSSSSSSSSFF89966011$$"%%""$-44066E0$TSSSSSSSSSSSSSSSSSSNN8896644-$""%""$$+40699 9VSSSSSSSSSSSSSSSSLLEE996644$$""""$$44066ETSSSSSSSSSSSSSSSPPEEDD6044$$""%"$$4406FTSSSSSSSSSSSSSSLLEE996644$$$""$--46"LTSSSSSSSSSSSSSPPEEDD6044-$""%""$$16LTSSSSSSSSSSSSSNN88960011$$"%%""$-0"NTSSSSSSSSSSSSNN8896604-$$"%%""$1 EVSSSSSSSSSSSFFE8D6604--$""%"$-6TTSSSSSSSSSNNE8D660411$""%%"$$"LVSSSSSSSSPPF8896004-$$"""$%DTTSSSSSSPPF88D660411$$"%%""PTTSSSSSPFE8D66004--$""%%"+KVTSSSPPF889666411$"""%%1FVVSSFFE8866004--$$$"%%% "ESSSPF88D6600411$$"""%%% $9NNNFC966044--$$""""""" $166666600111$$" %% ace-6.4.5+dfsg.orig/contrib/minizip/0000775000175000017500000000000013157240624015405 5ustar tggtggace-6.4.5+dfsg.orig/contrib/minizip/unzip.c0000644000175000017500000013613713154167357016737 0ustar tggtgg/* unzip.c -- IO for uncompress .zip files using zlib Version 1.01e, February 12th, 2005 Copyright (C) 1998-2005 Gilles Vollant Read unzip.h for more info */ /* Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of compatibility with older software. The following is from the original crypt.c. Code woven in by Terry Thorsen 1/2003. */ /* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h] The encryption/decryption parts of this source code (as opposed to the non-echoing password parts) were originally written in Europe. The whole source package can be freely distributed, including from the USA. (Prior to January 2000, re-export from the US was a violation of US law.) */ /* This encryption code is a direct transcription of the algorithm from Roger Schlafly, described by Phil Katz in the file appnote.txt. This file (appnote.txt) is distributed with the PKZIP program (even in the version without encryption capabilities). */ #include #include #include #include "zlib.h" #include "unzip.h" #ifdef STDC # include # include # include #endif #ifdef NO_ERRNO_H extern int errno; #else # include #endif #ifndef local # define local static #endif /* compile with -Dlocal if your debugger can't find static symbols */ #ifndef CASESENSITIVITYDEFAULT_NO # if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES) # define CASESENSITIVITYDEFAULT_NO # endif #endif #ifndef UNZ_BUFSIZE #define UNZ_BUFSIZE (16384) #endif #ifndef UNZ_MAXFILENAMEINZIP #define UNZ_MAXFILENAMEINZIP (256) #endif #ifndef ALLOC # define ALLOC(size) (malloc(size)) #endif #ifndef TRYFREE # define TRYFREE(p) {if (p) free(p);} #endif #define SIZECENTRALDIRITEM (0x2e) #define SIZEZIPLOCALHEADER (0x1e) const char unz_copyright[] = " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; /* unz_file_info_interntal contain internal info about a file in zipfile*/ typedef struct unz_file_info_internal_s { uLong offset_curfile;/* relative offset of local header 4 bytes */ } unz_file_info_internal; /* file_in_zip_read_info_s contain internal information about a file in zipfile, when reading and decompress it */ typedef struct { char *read_buffer; /* internal buffer for compressed data */ z_stream stream; /* zLib stream structure for inflate */ uLong pos_in_zipfile; /* position in byte on the zipfile, for fseek*/ uLong stream_initialised; /* flag set if stream structure is initialised*/ uLong offset_local_extrafield;/* offset of the local extra field */ uInt size_local_extrafield;/* size of the local extra field */ uLong pos_local_extrafield; /* position in the local extra field in read*/ uLong crc32; /* crc32 of all data uncompressed */ uLong crc32_wait; /* crc32 we must obtain after decompress all */ uLong rest_read_compressed; /* number of byte to be decompressed */ uLong rest_read_uncompressed;/*number of byte to be obtained after decomp*/ zlib_filefunc_def z_filefunc; voidpf filestream; /* io structore of the zipfile */ uLong compression_method; /* compression method (0==store) */ uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ int raw; } file_in_zip_read_info_s; /* unz_s contain internal information about the zipfile */ typedef struct { zlib_filefunc_def z_filefunc; voidpf filestream; /* io structore of the zipfile */ unz_global_info gi; /* public global information */ uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ uLong num_file; /* number of the current file in the zipfile*/ uLong pos_in_central_dir; /* pos of the current file in the central dir*/ uLong current_file_ok; /* flag about the usability of the current file*/ uLong central_pos; /* position of the beginning of the central dir*/ uLong size_central_dir; /* size of the central directory */ uLong offset_central_dir; /* offset of start of central directory with respect to the starting disk number */ unz_file_info cur_file_info; /* public info about the current file in zip*/ unz_file_info_internal cur_file_info_internal; /* private info about it*/ file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current file if we are decompressing it */ int encrypted; # ifndef NOUNCRYPT unsigned long keys[3]; /* keys defining the pseudo-random sequence */ const unsigned long* pcrc_32_tab; # endif } unz_s; #ifndef NOUNCRYPT #include "crypt.h" #endif /* =========================================================================== Read a byte from a gz_stream; update next_in and avail_in. Return EOF for end of file. IN assertion: the stream s has been sucessfully opened for reading. */ local int unzlocal_getByte OF(( const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream, int *pi)); local int unzlocal_getByte(const zlib_filefunc_def* pzlib_filefunc_def,voidpf filestream,int *pi) { unsigned char c; int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1); if (err==1) { *pi = (int)c; return UNZ_OK; } else { if (ZERROR(*pzlib_filefunc_def,filestream)) return UNZ_ERRNO; else return UNZ_EOF; } } /* =========================================================================== Reads a long in LSB order from the given gz_stream. Sets */ local int unzlocal_getShort OF(( const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); local int unzlocal_getShort (const zlib_filefunc_def* pzlib_filefunc_def,voidpf filestream,uLong *pX) { uLong x ; int i = 0; int err; err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); x = (uLong)i; if (err==UNZ_OK) err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<8; if (err==UNZ_OK) *pX = x; else *pX = 0; return err; } local int unzlocal_getLong OF(( const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); local int unzlocal_getLong (const zlib_filefunc_def* pzlib_filefunc_def,voidpf filestream,uLong *pX) { uLong x ; int i = 0; int err; err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); x = (uLong)i; if (err==UNZ_OK) err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<8; if (err==UNZ_OK) err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<16; if (err==UNZ_OK) err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<24; if (err==UNZ_OK) *pX = x; else *pX = 0; return err; } /* My own strcmpi / strcasecmp */ local int strcmpcasenosensitive_internal(const char* fileName1,const char* fileName2) { for (;;) { char c1=*(fileName1++); char c2=*(fileName2++); if ((c1>='a') && (c1<='z')) c1 -= 0x20; if ((c2>='a') && (c2<='z')) c2 -= 0x20; if (c1=='\0') return ((c2=='\0') ? 0 : -1); if (c2=='\0') return 1; if (c1c2) return 1; } } #ifdef CASESENSITIVITYDEFAULT_NO #define CASESENSITIVITYDEFAULTVALUE 2 #else #define CASESENSITIVITYDEFAULTVALUE 1 #endif #ifndef STRCMPCASENOSENTIVEFUNCTION #define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal #endif /* Compare two filename (fileName1,fileName2). If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi or strcasecmp) If iCaseSenisivity = 0, case sensitivity is defaut of your operating system (like 1 on Unix, 2 on Windows) */ extern MINIZIP_EXPORT int unzStringFileNameCompare (const char* fileName1,const char* fileName2,int iCaseSensitivity) { if (iCaseSensitivity==0) iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE; if (iCaseSensitivity==1) return strcmp(fileName1,fileName2); return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2); } #ifndef BUFREADCOMMENT #define BUFREADCOMMENT (0x400) #endif /* Locate the Central directory of a zipfile (at the end, just before the global comment) */ local uLong unzlocal_SearchCentralDir OF(( const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream)); local uLong unzlocal_SearchCentralDir(const zlib_filefunc_def* pzlib_filefunc_def,voidpf filestream) { unsigned char* buf; uLong uSizeFile; uLong uBackRead; uLong uMaxBack=0xffff; /* maximum size of global comment */ uLong uPosFound=0; if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) return 0; uSizeFile = ZTELL(*pzlib_filefunc_def,filestream); if (uMaxBack>uSizeFile) uMaxBack = uSizeFile; buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); if (buf==0) return 0; uBackRead = 4; while (uBackReaduMaxBack) uBackRead = uMaxBack; else uBackRead+=BUFREADCOMMENT; uReadPos = uSizeFile-uBackRead ; uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? (BUFREADCOMMENT+4) : (uSizeFile-uReadPos); if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) break; if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) break; for (i=(int)uReadSize-3; (i--)>0;) if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) { uPosFound = uReadPos+i; break; } if (uPosFound!=0) break; } TRYFREE(buf); return uPosFound; } /* Open a Zip file. path contain the full pathname (by example, on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer "zlib/zlib114.zip". If the zipfile cannot be opened (file doesn't exist or in not valid), the return value is NULL. Else, the return value is a unzFile Handle, usable with other function of this unzip package. */ extern MINIZIP_EXPORT unzFile unzOpen2 (const char *path, zlib_filefunc_def* pzlib_filefunc_def) { unz_s us; unz_s *s; uLong central_pos,uL; uLong number_disk; /* number of the current dist, used for spaning ZIP, unsupported, always 0*/ uLong number_disk_with_CD; /* number the the disk with central dir, used for spaning ZIP, unsupported, always 0*/ uLong number_entry_CD; /* total number of entries in the central dir (same than number_entry on nospan) */ int err=UNZ_OK; if (unz_copyright[0]!=' ') return 0; if (pzlib_filefunc_def==0) fill_fopen_filefunc(&us.z_filefunc); else us.z_filefunc = *pzlib_filefunc_def; us.filestream= (*(us.z_filefunc.zopen_file))(us.z_filefunc.opaque, path, ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_EXISTING); if (us.filestream==0) return 0; central_pos = unzlocal_SearchCentralDir(&us.z_filefunc,us.filestream); if (central_pos==0) err=UNZ_ERRNO; if (ZSEEK(us.z_filefunc, us.filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) err=UNZ_ERRNO; /* the signature, already checked */ if (unzlocal_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) err=UNZ_ERRNO; /* number of this disk */ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) err=UNZ_ERRNO; /* number of the disk with the start of the central directory */ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) err=UNZ_ERRNO; /* total number of entries in the central dir on this disk */ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK) err=UNZ_ERRNO; /* total number of entries in the central dir */ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK) err=UNZ_ERRNO; if ((number_entry_CD!=us.gi.number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) err=UNZ_BADZIPFILE; /* size of the central directory */ if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK) err=UNZ_ERRNO; /* offset of start of central directory with respect to the starting disk number */ if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK) err=UNZ_ERRNO; /* zipfile comment length */ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK) err=UNZ_ERRNO; if ((central_pospfile_in_zip_read!=0) unzCloseCurrentFile(file); ZCLOSE(s->z_filefunc, s->filestream); TRYFREE(s); return UNZ_OK; } /* Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed return UNZ_OK if there is no problem. */ extern MINIZIP_EXPORT int unzGetGlobalInfo (unzFile file,unz_global_info *pglobal_info) { unz_s* s; if (file==0) return UNZ_PARAMERROR; s=(unz_s*)file; *pglobal_info=s->gi; return UNZ_OK; } /* Translate date/time from Dos format to tm_unz (readable more easilty) */ local void unzlocal_DosDateToTmuDate (uLong ulDosDate,tm_unz* ptm) { uLong uDate; uDate = (uLong)(ulDosDate>>16); ptm->tm_mday = (uInt)(uDate&0x1f) ; ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ; ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ; ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800); ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ; ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ; } /* Get Info about the current file in the zipfile, with internal only info */ local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file, unz_file_info *pfile_info, unz_file_info_internal *pfile_info_internal, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)); local int unzlocal_GetCurrentFileInfoInternal (unzFile file, unz_file_info *pfile_info, unz_file_info_internal *pfile_info_internal, char *szFileName,uLong fileNameBufferSize, void *extraField,uLong extraFieldBufferSize, char *szComment,uLong commentBufferSize) { unz_s* s; unz_file_info file_info; unz_file_info_internal file_info_internal; int err=UNZ_OK; uLong uMagic; long lSeek=0; if (file==0) return UNZ_PARAMERROR; s=(unz_s*)file; if (ZSEEK(s->z_filefunc, s->filestream, s->pos_in_central_dir+s->byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET)!=0) err=UNZ_ERRNO; /* we check the magic */ if (err==UNZ_OK) {if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) err=UNZ_ERRNO; else if (uMagic!=0x02014b50) err=UNZ_BADZIPFILE; } if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK) err=UNZ_ERRNO; unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date); if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) err=UNZ_ERRNO; lSeek+=file_info.size_filename; if ((err==UNZ_OK) && (szFileName!=0)) { uLong uSizeRead ; if (file_info.size_filename0) && (fileNameBufferSize>0)) if (ZREAD(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead) err=UNZ_ERRNO; lSeek -= uSizeRead; } if ((err==UNZ_OK) && (extraField!=0)) { uLong uSizeRead ; if (file_info.size_file_extraz_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) lSeek=0; else err=UNZ_ERRNO; } if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0)) { if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead) err=UNZ_ERRNO; lSeek += file_info.size_file_extra - uSizeRead; } } else lSeek+=file_info.size_file_extra; if ((err==UNZ_OK) && (szComment!=0)) { uLong uSizeRead ; if (file_info.size_file_commentz_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) lSeek=0; else err=UNZ_ERRNO; } if ((file_info.size_file_comment>0) && (commentBufferSize>0)) if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead) err=UNZ_ERRNO; lSeek+=file_info.size_file_comment - uSizeRead; } else lSeek+=file_info.size_file_comment; if ((err==UNZ_OK) && (pfile_info!=0)) *pfile_info=file_info; if ((err==UNZ_OK) && (pfile_info_internal!=0)) *pfile_info_internal=file_info_internal; return err; } /* Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed return UNZ_OK if there is no problem. */extern MINIZIP_EXPORT int unzGetCurrentFileInfo (unzFile file, unz_file_info *pfile_info, char *szFileName,uLong fileNameBufferSize, void *extraField,uLong extraFieldBufferSize, char *szComment,uLong commentBufferSize) { return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,0, szFileName,fileNameBufferSize, extraField,extraFieldBufferSize, szComment,commentBufferSize); } /* Set the current file of the zipfile to the first file. return UNZ_OK if there is no problem */ extern MINIZIP_EXPORT int unzGoToFirstFile (unzFile file) { int err=UNZ_OK; unz_s* s; if (file==0) return UNZ_PARAMERROR; s=(unz_s*)file; s->pos_in_central_dir=s->offset_central_dir; s->num_file=0; err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, &s->cur_file_info_internal, 0,0,0,0,0,0); s->current_file_ok = (err == UNZ_OK); return err; } /* Set the current file of the zipfile to the next file. return UNZ_OK if there is no problem return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. */ extern MINIZIP_EXPORT int unzGoToNextFile (unzFile file) { unz_s* s; int err; if (file==0) return UNZ_PARAMERROR; s=(unz_s*)file; if (!s->current_file_ok) return UNZ_END_OF_LIST_OF_FILE; if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */ if (s->num_file+1==s->gi.number_entry) return UNZ_END_OF_LIST_OF_FILE; s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename + s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ; s->num_file++; err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, &s->cur_file_info_internal, 0,0,0,0,0,0); s->current_file_ok = (err == UNZ_OK); return err; } /* Try locate the file szFileName in the zipfile. For the iCaseSensitivity signification, see unzipStringFileNameCompare return value : UNZ_OK if the file is found. It becomes the current file. UNZ_END_OF_LIST_OF_FILE if the file is not found */ extern MINIZIP_EXPORT int unzLocateFile (unzFile file,const char * szFileName,int iCaseSensitivity) { unz_s* s; int err; /* We remember the 'current' position in the file so that we can jump * back there if we fail. */ unz_file_info cur_file_infoSaved; unz_file_info_internal cur_file_info_internalSaved; uLong num_fileSaved; uLong pos_in_central_dirSaved; if (file==0) return UNZ_PARAMERROR; if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP) return UNZ_PARAMERROR; s=(unz_s*)file; if (!s->current_file_ok) return UNZ_END_OF_LIST_OF_FILE; /* Save the current state */ num_fileSaved = s->num_file; pos_in_central_dirSaved = s->pos_in_central_dir; cur_file_infoSaved = s->cur_file_info; cur_file_info_internalSaved = s->cur_file_info_internal; err = unzGoToFirstFile(file); while (err == UNZ_OK) { char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1]; err = unzGetCurrentFileInfo(file,0, szCurrentFileName,sizeof(szCurrentFileName)-1, 0,0,0,0); if (err == UNZ_OK) { if (unzStringFileNameCompare(szCurrentFileName, szFileName,iCaseSensitivity)==0) return UNZ_OK; err = unzGoToNextFile(file); } } /* We failed, so restore the state of the 'current file' to where we * were. */ s->num_file = num_fileSaved ; s->pos_in_central_dir = pos_in_central_dirSaved ; s->cur_file_info = cur_file_infoSaved; s->cur_file_info_internal = cur_file_info_internalSaved; return err; } /* /////////////////////////////////////////// // Contributed by Ryan Haksi (mailto://cryogen@infoserve.net) // I need random access // // Further optimization could be realized by adding an ability // to cache the directory in memory. The goal being a single // comprehensive file read to put the file I need in a memory. */ /* typedef struct unz_file_pos_s { uLong pos_in_zip_directory; // offset in file uLong num_of_file; // # of file } unz_file_pos; */ extern MINIZIP_EXPORT int unzGetFilePos(unzFile file,unz_file_pos* file_pos) { unz_s* s; if (file==0 || file_pos==0) return UNZ_PARAMERROR; s=(unz_s*)file; if (!s->current_file_ok) return UNZ_END_OF_LIST_OF_FILE; file_pos->pos_in_zip_directory = s->pos_in_central_dir; file_pos->num_of_file = s->num_file; return UNZ_OK; } extern MINIZIP_EXPORT int unzGoToFilePos(unzFile file,unz_file_pos* file_pos) { unz_s* s; int err; if (file==0 || file_pos==0) return UNZ_PARAMERROR; s=(unz_s*)file; /* jump to the right spot */ s->pos_in_central_dir = file_pos->pos_in_zip_directory; s->num_file = file_pos->num_of_file; /* set the current file */ err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, &s->cur_file_info_internal, 0,0,0,0,0,0); /* return results */ s->current_file_ok = (err == UNZ_OK); return err; } /* // Unzip Helper Functions - should be here? /////////////////////////////////////////// */ /* Read the local header of the current zipfile Check the coherency of the local header and info in the end of central directory about this file store in *piSizeVar the size of extra info in local header (filename and size of extra field data) */ local int unzlocal_CheckCurrentFileCoherencyHeader (unz_s* s,uInt* piSizeVar, uLong *poffset_local_extrafield, uInt *psize_local_extrafield) { uLong uMagic,uData,uFlags; uLong size_filename; uLong size_extra_field; int err=UNZ_OK; *piSizeVar = 0; *poffset_local_extrafield = 0; *psize_local_extrafield = 0; if (ZSEEK(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile + s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; if (err==UNZ_OK) { if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) err=UNZ_ERRNO; else if (uMagic!=0x04034b50) err=UNZ_BADZIPFILE; } if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) err=UNZ_ERRNO; /* else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion)) err=UNZ_BADZIPFILE; */ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK) err=UNZ_ERRNO; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) err=UNZ_ERRNO; else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method)) err=UNZ_BADZIPFILE; if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) && (s->cur_file_info.compression_method!=Z_DEFLATED)) err=UNZ_BADZIPFILE; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */ err=UNZ_ERRNO; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */ err=UNZ_ERRNO; else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && ((uFlags & 8)==0)) err=UNZ_BADZIPFILE; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */ err=UNZ_ERRNO; else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) && ((uFlags & 8)==0)) err=UNZ_BADZIPFILE; if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */ err=UNZ_ERRNO; else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && ((uFlags & 8)==0)) err=UNZ_BADZIPFILE; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK) err=UNZ_ERRNO; else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename)) err=UNZ_BADZIPFILE; *piSizeVar += (uInt)size_filename; if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK) err=UNZ_ERRNO; *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + size_filename; *psize_local_extrafield = (uInt)size_extra_field; *piSizeVar += (uInt)size_extra_field; return err; } /* Open for reading data the current file in the zipfile. If there is no error and the file is opened, the return value is UNZ_OK. */ extern MINIZIP_EXPORT int unzOpenCurrentFile3 (unzFile file,int* method,int* level,int raw,const char* password) { int err=UNZ_OK; uInt iSizeVar; unz_s* s; file_in_zip_read_info_s* pfile_in_zip_read_info; uLong offset_local_extrafield; /* offset of the local extra field */ uInt size_local_extrafield; /* size of the local extra field */ # ifndef NOUNCRYPT char source[12]; # else if (password != 0) return UNZ_PARAMERROR; # endif if (file==0) return UNZ_PARAMERROR; s=(unz_s*)file; if (!s->current_file_ok) return UNZ_PARAMERROR; if (s->pfile_in_zip_read != 0) unzCloseCurrentFile(file); if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar, &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK) return UNZ_BADZIPFILE; pfile_in_zip_read_info = (file_in_zip_read_info_s*) ALLOC(sizeof(file_in_zip_read_info_s)); if (pfile_in_zip_read_info==0) return UNZ_INTERNALERROR; pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE); pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield; pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield; pfile_in_zip_read_info->pos_local_extrafield=0; pfile_in_zip_read_info->raw=raw; if (pfile_in_zip_read_info->read_buffer==0) { TRYFREE(pfile_in_zip_read_info); return UNZ_INTERNALERROR; } pfile_in_zip_read_info->stream_initialised=0; if (method!=0) *method = (int)s->cur_file_info.compression_method; if (level!=0) { *level = 6; switch (s->cur_file_info.flag & 0x06) { case 6 : *level = 1; break; case 4 : *level = 2; break; case 2 : *level = 9; break; } } if ((s->cur_file_info.compression_method!=0) && (s->cur_file_info.compression_method!=Z_DEFLATED)) err=UNZ_BADZIPFILE; pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc; pfile_in_zip_read_info->crc32=0; pfile_in_zip_read_info->compression_method = s->cur_file_info.compression_method; pfile_in_zip_read_info->filestream=s->filestream; pfile_in_zip_read_info->z_filefunc=s->z_filefunc; pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile; pfile_in_zip_read_info->stream.total_out = 0; if ((s->cur_file_info.compression_method==Z_DEFLATED) && (!raw)) { pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; pfile_in_zip_read_info->stream.zfree = (free_func)0; pfile_in_zip_read_info->stream.opaque = (voidpf)0; pfile_in_zip_read_info->stream.next_in = (voidpf)0; pfile_in_zip_read_info->stream.avail_in = 0; err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS); if (err == Z_OK) pfile_in_zip_read_info->stream_initialised=1; else { TRYFREE(pfile_in_zip_read_info); return err; } /* windowBits is passed < 0 to tell that there is no zlib header. * Note that in this case inflate *requires* an extra "dummy" byte * after the compressed stream in order to complete decompression and * return Z_STREAM_END. * In unzip, i don't wait absolutely Z_STREAM_END because I known the * size of both compressed and uncompressed data */ } pfile_in_zip_read_info->rest_read_compressed = s->cur_file_info.compressed_size ; pfile_in_zip_read_info->rest_read_uncompressed = s->cur_file_info.uncompressed_size ; pfile_in_zip_read_info->pos_in_zipfile = s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + iSizeVar; pfile_in_zip_read_info->stream.avail_in = (uInt)0; s->pfile_in_zip_read = pfile_in_zip_read_info; # ifndef NOUNCRYPT if (password != 0) { int i; s->pcrc_32_tab = (unsigned long*)get_crc_table(); init_keys(password,s->keys,s->pcrc_32_tab); if (ZSEEK(s->z_filefunc, s->filestream, s->pfile_in_zip_read->pos_in_zipfile + s->pfile_in_zip_read->byte_before_the_zipfile, SEEK_SET)!=0) return UNZ_INTERNALERROR; if(ZREAD(s->z_filefunc, s->filestream,source, 12)<12) return UNZ_INTERNALERROR; for (i = 0; i<12; i++) zdecode(s->keys,s->pcrc_32_tab,source[i]); s->pfile_in_zip_read->pos_in_zipfile+=12; s->encrypted=1; } # endif return UNZ_OK; } extern MINIZIP_EXPORT int unzOpenCurrentFile (unzFile file) { return unzOpenCurrentFile3(file, 0, 0, 0, 0); } extern MINIZIP_EXPORT int unzOpenCurrentFilePassword (unzFile file,const char* password) { return unzOpenCurrentFile3(file, 0, 0, 0, password); } extern MINIZIP_EXPORT int unzOpenCurrentFile2 (unzFile file,int* method,int* level,int raw) { return unzOpenCurrentFile3(file, method, level, raw, 0); } /* Read bytes from the current file. buf contain buffer where data must be copied len the size of buf. return the number of byte copied if somes bytes are copied return 0 if the end of file was reached return <0 with error code if there is an error (UNZ_ERRNO for IO error, or zLib error for uncompress error) */ extern MINIZIP_EXPORT int unzReadCurrentFile (unzFile file,voidp buf,unsigned len) { int err=UNZ_OK; uInt iRead = 0; unz_s* s; file_in_zip_read_info_s* pfile_in_zip_read_info; if (file==0) return UNZ_PARAMERROR; s=(unz_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==0) return UNZ_PARAMERROR; if (pfile_in_zip_read_info->read_buffer == 0) return UNZ_END_OF_LIST_OF_FILE; if (len==0) return 0; pfile_in_zip_read_info->stream.next_out = (Bytef*)buf; pfile_in_zip_read_info->stream.avail_out = (uInt)len; if ((len>pfile_in_zip_read_info->rest_read_uncompressed) && (!(pfile_in_zip_read_info->raw))) pfile_in_zip_read_info->stream.avail_out = (uInt)pfile_in_zip_read_info->rest_read_uncompressed; if ((len>pfile_in_zip_read_info->rest_read_compressed+ pfile_in_zip_read_info->stream.avail_in) && (pfile_in_zip_read_info->raw)) pfile_in_zip_read_info->stream.avail_out = (uInt)pfile_in_zip_read_info->rest_read_compressed+ pfile_in_zip_read_info->stream.avail_in; while (pfile_in_zip_read_info->stream.avail_out>0) { if ((pfile_in_zip_read_info->stream.avail_in==0) && (pfile_in_zip_read_info->rest_read_compressed>0)) { uInt uReadThis = UNZ_BUFSIZE; if (pfile_in_zip_read_info->rest_read_compressedrest_read_compressed; if (uReadThis == 0) return UNZ_EOF; if (ZSEEK(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, pfile_in_zip_read_info->pos_in_zipfile + pfile_in_zip_read_info->byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; if (ZREAD(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, pfile_in_zip_read_info->read_buffer, uReadThis)!=uReadThis) return UNZ_ERRNO; # ifndef NOUNCRYPT if(s->encrypted) { uInt i; for(i=0;iread_buffer[i] = zdecode(s->keys,s->pcrc_32_tab, pfile_in_zip_read_info->read_buffer[i]); } # endif pfile_in_zip_read_info->pos_in_zipfile += uReadThis; pfile_in_zip_read_info->rest_read_compressed-=uReadThis; pfile_in_zip_read_info->stream.next_in = (Bytef*)pfile_in_zip_read_info->read_buffer; pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis; } if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw)) { uInt uDoCopy,i ; if ((pfile_in_zip_read_info->stream.avail_in == 0) && (pfile_in_zip_read_info->rest_read_compressed == 0)) return (iRead==0) ? UNZ_EOF : iRead; if (pfile_in_zip_read_info->stream.avail_out < pfile_in_zip_read_info->stream.avail_in) uDoCopy = pfile_in_zip_read_info->stream.avail_out ; else uDoCopy = pfile_in_zip_read_info->stream.avail_in ; for (i=0;istream.next_out+i) = *(pfile_in_zip_read_info->stream.next_in+i); pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32, pfile_in_zip_read_info->stream.next_out, uDoCopy); pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy; pfile_in_zip_read_info->stream.avail_in -= uDoCopy; pfile_in_zip_read_info->stream.avail_out -= uDoCopy; pfile_in_zip_read_info->stream.next_out += uDoCopy; pfile_in_zip_read_info->stream.next_in += uDoCopy; pfile_in_zip_read_info->stream.total_out += uDoCopy; iRead += uDoCopy; } else { uLong uTotalOutBefore,uTotalOutAfter; const Bytef *bufBefore; uLong uOutThis; int flush=Z_SYNC_FLUSH; uTotalOutBefore = pfile_in_zip_read_info->stream.total_out; bufBefore = pfile_in_zip_read_info->stream.next_out; /* if ((pfile_in_zip_read_info->rest_read_uncompressed == pfile_in_zip_read_info->stream.avail_out) && (pfile_in_zip_read_info->rest_read_compressed == 0)) flush = Z_FINISH; */ err=inflate(&pfile_in_zip_read_info->stream,flush); if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=0)) err = Z_DATA_ERROR; uTotalOutAfter = pfile_in_zip_read_info->stream.total_out; uOutThis = uTotalOutAfter-uTotalOutBefore; pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,bufBefore, (uInt)(uOutThis)); pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis; iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); if (err==Z_STREAM_END) return (iRead==0) ? UNZ_EOF : iRead; if (err!=Z_OK) break; } } if (err==Z_OK) return iRead; return err; } /* Give the current position in uncompressed data */ extern MINIZIP_EXPORT z_off_t unztell (unzFile file) { unz_s* s; file_in_zip_read_info_s* pfile_in_zip_read_info; if (file==0) return UNZ_PARAMERROR; s=(unz_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==0) return UNZ_PARAMERROR; return (z_off_t)pfile_in_zip_read_info->stream.total_out; } /* return 1 if the end of file was reached, 0 elsewhere */ extern MINIZIP_EXPORT int unzeof (unzFile file) { unz_s* s; file_in_zip_read_info_s* pfile_in_zip_read_info; if (file==0) return UNZ_PARAMERROR; s=(unz_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==0) return UNZ_PARAMERROR; if (pfile_in_zip_read_info->rest_read_uncompressed == 0) return 1; else return 0; } //FUZZ: disable check_for_NULL /* Read extra field from the current file (opened by unzOpenCurrentFile) This is the local-header version of the extra field (sometimes, there is more info in the local-header version than in the central-header) if buf==NULL, it return the size of the local extra field that can be read if buf!=NULL, len is the size of the buffer, the extra header is copied in buf. the return value is the number of bytes copied in buf, or (if <0) the error code */ //FUZZ: enable check_for_NULL extern MINIZIP_EXPORT int unzGetLocalExtrafield (unzFile file,voidp buf,unsigned len) { unz_s* s; file_in_zip_read_info_s* pfile_in_zip_read_info; uInt read_now; uLong size_to_read; if (file==0) return UNZ_PARAMERROR; s=(unz_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==0) return UNZ_PARAMERROR; size_to_read = (pfile_in_zip_read_info->size_local_extrafield - pfile_in_zip_read_info->pos_local_extrafield); if (buf==0) return (int)size_to_read; if (len>size_to_read) read_now = (uInt)size_to_read; else read_now = (uInt)len ; if (read_now==0) return 0; if (ZSEEK(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, pfile_in_zip_read_info->offset_local_extrafield + pfile_in_zip_read_info->pos_local_extrafield, ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; if (ZREAD(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, buf,read_now)!=read_now) return UNZ_ERRNO; return (int)read_now; } /* Close the file in zip opened with unzipOpenCurrentFile Return UNZ_CRCERROR if all the file was read but the CRC is not good */ extern MINIZIP_EXPORT int unzCloseCurrentFile (unzFile file) { int err=UNZ_OK; unz_s* s; file_in_zip_read_info_s* pfile_in_zip_read_info; if (file==0) return UNZ_PARAMERROR; s=(unz_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==0) return UNZ_PARAMERROR; if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) && (!pfile_in_zip_read_info->raw)) { if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait) err=UNZ_CRCERROR; } TRYFREE(pfile_in_zip_read_info->read_buffer); pfile_in_zip_read_info->read_buffer = 0; if (pfile_in_zip_read_info->stream_initialised) inflateEnd(&pfile_in_zip_read_info->stream); pfile_in_zip_read_info->stream_initialised = 0; TRYFREE(pfile_in_zip_read_info); s->pfile_in_zip_read=0; return err; } /* Get the global comment string of the ZipFile, in the szComment buffer. uSizeBuf is the size of the szComment buffer. return the number of byte copied or an error code <0 */ extern MINIZIP_EXPORT int unzGetGlobalComment (unzFile file,char *szComment,uLong uSizeBuf) { unz_s* s; uLong uReadThis ; if (file==0) return UNZ_PARAMERROR; s=(unz_s*)file; uReadThis = uSizeBuf; if (uReadThis>s->gi.size_comment) uReadThis = s->gi.size_comment; if (ZSEEK(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; if (uReadThis>0) { *szComment='\0'; if (ZREAD(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis) return UNZ_ERRNO; } if ((szComment != 0) && (uSizeBuf > s->gi.size_comment)) *(szComment+s->gi.size_comment)='\0'; return (int)uReadThis; } /* Additions by RX '2004 */ extern MINIZIP_EXPORT uLong unzGetOffset (unzFile file) { unz_s* s; if (file==0) return UNZ_PARAMERROR; s=(unz_s*)file; if (!s->current_file_ok) return 0; if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff) if (s->num_file==s->gi.number_entry) return 0; return s->pos_in_central_dir; } extern MINIZIP_EXPORT int unzSetOffset (unzFile file,uLong pos) { unz_s* s; int err; if (file==0) return UNZ_PARAMERROR; s=(unz_s*)file; s->pos_in_central_dir = pos; s->num_file = s->gi.number_entry; /* hack */ err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, &s->cur_file_info_internal, 0,0,0,0,0,0); s->current_file_ok = (err == UNZ_OK); return err; } ace-6.4.5+dfsg.orig/contrib/minizip/minizip.mpc0000644000175000017500000000046413154167357017577 0ustar tggtgg// -*- MPC -*- project (minizip) : install, zlib, vc_warnings { sharedname = minizip libout = $(ACE_ROOT)/lib dynamicflags += MINIZIP_BUILD_DLL requires += zlib Source_Files { zip.c unzip.c ioapi.c } Header_Files { minizip_export.h ioapi.h unzip.h zip.h } } ace-6.4.5+dfsg.orig/contrib/minizip/mztools.c0000644000175000017500000001724213154167357017274 0ustar tggtgg/* Additional tools for Minizip Code: Xavier Roche '2004 License: Same as ZLIB (www.gzip.org) */ /* Code */ #include #include #include #include "zlib.h" #include "unzip.h" #define READ_8(adr) ((unsigned char)*(adr)) #define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) ) #define READ_32(adr) ( READ_16(adr) | (READ_16((adr)+2) << 16) ) #define WRITE_8(buff, n) do { \ *((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \ } while(0) #define WRITE_16(buff, n) do { \ WRITE_8((unsigned char*)(buff), n); \ WRITE_8(((unsigned char*)(buff)) + 1, (n) >> 8); \ } while(0) #define WRITE_32(buff, n) do { \ WRITE_16((unsigned char*)(buff), (n) & 0xffff); \ WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \ } while(0) extern int ZEXPORT unzRepair(file, fileOut, fileOutTmp, nRecovered, bytesRecovered) const char* file; const char* fileOut; const char* fileOutTmp; uLong* nRecovered; uLong* bytesRecovered; { int err = Z_OK; FILE* fpZip = fopen(file, "rb"); FILE* fpOut = fopen(fileOut, "wb"); FILE* fpOutCD = fopen(fileOutTmp, "wb"); if (fpZip != 0 && fpOut != 0) { int entries = 0; uLong totalBytes = 0; char header[30]; char filename[256]; char extra[1024]; int offset = 0; int offsetCD = 0; while ( fread(header, 1, 30, fpZip) == 30 ) { int currentOffset = offset; /* File entry */ if (READ_32(header) == 0x04034b50) { unsigned int version = READ_16(header + 4); unsigned int gpflag = READ_16(header + 6); unsigned int method = READ_16(header + 8); unsigned int filetime = READ_16(header + 10); unsigned int filedate = READ_16(header + 12); unsigned int crc = READ_32(header + 14); /* crc */ unsigned int cpsize = READ_32(header + 18); /* compressed size */ unsigned int uncpsize = READ_32(header + 22); /* uncompressed sz */ unsigned int fnsize = READ_16(header + 26); /* file name length */ unsigned int extsize = READ_16(header + 28); /* extra field length */ filename[0] = extra[0] = '\0'; /* Header */ if (fwrite(header, 1, 30, fpOut) == 30) { offset += 30; } else { err = Z_ERRNO; break; } /* Filename */ if (fnsize > 0) { if (fread(filename, 1, fnsize, fpZip) == fnsize) { if (fwrite(filename, 1, fnsize, fpOut) == fnsize) { offset += fnsize; } else { err = Z_ERRNO; break; } } else { err = Z_ERRNO; break; } } else { err = Z_STREAM_ERROR; break; } /* Extra field */ if (extsize > 0) { if (fread(extra, 1, extsize, fpZip) == extsize) { if (fwrite(extra, 1, extsize, fpOut) == extsize) { offset += extsize; } else { err = Z_ERRNO; break; } } else { err = Z_ERRNO; break; } } /* Data */ { int dataSize = cpsize; if (dataSize == 0) { dataSize = uncpsize; } if (dataSize > 0) { char* data = malloc(dataSize); if (data != 0) { if ((int)fread(data, 1, dataSize, fpZip) == dataSize) { if ((int)fwrite(data, 1, dataSize, fpOut) == dataSize) { offset += dataSize; totalBytes += dataSize; } else { err = Z_ERRNO; } } else { err = Z_ERRNO; } free(data); if (err != Z_OK) { break; } } else { err = Z_MEM_ERROR; break; } } } /* Central directory entry */ { char header[46]; char* comment = ""; int comsize = (int) strlen(comment); WRITE_32(header, 0x02014b50); WRITE_16(header + 4, version); WRITE_16(header + 6, version); WRITE_16(header + 8, gpflag); WRITE_16(header + 10, method); WRITE_16(header + 12, filetime); WRITE_16(header + 14, filedate); WRITE_32(header + 16, crc); WRITE_32(header + 20, cpsize); WRITE_32(header + 24, uncpsize); WRITE_16(header + 28, fnsize); WRITE_16(header + 30, extsize); WRITE_16(header + 32, comsize); WRITE_16(header + 34, 0); /* disk # */ WRITE_16(header + 36, 0); /* int attrb */ WRITE_32(header + 38, 0); /* ext attrb */ WRITE_32(header + 42, currentOffset); /* Header */ if (fwrite(header, 1, 46, fpOutCD) == 46) { offsetCD += 46; /* Filename */ if (fnsize > 0) { if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) { offsetCD += fnsize; } else { err = Z_ERRNO; break; } } else { err = Z_STREAM_ERROR; break; } /* Extra field */ if (extsize > 0) { if (fwrite(extra, 1, extsize, fpOutCD) == extsize) { offsetCD += extsize; } else { err = Z_ERRNO; break; } } /* Comment field */ if (comsize > 0) { if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) { offsetCD += comsize; } else { err = Z_ERRNO; break; } } } else { err = Z_ERRNO; break; } } /* Success */ entries++; } else { break; } } /* Final central directory */ { int entriesZip = entries; char header[22]; char* comment = ""; // "ZIP File recovered by zlib/minizip/mztools"; int comsize = (int) strlen(comment); if (entriesZip > 0xffff) { entriesZip = 0xffff; } WRITE_32(header, 0x06054b50); WRITE_16(header + 4, 0); /* disk # */ WRITE_16(header + 6, 0); /* disk # */ WRITE_16(header + 8, entriesZip); /* hack */ WRITE_16(header + 10, entriesZip); /* hack */ WRITE_32(header + 12, offsetCD); /* size of CD */ WRITE_32(header + 16, offset); /* offset to CD */ WRITE_16(header + 20, comsize); /* comment */ /* Header */ if (fwrite(header, 1, 22, fpOutCD) == 22) { /* Comment field */ if (comsize > 0) { if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) { err = Z_ERRNO; } } } else { err = Z_ERRNO; } } /* Final merge (file + central directory) */ fclose(fpOutCD); if (err == Z_OK) { fpOutCD = fopen(fileOutTmp, "rb"); if (fpOutCD != 0) { int nRead; char buffer[8192]; while ( (nRead = (int)fread(buffer, 1, sizeof(buffer), fpOutCD)) > 0) { if ((int)fwrite(buffer, 1, nRead, fpOut) != nRead) { err = Z_ERRNO; break; } } fclose(fpOutCD); } } /* Close */ fclose(fpZip); fclose(fpOut); /* Wipe temporary file */ (void)remove(fileOutTmp); /* Number of recovered entries */ if (err == Z_OK) { if (nRecovered != 0) { *nRecovered = entries; } if (bytesRecovered != 0) { *bytesRecovered = totalBytes; } } } else { err = Z_STREAM_ERROR; } return err; } ace-6.4.5+dfsg.orig/contrib/minizip/crypt.h0000644000175000017500000001077713154167357016741 0ustar tggtgg/* crypt.h -- base code for crypt/uncrypt ZIPfile Version 1.01e, February 12th, 2005 Copyright (C) 1998-2005 Gilles Vollant This code is a modified version of crypting code in Infozip distribution The encryption/decryption parts of this source code (as opposed to the non-echoing password parts) were originally written in Europe. The whole source package can be freely distributed, including from the USA. (Prior to January 2000, re-export from the US was a violation of US law.) This encryption code is a direct transcription of the algorithm from Roger Schlafly, described by Phil Katz in the file appnote.txt. This file (appnote.txt) is distributed with the PKZIP program (even in the version without encryption capabilities). If you don't need crypting in your application, just define symbols NOCRYPT and NOUNCRYPT. This code support the "Traditional PKWARE Encryption". The new AES encryption added on Zip format by Winzip (see the page http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong Encryption is not supported. */ #define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) /*********************************************************************** * Return the next byte in the pseudo-random sequence */ static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab) { unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an * unpredictable manner on 16-bit systems; not a problem * with any known compiler so far, though */ MINIZIP_UNUSED_ARG(pcrc_32_tab); temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2; return (int)(((temp * (temp ^ 1)) >> 8) & 0xff); } /*********************************************************************** * Update the encryption keys with the next byte of plain text */ static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c) { (*(pkeys+0)) = CRC32((*(pkeys+0)), c); (*(pkeys+1)) += (*(pkeys+0)) & 0xff; (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1; { register int keyshift = (int)((*(pkeys+1)) >> 24); (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift); } return c; } /*********************************************************************** * Initialize the encryption keys and the random header according to * the given password. */ static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab) { *(pkeys+0) = 305419896L; *(pkeys+1) = 591751049L; *(pkeys+2) = 878082192L; while (*passwd != '\0') { update_keys(pkeys,pcrc_32_tab,(int)*passwd); passwd++; } } #define zdecode(pkeys,pcrc_32_tab,c) \ (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab))) #define zencode(pkeys,pcrc_32_tab,c,t) \ (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c)) #ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED #define RAND_HEAD_LEN 12 /* "last resort" source for second part of crypt seed pattern */ # ifndef ZCR_SEED2 # define ZCR_SEED2 3141592654UL /* use PI as default pattern */ # endif static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting) const char *passwd; /* password string */ unsigned char *buf; /* where to write header */ int bufSize; unsigned long* pkeys; const unsigned long* pcrc_32_tab; unsigned long crcForCrypting; { int n; /* index in random header */ int t; /* temporary */ int c; /* random byte */ unsigned char header[RAND_HEAD_LEN-2]; /* random header */ static unsigned calls = 0; /* ensure different random header each time */ if (bufSize> 7) & 0xff; header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t); } /* Encrypt random header (last two bytes is high word of crc) */ init_keys(passwd, pkeys, pcrc_32_tab); for (n = 0; n < RAND_HEAD_LEN-2; n++) { buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t); } buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t); buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t); return n; } #endif ace-6.4.5+dfsg.orig/contrib/minizip/ioapi.h0000644000175000017500000000500513154167357016665 0ustar tggtgg/* ioapi.h -- IO base function header for compress/uncompress .zip files using zlib + zip or unzip API Version 1.01e, February 12th, 2005 Copyright (C) 1998-2005 Gilles Vollant */ #ifndef _ZLIBIOAPI_H #define _ZLIBIOAPI_H #include "minizip_export.h" #define ZLIB_FILEFUNC_SEEK_CUR (1) #define ZLIB_FILEFUNC_SEEK_END (2) #define ZLIB_FILEFUNC_SEEK_SET (0) #define ZLIB_FILEFUNC_MODE_READ (1) #define ZLIB_FILEFUNC_MODE_WRITE (2) #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) #define ZLIB_FILEFUNC_MODE_EXISTING (4) #define ZLIB_FILEFUNC_MODE_CREATE (8) #ifndef ZCALLBACK #if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) #define ZCALLBACK CALLBACK #else #define ZCALLBACK #endif #endif #ifdef __cplusplus extern "C" { #endif typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); typedef struct zlib_filefunc_def_s { open_file_func zopen_file; read_file_func zread_file; write_file_func zwrite_file; tell_file_func ztell_file; seek_file_func zseek_file; close_file_func zclose_file; testerror_file_func zerror_file; voidpf opaque; } zlib_filefunc_def; void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); #define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size)) #define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size)) #define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream)) #define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode)) #define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream)) #define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream)) #ifdef __cplusplus } #endif #endif ace-6.4.5+dfsg.orig/contrib/minizip/ChangeLogUnzip0000644000175000017500000000400713154167357020214 0ustar tggtggChange in 1.01e (12 feb 05) - Fix in zipOpen2 for globalcomment (Rolf Kalbermatter) - Fix possible memory leak in unzip.c (Zoran Stevanovic) Change in 1.01b (20 may 04) - Integrate patch from Debian package (submited by Mark Brown) - Add tools mztools from Xavier Roche Change in 1.01 (8 may 04) - fix buffer overrun risk in unzip.c (Xavier Roche) - fix a minor buffer insecurity in minizip.c (Mike Whittaker) Change in 1.00: (10 sept 03) - rename to 1.00 - cosmetic code change Change in 0.22: (19 May 03) - crypting support (unless you define NOCRYPT) - append file in existing zipfile Change in 0.21: (10 Mar 03) - bug fixes Change in 0.17: (27 Jan 02) - bug fixes Change in 0.16: (19 Jan 02) - Support of ioapi for virtualize zip file access Change in 0.15: (19 Mar 98) - fix memory leak in minizip.c Change in 0.14: (10 Mar 98) - fix bugs in minizip.c sample for zipping big file - fix problem in month in date handling - fix bug in unzlocal_GetCurrentFileInfoInternal in unzip.c for comment handling Change in 0.13: (6 Mar 98) - fix bugs in zip.c - add real minizip sample Change in 0.12: (4 Mar 98) - add zip.c and zip.h for creates .zip file - fix change_file_date in miniunz.c for Unix (Jean-loup Gailly) - fix miniunz.c for file without specific record for directory Change in 0.11: (3 Mar 98) - fix bug in unzGetCurrentFileInfo for get extra field and comment - enhance miniunz sample, remove the bad unztst.c sample Change in 0.10: (2 Mar 98) - fix bug in unzReadCurrentFile - rename unzip* to unz* function and structure - remove Windows-like hungary notation variable name - modify some structure in unzip.h - add somes comment in source - remove unzipGetcCurrentFile function - replace ZUNZEXPORT by ZEXPORT - add unzGetLocalExtrafield for get the local extrafield info - add a new sample, miniunz.c Change in 0.4: (25 Feb 98) - suppress the type unzipFileInZip. Only on file in the zipfile can be open at the same time - fix somes typo in code - added tm_unz structure in unzip_file_info (date/time in readable format) ace-6.4.5+dfsg.orig/contrib/minizip/minizip.mwc0000644000175000017500000000001613154167357017577 0ustar tggtggworkspace { } ace-6.4.5+dfsg.orig/contrib/minizip/miniunz.c0000644000175000017500000003571513154167357017263 0ustar tggtgg/* miniunz.c Version 1.01e, February 12th, 2005 Copyright (C) 1998-2005 Gilles Vollant */ #include #include #include #include #include #include #ifdef unix # include # include #else # include # include #endif #include "unzip.h" #define CASESENSITIVITY (0) #define WRITEBUFFERSIZE (8192) #define MAXFILENAME (256) #ifdef WIN32 #define USEWIN32IOAPI #include "iowin32.h" #endif /* mini unzip, demo of unzip package usage : Usage : miniunz [-exvlo] file.zip [file_to_extract] [-d extractdir] list the file in the zipfile, and print the content of FILE_ID.ZIP or README.TXT if it exists */ /* change_file_date : change the date/time of a file filename : the filename of the file where date/time must be modified dosdate : the new date at the MSDos format (4 bytes) tmu_date : the SAME new date at the tm_unz format */ void change_file_date(filename,dosdate,tmu_date) const char *filename; uLong dosdate; tm_unz tmu_date; { #ifdef WIN32 HANDLE hFile; FILETIME ftm,ftLocal,ftCreate,ftLastAcc,ftLastWrite; hFile = CreateFile(filename,GENERIC_READ | GENERIC_WRITE, 0,0,OPEN_EXISTING,0,0); GetFileTime(hFile,&ftCreate,&ftLastAcc,&ftLastWrite); DosDateTimeToFileTime((WORD)(dosdate>>16),(WORD)dosdate,&ftLocal); LocalFileTimeToFileTime(&ftLocal,&ftm); SetFileTime(hFile,&ftm,&ftLastAcc,&ftm); CloseHandle(hFile); #else #ifdef unix struct utimbuf ut; struct tm newdate; newdate.tm_sec = tmu_date.tm_sec; newdate.tm_min=tmu_date.tm_min; newdate.tm_hour=tmu_date.tm_hour; newdate.tm_mday=tmu_date.tm_mday; newdate.tm_mon=tmu_date.tm_mon; if (tmu_date.tm_year > 1900) newdate.tm_year=tmu_date.tm_year - 1900; else newdate.tm_year=tmu_date.tm_year ; newdate.tm_isdst=-1; ut.actime=ut.modtime=mktime(&newdate); utime(filename,&ut); #endif #endif } /* mymkdir and change_file_date are not 100 % portable As I don't know well Unix, I wait feedback for the unix portion */ int mymkdir(dirname) const char* dirname; { int ret=0; #ifdef WIN32 ret = mkdir(dirname); #else #ifdef unix ret = mkdir (dirname,0775); #endif #endif return ret; } int makedir (newdir) char *newdir; { char *buffer ; char *p; int len = (int)strlen(newdir); if (len <= 0) return 0; buffer = (char*)malloc(len+1); strcpy(buffer,newdir); if (buffer[len-1] == '/') { buffer[len-1] = '\0'; } if (mymkdir(buffer) == 0) { free(buffer); return 1; } p = buffer+1; while (1) { char hold; while(*p && *p != '\\' && *p != '/') p++; hold = *p; *p = 0; if ((mymkdir(buffer) == -1) && (errno == ENOENT)) { printf("couldn't create directory %s\n",buffer); free(buffer); return 0; } if (hold == 0) break; *p++ = hold; } free(buffer); return 1; } void do_banner() { printf("MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant\n"); printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n"); } void do_help() { printf("Usage : miniunz [-e] [-x] [-v] [-l] [-o] [-p password] file.zip [file_to_extr.] [-d extractdir]\n\n" \ " -e Extract without pathname (junk paths)\n" \ " -x Extract with pathname\n" \ " -v list files\n" \ " -l list files\n" \ " -d directory to extract into\n" \ " -o overwrite files without prompting\n" \ " -p extract crypted file using password\n\n"); } int do_list(uf) unzFile uf; { uLong i; unz_global_info gi; int err; err = unzGetGlobalInfo (uf,&gi); if (err!=UNZ_OK) printf("error %d with zipfile in unzGetGlobalInfo \n",err); printf(" Length Method Size Ratio Date Time CRC-32 Name\n"); printf(" ------ ------ ---- ----- ---- ---- ------ ----\n"); for (i=0;i0) ratio = (file_info.compressed_size*100)/file_info.uncompressed_size; /* display a '*' if the file is crypted */ if ((file_info.flag & 1) != 0) charCrypt='*'; if (file_info.compression_method==0) string_method="Stored"; else if (file_info.compression_method==Z_DEFLATED) { uInt iLevel=(uInt)((file_info.flag & 0x6)/2); if (iLevel==0) string_method="Defl:N"; else if (iLevel==1) string_method="Defl:X"; else if ((iLevel==2) || (iLevel==3)) string_method="Defl:F"; /* 2:fast , 3 : extra fast*/ } else string_method="Unkn. "; printf("%7lu %6s%c%7lu %3lu%% %2.2lu-%2.2lu-%2.2lu %2.2lu:%2.2lu %8.8lx %s\n", file_info.uncompressed_size,string_method, charCrypt, file_info.compressed_size, ratio, (uLong)file_info.tmu_date.tm_mon + 1, (uLong)file_info.tmu_date.tm_mday, (uLong)file_info.tmu_date.tm_year % 100, (uLong)file_info.tmu_date.tm_hour,(uLong)file_info.tmu_date.tm_min, (uLong)file_info.crc,filename_inzip); if ((i+1)='a') && (rep<='z')) rep -= 0x20; } while ((rep!='Y') && (rep!='N') && (rep!='A')); } if (rep == 'N') skip = 1; if (rep == 'A') *popt_overwrite=1; } if ((skip==0) && (err==UNZ_OK)) { fout=fopen(write_filename,"wb"); /* some zipfile don't contain directory alone before file */ if ((fout==0) && ((*popt_extract_without_path)==0) && (filename_withoutpath!=(char*)filename_inzip)) { char c=*(filename_withoutpath-1); *(filename_withoutpath-1)='\0'; makedir(write_filename); *(filename_withoutpath-1)=c; fout=fopen(write_filename,"wb"); } if (fout==0) { printf("error opening %s\n",write_filename); } } if (fout!=0) { printf(" extracting: %s\n",write_filename); do { err = unzReadCurrentFile(uf,buf,size_buf); if (err<0) { printf("error %d with zipfile in unzReadCurrentFile\n",err); break; } if (err>0) if (fwrite(buf,err,1,fout)!=1) { printf("error in writing extracted file\n"); err=UNZ_ERRNO; break; } } while (err>0); if (fout) fclose(fout); if (err==0) change_file_date(write_filename,file_info.dosDate, file_info.tmu_date); } if (err==UNZ_OK) { err = unzCloseCurrentFile (uf); if (err!=UNZ_OK) { printf("error %d with zipfile in unzCloseCurrentFile\n",err); } } else unzCloseCurrentFile(uf); /* don't lose the error */ } free(buf); return err; } int do_extract(uf,opt_extract_without_path,opt_overwrite,password) unzFile uf; int opt_extract_without_path; int opt_overwrite; const char* password; { uLong i; unz_global_info gi; int err; FILE* fout=0; err = unzGetGlobalInfo (uf,&gi); if (err!=UNZ_OK) printf("error %d with zipfile in unzGetGlobalInfo \n",err); for (i=0;i= 8 # define DEF_MEM_LEVEL 8 # else # define DEF_MEM_LEVEL MAX_MEM_LEVEL # endif #endif /* default memLevel */ /* tm_zip contain date/time info */ typedef struct tm_zip_s { uInt tm_sec; /* seconds after the minute - [0,59] */ uInt tm_min; /* minutes after the hour - [0,59] */ uInt tm_hour; /* hours since midnight - [0,23] */ uInt tm_mday; /* day of the month - [1,31] */ uInt tm_mon; /* months since January - [0,11] */ uInt tm_year; /* years - [1980..2044] */ } tm_zip; typedef struct { tm_zip tmz_date; /* date in understandable format */ uLong dosDate; /* if dos_date == 0, tmu_date is used */ /* uLong flag; */ /* general purpose bit flag 2 bytes */ uLong internal_fa; /* internal file attributes 2 bytes */ uLong external_fa; /* external file attributes 4 bytes */ } zip_fileinfo; typedef const char* zipcharpc; #define APPEND_STATUS_CREATE (0) #define APPEND_STATUS_CREATEAFTER (1) #define APPEND_STATUS_ADDINZIP (2) extern zipFile MINIZIP_EXPORT zipOpen OF((const char *pathname, int append)); /* Create a zipfile. pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on an Unix computer "zlib/zlib113.zip". if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip will be created at the end of the file. (useful if the file contain a self extractor code) if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will add files in existing zip (be sure you don't add file that doesn't exist) If the zipfile cannot be opened, the return value is NULL. Else, the return value is a zipFile Handle, usable with other function of this zip package. */ /* Note : there is no delete function into a zipfile. If you want delete file into a zipfile, you must open a zipfile, and create another Of couse, you can use RAW reading and writing to copy the file you did not want delte */ extern zipFile MINIZIP_EXPORT zipOpen2 OF((const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc_def)); extern int MINIZIP_EXPORT zipOpenNewFileInZip OF((zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level)); //FUZZ: disable check_for_NULL /* Open a file in the ZIP for writing. filename : the filename in zip (if NULL, '-' without quote will be used *zipfi contain supplemental information if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local contains the extrafield data the the local header if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global contains the extrafield data the the local header if comment != NULL, comment contain the comment string method contain the compression method (0 for store, Z_DEFLATED for deflate) level contain the level of compression (can be Z_DEFAULT_COMPRESSION) */ //FUZZ: enable check_for_NULL extern int MINIZIP_EXPORT zipOpenNewFileInZip2 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int raw)); /* Same than zipOpenNewFileInZip, except if raw=1, we write raw file */ extern int MINIZIP_EXPORT zipOpenNewFileInZip3 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int raw, int windowBits, int memLevel, int strategy, const char* password, uLong crcForCtypting)); //FUZZ: disable check_for_NULL /* Same than zipOpenNewFileInZip2, except windowBits,memLevel,,strategy : see parameter strategy in deflateInit2 password : crypting password (NULL for no crypting) crcForCtypting : crc of file to compress (needed for crypting) */ //FUZZ: enable check_for_NULL extern int MINIZIP_EXPORT zipWriteInFileInZip OF((zipFile file, const void* buf, unsigned len)); /* Write data in the zipfile */ extern int MINIZIP_EXPORT zipCloseFileInZip OF((zipFile file)); /* Close the current file in the zipfile */ extern int MINIZIP_EXPORT zipCloseFileInZipRaw OF((zipFile file, uLong uncompressed_size, uLong crc32)); /* Close the current file in the zipfile, for fiel opened with parameter raw=1 in zipOpenNewFileInZip2 uncompressed_size and crc32 are value for the uncompressed size */ extern int MINIZIP_EXPORT zipClose OF((zipFile file, const char* global_comment)); /* Close the zipfile */ #ifdef __cplusplus } #endif #endif /* _zip_H */ ace-6.4.5+dfsg.orig/contrib/minizip/ioapi.c0000644000175000017500000000715013154167357016663 0ustar tggtgg/* ioapi.c -- IO base function header for compress/uncompress .zip files using zlib + zip or unzip API Version 1.01e, February 12th, 2005 Copyright (C) 1998-2005 Gilles Vollant */ #include #include #include #include "zlib.h" #include "ioapi.h" /* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ #ifndef SEEK_CUR #define SEEK_CUR 1 #endif #ifndef SEEK_END #define SEEK_END 2 #endif #ifndef SEEK_SET #define SEEK_SET 0 #endif voidpf ZCALLBACK fopen_file_func OF(( voidpf opaque, const char* filename, int mode)); uLong ZCALLBACK fread_file_func OF(( voidpf opaque, voidpf stream, void* buf, uLong size)); uLong ZCALLBACK fwrite_file_func OF(( voidpf opaque, voidpf stream, const void* buf, uLong size)); long ZCALLBACK ftell_file_func OF(( voidpf opaque, voidpf stream)); long ZCALLBACK fseek_file_func OF(( voidpf opaque, voidpf stream, uLong offset, int origin)); int ZCALLBACK fclose_file_func OF(( voidpf opaque, voidpf stream)); int ZCALLBACK ferror_file_func OF(( voidpf opaque, voidpf stream)); voidpf ZCALLBACK fopen_file_func ( voidpf opaque,const char* filename,int mode) { FILE* file = 0; const char* mode_fopen = 0; MINIZIP_UNUSED_ARG (opaque); if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) mode_fopen = "rb"; else if (mode & ZLIB_FILEFUNC_MODE_EXISTING) mode_fopen = "r+b"; else if (mode & ZLIB_FILEFUNC_MODE_CREATE) mode_fopen = "wb"; if ((filename != 0) && (mode_fopen != 0)) file = fopen(filename, mode_fopen); return file; } uLong ZCALLBACK fread_file_func (voidpf opaque,voidpf stream,void* buf,uLong size) { uLong ret; MINIZIP_UNUSED_ARG (opaque); ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream); return ret; } uLong ZCALLBACK fwrite_file_func (voidpf opaque,voidpf stream,const void* buf,uLong size) { uLong ret; MINIZIP_UNUSED_ARG (opaque); ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream); return ret; } long ZCALLBACK ftell_file_func (opaque, stream) voidpf opaque; voidpf stream; { long ret; MINIZIP_UNUSED_ARG (opaque); ret = ftell((FILE *)stream); return ret; } long ZCALLBACK fseek_file_func (voidpf opaque,voidpf stream,uLong offset,int origin) { int fseek_origin=0; long ret; MINIZIP_UNUSED_ARG (opaque); switch (origin) { case ZLIB_FILEFUNC_SEEK_CUR : fseek_origin = SEEK_CUR; break; case ZLIB_FILEFUNC_SEEK_END : fseek_origin = SEEK_END; break; case ZLIB_FILEFUNC_SEEK_SET : fseek_origin = SEEK_SET; break; default: return -1; } ret = 0; fseek((FILE *)stream, offset, fseek_origin); return ret; } int ZCALLBACK fclose_file_func (voidpf opaque,voidpf stream) { int ret; MINIZIP_UNUSED_ARG (opaque); ret = fclose((FILE *)stream); return ret; } int ZCALLBACK ferror_file_func (voidpf opaque,voidpf stream) { int ret; MINIZIP_UNUSED_ARG (opaque); ret = ferror((FILE *)stream); return ret; } void fill_fopen_filefunc (zlib_filefunc_def* pzlib_filefunc_def) { pzlib_filefunc_def->zopen_file = fopen_file_func; pzlib_filefunc_def->zread_file = fread_file_func; pzlib_filefunc_def->zwrite_file = fwrite_file_func; pzlib_filefunc_def->ztell_file = ftell_file_func; pzlib_filefunc_def->zseek_file = fseek_file_func; pzlib_filefunc_def->zclose_file = fclose_file_func; pzlib_filefunc_def->zerror_file = ferror_file_func; pzlib_filefunc_def->opaque = 0; } ace-6.4.5+dfsg.orig/contrib/minizip/minizip_export.h0000644000175000017500000000201113154167357020636 0ustar tggtgg // -*- C++ -*- // Definition for Win32 Export directives. #ifndef MINIZIP_EXPORT_H #define MINIZIP_EXPORT_H #if defined (MINIZIP_AS_STATIC_LIBS) # if !defined (MINIZIP_HAS_DLL) # define MINIZIP_HAS_DLL 0 # endif /* ! MINIZIP_HAS_DLL */ #else # if !defined (MINIZIP_HAS_DLL) # define MINIZIP_HAS_DLL 1 # endif /* ! MINIZIP_HAS_DLL */ #endif /* MINIZIP_AS_STATIC_LIBS */ #if defined (MINIZIP_HAS_DLL) # if (MINIZIP_HAS_DLL == 1) && defined (_WINDOWS) # if defined (MINIZIP_BUILD_DLL) # define MINIZIP_EXPORT __declspec(dllexport) # else /* MINIZIP_BUILD_DLL */ # define MINIZIP_EXPORT __declspec(dllimport) # endif /* MINIZIP_BUILD_DLL */ # else /* MINIZIP_HAS_DLL == 1 */ # define MINIZIP_EXPORT # endif /* MINIZIP_HAS_DLL == 1 */ #endif /* MINIZIP_HAS_DLL */ #if defined (__GNUC__) && ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))) # define MINIZIP_UNUSED_ARG(a) (void) (a) #else # define MINIZIP_UNUSED_ARG(a) do {/* null */} while (&a == 0) #endif #endif /* MINIZIP_EXPORT_H */ ace-6.4.5+dfsg.orig/contrib/minizip/minizip.c0000644000175000017500000002654013154167357017245 0ustar tggtgg/* minizip.c Version 1.01e, February 12th, 2005 Copyright (C) 1998-2005 Gilles Vollant */ #include #include #include #include #include #include #ifdef unix # include # include # include # include #else # include # include #endif #include "zip.h" #ifdef WIN32 #define USEWIN32IOAPI #include "iowin32.h" #endif #define WRITEBUFFERSIZE (16384) #define MAXFILENAME (256) #ifdef WIN32 uLong filetime(f, tmzip, dt) char *f; /* name of file to get info on */ tm_zip *tmzip; /* return value: access, modific. and creation times */ uLong *dt; /* dostime */ { int ret = 0; { FILETIME ftLocal; HANDLE hFind; WIN32_FIND_DATA ff32; hFind = FindFirstFile(f,&ff32); if (hFind != INVALID_HANDLE_VALUE) { FileTimeToLocalFileTime(&(ff32.ftLastWriteTime),&ftLocal); FileTimeToDosDateTime(&ftLocal,((LPWORD)dt)+1,((LPWORD)dt)+0); FindClose(hFind); ret = 1; } } return ret; } #else #ifdef unix uLong filetime(f, tmzip, dt) char *f; /* name of file to get info on */ tm_zip *tmzip; /* return value: access, modific. and creation times */ uLong *dt; /* dostime */ { int ret=0; struct stat s; /* results of stat() */ struct tm* filedate; time_t tm_t=0; if (strcmp(f,"-")!=0) { char name[MAXFILENAME+1]; int len = strlen(f); if (len > MAXFILENAME) len = MAXFILENAME; strncpy(name, f,MAXFILENAME-1); /* strncpy doesnt append the trailing NULL, of the string is too long. */ name[ MAXFILENAME ] = '\0'; if (name[len - 1] == '/') name[len - 1] = '\0'; /* not all systems allow stat'ing a file with / appended */ if (stat(name,&s)==0) { tm_t = s.st_mtime; ret = 1; } } filedate = localtime(&tm_t); tmzip->tm_sec = filedate->tm_sec; tmzip->tm_min = filedate->tm_min; tmzip->tm_hour = filedate->tm_hour; tmzip->tm_mday = filedate->tm_mday; tmzip->tm_mon = filedate->tm_mon ; tmzip->tm_year = filedate->tm_year; return ret; } #else uLong filetime(f, tmzip, dt) char *f; /* name of file to get info on */ tm_zip *tmzip; /* return value: access, modific. and creation times */ uLong *dt; /* dostime */ { return 0; } #endif #endif int check_exist_file(filename) const char* filename; { FILE* ftestexist; int ret = 1; ftestexist = fopen(filename,"rb"); if (ftestexist==0) ret = 0; else fclose(ftestexist); return ret; } void do_banner() { printf("MiniZip 1.01b, demo of zLib + Zip package written by Gilles Vollant\n"); printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n"); } void do_help() { printf("Usage : minizip [-o] [-a] [-0 to -9] [-p password] file.zip [files_to_add]\n\n" \ " -o Overwrite existing file.zip\n" \ " -a Append to existing file.zip\n" \ " -0 Store only\n" \ " -1 Compress faster\n" \ " -9 Compress better\n\n"); } /* calculate the CRC32 of a file, because to encrypt a file, we need known the CRC32 of the file before */ int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigned long* result_crc) { unsigned long calculate_crc=0; int err=ZIP_OK; FILE * fin = fopen(filenameinzip,"rb"); unsigned long size_read = 0; unsigned long total_read = 0; if (fin==0) { err = ZIP_ERRNO; } if (err == ZIP_OK) do { err = ZIP_OK; size_read = (int)fread(buf,1,size_buf,fin); if (size_read < size_buf) if (feof(fin)==0) { printf("error in reading %s\n",filenameinzip); err = ZIP_ERRNO; } if (size_read>0) calculate_crc = crc32(calculate_crc,buf,size_read); total_read += size_read; } while ((err == ZIP_OK) && (size_read>0)); if (fin) fclose(fin); *result_crc=calculate_crc; printf("file %s crc %x\n",filenameinzip,calculate_crc); return err; } int main(argc,argv) int argc; char *argv[]; { int i; int opt_overwrite=0; int opt_compress_level=Z_DEFAULT_COMPRESSION; int zipfilenamearg = 0; char filename_try[MAXFILENAME+16]; int zipok; int err=0; int size_buf=0; void* buf=0; const char* password=0; do_banner(); if (argc==1) { do_help(); return 0; } else { for (i=1;i='0') && (c<='9')) opt_compress_level = c-'0'; if (((c=='p') || (c=='P')) && (i+1='a') && (rep<='z')) rep -= 0x20; } while ((rep!='Y') && (rep!='N') && (rep!='A')); if (rep=='N') zipok = 0; if (rep=='A') opt_overwrite = 2; } } if (zipok==1) { zipFile zf; int errclose; # ifdef USEWIN32IOAPI zlib_filefunc_def ffunc; fill_win32_filefunc(&ffunc); zf = zipOpen2(filename_try,(opt_overwrite==2) ? 2 : 0,0,&ffunc); # else zf = zipOpen(filename_try,(opt_overwrite==2) ? 2 : 0); # endif if (zf == 0) { printf("error opening %s\n",filename_try); err= ZIP_ERRNO; } else printf("creating %s\n",filename_try); for (i=zipfilenamearg+1;(i='0') || (argv[i][1]<='9'))) && (strlen(argv[i]) == 2))) { FILE * fin; int size_read; const char* filenameinzip = argv[i]; zip_fileinfo zi; unsigned long crcFile=0; zi.tmz_date.tm_sec = zi.tmz_date.tm_min = zi.tmz_date.tm_hour = zi.tmz_date.tm_mday = zi.tmz_date.tm_mon = zi.tmz_date.tm_year = 0; zi.dosDate = 0; zi.internal_fa = 0; zi.external_fa = 0; filetime(filenameinzip,&zi.tmz_date,&zi.dosDate); /* err = zipOpenNewFileInZip(zf,filenameinzip,&zi, 0,0,0,0,0 / * comment * /, (opt_compress_level != 0) ? Z_DEFLATED : 0, opt_compress_level); */ if ((password != 0) && (err==ZIP_OK)) err = getFileCrc(filenameinzip,buf,size_buf,&crcFile); err = zipOpenNewFileInZip3(zf,filenameinzip,&zi, 0,0,0,0,0 /* comment*/, (opt_compress_level != 0) ? Z_DEFLATED : 0, opt_compress_level,0, /* -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, */ -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, password,crcFile); if (err != ZIP_OK) printf("error in opening %s in zipfile\n",filenameinzip); else { fin = fopen(filenameinzip,"rb"); if (fin==0) { err=ZIP_ERRNO; printf("error in opening %s for reading\n",filenameinzip); } } if (err == ZIP_OK) do { err = ZIP_OK; size_read = (int)fread(buf,1,size_buf,fin); if (size_read < size_buf) if (feof(fin)==0) { printf("error in reading %s\n",filenameinzip); err = ZIP_ERRNO; } if (size_read>0) { err = zipWriteInFileInZip (zf,buf,size_read); if (err<0) { printf("error in writing %s in the zipfile\n", filenameinzip); } } } while ((err == ZIP_OK) && (size_read>0)); if (fin) fclose(fin); if (err<0) err=ZIP_ERRNO; else { err = zipCloseFileInZip(zf); if (err!=ZIP_OK) printf("error in closing %s in the zipfile\n", filenameinzip); } } } errclose = zipClose(zf,0); if (errclose != ZIP_OK) printf("error in closing %s\n",filename_try); } else { do_help(); } free(buf); return 0; } ace-6.4.5+dfsg.orig/contrib/minizip/unzip.h0000644000175000017500000003246313154167357016741 0ustar tggtgg/* unzip.h -- IO for uncompress .zip files using zlib Version 1.01e, February 12th, 2005 Copyright (C) 1998-2005 Gilles Vollant This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g WinZip, InfoZip tools and compatible. Multi volume ZipFile (span) are not supported. Encryption compatible with pkzip 2.04g only supported Old compressions used by old PKZip 1.x are not supported I WAIT FEEDBACK at mail info@winimage.com Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution Condition of use and distribution are the same than zlib : This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ /* for more info about .ZIP format, see http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip http://www.info-zip.org/pub/infozip/doc/ PkWare has also a specification at : ftp://ftp.pkware.com/probdesc.zip */ /* Modifications to minizip by ACE/TAO/CIAO developers: 1. Added include of minizip_export.h to make minizip compile under Windows as a DLL 2. Modified the function declarations to be conformant with ANSI C */ #ifndef _unz_H #define _unz_H #ifdef __cplusplus extern "C" { #endif #ifndef _ZLIB_H #include "zlib.h" #endif #include "minizip_export.h" #ifndef _ZLIBIOAPI_H #include "ioapi.h" #endif #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) /* like the STRICT of WIN32, we define a pointer that cannot be converted from (void*) without cast */ typedef struct TagunzFile__ { int unused; } unzFile__; typedef unzFile__ *unzFile; #else typedef voidp unzFile; #endif #define UNZ_OK (0) #define UNZ_END_OF_LIST_OF_FILE (-100) #define UNZ_ERRNO (Z_ERRNO) #define UNZ_EOF (0) #define UNZ_PARAMERROR (-102) #define UNZ_BADZIPFILE (-103) #define UNZ_INTERNALERROR (-104) #define UNZ_CRCERROR (-105) /* tm_unz contain date/time info */ typedef struct tm_unz_s { uInt tm_sec; /* seconds after the minute - [0,59] */ uInt tm_min; /* minutes after the hour - [0,59] */ uInt tm_hour; /* hours since midnight - [0,23] */ uInt tm_mday; /* day of the month - [1,31] */ uInt tm_mon; /* months since January - [0,11] */ uInt tm_year; /* years - [1980..2044] */ } tm_unz; /* unz_global_info structure contain global data about the ZIPfile These data comes from the end of central dir */ typedef struct unz_global_info_s { uLong number_entry; /* total number of entries in the central dir on this disk */ uLong size_comment; /* size of the global comment of the zipfile */ } unz_global_info; /* unz_file_info contain information about a file in the zipfile */ typedef struct unz_file_info_s { uLong version; /* version made by 2 bytes */ uLong version_needed; /* version needed to extract 2 bytes */ uLong flag; /* general purpose bit flag 2 bytes */ uLong compression_method; /* compression method 2 bytes */ uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ uLong crc; /* crc-32 4 bytes */ uLong compressed_size; /* compressed size 4 bytes */ uLong uncompressed_size; /* uncompressed size 4 bytes */ uLong size_filename; /* filename length 2 bytes */ uLong size_file_extra; /* extra field length 2 bytes */ uLong size_file_comment; /* file comment length 2 bytes */ uLong disk_num_start; /* disk number start 2 bytes */ uLong internal_fa; /* internal file attributes 2 bytes */ uLong external_fa; /* external file attributes 4 bytes */ tm_unz tmu_date; } unz_file_info; extern int MINIZIP_EXPORT unzStringFileNameCompare OF ((const char* fileName1, const char* fileName2, int iCaseSensitivity)); /* Compare two filename (fileName1,fileName2). If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi or strcasecmp) If iCaseSenisivity = 0, case sensitivity is defaut of your operating system (like 1 on Unix, 2 on Windows) */ extern unzFile MINIZIP_EXPORT unzOpen OF((const char *path)); /* Open a Zip file. path contain the full pathname (by example, on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer "zlib/zlib113.zip". If the zipfile cannot be opened (file don't exist or in not valid), the return value is NULL. Else, the return value is a unzFile Handle, usable with other function of this unzip package. */ extern unzFile MINIZIP_EXPORT unzOpen2 OF((const char *path, zlib_filefunc_def* pzlib_filefunc_def)); /* Open a Zip file, like unzOpen, but provide a set of file low level API for read/write the zip file (see ioapi.h) */ extern int MINIZIP_EXPORT unzClose OF((unzFile file)); /* Close a ZipFile opened with unzipOpen. If there is files inside the .Zip opened with unzOpenCurrentFile (see later), these files MUST be closed with unzipCloseCurrentFile before call unzipClose. return UNZ_OK if there is no problem. */ extern int MINIZIP_EXPORT unzGetGlobalInfo OF((unzFile file, unz_global_info *pglobal_info)); /* Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed return UNZ_OK if there is no problem. */ extern int MINIZIP_EXPORT unzGetGlobalComment OF((unzFile file, char *szComment, uLong uSizeBuf)); /* Get the global comment string of the ZipFile, in the szComment buffer. uSizeBuf is the size of the szComment buffer. return the number of byte copied or an error code <0 */ /***************************************************************************/ /* Unzip package allow you browse the directory of the zipfile */ extern int MINIZIP_EXPORT unzGoToFirstFile OF((unzFile file)); /* Set the current file of the zipfile to the first file. return UNZ_OK if there is no problem */ extern int MINIZIP_EXPORT unzGoToNextFile OF((unzFile file)); /* Set the current file of the zipfile to the next file. return UNZ_OK if there is no problem return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. */ extern int MINIZIP_EXPORT unzLocateFile OF((unzFile file, const char *szFileName, int iCaseSensitivity)); /* Try locate the file szFileName in the zipfile. For the iCaseSensitivity signification, see unzStringFileNameCompare return value : UNZ_OK if the file is found. It becomes the current file. UNZ_END_OF_LIST_OF_FILE if the file is not found */ /* ****************************************** */ /* Ryan supplied functions */ /* unz_file_info contain information about a file in the zipfile */ typedef struct unz_file_pos_s { uLong pos_in_zip_directory; /* offset in zip file directory */ uLong num_of_file; /* # of file */ } unz_file_pos; extern int MINIZIP_EXPORT unzGetFilePos( unzFile file, unz_file_pos* file_pos); extern int MINIZIP_EXPORT unzGoToFilePos( unzFile file, unz_file_pos* file_pos); /* ****************************************** */ extern int MINIZIP_EXPORT unzGetCurrentFileInfo OF((unzFile file, unz_file_info *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)); //FUZZ: disable check_for_NULL /* Get Info about the current file if pfile_info!=NULL, the *pfile_info structure will contain somes info about the current file if szFileName!=NULL, the filemane string will be copied in szFileName (fileNameBufferSize is the size of the buffer) if extraField!=NULL, the extra field information will be copied in extraField (extraFieldBufferSize is the size of the buffer). This is the Central-header version of the extra field if szComment!=NULL, the comment string of the file will be copied in szComment (commentBufferSize is the size of the buffer) */ //FUZZ: enable check_for_NULL /***************************************************************************/ /* for reading the content of the current zipfile, you can open it, read data from it, and close it (you can close it before reading all the file) */ extern int MINIZIP_EXPORT unzOpenCurrentFile OF((unzFile file)); /* Open for reading data the current file in the zipfile. If there is no error, the return value is UNZ_OK. */ extern int MINIZIP_EXPORT unzOpenCurrentFilePassword OF((unzFile file, const char* password)); /* Open for reading data the current file in the zipfile. password is a crypting password If there is no error, the return value is UNZ_OK. */ extern int MINIZIP_EXPORT unzOpenCurrentFile2 OF((unzFile file, int* method, int* level, int raw)); //FUZZ: disable check_for_NULL /* Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) if raw==1 *method will receive method of compression, *level will receive level of compression note : you can set level parameter as NULL (if you did not want known level, but you CANNOT set method parameter as NULL */ //FUZZ: enable check_for_NULL extern int MINIZIP_EXPORT unzOpenCurrentFile3 OF((unzFile file, int* method, int* level, int raw, const char* password)); //FUZZ: disable check_for_NULL /* Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) if raw==1 *method will receive method of compression, *level will receive level of compression note : you can set level parameter as NULL (if you did not want known level, but you CANNOT set method parameter as NULL */ //FUZZ: enable check_for_NULL extern int MINIZIP_EXPORT unzCloseCurrentFile OF((unzFile file)); /* Close the file in zip opened with unzOpenCurrentFile Return UNZ_CRCERROR if all the file was read but the CRC is not good */ extern int MINIZIP_EXPORT unzReadCurrentFile OF((unzFile file, voidp buf, unsigned len)); /* Read bytes from the current file (opened by unzOpenCurrentFile) buf contain buffer where data must be copied len the size of buf. return the number of byte copied if somes bytes are copied return 0 if the end of file was reached return <0 with error code if there is an error (UNZ_ERRNO for IO error, or zLib error for uncompress error) */ extern z_off_t MINIZIP_EXPORT unztell OF((unzFile file)); /* Give the current position in uncompressed data */ extern int MINIZIP_EXPORT unzeof OF((unzFile file)); /* return 1 if the end of file was reached, 0 elsewhere */ extern int MINIZIP_EXPORT unzGetLocalExtrafield OF((unzFile file, voidp buf, unsigned len)); //FUZZ: disable check_for_NULL /* Read extra field from the current file (opened by unzOpenCurrentFile) This is the local-header version of the extra field (sometimes, there is more info in the local-header version than in the central-header) if buf==NULL, it return the size of the local extra field if buf!=NULL, len is the size of the buffer, the extra header is copied in buf. the return value is the number of bytes copied in buf, or (if <0) the error code */ //FUZZ: enable check_for_NULL /***************************************************************************/ /* Get the current file offset */ extern uLong MINIZIP_EXPORT unzGetOffset (unzFile file); /* Set the current file offset */ extern int MINIZIP_EXPORT unzSetOffset (unzFile file, uLong pos); #ifdef __cplusplus } #endif #endif /* _unz_H */ ace-6.4.5+dfsg.orig/contrib/minizip/zip.c0000644000175000017500000010420413154167357016362 0ustar tggtgg/* zip.c -- IO on .zip files using zlib Version 1.01e, February 12th, 2005 27 Dec 2004 Rolf Kalbermatter Modification to zipOpen2 to support globalComment retrieval. Copyright (C) 1998-2005 Gilles Vollant Read zip.h for more info */ #include #include #include #include #include "zlib.h" #include "zip.h" #ifdef STDC # include # include # include #endif #ifdef NO_ERRNO_H extern int errno; #else # include #endif #ifndef local # define local static #endif /* compile with -Dlocal if your debugger can't find static symbols */ #ifndef VERSIONMADEBY # define VERSIONMADEBY (0x0) /* platform depedent */ #endif #ifndef Z_BUFSIZE #define Z_BUFSIZE (16384) #endif #ifndef Z_MAXFILENAMEINZIP #define Z_MAXFILENAMEINZIP (256) #endif #ifndef ALLOC # define ALLOC(size) (malloc(size)) #endif #ifndef TRYFREE # define TRYFREE(p) {if (p) free(p);} #endif /* #define SIZECENTRALDIRITEM (0x2e) #define SIZEZIPLOCALHEADER (0x1e) */ /* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ #ifndef SEEK_CUR #define SEEK_CUR 1 #endif #ifndef SEEK_END #define SEEK_END 2 #endif #ifndef SEEK_SET #define SEEK_SET 0 #endif #ifndef DEF_MEM_LEVEL #if MAX_MEM_LEVEL >= 8 # define DEF_MEM_LEVEL 8 #else # define DEF_MEM_LEVEL MAX_MEM_LEVEL #endif #endif const char zip_copyright[] = " zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; #define SIZEDATA_INDATABLOCK (4096-(4*4)) #define LOCALHEADERMAGIC (0x04034b50) #define CENTRALHEADERMAGIC (0x02014b50) #define ENDHEADERMAGIC (0x06054b50) #define FLAG_LOCALHEADER_OFFSET (0x06) #define CRC_LOCALHEADER_OFFSET (0x0e) #define SIZECENTRALHEADER (0x2e) /* 46 */ typedef struct linkedlist_datablock_internal_s { struct linkedlist_datablock_internal_s* next_datablock; uLong avail_in_this_block; uLong filled_in_this_block; uLong unused; /* for future use and alignement */ unsigned char data[SIZEDATA_INDATABLOCK]; } linkedlist_datablock_internal; typedef struct linkedlist_data_s { linkedlist_datablock_internal* first_block; linkedlist_datablock_internal* last_block; } linkedlist_data; typedef struct { z_stream stream; /* zLib stream structure for inflate */ int stream_initialised; /* 1 is stream is initialised */ uInt pos_in_buffered_data; /* last written byte in buffered_data */ uLong pos_local_header; /* offset of the local header of the file currenty writing */ char* central_header; /* central header data for the current file */ uLong size_centralheader; /* size of the central header for cur file */ uLong flag; /* flag of the file currently writing */ int method; /* compression method of file currenty wr.*/ int raw; /* 1 for directly writing raw data */ Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/ uLong dosDate; uLong crc32; int encrypt; #ifndef NOCRYPT unsigned long keys[3]; /* keys defining the pseudo-random sequence */ const unsigned long* pcrc_32_tab; int crypt_header_size; #endif } curfile_info; typedef struct { zlib_filefunc_def z_filefunc; voidpf filestream; /* io structore of the zipfile */ linkedlist_data central_dir;/* datablock with central dir in construction*/ int in_opened_file_inzip; /* 1 if a file in the zip is currently writ.*/ curfile_info ci; /* info on the file curretly writing */ uLong begin_pos; /* position of the beginning of the zipfile */ uLong add_position_when_writting_offset; uLong number_entry; #ifndef NO_ADDFILEINEXISTINGZIP char *globalcomment; #endif } zip_internal; #ifndef NOCRYPT #define INCLUDECRYPTINGCODE_IFCRYPTALLOWED #include "crypt.h" #endif local linkedlist_datablock_internal* allocate_new_datablock() { linkedlist_datablock_internal* ldi; ldi = (linkedlist_datablock_internal*) ALLOC(sizeof(linkedlist_datablock_internal)); if (ldi!=0) { ldi->next_datablock = 0; ldi->filled_in_this_block = 0 ; ldi->avail_in_this_block = SIZEDATA_INDATABLOCK ; } return ldi; } local void free_datablock( linkedlist_datablock_internal* ldi) { while (ldi!=0) { linkedlist_datablock_internal* ldinext = ldi->next_datablock; TRYFREE(ldi); ldi = ldinext; } } local void init_linkedlist(linkedlist_data* ll) { ll->first_block = ll->last_block = 0; } /* local void free_linkedlist(linkedlist_data* ll) */ /* { */ /* free_datablock(ll->first_block); */ /* ll->first_block = ll->last_block = 0; */ /* } */ local int add_data_in_datablock(linkedlist_data* ll,const void* buf,uLong len) { linkedlist_datablock_internal* ldi; const unsigned char* from_copy; if (ll==0) return ZIP_INTERNALERROR; if (ll->last_block == 0) { ll->first_block = ll->last_block = allocate_new_datablock(); if (ll->first_block == 0) return ZIP_INTERNALERROR; } ldi = ll->last_block; from_copy = (unsigned char*)buf; while (len>0) { uInt copy_this; uInt i; unsigned char* to_copy; if (ldi->avail_in_this_block==0) { ldi->next_datablock = allocate_new_datablock(); if (ldi->next_datablock == 0) return ZIP_INTERNALERROR; ldi = ldi->next_datablock ; ll->last_block = ldi; } if (ldi->avail_in_this_block < len) copy_this = (uInt)ldi->avail_in_this_block; else copy_this = (uInt)len; to_copy = &(ldi->data[ldi->filled_in_this_block]); for (i=0;ifilled_in_this_block += copy_this; ldi->avail_in_this_block -= copy_this; from_copy += copy_this ; len -= copy_this; } return ZIP_OK; } /****************************************************************************/ #ifndef NO_ADDFILEINEXISTINGZIP /* =========================================================================== Inputs a long in LSB order to the given file nbByte == 1, 2 or 4 (byte, short or long) */ local int ziplocal_putValue OF((const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream, uLong x, int nbByte)); local int ziplocal_putValue (const zlib_filefunc_def* pzlib_filefunc_def,voidpf filestream,uLong x,int nbByte) { unsigned char buf[4]; int n; for (n = 0; n < nbByte; n++) { buf[n] = (unsigned char)(x & 0xff); x >>= 8; } if (x != 0) { /* data overflow - hack for ZIP64 (X Roche) */ for (n = 0; n < nbByte; n++) { buf[n] = 0xff; } } if (ZWRITE(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte) return ZIP_ERRNO; else return ZIP_OK; } local void ziplocal_putValue_inmemory OF((void* dest, uLong x, int nbByte)); local void ziplocal_putValue_inmemory (void* dest,uLong x,int nbByte) { unsigned char* buf=(unsigned char*)dest; int n; for (n = 0; n < nbByte; n++) { buf[n] = (unsigned char)(x & 0xff); x >>= 8; } if (x != 0) { /* data overflow - hack for ZIP64 */ for (n = 0; n < nbByte; n++) { buf[n] = 0xff; } } } /****************************************************************************/ local uLong ziplocal_TmzDateToDosDate(const tm_zip* ptm,uLong dosDate) { uLong year = (uLong)ptm->tm_year; MINIZIP_UNUSED_ARG(dosDate); if (year>1980) year-=1980; else if (year>80) year-=80; return (uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) | ((ptm->tm_sec/2) + (32* ptm->tm_min) + (2048 * (uLong)ptm->tm_hour)); } /****************************************************************************/ local int ziplocal_getByte OF((const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream, int *pi)); local int ziplocal_getByte(const zlib_filefunc_def* pzlib_filefunc_def,voidpf filestream,int *pi) { unsigned char c; int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1); if (err==1) { *pi = (int)c; return ZIP_OK; } else { if (ZERROR(*pzlib_filefunc_def,filestream)) return ZIP_ERRNO; else return ZIP_EOF; } } /* =========================================================================== Reads a long in LSB order from the given gz_stream. Sets */ local int ziplocal_getShort OF((const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); local int ziplocal_getShort (const zlib_filefunc_def* pzlib_filefunc_def,voidpf filestream,uLong *pX) { uLong x ; int i = 0; int err; err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); x = (uLong)i; if (err==ZIP_OK) err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<8; if (err==ZIP_OK) *pX = x; else *pX = 0; return err; } local int ziplocal_getLong OF((const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); local int ziplocal_getLong (const zlib_filefunc_def* pzlib_filefunc_def,voidpf filestream,uLong *pX) { uLong x ; int i = 0; int err; err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); x = (uLong)i; if (err==ZIP_OK) err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<8; if (err==ZIP_OK) err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<16; if (err==ZIP_OK) err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<24; if (err==ZIP_OK) *pX = x; else *pX = 0; return err; } #ifndef BUFREADCOMMENT #define BUFREADCOMMENT (0x400) #endif /* Locate the Central directory of a zipfile (at the end, just before the global comment) */ local uLong ziplocal_SearchCentralDir OF((const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream)); local uLong ziplocal_SearchCentralDir(const zlib_filefunc_def* pzlib_filefunc_def,voidpf filestream) { unsigned char* buf; uLong uSizeFile; uLong uBackRead; uLong uMaxBack=0xffff; /* maximum size of global comment */ uLong uPosFound=0; if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) return 0; uSizeFile = ZTELL(*pzlib_filefunc_def,filestream); if (uMaxBack>uSizeFile) uMaxBack = uSizeFile; buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); if (buf==0) return 0; uBackRead = 4; while (uBackReaduMaxBack) uBackRead = uMaxBack; else uBackRead+=BUFREADCOMMENT; uReadPos = uSizeFile-uBackRead ; uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? (BUFREADCOMMENT+4) : (uSizeFile-uReadPos); if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) break; if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) break; for (i=(int)uReadSize-3; (i--)>0;) if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) { uPosFound = uReadPos+i; break; } if (uPosFound!=0) break; } TRYFREE(buf); return uPosFound; } #endif /* !NO_ADDFILEINEXISTINGZIP*/ /************************************************************/ extern MINIZIP_EXPORT zipFile zipOpen2 (const char *pathname,int append,zipcharpc* globalcomment,zlib_filefunc_def* pzlib_filefunc_def) { zip_internal ziinit; zip_internal* zi; int err=ZIP_OK; if (pzlib_filefunc_def==0) fill_fopen_filefunc(&ziinit.z_filefunc); else ziinit.z_filefunc = *pzlib_filefunc_def; ziinit.filestream = (*(ziinit.z_filefunc.zopen_file)) (ziinit.z_filefunc.opaque, pathname, (append == APPEND_STATUS_CREATE) ? (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) : (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_EXISTING)); if (ziinit.filestream == 0) return 0; ziinit.begin_pos = ZTELL(ziinit.z_filefunc,ziinit.filestream); ziinit.in_opened_file_inzip = 0; ziinit.ci.stream_initialised = 0; ziinit.number_entry = 0; ziinit.add_position_when_writting_offset = 0; init_linkedlist(&(ziinit.central_dir)); zi = (zip_internal*)ALLOC(sizeof(zip_internal)); if (zi==0) { ZCLOSE(ziinit.z_filefunc,ziinit.filestream); return 0; } /* now we add file in a zipfile */ # ifndef NO_ADDFILEINEXISTINGZIP ziinit.globalcomment = 0; if (append == APPEND_STATUS_ADDINZIP) { uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ uLong size_central_dir; /* size of the central directory */ uLong offset_central_dir; /* offset of start of central directory */ uLong central_pos,uL; uLong number_disk; /* number of the current dist, used for spaning ZIP, unsupported, always 0*/ uLong number_disk_with_CD; /* number the the disk with central dir, used for spaning ZIP, unsupported, always 0*/ uLong number_entry; uLong number_entry_CD; /* total number of entries in the central dir (same than number_entry on nospan) */ uLong size_comment; central_pos = ziplocal_SearchCentralDir(&ziinit.z_filefunc,ziinit.filestream); if (central_pos==0) err=ZIP_ERRNO; if (ZSEEK(ziinit.z_filefunc, ziinit.filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) err=ZIP_ERRNO; /* the signature, already checked */ if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&uL)!=ZIP_OK) err=ZIP_ERRNO; /* number of this disk */ if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk)!=ZIP_OK) err=ZIP_ERRNO; /* number of the disk with the start of the central directory */ if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk_with_CD)!=ZIP_OK) err=ZIP_ERRNO; /* total number of entries in the central dir on this disk */ if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry)!=ZIP_OK) err=ZIP_ERRNO; /* total number of entries in the central dir */ if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry_CD)!=ZIP_OK) err=ZIP_ERRNO; if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) err=ZIP_BADZIPFILE; /* size of the central directory */ if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&size_central_dir)!=ZIP_OK) err=ZIP_ERRNO; /* offset of start of central directory with respect to the starting disk number */ if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&offset_central_dir)!=ZIP_OK) err=ZIP_ERRNO; /* zipfile global comment length */ if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&size_comment)!=ZIP_OK) err=ZIP_ERRNO; if ((central_pos0) { ziinit.globalcomment = ALLOC(size_comment+1); if (ziinit.globalcomment) { size_comment = ZREAD(ziinit.z_filefunc, ziinit.filestream, ziinit.globalcomment, size_comment); ziinit.globalcomment[size_comment]=0; } } byte_before_the_zipfile = central_pos - (offset_central_dir+size_central_dir); ziinit.add_position_when_writting_offset = byte_before_the_zipfile; { uLong size_central_dir_to_read = size_central_dir; size_t buf_size = SIZEDATA_INDATABLOCK; void* buf_read = (void*)ALLOC(buf_size); if (ZSEEK(ziinit.z_filefunc, ziinit.filestream, offset_central_dir + byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET) != 0) err=ZIP_ERRNO; while ((size_central_dir_to_read>0) && (err==ZIP_OK)) { uLong read_this = SIZEDATA_INDATABLOCK; if (read_this > size_central_dir_to_read) read_this = size_central_dir_to_read; if (ZREAD(ziinit.z_filefunc, ziinit.filestream, buf_read, read_this) != read_this) err=ZIP_ERRNO; if (err==ZIP_OK) err = add_data_in_datablock(&ziinit.central_dir,buf_read, (uLong)read_this); size_central_dir_to_read-=read_this; } TRYFREE(buf_read); } ziinit.begin_pos = byte_before_the_zipfile; ziinit.number_entry = number_entry_CD; if (ZSEEK(ziinit.z_filefunc, ziinit.filestream, offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) err=ZIP_ERRNO; } if (globalcomment) { *globalcomment = ziinit.globalcomment; } # endif /* !NO_ADDFILEINEXISTINGZIP*/ if (err != ZIP_OK) { # ifndef NO_ADDFILEINEXISTINGZIP TRYFREE(ziinit.globalcomment); # endif /* !NO_ADDFILEINEXISTINGZIP*/ TRYFREE(zi); return 0; } else { *zi = ziinit; return (zipFile)zi; } } extern MINIZIP_EXPORT zipFile zipOpen (const char *pathname,int append) { return zipOpen2(pathname,append,0,0); } extern MINIZIP_EXPORT int zipOpenNewFileInZip3 (zipFile file,const char* filename,const zip_fileinfo* zipfi, const void* extrafield_local,uInt size_extrafield_local, const void* extrafield_global,uInt size_extrafield_global, const char* comment,int method,int level,int raw, int windowBits,int memLevel,int strategy, const char* password,uLong crcForCrypting) { zip_internal* zi; uInt size_filename; uInt size_comment; uInt i; int err = ZIP_OK; # ifdef NOCRYPT if (password != 0) return ZIP_PARAMERROR; # endif if (file == 0) return ZIP_PARAMERROR; if ((method!=0) && (method!=Z_DEFLATED)) return ZIP_PARAMERROR; zi = (zip_internal*)file; if (zi->in_opened_file_inzip == 1) { err = zipCloseFileInZip (file); if (err != ZIP_OK) return err; } if (filename==0) filename="-"; if (comment==0) size_comment = 0; else size_comment = (uInt)strlen(comment); size_filename = (uInt)strlen(filename); if (zipfi == 0) zi->ci.dosDate = 0; else { if (zipfi->dosDate != 0) zi->ci.dosDate = zipfi->dosDate; else zi->ci.dosDate = ziplocal_TmzDateToDosDate(&zipfi->tmz_date,zipfi->dosDate); } zi->ci.flag = 0; if ((level==8) || (level==9)) zi->ci.flag |= 2; if (level==2) zi->ci.flag |= 4; if (level==1) zi->ci.flag |= 6; if (password != 0) zi->ci.flag |= 1; zi->ci.crc32 = 0; zi->ci.method = method; zi->ci.encrypt = 0; zi->ci.stream_initialised = 0; zi->ci.pos_in_buffered_data = 0; zi->ci.raw = raw; zi->ci.pos_local_header = ZTELL(zi->z_filefunc,zi->filestream) ; zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + size_extrafield_global + size_comment; zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader); ziplocal_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4); /* version info */ ziplocal_putValue_inmemory(zi->ci.central_header+4,(uLong)VERSIONMADEBY,2); ziplocal_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2); ziplocal_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2); ziplocal_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2); ziplocal_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4); ziplocal_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/ ziplocal_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/ ziplocal_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/ ziplocal_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2); ziplocal_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2); ziplocal_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2); ziplocal_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/ if (zipfi==0) ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2); else ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2); if (zipfi==0) ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4); else ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4); ziplocal_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header- zi->add_position_when_writting_offset,4); for (i=0;ici.central_header+SIZECENTRALHEADER+i) = *(filename+i); for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+i) = *(((const char*)extrafield_global)+i); for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+ size_extrafield_global+i) = *(comment+i); if (zi->ci.central_header == 0) return ZIP_INTERNALERROR; /* write the local header */ err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC,4); if (err==ZIP_OK) err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */ if (err==ZIP_OK) err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2); if (err==ZIP_OK) err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2); if (err==ZIP_OK) err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4); if (err==ZIP_OK) err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */ if (err==ZIP_OK) err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */ if (err==ZIP_OK) err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */ if (err==ZIP_OK) err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2); if (err==ZIP_OK) err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield_local,2); if ((err==ZIP_OK) && (size_filename>0)) if (ZWRITE(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename) err = ZIP_ERRNO; if ((err==ZIP_OK) && (size_extrafield_local>0)) if (ZWRITE(zi->z_filefunc,zi->filestream,extrafield_local,size_extrafield_local) !=size_extrafield_local) err = ZIP_ERRNO; zi->ci.stream.avail_in = (uInt)0; zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; zi->ci.stream.next_out = zi->ci.buffered_data; zi->ci.stream.total_in = 0; zi->ci.stream.total_out = 0; if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) { zi->ci.stream.zalloc = (alloc_func)0; zi->ci.stream.zfree = (free_func)0; zi->ci.stream.opaque = (voidpf)0; if (windowBits>0) windowBits = -windowBits; err = deflateInit2(&zi->ci.stream, level, Z_DEFLATED, windowBits, memLevel, strategy); if (err==Z_OK) zi->ci.stream_initialised = 1; } # ifndef NOCRYPT zi->ci.crypt_header_size = 0; if ((err==Z_OK) && (password != 0)) { unsigned char bufHead[RAND_HEAD_LEN]; unsigned int sizeHead; zi->ci.encrypt = 1; zi->ci.pcrc_32_tab = (unsigned long*)get_crc_table(); /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/ sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting); zi->ci.crypt_header_size = sizeHead; if (ZWRITE(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead) err = ZIP_ERRNO; } # endif if (err==Z_OK) zi->in_opened_file_inzip = 1; return err; } extern MINIZIP_EXPORT int zipOpenNewFileInZip2(zipFile file,const char* filename,const zip_fileinfo* zipfi, const void* extrafield_local,uInt size_extrafield_local, const void* extrafield_global,uInt size_extrafield_global, const char* comment,int method,int level,int raw) { return zipOpenNewFileInZip3 (file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, raw, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, 0, 0); } extern MINIZIP_EXPORT int zipOpenNewFileInZip (zipFile file,const char* filename,const zip_fileinfo* zipfi, const void* extrafield_local,uInt size_extrafield_local, const void* extrafield_global,uInt size_extrafield_global, const char* comment,int method,int level) { return zipOpenNewFileInZip2 (file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, 0); } local int zipFlushWriteBuffer(zi) zip_internal* zi; { int err=ZIP_OK; if (zi->ci.encrypt != 0) { #ifndef NOCRYPT uInt i; int t; for (i=0;ici.pos_in_buffered_data;i++) zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, zi->ci.buffered_data[i],t); #endif } if (ZWRITE(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) !=zi->ci.pos_in_buffered_data) err = ZIP_ERRNO; zi->ci.pos_in_buffered_data = 0; return err; } extern MINIZIP_EXPORT int zipWriteInFileInZip (zipFile file,const void* buf,unsigned len) { zip_internal* zi; int err=ZIP_OK; if (file == 0) return ZIP_PARAMERROR; zi = (zip_internal*)file; if (zi->in_opened_file_inzip == 0) return ZIP_PARAMERROR; zi->ci.stream.next_in = (void*)buf; zi->ci.stream.avail_in = len; zi->ci.crc32 = crc32(zi->ci.crc32,buf,len); while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) { if (zi->ci.stream.avail_out == 0) { if (zipFlushWriteBuffer(zi) == ZIP_ERRNO) err = ZIP_ERRNO; zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; zi->ci.stream.next_out = zi->ci.buffered_data; } if(err != ZIP_OK) break; if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) { uLong uTotalOutBefore = zi->ci.stream.total_out; err=deflate(&zi->ci.stream, Z_NO_FLUSH); zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore); } else { uInt copy_this,i; if (zi->ci.stream.avail_in < zi->ci.stream.avail_out) copy_this = zi->ci.stream.avail_in; else copy_this = zi->ci.stream.avail_out; for (i=0;ici.stream.next_out)+i) = *(((const char*)zi->ci.stream.next_in)+i); { zi->ci.stream.avail_in -= copy_this; zi->ci.stream.avail_out-= copy_this; zi->ci.stream.next_in+= copy_this; zi->ci.stream.next_out+= copy_this; zi->ci.stream.total_in+= copy_this; zi->ci.stream.total_out+= copy_this; zi->ci.pos_in_buffered_data += copy_this; } } } return err; } extern MINIZIP_EXPORT int zipCloseFileInZipRaw (zipFile file,uLong uncompressed_size,uLong crc32) { zip_internal* zi; uLong compressed_size; int err=ZIP_OK; if (file == 0) return ZIP_PARAMERROR; zi = (zip_internal*)file; if (zi->in_opened_file_inzip == 0) return ZIP_PARAMERROR; zi->ci.stream.avail_in = 0; if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) while (err==ZIP_OK) { uLong uTotalOutBefore; if (zi->ci.stream.avail_out == 0) { if (zipFlushWriteBuffer(zi) == ZIP_ERRNO) err = ZIP_ERRNO; zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; zi->ci.stream.next_out = zi->ci.buffered_data; } uTotalOutBefore = zi->ci.stream.total_out; err=deflate(&zi->ci.stream, Z_FINISH); zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; } if (err==Z_STREAM_END) err=ZIP_OK; /* this is normal */ if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK)) if (zipFlushWriteBuffer(zi)==ZIP_ERRNO) err = ZIP_ERRNO; if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) { err=deflateEnd(&zi->ci.stream); zi->ci.stream_initialised = 0; } if (!zi->ci.raw) { crc32 = (uLong)zi->ci.crc32; uncompressed_size = (uLong)zi->ci.stream.total_in; } compressed_size = (uLong)zi->ci.stream.total_out; # ifndef NOCRYPT compressed_size += zi->ci.crypt_header_size; # endif ziplocal_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/ ziplocal_putValue_inmemory(zi->ci.central_header+20, compressed_size,4); /*compr size*/ if (zi->ci.stream.data_type == Z_ASCII) ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2); ziplocal_putValue_inmemory(zi->ci.central_header+24, uncompressed_size,4); /*uncompr size*/ if (err==ZIP_OK) err = add_data_in_datablock(&zi->central_dir,zi->ci.central_header, (uLong)zi->ci.size_centralheader); free(zi->ci.central_header); if (err==ZIP_OK) { long cur_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream); if (ZSEEK(zi->z_filefunc,zi->filestream, zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0) err = ZIP_ERRNO; if (err==ZIP_OK) err = ziplocal_putValue(&zi->z_filefunc, zi->filestream, crc32, 4); /* crc 32, unknown */ if (err==ZIP_OK) /* compressed size, unknown */ err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4); if (err==ZIP_OK) /* uncompressed size, unknown */ err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4); if (ZSEEK(zi->z_filefunc,zi->filestream, cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0) err = ZIP_ERRNO; } zi->number_entry ++; zi->in_opened_file_inzip = 0; return err; } extern MINIZIP_EXPORT int zipCloseFileInZip (zipFile file) { return zipCloseFileInZipRaw (file,0,0); } extern MINIZIP_EXPORT int zipClose (zipFile file,const char* global_comment) { zip_internal* zi; int err = 0; uLong size_centraldir = 0; uLong centraldir_pos_inzip; uInt size_global_comment; if (file == 0) return ZIP_PARAMERROR; zi = (zip_internal*)file; if (zi->in_opened_file_inzip == 1) { err = zipCloseFileInZip (file); } #ifndef NO_ADDFILEINEXISTINGZIP if (global_comment==0) global_comment = zi->globalcomment; #endif if (global_comment==0) size_global_comment = 0; else size_global_comment = (uInt)strlen(global_comment); centraldir_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream); if (err==ZIP_OK) { linkedlist_datablock_internal* ldi = zi->central_dir.first_block ; while (ldi!=0) { if ((err==ZIP_OK) && (ldi->filled_in_this_block>0)) if (ZWRITE(zi->z_filefunc,zi->filestream, ldi->data,ldi->filled_in_this_block) !=ldi->filled_in_this_block ) err = ZIP_ERRNO; size_centraldir += ldi->filled_in_this_block; ldi = ldi->next_datablock; } } free_datablock(zi->central_dir.first_block); if (err==ZIP_OK) /* Magic End */ err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4); if (err==ZIP_OK) /* number of this disk */ err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); if (err==ZIP_OK) /* number of the disk with the start of the central directory */ err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); if (err==ZIP_OK) /* total number of entries in the central dir */ err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); if (err==ZIP_OK) /* size of the central directory */ err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4); if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */ err = ziplocal_putValue(&zi->z_filefunc,zi->filestream, (uLong)(centraldir_pos_inzip - zi->add_position_when_writting_offset), 4); if (err==ZIP_OK) /* zipfile comment length */ err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2); if ((err==ZIP_OK) && (size_global_comment>0)) if (ZWRITE(zi->z_filefunc,zi->filestream, global_comment,size_global_comment) != size_global_comment) err = ZIP_ERRNO; if (ZCLOSE(zi->z_filefunc,zi->filestream) != 0) if (err == ZIP_OK) err = ZIP_ERRNO; #ifndef NO_ADDFILEINEXISTINGZIP TRYFREE(zi->globalcomment); #endif TRYFREE(zi); return err; } ace-6.4.5+dfsg.orig/contrib/minizip/mztools.h0000644000175000017500000000124613154167357017276 0ustar tggtgg/* Additional tools for Minizip Code: Xavier Roche '2004 License: Same as ZLIB (www.gzip.org) */ #ifndef _zip_tools_H #define _zip_tools_H #ifdef __cplusplus extern "C" { #endif #ifndef _ZLIB_H #include "zlib.h" #endif #include "unzip.h" /* Repair a ZIP file (missing central directory) file: file to recover fileOut: output file after recovery fileOutTmp: temporary file name used for recovery */ extern int ZEXPORT unzRepair(const char* file, const char* fileOut, const char* fileOutTmp, uLong* nRecovered, uLong* bytesRecovered); #endif ace-6.4.5+dfsg.orig/ACE-INSTALL.html0000644000175000017500000041666413154167357014677 0ustar tggtgg Building and Installing ACE and Its Auxiliary Libraries and Services

Building and Installing ACE and Its Auxiliary Libraries and Services

Synopsis

The file explains how to build and install ACE, its Network Services, test suite and examples on the various OS platforms and compilers that it has been ported to. Please consult the NEWS and ChangeLog files to see whether any recent changes to the release will affect your code. In addition, you should check out our development process. As you start working with ACE, we suggest you get copies of the C++NPv1, C++NPv2, and APG books to help guide you after you've built and installed ACE. You should also consult the ACE Frequently Made Mistakes page. If you encounter any problems or would like to request an enhancement, then use our bug tracking system to submit a report in accordance with our bug report process.

Document Index


Platforms, C++ Compilers, and Support

ACE has been ported to a large number of platforms using many different compilers over the years. The DOC group, Riverace, OCI, Remedy IT, and members of the ACE user community have all contributed ports to make ACE the successful and far-reaching toolkit it is today. Any UNIX/POSIX/Windows variation is probably an easy target platform for ACE. If you have porting questions or have a problem compiling the ACE source distribution, please contact one of the commercial support companies, or send a copy of the PROBLEM-REPORT-FORM, located in the ACE_wrappers directory, to either the ACE Newsgroup or the ace-users mailing list. The DOC groups at Washington University, UC Irvine, and Vanderbilt University provide only "best effort" support for non-sponsors for the latest release, as described in docs/ACE-bug-process.html. Thus, if you need more "predictable" help, or help with earlier versions of ACE, it's recommend that you check out the list of commercial support companies for additional assistance.

The responsibility for maintaining ACE across the wide range of supported platforms is divided among a few different groups:

  • The DOC group maintains platforms used in the course of their research and sponsored work
  • Companies that provide support (Riverace, OCI, and Remedy IT), maintain platforms they support in the course of their various service offerings
  • The ACE user community maintains any other desired platforms.
The build scoreboard records the current status of build and regression testing during development by all of the above groups. It is available to all users wishing to provide build results. Members of the ACE community that maintain ACE on platforms not maintained by the DOC group, Riverace, OCI, or Remedy IT are encouraged to provide build and regression test results for the scoreboard to ensure that all in-use platforms are represented. See the autobuild README for more information about how to set up a build; contact one of the above groups to inquire about how to get your build results recorded on the scoreboard.

Because older platforms that are not maintained tend to fall into a broken state and clutter the ACE sources with code that is no longer used, the development team reserves the right to remove ACE configuration files and source code specific to inactive platform configurations that are not listed on the scoreboard.

The table below summarizes each group's role and where you can get more detailed information. For information on TAO's platform coverage and support, please also see TAO's install document.

Groups Involved in ACE Development and Support
Group Platforms For more information
DOC Group Windows 2000, XP (MSVC++ 7.1, 8, 9, and 10); many versions of Linux/Intel (many compilers). DOC sites at ISIS, UCI and Washington University
Riverace Offers ACE training, support and consulting services for many platforms including AIX, HP-UX, Linux, Solaris, and Windows. Riverace's ACE Support page.
OCI Maintains ACE on certain platforms required for their TAO software and service offerings. OCI's web site and the TAO install document
Remedy IT Maintains ACE on many platforms required for their ACE and TAO service offerings. We support AIX, Embarcadero C++ Builder, Windows CE, MinGW, Microsoft Visual C++, GCC, Cygwin, VxWorks 6.x (kernel and rtp), OpenVMS on IA64, BlueCAT Linux, RedHat Linux, Fedora, MacOSX, Solaris, Tru64, SuSE Linux on Alpha/IA32/EM64T/IA64, RTEMS, QNX, LynxOS, HPUX on IA64, and Android. The Intel C++ compiler is supported on Windows 32/64bit, Linux IA32/EM64T/IA64, MacOSX. Remedy IT web site and the TAO install document
PrismTech Maintains ACE on certain platforms required for their TAO software and service offerings, including LynxOS. PrismTech's web site
ACE user community Responsible for continued maintenance and testing of platforms to which ACE has been ported, but aren't supported by the above groups. These include Digital UNIX (Compaq Tru64) 4.0 and 5.0; IRIX 6.x; UnixWare 7.1.0; Linux on PPC; OpenMVS; Tandem; SCO; FreeBSD; NetBSD; OpenBSD; Macintosh OS X; OS/9; PharLap ETS 13; QNX RTP and Neutrino 2.0; Interix (Windows Services for Unix)
Not maintained The following platforms have been ported to in the past but are no longer maintained and may be removed from ACE at any time. If you want to have support for these environments contact one of the commercial support organisations. The platforms include: Chorus; DG/UX; HP-UX 9, 10 and 11.00; pSOS; SunOS 4.x and Solaris with SunC++ 4.x; VxWorks 5.4 and earlier; Microsoft Visual C++ 5, 6, and 7.0; Borland C++ Builder 4, 5, 6, and 2006. For up-to-date listings on platform that are deprecated and pending removal from ACE, please see the NEWS file.

Although the DOC group has provided outstanding support for ACE over the years, ACE's success has greatly increased the amount of effort required to keep up with its maintenance, answer users' questions, and give design guidance. Riverace offers world-class commercial services to support ACE users. OCI, PrismTech, and Remedy offer similar services for TAO, allowing the DOC group's primary focus to shift back to their main goal: research. The DOC group is fundamentally focused on (and funded by) advanced R&D projects. The group continues to be intimately involved in ACE+TAO development and maintenance, but with revised priorities for maintenance. The bug fixing policies followed by the DOC group are designed to strike a balance between their many research projects and their commitment to the ACE+TAO user community. Naturally, we will be happy to accept well-tested patches from the ACE+TAO user community for any platforms that aren't supported by the DOC group, Riverace, OCI or Remedy IT.


Installation prerequisites

ACE (as well as TAO and CIAO) use MPC (MakeProjectCreator) to generate files used by all supported build tools (such as GNUmakefiles for UNIX based platforms, sln and vcproj files for VC71/VC8 and Embarcadero makefiles) on various platforms. To help new users to bootstrap quickly the release bundles of ACE (as well as TAO) include all needed files to use the build instructions in this document.

If it is necessary to generate files for build tools for other compilers, one must run MPC to generate the appropriate files. Please see USAGE, README, and README for ACE files for details. The options that have been used to generate the above build files can be found in global.features file.


Building and Installing ACE

The following sections explain how to build ACE on:

General Rules

  • Many features in ACE can be modified by defining some macros in $ACE_ROOT/ace/config.h. These macros should always appear before including your platform specific config file.

  • However, if you want to undefine/redefine macros defined in the platform specific config file, these #undef should come after the config file.

  • If you're planning to build ACE on multiple platforms, you may want to consider cloning the source tree before you start.


Building and Installing ACE on UNIX

As of ACE 6.0.6, you can building ACE on UNIX with:
  1. Traditional ACE/GNU Make Configuration
The build process for Windows is different from the UNIX methods.

Using the Traditional ACE/GNU Configuration

Here's what you need to do to build ACE using GNU Make and ACE's traditional per-platform configuration method:

  1. Install GNU make 3.79.1 or greater on your system (available via http anonymous ftp from ftp.gnu.org in the pub/gnu/make/ directory). You must use GNU make when using ACE's traditional per-platform configuration method or ACE won't compile.
  2. Add an environment variable called ACE_ROOT that contains the name of the root of the directory where you keep the ACE wrapper source tree. The ACE recursive Makefile scheme needs this information. There are several ways to set the ACE_ROOT variable. For example:
    TSCH/CSH: setenv ACE_ROOT /home/cs/faculty/schmidt/ACE_wrappers
    BASH or Bourne Shell: export ACE_ROOT=/home/cs/faculty/schmidt/ACE_wrappers

    If you're building a number of versions of ACE, however, (e.g., for different OS platforms or for different releases of ACE) you might use the following approach (assuming TCSH/CSH):

    setenv ACE_ROOT $cwd
  3. Create a configuration file, $ACE_ROOT/ace/config.h, that includes the appropriate platform/compiler-specific header configurations from the ACE source directory. For example:
    #include "ace/config-linux.h"
    The platform/compiler-specific configuration file contains the #defines that are used throughout ACE to indicate which features your system supports. See the $ACE_ROOT/ace/README file for a description of these macro settings. If you desire to add some site-specific or build-specific changes, you can add them to your config.h file; place them before the inclusion of the platform-specific header file.

    There are config files for most versions of UNIX. If there isn't a version of this file that matches your platform/compiler, you'll need to make one. Please send email to the ace-users list if you get it working so it can be added to the master ACE release.

  4. Create a build configuration file, $ACE_ROOT/include/makeinclude/platform_macros.GNU, that contains the appropriate platform/compiler-specific Makefile configurations, e.g.,
    include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
    This file contains the compiler and Makefile directives that are platform/compiler-specific. If you'd like to add make options, you can add them before including the platform-specific configuration.

    NOTE! There really is not a # character before 'include' in the platform_macros.GNU file. # is a comment character.

  5. If you wish to install ACE (using "make install"), set the installation prefix in platform_macros.GNU.
    INSTALL_PREFIX = /usr/local
    Headers will be installed to $INSTALL_PREFIX/include, executables to $INSTALL_PREFIX/bin, documentation and build system files to $INSTALL_PREFIX/share and libraries to $INSTALL_PREFIX/lib. The library directory can be customized by setting INSTALL_LIB (for example, INSTALL_LIB=lib64). With INSTALL_PREFIX set, RPATH will be enabled for all executables and shared libraries. To disable RPATH (for example, if $INSTALL_PREFIX/$INSTALL_LIB is already a system-known location for shared libraries such as those listed in /etc/ld.so.conf), set the make macro install_rpath to 0 by adding install_rpath=0 to platform_macros.GNU.
  6. Note that because ACE builds shared libraries, you'll need to set LD_LIBRARY_PATH (or equivalent for your platform) to the directory where binary version of the ACE library is built into. For example, you probably want to do something like the following:
    % setenv LD_LIBRARY_PATH $ACE_ROOT/lib:$LD_LIBRARY_PATH
    or
    % export LD_LIBRARY_PATH=$ACE_ROOT/lib:$LD_LIBRARY_PATH
  7. When all this is done, hopefully all you'll need to do is type:
    % make
    at the ACE_ROOT directory. This will build the ACE library, tests, the examples, and the sample applications. Building the entire ACE release can take a long time and consume lots of disk space, however. Therefore, you might consider cd'ing into the $ACE_ROOT/ace directory and running make there to build just the ACE library. As a sanity check, you might also want to build and run the automated "one-button" tests in $ACE_ROOT/tests. Finally, if you're also planning on building TAO, you should build the gperf perfect hash function generator application in $ACE_ROOT/apps/gperf.
  8. If you've set the INSTALL_PREFIX before building, now run
    % make install
  9. If you need to regenerate the ace/Svc_Conf_y.cpp file, you'll need to get GNU Bison. However, you should rarely, if ever, need to do this.

Building and Installing ACE on Windows

This section contains instructions for building ACE on Microsoft Windows with a variety of compilers and development environments.

First, if you are upgrading from an older release, the recommended practice is to start with a clean directory. Unpacking the newer release over an older one will not clean up any old files, and trying to use the environment's "Clean" command will probably not account for all existing files.

For using MPC and our perl based test framework we recommend our windows users to use Active State Perl.


Building and Installing ACE on Windows with Microsoft Visual Studio

ACE contains project files for Visual Studio 2009 (VC9), and Visual Studio 2010 (VC10). Visual Studio 2005 supports building for desktop/server Windows as well as for Windows CE and Windows Mobile. Since not all users will be interested in the CE/Mobile capability, these platforms have separate solution and project files from the desktop/server Windows. Furthermore, VC7.1, VC8, VC9, and 10 use different file formats but the same file suffixes (.sln and .vcproj). To support both environments, ACE supplies files with different names for the different development and target platforms. The platform/name mapping is shown below. All solution files have a .sln suffix and all project files have a .vcproj suffix.

The free Visual C++ 2008 Express Edition will work in place of the traditional Visual Studio editions. All the other notes in this document that are for VC8 / VC9 also apply to the express edition. MFC, 64-bit, and CE/mobile options are not available with the express edition. 64-bit binaries can be built with the compiler and linker included in the Windows SDK, using nmake as the build system (generate nmake makefiles with mwc.pl -type nmake).

Mapping of Platform to Solution/Project File Name
Platform File Name
VC7.1 name_vc71
VC8 for desktop/server name_vc8
VC8 for Windows CE/Mobile name_WinCE
VC9 for desktop/server name_vc9
VC10 for desktop/server name_vc10

The VC++ compiler and linker can now be invoked from GNU make just like most UNIX builds. Follow the instructions in the ACE/GNU Configuration sections and see the additional information in the comments of platform_win32_msvc.GNU.

If you happen to open a VC7.1 file from within VC8, it will offer to convert the file to the newer format for you. With the stock VC8, do not do this; Visual Studio will crash while attempting to convert the large solution and project files to build ACE. Simply refuse the conversion and open the file with the correct format. Note that Microsoft has fixed this problem. See https://msdn.microsoft.com/visualc/downloads/default.aspx for information.

  1. Uncompress the ACE distribution into a directory, where it will create a ACE_wrappers directory containing the distribution. The ACE_wrappers directory will be referred to as ACE_ROOT in the following steps -- so ACE_ROOT\ace would be C:\ACE_wrappers\ace if you uncompressed into the root directory.

  2. Create a file called config.h in the ACE_ROOT\ace directory that contains:

    #include "ace/config-win32.h"

  3. The static, DLL and MFC library builds are kept in different workspaces. Files with names *_Static contain project files for static builds. Workspaces for static and DLL builds will be available through the stock release at DOC group's website. The workspaces for MFC are not available and have to be generated using MPC. Please see MPC's README for details.

  4. Now load the solution file for ACE (ACE_ROOT/ACE.sln).

  5. Make sure you are building the configuration (i.e, Debug/Release) the one you'll use (for example, the debug tests need the debug version of ACE, and so on). All these different configurations are provided for your convenience. You can either adopt the scheme to build your applications with different configurations, or use ace/config.h to tweak with the default settings on NT.
    Note: If you use the dynamic libraries, make sure you include ACE_ROOT\lib in your PATH whenever you run programs that uses ACE. Otherwise you may experience problems finding ace.dll or aced.dll.

  6. To use ACE with MFC libraries, also add the following to your config.h file. Notice that if you want to spawn a new thread with CWinThread, make sure you spawn the thread with THR_USE_AFX flag set.

    #define ACE_HAS_MFC 1

    By default, all of the ACE projects use the DLL versions of the MSVC run-time libraries. You can still choose use the static (LIB) versions of ACE libraries regardless of run-time libraries. The reason we chose to link only the dynamic run-time library is that almost every NT box has these library installed and to save disk space. If you prefer to link MFC as a static library into ACE, you can do this by defining ACE_USES_STATIC_MFC in your config.h file. However, if you would like to link everything (including the MSVC run-time libraries) statically, you'll need to modify the project files in ACE yourself.

  7. Static version of ACE libraries are built with ACE_AS_STATIC_LIBS
    defined. This macro should also be used in application projects that link to static ACE libraries

    Optionally you can also add the line

    #define ACE_NO_INLINE

    before the #include statement in ACE_ROOT\ace\config.h to disable inline function and reduce the size of static libraries (and your executables.)

  8. ACE DLL and LIB naming scheme:

    We use the following rules to name the DLL and LIB files in ACE when using MSVC.

    "Library/DLL name" + (Is static library ? "s" : "") + (Is Debugging enable ? "d" : "") + {".dll"|".lib"}

More information for ACE/TAO on MSVC can be found here. The doxygen version of this document is available under Related Topics in the ACE Library.

ACE TESTS

The tests are located in ACE_ROOT\tests. There is also a solution in that directory to build all the tests (tests.sln)

Once you build all the tests (Batch Build works well for this), you can run perl script run_test.pl in the tests directory to try all the tests.

BUILDING ACE ON A WIN32 MACHINE THAT LACKS A NETWORK CARD

You may want to run ACE on a non-networked machine. To do so, you must install TCP/IP and configure it to ignore the absence of a network card. This is one method:

  1. Run Control Panel
  2. Choose Network from Control Panel
  3. Add Adapter: MS Loopback Adapter
  4. Configure MS Loopback Adapter with 802.3 (default)
  5. Add Protocol: TCP/IP Protocol
  6. Configure TCP/IP Protocol with a valid IP address and subnet mask. Leave everything else at the default settings.
  7. Add Service: Workstation
  8. Exit and Restart System
  9. Run Control Panel again
  10. Choose Services from Control Panel
  11. The following services are not necessary and may be set to Disabled Startup:
    Alerter
    Computer Browser
    Net logon
    Messanger
  12. Choose Network from Control Panel
  13. Confirm the following setup. This is all you need to run ACE:
    Installed Software:
    Computer Browser
    MS Loopback Adapter Driver
    TCP/IP Protocol
    Workstation
    Installed Adapter Cards:
    MS Loopback Adapter


 

Building and Installing ACE on Windows with Embarcadero C++

If you are building for a machine without a network card, you may want to check here first.

  1. Uncompress the ACE distribution into a directory, where it will create an ACE_wrappers directory containing the source. The ACE_wrappers directory will be referred to as ACE_ROOT in the following steps -- so ACE_ROOT\ace would be C:\ACE_wrappers\ace when you uncompressed into the root directory.

  2. Create a file called config.h in the ACE_ROOT\ace directory that contains at least:

    #include "ace/config-win32.h"

  3. Open a RAD Studio Command Prompt.

  4. Set the ACE_ROOT environment variable to point to the ACE_wrappers directory. For example:

    set ACE_ROOT=C:\ACE_wrappers

  5. Add ACE_wrappers\lib and ACE_wrappers\bin to the PATH environment variable:

    set PATH=%ACE_ROOT%\lib;%ACE_ROOT%\bin;%PATH%

  6. Change to the ACE_ROOT\ace directory.

    cd %ACE_ROOT%\ace

  7. Generate the bmake makefiles using MPC. Use the bmake project type for C++ Builder:

    %ACE_ROOT%\bin\mwc.pl -type bmake

  8. You can build several different versions of ACE by setting the following optional environment variables before you run make:

    Set the environment variable below to build a debug version of ACE
    set DEBUG=1

    Set the environment variable below to build a unicode version of ACE
    set UNICODE=1

    Set the environment variable below to build a version of ACE with Codeguard support. Should only be used when DEBUG is also set
    set CODEGUARD=1

    By default we are using the clang based compilers. At the moment you want to compile using the old bcc32 compiler set the CLASIC environment variable
    set CLASSIC=1

    Set the environment variable below to build a version of ACE optimized for a certain CPU. For this there are special compiler flags (-3/-4/-5/-6), see the Embarcadero help for more info.
    set CPU_FLAG=-6

    You can then start the build with the command
    make -f Makefile.bmak all

    You may also enable the options by passing them as command line options to make, for example:
    make -f Makefile.bmak -DDEBUG all

  9. Build ACE by doing:

    make -f Makefile.bmak all

Note that when you run make in a sub directory you give make -f Makefile.bmak all. The all is needed to make sure the complete project is build.

The C++ Builder port has been done by Jody Hagins, Christopher Kohlhoff and Johnny Willemsen.

ACE TESTS

Before you can build the tests you need to build the protocols directory. Change the directory to ACE_ROOT\protocols and start:

%ACE_ROOT%\bin\mwc.pl -type bmake
make -f Makefile.bmak all

The tests are located in ACE_ROOT\tests, change to this directory. You build then the tests with the following commands:

%ACE_ROOT%\bin\mwc.pl -type bmake
make -f Makefile.bmak all

Once you build all the tests, you can run the automated test script using:

perl run_test.pl

in the tests directory to try all the tests. You need to make sure the ACE bin and lib directory (in this case %ACE_ROOT%\bin and %ACE_ROOT%\lib) are on the path before you try to run the tests. If your executables are compiled into a subdirectory, add -ExeSubDir subdirname to the command.


Building and Installing ACE on Win32 with MinGW/ MSYS

If you are building for a machine without a network card, you may want to check here first.

Building and installing ACE on MinGW uses a mix of a UNIX building process and Win32 configuration files. Also, as MinGW uses GNU g++, you may want to take a look at the Compiling ACE with GNU g++ section.

You will need the MinGW build tools and libraries, downloable from http://www.mingw.org.
For our build we require the packages MinGW and MSYS.

  1. Install the MinGW tools (including the MinGW Development toolkit) into a common directory, say c:/mingw.

  2. Install the MSYS tools into a common directory, say c:/msys.

  3. Open a MSYS shell. Set your PATH environment variable so your MinGW's bin directory is first:
           % export PATH=/c/mingw/bin:$PATH
           
  4. Add an ACE_ROOT environment variable pointing to the root of your ACE wrappers source tree:
           % export ACE_ROOT=/c/work/mingw/ACE_wrappers
           
    From now on, we will refer to the root directory of the ACE source tree as $ACE_ROOT.

  5. Create a file called config.h in the $ACE_ROOT/ace directory that contains:
           #include "ace/config-win32.h"
           
  6. Create a file called platform_macros.GNU in the $ACE_ROOT/include/makeinclude directory containing:
           include $(ACE_ROOT)/include/makeinclude/platform_mingw32.GNU
           
    In the above text, don't replace $(ACE_ROOT) with the actual directory, GNU make will take the value from the environment variable you defined previously.

    If you lack Winsock 2, add the line

           winsock2 = 0
           
    before the previous one.

    If you want to install ACE (using "make install") and want all the .pc files generated, set the installation prefix in platform_macros.GNU.

          INSTALL_PREFIX=/c/ACE
           
    Headers will be installed to $INSTALL_PREFIX/include, documentation and build system files to $INSTALL_PREFIX/share and libraries to $INSTALL_PREFIX/lib. With INSTALL_PREFIX set, RPATH will be enabled. To disable RPATH (for example, if $INSTALL_PREFIX/$INSTALL_LIB is already a system-known location for shared libraries), set the make macro install_rpath to 0 by adding install_rpath=0 to platform_macros.GNU.

  7. In the MSYS shell, change to the $ACE_ROOT/ace directory and run make:
           % cd $ACE_ROOT/ace
           % make
           

    This should create libACE.dll (the Win32 shared library) and libACE.dll.a (the Win32 import library for the DLL). Note that the name for the ACE DLL follows the MinGW convention, which itself resembles UNIX.

    If you want static libs also, you may run:

           % make static_libs_only=1
           
  8. Run make install:
           % make install
           

    This should create ACE.pc to use with pkg-config.

  9. The same rules for Win32 search of DLLs apply for MinGW. If you want to run some ACE programs from the MSYS shell, you may need to add the directory for libACE.dll to your PATH:
           % export PATH=/c/work/mingw/ACE_wrappers/ace:$PATH
           
ACE TESTS

The tests are located in $ACE_ROOT/tests. After building the library, you can change to that directory and run make:

       % cd $ACE_ROOT/tests
       % make
       

Once you build all the tests, you can run run_tests.pl in the tests directory to try all the tests:

       % perl run_test.pl
       

If you are using ACE as a DLL, you will need to modify your PATH variable as explained above.

You may want to check $ACE_ROOT/tests/README for the status of the various tests on MinGW and the different Windows flavors.


Building and Installing ACE on Win32 with Cygwin

If you are building for a machine without a network card, you may want to check here first.

Building and installing ACE on Cygwin uses the UNIX building process. Also, as Cygwin uses GNU g++, you may want to take a look at the Compiling ACE with GNU g++ section.

You will need the Cygwin build tools and libraries, downloable from http://www.cygwin.com. For our build we require the following packages besides the packages the setup selects by default:

gcc (version 3.3.3), cygserver, make, perl, binutils.
  1. Install Cygwin (this can be easy downloading and running setup.exe from the Cygwin site). For working with ACE we recommend to select DOS as default text file type.

  2. Open a Cygwin shell. Set your PATH environment variable so your Cygwin bin directory is first:
           % export PATH=//c/cygwin/bin:$PATH
           
    or
           % export PATH=/cygdrive/c/cygwin/bin:$PATH
           

    Note Cygwin uses ``/'' as directory separator, and ``//X'' as a notation for Win32 drive X. Note also that you can't use ``c:/cygwin/bin'' because, for Cygwin, ``:'' is path separator character, as in UNIX.

  3. Add an ACE_ROOT environment variable pointing to the root of your ACE wrappers source tree (in this example c:/work/cygwin/ACE_wrappers):
           % export ACE_ROOT=/cygdrive/c/work/cygwin/ACE_wrappers
           

    Note here you can't use the ``//X'' Cygwin notation as this is seen by Cygwin's compiler and it doesn't support that (it does support ``/'' as directory separator however).

    From now on, we will refer to the root directory of the ACE source tree as $ACE_ROOT.

  4. Create a file called config.h in the $ACE_ROOT/ace directory that contains:
           #include "ace/config-cygwin32.h"
           
  5. Create a file called platform_macros.GNU in the $ACE_ROOT/include/makeinclude directory containing:
           include $(ACE_ROOT)/include/makeinclude/platform_cygwin32.GNU
           
    In the above text, don't replace $(ACE_ROOT) with the actual directory, GNU make will take the value from the environment variable you defined previously.
  6. On the Cygwin shell, change to the $ACE_ROOT/ace directory and run make:
           % cd $ACE_ROOT/ace
           % make
           

    This should create libACE.dll (the Win32 shared library) and libACE.dll.a (the Win32 import library for the DLL). Note the name for the ACE DLL on Cygwin follows the UNIX convention.

    If you want static libs also, you may run:

           % make static_libs_only=1
           
  7. The same rules for Win32 search of DLLs apply for Cygwin. If you want to run some ACE programs from the Cygwin shell, you may need to add the directory for libACE.dll to your PATH:
           # export PATH=//c/work/cygwin/ACE_wrappers/ace:$PATH
           
    If you are using MPC-generated Makefiles, then the DLLs have been placed in the lib directory instead of ace and thus your PATH addition would need to look like this:
           # export PATH=//c/work/mingw/ACE_wrappers/lib:$PATH
           
ACE TESTS

The tests are located in $ACE_ROOT/tests. After building the library, you can change to that directory and run make:

       % cd $ACE_ROOT/tests
       % make
       

Once you build all the tests, you can run run_tests.pl in the tests directory to try all the tests:

       % perl run_test.pl
       

If you are using ACE as a DLL, you will need to modify your PATH variable as explained above.

You may want to check $ACE_ROOT/tests/README for the status of the various tests on Cygwin and the different Windows flavors.


Building and Installing ACE on Win32 with Interix

Interix comes with a BSD style make; you need GNU make. Make builds easily under Interix or there is a prebuilt package at:

http://www.interopsystems.com/tools/warehouse.htm

If you are building for a machine without a network card, you may want to check here first.

This port was built and tested under Interix 3.5. a.k.a. Windows Services for UNIX 3.5.

To build follow the Traditional ACE/GNU Make Configuration instructions replacing the following include directives:

#include "ace/config-win32-interix.h"

for the config.h header

and:

include $(ACE_ROOT)/include/makeinclude/platform_win32_interix.GNU

for your platform_macros.GNU file.

ACE should build fine with just 'make', the only other option tried thus far is 'make static_libs_only=1' which also works. Any other options may not work.

ACE TESTS

The tests are located in $ACE_ROOT/tests. After building the library, you can change to that directory and run make:

% cd $ACE_ROOT/tests
% make

Once you build all the tests, you can run run_test.pl in the tests directory to try all the tests:

% run_test.pl

If you are using ACE as a shared library, you will need to modify your LD_LIBRARY_PATH as explained inTraditional ACE/GNU Make Configuration.


Building and Installing ACE on VxWorks

For the most part, you should be able to follow the instructions above to build ACE and applications that use it. Start with the Unix instructions above to build ACE and the applications that use it. Please see below for more information on building ACE on NT hosts for VxWorks targets.

A few notes on VxWorks builds (thanks to Paul von Behren and Remedy IT for these notes):

  • VxWorks builds are done with a cross compiler, i.e., the compiles are done on a workstation creating object modules which are downloaded and loaded into the VxWorks target system.

  • C++ object modules must be post-processed by a VxWorks utility called "munch" to set up calls to static constructors and destructors. ACE integrates the makefile includes/rules files distributed with VxWorks to achieve maximum compatibility and reuse the target specifications and buildcommands defined by Windriver itself. The original ACE support for VxWorks included a perl script called $ACE_ROOT/bin/ace_ld, which was called from the Makefiles, replacing the traditional ld step. Although this script is currently still available it is not used anymore.
    You must have perl installed to use ace_ld. If perl is not on your path, you'll have to set PERL_PATH to the full path (including perl.exe), either in your $(ACE_ROOT)/include/makeinclude/platform_macros.GNU or in your environment.

  • Wind River provides GCC/G++ cross-compilers for the supported target platforms. The executables are named cc<target> and g++<target>; for example, ccppc and g++cpp for PowerPC targets.

You'll have to let ACE know the target type at compile time. There are several ways to do this; please see the $ACE_ROOT/include/makeinclude/platform_vxworks5.5.x.GNU platform file for detailed information.

The VxWorks platform_vxworks*.GNU files are set up so that shared libraries are not built on VxWorks, by default. Only static libraries, with .a extension, are built. Therefore, it's not necessary to set the LD_LIBRARY_PATH environment variable on your host system when building for VxWorks targets. Please note, however, if you use TAO on VxWorks that you will need to set your LD_LIBRARY_PATH to find the TAO IDL compiler libraries (installed in the ace directory) on the host.

These non-default VxWorks kernel configuration #defines are required with ACE:

#define INCLUDE_CPLUS           /* include C++ support */
#define INCLUDE_CPLUS_IOSTREAMS /* include iostreams classes */
#define INCLUDE_POSIX_ALL       /* include all available POSIX functions */
For completeness, here are the non-default #defines that we used for VxWorks 5.3.1/g++ 2.7.2:
#define INCLUDE_CPLUS           /* include C++ support */
#define INCLUDE_CPLUS_IOSTREAMS /* include iostreams classes */
#define INCLUDE_CONFIGURATION_5_2 /* pre-tornado tools */
#define INCLUDE_DEBUG           /* pre-tornado debugging */
#define INCLUDE_LOADER          /* object module loading */
#define INCLUDE_NET_SYM_TBL     /* load symbol table from network */
#define INCLUDE_SYM_TBL_SYNC    /* synchronize host and target symbol tables */
#define INCLUDE_NFS             /* nfs package */
#define INCLUDE_PING            /* ping() utility */
#define INCLUDE_POSIX_ALL       /* include all available POSIX functions */
#define INCLUDE_RDB             /* remote debugging package */
#define INCLUDE_RLOGIN          /* remote login */
#define INCLUDE_RPC             /* rpc package */
#define INCLUDE_SECURITY        /* shell security for network access */
#define INCLUDE_SHELL           /* interactive c-expression interpreter */
#define INCLUDE_SHOW_ROUTINES   /* show routines for system facilities*/
#define INCLUDE_SPY             /* spyLib for task monitoring */
#define INCLUDE_STARTUP_SCRIPT  /* execute start-up script */
#define INCLUDE_STAT_SYM_TBL    /* create user-readable error status */
#define INCLUDE_SYM_TBL         /* symbol table package */
#define INCLUDE_UNLOADER        /* object module unloading */
#define INCLUDE_WINDVIEW        /* WindView command server */
Also, automatic construction/destruction of static objects should be enabled.

If you use TAO, it's also a good idea to increase the NUM_FILES parameter from its default of 50 to, say, 1000.

Please note that those VxWorks kernel configuration parameters are set in the VxWorks configAll.h file. You must rebuild your VxWorks kernel after modifying that file.

If you're first getting started with ACE and/or VxWorks, I recommend just building the ACE library and tests first. (Some of the ACE examples, in System_V_IPC, don't build on VxWorks yet.) Then try running the tests. Please see $ACE_ROOT/tests/README for the latest status of the ACE tests on VxWorks.

Please note that the main entry point is renamed to ace_main (configurable via ACE_MAIN) on VxWorks with g++, to comply with its restriction against using main. In addition, ACE_HAS_NONSTATIC_OBJECT_MANAGER is enabled by default to cleanly support construction and destruction of static objects. Please see the Non-static ACE_Object_Manager discussion for the important implication of this feature.

ACE threads (VxWorks tasks) can be named, for example, by supplying a non-null argument to the Thread_Manager spawn routines. However, names beginning with "==ace_t==" are forbidden because that prefix is used internally by ACE.

You can spawn a new task to run ace_main, using either VxWorks sp, or ACE'S spa. spa can be used from the VxWorks shell to pass arguments to ace_main. Its usage is:


spa ace_main, "arg1" [, ...]
All arguments must be quoted, even numbers. You can start also ace_main without spawning another thread by using:


spaef ace_main, "arg1" [, ...]
ACE also provides the function vx_execae which is capable of running ace_main in a separate thread, wait for the task to finish and return the return code from ace_main:

int vx_execae (FUNCPTR acemain,char* arguments, int prio = 0, int opt = 0, int stacksz = 0);

You could call this from the VxWorks shell like:


my_rc = vx_execae ace_main, "-o server.ior -ORBDottedDecimalAddresses 1"

When prio, opt or stacksz are omitted or specified as 0 default values will be used. See the VxWorks shell documentation for the defaults for prio and opt. For stacksz the default is ACE_NEEDS_HUGE_THREAD_STACKSIZE. The arguments string will be parsed and passed on to ace_main as a regular argc and argv.

Be aware of the fact that when you execute ace_main directly from the VxWorks shell argc will be zero and argv* will also be zero. Using argv[0] will not return the program name, but will result in a crash.
The ACE helper functions spa, spaef and vx_execae prevent this problem by building a regular argc and argv which also contain a valid argv[0] element.

Building Shared Libraries for VxWorks.

NOTE: Since VxWorks support is currently being reworked with an initial focus on static builds the support for shared builds is momentarily broken. This will be remedied(!) as soon as possible.

ACE supports shared libraries for VxWorks, but only with the g++ compiler. To build shared libraries instead of the default static libraries, added shared_libs_only=1 to either your ACE_wrappers/include/makeinclude/platform_macros.GNU or your make invocation. Then, be sure to load the ACE (and any other) shared library before loading your executable(s).

A shared library for VxWorks uses the same code as for a static (non-shared) library. However, calls to static constructors/ destructors are added. The code in the shared library must be reentrant if you shared it between programs (tasks). The ACE library meets this requirement.

Shared libraries reduce build time, executable size, and load time of the executable. But, you must manually load the shared library before loading your executable(s) with a command such as:


-> ld < libACE.so
Shared libraries can be unloaded the same way an executable (module) is unloaded.

NOTE: Shared libraries on VxWorks aren't the same as shared libraries on other operating systems. In particular, there is no support for creating copies of writeable global (static) data in the shared library. This includes the singleton ACE_Object_Manager instance pointer. If you share global data between separate programs, they may not work properly. See the discussion of shared code and reentrancy in the VxWorks' Programmers Guide.

Instead of trying to run separate programs onto a VxWorks target, we recommend creating just one program, and spawning a thread for each task. The TAO IDL_Cubit test collocation test is a good example.

Linking ACE and/or TAO Libraries into the VxWorks Kernel.

It's easy to link your ACE and/or TAO libraries into the VxWorks kernel. Just build shared versions, but disable the munch step. The easiest way to do that is to set the LD make variable to the name of your linker. For example, to build a libACE.so for PowerPC that can be linked into the kernel:
% cd $ACE_ROOT/ace
% make LD=ldppc shared_libs_only=1
After building the shared lib, link it into the kernel by setting the MACH_EXTRA make variable in the kernel configuration Makefile. Then, build the kernel using make exe.

Using the one-button ACE tests with VxWorks.

It is possible to generate a script to execute all ACE tests. You can do this by executing

% perl run_test.pl -v -o > run_test.vxworks
The ACE tests write their output files in a directory named log/, below the current (tests) directory.

To run the tests from the build directory on an NT host where you crossbuild your VxWorks ACE/TAO you can set up the Target Server File System (TSFS) in your Target Server configuration. If you f.i. set the root for the TSFS to the root directory of your builddisk you can set the default directory for the target by issueing the following command from a Host shell: '@cd "/tgtsvr/{path to ACE}/ACE_wrappers/tests"'. The '@' addition makes sure this command is executed for the target environment and not the local host shell environment. If you also issue the command 'cd {path to ACE}/ACE_wrappers/tests' you can execute the generated one button testscript like: '< run_test.vxworks'.

Running the ACE tests automatically from the ACE autobuild tool using Target Server and Host shell options is also supported.

If you don't have NFS included in your VxWorks kernel, you can use these steps, provided by Clarence M. Weaver, to run the tests and capture their output:

  1. What I did was create a log directory on the boot NT host of my VxWorks target.

  2. I copied all the test applications and the run_test.vxworks script to the parent of the log directory.

  3. Using the target shell not the host shell, I "cd" to the directory containing the script and test programs.

  4. Invoked the script using < run_test.vxworks from this target shell.

Kirk Davies provided this approach for running the ACE tests on Tornado II:
  • Under Tornado II, I set up the Target Server File System (TSFS), and the test logs get written to the log subdirectory under that.

  • You have to set an environment variable before running the tests:
    putenv("ACE_TEST_DIR=/tgtsvr")
    

Building ACE on Tornado/NT hosts for VxWorks targets.

The following, very useful information was contributed by Chris Ryan and Paul von Behren. Please submit corrections, additions, or clarifications to the the ACE mailing list.

NOTE:The make (version 3.74) that is provided with Tornado 2.2 cannot be used to build ACE. A working version is available from the WindRiver support site, download the make3_80.gvk_patches and the make3_80.tor2_2.new_dependency_rules package and install them.

Using the Cygnus tools, this approach works:

  • You'll build both your NT and VxWorks executables in the same workspace (directory hierarchy). This works because the NT compiler and ACE's Makefiles put their output in different directories.

  • Set up your ACE_wrappers/include/makeinclude/platform_macros.GNU as usual for VxWorks. See the g++/VxWorks platform file for more information.

  • Create an ACE_wrappers/ace/config.h file that looks something like the following.
    #if defined (_MSC_VER)  ||  defined (__BORLANDC__)
    # include "ace/config-win32.h"
    #else
    # include "ace/config-vxworks5.x.h"
    #endif
    

  • Set your ACE_ROOT, CPP_LOCATION, WIND_BASE, and WIND_HOST_TYPE environment variables.

  • Build for NT, then build for VxWorks.

A few additional Windows Notes, from Paul von Behren:

  • Cygnus has created a Win32 API which is compatible with a "generic" Unix environment. Using this library, they have ported a large collection of GNU tools to WinNT/95 - including a port of gcc/g++. See http://www.cygnus.com/misc/gnu-win32/ A related link is ftp://ftp.cygnus.com/pub/gnu-win32/latest/

  • To set up the command-prompt build environment, run Tornado\host\x86-win32\bin\TorVars.bat. This is done implicitly within the Tornado IDE.

  • To run ace_ld, you still need perl installed - see http://www.activestate.com/software/default.htm for Windows perl.

  • The Tornado IDE will use a standard Makefile for project builds, but does not have a GUI interface for managing the Makefile. By default, it will use rules from Makefile in the current directory and you can configure it to add certain Makefile targets to the project. If you have ACE_ROOT defined before starting Tornado, you can specify an ACE Makefile as a Tornado target and Tornado will then call make from the menu.

And Chris Ryan's instructions for building for VxWorks targets on Windows NT hosts:
  1. Path setting that seems to be working is:

          /tornado/host/x86-win32/bin:
          /tornado/host/x86-win32/lib/gcc-lib/i386-wrs-vxworks/cygnus-2.7.2-960126:
          /tornado/host/x86-win32/i386-wrs-vxworks/bin:
          /ace/ace_wrappers/bin:
          /gnuwin32/b18/H-i386-cygwin32/bin:
          /gnuwin32/b18/tcl/bin:
          /WINNT/system32:
          /WINNT:
          /WINNT/system32/nls/ENGLISH:
          /bin
          
    Other environment variables:

          WIND_BASE=/tornado
          SHELL=/bin/sh.exe
          TERM=pcbios
          TAO_ROOT=/ace/ACE_wrappers.vxworks/TAO
          CPP_LOCATION=/Program Files/DevStudio/VC/bin/CL.EXE
          GCC_EXEC_PREFIX=/tornado/host/x86-win32/lib/gcc-lib/
          WIND_HOST_TYPE=x86-win32
          ACE_ROOT=/ace/ACE_wrappers.vxworks
          
  2. /tornado is the root of the Tornado install ($WIND_BASE).
  3. /gnuwin32 is the root of a Cygnus GNU download and install.
  4. /bin content is:

          aced.dll
          cygwin.dll
          perl.exe
          rm.exe
          sh.exe
          true
          
    aced.dll is produced in an ACE NT source tree according to documented procedure for Windows VC++ ACE build. cygwin.dll is from the Cygnus GNU software download and install.
  5. Basically, follow documented procedure for ACE build/install on UNIX platform. Create a $ACE_ROOT/ace/config.h that looks like:

          #include "config-vxworks5.x.h"
          
    And create a $ACE_ROOT/include/makeinclude/platform_macros.GNU that looks like:

          WIND_BASE = /tornado
          WIND_HOST_TYPE = x86-win32
          CPU = I80486
          include $(ACE_ROOT)/include/makeinclude/platform_vxworks5.5.x.GNU
          
  6. When using cygnus windows GNUTools on WinNT you have to start make with "--unix" option, otherwise WinNT shell cmd.exe is responded and not sh.exe, i.e.,
     make --unix static_libs_only=1
     

TAO on NT Tornado host, VxWorks target.

  1. Build ACE and TAO_IDL in the NT tree as already documented. Be sure to build ACE's gperf on NT, in ACE_wrappers/apps/gperf/src.

  2. Build $TAO_ROOT/tao
          CPP_LOCATION=/Program Files/DevStudio/VC/bin/CL.exe
          cd $TAO_ROOT/tao
          /gnuwin32/b18/H-i386-cygwin32/bin/make
          
  3. Build orbsvcs.
          CPP_LOCATION=/Program Files/DevStudio/VC/bin/CL.exe
          cd $TAO_ROOT/orbsvcs/orbsvcs
          /gnuwin32/b18/H-i386-cygwin32/bin/make
          
  4. Build $TAO_ROOT/tests

Jaffar Shaikh's Notes for Building ACE and TAO for VxWorks on NT host

Scenario: I was building the ACE and TAO for VxWorks on NT. The target system was a PPC860 based chassis and another a NT host based card.

Host System:

NT 4.0 workstation with 128 M RAM, 266MHz Pentium.

Software Needed For Building TAO

1) Active State's ActivePerl from http://www.activestate.com/software/default.htm

2) Tornado 2.2.1 from Windriver.

3) Cygwin GNU to build TAO. It is available for NT as a freeware from the Cygwin site

The Cygwin Make (version 3.75) can only build the TAO not the Tornado II make (version 3.74)

Environment Variables:

On NT the environment Variables are set as follows, (from Control Panel-> System -> Environment)

I added following Environment variable entries to PATH

C:\Perl\bin\;

C:\tornado\host\x86-win32\bin;

C:\tornado\host\x86-win32\powerpc-wrs-vxworks\bin;

C:\tornado\host\x86-win32\lib\gcc-lib\powerpc-wrs-vxworks\cygnus-2.7.2-960126;

C:\Corba\Ace_wrappers\bin;

C:\Cygwin\bin;

C:\Cygwin\usr\bin;

C:\bin

Additional Environmental variables and the values,

CPU=PPC860

LD_LIBRARY_PATH=

SHELL=/bin/sh.exe

ACE_ROOT=/Corba/ACE_wrappers

WIND_BASE=/tornado

SHELL=/bin/sh.exe

TERM=pcbios

TAO_ROOT=/Corba/ACE_wrapper/Tao

CPP_LOCATION=/Program Files/Microsoft Visual Studio/VC98/Bin/CL.exe

GCC_EXEC_PREFIX=/tornado/host/x86-win32/lib/gcc-lib/

WIND_HOST_TYPE=x86-win32

PERL_PATH=/perl/bin/perl.exe

Directories of importance

C:\Corba <-- Ace_wrappers (uzipped)

C:\tornado <-- Tornado installed

C:\Perl <-- Perl installed

C:\Cygwin <-- Cygwin installed

C:\bin <-- Copy these files,

Ace.dll, <-- After you build Ace

gperf.exe <-- After you build gperf

Cygwin1.dll, <-- After you install Cygwin

perl.exe, <-- After you install Perl

rm.exe <-- After you install Cygwin

sh.exe <-- After you install Cygwin

true <-- After you install Cygwin

Create Files

1) C:\Corba\ACE_Wrappers\ace\config.h

with entry

#if defined (_MSC_VER) || (__BORLANDC__)

#include "ace/config-win32.h"

#else

#define ACE_HAS_IP_MULTICAST

#include "ace/config-vxworks5.x.h"

#endif

2) C:\Corba\ACE_wrappers\include\makeinclude\platform_macros.GNU

WIND_BASE = /tornado

WIND_HOST_TYPE = x86-win32

include $(ACE_ROOT)/include/makeinclude/platform_vxworks5.5.x.GNU

ACE_COMPONENTS=FOR_TAO (you may choose this option to build ACE library that supports TAO)

Steps to Build

1) Build Ace.dll under NT

In MS Visual C++ open C:\Corba\ACE_wrappers\ace.sln And build Ace DLL

Copy Ace.dll in C:\bin

2) Build gperf utility under NT

In MS Visual C++ open C:\Corba\ACE_wrappers\apps\gperf\src\gperf.sln. Build gperf.exe

Copy gperf.exe to C:\bin

3) Mount Directries in Cygwin

Click on Cygnus Solutions -> Cygwin Bash Shell

Mount following directories by using mount command.

create respective directories first then use mount command

e.g. Create /Corba directory then use $mount -s "C:\Corba" /Corba

C:\Corba mount to /Corba

C:\tornado mount to /tornado

C:\Perl mount to /perl

C:\Cygwin mount to /cygwin

C:\bin mount to /bin

C:\Program Files mount to /Program Files

4) Build ACE in Cygwin

$cd /Corba/ACE_wrappers/ace

$make static_libs_only=1

This will build your ace library libACE.a for VxWorks. If you use option shared_libs_only=1 then the build will be libACE.so. The other options are same as follows.

5) Build TAO in Cygwin

$cd $TAO_ROOT/tao

$make debug=0 optimize=1 static_libs_only=1 minimum_orb=1

for shared libs use shared_libs_only=1

The minimum Tao does not have following components,

Dynamic Skeleton Interface

Dynamic Invocation Interface

Dynamic Any

Interceptors

Interface Repository

Advanced POA features

CORBA/COM interworking

You may play around with above options to find suitable build for your needs. For example when you give option debug=1 all the debug symbols will be created and the build will huge in size. The debug symbols are necessary when you want to debug your code.


Building and Installing ACE on Android

ACE can be built for Android by using the Android Native Development Kit's standalone toolchain. Testing has been performed with NDK6 and NDK8e. The compilation creates native binaries, not the standard Android Java applications. The native binary applications that use ACE can be run by either a shell or using the Java Runtime exec operation.

The standalone toolchain must configured for a platform of android API level 8, 9, or 14. From your NDK root directory you can use their make-standalone-toolchain.sh script to set this up. For example:

./build/tools/make-standalone-toolchain.sh --toolchain=arm-linux-androideabi-4.4.3 --arch=arm --platform=android-9 --install-dir=../arm_tools

To set up an arm-specific tool chain. With the release of NDK r6, x86 targets are supported, so the setup command for that would be:

./build/tools/make-standalone-toolchain.sh --toolchain=x86-4.4.3 --arch=x86 --platform=android-9 --install-dir=../x86_tools

The bin directory under the installed standalone toolchain dir must be added to your $PATH

When using the Android NDK on a 64bit Linux system you have to install the following 32bit packages: libstdc++.i686 glibc.i686 ncurses-libs.i686 zlib.i686

Starting with NDK8e it is possible to use shared libraries on Android.

Compilation requires using the NDK's standalone toolchain for it's exception and RTTI support. The standard NDK compiler is not identified as supporting exceptions or RTTI, as of NDK r5c.

It is not recommended to perform the build on a Windows host. Using the NDK r5c, compilation issues were encountered on Windows XP, when the compiler failed to recognize the name difference between the ACE file Signal.h and the system file signal.h.

You should be able to follow the instructions above to build ACE and applications that use it. Use the Unix traditional instructions above to build ACE and the applications that use it. Building TAO for Android requires cross compiling the code.

Basic steps to build

  • Setup up the standalone compiler toolchain by following the instructions provided with the Android NDK.
  • If building TAO, build the ACE and TAO tools (ace_gperf and tao_idl) for the compiling host. Follow the cross compilation setup instructions provide in $TAO_ROOT/TAO-INSTALL.html. Search for "Using cross compilation".
    • Setup the Android build
      • Create ace/config.h: #include "ace/config-android.h"
      • Create include/makeinclude/platform_macros.GNU:
        • set options for debug and optimized builds
        • inline is forced on and no-hidden-visibility
        • if you want to compile static, add static_libs_only=1
        • Include the include/makeinclude/platform_android.GNU file.
        • If building TAO, set the tao idl options specified in the cross compiling instructions in TAO-INSTALL.html
      • Ensure the following environment variables are set:
        • $ANDROID_ARCH - either arm or x86. Note that x86 is only available in r6 and greater, and is still experimental. ANDROID_ARCH will be set to arm by default.
        • $NDK - the path to the android native development kit
        • $SYSROOT - the platform/arch directory. This defaults to $NDK/platforms/android-9/arch-$ANDROID_ARCH.
        • $HOST_ROOT - the path to the native TAO_IDL & gperf tools
        • $PATH - must include $NDK_TOOLS/bin.
    • Generate makefiles (if necessary).
    • Build with GNU make.

Native applications using the ACE library can be installed onto devices by several different methods. The files can be include as assets of Java application and can be written by the Java application into it's executable program directory. The native application can be downloaded by a Java application and written into the Java applications executable program directory. The native application can also be uploaded using the Software Development Kit's ADB tool. This method requires uploading the native application to a directory that allows execution and having any output directed to a writable directory.




Building and Installing ACE Network Services

The following explains how to build the ACE network services on UNIX and Win32.


Building and Installing ACE Network Services on UNIX

Building and installing ACE Network Services on UNIX is relatively simple (the process for Win32 is different). Here's what you need to do:

  1. Build and install ACE on UNIX as described earlier. If ACE is built at the root of the ACE source tree (and ACE has been ported to your platform, of course) the netsvcs static and shared object libraries should be built automatically. In addition, the server driver program (main) contained in $ACE_ROOT/netsvcs/servers/main.cpp should also be compiled and ready to run.

  2. Set your LD_LIBRARY_PATH environment variable to where the binary version of the ACE netsvcs library. For example, you probably want to do something like the following

    
          % setenv LD_LIBRARY_PATH $ACE_ROOT/ace:$ACE_ROOT/lib:$LD_LIBRARY_PATH
          

  3. By default, if the shared object library is built, the services are linked into the main driver program dynamically. To specify which services should be linked in and executed, edit the $ACE_ROOT/netsvcs/servers/svc.conf file. During your editing, you should update information (such as the default service port numbers) that affects the initialization of services in this file. Refer to the Service Configurator documentation to learn how the configuration file is parsed and how the services are dynamically linked and executed. In addition, refer to the Network Services documentation to learn more about how to configure each network service.

  4. If you only want to link the services statically, simply remove or rename the svc.conf file.


Building and Installing ACE Network Services on Win32

Once again, there are supplied project for Visual C++ 7.1 or later for the Network Services.


Building and Installing the ACE_SSL Library

The first step for all platforms is to build and install the OpenSSL distribution. The ACE_SSL library must then be built according to the instructions below.

Unix

  1. Make sure the OpenSSL header file directory is in your compiler's include path, and that OpenSSL libraries are in your library link/load path (e.g. LD_LIBRARY_PATH). If you installed OpenSSL into a set of directories unknown by the compiler, set the SSL_ROOT environment variable to point to the top level directory of your OpenSSL distribution, i.e. the one containing OpenSSL's include and lib directories.
  2. Build ACE as described above. When building ACE, add ssl=1 to your make command line invocation, or add it to your platform_macros.GNU file.
  3. Build the ACE_SSL library in the $ACE_ROOT/ace/SSL directory. The ACE_ROOT environment variable should be set prior to this point.

Microsoft Visual Studio

  1. Set the SSL_ROOT environment variable to the location of the directory containing the OpenSSL inc32 and out32dll directories.
  2. Add ssl=1 to your MPC $ACE_ROOT/bin/MakeProjectCreator/config/default.features or $ACE_ROOT/local.features file.
  3. At the moment you are using OpenSSL v1.1 or newer also add openssl11=1 to your MPC $ACE_ROOT/bin/MakeProjectCreator/config/default.features or $ACE_ROOT/local.features file.
  4. Re-run MPC to add support for building the ACE_SSL library to your MSVC++ workspaces and projects.
  5. Open the ACE.sln solution, and refer to the ACE build and installation instructions above for details on creating a config.h configuration header for this platform. Once the config.h file has been created, build the ACE_SSL project.

Embarcadero C++

Support for building ACE's ACE_SSL library and TAO's SSLIOP pluggable protocol with Embarcadero C++ does exist.

  1. Set the SSL_ROOT environment variable to the location of the directory containing the OpenSSL inc32 and out32 directories.
  2. Add ssl=1 to your MPC $ACE_ROOT/bin/MakeProjectCreator/config/default.features or $ACE_ROOT/local.features file, and re-run MPC to add support for building the ACE_SSL library to your Embarcadero C++ makefiles.
  3. Build ACE and TAO.


Building and Using GUI Reactors Libraries

There is a general method for building and using ACE_Reactors for various GUI libraries.

Building GUI Reactor Library

  1. Try to generate build files using MPC. Inspect the output of MPC to find out which features are necessary to build given reactor. Add these features to ACE_wrappers/bin/MakeProjectCreator/*.features file, or pass them directly to MPC using -features command line option. For example, for FlReactor the procedure consists of five steps
    1. In the first pass one gets that x11 (X11 libraries) is missing.
      $ mwc.pl -type gnuace Skipping ACE_FlReactor (ace_flreactor.mpc), it requires x11.
    2. Ensure that X11 libraries are installed, then pass x11=1 feature to MPC.
    3. In the second pass one gets that gl (OpenGL library) is missing.
      $ mwc.pl -type gnuace -features x11=1 ace.mwc Skipping ACE_FlReactor (ace_flreactor.mpc), it requires gl.
    4. Ensure that OpenGL libraries are installed, then pass gl=1 feature to MPC.
    5. In the third pass one gets that fl (Fast Light Toolkit) is missing.
      $ mwc.pl -type gnuace -features x11=1,gl=1 ace.mwc Skipping ACE_FlReactor (ace_flreactor.mpc), it requires fl.
    6. Ensure that Fast Light Toolkit libraries are installed, then pass fl=1 feature to MPC.
    7. In the fourth pass one gets that ace_flreactor feature is missing
      $ mwc.pl -type gnuace -features x11=1,gl=1,fl=1 ace.mwc Skipping ACE_FlReactor (ace_flreactor.mpc), it requires ace_flreactor.
    8. Allow MPC to generate makefiles for FlReactor by setting ace_flreactor=1 feature.
    9. In the last pass one obtains files for building FlReactor.
      $ mwc.pl -type gnuace -features x11=1,gl=1,fl=1,ace_flreactor=1 ace.mwc
    Currently to simplify MPC generation some of features are turned on by default in ACE_wrappers/bin/MakeProjectCreator/global.features. For examples to generate files related with Fl one has to provide only fl=1 feature. To obtain a more fine grained controll over MPC generation process one may modify ACE_wrappers/bin/MakeProjectCreator/*.features files.
  2. Required build files are generated now, it is enough then to invoke build tool. For example for under MPC::gnuace one has to call make fl=1. For MPC::vc7 target all features are encoded in generated project files, thus it is enough to compile ACE using MSVC.
The build procedure leads to a specific GUI Reactor library. For example, for Qt and Linux one gets libQtReactor.so, while for Windows the results are shared QtReactor.dll and import QtReactor.lib libraries or their variants depending on build options. When compiling TAO also GUI related libraries are created like libTAO_QtResource.so.

Using GUI Reactor Library

Here one has at least three use cases:
  1. Applications with their own build system. To use ACE support for GUI one has to include specific GUI headers and link with specific ACE_[GUI]Reactor library. When using TAO support for GUI one has also to link with specific TAO_[GUI]Resource library.
  2. Applications with build system using MPC. In general, it is better to create specific base projects for using ACE GUI support in such application. Base projects provided by ACE ACE_wrappers/bin/MakeProjectCreator/[ace,tao]_[gui][reactor,resource].mpb may be an examples of how to do this.
  3. Internal ACE applications like tests or examples. MPC project for internal ACE application using GUI support should be derived from ace_[gui]reactor.mpb base projects. To employ TAO support for GUI one should derive the project from tao_[gui]resource.mpb These base projects ensure that all necessary libraries are linked to the application, specifies features necessary to build a project and moreover impose a build order consistant with ACE. For example, the application project using XtReactor should be derived from ace_xtreactor.mpb.

Notes on specific GUI Reactors

  • QtReactor
  • The build is controlled by ace_qtreactor [1 by default] feature. To build this reactor one has to provide feature qt [0 by default] (Qt library). Moreover, it is assumed that Qt was installed in a standard way and QTDIR points to Qt installation folder. To build TAO support for Qt one should use tao_qtresource [1 by default] feature.
  • XtReactor
  • The build is controlled by ace_xtreactor [1 by default] feature. To build this reactor one has to provide the following features: x11 [1 by default] (X11 libraries) and xt [1 by default] (X11 Toolkit). Moreover, some examples and tests related with XtReactor needs additionall features namely either motif [0 by default] (Motif/Lesstif libraries) or athena [0 by default] (Athena widgets). To build TAO support for xt one should use tao_xtresource [1 by default] feature.
  • TkReactor
  • The is controlled by ace_tkreactor [1 by default] feature. To build this reactor one has to provide tk [0 by default] (Tcl libraries) feature. To build TAO support for Tk one should use tao_tkresource [1 by default] feature.
  • FlReactor
  • The build is controlled by ace_flreactor [1 by default] feature. To build this reactor one has to provide the following features: x11 [1 by default] (X11 libraries), gl [1 by default] (OpenGl) and fl [0 by default] (Fast Light Toolkit). To build TAO support for Fl one should use tao_flresource [1 by default] feature. MS Windows: The paths to fltkdll and OpenGL32 libraries, as well as fltk header files should be setup manually for succesfull compilation. Obviosuly, x11switch is ignored for this platform.

Installation Notes

  • Windows (Windows NT, 2000, XP, 2003, etc., and Windows '9x/ME)

    Please see the Non-static ACE_Object_Manager discussion below.

  • Windows CE

    Take a look at (CE-status.txt) for up-to-date information about ACE on Windows CE and Windows Mobile.

  • Solaris 7, 8, 9, and 10 using Sun ONE Studio 8 (C++ 5.5) or higher, Centerline C++ 2.x, GNU gcc 2.95 and later.

    All the source code and tests should build and run without any problems on Solaris 7, 8, and 9 platforms using the above Sun C++ compilers. There are likely to be build problems with older versions or different patchlevels of Sun C++. Likewise, on Solaris with g++ you may need to use GNU as instead of /usr/ccs/bin/as, if you want -gstabs+ and -pipe support. Thanks to Susan Liebeskind <shl@janis.gtri.gatech.edu> for providing the following useful information:

    By default, ACE uses both the Solaris and POSIX thread interface. To disable use of the Solaris thread interface, add -D_POSIX_PTHREAD_SEMANTICS to the CFLAGS in your $(ACE_ROOT)/include/makeinclude/platform_macros.GNU. See the Solaris Intro (3) man page for more information.

    To disable ACE thread support completely, build with the threads=0 make flag. See the Makefile Flags section below for more information on make flags.

    If you use g++ on Solaris 7, you might need to rebuild it on a SunOS 5.7 (Solaris 7) host. Some versions of g++ provide replacements for system header files. The replacements on older SunOS systems are not compatible with the SunOS 5.7 system headers.

  • AIX

    ACE is currently supported on AIX 5.2 and higher using IBM's Visual Age C++ 6 and XL C++ 7 compilers as well as g++ 3.2.

    The ace/config-aix-5.x.h file is recommended for all compilers on all AIX 5L versions. The Asynchronous I/O functionality is disabled by default because its use requires the system administrator to explicitly enable it in the kernel using SMIT. If this has been done and you want to enable asynchronous I/O support in ACE, add: #define ACE_HAS_AIO_CALLS to your config.h file before including ace/config-aix-5.x.h.

    The Visual Age 6.0.0.3 and 6.0.0.4 do have some bugs that makes them unusable for building TAO. TAO has been tested with 6.0.0.12 and had no problems with that version.

    For your platform_macros.GNU file, you should use platform_aix_ibm.GNU when building ACE with any of the IBM compilers and platform_aix_g++.GNU when building ACE with g++.

    BTW, here's a technique from Rob Jordan <jordan@hursley.ibm.com> that can reduce the size of the ACE libraries by about one third, and can also be applied to applications. It works by optimising the sharing of template functions, which are created in an "unusual" way under AIX. It also speeds up compilation.

    Here's how to optimise the ACE library generation:

    Look at the ace/GNUmakefile.ACE in $ACE_ROOT/ace. Create a file called ACE_All_Src.cpp, and add a line to #include each of the source files listed under FILES= in the GNUmakefile. Create a file called ACE_All_Tmp.h and add a line to #include each of the .h files listed under TEMPLATE_FILES= in the GNUmakefile. Now update the GNUmakefile so that FILES=ACE_All_Src and TEMPLATE_FILES=ACE_All_Tmp.

  • Linux

    ACE has been ported to Linux on Intel, Alpha, and PowerPC platforms. If you use a RedHat 5.x distribution, it's best to use RedHat 5.1 or later. ACE works without any modifications on RedHat 5.1 and later, and on Debian 2.1 on both Intel and Alpha. Use the platform_linux.GNU and ace/config-linux.h in your platform_macros.GNU and config.h files, respectively. The same files can be used on PowerPC, with LinuxPPC 1999 (R5), with glibc 2.1.1.

    If you run out of memory, it's easy to add virtual memory on Linux. Please see the mkswap man page. You'll need at least 256 to 300 Mb of virtual memory (RAM + swap) to compile all of ACE+TAO. The System Resource Requirements section has some suggestions on how to reduce the memory requirement.

    The glibc 2.0 dynamic loader isn't thread safe. If you want to use the Invocation API you'll have to set LD_BIND_NOW=true. If you want to use dlopen, you should use RTLD_NOW. The dynamic loader in glibc 2.1 is thread safe.

    NOTE: The TAO NameService uses IP multicasting by default, though it is not required. IP multicast on Linux requires the following:

    • Enable IP multicast in the Linux kernel. It is enabled in the default RedHat 5.1 kernel. In older distributions, you can enable it by rebuilding your kernel with CONFIG_IP_MULTICAST enabled.

    • Enable IP multicast in ACE. It is enabled by default in ace/config-linux.h. If you don't use IP multicast, add #define ACE_HAS_IP_MULTICAST 0 to your ace/config.h before building ACE.

    • There must be a network interface that is up and supports multicast. If you have linuxconf, it's easiest to use that to add a network route for multicast (224.0.0.0) on one of your network interfaces, such as eth0. If you don't have or use linuxconf, try adding a multicast routing table entry using something like this:

                   # route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
                  

    Some of the ACE tests fail on older, pre-glibc2 Linux platforms, such as RedHat 4.2. The problems are with threads and thread-specific storage.

  • SCO UNIX

    ACE has been ported to SCO UNIX using the GNU g++ 2.7.2 compiler. Arturo Montes <mitosys@colomsat.net.co> maintains this code. In addition, he also maintains a version of FSU pthreads.

  • SGI IRIX 5.x and 6.x

    ACE used to build fine using the SGI C++ and GNU GCC compilers for IRIX 5.x. It has been ported to IRIX 6.x using the SGI MipsPro 7.1 C++ compiler; be aware that in IRIX 6.2 there is a number of patches that have to be installed and exceptions appear to fail with the O32 ABI. Please check the config files for the details.

  • OSF/1 3.2 and 4.0 (a.k.a. Digital UNIX 4.0)

    The Digital UNIX C++ 5.4 through 5.7 compilers have problems with ACE's templates. They compile the lib and most of the test programs, although they warn about template usage. Most tests run, some dump core. If you use a 5.x version of cxx, be sure to set the CXX_VER variable to CXX_5, either on your make command line or in an environment variable. The ACE Makefiles assume by default that the cxx version is 6.x or later.

    CXX 6.0 and 6.1 are much improved over 5.x: V6.0-020, V6.1-025, and later build all of ACE cleanly. All of the tests in $(ACE_ROOT)/tests run successfully with CXX 6.0 and CXX 6.1. Please note that problems have been reported with some versions of CXX 6.1, notably versions -021 and earlier. It's best to use V6.1-022 or later.

    NOTE: if you use Digital UNIX 4.0f or later, you must use ace/config-tru64.h instead of ace/config-osf1-4.0.h. ace/config-tru64.h can be used for all supported compilers on any version of Digital UNIX after and include 4.0. And, with 4.0f and later when using Digital CXX, you must use include/makeinclude/platform_tru64_cxx.GNU instead of include/makeinclude/platform_osf1_4.0.GNU.

  • FreeBSD

    FreeBSD is a fast evolving platform. However, it has the advantage of having standard releases. At this moment, ACE is only perodically tested against -stable (3.1R) and we rely a lot on FreeBSD users' feedbacks.

    Notice that on older FreeBSD, ld.so only looks for so libraries with version number appended. ACE makefiles create symlinks for most shared libraries if versioned_so is defined to 1 in $ACE_ROOT/ace with appropriate ACE version. However, this does not work for libACE.so itself so you have to create it manually (If you figure out how to do this, please let us know) like this:

    ln -sf $ACE_ROOT/ace/libACE.so $ACE_ROOT/ace/libACE.so.4.5

    On newer FreeBSD (3.0 or later,) this is no longer necessary.

  • NetBSD

    Like older FreeBSD, NetBSD's ld.so also requires versioned .so files.

  • OpenBSD

    ACE has been ported to OpenBSD 3.1 and GNU g++ 2.95.3.

    As with FreeBSD and NetBSD, OpenBSD requires versioned .so files. This is currently handled by the build files and no additional work is needed.

    ACE has been ported to OpenBSD with and without pthreads enabled. When using pthreads, though, C++ exceptions must be disabled. This is a known problem with the current release of OpenBSD (see www.openbsd.org, bug #1750). ACE emulated exceptions work fine.

    Compiling TAO may require the user data segment size restrictions and possibly other options to be increased. This is done by modifying the default user class in /etc/login.conf or by adding a new class and modifying the master passwer file accordingly.

  • UnixWare

    Steve Huston <shuston@riverace.com> has ported ACE to work with UnixWare 2.01 and g++.

    Ganesh Pai <gpai@voicetek.com> subsequently did the port for version 2.1.2, also with g++.

    Phil Mesnier < mesnier_p@ociweb.com> updated the port to support UnixWare 7.1.0, with help from Michael Meissnitzer < michael.meissnitzer@siemens.at>, Christian Klepp < christian.klepp@siemens.at > and Engelbert Staller < engelbert.staller@siemens.at> Building ACE (and TAO) on Unixware 7.1.0 requires a very specific g++ build environment. In particular, you must build and install g++ 2.95.2, along with binutils 2.9.1. The order (and the declaration of configuration) is extremely important. Using the gcc compiler provided on the Skunkware CD on a pentium system, here is the recipe I used to build a working environment (as root):

      mkdir /usr/local/newgnu
    < ftp and untar binutils-2.9.1 >
    < ftp and untar gcc-2.95.2 >
      mkdir -p build/binutils build/gcc
      cd build/binutils
      ../../binutils-2.9.1/configure i386-sco-sysv4
      gmake  # takes a long time
      gmake install # this creates /usr/local/i386-sco-sysv4/...
      mkdir /usr/local/i486-pc-sysv5/bin
      cd /usr/local/i486-pc-sysv5/bin
      for a in /usr/local/i386-sco-sysv4/bin/*; do ln -s $a .; done
      #links all the newly installed utilities
    
      cd /usr/local/newgnu/build/gcc
      ../../gcc-2.95.2/configure --with-gnu-as --with-gnu-ld
      gmake bootstrap # takes a long time
      gmake install
      mkdir /usr/local/i586-UnixWare7.1.0-sysv5/bin
      for a in /usr/local/i386-sco-sysv4/bin/*; do ln -s $a .; done
    
    Once done, ACE and TAO will successfully build and link.

  • LynxOS

    ACE builds and runs properly on LynxOS 4.0 for Intel and PowerPC targets. LynxOS 2.x and 3.x are no longer supported. If you run out of memory on LynxOS, these might help:

    • Increase the limits in /etc/starttab, then reboot system. We use these limits:
      # Data, stack, and core file limits (in Kbytes)
      80000
      16000
      102400

    • Enable or expand virtual memory, with something like:
      # mkcontig /swap 320
      # prio 17 vmstart /swap
      See the mkcontig and vmstart man pages, and /bin/rc.

    Please see the comments in the ACE platform_lynxos.GNU file for information on, and an example of, tailoring for your particular platform.

    NOTE: if you want to use IP multicast on LynxOS, be sure to add this line to your /net/rc.network, and reboot:

    
            /bin/route add "224.0.0.0" "$my_name"
          
  • VxWorks

    David Levine <levine@cs.wustl.edu> has ported ACE to VxWorks 5.2/5.3/5.3.1/5.4 with the GreenHills 1.8.8/1.8.9, g++ and diab compilers that are distributed with VxWorks/Tornado. It is not possible to use VxWorks 5.4 and earlier with ACE anymore because the compilers delivered with 5.4 and earlier don't support the C++ features ACE needs.

    At this moment Remedy IT is upgrading and stabilizing ACE/TAO support for Tornado 2.2/VxWorks 5.5.1. Since the existing support for previous VxWorks version has been unsupported and broken for some time and most (potential) users seem to have upgraded to VxWorks 5.5.1 no backporting effort is done. See also here.

    Tornado 2.2/VxWorks 5.5.1 support IP multicast. That is not enabled by default in ACE for VxWorks, because it depends on your kernel configuration. To enable it, add #define ACE_HAS_IP_MULTICAST to your ace/config.h.

    NOTE: In order for the ACE Broadcast and Multicast tests to work the VxWorks kernel should receive the packages it sends out locally. By default this is not supported. To enable this behaviour you need to include the IFF_SIMPLEX flag for your required NIC driver. See the following Windriver SPR 4542 for more information.

    In addition to all of the other benefits of ACE, it helps work around some deficiencies with VxWorks. The problems are:

    1. The program entry point cannot be called "main" with g++. ACE renames it to "ace_main" (configurable via ACE_MAIN) on VxWorks. While this may seem trivial, it is important with legacy code. ACE itself ran into this problem.

    2. argc/argv isn't used with VxWorks entry points. ACE provides a wrapper function that transparently converts shell command line arguments to argc/argv form. See below for details.

    Please note that ACE uses one of the spare fields in the Wind River task control block, spare4, for thread-specific storage. This field is specified in only one place, in ace/OS_NS_Thread.inl, so it can easily be changed to one of the other spare fields, if necessary.

    ACE destroys dynamically allocated singletons in the ACE library. But, they may not properly destroy some static objects. If you have trouble running a program multiple times, it may be necessary to unload the module, using unld, and reload it between runs. Alternatively, you could try calling cplusDtors and then cplusCtors between runs.

  • MVS OpenEdition

    All of ACE has been ported to OpenEdition by Chuck Gehr <gehr@sweng.stortek.com>. The ACE library, all the tests and most of the examples and apps build clean. There are still some problems that need to be ironed out:

    MVS does not support the dynamic linking dl...() calls that the Service Configurator uses to dynamically link services at run time. As a result, all the examples and apps that use a svc.conf file (for dynamically configuring service objects) do not work, however, most of these apps can be built/run statically. Also, the Svc_Conf_l.cpp and Svc_Conf_y.cpp files are generated using flex and yacc on a ascii (not ebcdic) machine and as a result they don't work very well with ebcdic svc.conf files. We should be able to regenerate these files on MVS but MVS doesn't have flex. This is something that needs to be done.

    Some of the tests do not execute properly. This is a minority and over time the goal is to get to 100%.

    The make scheme for some of the apps still doesn't work perfectly on MVS. This is mainly due to the way shared libraries are handled on MVS. See additional build tips for MVS for more on this.

  • QNX Neutrino

    ACE has been ported to QNX Neutrino 2.0. We cross-compile for Neutrino on a QNX4 host using g++ 2.8.1, using the ace/config-qnx-neutrino.h and include/makeinclude/platform_qnx_neutrino.GNU configuration files. Many of the ACE tests succeed, though some fail. As the porting effort progresses, we hope to eliminate these failures. If you know of fixes, please send them to us.

  • QNX RTP

    ACE has been ported to QNX RTP . We compile for QNX RTP using the GCC compiler shipped with the distribution, using the ace/config-qnx-rtp.h and include/makeinclude/platform_qnx_rtp_gcc.GNU configuration files. Many of the ACE tests succeed, though some fail. As the porting effort progresses, we hope to eliminate these failures. If you know of fixes, please send them to us.

    WARNING: Under the current version of QNX RTP ACE fails if compiled with inline=0 .

  • RTEMS

    The support for RTEMS has been reviVed from version x.5.4. This version was the first version that build again out of the box on RTEMS. Compilation and testing was done for RTEMS with and without networking support. The ACE GNU makefiles do automatically detect whether networking support is available or not. Besides the standard config.h/platform_macros.GNU file you will need to set RTEMS_MAKEFILE_PATH to point to the location of your RTEMS installation, see below for an example.

    export RTEMS_MAKEFILE_PATH=/opt/rtems/CPU-rtems/BSP

    When building without network support you will need the ace_for_tao subsetting functionality enabled. For this add ace_for_tao = 1 to your bin/MakeProjectCreator/config file and regenerate the GNU makefiles as described here.

  • PharLap ETS

    ACE has been ported to Ardence's PharLap ETS version 13. The port was originally done for Pharlap 9.1 and MSVC 6, but has been updated to Pharlap ETS 13 with Visual Studio .NET 2003 (VC7.1).

    To build for PharLap, you'll need to use MPC to generate .sln/.vcproj files with the ETS configurations. For example:

    cd \ace\ACE_wrappers
    perl bin/mwc.pl  -type vc71 -relative ACE_ROOT=C:/ace/ACE_wrappers -relative TAO_ROOT=C:/ace/ACE_wrappers/TAO -value_template configurations='"ETS Debug"' -value_template configurations+='"ETS Release"' -name_modifier *_ETS TAO_ACE.mwc
          
    That command will generate the same .sln and .vproj files as for regular Windows builds with VC7.1, but they'll have names with an _ETS suffix and will include the "ETS Debug" and "ETS Release" configurations.

    After generating the needed VC7.1 files, use the ace/config-pharlap.h configuration file, and the instructions for building on Windows. Building the ACE library is the same as for regular Windows platforms, except you choose one of the PharLap ETS configurations to build within Visual Studio. For an example of how to build binaries, see the tests directory. The tests_pharlap_msvc.lnk file is a LinkLoc commands file that the ACE tests are built with. It is likely that local sites may need to adjust this file for their target environment.

    When executing programs on the target system, it is possible that not all of the VC++ support DLLs are resident on the target. In particular, the debug-supporting DLLs may not be present. If you require these, be sure to add those needed. For example, on the standard LabVIEW RT 8.2 distribution using Pharlap ETS, the following DLLs must be copied to the target before being able to run Debug programs:

    • msvcp71d.dll
    • msvcr71d.dll

    To build ACE for National Instruments' LabVIEW RT, use the Pharlap ETS information above, but add the following line to your config.h file:

          #define ACE_PHARLAP_LABVIEW_RT
          
    This setting makes the necessary adjustments for LabVIEW's implementation of Pharlap ETS. By default, the ACE tests log their output/results to the system console on Pharlap ETS. To change this behavior and make the test output log to a file in the log directory under the current working directory while executing, add the following line to your config.h file:
          #define ACE_PHARLAP_TESTLOG_TO_FILE
          
    This setting has no affect on TAO tests which always write test output to stdout.

  • Mac OS X (10.2.x)

    ACE builds and runs on Mac OS X 10.2.x, but the following are needed to build it:

    1. The latest version of the Apple Developer Tools (December 2002)

    2. The dlcompat library (obtained either through Fink or SourceForge)

    When creating $ACE_ROOT/ace/config.h for Mac OS X, you need to add the following if you obtained dlcompat via Fink:

    #define ACE_NEEDS_DL_UNDERSCORE

    You'll also need to do:

    setenv DYLD_LIBRARY_PATH $ACE_ROOT/ace:$ACE_ROOT/lib

    setenv MACOSX_DEPLOYMENT_TARGET 10.2

    Currently, all ACE tests pass except Process_Mutex_Test and MEM_Stream_Test. Also, Mac OS X doesn't yet support *nix aio_* calls, and ACE does not know anything about Mach.

    The work to port ACE to Mac OS X was done by several people, John Zorko <j.zorko@att.net> is only one of them.

  • iPhone/iPod Touch/iPad

    ACE builds and runs on the iPhone/iPod Touch/iPad Hardware and Simulator. Keep in mind that ACE/TAO needs to be built statically since Apple does not allow third party dynamic libraries to be deployed on the hardware. The following are needed to build ACE:

    1. The iPhone SDK.

    2. When creating $ACE_ROOT/ace/config.h, include config-macosx-iphone-hardware.h if you want to deploy on the hardware, include config-macosx-iphone-simulator.h if you want to deploy on the simulator. Even though those includes are named after the iPhone, the includes work for iPhone/iPod Touch, and iPad.

    3. You need to define two environment variables. The first is IPHONE_TARGET. Set IPHONE_TARGET to SIMULATOR if you want to deploy on SIMULATOR. Set IPHONE_TARGET to HARDWARE if you want to deploy on the hardware device.

    4. When creating $ACE_ROOT/include/makeinclude/platform_macros.GNU, include 'include $(ACE_ROOT)/include/makeinclude/platform_macosx_iphone.GNU' in the file.


Compiling ACE with GNU g++

If you use the GNU GCC g++ compiler please note the following:

  • ACE/TAO needs g++ 2.95.x or better. Older versions are not usable anymore

  • Make sure to update your gcc config.status file. This file is produced when installing gcc; it specifies where to install the binary files that gcc uses. For example, it specifies whether to use Solaris's /usr/ccs/bin binary utils or GNU binary utils. The config.status file is an output of the gcc configure script; it is preferable to use the --prefix option to configure instead of hacking its output.

  • If you are getting weird link errors when building libACE on Solaris you are probably using the GNU linker. Try using the Sun linker (/usr/ccs/bin/ld) instead. Note that gcc first looks for the GNU linker if it is installed along with gcc. The only way to not use the GNU linker is to delete it from the installation or to build your own compiler with no linker. Be aware that you still need the libraries and includes of gcc.

    NOTE: if you do use the GNU linker, you might need to change the -G flag to -shared in the SOFLAGS definition in your include/makeinclude/platform_macros.GNU.

  • Don't get too confused about contradictory statements in the gcc documentation. It was written by different people...

  • Make sure that the linker invoked by gcc produces code that initializes static objects. Please see gcc's documentation for using collect2.


What Do I Need to Build for TAO?

Toshio Hori <toshi@etl.go.jp> provided these suggestions on building just what's needed for (a subset of) TAO:

I usually make:

    $ACE_ROOT/ace,
    $ACE_ROOT/apps/gperf,
    $TAO_ROOT/tao,
    $TAO_ROOT/TAO_IDL, and
    $TAO_ROOT/orbsvcs/orbsvcs
and the whole make takes less than an hour on my Solaris 7 for intel, Pentium-III/550MHz, 256MB memory, 512MB swap machine. (Top secret: I renice the 'make' process to the highest priority, -20... ;-) To save time and space, I set
    TAO_ORBSVCS = Naming Time Trader ImplRepo
in $ACE_ROOT/include/makeinclude/platform_macros.GNU also. See TAO's orbsvcs library customization instructions for more information.


System Resource Requirements

The amount of system resources required to build ACE and TAO varies greatly. The required system resources are influenced by OS and compiler platform, build options, and component configurations. As a rough guide, the typical peak memory requirement can be well over 512 MB (notably, for TAO's orbsvcs). Depending on your OS and compiler configuration, an entire build of ACE and TAO can use well over 4 GB of disk space. It's usually not necessary to build all of ACE and TAO, though.

Much less disk space is required for just the libraries. For example, see the ACE library subset sizes.

If you run out of memory when building, you might consider trying some or all of these suggestions:

  • Enable or increase virtual memory. If you're on a Linux or LynxOS platform, please see the appropriate sections above.

  • Disable/enable optimization and/or debugging. See the Makefile Flags discussion for information on how to do that via ACE's Makefiles.

  • If you're using g++, try removing -pipe from CFLAGS in your include/makeinclude/platform_macros.GNU file.

  • Restrict the components that you build. For ACE and TAO, see the discussion of ACE_COMPONENTS in the ACE subsets page. For TAO's orbsvcs, see the discussion of TAO_ORBSVCS in orbsvcs Library configuration information.

    If disk space is a problem, disabling debugging should greatly reduce object code, and therefore, library size. This is especially true with g++.

    Toshio Hori <toshi@etl.go.jp> provided these tips for reducing disk space usage:

    To save space on a Unix machine, I usually run 'find . -name \*.sln -o -name \*.vcproj -o -name \*.bmak | xargs rm -f' in $ACE_ROOT at first after I untar the distribution. They are meaningless in my environment (Files named '*.sln' and '*.vcproj' are used for MSVC++ and files named '*.bmak' are for Embarcadero C++ Builder.)

    Finally, to save space, may want to run 'make clean' after 'make'. It removes generated object files and leaves libraries/executables intact. If you want to remove any of the libraries/executables, as well, try 'make realclean'.


General MPC information

The USAGE, README for documentation on MPC.

A common usage for creating a Windows workspace containing just the core ACE and TAO libraries and executables is the following:


C:> cd %TAO_ROOT%
C:> %ACE_ROOT%\bin\mwc.pl -type vc71 TAO_ACE.mwc
Replace vc71 with whatever project type you want to use. On Linux and other UNIX platform use the gnuace type:


% cd $TAO_ROOT
% $ACE_ROOT/bin/mwc.pl -type gnuace TAO_ACE.mwc
this creates the appropriate GNUmakefiles. Additional information on how to obtain, configuration, and build ACE+TAO using MPC appear at the OCI FAQ.

If you are attempting to generate project files using MPC, and you get the following error message:

ERROR: Unable to find the MPC modules in /builds/ACE_wrappers/MPC.
You can set the MPC_ROOT environment variable to the location of MPC.
You need to do one of the following:
  1. If you have already obtained MPC, either move it underneath the ACE_wrappers directory or set your MPC_ROOT environment variable to point to the full path of MPC.
  2. Check out MPC from the DOC Group git repository and set your MPC_ROOT environment variable.
You can check out MPC from the DOCGroup git repository using the following command.
git clone https://github.com/DOCGroup/MPC.git MPC
The README and USAGE files in the MPC/docs directory are an up-to-date source of documentation, however it is not a complete set of documentation. The TAO Developer's Guide from OCI starting with the 1.3a version contains more information about MPC.

The MPC chapter from the TAO Developer's Guide is available at http://downloads.ociweb.com/MPC/. Some of MPC has changed since this version, but it is largely accurate. An updated version will be available as newer versions of the TAO Developer's Guide are released. In the meantime, please see the README and USAGE files in the MPC directory.

Working with ACE in Eclipse

The Eclipse CDT C++ development environment can be used to develop ACE applications. You can configure a new CDT project to build ACE using either a local source distribution or checking out ACE from CVS in Eclipse. These are the steps to create the CDT project to build ACE.

To create an Eclipse project for ACE starting from CVS:

  1. In the "CVS Repository Exploring" perspective, navigate to the module containing ACE.
  2. Checkout the module using "Check Out As" and select the "project configured using the New Project Wizard" option.
  3. Select "Standard Make C++ Project" for the project type.
  4. Follow the steps outlined above, up to the point of running make, for building ACE on your platform. Use "path_to_your_eclipse_workspace"/"project_name" as your $ACE_ROOT.
  5. If you had to regenerate the makefiles using MPC, select the root folder for your poject and use the import wizard to add them to your project.
  6. Select the root folder for the project and use the "Create Make Target" wizard to setup the appropriate make command and options.
  7. Select the root folder and run "Build Make Target." This will build ACE.

To create an Eclipse project for ACE from a local source distribution:

  1. Launch the "New Project Wizard" in Eclipse.
  2. Select "Standard Make C++ Project" for the project type.
  3. On the project name page, uncheck the "use default" location option and replace the default path with the path to your source distribution.
  4. Follow the steps, up to the point of running make, for building ACE on your platform.
  5. If you had to regenerate the makefiles using MPC, select the root folder for your poject and use the import wizard to add them to your project.
  6. Select the root folder for the project and use the "Create Make Target" wizard to setup the appropriate make command and options.
  7. Select the root folder and run "Build Make Target." This will build ACE.


Advanced Topics


Non-static ACE_Object_Manager

The ACE_Object_Manager can be instantiated as a static object, can be instantiated on the stack of the main program thread, or can be explicitly instantiated and destroyed by the application with ACE::init () and ACE::fini (). The comments in the header file, ace/Object_Manager.h, as well as Section 1.6.3 in The ACE Programmer's Guide provide more detail.

NOTE: Special requirements are imposed on applications if the ACE_Object_Manager is instantiated, by ACE, on the stack of the main thread. This behavior is selected by defining ACE_HAS_NONSTATIC_OBJECT_MANAGER in ace/config.h. Again, see the ACE Object_Manager header file, ace/Object_Manager.h for more information. One of these requirements is discussed here, because it is so important. Please note that ACE_HAS_NONSTATIC_OBJECT_MANAGER is defined in the distributed ACE config.h headers for VxWorks and Win32.

The important requirement is that the program must declare its main function with two arguments, even if they're not used, and with int return type:


int
main (int, char *[])
If you don't declare main exactly that way, then you'll see a link error about ace_main_i being undefined.

Alternatively, this feature can be disabled by commenting out the #define ACE_HAS_NONSTATIC_OBJECT_MANAGER in the ace/config.h. But, that will make repeated testing more difficult on VxWorks. And, you'd either have to call static constructors and destructors manually or unload/load the program between runs. On Win32, disabling the feature can possibly lead to shutdown difficulties.

WARNING: ACE_HAS_NONSTATIC_OBJECT_MANAGER assumes that your main function is named main. Any violation of this assumption is at your peril. If you really need to call your entry point something other than main, you'll need to construct and destroy the ACE_Object_Manager. The best way to do that is to call ACE::init () and ACE::fini (). Or, see the #define of main (int, char *[]) in ace/OS_main.h to see how ACE does that for entry points named main.


Cloning the Source Tree

On UNIX platforms, we typically like to support multiple platform builds using the same ACE source tree. This idiom is supported by ACE using the $ACE_ROOT/bin/create_ace_build.pl script. To clone the source tree, create ./build and ./build/{your build name} subdirectories under the ACE_wrappers directory. Then invoke the create_ace_build.pl script to clone the source tree using soft links from your build directory back to the actual sources. Here is an example:

% cd ACE_wrappers
% mkdir build build/build-SunOS5
% perl bin/create_ace_build.pl -a -v build-SunOS5
% cd build/build-SunOS5
% setenv ACE_ROOT $cwd
% make

This will establish a complete tree of links. In addition, make sure you set your LD_LIBRARY_PATH to $ACE_ROOT/lib:$LD_LIBRARY_PATH on SVR4 UNIX platforms.

When you do a make in the $ACE_ROOT directory you will be producing object code that is not stored in the same place as the original source tree. This way, you can easily build another platform in a parallel tree structure.

See the comments at the top of the create_ace_build.pl script for further usage information.


Additional Build Tips for MVS

For all intents and purpose, MVS OpenEdition (OE) is another flavor of UNIX, therefore, the instructions under Building and Installing ACE on Unix can be used along with the following additional tips:

You can get a copy of GNU make that has been ported to MVS OpenEdition from the IBM OpenEdition web site. ACE's make scheme generates compile commands that have options and operands interspersed. By default, the c89/cc/c++ compiler expects all options to precede all operands. To get around this, you must set a special compiler environment variable (_CXX_CCMODE) to 1 which tells the compiler to allow options and operands to be interspersed.

Note that the environment variable LD_LIBRARY_PATH is called LIBPATH on MVS.

Shared objects are built a little different on MVS than on other UNIX implementations. This has been accounted for in the makefiles that come with ACE When the linker (via the cxx command) builds the libACE.so file it will also create a file called libACE.x. This is a side-deck file and it must be included in subsequent link edits with application code. For more information on this see the C/C++ MVS Programming Guide. If you want to build your application statically, i.e., using libACE.a instead of libACE.so, you can set ACELIB to ACELIB_STATIC in platform_mvs.GNU.

When the libACE.so file is built (via the MVS pre-linker and binder), you will get a rc=4 from the pre-linker. This is ok. This is due to some warnings about unresolved references which should get resolved during the link step. Note, however, there shouldn't be any unresolved references from the binder (linkage editor). You can get pre-link and link maps by uncommenting the PMAP and LMAP lines in the platform_mvs.GNU file.


Makefile Flags

GNU make provides many options to customize its operation. See its documentation for more information. One example is that for multi-cpu UNIX machines you will be able to build faster if you use:


% make -j n

which allows parallel compilation. The number n should typically be the number of CPUs. It is likely that builds will be faster even on single-CPU UNIX machines with make -j 2.

ACE further supports the following flags. They can be enabled either on the command line, e.g., "make purify=1", or added to your platform_macros.GNU. To disable the option, set the flag to null, e.g., "make debug=". Some flags support setting to 0 disable, e.g., "make debug=0". debug=1 is enabled in the platform files that are released with ACE.

Please note that the effects of a flag may be platform specific. Also, combinations of certain flags may or may not be allowed on specific platforms, e.g., debug=1 opt=1 is supported by g++ but not all other C++ compilers.

If you use Purify or Quantify: purify or quantify must be on your PATH. By default, ACE puts the Purify/Quantify caches below /tmp. To override that, set the PURE_CACHE_BASE_DIR variable, either in your environment or on the make make command line, to the destination directory for your instrumented libraries.

Flag             Description
----             -----------
debug            Enable debugging; see DCFLAGS and DCCFLAGS.
exceptions       Enable exception handling (not supported by all platforms).
include_env      Support old-style ACE_TRY_ENV declarations in methods.
                 This switch is necessary for compiling TAO applications
                 in the native exception configuration that were written
                 for TAO versions before 1.2.2.
                 In TAO 1.2.2, new macros were introduced that supercede
                 the direct ACE_TRY_ENV declarations. These are the
                 ACE_ENV_ARG macros that are defined in ace/CORBA_macros.h
                 and are documented in docs/exceptions.html.
                 This switch only affects the exceptions=1 configuration.
                 It is for backward compatibility only.
                 There will be warnings about unused _ACE_environment_variable
                 parameters when using include_env=1.
                 If possible, do not use it, but instead change your TAO
                 applications to use the ACE_ENV_ARG macros.
fast             Enable -fast option, e.g., with Sun C++.
inline           Enable ACE inlining.  Some platforms enable inlining by
                   default, others do not.
optimize         Enable optimization; see OCFLAGS and OCCFLAGS.
pace             Enable PACE as the underpinnings of ACE_OS.
probe            Enable ACE_Timeprobes.
profile          Enable profiling; see PCFLAGS and PCCFLAGS.
purify           Purify all executables.
quantify         Quantify all executables.
repo             Use GNU template repository (g++ with repo patches only).
rtti             Enable run-time type identification.  On some platforms,
                   it is enabled by default, so this is ignored.
shared_libs      If migrating from prior version use shared_libs_only
static_libs      If migrating from prior version use static_libs_only
shared_libs_only Only build shared libraries.  Ignored if no SHLIBs are
                   specified by the Makefile, as in performance-tests/Misc.
static_libs_only Only build static libraries.
threads          Build with thread support.
xt               Build with Xt (X11 Toolkit) support.
fl               Build with FlTk (Fast Light Toolkit) support.
tk               Build with Tk (Tcl/Tk) support.
qt               Build with Qt (Trolltech Qt) support.
ssl              Build with OpenSSL support.
rapi             Build with RAPI
split            Build the library by first splitting up the ACE source
                   to several files, with one object code entity for each
                   source file. This allows an application that is linked
                   with ACE to extract _exactly_ what it needs from the
                   library, resulting in a smaller executable.  Setting this
                   to 1 overrides debug to 0.

Usually, users do not need to be concerned with make targets.
Just enter "make" on the command line to build.  A few notable
targets are listed below.

Target             Description
------             -----------
show_statics       Lists all static objects in object files built for
                     current directory.  Only supported for g++.
show_uninit        Lists all uninitialized in object files built for
                     current directory.  Only supported for g++.


Building from git

If users are building from our Git repository the GNUmakefiles, and project files for building on various platforms will not be available. Git users are expected to generate them using MPC before building ACE, TAO or CIAO. We point out some suggestions below to get bootstrapped quickly.
  • You can clone all code easily from our git repository.
      git clone https://github.com/DOCGroup/ACE_TAO.git

  • Please make sure that you have perl installed, preferably perl 5.8 or higher. Users on Win32 based platforms are recommended to use Active State Perl. We use active state perl without problems. We have ran into problems trying to use the cygwin version of perl on Win32 based platforms.

  • To build ACE and associated tests, examples, and associated utility libraries with GNUmakefiles, you must generate GNUmakefiles with MPC:

    $ACE_ROOT/bin/mwc.pl -type gnuace ACE.mwc

    On Windows, with Visual C++ 8, you must generate solution and project files with MPC:

    $ACE_ROOT/bin/mwc.pl -type vc8 ACE.mwc

    On Windows, with Visual C++ 7, you must generate solution and project files with MPC:

    $ACE_ROOT/bin/mwc.pl -type vc71 ACE.mwc

  • If you want to build TAO and its associated libraries please see TAO-INSTALL for details.

Back to the ACE home page.

ace-6.4.5+dfsg.orig/PROBLEM-REPORT-FORM0000644000175000017500000000670713154167357015103 0ustar tggtgg[Please use the PRF form below to submit bug reports, problem reports, etc., to the ACE developers and interested users. Send it to ace-bugs@list.isis.vanderbilt.edu, you must be subscribed to the list in order to be able to post to it. If you are using OCI, PrismTech, or Riverace's versions of ACE do not send bugs to this mailing list, but instead contact those companies for support. Please also send your PRF as plain ASCII text, _not_ uuencoded or as an attachment. We prefer that all bug reports be submitted through our bug tracking system. See $ACE_ROOT/docs/usage-bugzilla.html for more information about how to do this. If you are unsure as to whether your problem is a real bug or not then please submit your question to the mailing list using the following form. Not using the problem report form will make it harder or impossible to identify the problem, and in many cases we will be unable to help at all. Also please try to browse bugzilla and the ChangeLog files to find out if your problem has been solved in a more recent version of ACE. To subscribe to the list see http://www.dre.vanderbilt.edu/~schmidt/ACE-mail.html Replace/remove all the explanatory text in brackets before mailing. Please send this form as ASCII text only. Do _not_ send it as an attachment, or as tar'ed, compressed and/or uuencoded text. And limit line lengths to less than 80 characters. PLEASE make your Subject: line as descriptive as possible. Subjects like "ACE bug" or "bug report" are not helpful! Also, do _not_ include the word "help" in the Subject!] When including your config.h and platform_macros.GNU files as requested below, only include the contents if you use the recommended method of including the platform-specific file in your file. If you use a link to the platform-specific file, simply state which one - DO NOT include an entire platform-specific configuration file in the form. 8<----------8<----------8<----------8<----------8<----------8<----------8<---- To: ace-bugs@list.isis.vanderbilt.edu Subject: [area]: [synopsis] ACE VERSION: 6.4.5 HOST MACHINE and OPERATING SYSTEM: If on Windows based OS's, which version of WINSOCK do you use?: TARGET MACHINE and OPERATING SYSTEM, if different from HOST: COMPILER NAME AND VERSION (AND PATCHLEVEL): THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform- specific file, simply state which one]: THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you use a link to a platform-specific file, simply state which one (unless this isn't used in this case, e.g., with Microsoft Visual C++)]: CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features (used by MPC when you generate your own makefiles): AREA/CLASS/EXAMPLE AFFECTED: [What example failed? What module failed to compile?] DOES THE PROBLEM AFFECT: COMPILATION? LINKING? On Unix systems, did you run make realclean first? EXECUTION? OTHER (please specify)? [Please indicate whether ACE, your application, or both are affected.] SYNOPSIS: [Brief description of the problem] DESCRIPTION: [Detailed description of problem. Don't just say " doesn't work, here's a fix," explain what your program does to get to the state. ] REPEAT BY: [What you did to get the error; include test program or session transcript if at all possible. ] SAMPLE FIX/WORKAROUND: [If available ] ace-6.4.5+dfsg.orig/AUTHORS0000644000175000017500000000056613154167357013353 0ustar tggtggDouglas C. Schmidt d.schmidt@vanderbilt.edu Professor of Computer Science Associate Chair of Computer Science and Engineering Department of Electrical Engineering and Computer Science Senior Researcher at the Institute for Software Integrated Systems (ISIS) Vanderbilt University Nashville, TN 37203 www.dre.vanderbilt.edu/~schmidt TEL: (615) 343-8197 FAX: (615) 343-7440 ace-6.4.5+dfsg.orig/lib/0000775000175000017500000000000013157240624013034 5ustar tggtggace-6.4.5+dfsg.orig/lib/.empty0000644000175000017500000000010413154167357014174 0ustar tggtggThis file keeps the directory around even when using cvs update -dP ace-6.4.5+dfsg.orig/bin/0000775000175000017500000000000013157240624013036 5ustar tggtggace-6.4.5+dfsg.orig/bin/depgen.pl0000755000175000017500000000342113154167357014646 0ustar tggtgg#! /usr/bin/perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # ************************************************************ # Description : Generate dependencies for GNU Make and NMake. # Author : Chad Elliott # Create Date : 5/06/2002 # # ************************************************************ # ************************************************************ # Pragma Section # ************************************************************ use strict; use FindBin; use File::Spec; use File::Basename; my($basePath) = $FindBin::RealBin; if ($^O eq 'VMS') { $basePath = File::Spec->rel2abs(dirname($0)) if ($basePath eq ''); $basePath = VMS::Filespec::unixify($basePath); } unshift(@INC, $basePath . '/DependencyGenerator'); my($mpcroot) = $ENV{MPC_ROOT}; my($mpcpath) = (defined $mpcroot ? $mpcroot : dirname($basePath) . '/MPC'); unshift(@INC, $mpcpath . '/modules/Depgen', $mpcpath . '/modules'); if (! -d "$mpcpath/modules/Depgen") { print STDERR "ERROR: Unable to find the MPC DependencyGenerator ", "modules in $mpcpath.\n"; if (defined $mpcroot) { print STDERR "Your MPC_ROOT environment variable does not point to a ", "valid MPC location.\n"; } else { print STDERR "You can set the MPC_ROOT environment variable to the ", "location of MPC.\n"; } exit(255); } require Driver; # ************************************************************ # Main Section # ************************************************************ my($driver) = new Driver('UNIX=gnu', 'automatic=ACE_ROOT,TAO_ROOT,CIAO_ROOT,' . 'DDS_ROOT,ACE_PLATFORM_CONFIG'); exit($driver->run(\@ARGV)); ace-6.4.5+dfsg.orig/bin/generate_rel_manpages0000755000175000017500000000455713154167357017314 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; use strict; require Cwd; ########### ###### Sanity Checks ########## my $perl_path = '/usr/bin/perl'; my $status= 0; &can_run($perl_path.' -V') || die "$0: perl path is incorrect, please fix the script\n"; my $doxy_path = '/usr/local/bin'; $ENV{'PATH'} = $ENV{'PATH'}.':'.$doxy_path; print "Starting doxygen document generation \n"; my $chgrp = 'chgrp'; my $cpio = 'cpio'; my $date = 'date'; my $egrep = 'egrep'; my $find = 'find'; my $gzip = 'gzip'; my $bzip = 'bzip2'; my $tar = 'tar'; my $mv = 'mv -f'; my $scp = 'scp '; my $rm = 'rm -f'; my $cp = 'cp -f'; my $md5sum = 'md5sum'; my $shell_cd = 'cd'; my $cksum_ext = 'md5'; my $redirect = '>'; my $checksum = '$md5sum'; $SIG{'HUP'} = $SIG{'INT'} = $SIG{'QUIT'} = $SIG{'TERM'} = 'cleanup'; my $release_filter = '\\( -name .svn -o -name build \\) -prune -o ' . '! -name \'.\#*\' ! -name \'\#*\' ! -name \'*~\' ' . '! -name \'*.MAK\' -print'; my $bin_files = "\"\\.mak|\\.mdp|\\.ide|\\.exe\|\\.ico\|\\.gz\|\\.zip\|" . "\\.gif|\\.vcp|\\.vcproj|\\.vcw|\\.sln\""; ######## ######## Main execution thread. ######## &ex ("bin/generate_doxygen.pl -is_release -perl_path $perl_path") && die "$0: failed to generate ACE man pages\n"; my $build_command = "$find ./html $release_filter | $cpio -o -H tar | " . "$gzip -9 > ACE-html.tar.gz && ". "$find ./html $release_filter | $cpio -o -H tar | " . "$bzip -9 > ACE-html.tar.bz2 && ". "$find ./html $release_filter | $egrep -v $bin_files | " . "zip ACE-html.zip -q9@ &&" . "md5sum ACE-html.tar.gz > ACE-html.tar.gz.md5 &&" . "md5sum ACE-html.tar.bz2 > ACE-html.tar.bz2.md5 &&" . "md5sum ACE-html.zip > ACE-html.zip.md5;"; &ex ($build_command) && die "$0: failed to package ACE man pages\n"; print "Finished doxygen document generation \n"; exit $status; ######## ######## Verify that a command can be executed, return 1 on sucess ######## sub can_run { my $command = shift; open (RUN, "$command 2>&1 |") || return 0; while () {} close(RUN) || return 0; return 1; } ######## ######## Execute a command, unless -n had been specified. Return value ######## of 0 indicates success. ######## sub ex () { my ($command) = @_; print "Command is $command \n"; system ("$command"); } ace-6.4.5+dfsg.orig/bin/libsize.pl0000755000175000017500000001204613154167357015050 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # # Provides size breakdown of ACE, TAO, or orbsvcs libs. # # Assumes (or builds) the lib with debug=0. Allows other make args, # such as -j 4, to be passed on the command line. $usage = "$0 [-h, for html output] [-s, for shared libs] [-v] [make arguments]\n"; #### #### Configuration parameters. #### $build_args = 'debug=0 optimize=1 static_libs_only=1 DEFFLAGS=-DACE_USE_RCSID=0'; $ACE_COMPONENTS = 'OS Utils Logging Threads Demux Connection Sockets IPC Svcconf ' . 'Streams Memory Token Other'; $TAO_COMPONENTS = 'POA Pluggable_Protocols Default_Resources Interpretive_Marshaling ' . 'IDL_Compiler ORB_Core Dynamic_Any'; $ORBSVCS_COMPONENTS = 'Naming ImplRepo Time Concurrency Property Trader LifeCycle Sched ' . 'Event CosEvent Event2 AV'; #### The following are only used for VxWorks libraries, and #### only if the corresponding environment variable isn't set. $default_toolenv = '386'; $default_wind_base = '/project/doc/pkg/wind'; $default_host_type = 'sun4-solaris2'; #### Use gmake if it's on the user's PATH, otherwise use make. Use #### sh -c to avoid warning if gmake isn't found. $make = system ("sh -c \"gmake --version\" > /dev/null 2>&1") ? 'make' : 'gmake'; $ACE_ROOT = $ENV{'ACE_ROOT'} || die "$0: ACE_ROOT was not set!\n"; $html = $verbose = 0; $lib_extension = 'a'; #### #### Process command line args. #### while ($#ARGV >= $[ && $ARGV[0] =~ /^-/) { if ($ARGV[0] eq '-h') { $html = 1; chop ($sysname = `uname -s`); chop ($sysrev = `uname -r`); shift; } elsif ($ARGV[0] eq '-s') { $lib_extension = 'so'; $build_args =~ s/ static_libs_only=1//; shift; } elsif ($ARGV[0] eq '-v') { $verbose = 1; shift; } elsif ($ARGV[0] eq '-?') { print "$usage"; exit; } else { #### Pass remaining args to make. } } $make_args = join (' ', @ARGV) . $build_args; chop ($pwd = `pwd`); if ($pwd =~ m%/ace$%) { #### libACE $COMPONENTS = "$ACE_COMPONENTS"; $LIB_COMPONENTS = 'ACE_COMPONENTS'; $libname = 'ACE'; } elsif ($pwd =~ m%/tao$%) { $COMPONENTS = "$TAO_COMPONENTS"; $LIB_COMPONENTS = 'TAO_COMPONENTS'; $libname = 'TAO'; } elsif ($pwd =~ m%/orbsvcs/orbsvcs$%) { $COMPONENTS = "$ORBSVCS_COMPONENTS"; $LIB_COMPONENTS = 'TAO_ORBSVCS'; $libname = 'orbsvcs'; } else { die "$0: unsupported directory; $pwd\n"; } $lib = "lib${libname}.$lib_extension"; #### #### Select the size command based on ACE_ROOT setting. #### if ($ACE_ROOT =~ /vxworks/) { $TOOLENV = $ENV{'TOOLENV'} || $default_toolenv; $WIND_BASE = $ENV{'WIND_BASE'} || $default_wind_base; $WIND_HOST_TYPE = $ENV{'WIND_HOST_TYPE'} || $default_host_type; $size = "$WIND_BASE/host/$WIND_HOST_TYPE/bin/size$TOOLENV"; } elsif ($ACE_ROOT =~ /lynx-ppc/) { $size = '/usr/lynx/3.0.0/ppc/cdk/sunos-xcoff-ppc/bin/size'; } elsif ($ACE_ROOT =~ /lynx/) { $size = '/usr/lynx/3.0.0/x86/cdk/sunos-coff-x86/bin/size'; } elsif ($ACE_ROOT =~ /chorus/) { $size = '/project/doc/mvme/green68k/gnu/bin/size'; } else { $size = 'size'; } #### #### Measure the size of the entire library. #### $sizeTotal = build_lib ("$LIB_COMPONENTS=\"$COMPONENTS\""); $components = " Platform\n Component\n Total"; $componentSize = " Size, bytes\n $sizeTotal"; $componentPercentage = " Percentage of
total size\n 100"; print "Total $sizeTotal (100)\n" unless $html; #### #### Measure the size of each library component. #### foreach my $i (split (' ', $COMPONENTS)) { $sizeLib = build_lib ("$LIB_COMPONENTS=\"$i\""); $components .= "\n $i"; $componentSize .= "\n $sizeLib"; $thisPercentage = percentage ($sizeLib, $sizeTotal); $componentPercentage .= "\n $thisPercentage"; print "$i $sizeLib ($thisPercentage)\n" unless $html; } #### #### Produce HTML output, if requested. #### if ($html) { print '
' . "\n"; print ' ' . "\n"; print "$echoArgs $components\n"; print ' ' . "\n"; print " ' . "\n"; print "$echoArgs $componentPercentage\n"; print '
$sysname $sysrev $ACE_ROOT\n"; print "$echoArgs $componentSize\n"; print '

' . "\n"; } #### #### Build library with components specified in argument. #### sub build_lib () { my ($lib_components) = @_; unlink "$lib"; print "$make $make_args $lib_components\n" if $verbose; system ("$make $make_args $lib_components >> make.log 2>&1") && die "$0: command failed; $make $make_args $lib_components\n"; my $libSize = 0; open (SIZE, "$size $lib |") || die "$0: unable to open $size\n"; while () { my (@field) = split; $libSize += $field[3] if $field[3] =~ /\d/; #### Skip size header line. } close (SIZE); $libSize; } #### #### Return percentage of first argument as fraction of second. #### Returns a string with two-decimal place precision. #### sub percentage () { my ($size, $total) = @_; sprintf ("%.2f", $size * 100 / $total); } ace-6.4.5+dfsg.orig/bin/group_test_stats.sh0000755000175000017500000000032213154167357017011 0ustar tggtgg#!/bin/sh if test -e tmp; then unlink tmp; fi if test -e tmp2; then unlink tmp2; fi cat t.txt | grep '+[a-z|A-Z]' > tmp sort tmp | uniq -c > tmp2 unlink tmp sort -n -r tmp2 > uniq.txt unlink tmp2 cat uniq.txt ace-6.4.5+dfsg.orig/bin/g++_metric.sh0000755000175000017500000000113213154167357015317 0ustar tggtgg#!/bin/sh # # This simple script is used to gather compile time metrics. You can use # it with make like this: # # $ make CXX=g++_metric.sh # commandline=$@ # find the target and save it to a variable until [ -z "$1" ] # test all command line parameters do if [ "-o" = "$1" ] then shift target=$1 break fi shift done # echo out "(%x)", the return value from g++, so the script processes the output # will only use times for successful compilations, i.e., "(0)". /usr/bin/time -f "//compile time(%x): ${PWD#$ACE_ROOT/}/${target} %U %S" g++ $commandline retval=$? exit $retval ace-6.4.5+dfsg.orig/bin/svcconf-convert.pl0000755000175000017500000001762513154167357016536 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # # File: svcconf-convert.pl: # Purpose: This perl script convert classic svc.conf file into XML svc.conf file format. # Usage: svcconf-convert.pl [-i infile] [-o outfile] [-verbose] [-nocomment] # -i: Specify the input classic svc.conf filename. # If omitted, the default input filename is "svc.conf". # -o: Specify the output XML svc.conf filename. # If this argument is omitted, the resulting XML file will be written # to file called .xml. # -verbose: Verbose output. # -nocomment: Remove all comments. Use this argument if you have comments # mixing in the middle of a classic svc.conf directive. $indent = 0; sub inc_indent { $indent += 2; } sub dec_indent { $indent -= 2; } sub get_indent { $retv = 0; print STDERR "$0 (", $lineno, "): Unbalanced macro pairs\n" if ($indent < 0); $retv = $indent - 1 if ($indent > 0); $retv; } sub acexml_comment { my $comment = shift; print OUT " " x &get_indent (), "\n"; } sub acexml_start { my $name = shift; my $standalone = shift; print OUT " " x &get_indent (), "<$name"; while (@attnames) { print OUT " ", pop (@attnames), '="', pop (@attvalues), '"'; } if ($standalone != 0) { print OUT "/>\n"; } else { print OUT ">\n"; inc_indent (); } } sub acexml_end { my $name = shift; dec_indent (); print OUT " " x &get_indent (), "\n"; } $verbose = 0; $nocomment = 0; @attvalues = (); @attnames = (); $stream = ""; $infile = ""; $outfile = ""; while ( $#ARGV >= 0) { if ($ARGV[0] =~ m/^-i/i) { shift; $infile = "$ARGV[0]"; } elsif ($ARGV[0] =~ m/^-o/i) { shift; $outfile = "$ARGV[0]"; } elsif ($ARGV[0] =~ m/^-verbose/i) { $verbose = 1; } elsif ($ARGV[0] =~ m/^-nocomment/i) { $nocomment = 1; } elsif ($ARGV[0] =~ m/^-(\?|h|help)/i) { # Help information print " Usage: svcconf-convert.pl [-i infile] [-o outfile] [-verbose] [-nocomment] -i: Specify the input classic svc.conf filename. If omitted, the default input filename is 'svc.conf'. -o: Specify the output XML svc.conf filename. If this argument is omitted, the resulting XML file will be written to file called .xml. -verbose: Verbose output. -nocomment: Remove all comments. Use this argument if you have comments mixing in the middle of a classic svc.conf directive. "; exit; } elsif ($ARGV[0] =~ m/^-/) { warn "$0: unknown option $ARGV[0]\n"; exit 1; } else { die "unknow argument\n"; } shift; } if ($infile eq "") { print "Using default svc.conf name\n" if ($verbose != 0); $infile = "svc.conf"; } if ($outfile eq "") { $outfile = "$infile.xml"; } print "OUTFILE = $outfile \n" if ($verbose); open (OUT, "> $outfile") or die "Unable to open $outfile\n"; undef $/; open (FH, "< $infile"); $_ = ; if ($nocomment) { if (s/^\#(.*)$//mg) { print "ts = $_\n" if ($verbose != 0); } } print "------------------------------------------------------------\n" if ($verbose != 0); print OUT "\n"; print OUT "\n"; acexml_start ("ACE_Svc_Conf", 0); while (length ($_) != 0) { s/^\s*$//mg; print "INPUT =\n$_\n" if ($verbose); PARSE: { if (s/^\s*\#(.*)//) { acexml_comment ($1); print "# $1\n" if ($verbose); } if (s/^\s*{//) { acexml_start ("module", 0); print "open module\n" if ($verbose); } if (s/^\s*}//) { acexml_end ("module"); acexml_end ($stream); print "close module\n" if ($verbose); } if (s/^\s*stream\s+dynamic\s+(\w+)\s+(\w+)\s*\*\s*(\S+):(\S+)\s*\(\s*\)(\s+(active|inactive))?(\s+"([^"]*)")?//) { $name = $1; $type = $2; $path = $3; $init = $4; $state = $6; $param = $8; acexml_start ("streamdef"); if ($status ne "") { push @attnames, ("status"); push @attvalues, ("$state"); } push @attnames, ("type"); push @attvalues, ("$type"); push @attnames, ("id"); push @attvalues, ("$name"); acexml_start ("dynamic", 0); if ($param ne "") { push @attnames, ("params"); push @attvalues, ("$param"); } push @attnames, ("init"); push @attvalues, ("$init"); push @attnames, ("path"); push @attvalues, ("$path"); acexml_start ("initializer", 1); acexml_end ("dynamic"); $stream = "streamdef"; print "stream dynamic $name $type * $init:$path \"$param\" $state\n" if ($verbose); } if (s/^\s*stream\s+static\s+(\w+)(\s+("(.*)"))?//) { $name = $1; $param = $4; acexml_start ("streamdef", 0); if ($param ne "") { push @attnames, ("params"); push @attvalues, ("$param"); } push @attnames, ("id"); push @attvalues, ("$name"); acexml_start ("static", 1); $stream = "streamdef"; print "static $name \"$param\"\n" if ($verbose); } if (s/^\s*stream\s+(\w+)//) { $name = $1; push @attnames, ("id"); push @attvalues, ("$name"); acexml_start ("stream", 0); $stream = "stream"; print "stream $name\n" if ($verbose); } if (s/^\s*dynamic\s+(\w+)\s+(\w+)\s*\*\s*(\S+):(\S+)\s*\(\s*\)(\s+(active|inactive))?(\s+"([^"]*)")?//) { $name = $1; $type = $2; $path = $3; $init = $4; $state = $6; $param = $8; if ($status ne "") { push @attnames, ("status"); push @attvalues, ("$state"); } push @attnames, ("type"); push @attvalues, ("$type"); push @attnames, ("id"); push @attvalues, ("$name"); acexml_start ("dynamic", 0); if ($param ne "") { push @attnames, ("params"); push @attvalues, ("$param"); } push @attnames, ("init"); push @attvalues, ("$init"); push @attnames, ("path"); push @attvalues, ("$path"); acexml_start ("initializer", 1); acexml_end ("dynamic"); print "dynamic $name $type * $init:$path \"$param\" $state\n" if ($verbose); } if (s/^\s*static\s+(\w+)(\s+("(.*)"))?//) { $name = $1; $param = $4; if ($param ne "") { push @attnames, ("params"); push @attvalues, ("$param"); } push @attnames, ("id"); push @attvalues, ("$name"); acexml_start ("static", 1); print "static $name \"$param\"\n" if ($verbose); } if ( s/^\s*resume\s+(\w+)//) { $name = $1; push @attnames, ("id"); push @attvalues, ("$name"); acexml_start ("resume", 1); print "resume $name\n" if ($verbose); } if ( s/^\s*remove\s+(\w+)//) { $name = $1; push @attnames, ("id"); push @attvalues, ("$name"); acexml_start ("remove", 1); print "remove $name\n" if ($verbose); } if ( s/^\s*suspend\s+(\w+)//) { $name = $1; push @attnames, ("id"); push @attvalues, ("$name"); acexml_start ("suspend", 1); print "suspend $name\n" if ($verbose); } $nothing = 1; } } acexml_end ("ACE_Svc_Conf"); ace-6.4.5+dfsg.orig/bin/generate_footprint_chart.sh0000755000175000017500000000045413154167357020465 0ustar tggtgg#!/bin/sh # gnuplot <<_EOF_ >/dev/null 2>&1 set xdata time set xtics rotate set timefmt '%Y/%m/%d-%H:%M' set xlabel 'Date (MM/DD)' 0,-3 set ylabel 'Size (KBytes)' set terminal png small size 1024,768 color set output "$2" plot '$1' using 1:(\$2/1024.0) title '$3' w l exit _EOF_ ace-6.4.5+dfsg.orig/bin/zap_svn_id.pl0000755000175000017500000000761713154167357015553 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -pi -S $0 ${1+"$@"}' & eval 'exec perl -0 -S $0 $argv:q' if 0; # You may want to run the "find" command with this script, which maybe # something like this: # # find . -type f \( -name "*.inl" -o -name "*.h" -o -name "*.cxx" -o -name "*.java" -o -name "*.l" -o -name "*.c" -o -name "*.mpd" -o -name "*.py" -o -name "*.cpp" -o -name "*.mpc" -o -name "*.idl" -o -name "*.conf" -o -name "*.mpb" -o -name "*.hpp" -o -name "*.pl" -o -name "*.mpt" -o -name "*.pm" -o -name "*.html" -o -name "*.xml" -o -name "*.y" \) -print | xargs $ACE_ROOT/bin/zap_svn_id.pl # The first three lines above let this script run without specifying the # full path to perl, as long as it is in the user's PATH. # Taken from perlrun man page. # Replace the old cvs-id tag with nothing BEGIN{undef $/;} s///smg; # Replace a single doxygen style with two spaces before the Id with one space BEGIN{undef $/;} s/ \*\n \* \$Id\$\n \*\n/ \*\n \* \$Id\$\n \*\n/smg; # Replace a three line doxygen style Id tag with just line * BEGIN{undef $/;} s/ \*\n \* \$Id\$\n \*\n/ \*\n/smg; # Replace a three line doxygen style Id tag with just line * BEGIN{undef $/;} s/\*\*\n \* \$Id\$\n \*\n/\*\*\n/smg; # Replace a three line c-style id tag with an empty line below that with nothing BEGIN{undef $/;} s/\/\/\n\/\/ \$Id\$\n\/\/\n\n//smg; # Replace a three line c-style id tag with nothing BEGIN{undef $/;} s/\/\/\n\/\/ \$Id\$\n\/\/\n//smg; # Replace a two line c-style id tag with an empty line below that with nothing BEGIN{undef $/;} s/\/\/\n\/\/ \$Id\$\n\n//smg; # Replace a two line c-style id tag with nothing BEGIN{undef $/;} s/\/\/\n\/\/ \$Id\$\n//smg; # Replace a one line c-style id tag with an empty line below that with nothing BEGIN{undef $/;} s/\/\/ \$Id\$\n\n//smg; # Replace a one line c-style id tag with nothing BEGIN{undef $/;} s/\/\/ \$Id\$\n//smg; # Replace a one line c-style id tag with an empty line below that with nothing BEGIN{undef $/;} s/\/\/\$Id\$\n\n//smg; # Replace a one line c-style id tag with nothing BEGIN{undef $/;} s/\/\/\$Id\$\n//smg; # Replace a one line start C++ line with Id with BEGIN{undef $/;} s/\/\/ -\*- C\+\+ -\*- \$Id\$\n/\/\/ -\*- C\+\+ -\*-\n/smg; # Replace a one line start C++ line with Id with BEGIN{undef $/;} s/\/\/ -\*- C\+\+ -\*- \$Id\$\n/\/\/ -\*- C\+\+ -\*-\n/smg; # Replace a one line start C++ line with Id with BEGIN{undef $/;} s/\/\/ -\*- C\+\+ -\*- \$Id\$\n/\/\/ -\*- C\+\+ -\*-\n/smg; # Replace a three line doxygen style Id tag with just line * BEGIN{undef $/;} s/\/\*\n \* \$Id\$\n \*\n/\/\*\n/smg; # Replace a one line c++-style id tag with an empty line below that with nothing BEGIN{undef $/;} s/\/\* \$Id\$ \*\/\n\n//smg; # Replace a one line c++-style id tag with an empty line below that with nothing BEGIN{undef $/;} s/\/\* \$Id\$ \*\/\n//smg; # Replace a three perl style Id tag with just line # BEGIN{undef $/;} s/ \#\n \# \$Id\$\n \#\n/ \#\n/smg; BEGIN{undef $/;} s/\#\n\# \$Id\$\n\#\n/\#\n/smg; BEGIN{undef $/;} s/ \#\n \#\$Id\$\n \#\n/ \#\n/smg; BEGIN{undef $/;} s/\#\n\#\$Id\$\n\#\n/\#\n/smg; BEGIN{undef $/;} s/\#\$Id\$\n//smg; BEGIN{undef $/;} s/\# \$Id\$\n//smg; BEGIN{undef $/;} s/\$Id\$//smg; # Trailing whitespaces BEGIN{undef $/;} s/\# \n//smg; BEGIN{undef $/;} s/\*\* \n/\*\*\n/smg; BEGIN{undef $/;} s/\/\*\n\*\*\n\*\*\n/\/\*\n/smg; BEGIN{undef $/;} s/\/\* \n/\/\*\n/smg; BEGIN{undef $/;} s/ \* \n/ \*\n/smg; BEGIN{undef $/;} s/ \* \n/ \*\n/smg; BEGIN{undef $/;} s/\*\n\* \n\*\n/\*\n/smg; BEGIN{undef $/;} s/ \*\n \*\n \*\n/ \*\n/smg; BEGIN{undef $/;} s/ \*\n \*\/\n/ \*\/\n/smg; BEGIN{undef $/;} s/\/\/ \n/\/\/\n/smg; BEGIN{undef $/;} s/ \*\n \*\n/ \*\n/smg; BEGIN{undef $/;} s/\/\/\n\/\/\n/\/\/\n/smg; BEGIN{undef $/;} s/ \n/\n/smg; BEGIN{undef $/;} s/\/\/ cvs-id :\n//smg; # Empty header BEGIN{undef $/;} s/\/\*\n \*\/\n//smg; BEGIN{undef $/;} s/\/\*\*\n \*\/\n//smg; BEGIN{undef $/;} s/\/\*\*\n \*\n \*\/\n//smg; BEGIN{undef $/;} s/\/\*\*\n\*\n\*\/\n//smg; ace-6.4.5+dfsg.orig/bin/create_ace_build.pl0000755000175000017500000003011113154167357016632 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # # Creates an ACE build tree in directory "build/" below the $ACE_ROOT # directory. The build tree directory structure mirrors that of the ACE # top level directory structure, except that instead of containing any plain # files, it contains only links to the files in the ACE top level structure. # Symbolic links will be used instead of hard links if available. # # Makefiles, projects, and other build files are not linked. This allows # use of MPC to generate the correct project types as needed. Use the # -nompc option to disable this. # # This program has a similar purpose to "clone", but in addition to # only creating symlinks (clone creates hard links, by default), this # script: # 1) uses relative rather than absolute symlinks, # 2) tries not to put junk files into the build tree, # 3) only creates a new tree in a build/ directory below the current, # top level ACE directory (it's a feature :-), but it does enforce # consistency). # # This program can be re-run on a build tree at any time in order to # update it. It will add links for newly added files, and remove # any that are no longer valid. # Specifying no command line options will cause all current builds # to be updated. # # If the starts with "build/", that part will be removed # from it. use File::Find (); use File::Basename; use FileHandle; use File::stat; use File::Copy; use File::Path; print "You should consider using clone_build_tree.pl found with MPC\n"; $usage = "usage: $0 -? | [-a] [-d ] [-v] [-nompc] \n"; $directory_mode = 0777; #### Will be modified by umask, also. $verbose = 0; $mpc = 1; #### When using mpc, we don't want links created for mpc-generated files. $update_all = 1; $source='.'; $absolute = 0; #### #### Check that we're in an ACE "top level" directory. #### unless (-d 'ace' && -d 'include') { die "Must be in an ACE top level (ACE_ROOT) directory!\n"; } if (-e 'create_ace_build.links') { die "Must be in an ACE top level (ACE_ROOT) directory!\n"; } $perl_version = $] + 0; if ($perl_version >= 5) { #### Use an eval so that this script will compile with perl4. eval <<'PERL5_CWD' require Cwd; sub cwd { Cwd::getcwd (); } PERL5_CWD } else { sub cwd { local ($pwd); chop ($pwd = `pwd`); $pwd; } } my($starting_dir) = cwd (); my(@nlinks) = (); my(@build_re) = (); print "Creating or updating builds in $starting_dir\n"; #### If the $linked file is newer than the real file then #### backup the real file, and replace it with the linked #### version. sub backup_and_copy_changed { my($real, $linked) = @_; my($status_real) = stat($real); if (! $status_real) { die "ERROR: cannot access $real.\n"; } my($status_linked) = stat($linked); if ($status_linked->mtime > $status_real->mtime) { rename($real, $real . '.bak'); rename($linked, $real); return 1; } if ($status_real->mtime != $status_linked->mtime) { unlink($linked); return 1; } if ($status_real->size != $status_linked->size) { unlink($linked); return 1; } return 0; } sub cab_link { my($real,$linked,$build_regex) = @_; my($status) = 0; if ($^O eq 'MSWin32') { my($fixed) = $linked; $fixed =~ s/$build_regex//; push(@nlinks, $fixed); my($curdir) = "$starting_dir/" . dirname($linked); if (! -d $curdir) { die "ERROR: Dir not found: $curdir\n"; } $status = chdir($curdir); if (! $status) { die "ERROR: cab_link() chdir " . $curdir . " failed.\n"; } my($base_linked) = basename($linked); if (! -e $real) { ## If the real file "doesn't exist", then we need to change back to ## the starting directory and look up the short file name. chdir($starting_dir); my($short) = Win32::GetShortPathName($fixed); ## If we were able to find the short file name, then we need to ## modyfy $real. Note, we don't need to change back to $curdir ## unless the short name lookup was successful. if (defined $short) { ## Replace a section of $real (the part that isn't a relative ## path) with the short file name. The hard link will still have ## the right name, it's just pointing to the short name. substr($real, length($real) - length($fixed)) = $short; ## Get back to the right directory for when we make the hard link chdir($curdir); } else { ## This should never happen, but there appears to be a bug ## with the underlying win32 apis on Windows Server 2003. ## Long paths will cause an error which perl will ignore. ## Unicode versions of the apis seem to work fine. ## To experiment try Win32 _fullpath() and CreateHardLink with ## long paths. print "ERROR : Skipping $real.\n"; return; } } if (-e $base_linked) { if (! backup_and_copy_changed($real, $base_linked)) { return; } } print "link $real $linked\n" if $verbose; $status = link ($real, $base_linked); if (! $status) { ## Once again, this happens for long paths on Win2003 print "ERROR: Can't link $real\n"; return; } chdir($starting_dir); } else { print "$symlink $real $linked\n" if $verbose; $status = symlink ($real, $linked); } if (!$status) { die "$0: $real -> $linked failed\n"; } } #### #### Process command line args. #### while ($#ARGV >= 0 && $ARGV[0] =~ /^-/) { if ($ARGV[0] eq '-v') { $verbose = 1; } elsif ($ARGV[0] eq '-d') { if ($ARGV[1] =~ /^\d+$/) { $directory_mode = eval ($ARGV[1]); shift; } else { warn "$0: must provide argument for -d option\n"; die $usage; } } elsif ($ARGV[0] eq '-a' && ! ($^O eq 'MSWin32')) { $source = &cwd (); $absolute = 1; } elsif ($ARGV[0] =~ /-[?hH]$/) { die "$usage"; } elsif ($ARGV[0] eq '-nompc') { $mpc = 0; } else { warn "$0: unknown option $ARGV[0]\n"; die $usage; } shift; } @builds = (); if ($#ARGV == 0) { $update_all = 0; $builds[0] = $ARGV[0]; $builds[0] =~ s%^build[/\\]%%; #### remove leading "build/", if any $builds[0] = "build/$builds[0]"; } else { @builds = glob "build/*"; } sub create_build_regex { if ($^O eq 'MSWin32') { for ($idx = 0; $idx <= $#builds; $idx++) { ## Get the original build name $build_re[$idx] = $builds[idx]; ## Remove any trailing slashes $build_re[$idx] =~ s/[\\\/]+$//; ## Add a single trailing slash $build_re[$idx] .= '/'; ## Escape any special characters $build_re[$idx] =~ s/([\\\$\[\]\(\)\.])/\\$1/g; } } } create_build_regex(); # all builds go in ACE_wrappers\build unless (-d "$starting_dir/build") { print "Creating $starting_dir/build\n"; mkdir ("$starting_dir/build", $directory_mode); } foreach $build (@builds) { unless (-d "$starting_dir/$build") { print "Creating $starting_dir/$build\n"; mkpath ("$starting_dir/$build", 0, $directory_mode); } } #### #### Get all ACE plain file and directory names. #### @files = (); sub wanted { my ($dev,$ino,$mode,$nlink,$uid,$gid); $matches = ! ( /^CVS\z/s && ($File::Find::prune = 1) || /^build\z/s && ($File::Find::prune = 1) || /^\..*obj\z/s && ($File::Find::prune = 1) || /^Templates\.DB\z/s && ($File::Find::prune = 1) || /^Debug\z/s && ($File::Find::prune = 1) || /^Release\z/s && ($File::Find::prune = 1) || /^Static_Debug\z/s && ($File::Find::prune = 1) || /^Static_Release\z/s && ($File::Find::prune = 1) || /^\.svn\z/s && ($File::Find::prune = 1) ); $matches = $matches && ( ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) && ! -l $_ && ! /^core\z/s && ! /^.*\.state\z/s && ! /^.*\.so\z/s && ! /^.*\.[oa]\z/s && ! /^.*\.dll\z/s && ! /^.*\.lib\z/s && ! /^.*\.obj\z/s && ! /^.*~\z/s && ! /^\.\z/s && ! /^\.#.*\z/s && ! /^.*\.log\z/s ); if ($mpc && $matches) { $matches = ($File::Find::dir =~ /include\/makeinclude*/) || ( ! /^.*\.dsp\z/s && ! /^.*\.vcproj\z/s && ! /^.*\.bor\z/s && ! /^.*\.dsw\z/s && ! /^.*\.sln\z/s && ! /^.*\.vcp\z/s && ! /^.*\.nmake\z/s && ! /^.*\.am\z/s && ! /^.*\.vcw\z/s && ! /^.*\.mak\z/s && ! /^.*\.bld\z/s && ! /^.*\.icc\z/s && ! /^.*\.icp\z/s && ! /^.*\.ncb\z/s && ! /^.*\.opt\z/s && ! /^.*\.bak\z/s && ! /^.*\.ilk\z/s && ! /^.*\.pdb\z/s && ! /^\.cvsignore\z/s && ! /^\.disable\z/s && ! /^GNUmakefile.*\z/s ); } if ($matches) { push(@files, $File::Find::name); } } File::Find::find({wanted => \&wanted}, '.'); print "Found $#files files and directories.\n"; #### #### Create directories and symlinks to files. #### foreach $file (@files) { $file =~ s%^./%%g; #### excise leading ./ directory component my($fullname) = "$starting_dir/$file"; for ($idx = 0; $idx <= $#builds; $idx++) { my($build) = $builds[$idx]; if (-d $fullname) { unless (-d "$starting_dir/$build/$file") { print "Creating $build/$file\n" if $verbose; mkdir ("$starting_dir/$build/$file", $directory_mode); } } else { unless (($^O ne 'MSWin32') && (-e "$build/$file")) { if (!$absolute) { $up = '..'; while ($build =~ m%/%g) { $up .= '/..'; } while ($file =~ m%/%g) { $up .= '/..'; } cab_link("$up/$file", "$build/$file", $build_re[$idx]); } else { $path = $source . '/' . $file; cab_link("$path", "$build/$file", $build_re[$idx]); } } } } } print "Finished creating and updating links.\n"; foreach $build (@builds) { #### #### Find all the symlinks in the build directory, and remove ones #### that are no longer actually linked to a file. #### if ($^O eq 'MSWin32') { my($lfh) = new FileHandle(); my($links_file) = "$starting_dir/$build/create_ace_build.links"; if (-e $links_file) { if (open($lfh, $links_file)) { while(<$lfh>) { my($line) = $_; $line =~ s/\s+$//; if (-e "$starting_dir/$line") { ## The links were already added in cab_link when they ## were checked for changes. } else { print "Removing $build/$line \n" if $verbose; unlink("$starting_dir/$build/$line") || warn "$0: unlink of $build/$line failed\n"; } } close($lfh); } unless (unlink($links_file)) { die "Couldn't delete links file.\n"; } } print "Writing $#nlinks links to link file.\n"; if (open($lfh, ">$links_file")) { foreach my $lnk (@nlinks) { print $lfh "$lnk\n"; } close($lfh); } else { die "Couldn't open links file.\n"; } } else { @lfiles = (); sub lcheck { ## There's no way to know if we have hard linked back to a now ## non-existent file. So, just do the normal -l on the file ## which will cause no files to be pushed on Windows. if (-l $_) { push(@lfiles, $File::Find::name); } } File::Find::find({wanted => \&lcheck}, $build); foreach (@lfiles) { local @s = stat $_; if ($#s == -1) { print "Removing $_ \n" if $verbose; unlink $_ || warn "$0: unlink of $_ failed\n"; } } } #### #### Done: print message. #### print "\nCompleted creation of $build/.\n"; foreach $build (@builds) { unless (-d "$starting_dir/$build") { print "Creating $starting_dir/$build\n"; mkdir ("$starting_dir/$build", $directory_mode); } if (! -e "$starting_dir/$build/ace/config.h") { print "Be sure to setup $build/ace/config.h"; } if ($^O ne 'MSWin32' && ! -e "$starting_dir/$build/include/makeinclude/platform_macros.GNU") { print " and\n$build/include/makeinclude/platform_macros.GNU"; } print ".\n"; } } #### EOF ace-6.4.5+dfsg.orig/bin/generate_performance_chart.sh0000755000175000017500000000055713154167357020746 0ustar tggtgg#!/bin/sh # gnuplot <<_EOF_ >/dev/null 2>&1 set xdata time set xtics rotate set format x "%Y/%m/%d" set timefmt '%Y/%m/%d-%H:%M' set xlabel 'Date (YYYY/MM/DD)' 0,-3 set ylabel 'Throughput (Requests/Second)' set terminal png small size $4 color set yrange [0:] set output "$2" plot '$1' using 1:2 title '$3' w l exit _EOF_ ace-6.4.5+dfsg.orig/bin/topinfo_stats.sh0000755000175000017500000000335713154167357016307 0ustar tggtgg#!/bin/sh # if [ $# -lt 2 ]; then echo "Usage: $0 [DEST] [USER]" exit 0 fi DEST=$1 US=$2 DATE=`date +%Y/%m/%d-%H:%M` cd $ACE_ROOT LD_LIBRARY_PATH=$ACE_ROOT/ace export LD_LIBRARY_PATH PATH=/usr/bin:$PATH export PATH cd $TAO_ROOT/performance-tests/Memory/Single_Threaded # start the server ./server & s_id=$!; # Just sleep for 2 seconds. sleep 2; # Check whether the server has started file="test.ior" if test -f $file then # Just get the size as soon the server is started, ie. the vanilla # server. s_up=`top -p $s_id -n 1 -b | grep $US| awk '{print $5}'`; # Write it a file echo $DATE $s_up >> $DEST/source/st_start_size.txt # start the client ./client & c_id=$!; # Wait till all the invocations are done sleep 10; # Get the size once the client has made sufficient invocations. s_invocations=`top -p $s_id -n 1 -b | grep $US| awk '{print $5}'`; echo $DATE $s_invocations >> $DEST/source/st_after_invoke_size.txt # Kill the server and client. We will look at better ways of doing # this later. kill -9 $c_id; # Just sleep for the server to release memory etc. sleep 5; # Get the size once the client is killed or crashed s_client_death=`top -p $s_id -n 1 -b | grep $US| awk '{print $5}'`; echo $DATE $s_client_death >> $DEST/source/st_after_peer_death_size.txt kill -9 $s_id; rm -f $file else echo $file doesnt exist fi cd $DEST/source STRING="" FILES="start after_invoke after_peer_death" for i in $FILES ; do /usr/bin/tac st_${i}_size.txt > $DEST/data/st_${i}_size.txt /usr/bin/tail -5 st_${i}_size.txt > $DEST/data/LAST_st_${i}_size.txt $ACE_ROOT/bin/generate_topinfo_charts.sh st_${i}_size.txt $DEST/images/st_${i}_size.png st_${i}_size.txt $STRING done ace-6.4.5+dfsg.orig/bin/ACE-casts-convert0000755000175000017500000000523413154167357016157 0ustar tggtgg#! /bin/sh # ============================================================================= # # @file ACE-casts-convert # # Script to convert all ACE cast macro calls (e.g. # ACE_static_cast (foo, bar)) to their standard C++ counterparts (e.g. # static_cast (bar)). # # Use this script at your own risk. It appears to work correctly for # most cases, but verify the results "just in case". # # @note Wildcards may be supplied as the "FILE" arguments to this # script since the shell should expand the wildcards before # executing the script. # # @bug The sed program used in this script may loop indefinitely on # ACE casts with arguments split across multiple lines # containing patterns it doesn't recognize. # # @author Ossama Othman # # ============================================================================= if test "$#" -eq 0; then echo "Usage: $0 FILE [FILE2] ..." echo "" exit 1 fi echo "" echo "Converting ACE cast macro calls to standard C++ syntax in:" while test "$#" -gt 0 do arg="$1" shift if grep "ACE_\(static\|dynamic\|const\|reinterpret\)_cast" $arg > /dev/null 2>&1; then echo " $arg" sed -e :a -e 's/ACE_\(const\|static\|reinterpret\|dynamic\)_cast[ \t]*([ \t]*\([^,]*\)[ \t]*,[ \t]*\([^ \t].*\)/\1_cast<\2> (\3/g; /ACE_\(const\|static\|reinterpret\|dynamic\)_cast[ \t]*([ \t]*\([^,]*\)[ \t]*,[ \t]*$/{N;s/\n//;ba;}; /ACE_\(const\|static\|reinterpret\|dynamic\)_cast[ \t]*([ \t]*$/{N;s/\n//;ba;}; /ACE_\(const\|static\|reinterpret\|dynamic\)_cast[ \t]*$/{N;s/\n//;ba;}; /ACE_\(const\|static\|reinterpret\|dynamic\)_cast[ \t]*(/ba' \ -e :aa -e 's/ACE_\(const\|static\|reinterpret\|dynamic\)_cast_[1-5]_ref[ \t]*([ \t]*\([^,]*\)[ \t]*,\(.*\),[ \t]*\([^,]*\)/\1_cast<\2<\3> \&> (\4/g; /ACE_\(const\|static\|reinterpret\|dynamic\)_cast_[1-5]_ref[ \t]*([ \t]*\([^,]*\)[ \t]*,[ \t]*$/{N;s/\n//;baa;}; /ACE_\(const\|static\|reinterpret\|dynamic\)_cast_[1-5]_ref[ \t]*([ \t]*$/{N;s/\n//;baa;}; /ACE_\(const\|static\|reinterpret\|dynamic\)_cast_[1-5]_ref[ \t]*$/{N;s/\n//;baa;}; /ACE_\(const\|static\|reinterpret\|dynamic\)_cast_[1-5]_ref[ \t]*(/baa' \ -e :aaa -e 's/ACE_\(const\|static\|reinterpret\|dynamic\)_cast_[1-5]_ptr[ \t]*([ \t]*\([^,]*\)[ \t]*,\(.*\),[ \t]*\([^,]*\)/\1_cast<\2<\3> \*> (\4/g; /ACE_\(const\|static\|reinterpret\|dynamic\)_cast_[1-5]_ptr[ \t]*([ \t]*\([^,]*\)[ \t]*,[ \t]*$/{N;s/\n//;baaa;}; /ACE_\(const\|static\|reinterpret\|dynamic\)_cast_[1-5]_ptr[ \t]*([ \t]*$/{N;s/\n//;baaa;}; /ACE_\(const\|static\|reinterpret\|dynamic\)_cast_[1-5]_ptr[ \t]*$/{N;s/\n//;baaa;}; /ACE_\(const\|static\|reinterpret\|dynamic\)_cast_[1-5]_ptr[ \t]*(/baaa' $arg > ${arg}.new mv ${arg}.new $arg fi done ace-6.4.5+dfsg.orig/bin/ChangeLogEditor/0000775000175000017500000000000013157240624016034 5ustar tggtggace-6.4.5+dfsg.orig/bin/ChangeLogEditor/FileLocator.pm0000644000175000017500000000303713154167357020606 0ustar tggtggpackage FileLocator; # ************************************************************ # Description : Base class for file locators. # Author : Chad Elliott # Create Date : 6/18/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use FileHandle; # ************************************************************ # Subroutine Section # ************************************************************ sub new { my($class) = shift; my($self) = bless { }, $class; return $self; } sub tmpnam { my($self) = shift; my($file) = shift; my(@def) = ("/tmp", "."); foreach my $possible ($ENV{TMPDIR}, $ENV{TEMP}, $ENV{TMP}, @def) { if (defined $possible && -d $possible && -w $possible) { $possible =~ s!\\!/!g; return $possible . '/' . $$ . '_' . $> . '_' . $file;; } } return $file; } sub process_errors { my($self) = shift; my($file) = shift; my($error) = undef; if (-s $file != 0) { my($fh) = new FileHandle(); if (open($fh, $file)) { $error = ''; while(<$fh>) { $error .= $_; } close($fh); $error =~ s/\s+$//; } } unlink($file); return $error; } sub locate { my($self) = shift; my(@dirs) = @_; my(@modified) = (); my(@removed) = (); my(@conflicts) = (); my(@unknown) = (); return \@modified, \@removed, \@conflicts, \@unknown; } 1; ace-6.4.5+dfsg.orig/bin/ChangeLogEditor/FileLocatorFactory.pm0000644000175000017500000000311713154167357022135 0ustar tggtggpackage FileLocatorFactory; # ************************************************************ # Description : Create FileLocator objects. # Author : Chad Elliott # Create Date : 11/29/2005 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use Cwd; use CVSFileLocator; use SVNFileLocator; # ************************************************************ # Subroutine Section # ************************************************************ sub create { ## Check for Subversion first. It is unlikely that the .svn directory ## will exist when Subversion isn't the rcs being used. However, that ## is not the case for CVS directories. switch: { ((defined $ENV{SVN_ASP_DOT_NET_HACK} && -d '_svn') || searchParentDirectory('.svn')) && do { return new SVNFileLocator(); }; -d 'CVS' && do { return new CVSFileLocator(); }; print STDERR "WARNING: Unsupported revision control protocol\n"; } return new FileLocator(); } sub searchParentDirectory { my($hidden) = shift; my($path) = cwd(); my($index) = -1; # Search all parent directories for the specified hidden # directory. We stop when we either found the hidden directory # of there are no more parent directories let to search. do { if (-d $path . '/' . $hidden) { return 1; } $index = rindex($path, '/'); if ($index != -1) { $path = substr ($path, 0, $index); } } while ($index != -1); return 0; } 1; ace-6.4.5+dfsg.orig/bin/ChangeLogEditor/CVSFileLocator.pm0000644000175000017500000000572713154167357021172 0ustar tggtggpackage CVSFileLocator; # ************************************************************ # Description : Use CVS to determine the list of modified files. # Author : Chad Elliott # Create Date : 11/29/2005 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use FileHandle; use FileLocator; use vars qw(@ISA); @ISA = qw(FileLocator); # ************************************************************ # Subroutine Section # ************************************************************ sub locate { my($self) = shift; my(@dirs) = @_; my($fh) = new FileHandle(); my(@modified) = (); my(@removed) = (); my(@conflicts) = (); my(@unknown) = (); my($error) = undef; my($cvsroot) = $self->obtainCVSROOT(); my($err) = $self->tmpnam('cle_cvs.err'); if (open($fh, 'cvs -f -q ' . ($^O eq 'MSWin32' ? '-N ' : '') . (defined $cvsroot ? "-d $cvsroot " : '') . "-n update @dirs 2> $err |")) { while(<$fh>) { my($line) = $_; if ($line =~ /^[AM]\s+(.*)/) { push(@modified, $1); } elsif ($line =~ /^[R]\s+(.*)/) { push(@removed, $1); } elsif ($line =~ /^[C]\s+(.*)/) { push(@conflicts, $1); } elsif ($line =~ /^[\?]\s+(.*)/ && index($line, $err) == -1) { push(@unknown, $1); } } close($fh); $error = $self->process_errors($err); } else { $error = "Unable to run cvs with error redirection."; } return \@modified, \@removed, \@conflicts, \@unknown, $error; } sub obtainCVSROOT { my($self) = shift; my($fh) = new FileHandle(); my($croot) = undef; if (open($fh, 'CVS/Root')) { while(<$fh>) { my($line) = $_; $line =~ s/\s+$//; if ($line =~ /^:pserver/ || $line =~ /^:ext/) { if (defined $ENV{CVSROOT} && $line eq $ENV{CVSROOT}) { last; } else { my($check) = $line; $check =~ s/:\w+\@/:\@/; $check =~ s/\.\w+\.\w+:/:/; my($clen) = length($check); foreach my $key (keys %ENV) { my($echeck) = $ENV{$key}; $echeck =~ s/:\w+\@/:\@/; $echeck =~ s/\.\w+\.\w+:/:/; if ($check eq $echeck) { $croot = $ENV{$key}; last; } else { my($len) = length($echeck); if ($len > 0 && substr($check, $clen - $len, $len) eq $echeck) { $croot = $ENV{$key}; last; } } } if (defined $croot) { last; } } if (!defined $croot) { $croot = $line; } } else { $croot = $line; last; } } close($fh); } else { $croot = $ENV{CVSROOT}; } return $croot; } 1; ace-6.4.5+dfsg.orig/bin/ChangeLogEditor/SVNFileLocator.pm0000644000175000017500000000373713154167357021204 0ustar tggtggpackage SVNFileLocator; # ************************************************************ # Description : Use SVN to determine the list of modified files. # Author : Chad Elliott # Create Date : 11/29/2005 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use FileHandle; use FileLocator; use vars qw(@ISA); @ISA = qw(FileLocator); # ************************************************************ # Subroutine Section # ************************************************************ sub locate { my($self) = shift; my(@dirs) = @_; my($fh) = new FileHandle(); my(@modified) = (); my(@removed) = (); my(@conflicts) = (); my(@unknown) = (); my($error) = undef; my($err) = $self->tmpnam('cle_svn.err'); if (open($fh, "svn status @dirs 2> $err |")) { while(<$fh>) { my($line) = $_; if ($line =~ /^([A-Z\s\?])([A-Z\s])[A-Z\s][\+\*\s][A-Z\s][A-Z\s]\s+(.*)$/) { my($content) = $1; my($property) = $2; my($file) = $3; ## Subversion differs from CVS in that it will print paths with ## windows style back-slashes instead of forward slashes. $file =~ s!\\!/!g if ($^O eq 'MSWin32'); if ($property eq 'M' || $content eq 'M' || $content eq 'A' || $content eq 'R') { push(@modified, $file); } elsif ($content eq 'D') { push(@removed, $file); } elsif ($content eq 'C' || $property eq 'C') { push(@conflicts, $file); } elsif ($content eq '?' && index($line, $err) == -1) { push(@unknown, $file); } } } close($fh); $error = $self->process_errors($err); } else { $error = "Unable to run svn with error redirection."; } return \@modified, \@removed, \@conflicts, \@unknown, $error; } 1; ace-6.4.5+dfsg.orig/bin/ChangeLogEditor/ChangeLogEdit.pm0000644000175000017500000000566313154167357021047 0ustar tggtggpackage ChangeLogEdit; # ************************************************************ # Description : Edit the existing ChangeLog. # Author : Chad Elliott # Create Date : 9/10/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use FileHandle; use File::Copy; use ChangeLogEntry; # ************************************************************ # Subroutine Section # ************************************************************ sub new { my($class) = shift; my($name) = shift; my($email) = shift; my($self) = bless {'name' => $name, 'email' => $email, }, $class; return $self; } sub edit { my($self) = shift; my($ofile) = shift; my(@dirs) = @_; my($tfile) = "$ofile.$<.$$"; my($status) = 0; my($error) = ''; my($rh) = new FileHandle(); my($unknown) = undef; if (open($rh, $ofile)) { my($creator) = new ChangeLogEntry($self->{'name'}, $self->{'email'}); my($entry) = ''; ($entry, $unknown, $error) = $creator->create(@dirs); if (defined $entry) { if ($entry =~ /^ERROR:/) { $error = $entry; } else { my($oh) = new FileHandle(); if (open($oh, ">$tfile")) { $status = print $oh $entry; if ($status) { while(<$rh>) { my($line) = $_; $line =~ s/\s+$//; if ($line =~ /\t/) { $line = $self->convertTabs($line); } $status = print $oh "$line\n"; if ($status == 0) { $error = "Unable to copy $ofile"; last; } } } else { $error = 'Unable to print the first entry'; } close($oh); } else { $error = "Unable to open $tfile for writing"; } close($rh); if ($status) { $status = 0; if (unlink($ofile)) { if (rename($tfile, $ofile)) { $status = 1; } else { $error = "Unable to rename $tfile to $ofile"; } } else { $error = "Unable to remove $ofile"; } } } } else { $error = (defined $error ? "There is a revision control system " . "problem:\n$error" : 'There are no modified/removed files.'); } } else { $error = "Unable to open $ofile for reading"; } return $status, $error, $unknown; } sub convertTabs { my($self) = shift; my($line) = shift; while($line =~ /\t/) { my($spaces) = 8 - (index($line, "\t") % 8); $line =~ s/\t/sprintf("%${spaces}s", ' ')/e; } return $line; } 1; ace-6.4.5+dfsg.orig/bin/ChangeLogEditor/EmailTranslator.pm0000644000175000017500000000234313154167357021503 0ustar tggtggpackage EmailTranslator; # ************************************************************ # Description : Translate the given user name and domain into # an email address. # Author : Chad Elliott # Create Date : 6/18/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use FileHandle; # ************************************************************ # Subroutine Section # ************************************************************ sub new { my($class) = shift; my($domain) = shift; my($self) = bless {'domain' => "\@$domain", }, $class; return $self; } sub translate { my($self) = shift; my($name) = shift; my($domain) = $self->{'domain'}; my($email) = "$name$domain"; my(%special) = (); if (defined $ENV{REPLYTO}) { $email = $ENV{REPLYTO}; } elsif (defined $special{$name}) { $email = $special{$name} . $domain; } elsif ($name =~ /([^\s]+)\s+([^\s]+)/) { ## Last name underscore first initial $email = lc($2 . '_' . substr($1, 0, 1)) . $domain; } return $email; } 1; ace-6.4.5+dfsg.orig/bin/ChangeLogEditor/ChangeLogEntry.pm0000644000175000017500000000672013154167357021256 0ustar tggtggpackage ChangeLogEntry; # ************************************************************ # Description : Create a ChangeLog entry based on modified files. # Author : Chad Elliott # Create Date : 6/18/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use File::Basename; use FileLocatorFactory; # ************************************************************ # Subroutine Section # ************************************************************ sub new { my($class) = shift; my($name) = shift; my($email) = shift; my($self) = bless {'name' => $name, 'email' => $email, }, $class; return $self; } sub escape_regex_special { my($self) = shift; my($name) = shift; $name =~ s/([\+\-\\\$\[\]\(\)\.])/\\$1/g; return $name; } sub sortFileList { my($self) = shift; return sort { if ($a =~ /\.h$/) { my($base) = $a; $base =~ s/\.h//; $base = $self->escape_regex_special($base); if ($b =~ /^$base\./) { return -1; } else { return $a cmp $b; } } elsif ($a =~ /\.i(nl)?$/) { my($base) = $a; $base =~ s/\.i(nl)?$//; $base = $self->escape_regex_special($base); if ($b =~ /^$base\.cpp/) { return -1; } else { return $a cmp $b; } } elsif ($a =~ /\.cpp?$/) { my($base) = $a; $base =~ s/\.cpp?$//; $base = $self->escape_regex_special($base); if ($b =~ /^$base\./) { return 1; } else { return $a cmp $b; } } return $a cmp $b; } @_; } sub create { my($self) = shift; my(@dirs) = @_; my($fl) = FileLocatorFactory::create(); my($modif, $remov, $confl, $unknown, $error) = $fl->locate(@dirs); my($entry) = scalar(gmtime()); if (defined $$confl[0]) { $entry = "ERROR: The following files have conflicts:\n"; foreach my $file (@$confl) { $entry .= "$file\n"; } } else { my($prefix) = ' * '; ## Correct the timezone (if there is any) my($tz) = 'UTC'; $entry =~ s/(:\d\d\s+)(.*)(\d\d\d\d)$/$1$tz $3/; ## Add the name and email address $entry .= " $self->{'name'} <$self->{'email'}>\n\n"; my($previous) = undef; foreach my $file ($self->sortFileList(@$modif)) { my($directory) = dirname($file); if (defined $previous && $previous ne $directory) { $entry .= "\n"; } $entry .= "$prefix$file:\n"; $previous = $directory; } $previous = ''; my($removed) = 0; foreach my $file ($self->sortFileList(@$remov)) { my($directory) = dirname($file); if (defined $previous && $previous ne $directory) { $entry .= "\n"; } $entry .= "$prefix$file:\n"; $previous = $directory; $removed++; } if ($removed) { $entry .= "\n Removed " . ($removed > 1 ? 'these files' : 'this file') . ".\n"; } $entry .= "\n"; } if (!defined $$modif[0] && !defined $$remov[0]) { $entry = undef; } return $entry, $unknown, $error; } 1; ace-6.4.5+dfsg.orig/bin/make-components0000755000175000017500000000055013154167357016072 0ustar tggtgg#! /bin/sh # Allow each ACE component to be built in a simple way, as follows: # # $ACE_ROOT/bin/make-components "your flags" # # to build libACE.$(SOEXT), libACE_OS.$(SOEXT), etc. flags="$*" cd $ACE_ROOT/ace make $flags for component in `cat $ACE_ROOT/ace/ACE_COMPONENTS.list` do make $flags LIBACE=libACE_$component ACE_COMPONENTS=$component done exit 0 ace-6.4.5+dfsg.orig/bin/FOCUS/0000775000175000017500000000000013157240624013715 5ustar tggtggace-6.4.5+dfsg.orig/bin/FOCUS/PROBLEM-REPORT-FORM0000644000175000017500000000235713154167357016527 0ustar tggtggTo: arvindk@dre.vanderbilt.edu Subject: [area]: [synopsis] TAO VERSION: ACE VERSION: HOST MACHINE and OPERATING SYSTEM: TARGET MACHINE and OPERATING SYSTEM, if different from HOST: COMPILER NAME AND VERSION (AND PATCHLEVEL): FOCUS COMMAND LINE OPTION [What command line option did you use for FOCUS?] AREA/CLASS/EXAMPLE AFFECTED: [What example failed? What module failed to compile?] DOES THE PROBLEM AFFECT: COMPILATION? [ What compiler are you using? Please cut n paste the compilation error.] LINKING? [ On Unix systems, did you run make realclean first?] EXECUTION? OTHER (please specify)? [Please indicate whether ACE/TAO, your application, or both are affected.] SYNOPSIS: [Brief description of the problem] DESCRIPTION: [Detailed description of problem. Don't just say " doesn't work, here's a fix," explain what your program does to get to the state. ] SAMPLE FIX/WORKAROUND: [If available ] ACE+TAO INSTRUMENTED FILES: Please if possible attach the ACE+TAO instrumented files (source files) that affected your application. (Please use a compression utility for sending the attachments) ace-6.4.5+dfsg.orig/bin/FOCUS/Parser/0000775000175000017500000000000013157240624015151 5ustar tggtggace-6.4.5+dfsg.orig/bin/FOCUS/Parser/FOCUSParser.pm0000644000175000017500000005135313154167357017560 0ustar tggtgg######################################################################### # A Simple Parser for automating the specializations crated in FOCUS. # # @author Arvind S. Krishna # # This parser, parses the specialization file given as an input argument # and *individually* visits the tags in a pre-determined order to weave # in the specializations. # NOTE: This parser will make N passes over the file, where N equals # to the number of tags defined in the specialization file. This # approach is intentional as it servers current needs. Future versions # may enhance this parser and Visit methods to be more intelligent. ########################################################################### package FOCUSParser; # for MY own preferences! use strict; # XML related operations use XML::DOM; # Generic file operations use FileHandle; # Creating files and renaming them use File::Copy; # Creating directories use File::Path; ############################################ # GLOBAL CONSTANTS ########################################### my $FOCUS_PREPEND_TAG = "\/\/@@ "; #################################################################### # banner: A function that returns the FOCUS banner transformation # for just clarity purpose only. ################################################################### sub FOCUS_banner_start { my $banner_str = "// Code woven by FOCUS:\n"; return $banner_str; } sub FOCUS_banner_end { my $banner_str = "// END Code woven by FOCUS\n"; return $banner_str; } ######################################################################### # Visit_ADD: Visit a add element defined in the transform. # In particular look for the hook defined: search it in the source file # and add the data in the tags into the file starting from the # hook, but not including the hook. ########################################################################## sub Visit_Add { my ($add, $copy_file_name) = @_; # Open the copy and transform it open (IN, "+<". $copy_file_name) || die "cannot open file: " . $copy_file_name; # To update a file in place, we use the temporary # file idiom. Perl says this is the best way to # do this! my $copy_file_tmp = $copy_file_name . "tmp"; open (OUT, ">". $copy_file_tmp) || die "cannot open temporary file for modying file:" . $copy_file_name; # get the hook element defined in the add element my $hook = $add->getElementsByTagName ('hook'); # ensure length of hook == 1; if ($hook->getLength != 1) { print "Assertion Error: An element can have only \ one definition"; # clean up close (IN); close (OUT); # Diagnostic comment print " [failure]... Reverting changes \n"; unlink ($copy_file_name); unlink ($copy_file_name . "tmp"); exit (1); } # Check if the hook is present in the file at all my $hook_str = $hook->item(0)->getFirstChild->getNodeValue; chomp ($hook_str); #//@@ For now, due to problem with the hook string my $search_str = $hook_str; while () { if (/$search_str/) { # Do not remove the hook! It needs to be present print OUT $_; # FOCUS banner start print OUT FOCUS_banner_start; # parse ... elements for this add tag my @data_list = $add->getElementsByTagName ('data'); foreach my $data (@data_list) { my $data_item = $data->getFirstChild->getNodeValue; chomp ($data_item); # Insert the item print OUT "$data_item \n"; } # FOCUS banner end print OUT FOCUS_banner_end; } else { print OUT $_; } } # Everything went well! close (IN); close (OUT); # replace in place the old file with the new one rename ($copy_file_tmp, $copy_file_name); } ########################################################################### # Visit_Remove: Visit a element defined in the transform. # In particular look for the hook defined: search it in the source file # and remove the element's value from the source file being searched. ############################################################################ sub Visit_Remove { my ($remove, $copy_file_name) = @_; # obtain the data to be removed my $search = $remove->getFirstChild->getNodeValue; chomp ($search); # Open the copy and transform it open (IN, "+<" . $copy_file_name) || die "cannot open file: " . $copy_file_name; # Update the file in place my $copy_file_name_tmp = $copy_file_name . "tmp"; open (OUT, ">". $copy_file_name_tmp) || die "cannot open temporary file for modying file:" . $copy_file_name;; # Removing something is same as search and replace. Replace with "" my $replace = ""; foreach my $line () { if ($line =~/$search/) { # We do not print the banner information # as we have removed something and # print the banner will be redundant! # replace with $line =~ s/$search/$replace/; print OUT $line; } else { print OUT $line; } } # Everything went well! close (IN); close (OUT); # replace in place the old file with the new one rename ($copy_file_name_tmp, $copy_file_name); } ######################################################################### # Visit_Substitute: Visit a element defined in the transform. # In particular look for the element and replace it with the # element. ######################################################################### sub Visit_Substitute { my ($substitute, $copy_file_name) = @_; # Open the copy and transform it open (IN, "+<". $copy_file_name) || die "cannot open file: " . $copy_file_name; # To update a file in place, we use the temporary # file idiom. Perl says this is the best way to # do this! my $copy_file_name_tmp = $copy_file_name . "tmp"; open (OUT, ">". $copy_file_name . "tmp") || die "cannot open temporary file for modying file:" . $copy_file_name;; # check if the match-line keyword is set or not my $match_line = $substitute->getAttribute('match-line'); # .... my $search_list = $substitute->getElementsByTagName ('search'); # ensure length of search == 1; if ($search_list->getLength != 1 || $search_list->getLength == 0) { print "Assertion Error: A element can have only \ one element"; close (IN); close (OUT); # Dianostic comment print " [failure] reverting changes \n"; unlink ($copy_file_name); unlink ($copy_file_name_tmp); exit (1); } # .... my $replace_list = $substitute->getElementsByTagName ('replace'); if ($replace_list->getLength != 1 || $replace_list->getLength == 0) { print "Assertion Error: A element can have only \ one element"; close (IN); close (OUT); unlink ($copy_file_name); unlink ($copy_file_name_tmp); exit (1); } # and element values my $search = $search_list->item(0)->getFirstChild->getNodeValue; my $replace = $replace_list->item(0)->getFirstChild->getNodeValue; # remove spaces chomp ($search); chomp ($replace); # Search and replace string in the file foreach my $line () { # Check if the match line attribute is set. If so then # ignore word boundaries. If not, honor word boundaries. my $line_matched = 0; if (! $match_line) { if ($line =~/\b$search\b/) { $line_matched = 1; } } else { if ($line =~ /$search/) { $line_matched = 1; } } # Check if the line matched if ($line_matched) { # FOCUS banner start print OUT FOCUS_banner_start; # replace with # Caveat: What if occures multiple # times in the line? Here is how we handle # it $line =~ s/$search/$replace/g; print OUT $line; # FOCUS banner end print OUT FOCUS_banner_end; } else { print OUT $line; } } # everything went well! close (IN); close (OUT); # replace in place the old file with the new one rename ($copy_file_name_tmp, $copy_file_name); } ######################################################################### # Visit_Comment: Visit the comment-region hooks defined in the # source code and comment out all code between start and finish of that # region ######################################################################### sub Visit_Comment { my ($comment, $copy_file_name) = @_; # check for the comment region tags and # comment out the region my $start_hook_tag = $comment->getElementsByTagName ('start-hook'); my $end_hook_tag = $comment->getElementsByTagName ('end-hook'); if ($start_hook_tag->getLength != 1 || $end_hook_tag->getLength != 1) { print "Assertion Error: A element can have only \ one pair of and tags"; unlink ($copy_file_name); exit (1); } my $start = $start_hook_tag->item(0)->getFirstChild->getNodeValue; my $end = $end_hook_tag->item(0)->getFirstChild->getNodeValue; # What are we looking for: # We need to start from "//" . FOCUS_PREPEND_TAG . $hook # i.e. //[[@ # This will be the format for both start and end # //@@ Problems with the hook string my $start_hook = $FOCUS_PREPEND_TAG . $start; my $end_hook = $FOCUS_PREPEND_TAG . $end; # Open the copy and transform it open (IN, "+<". $copy_file_name) || die "cannot open file: " . $copy_file_name; my $copy_file_name_tmp = $copy_file_name . "tmp"; open (OUT, ">". $copy_file_name_tmp) || die "cannot open temporary file for modying file:" . $copy_file_name; my $start_commenting = 0; while () { if (! /$start_hook/ && ! /$end_hook/) { if ($start_commenting) { print OUT "// " . $_; } else { print OUT $_; } } else { if (/$start_hook/) { $start_commenting = 1; print OUT $_; # print start hook! } else { $start_commenting = 0; print OUT $_; # print end hook! } } } # everything went well! close (IN); close (OUT); rename ($copy_file_name_tmp, $copy_file_name); } ############################################################### # Visit_Copy: visit the tags and weave the code into the # source file. In particular, open the source file specified # in the file-source tag. Search for the start hook and # copy until the end hook is reached. ############################################################### sub Visit_Copy { my ($copy_tag, $copy_file_name, $default_module_name, $prefix_path) = @_; # Check if a file name has been specified my $dest_file_tag = $copy_tag->getElementsByTagName ('source'); if (! $dest_file_tag) { print "Error: does not have the tag.."; print "aborting \n"; exit 1; } if ($dest_file_tag->getLength != 1) { print "Assertion Error: A element can have only \ one tag from which to copy elements"; exit (1); } my $dest_file_name = $dest_file_tag->item(0)->getFirstChild->getNodeValue; #Check if the file exists and one is able to access it $dest_file_name = $prefix_path . "/" . $default_module_name . "/" . $dest_file_name; open (DEST, "<". $dest_file_name) || die "cannot open $dest_file_name \n Wrong tag within exiting" ; # check for the start and end tags within the target file where # one needs to start copying from my $start_tag = $copy_tag->getElementsByTagName ('copy-hook-start'); my $end_tag = $copy_tag->getElementsByTagName ('copy-hook-end'); if (! $start_tag || ! $end_tag) { print "Assertion Error: A element should have a \ tag and tag \n"; exit (1); } # Get the tag that indicates the destination where the # code between the start and end tags will be placed. my $dest_hook_tag = $copy_tag->getElementsByTagName ('dest-hook'); if (! $dest_hook_tag) { print "Assertion Error: should have a \ tag that dictates where in the source file the code should be \ placed. \n"; exit (1); } # Remove any starting and trailing white spaces chomp ($dest_hook_tag); # We have everything we need! Do the copy my $start_tag_name = $start_tag->item(0)->getFirstChild->getNodeValue; my $end_tag_name = $end_tag->item(0)->getFirstChild->getNodeValue; my $dest_tag_name = $dest_hook_tag->item(0)->getFirstChild->getNodeValue; # First we add the FOCUS prepend tags $start_tag_name = $FOCUS_PREPEND_TAG . $start_tag_name; $end_tag_name = $FOCUS_PREPEND_TAG . $end_tag_name; $dest_tag_name = $FOCUS_PREPEND_TAG . $dest_tag_name; # Step 1: Iterate over the target file till the # dest-hook is found in that file my $copy_file_name_tmp = $copy_file_name . "tmp"; open (OUT, ">". $copy_file_name_tmp) || die "cannot open temporary file for modying file:" . $copy_file_name; open (IN, "<" . $copy_file_name) || die "cannot open file $copy_file_name specified in the tag \n"; my $dest_tag_found = 0; #check if tag matched foreach my $line () { if ($line =~ /$dest_tag_name/) { $dest_tag_found = 1; print OUT $line; last; } print OUT $line; } close (IN); # If we reached the end of file before finding the tag! if (! $dest_tag_found) { print "\n Error: tag missing in file .. aborting \n"; close (DEST); close (IN); close (OUT); unlink ($copy_file_name_tmp); exit (1); } # Step 2: Now look in the destination file and look for the hooks # where one needs to copy. There could be multiple places where the # hook can be present. E.g. # ....... # //@@ COPY_START_HOOK # .... # .... # //@@ COPY_END_HOOK # .... # .... # //@@ COPY_START_HOOK # .... # .... # //@@ COPY_END_HOOK # Handle this case my $line_matched = 0; my $start_copying = 0; # initially do not copy foreach my $line () { # Check if the line matches the start tag if ($line =~/$start_tag_name/) { $line_matched += 1; $start_copying = 1; } else { # Check if the line matches the end tag if ($line =~/$end_tag_name/) { # check if the start tag matched! if (! $line_matched) { print "Assertion error: tag misplaced with \ the \n"; close (DEST); close (IN); close (OUT); unlink ($copy_file_name_tmp); exit (1); } # decrement the count for nested tags $line_matched -= 1; if (! $line_matched ) { $start_copying = 0; } } else { # Print out the line if ($start_copying) { print OUT $line; } } } } # At the end of this loop line_matched should be 0 if ($line_matched) { print "Error: in $dest_file_name, number of tags \ did not match the number of tags. Reverting \ changes. \n"; close (DEST); close (IN); close (OUT); unlink ($copy_file_name_tmp); exit (1); } # Step 3: Now copy data after the tag in the original file onto the destination # file. open (IN, "<" . $copy_file_name) || die "cannot open file $copy_file_name specified in the tag \n"; $dest_tag_found = 0; #used as a flag foreach my $line () { if ($dest_tag_found) { print OUT $line; } # If the hook is found, then don't write the hook onto OUT # as it would have been written earlier if (! $dest_tag_found && $line =~ /$dest_tag_name/) { $dest_tag_found = 1; } } # Normal exit path close (IN); close (OUT); close (DEST); # Rename the tmp file to the file modified rename ($copy_file_name_tmp, $copy_file_name); } ################################################################# # commit_files: A procedure to commit all the copy files that # were specialized back to the orginal files. ################################################################# sub commit_files { my ($path_name, $output_path_name, @files) = @_; # iterate over the file_name_list foreach my $file (@files) { # my $file_name = $file->getAttribute('name'); # output_path == input_path then do an in place # substitution. if ($output_path_name eq $path_name) { rename ($path_name . "/" . $file_name . "copy", $path_name . "/" . $file_name); } else { # Check if the path_name exists. The path name # corresponds to a directory. So create it if it does # not exist. if (! -d $output_path_name) { #@@? Need to revert the *copy files? mkpath ($output_path_name, 0, 0744) || die "cannot create $output_path_name: commit files failed! \n"; } # move the specialized file to the output directory rename ($path_name . "/" . $file_name . "copy", $output_path_name . "/" . $file_name); } } } #### Main ######################################################## # Specialize_Component # procedure to execute the transformations specified in the # specialization file ################################################################## sub Specialize_Components { # Get the command line arguments my ($prefix_path, $spl_file, $output_prefix) = @_; my $parser = XML::DOM::Parser->new(); my $doc = $parser->parsefile($spl_file); # Check if the prefix path ends with a / or not # if it does not then manually add the / to it my $last = substr ($prefix_path, -1); if ($last ne "/") { $prefix_path = $prefix_path . "/"; } # Entry Point: element foreach my $transform ($doc->getElementsByTagName('transform')) { # foreach my $module ($transform->getElementsByTagName('module')) { # Complete path name to the module my $module_name = $module->getAttribute('name'); my $path_name = $prefix_path . $module_name; # my @files = $module->getElementsByTagName('file'); foreach my $file (@files) { # my $file_name = $file->getAttribute('name'); # Rather than modifying the files directly, make a local # copy of the files and then transform them and commit # if there is a file called foo we make a file foo_copy my $file_path_copy = $path_name . "/" . $file_name . "copy"; my $file_path_name = $path_name . "/" . $file_name; copy ($file_path_name, $file_path_copy); # Diagnostic comment print "Instrumenting $file_name .........."; # ... my @comment_list = $file->getElementsByTagName ('comment'); foreach my $comment (@comment_list) { Visit_Comment ($comment, $file_path_copy); } # ... my @copy_from_source_files = $file->getElementsByTagName ('copy-from-source'); foreach my $copy_from_source (@copy_from_source_files) { Visit_Copy ($copy_from_source, $file_path_copy, $module_name, $prefix_path); } # ... my @remove_list = $file->getElementsByTagName ('remove'); foreach my $remove (@remove_list) { Visit_Remove ($remove, $file_path_copy); } # my @substitute_list = $file->getElementsByTagName ('substitute'); foreach my $substitute (@substitute_list) { Visit_Substitute ($substitute, $file_path_copy); } # ...... my @add_list = $file->getElementsByTagName ('add'); foreach my $add (@add_list) { Visit_Add ($add, $file_path_copy); } # Everything went well.. Print success print " [done] \n"; } } # At this point all the specializations in all the modules have # succeeded. It is at this point that we need to commit the # specializations in each of the modules. That is move the temporary # file that we created to the main file that was specialized. # This also means that we need another loop and do the same thing # as above.... # foreach my $module ($transform->getElementsByTagName('module')) { # Complete path name to the module my $module_name = $module->getAttribute('name'); my $path_name = $prefix_path . $module_name; # Output path name: append output_prefix to the # current module name. Append "/" to create a # directory like /foo/bar/baz/ my $output_path = $output_prefix . "/" . $module_name; # my @files = $module->getElementsByTagName('file'); # commit the files commit_files ($path_name, $output_path, @files); } } } #### # Requiured for a module #### 1; ace-6.4.5+dfsg.orig/bin/FOCUS/VERSION0000644000175000017500000000004213154167357014767 0ustar tggtggThis is FOCUS version 0.0.1 alpha ace-6.4.5+dfsg.orig/bin/FOCUS/README0000644000175000017500000000663313154167357014613 0ustar tggtgg FOCUS README ============ Motivation: ---------- Middleware is often developed as a set of frameworks that can be extended and configured with alternative implementations of key components, such as different types of transport protocols e.g., TCP/IP, VME, or shared memory), event demultiplexing mechanisms e.g., reactive-, proactive-, or thread-based), request demultiplexing strategies (e.g., dynamic hashing, perfect hashing, or active demuxing), and concurrency models (e.g., thread-per-connection, thread pool, or thread-pre-request). A particular DRE application, however, may only use a small subset of the potential framework alternatives. As a result, general-purpose middleware may be overly extensible, i.e., contain unnecessary overhead for indirection and dynamic dispatching that is not needed for use cases in a particular context. A challenge is to develop middleware specialization techniques that can eliminate unnecessary overhead associated with overly extensible middleware framework implementations for certain product variants or application-specific contexts. Example and Approach: -------------------- The reactor framework in ACE allows plug and play of different reactors such as Select, TP, Devpoll etc. The TAO middleware implementation and applications that run atop TAO typically use one particular implementation of the Reactor. For example, a single-threaded application might use select_* reactors. The Reactor framework uses the bridge pattern to transparently invoke operations on the right reactors. When the concrete Reactor is known, it should be possible to specialize the framework to use the concrete reactor directly rather than use the bridge. As a part of the Feature Oriented Customizer (FOCUS) tool being ,we are trying to specialize frameworks when the concrete implementation type is known a priori. FOCUS provides an XML based transformation engine, where the specialization transformations are captured in XML file and a weaver specializes the code. To help in this transformation process, FOCUS applies markers within the source code. These markers are added as special comments. For example, //@@ REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK represents a hook where forward declarations and include files are added by the weaver. As these markers are comments therefore should not affect normal applications in *any* manner. Additionally, applications that use multiple reactor implementations not be affected/do not need any change. Currently, these specializations are targeted for TAO middleware, where applications know the target reactor a priori and want to leverage the specialization to improve performance. FOCUS Installation ------------------ . FOCUS is written using Perl and does not require any compilation. Additionally FOCUS does not depend on any external tools. Requirements ------------ . FOCUS has been tested on Perl version 5.8.0 and uses the following Perl packages: -- XML::DOM package --> Perl package for processing XML DTDs Sample Usage: ------------- FOCUS can be invoked from the command line in the following manner: cmd>$ACE_ROOT/bin/FOCUS/FOCUS.pl --reactor-spl=select-st --prefix-path=/build/arvindk/ACE_wrappers --output-prefix=/build/arvindk/spl-files More Information: ----------------- More information about FOCUS should be available from the docs directory. ace-6.4.5+dfsg.orig/bin/FOCUS/docs/0000775000175000017500000000000013157240624014645 5ustar tggtggace-6.4.5+dfsg.orig/bin/FOCUS/docs/FOCUS.html0000644000175000017500000001501713154167357016424 0ustar tggtgg FOCUS


Feature Oriented Customizer for Middleware (FOCUS)

Table of Contents


Introduction

TAO is a highly flexible ORB that contains a wide range of ORB configuration options. One or more of these options can be combined to meet various application requirements, such as low-latency, predictable real-time behavior, or small memory footprint. TAO's ORB configuration options are managed by an object-oriented framework within the ORB Core. TAO ORB internally uses several objects called Resources, such as a reactor framework that demultiplexes new connection and data requests from a client or pluggable protocol framework to seamlessly work across different protocols. Strategies, are objects that use the Resource entities to perform various ORB tasks, such as connection management, concurrency, and demultiplexing. The Service Configurator is a framework that can be used to statically and dynamically configure components into middleware and applications. Most often, applications that run on top of TAO use only one concrete type of each resource. For example, predominantly TAO applications use the IIOP protocol for communication. In this case, the underlying framework that realizes the feature can be specialized to remove dynamic dispatching overheads. The Feature Oriented Customizer (FOCUS) tool provides a generic approach to enable middleware developers to specialize middleware Frameworks when the concrete resource type is known a priori. FOCUS provides an XML based transformation engine, where the specialization transformations are captured in XML file and a weaver specializes the code. Some important points to note about FOCUS and specialization:
  • It does not modify an interface. So no application level changes are necessary.
  • Once a framework has been customized using FOCUS for a concrete component, other components do not work. For example, specializing the protocol framework with IIOP, precludes the ability to plug-in other protocol implementations.
  • It provides a source-to-source transformations that require re-compiling the source.

FOCUS Options Usage

Option Description
--prefix-path prefix-path to the ACE+TAO source distribution location. For example, in most situations this path is same as the ACE_ROOT environment variable.
--reactor-spl select-st, select-mt, tp-reactor Option to specialize the reactor framework with the concrete reactor type.

select-st: select reactor which no locking. Single threaded case.

select-mt: select reactor with locking enabled, multi-threaded case.

tp-reactor: Thread-pool reactor

--protocol-spl iiop Option to specialize the pluggable protocol framework in TAO for the IIOP protocol.
--messaging-spl giop Option to specialize the messaging strategy in TAO with GIOP messaging protocol.
--wait-strategy rw Specialize the Wait Strategy with the concrete Wait Strategy in TAO. This specialization corresponds to the -ORBWaitStrategy option in TAO.
--output-prefix Option to copy over the specialized files to an output directory. This option works only when a single specialization is chose. If multiple specializations are chosen, then this copies the files corresponding to the last specialization.

FOCUS Sample Usage

cmd>$ACE_ROOT/bin/FOCUS/FOCUS.pl --reactor-spl=select-st \ --prefix-path=/build/arvindk/ACE_wrappers --output-prefix=/build/arvindk/spl-files

FOCUS Tool Organization

FOCUS tool structure is organized as follows:
  • Parser directory has all parser related modules
  • specializations: Rules data base that has the XML files required for performing the individual specialization transformations. For each specialization we have the following sub directories:
    • Reactor_Family: Specializations for ACE_Reactor family
    • Protocol_Family: Specializations for TAO's protocol family
    • Messaging_Strategy: Specializations for TAO's Messaging Strategy
    • Wait_Strategy: Specializations for TAO's Wait strategies
A detailed overview of the FOCUS specialization language, that specifies the different types for specialization transformations supported in FOCUS is discussed here: {To be updated shortly!}

Extending FOCUS

To add a new specializations, to FOCUS, one needs to do the following:
  1. Use the FOCUS specification language to model the different specialization Transformations required. Add this to the repository under FOCUS/specializations. Current convention is to use a directory for each family or specific type of specialization and add specialization files for each type in the family.
  2. Annotate the middleware source code where ever applicable to perform the transformations.
  3. Modify the FOCUS.pl script to add a specific option similar to --reactor-spl option for executing the specializations. Also update the specialization table that maps the command-line option to the appropriate specialization file within the repository.

ace-6.4.5+dfsg.orig/bin/FOCUS/NEWS0000644000175000017500000000310413154167357014420 0ustar tggtggUSER VISIBLE CHANGES AND CAPABILITIES ADDED TO FOCUS: ===================================================== . Support for specialization of ACE Reactor Framework -- Specialization of ACE_Select_Reactor both st and mt -- Specialization of ACE_TP_Reactor . Support for specialization of Pluggable Messaging in TAO -- Specialization of Pluggable Messaging Interface based on GIOP . Support for specializing the Pluggable Protocol framework in TAO -- Specialization for IIOP protocol implementation in TAO FUTURE CAPABILITIES and PLANNED CHANGES ======================================== ACE+TAO component specialization related capabilities ----------------------------------------------------- . Support for specialization of the Messaging Framework based on GIOP_Lite . Support for specialization of Wait Strategy including Leader_Follower wait strategy . Support for specialization of Flushing Strategy components FOCUS Specialization Language Enhancements ------------------------------------------ . Support for multi line search and replace capabilities . Support for ensuring source files are not corrupted when multiple specializations are grouped together when the specializations are added. FOCUS Transformation Related Enhancements ---------------------------------------- . Support for undo feature for the transformations. This is going to be really hard. I am not sure if this is doable . Specifying dependencies between the different specializations. If one is incompatible with the other, then this needs to be detected before the specializations are executed. ace-6.4.5+dfsg.orig/bin/FOCUS/specializations/0000775000175000017500000000000013157240624017116 5ustar tggtggace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Flushing_Strategy/0000775000175000017500000000000013157240624022557 5ustar tggtgg././@LongLink0000644000000000000000000000014600000000000011604 Lustar rootrootace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Flushing_Strategy/Leader_Follower_Flushing_Strategy.splace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Flushing_Strategy/Leader_Follower_Flushing_Strategy.sp0000644000175000017500000001250213154167357031717 0ustar tggtgg #include "Flushing_Strategy.h" FLUSHING_STRATEGY_SPL_INCLUDE_ADD_HOOK class TAO_Transport; class TAO_Queued_Message; class ACE_Time_Value; #include "TAO_Export.h" virtual : public TAO_Flushing_Strategy Flushing_Strategy.h // Flushing_Strategy.h Flushing_Strategy.cpp // Flushing_Strategy.cpp Block_Flushing_Strategy.h // Block_Flushing_Strategy.h Block_Flushing_Strategy.cpp // Block_Flushing_Strategy.cpp Reactive_Flushing_Strategy.h // Reactive_Flushing_Strategy.h Reactive_Flushing_Strategy.cpp // Reactive_Flushing_Strategy.cpp #include "tao/Reactive_Flushing_Strategy.h" // #include "tao/Reactive_Flushing_Strategy.h" #include "tao/Block_Flushing_Strategy.h" // #include "tao/Block_Flushing_Strategy.h" TAO_Flushing_Strategy TAO_Leader_Follower_Flushing_Strategy FLUSHING_STRATEGY_SPL_COMMENT_HOOK_START FLUSHING_STRATEGY_SPL_COMMENT_HOOK_END FLUSHING_STRATEGY_SPL_COMMENT_HOOK_END this->flushing_strategy_type_ = TAO_LEADER_FOLLOWER_FLUSHING; FLUSHING_STRATEGY_CREATION_SPL_HOOK_START FLUSHING_STRATEGY_CREATION_SPL_HOOK_END FLUSHING_STRATEGY_CREATION_SPL_HOOK_END ACE_NEW_RETURN (strategy, TAO_Leader_Follower_Flushing_Strategy, 0); TAO_Flushing_Strategy TAO_Leader_Follower_Flushing_Strategy TAO_Flushing_Strategy TAO_Leader_Follower_Flushing_Strategy #include "Flushing_Strategy.h" #include "Leader_Follower_Flushing_Strategy TAO_Flushing_Strategy TAO_Leader_Follower_Flushing_Strategy friend class TAO_Reactive_Flushing_Strategy; // friend class TAO_Reactive_Flushing_Strategy; friend class TAO_Block_Flushing_Strategy; // friend class TAO_Block_Flushing_Strategy; #include "Flushing_Strategy.h" #include "Leader_Follower_Flushing_Strategy.h TAO_Flushing_Strategy TAO_Leader_Follower_Flushing_strategy TAO_Flushing_Strategy TAO_Leader_Follower_Flushing_Strategy ace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Wait_Strategy/0000775000175000017500000000000013157240624021704 5ustar tggtggace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Wait_Strategy/Wait_On_Leader_Follower.spl0000644000175000017500000000645713154167357027133 0ustar tggtgg Wait_On_Leader_Follower.cpp WAIT_STRATEGY_SPL_COPY_HOOK_START WAIT_STRATEGY_SPL_COPY_HOOK_END TAO_WAIT_STRATEGY_SPL_ADD_HOOK WAIT_STRATEGY_SPL_COPY_HOOK_START #include "tao/Wait_On_Leader_Follower.h" #include "tao/LF_Follower.h" #include "tao/Leader_Follower.h" #include "tao/Transport.h" #include "tao/Synch_Reply_Dispatcher.h" #include "tao/ORB_Core.h" TAO_Wait_On_Leader_Follower TAO_Wait_Strategy LF_WAIT_STRATEGY_SPL_COMMENT_HOOK_START LF_WAIT_STRATEGY_SPL_COMMENT_HOOK_END LF_WAIT_STRATEGY_SPL_SENDING_REQUEST_HOOK return 0; virtual = 0 WAIT_STRATEGY_SPL_COMMENT_HOOK_START WAIT_STRATEGY_SPL_COMMENT_HOOK_END WAIT_STRATEGY_SPL_COMMENT_HOOK_END ACE_NEW_RETURN (ws, TAO_Wait_Strategy (transport), 0); Wait_On_Read.h // Wait_On_Read.cpp Wait_On_Read.cpp // Wait_On_Read.cpp Wait_On_Reactor.h // Wait_On_Reactor.cpp Wait_On_Reactor.cpp // Wait_On_Reactor.cpp Wait_On_Leader_Follower.h // Wait_On_Leader_Follower.cpp Wait_On_Leader_Follower.cpp // Wait_On_Leader_Follower.cpp Wait_On_LF_No_Upcall.h // Wait_On_LF_No_Upcall.cpp Wait_On_LF_No_Upcall.cpp // Wait_On_LF_No_Upcall.cpp ace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Wait_Strategy/Wait_On_Read.spl0000644000175000017500000000606313154167357024732 0ustar tggtgg Wait_On_Read.cpp WAIT_STRATEGY_SPL_COPY_HOOK_START WAIT_STRATEGY_SPL_COPY_HOOK_END TAO_WAIT_STRATEGY_SPL_ADD_HOOK WAIT_STRATEGY_SPL_COPY_HOOK_START #include "tao/Wait_On_Read.h" #include "tao/Transport.h" #include "tao/Resume_Handle.h" #include "tao/Synch_Reply_Dispatcher.h" #include "tao/Client_Strategy_Factory.h" #include "tao/ORB_Core.h" #include "ace/Reactor.h" #include "ace/Countdown_Time.h" TAO_Wait_On_Read TAO_Wait_Strategy virtual = 0 WAIT_STRATEGY_SPL_COMMENT_HOOK_START WAIT_STRATEGY_SPL_COMMENT_HOOK_END WAIT_STRATEGY_SPL_COMMENT_HOOK_END ACE_NEW_RETURN (ws, TAO_Wait_Strategy (transport), 0); Wait_On_Read.h // Wait_On_Read.cpp Wait_On_Read.cpp // Wait_On_Read.cpp Wait_On_Reactor.h // Wait_On_Reactor.cpp Wait_On_Reactor.cpp // Wait_On_Reactor.cpp Wait_On_Leader_Follower.h // Wait_On_Leader_Follower.cpp Wait_On_Leader_Follower.cpp // Wait_On_Leader_Follower.cpp Wait_On_LF_No_Upcall.h // Wait_On_LF_No_Upcall.cpp Wait_On_LF_No_Upcall.cpp // Wait_On_LF_No_Upcall.cpp ace-6.4.5+dfsg.orig/bin/FOCUS/specializations/README0000644000175000017500000000125113154167357020003 0ustar tggtgg @file README ============ This file describes certain common conventions regarding how the specializations rules are integrated/added to this specialization database. This directory will serve as a repository that will host all the specialization rules for the different families/components. At the moment, all the specialization transformations are specific to the ACE+TAO middleware. For each component framework, the following are the rules for adding the specializations: . Create a directory with the name of the component family, e.g., Reactor_Family . Within this directory, create the <>.spl file that has the individual transformations defined. ace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Context-Specific-Optimizations/0000775000175000017500000000000013157240624025134 5ustar tggtgg././@LongLink0000644000000000000000000000016200000000000011602 Lustar rootrootace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Context-Specific-Optimizations/Dispatch-Resolution-Optimization.splace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Context-Specific-Optimizations/Dispatch-Resolution-Opt0000644000175000017500000001027413154167357031531 0ustar tggtgg CONNECTION_HANDLER_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK class TAO_Servant_Base; #include "tao/Abstract_Servant_Base.h" CONNECTION_HANDLER_SPL_PRIVATE_DATA_ADD_HOOK TAO_Skeleton op_signature_; TAO_Servant_Base *servant_; CONNECTION_HANDLER_SPL_PUBLIC_METHODS_ADD_HOOK void set_op_signature (TAO_Skeleton &skeleton, TAO_Servant_Base *&servant); void get_op_signature (TAO_Skeleton &operation_ptr, TAO_Servant_Base *&servant); CONNECTION_HANDLER_SPL_METHODS_ADD_HOOK ACE_INLINE void TAO_Connection_Handler::set_op_signature (TAO_Skeleton &skeleton, TAO_Servant_Base *&servant) { this->op_signature_ = skeleton; this->servant_ = servant; } ACE_INLINE void TAO_Connection_Handler::get_op_signature (TAO_Skeleton &operation_ptr, TAO_Servant_Base *&servant) { operation_ptr = this->op_signature_; servant = this->servant_; } GIOP_MESSAGE_BASE_DATA_MEMBER_ADD_HOOK bool once__; GIOP_MESSAGE_BASE_INCLUDE_ADD_HOOK #include "tao/Connection_Handler.h" TAO_DEF_GIOP_MINOR\) TAO_DEF_GIOP_MINOR) , once__ (1) TAO_DISPATCH_RESOLUTION_OPT_COMMENT_HOOK_START TAO_DISPATCH_RESOLUTION_OPT_COMMENT_HOOK_END TAO_DISPATCH_RESOLUTION_OPT_COMMENT_HOOK_END if (once__) { once__ = false; // Normal path the first time this->orb_core_->request_dispatcher ()->dispatch ( this->orb_core_, request, forward_to ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } else { // Dispatch directly to the skeleton TAO_Connection_Handler *handler = transport->connection_handler (); TAO_Skeleton skel; TAO_Servant_Base *skeleton_ptr; handler->get_op_signature (skel, skeleton_ptr); // Convert references to void * void *upcall_ptr = 0; skel (request, upcall_ptr, (void *)skeleton_ptr ACE_ENV_ARG_PARAMETER); if (response_required) request.tao_send_reply (); } TAO_SERVANT_BASE_INCLUDE_ADD_HOOK #include "tao/Transport.h" #include "tao/Connection_Handler.h" TAO_DISPATCH_RESOLUTION_OPT_ADD_HOOK TAO_Connection_Handler *handler = req.transport ()->connection_handler (); handler->set_op_signature (skel, static_cast<TAO_Servant_Base *> (derived_this)); ace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Protocol_Family/0000775000175000017500000000000013157240624022220 5ustar tggtggace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Protocol_Family/IIOP/0000775000175000017500000000000013157240624022760 5ustar tggtggace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Protocol_Family/IIOP/iiop.spl0000644000175000017500000006456413154167357024465 0ustar tggtgg class TAO_Connection_Handler; #include "tao/Connection_Handler.h" TAO_TRANSPORT_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK namespace IIOP { class ListenPointList; } class TAO_Acceptor; class TAO_Adapter; virtual = 0; ; TAO_Transport \(CORBA::ULong tag, TAO_Transport (TAO_IIOP_Connection_Handler *, CORBA::ULong tag, TAO_TRANSPORT_SPL_PUBLIC_METHODS_ADD_HOOK /// Bridge method to call a similar method on the connection handler void update_protocol_properties (int send_buffer_size, int recv_buffer_size, int no_delay, int enable_network_priority); /// Generate the request header int generate_request_header (TAO_Operation_Details &opd, TAO_Target_Specification &spec, TAO_OutputCDR &msg); TAO_TRANSPORT_SPL_PRIVATE_METHODS_ADD_HOOK void set_bidir_context_info (TAO_Operation_Details &opdetails); int get_listen_point (IIOP::ListenPointList &listen_point_list, TAO_Acceptor *acceptor); TAO_TRANSPORT_SPL_DATA_MEMBERS_ADD_HOOK /// The connection service handler used for accessing lower layer /// communication protocols. TAO_IIOP_Connection_Handler *connection_handler_; /// Our messaging object. TAO_Pluggable_Messaging *messaging_object_; TAO_TRANSPORT_SPL_EXTERN_ADD_HOOK typedef TAO_Transport TAO_IIOP_Transport; generate_request_header generate_request_header_base__ TAO_TRANSPORT_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK #include "Transport_Acceptor.h" #include "IIOPC.h" #include "Acceptor_Registry.h" #include "operation_details.h" #include "GIOP_Message_Base.h" #include "Protocols_Hooks.h" TAO_Transport::TAO_Transport \(CORBA::ULong tag, TAO_Transport::TAO_Transport (TAO_IIOP_Connection_Handler *handler, CORBA::ULong tag, , partial_message_ \(0\) , partial_message_ (0) , connection_handler_ (handler) , messaging_object_ (0) TAO_TRANSPORT_SPL_CONSTRUCTOR_ADD_HOOK // Use the normal GIOP object ACE_NEW (this->messaging_object_, TAO_GIOP_Message_Base (orb_core)); TAO_TRANSPORT_SPL_DESTRUCTOR_ADD_HOOK delete this->messaging_object_; TAO_TRANSPORT_SPL_COMMENT_HOOK_START TAO_TRANSPORT_SPL_COMMENT_HOOK_END IIOP_Transport.cpp TAO_TRANSPORT_SPL_COPY_HOOK_START TAO_TRANSPORT_SPL_COPY_HOOK_END TAO_TRANSPORT_SPL_METHODS_ADD_HOOK TAO_Transport::generate_request_header TAO_Transport::generate_request_header_base__ \s+TAO_Connection_Handler\s*\(void\); : public TAO_LF_CH_Event : public TAO_IIOP_SVC_HANDLER, public TAO_LF_CH_Event CONNECTION_HANDLER_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK #include "ace/Svc_Handler.h" #include "ace/SOCK_Stream.h" typedef ACE_Svc_Handler < ACE_SOCK_STREAM, ACE_NULL_SYNCH > TAO_IIOP_SVC_HANDLER; namespace IIOP { class ListenPointList; } CONNECTION_HANDLER_SPL_PUBLIC_METHODS_ADD_HOOK int open (void *); int close (u_long = 0); int resume_handler (void); int handle_output (ACE_HANDLE); int handle_close (ACE_HANDLE, ACE_Reactor_Mask); int handle_timeout (const ACE_Time_Value &current_time, const void *act = 0); /// Add ourselves to Cache. int add_transport_to_cache (void); /// Process the @a listen_list int process_listen_point_list (IIOP::ListenPointList &listen_list); /// Check if network priority needs to be enabled int enable_network_priority (void); TAO_Connection_Handler (ACE_Thread_Manager * = 0); /// Constructor. TAO_Connection_Handler (TAO_ORB_Core *orb_core, CORBA::Boolean flag); CONNECTION_HANDLER_SPL_PRIVATE_DATA_ADD_HOOK int dscp_codepoint_; CONNECTION_HANDLER_SPL_EXTERN_ADD_HOOK typedef TAO_Connection_Handler TAO_IIOP_Connection_Handler; virtual = 0; ; CONNECTION_HANDLER_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK #include "IIOPC.h" #include "Thread_Lane_Resources.h" #include "Base_Transport_Property.h" #include "Protocols_Hooks.h" #include "Wait_Strategy.h" #include "ace/os_include/netinet/os_tcp.h" #include "ace/os_include/os_netdb.h" CONNECTION_HANDLER_SPL_METHODS_ADD_HOOK TAO_Connection_Handler::TAO_Connection_Handler (ACE_Thread_Manager *t) : TAO_IIOP_SVC_HANDLER (t, 0 , 0), orb_core_ (0), dscp_codepoint_ (IPDSFIELD_DSCP_DEFAULT << 2) { ACE_ASSERT (0); } TAO_Connection_Handler::TAO_Connection_Handler ( TAO_ORB_Core *orb_core, CORBA::Boolean flag) : TAO_IIOP_SVC_HANDLER (orb_core->thr_mgr (), 0, 0), orb_core_ (orb_core), transport_ (0), dscp_codepoint_ (IPDSFIELD_DSCP_DEFAULT << 2) { TAO_IIOP_Transport* specific_transport = 0; ACE_NEW (specific_transport, TAO_IIOP_Transport (this, IOP::TAG_INTERNET_IOP, orb_core)); // store this pointer (indirectly increment ref count) this->transport (specific_transport); // @@todo: We need to have a distinct option/ method in the resource // factory for this and TAO_Transport. this->lock_ = this->orb_core_->resource_factory ()->create_cached_connection_lock (); // Put ourselves in the connection wait state as soon as we get // created this->state_changed (TAO_LF_Event::LFS_CONNECTION_WAIT, this->orb_core_->leader_follower ()); } TAO_IIOP_Connection_Handler TAO_Connection_Handler CONNECTION_HANDLER_SPL_COMMENT_HOOK_START CONNECTION_HANDLER_SPL_COMMENT_HOOK_END IIOP_Connection_Handler.cpp CONNECTION_HANDLER_SPL_COPY_HOOK_START CONNECTION_HANDLER_SPL_COPY_HOOK_END CONNECTION_HANDLER_SPL_METHODS_ADD_HOOK CONNECTION_HANDLER_DESTRUCTOR_ADD_HOOK delete this->transport (); TAO_ACCEPTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK #include "tao/Connection_Handler.h" #include "tao/Acceptor_Impl.h" #include "tao/GIOP_Message_Version.h" #include "ace/Acceptor.h" #include "ace/SOCK_Acceptor.h" IIOP_Acceptor.h TAO_ACCEPTOR_SPL_CONCRETE_METHODS_COPY_HOOK_START TAO_ACCEPTOR_SPL_CONCRETE_METHODS_COPY_HOOK_END TAO_ACCEPTOR_SPL_PUBLIC_METHODS_ADD_HOOK TAO_ACCEPTOR_SPL_EXTERN_ADD_HOOK typedef TAO_Acceptor TAO_IIOP_Acceptor; #if defined(__ACE_INLINE__) #include "tao/IIOP_Acceptor.i" #endif /* __ACE_INLINE__ */ IIOP_Acceptor.h TAO_ACCEPTOR_SPL_DATA_MEMBERS_COPY_HOOK_START TAO_ACCEPTOR_SPL_DATA_MEMBERS_COPY_HOOK_END TAO_ACCEPTOR_SPL_DATA_MEMBERS_ADD_HOOK virtual = 0; ; ~TAO_IIOP_Acceptor \(void\); TAO_IIOP_Acceptor TAO_Acceptor IIOP_Acceptor.cpp TAO_ACCEPTOR_SPL_COPY_HOOK_START TAO_ACCEPTOR_SPL_COPY_HOOK_END TAO_ACCEPTOR_SPL_METHODS_ADD_HOOK : TAO_Acceptor \(IOP::TAG_INTERNET_IOP\), : tag_ (IOP::TAG_INTERNET_IOP), TAO_ACCEPTOR_DESTRUCTOR_ADD_HOOK this->close (); delete this->creation_strategy_; delete this->concurrency_strategy_; delete this->accept_strategy_; delete [] this->addrs_; for (CORBA::ULong i = 0; i < this->endpoint_count_; ++i) CORBA::string_free (this->hosts_[i]); delete [] this->hosts_; #include "tao/IIOP_Acceptor.h" #include "tao/IIOP_Profile.h" #include "tao/Profile.h" TAO_IIOP_Acceptor::TAO_IIOP_Acceptor TAO_Acceptor::TAO_Acceptor IIOP_Transport.cpp // IIOP_Transport.cpp IIOP_Transport.h // IIOP_Transport.h IIOP_Connection_Handler.cpp // IIOP_Connection_Handler.cpp IIOP_Connection_Handler.h // IIOP_Connection_Handler.h IIOP_Acceptor.cpp // IIOP_Acceptor.cpp IIOP_Acceptor.h // IIOP_Acceptor.h IIOP_Connector.cpp // IIOP_Connector.cpp IIOP_Endpoint.cpp // IIOP_Endpoint.cpp IIOP_Connector.h // IIOP_Connector.h IIOP_Endpoint.h // IIOP_Endpoint.h IIOP_Profile.cpp // IIOP_Profile.cpp IIOP_Profile.h // IIOP_Profile.h TAO_ENDPOINT_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK #include "tao/IIOP_EndpointsC.h" #include "ace/INET_Addr.h" IIOP_Endpoint.h TAO_ENDPOINT_SPL_PRIVATE_DATA_COPY_HOOK_START TAO_ENDPOINT_SPL_PRIVATE_DATA_COPY_HOOK_END TAO_ENDPOINT_SPL_PRIVATE_DATA_ADD_HOOK IIOP_Endpoint.h TAO_ENDPOINT_SPL_PUBLIC_METHODS_COPY_HOOK_START TAO_ENDPOINT_SPL_PUBLIC_METHODS_COPY_HOOK_END TAO_ENDPOINT_SPL_PUBLIC_METHODS_ADD_HOOK ACE_UNIMPLEMENTED_FUNC \(TAO_Endpoint \(const TAO_Endpoint&\)\) TAO_IIOP_Endpoint TAO_Endpoint TAO_IIOP_Profile TAO_Profile TAO_ENDPOINT_SPL_EXTERN_ADD_HOOK typedef TAO_Endpoint TAO_IIOP_Endpoint; #if defined (__ACE_INLINE__) # include "tao/IIOP_Endpoint.i" #endif /* __ACE_INLINE__ */ virtual = 0; ; IIOP_Endpoint.cpp TAO_ENDPOINT_SPL_COPY_HOOK_START TAO_ENDPOINT_SPL_COPY_HOOK_END TAO_ENDPOINT_SPL_METHODS_ADD_HOOK : TAO_Endpoint \(IOP::TAG_INTERNET_IOP\) : addr_lookup_lock_ () , hash_val_ (0) , tag_ (IOP::TAG_INTERNET_IOP) , priority_ (TAO_INVALID_PRIORITY) : TAO_Endpoint \(IOP::TAG_INTERNET_IOP, priority\) : addr_lookup_lock_ () , hash_val_ (0) , tag_ (IOP::TAG_INTERNET_IOP) , priority_ (priority) : TAO_Endpoint \(rhs.tag_, rhs.priority_\) : addr_lookup_lock_ () , hash_val_ (0) , tag_ (rhs.tag_) , priority_ (rhs.priority_) TAO_IIOP_Endpoint TAO_Endpoint #include "IIOP_Endpoint.h" TAO_CONNECTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK #include "ace/SOCK_Connector.h" #include "ace/Connector.h" #include "tao/Connector_Impl.h" #include "tao/Connection_Handler.h" IIOP_Connector.h TAO_CONNECTOR_SPL_PUBLIC_METHODS_COPY_HOOK_START TAO_CONNECTOR_SPL_PUBLIC_METHODS_COPY_HOOK_END TAO_CONNECTOR_SPL_PUBLIC_METHODS_ADD_HOOK TAO_CONNECTOR_SPL_PUBLIC_METHODS_ADD_HOOK TAO_Connector (CORBA::Boolean flag = 0); IIOP_Connector.h TAO_CONNECTOR_SPL_COPY_HOOK_START TAO_CONNECTOR_SPL_COPY_HOOK_END TAO_CONNECTOR_SPL_PRIVATE_DATA_ADD_HOOK TAO_CONNECTOR_SPL_EXTERN_ADD_HOOK typedef TAO_Connector TAO_IIOP_Connector; virtual = 0; ; class TAO_Endpoint; #include "tao/Endpoint.h" TAO_CONNECTOR_SPL_INCLUDE_ADD_HOOK #include "ace/OS_NS_strings.h" : TAO_Connector \(IOP::TAG_INTERNET_IOP\) : active_connect_strategy_ (0) , tag_ (IOP::TAG_INTERNET_IOP) , orb_core_ (0) IIOP_Connector.cpp TAO_CONNECTOR_SPL_COPY_HOOK_START TAO_CONNECTOR_SPL_COPY_HOOK_END TAO_CONNECTOR_SPL_METHODS_ADD_HOOK TAO_IIOP_Connector TAO_Connector #include "IIOP_Acceptor.h" #include "Transport_Acceptor.h" #include "IIOP_Connector.h" #include "Transport_Connector.h" #include "IIOP_Acceptor.h" #include "Transport_Acceptor.h" #include "IIOP_Connector.h" #include "Transport_Connector.h" class TAO_Endpoint; #include "tao/Endpoint.h" virtual = 0; ; IIOP_Profile.h TAO_PROFILE_SPL_PUBLIC_METHODS_COPY_HOOK_START TAO_PROFILE_SPL_PUBLIC_METHODS_COPY_HOOK_END TAO_PROFILE_SPL_PUBLIC_METHODS_ADD_HOOK IIOP_Profile.h TAO_PROFILE_SPL_PROTECTED_METHODS_COPY_HOOK_START TAO_PROFILE_SPL_PROTECTED_METHODS_COPY_HOOK_END TAO_PROFILE_SPL_PROTECTED_METHODS_ADD_HOOK IIOP_Profile.h TAO_PROFILE_SPL_PRIVATE_DATA_COPY_HOOK_START TAO_PROFILE_SPL_PRIVATE_DATA_COPY_HOOK_END TAO_PROFILE_SPL_PRIVATE_DATA_ADD_HOOK TAO_PROFILE_SPL_EXTERN_ADD_HOOK typedef TAO_Profile TAO_IIOP_Profile; TAO_IIOP_Profile TAO_Profile TAO_PROFILE_SPL_COMMENT_HOOK_START TAO_PROFILE_SPL_COMMENT_HOOK_END IIOP_Profile.cpp TAO_PROFILE_SPL_COPY_HOOK_START TAO_PROFILE_SPL_COPY_HOOK_END TAO_PROFILE_SPL_METHODS_ADD_HOOK TAO_PROFILE_SPL_METHODS_ADD_HOOK TAO_Profile::TAO_Profile (const ACE_INET_Addr &addr, const TAO::ObjectKey &object_key, const TAO_GIOP_Message_Version &version, TAO_ORB_Core *orb_core) : version_ (version) , are_policies_parsed_ (false) , addressing_mode_ (0) , tagged_profile_ (0) , ref_object_key_ (0) , tag_ (IOP::TAG_INTERNET_IOP) , orb_core_ (orb_core) , forward_to_ (0) , refcount_lock_ (0) , refcount_ (1) , endpoint_ (addr, orb_core->orb_params ()->use_dotted_decimal_addresses ()) , count_ (1) { // @@ NOTE: Need to probably use a different type of lock. this->refcount_lock_ = this->orb_core_->client_factory ()->create_profile_lock (); (void) this->orb_core_->object_key_table ().bind (object_key, this->ref_object_key_); } TAO_Profile::TAO_Profile (const char* host, CORBA::UShort port, const TAO::ObjectKey &object_key, const ACE_INET_Addr &addr, const TAO_GIOP_Message_Version &version, TAO_ORB_Core *orb_core) : version_ (version) , are_policies_parsed_ (false) , addressing_mode_ (0) , tagged_profile_ (0) , ref_object_key_ (0) , tag_ (IOP::TAG_INTERNET_IOP) , orb_core_ (orb_core) , forward_to_ (0) , refcount_lock_ (0) , refcount_ (1) , endpoint_ (host, port, addr) , count_ (1) { // @@ NOTE: Need to probably use a different type of lock. this->refcount_lock_ = this->orb_core_->client_factory ()->create_profile_lock (); (void) this->orb_core_->object_key_table ().bind (object_key, this->ref_object_key_); } TAO_Profile::TAO_Profile (TAO_ORB_Core *orb_core) : version_ (TAO_GIOP_Message_Version (TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR)) , are_policies_parsed_ (false) , addressing_mode_ (0) , tagged_profile_ (0) , ref_object_key_ (0) , tag_ (IOP::TAG_INTERNET_IOP) , orb_core_ (orb_core) , forward_to_ (0) , refcount_lock_ (0) , refcount_ (1) , endpoint_ () , count_ (1) { this->refcount_lock_ = this->orb_core_->client_factory ()->create_profile_lock (); } TAO_PROFILE_SPL_DESTRUCTOR_ADD_HOOK TAO_Endpoint *tmp = 0; for (TAO_Endpoint *next = this->endpoint ()->next (); next != 0; next = tmp) { tmp = next->next (); delete next; } TAO_IIOP_Profile TAO_Profile dynamic_cast static_cast #include "tao/IIOP_Endpoint.h" #include "tao/Endpoint.h" TAO_HAS_UIOP 1 TAO_HAS_UIOP 0 TAO_HAS_SHMIOP 1 TAO_HAS_SHMIOP 0 TAO_HAS_MIOP 1 TAO_HAS_MIOP 0 TAO_HAS_DIOP 1 TAO_HAS_DIOP 0 IIOP_Transport.h Transport.h IIOP_Connection_Handler.h Connection_Handler.h ace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Reactor_Family/0000775000175000017500000000000013157240624022016 5ustar tggtggace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Reactor_Family/Select_Reactor_ST.spl0000644000175000017500000002674213154167357026063 0ustar tggtgg REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK class ACE_Sig_Handler; class ACE_Sig_Action; class ACE_Sig_Set; REACTOR_SPL_PUBLIC_METHODS_ADD_HOOK //These methods needs to be virtual as they are used by //Select_Reactor_Notify classes which use the base class virtual ~ACE_Select_Reactor_Impl () {} virtual int notify (ACE_Event_Handler *event_handler = 0, ACE_Reactor_Mask mask = ACE_Event_Handler::EXCEPT_MASK, ACE_Time_Value * = 0) =0; virtual int remove_handler (ACE_Event_Handler *eh, ACE_Reactor_Mask mask) =0; virtual int register_handler (ACE_HANDLE handle, ACE_Event_Handler *eh, ACE_Reactor_Mask mask) =0; virtual : public ACE_Reactor_Impl #include "ace/Reactor_Impl.h" public ACE_Reactor_Notify public ACE_Event_Handler ACE_Reactor_Notify ACE_Select_Reactor_Notify ACE_Reactor_Impl ACE_Select_Reactor_Impl void renew virtual void renew int is_suspended_i virtual int is_suspended_i void clear_dispatch_mask virtual void clear_dispatch_mask ACE_Reactor_Impl ACE_Select_Reactor_Impl #include "ace/Reactor.h" REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK class ACE_Sig_Handler; class ACE_Sig_Action; class ACE_Sig_Set; ACE_Reactor_Notify ACE_Select_Reactor_Notify virtual REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK #include "ace/Countdown_Time.h" ACE_Reactor_Notify ACE_Select_Reactor_Notify ACE_Reactor_Impl ACE_Select_Reactor_Impl #include "ace/Reactor_Impl.h" #include "ace/Select_Reactor_Base.h" ACE_Reactor_Impl ACE_Select_Reactor_Impl REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK #include "ace/Select_Reactor.h" class ACE_Reactor_Impl; virtual ACE_Reactor_Impl ACE_Select_Reactor : public ACE_Reactor_Timer_Interface #include "ace/Reactor_Timer_Interface.h" class ACE_Reactor_Timer_Interface; ACE_Reactor_Timer_Interface ACE_Reactor ACE_Reactor_Timer_Interface ACE_Reactor #include "ace/Reactor_Timer_Interface.h" REACTOR_SPL_COMMENT_INCLUDE_START_HOOK REACTOR_SPL_COMMENT_INCLUDE_END_HOOK REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_START REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_END REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_END ACE_NEW (impl, ACE_Select_Reactor); ACE_Reactor_Impl ACE_Select_Reactor REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK // Check if this is necessary #include "ace/Select_Reactor.h" TAO_REACTOR_SPL_COMMENT_HOOK_START TAO_REACTOR_SPL_COMMENT_HOOK_END TAO_REACTOR_SPL_COMMENT_HOOK_END typedef ACE_Select_Reactor_T <ACE_Reactor_Token_T < ACE_Noop_Token > > ACE_Select_Reactor; TP_Reactor.h // TP_Reactor.h TP_Reactor.cpp // TP_Reactor.cpp Msg_WFMO_Reactor.cpp // Msg_WFMO_Reactor.cpp WFMO_Reactor.cpp // WFMO_Reactor.cpp Reactor_Impl.cpp // Reactor_Impl.cpp Reactor_Impl.h // Reactor_Impl.h Dev_Poll_Reactor.cpp // Dev_Poll_Reactor.cpp Priority_Reactor.cpp // Priority_Reactor.cpp Reactor_Timer_Interface.h // Reactor_Timer_Interface.h Reactor_Timer_Interface.cpp // Reactor_Timer_Interface.cpp class ACE_Reactor_Impl; #include "ace/Reactor.h" ACE_Reactor_Impl ACE_Select_Reactor #include "ace/TP_Reactor.h" ACE_Reactor_Impl ACE_Select_Reactor TAO_REACTOR_SPL_COMMENT_HOOK_START TAO_REACTOR_SPL_COMMENT_HOOK_END TAO_REACTOR_SPL_COMMENT_HOOK_END ACE_NEW_RETURN (impl, TAO_NULL_LOCK_REACTOR ((ACE_Sig_Handler*)0, (ACE_Timer_Queue*)0, 0, (ACE_Select_Reactor_Notify*)0, this->reactor_mask_signals_), 0); GUIResource_Factory.cpp // GUIResource_Factory.cpp GUIResource_Factory.h // GUIResource_Factory.h ACE_Reactor_Impl ACE_Select_Reactor #include "ace/FlReactor.h" #include "ace/TkReactor.h" #include "ace/WFMO_Reactor.h" #include "ace/TP_Reactor.h" #include "ace/Msg_WFMO_Reactor.h" ACE_Reactor_Impl ACE_Select_Reactor ace/Select_Reactor.h ace/Reactor.h TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_START TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_END TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_END ACE_NEW_RETURN (impl, TAO_NULL_LOCK_REACTOR ((ACE_Sig_Handler*)0, (ACE_Timer_Queue*)0, 0, (ACE_Select_Reactor_Notify*)0, this->reactor_mask_signals_), 0); ace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Reactor_Family/Select_Reactor_MT.spl0000644000175000017500000002560613154167357026053 0ustar tggtgg REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK class ACE_Sig_Handler; class ACE_Sig_Action; class ACE_Sig_Set; REACTOR_SPL_PUBLIC_METHODS_ADD_HOOK //--- How can we devirtualize these methods? virtual ~ACE_Select_Reactor_Impl () {} virtual int notify (ACE_Event_Handler *event_handler = 0, ACE_Reactor_Mask mask = ACE_Event_Handler::EXCEPT_MASK, ACE_Time_Value * = 0) =0; virtual int remove_handler (ACE_Event_Handler *eh, ACE_Reactor_Mask mask) =0; virtual int register_handler (ACE_HANDLE handle, ACE_Event_Handler *eh, ACE_Reactor_Mask mask) =0; virtual : public ACE_Reactor_Impl #include "ace/Reactor_Impl.h" public ACE_Reactor_Notify public ACE_Event_Handler ACE_Reactor_Notify ACE_Select_Reactor_Notify ACE_Reactor_Impl ACE_Select_Reactor_Impl void renew virtual void renew int is_suspended_i virtual int is_suspended_i void clear_dispatch_mask virtual void clear_dispatch_mask ACE_Reactor_Impl ACE_Select_Reactor_Impl #include "ace/Reactor.h" ACE_Reactor_Impl ACE_Select_Reactor_Impl #include "ace/Reactor_Impl.h" #include "ace/Select_Reactor_Base.h" ACE_Reactor_Impl ACE_Select_Reactor_Impl REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK class ACE_Sig_Handler; class ACE_Sig_Action; class ACE_Sig_Set; ACE_Reactor_Notify ACE_Select_Reactor_Notify virtual REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK #include "ace/Countdown_Time.h" ACE_Reactor_Notify ACE_Select_Reactor_Notify REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK #include "ace/Select_Reactor.h" class ACE_Reactor_Impl; virtual ACE_Reactor_Impl ACE_Select_Reactor : public ACE_Reactor_Timer_Interface #include "ace/Reactor_Timer_Interface.h" class ACE_Reactor_Timer_Interface; ACE_Reactor_Timer_Interface ACE_Reactor ACE_Reactor_Timer_Interface ACE_Reactor #include "ace/Reactor_Timer_Interface.h" REACTOR_SPL_COMMENT_INCLUDE_START_HOOK REACTOR_SPL_COMMENT_INCLUDE_END_HOOK REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_START REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_END REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_END ACE_NEW (impl, ACE_Select_Reactor); ACE_Reactor_Impl ACE_Select_Reactor REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK // Check if this is necessary #include "ace/Select_Reactor.h" TP_Reactor.h // TP_Reactor.h TP_Reactor.cpp // TP_Reactor.cpp Msg_WFMO_Reactor.cpp // Msg_WFMO_Reactor.cpp WFMO_Reactor.cpp // WFMO_Reactor.cpp Reactor_Impl.cpp // Reactor_Impl.cpp Reactor_Impl.h // Reactor_Impl.h Dev_Poll_Reactor.cpp // Dev_Poll_Reactor.cpp Priority_Reactor.cpp // Priority_Reactor.cpp Reactor_Timer_Interface.h // Reactor_Timer_Interface.h Reactor_Timer_Interface.cpp // Reactor_Timer_Interface.cpp class ACE_Reactor_Impl; #include "ace/Reactor.h" ACE_Reactor_Impl ACE_Select_Reactor #include "ace/TP_Reactor.h" ACE_Reactor_Impl ACE_Select_Reactor TAO_REACTOR_SPL_COMMENT_HOOK_START TAO_REACTOR_SPL_COMMENT_HOOK_END TAO_REACTOR_SPL_COMMENT_HOOK_END ACE_NEW_RETURN (impl, TAO_REACTOR ((ACE_Sig_Handler*)0, (ACE_Timer_Queue*)0, 0, (ACE_Select_Reactor_Notify*)0, this->reactor_mask_signals_), 0); GUIResource_Factory.cpp // GUIResource_Factory.cpp GUIResource_Factory.h // GUIResource_Factory.h ACE_Reactor_Impl ACE_Select_Reactor #include "ace/FlReactor.h" #include "ace/TkReactor.h" #include "ace/WFMO_Reactor.h" #include "ace/TP_Reactor.h" #include "ace/Msg_WFMO_Reactor.h" ACE_Reactor_Impl ACE_Select_Reactor ace/Select_Reactor.h ace/Reactor.h TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_START TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_END TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_END ACE_NEW_RETURN (impl, TAO_REACTOR ((ACE_Sig_Handler*)0, (ACE_Timer_Queue*)0, 0, (ACE_Select_Reactor_Notify*)0, this->reactor_mask_signals_), 0); ace-6.4.5+dfsg.orig/bin/FOCUS/specializations/Reactor_Family/TP_Reactor.spl0000644000175000017500000002522413154167357024553 0ustar tggtgg REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK class ACE_Sig_Handler; class ACE_Sig_Action; class ACE_Sig_Set; #include "ace/Reactor_Impl.h" virtual : public ACE_Reactor_Impl public ACE_Reactor_Notify public ACE_Event_Handler REACTOR_SPL_PUBLIC_METHODS_ADD_HOOK //--- How can we devirtualize these methods? virtual ~ACE_Select_Reactor_Impl () {} virtual int notify (ACE_Event_Handler *event_handler = 0, ACE_Reactor_Mask mask = ACE_Event_Handler::EXCEPT_MASK, ACE_Time_Value * = 0) = 0; virtual int remove_handler (ACE_Event_Handler *eh, ACE_Reactor_Mask mask) = 0; virtual int register_handler (ACE_HANDLE handle, ACE_Event_Handler *eh, ACE_Reactor_Mask mask) =0; //-------------------------------------------- ACE_Reactor_Notify ACE_Select_Reactor_Notify ACE_Reactor_Impl ACE_Select_Reactor_Impl void renew virtual void renew int is_suspended_i virtual int is_suspended_i void clear_dispatch_mask virtual void clear_dispatch_mask ACE_Reactor_Impl ACE_Select_Reactor_Impl #include "ace/Reactor.h" REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK class ACE_Sig_Handler; class ACE_Sig_Action; class ACE_Sig_Set; ACE_Reactor_Notify ACE_Select_Reactor_Notify REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK #include "ace/Countdown_Time.h" ACE_Reactor_Notify ACE_Select_Reactor_Notify ACE_Reactor_Impl ACE_Select_Reactor_Impl #include "ace/Reactor_Impl.h" #include "ace/Select_Reactor_Base.h" ACE_Reactor_Impl ACE_Select_Reactor_Impl ACE_Reactor_Impl ACE_TP_Reactor virtual : public ACE_Reactor_Timer_Interface #include "ace/Reactor_Timer_Interface.h" class ACE_Reactor_Timer_Interface; ACE_Reactor_Timer_Interface ACE_Reactor ACE_Reactor_Timer_Interface ACE_Reactor #include "ace/Reactor_Timer_Interface.h" REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK #include "ace/Reactor.h" ACE_Reactor_Impl ACE_TP_Reactor REACTOR_SPL_COMMENT_INCLUDE_START_HOOK REACTOR_SPL_COMMENT_INCLUDE_END_HOOK REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_START REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_END REACTOR_SPL_COMMENT_INCLUDE_END_HOOK #include "ace/TP_Reactor.h" REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_END ACE_NEW (impl, ACE_TP_Reactor); virtual REACTOR_SPL_COMMENT_HOOK_START REACTOR_SPL_COMMENT_HOOK_END REACTOR_SPL_COMMENT_HOOK_END int ACE_TP_Reactor::register_handler (int signum, ACE_Event_Handler *new_sh, ACE_Sig_Action *new_disp, ACE_Event_Handler **old_sh, ACE_Sig_Action *old_disp) { return ACE_Select_Reactor::register_handler (signum, new_sh, new_disp, old_sh, old_disp); } #include "ace/Select_Reactor.h" ACE_Select_Reactor ACE_TP_Reactor REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK #include "ace/TP_Reactor.h" WFMO_Reactor.cpp // WFMO_Reactor.cpp Reactor_Impl.cpp // Reactor_Impl.cpp Reactor_Impl.h // Reactor_Impl.h Dev_Poll_Reactor.cpp // Dev_Poll_Reactor.cpp Msg_WFMO_Reactor.cpp // Msg_WFMO_Reactor.cpp Priority_Reactor.cpp // Priority_Reactor.cpp Reactor_Timer_Interface.h // Reactor_Timer_Interface.h Reactor_Timer_Interface.cpp // Reactor_Timer_Interface.cpp ACE_Reactor_Impl ACE_TP_Reactor ACE_Reactor_Impl ACE_TP_Reactor ACE_Reactor_Impl ACE_TP_Reactor ACE_Reactor_Impl ACE_TP_Reactor ACE_Reactor_Impl ACE_TP_Reactor #include "ace/FlReactor.h" #include "ace/TkReactor.h" #include "ace/WFMO_Reactor.h" #include "ace/Msg_WFMO_Reactor.h" ACE_Reactor_Impl ACE_TP_Reactor TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_START TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_END TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_END ACE_NEW_RETURN (impl, ACE_TP_Reactor (ACE::max_handles (), 1, (ACE_Sig_Handler*)0, (ACE_Timer_Queue*)0, this->reactor_mask_signals_, ACE_Select_Reactor_Token::LIFO), 0); ace-6.4.5+dfsg.orig/bin/FOCUS/ChangeLog0000644000175000017500000002523413154167357015503 0ustar tggtggFri Sep 21 09:44:15 UTC 2007 Johnny Willemsen * FOCUS.pl: Removed support for messaging specialization, this abstraction has been removed from TAO * specializations/Messaging_Strategy: * specializations/Messaging_Strategy/GIOP.spl: Removed from the repo Wed Dec 20 10:00:12 UTC 2006 Johnny Willemsen * specializations/Reactor_Family/TP_Reactor.spl: Removed specialization of Reactor.inl, the added include is not necessary and causes a circular include problem Tue Nov 14 12:57:12 UTC 2006 Johnny Willemsen * specializations/Wait_Strategy/Wait_On_Leader_Follower.spl: * FOCUS.pl: Added new lf specialization * specializations/Wait_Strategy/Wait_On_Read.spl: Updated to work with head Tue Nov 14 12:17:12 UTC 2006 Johnny Willemsen * specializations/Messaging_Strategy/GIOP.spl: Updated to work with current svn head Tue Nov 14 11:30:12 UTC 2006 Johnny Willemsen * specializations/Reactor_Family/TP_Reactor.spl: Updated to work with current svn head Fri Nov 10 09:38:12 UTC 2006 Johnny Willemsen * docs/FOCUS.html: Added tp-reactor reference Fri Nov 18 17:05:49 2005 Arvind S. Krishna * specializations/Reactor_Family/Select_Reactor_ST.spl: * specializations/Reactor_Family/Select_Reactor_MT.spl: Reverted the include file in ace/Select_Reactor_T.inl as g++ 4.0 seems to balk when this is not there. This does not seem to happen with g++ 3.2 or later versions Thu Oct 27 09:47:32 2005 Arvind S. Krishna * specializations/iiop.spl: Updated specializations file based on changes made to ACE+TAO Thu Sep 29 15:57:36 2005 Arvind S. Krishna * FOCUS.pl: Changed the script to use $ACE_ROOT enviornment variable to compute the paths to the specialization files. * Parser/Parser.pm: Modified the parser comments and return values. * NEWS: Added news file that discusses the current and planned features. * README: Readme file * INSTALL: Removed install file and moved contents to README * docs/FOCUS.html: Documenting the different features of FOCUS and usage. Thu Sep 29 11:15:52 2005 Arvind S. Krishna * specializations/Protocol_Family/IIOP/iiop.spl: * specializations/Context-Specific-Optimizations/Request-Creation-Optimizations.spl: Changes required to the rules based on code level changes. Wed Sep 7 09:20:30 2005 Arvind S. Krishna * VERSION: * specializations/Wait_Strategy/Wait_On_Read.spl: * specializations/Protocol_Family/iiop.spl: * specializations/Messaging_Strategy/GIOP.spl: * Parser/Parser.pm: Added version file for the first internal release of FOCUS. Updated the specializations based on recent updates. Tue Sep 6 09:07:04 2005 Arvind S. Krishna * specializations/Protocol_Family/iiop.spl: Added specialization rules for specializing the pluggable protocols implementation in TAO with the IIOP protocol implementation. Mon Aug 29 11:55:32 2005 Arvind S. Krishna * specializations/Reactor_Family/Select_Reactor_ST.spl: * specializations/Reactor_Family/Select_Reactor_MT.spl: * specializations/Reactor_Family/TP_Reactor.spl: Updated the specializations rules for the Reactor specialization after the commit by Steve Huston. These have been tested and validated with the code in ACE+TAO. Mon Aug 22 13:28:39 2005 Arvind S. Krishna * FOCUS.pl: * Parser/Parser.pm: * specializations/Context-Specific-Optimizations/Dispatch-Resolution-Optimitzation.spl: Added the specialization that resolves the request processor only once and uses the cached request processor to service requests on a specific connection for all other requests. Wed Aug 17 14:59:44 2005 Arvind S. Krishna * FOCUS.pl: Added new option for specializing the wait strategy at the client side in ACE+TAO * Parser/Parser.pm: Added support of tag that copies source code from a source file and inserts it into the destination file at a particular hook location. * specializations/Reactor_Family/Select_Reactor_MT.spl: * specializations/Reactor_Family/Select_Reactor_ST.spl: * specializations/Wait_Strategy/Wait_On_Read.spl: * specializations/Flushing_Strategy/Leader_Follower_Flushing_Strategy.spl: Updated the Reactor specializations, after eliminating the Reactor_Timer_Interface from the Reactor implementation. Added two specializations for the Wait strategy and the Leader_Follower_Flushing strategies. Updated the Messaging specialization based on hooks left in the source code. Mon Aug 15 14:59:28 2005 Arvind S. Krishna * Parser/Parser.pm: Updated the parser to include the attribute match-line in a substitute tag. This matches the entire line as opposed to a word which substitutes default behavior is. * specializations/Reactor_Family/Select_Reactor_MT.spl: * specializations/Reactor_Family/Select_Reactor_ST.spl: Updated the rules to include the match-line attribute to match the entire line as opposed to the a single word. Mon Aug 15 09:07:54 2005 Arvind S. Krishna * specializations/Select_Reactor_ST.spl: * specializations/Select_Reactor_MT.spl: * specializations/TP_Reactor.spl: Updated the specialization rules. In particular, the specialization rules have been updated as two separate ST rules and MT rules for select reactor ST and select reactor MT. * FOCUS.pl: Updated the main script to work with these two rules. Thu Aug 11 16:33:47 2005 Arvind S. Krishna * FOCUS.pl: * Parser/Parser.pm: Added option to specify the output path where the specialization file should be put. * specializations/Reactor_Family/TP_Reactor.spl: Updated the thread-pool reactor specialization file tags based on the generated code. Thu Aug 11 10:54:06 2005 Arvind S. Krishna * FOCUS.pl: Updated specialization entry for Thread Pool reactor. * Parser/Parser.pm: Updated the Visit_Substitute method with the requirement that it match whole words and not parts of a word. For example, this problem manifests when one is trying to substitute Msg_WFMO_Reactor and WFM_Reactor. Both the strings match for WFMO_Reactor, when only the latter should be matching. Corrected this issue. * specializations/Select_Reactor.spl: * specializations/TP_Reactor.spl: Updated the tags to be consistent and corrected several typos and made sure that the rules in the specializations are actually executed. * PROBLEM-REPORT-FORM: Most important thing added :-) Wed Aug 10 15:38:17 2005 Arvind S. Krishna * FOCUS.pl: Moved the perl script from the Parser module to the top level directory for convenience. * specializations/Reactor_Family/TP_Reactor.spl: Added a specialization file for specializing TP_Reactor implementation. * specializations/Reactor_Family/Select_Reactor.spl: Updated the specialization file to be in sync with the code level comment hooks in the ACE+TAO implementation. Sun Aug 7 16:15:29 2005 Arvind S. Krishna * Parser/Parser.pm: Added Visit_Comment visitor to parse and execute tags. Each comment tag contains a start-hook and an end-hook which can be used to comment blocks of region within the source code. * specializations/Protocol_Family/Pluggable_Messaging.spl: A specialization file that completely removes the Pluggable messaging interface and replaces that with the concrete type used. Thu Aug 4 14:33:42 2005 Arvind Krishna * Parser/Parser.pm: Added diagnostic messages and updated FOCUS perl script to use Getopt command line parsing perl module. Thu Aug 4 10:57:08 2005 Arvind Krishna * Parser/Parser.pm: * Parser/FOCUS.pl: Updated the parser module to include a tag, this is necessary when the specializations have to work across different directories such as ACE and TAO. Wed Jul 27 15:54:02 PDT 2005 Arvind S. Krishna * specializations/Reactor_Family/Select_Reactor.spl: Added a couple of specialization tags for reactor specialization. * Parser/xml-spl-parser.pm: Parser now capable of executing search, replace, add and comment functionality for specializations. Tue Jul 26 12:38:00 2005 Arvind S. Krishna * specializations/README: Added a evolving README file that describes the rules for integrating different specializations into FOCUS. Tue Jul 26 11:23:51 2005 Arvind S. Krishna * Parser/Parser.pm: * specializations/Reactor_Family/Select_Reactor.spl: A simple perl based parser to parse the XML specializations defined within the various specialization files. Select_Reactor.spl defines the specialization rules for effecting the transformations for specializing the Reactor framework within ACE. Tue Jul 26 11:21:44 2005 Arvind S. Krishna * FOCUS: Birth of "Feature Oriented Customization of Systems" is a research project that aims at customizing semi complete applications or frameworks based on features (e.g., type of protocol, type of reactor) used in an application. FOCUS was born out of research efforts described in the following paper: http://www.cs.wustl.edu/~schmidt/PDF/MW-Spl.pdf ace-6.4.5+dfsg.orig/bin/FOCUS/FOCUS.pl0000755000175000017500000001331613154167357015146 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; ######################################################################### # FOCUS: A Feature Oriented Customization tool for ACE+TAO. # # Usage: # ====== # --prefix-path - gives the prefix to the place where ACE+TAO is installed # --reactor-spl - provide the component that needs to be specialized # --protocol-spl - provide the concrete protocol to specialize # --output-prefix-path - # (Optional) if specified, copies all the files to the # output prefix. The directory structure is maintained. # That is if foo/bar.h file was specialized. Then the # output will be /foo/bar.h # # Adding New Specializations # =========================== # (1) Add a new command line option if the specialization belongs to a # new family of components. For example, Concurrency strategy # (1.b) If not, then enhance exisiting option with a new value # (2) Associate a specialization file for the concrete component being # specialized. # (3) Update the specializations directory appropriately to add the # specializations file. # # @author Arvind S. Krishna # ######################################################################## use Getopt::Long; # This script can be invoked from anywhere. We need to add this to the # path use lib "$ENV{ACE_ROOT}/bin"; use FOCUS::Parser::FOCUSParser; sub usage { # How to use FOCUS # Currently FOCUS supports the specialization of reactor and protocol # families my $usage = "usage: \n ./FOCUS " . " \n --prefix-path=" . " [\n --reactor-spl=" . " \n --protocol-spl=" . " \n --wait-strategy-spl=" . " \n --output-prefix=" . " \n --context-specific-optimizations=" . " \n ]" . "\n"; print "$usage \n"; } # Global Table that maps the specialization name to the file # select => "../specializations/Reactor_Family/Select_Reactor.spl # For each component that one needs to specialize add an entry in # this simple global table to execute the specializations. # Get the ACE_ROOT ENV variable. Then the specializations # can be accessed via $ACE_ROOT/bin/FOCUS/..... my $spl_prefix_path = ""; if (defined $ENV{"ACE_ROOT"}) { $spl_prefix_path = $ENV{"ACE_ROOT"}; # Check if the prefix path ends with a / or not # if it does not then manually add the / to it my $last = substr ($spl_prefix_path, -1); if ($last ne "/") { $spl_prefix_path = $spl_prefix_path . "/"; } # Add the bin/FOCUS directory to the prefix path $spl_prefix_path = $spl_prefix_path . "bin/FOCUS/"; } else { print "FOCUS: ACE_ROOT environment variable not defined. Exiting... \n"; exit 1; } my %specialization_table = ( "select-mt", $spl_prefix_path . "specializations/Reactor_Family/Select_Reactor_MT.spl", "select-st", $spl_prefix_path . "specializations/Reactor_Family/Select_Reactor_ST.spl", "tp-reactor",$spl_prefix_path . "specializations/Reactor_Family/TP_Reactor.spl", "iiop", $spl_prefix_path . "specializations/Protocol_Family/IIOP/iiop.spl", "rw", $spl_prefix_path . "specializations/Wait_Strategy/Wait_On_Read.spl", "lf", $spl_prefix_path . "specializations/Wait_Strategy/Wait_On_Leader_Follower.spl", "dispatch", $spl_prefix_path . "specializations/Context-Specific-Optimizations/Dispatch-Resolution-Optimization.spl"); # Get the command line options my $ret = GetOptions ("prefix-path=s" => \$prefix_path, "reactor-spl=s" => \$reactor_type, "protocol-spl=s" => \$protocol_type, "wait-strategy-spl=s" => \$wait_strat_type, "output-prefix:s" => \$output_prefix, "context-specific-optimizations=s" => \$context_opt); # Check if the prefix path is specified if (!$prefix_path) { usage; exit 1; } # # Check if the optional outputpath is specified # if it not specified then the output_prefix will # be same as the prefix_path. # So if the prefix is something like: # /build/arvindk/ACE_wrappers, then the output_prefix # will be the same. # # Upshot: The source files will be directly replaced. # if (! $output_prefix) { $output_prefix = $prefix_path; } # Check if the type of each component specialized is valid! if ($reactor_type) { my $spl_file = $specialization_table {$reactor_type}; if (! length ($spl_file)) { print "Invalid reactor type specified \n"; usage; exit 1; } # specialize the Reactor component FOCUSParser::Specialize_Components ($prefix_path, $spl_file, $output_prefix); } # protocol specialization if ($protocol_type) { my $spl_file = $specialization_table {$protocol_type}; if (! spl_file) { print "Invalid reactor type specified \n"; usage; exit 1; } # specialize the Protocol component FOCUSParser::Specialize_Components ($prefix_path, $spl_file, $output_prefix); } # Wait Strategy specialization if ($wait_strat_type) { my $spl_file = $specialization_table {$wait_strat_type}; if (! spl_file) { print "Invalid specialization for the Wait strategy \n"; usage; exit 1; } # specialize the wait strategy FOCUSParser::Specialize_Components ($prefix_path, $spl_file, $output_prefix); } # Context specific optimizations present if ($context_opt) { my $spl_file = $specialization_table {$context_opt}; if (! spl_file) { print "Invalid Context specialization optimization specified\n"; usage; exit 1; } # specialize the wait strategy FOCUSParser::Specialize_Components ($prefix_path, $spl_file, $output_prefix); } ace-6.4.5+dfsg.orig/bin/ACEutils.pm0000644000175000017500000000406113154167357015054 0ustar tggtgg require Process; $EXEPREFIX = ".".$DIR_SEPARATOR; $TARGETHOSTNAME = "localhost"; package ACE; sub CheckForExeDir { for($i = 0; $i <= $#ARGV; $i++) { if ($ARGV[$i] eq '-ExeSubDir') { if (defined $ARGV[$i + 1]) { $::EXEPREFIX = $ARGV[$i + 1].$::DIR_SEPARATOR; } else { print STDERR "You must pass a directory with ExeSubDir\n"; exit(1); } splice(@ARGV, $i, 2); } } } ### Check and remove, but don't actually use sub CheckForConfig { for($i = 0; $i <= $#ARGV;) { if ($ARGV[$i] eq '-Config') { if (!defined $ARGV[$i + 1]) { print STDERR "You must pass a configuration with Config\n"; exit(1); } splice(@ARGV, $i, 2); } else { $i++; } } } sub checkForTarget { my($cwd) = shift; for($i = 0; $i <= $#ARGV; $i++) { if ($ARGV[$i] eq '-chorus') { if (defined $ARGV[$i + 1]) { $::TARGETHOSTNAME = $ARGV[$i + 1]; $::EXEPREFIX = "rsh $::TARGETHOSTNAME arun $cwd$::DIR_SEPARATOR"; } else { print STDERR "The -chorus option requires " . "the hostname of the target\n"; exit(1); } splice(@ARGV, $i, 2); # Don't break from the loop just in case there # is an accidental duplication of the -chorus option } } } # Returns a unique id, uid for unix, last digit of IP for NT sub uniqueid { if ($^O eq "MSWin32") { my $uid = 1; open (IPNUM, "ipconfig|") || die "Can't run ipconfig: $!\n"; while () { if (/Address/) { $uid = (split (/: (\d+)\.(\d+)\.(\d+)\.(\d+)/))[4]; } } close IPNUM; return $uid; } else { return getpwnam (getlogin ()); } } # Waits until a file exists sub waitforfile { local($file) = @_; sleep 1 while (!(-e $file && -s $file)); } sub waitforfile_timed { my $file = shift; my $maxtime = shift; while ($maxtime-- != 0) { if (-e $file && -s $file) { return 0; } sleep 1; } return -1; } $sleeptime = 5; CheckForExeDir (); CheckForConfig (); 1; ace-6.4.5+dfsg.orig/bin/auto_run_tests.pl0000755000175000017500000002121713154167357016465 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # -*- perl -*- # This file is for running the run_test.pl scripts listed in # auto_run_tests.lst. use lib "$ENV{ACE_ROOT}/bin"; if (defined $ENV{srcdir}) { use lib "$ENV{srcdir}/bin"; } use PerlACE::Run_Test; use English; use Getopt::Std; use Cwd; use Env qw(ACE_ROOT PATH TAO_ROOT CIAO_ROOT DANCE_ROOT DDS_ROOT); if (!defined $TAO_ROOT && -d "$ACE_ROOT/TAO") { $TAO_ROOT = "$ACE_ROOT/TAO"; } if (!defined $CIAO_ROOT && -d "$ACE_ROOT/TAO/CIAO") { $CIAO_ROOT = "$ACE_ROOT/TAO/CIAO"; } if (!defined $DANCE_ROOT && -d "$ACE_ROOT/TAO/DAnCE") { $DANCE_ROOT = "$ACE_ROOT/TAO/DAnCE"; } if (!defined $DDS_ROOT && -d "$ACE_ROOT/TAO/DDS") { $DDS_ROOT = "$ACE_ROOT/TAO/DDS"; } ################################################################################ if (!getopts ('adl:os:r:tCd') || $opt_h) { print "auto_run_tests.pl [-a] [-h] [-s sandbox] [-o] [-t]\n"; print "\n"; print "Runs the tests listed in auto_run_tests.lst\n"; print "\n"; print "Options:\n"; print " -a ACE tests only\n"; print " -c config Run the tests for the configuration\n"; print " -h Display this help\n"; print " -s sandbox Runs each program using a sandbox program\n"; print " -o ORB test only\n"; print " -t TAO tests (other than ORB tests) only\n"; print " -C CIAO and DAnCE tests only\n"; print " -d Run OpenDDS tests only\n"; print " -z Run debug mode, no tests executed\n"; print " -Config cfg Run the tests for the configuration\n"; print " -l list Load the list and run only those tests\n"; print " -r dir Root directory for running the tests\n"; print " -ExeSubDir dir Subdirectory for finding the executables,\n"; print "\n"; $ace_config_list = new PerlACE::ConfigList; $ace_config_list->load ($ACE_ROOT."/bin/ace_tests.lst"); print "ACE Test Configs: " . $ace_config_list->list_configs () . "\n"; if (defined $TAO_ROOT) { $orb_config_list = new PerlACE::ConfigList; $orb_config_list->load ($TAO_ROOT."/bin/tao_orb_tests.lst"); print "ORB Test Configs: " . $orb_config_list->list_configs () . "\n"; $tao_config_list = new PerlACE::ConfigList; $tao_config_list->load ($TAO_ROOT."/bin/tao_other_tests.lst"); print "TAO Test Configs: " . $tao_config_list->list_configs () . "\n"; } if (defined $CIAO_ROOT) { $ciao_config_list = new PerlACE::ConfigList; $ciao_config_list->load ($CIAO_ROOT."/bin/ciao_tests.lst"); print "CIAO Test Configs: " . $ciao_config_list->list_configs () . "\n"; } if (defined $DANCE_ROOT) { $dance_config_list = new PerlACE::ConfigList; $dance_config_list->load ($DANCE_ROOT."/bin/dance_tests.lst"); print "DAnCE Test Configs: " . $dance_config_list->list_configs () . "\n"; } if (defined $DDS_ROOT) { $dds_config_list = new PerlACE::ConfigList; $dds_config_list->load ($DDS_ROOT."/bin/dcps_tests.lst"); print "DDS Test Configs: " . $dds_config_list->list_configs () . "\n"; } exit (1); } my @file_list; if ($opt_a) { push (@file_list, "bin/ace_tests.lst"); } if ($opt_o) { push (@file_list, "$TAO_ROOT/bin/tao_orb_tests.lst"); } if ($opt_t) { push (@file_list, "$TAO_ROOT/bin/tao_other_tests.lst"); } if ($opt_C) { push (@file_list, "$CIAO_ROOT/bin/ciao_tests.lst"); push (@file_list, "$DANCE_ROOT/bin/dance_tests.lst"); } if ($opt_d) { push (@file_list, "$DDS_ROOT/bin/dcps_tests.lst"); } if ($opt_r) { $startdir = $opt_r; } else { $startdir = "$ACE_ROOT"; } if ($opt_l) { push (@file_list, "$opt_l"); } if (scalar(@file_list) == 0) { push (@file_list, "bin/ace_tests.lst"); if (-d $TAO_ROOT) { push (@file_list, "$TAO_ROOT/bin/tao_orb_tests.lst"); push (@file_list, "$TAO_ROOT/bin/tao_other_tests.lst"); } if (-d $CIAO_ROOT) { push (@file_list, "$CIAO_ROOT/bin/ciao_tests.lst"); } if (-d $DANCE_ROOT) { push (@file_list, "$DANCE_ROOT/bin/dance_tests.lst"); } if (-d $DDS_ROOT) { push (@file_list, "$DDS_ROOT/bin/dcps_tests.lst"); } } foreach my $test_lst (@file_list) { my $config_list = new PerlACE::ConfigList; if (-r $ACE_ROOT.$test_lst) { $config_list->load ($ACE_ROOT.$test_lst); } elsif (-r "$startdir/$test_lst") { $config_list->load ("$startdir/$test_lst"); } else { $config_list->load ($test_lst); } # Insures that we search for stuff in the current directory. $PATH .= $Config::Config{path_sep} . '.'; foreach $test ($config_list->valid_entries ()) { my $directory = "."; my $program = "."; ## Remove intermediate '.' directories to allow the ## scoreboard matrix to read things correctly $test =~ s!/./!/!g; if ($test =~ /(.*)\/([^\/]*)$/) { $directory = $1; $program = $2; } else { $program = $test; } # this is to ensure that we dont print out the time for tests/run_test.pl # that test prints out the times for each of the ace tests individually my $is_ace_test = ($directory eq "tests"); if (! $is_ace_test) { print "auto_run_tests: $test\n"; if ($config_list->check_config ('Coverity')) { $ENV{COVERITY_TEST_NAME} = $test; $ENV{COVERITY_SUITE_NAME} = $test_lst; $ENV{COVERITY_TEST_SOURCE} = "$directory/$program"; } } my($orig_dir) = $directory; if ($directory =~ m:^TAO/(.*):) { $directory = $1; } if ($directory =~ m:^CIAO/(.*):) { $directory = $1; } if ($directory =~ m:^DAnCE/(.*):) { $directory = $1; } if ($directory =~ m:^DDS/(.*):) { $directory = $1; } $status = undef; my @dirlist = ($ACE_ROOT."/$directory", $TAO_ROOT."/$directory", $CIAO_ROOT."/$directory", $DANCE_ROOT."/$directory", $DDS_ROOT."/$directory"); # when $opt_r is set make sure to *first* check the explicitly # specified directory and only when nothing found there check # the default dirs if ($opt_r) { unshift (@dirlist, $startdir."/$directory"); unshift (@dirlist, $startdir."/$orig_dir"); } foreach my $path (@dirlist) { if (-d $path && ($status = chdir ($path))) { last; } } if (!$status) { if ($opt_r) { print STDERR "ERROR: Cannot chdir to $startdir/$directory\n"; } else { print STDERR "ERROR: Cannot chdir to $directory\n"; } next; } if ($program =~ /(.*?) (.*)/) { if (! -e $1) { print STDERR "ERROR: $directory.$1 does not exist\n"; next; } } else { if (! -e $program) { print STDERR "ERROR: $directory.$program does not exist\n"; next; } } ### Generate the -ExeSubDir and -Config options my $inherited_options = " -ExeSubDir $PerlACE::Process::ExeSubDir "; foreach my $config ($config_list->my_config_list ()) { $inherited_options .= " -Config $config "; } $cmd = ''; if ($opt_s) { #The Win32 sandbox takes the program and options in quotes, but the #posix sandbox takes the program and options as separate args. my($q) = ($^O eq 'MSWin32') ? '"' : ''; $cmd = "$opt_s ${q}perl $program $inherited_options${q}"; } else { $cmd = "perl $program$inherited_options"; } my $result = 0; if (defined $opt_z) { print "Running: $cmd\n"; } else { $start_time = time(); $result = system ($cmd); $time = time() - $start_time; # see note about tests/run_test.pl printing reports for ace tests individually if (! $is_ace_test) { if ($result != 0) { print "Error: $test returned with status $result\n"; } print "\nauto_run_tests_finished: $test Time:$time"."s Result:$result\n"; print "==============================================================================\n"; } } } } ace-6.4.5+dfsg.orig/bin/topinfo_simple_stats.sh0000755000175000017500000000370113154167357017651 0ustar tggtgg#!/bin/sh # if [ $# -lt 2 ]; then echo "Usage: $0 [DEST] [USER]" exit 0 fi DEST=$1 US=$2 DATE=`date +%Y/%m/%d-%H:%M` cd $ACE_ROOT LD_LIBRARY_PATH=$ACE_ROOT/ace export LD_LIBRARY_PATH PATH=/usr/bin:/bin:$PATH export PATH cd $TAO_ROOT/performance-tests/Memory/Single_Threaded # start the server ./server & s_id=$!; # Just sleep for 2 seconds. sleep 2; # Check whether the server has started file="test.ior" if test -f $file then # Just get the size as soon the server is started, ie. the vanilla # server. s_up=`cat /proc/$s_id/status | grep VmRSS | awk '{print $2}'`; # Write it a file echo $DATE $s_up >> $DEST/source/st_start_size.txt # start the client ./client & c_id=$!; # Wait till all the invocations are done sleep 10; # Get the size once the client has made sufficient invocations. s_invocations=`cat /proc/$s_id/status | grep VmRSS| awk '{print $2}'`; echo $DATE $s_invocations >> $DEST/source/st_after_invoke_size.txt # Get teh size of the client after all the invocations c_invocations=`cat /proc/$c_id/status | grep VmRSS | awk '{print $2}'`; echo $DATE $c_invocations >> $DEST/source/st_client_size.txt # Kill the server and client. We will look at better ways of doing # this later. kill -9 $c_id; # Just sleep for the server to release memory etc. sleep 5; # Get the size once the client is killed or crashed s_client_death=`cat /proc/$s_id/status | grep VmRSS | awk '{print $2}'`; echo $DATE $s_client_death >> $DEST/source/st_after_peer_death_size.txt kill -9 $s_id; rm -f $file else echo $file doesnt exist fi cd $DEST/source FILES="start after_invoke client after_peer_death" for i in $FILES ; do /usr/bin/tac st_${i}_size.txt > $DEST/data/st_${i}_size.txt /usr/bin/tail -5 st_${i}_size.txt > $DEST/data/LAST_st_${i}_size.txt $ACE_ROOT/bin/generate_topinfo_charts.sh st_${i}_size.txt $DEST/images/st_${i}_size.png st_${i}_size.txt done ace-6.4.5+dfsg.orig/bin/aix_shr0000755000175000017500000000167613154167357014441 0ustar tggtgg#!/bin/sh # Filter out the duplicate symbol warnings from Visual Age C++ # output=`basename $0`.$$.`/bin/date +%Y%m%d%H%M%S` usrtmp="/tmp" for possible in "$TMPDIR" "$TEMP" "$TMP"; do if [ "$possible" != "" ]; then if [ -w "$possible" ]; then usrtmp="$possible" break fi fi done ## Send the output to a temporary file and save the return code. ## This macro is being passed during the to avoid #include errors ## while instantiating templates. $@ -DACE_VACPP_INSTANTIATING_TEMPLATES > "$usrtmp/$output" 2>&1 status=$? ## Print the output to stdout, but filter duplicate symbol warnings from ## Visual Age C++-using builds. The first pattern ends up coming from the ## linker in Visual Age C++ 5 builds; the second is from Visual Age C++ 6. /bin/egrep -v '0711-(224|345)|1540-0(424|425|436)' "$usrtmp/$output" ## Clean up the temporary file /bin/rm -f "$usrtmp/$output" ## Exit with the return code from the compiler exit $status ace-6.4.5+dfsg.orig/bin/reverse_clean0000755000175000017500000000076013154167357015612 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # -*- perl -*- # This script does a realclean of the list in the reverse order that # is passed to this. This is just a utility script @ARGS = (); if ($ARGV[0] eq ''){ print STDERR "$0: No directories provided\n"; die "provide list of directories"; } my $make = $ARGV[0]; shift; @BUILD_LIST = @ARGV; foreach $i (reverse (@BUILD_LIST)) { system ("$make -k -C $i realclean"); } ace-6.4.5+dfsg.orig/bin/auto_compile_wrapper0000755000175000017500000000312013154167357017206 0ustar tggtgg#!/bin/sh # # Usually cron setups a really miserable environment, this script # serves two purposes: # 1. Setup a good environment for auto_compile. # 2. Invoke auto_compile with the proper arguments for each site. # # The idea is to modify this script on a per-site basis and leave # auto_compile unmodified. # # Setup a proper path, remember that cvs, GNU make, perl5 and your # compiler must be there. PATH=.:$HOME/bin:/pkg/gnu/bin:/opt/SUNWspro/bin:$PATH export PATH # Obvious enough. CVSROOT=/project/cvs-repository export CVSROOT # It could be a good idea to set CVSREAD this will make the staging # area read-only, but our staging areas are public. # CVSREAD=Y # export CVSREAD # Here we define the cvs working copy for our staging area. CHECKOUT=$HOME/head # In some sites the building directory differs from the cvs working # copy. The directory is updated running # $ACE_ROOT/bin/create_ace_build; but it must be setup manually the # first time. # TODO: Arrange for automatic creation of platform_macros.GNU & # config.h. BUILD=SUNCC # Here is where we store auto_compile output and keep a history of # each run. LOGDIR=$HOME/head/ACE_wrappers/build/$BUILD/auto_compile # Who do we send email when compilation (or anything else) fails. ADMIN=PUT_YOUR_ADDRESS_HERE ; echo "You must edit this file" ; exit 0 # You must select a mail tool that can understand the -s option such # as: # # /usr/bin/mailx Solaris # /usr/bin/mailx HP-UX # /usr/sbin/mailx IRIX # /bin/mail Linux exec /pkg/gnu/bin/perl $CHECKOUT/ACE_wrappers/bin/auto_compile \ $CHECKOUT $BUILD $LOGDIR $ADMIN /usr/bin/mailx ace-6.4.5+dfsg.orig/bin/msvc_mpc_auto_compile.pl0000755000175000017500000002651013154167357017757 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # Win32 auto_compile script. use File::Find; use Cwd; if (!$ENV{ACE_ROOT}) { $ACE_ROOT = getcwd ()."\\"; warn "ACE_ROOT not defined, defaulting to ACE_ROOT=$ACE_ROOT"; } else { $ACE_ROOT = $ENV{ACE_ROOT}; $TAO_ROOT = $ENV{TAO_ROOT}; $CIAO_ROOT = $ENV{CIAO_ROOT}; $DANCE_ROOT = $ENV{DANCE_ROOT}; } @directories = (); @ace_core_dirs = ("$ACE_ROOT\\ace", "$ACE_ROOT\\Kokyu", "$ACE_ROOT\\ACEXML", "$ACE_ROOT\\examples", "$ACE_ROOT\\tests", "$ACE_ROOT\\protocols"); @tao_core_dirs = ("$ACE_ROOT\\apps\\gperf\\src", "$TAO_ROOT\\TAO_IDL", "$TAO_ROOT\\tao", "$TAO_ROOT\\tests"); @orbsvcs_core_dirs = ("$TAO_ROOT\\orbsvcs\\orbsvcs"); @dance_core_dirs = ("$DANCE_ROOT"); @ciao_core_dirs = ("$CIAO_ROOT"); $debug = 0; $verbose = 0; $print_status = 0; $Ignore_errors = 0; # By default, bail out if an error occurs. $Build_Debug = 0; $Build_Release = 0; $build_all = 0; $Build_Cmd = "/BUILD"; $use_custom_dir = 0; $useenv = ''; $vc7 = 0; $project_root = "$ACE_ROOT"; # Build_Config takes in a string of the type "project--configuration" and # runs msdev to build it. # sub Build_Config ($) #{ # my ($arg) = @_; # my ($project, $config) = split /--/, $arg; # # return Build ($project, $config); #} # Build sub Build ($$) { my ($project, $config) = @_; if ($debug == 1) { print "$project\n"; return 0; } else { print "Auto_compiling $project : $config\n"; print "Building $project $config\n" if $verbose; return system ("msdev.com $project /MAKE \"$config\" $Build_Cmd $useenv"); } } # Build sub Build_VC7 ($$) { my ($project, $config) = @_; if ($debug == 1) { print "$project\n"; return 0; } else { print "Auto_compiling $project : $config\n"; print "Building $project $config\n" if $verbose; return system ("devenv.com $project $Build_Cmd $config $useenv"); } } sub Find_Dsw (@) { my (@dir) = @_; @array = (); sub wanted_dsw { $array[++$#array] = $File::Find::name if ($File::Find::name =~ /\.dsw$/i); } find (\&wanted_dsw, @dir); print "List of dsw's\n" if ($verbose == 1); return @array; } sub Find_Sln (@) { my (@dir) = @_; @array = (); print "Searching for list of sln's\n" if ($verbose == 1); sub wanted_sln { $array[++$#array] = $File::Find::name if ($File::Find::name =~ /\.sln$/i); } find (\&wanted_sln, @dir); print "List of sln's\n" if ($verbose == 1); return @array; } # Only builds the core libraries. sub Build_Custom () { print STDERR "Building Custom\n"; print "Building Custom directories specified\n";# if ($verbose == 1); print "Build " if ($verbose); print "Debug " if ($verbose) && ($Build_Debug); print "Release " if ($verbose) && ($Build_Release); print "\n" if ($verbose); my @custom_list = Find_Dsw (@directories); print "List now is @custom_list \n"; foreach $c (@custom_list) { print "List now is $c \n"; if ($Build_Debug) { $Status = Build ($c, "ALL - Win32 Debug"); return if $Status != 0 && !$Ignore_errors; } if ($Build_Release) { $Status = Build ($c, "ALL - Win32 Release"); return if $Status != 0 && !$Ignore_errors; } } } # Build all examples and directories sub Build_All () { push @directories, @ace_core_dirs; push @directories, @tao_core_dirs; push @directories, @orbsvcs_core_dirs; push @directories, @dance_core_dirs; push @directories, @ciao_core_dirs; print STDERR "First pass (libraries)\n" if ($print_status == 1); print "\nmsvc_mpc_auto_compile: First Pass CORE (libraries)\n"; Build_Custom (); my @new_directory_search = "$project_root"; my @configurations = Find_Dsw (@new_directory_search); print STDERR "Second pass (for other things)\n" if ($print_status == 1); print "\nmsvc_mpc_auto_compile: Second Pass (rest of the stuff)\n"; foreach $c (@configurations) { print "\nUsing $c for compilation\n"; if ($Build_Debug) { $Status = Build ($c, "ALL - Win32 Debug"); return if $Status != 0 && !$Ignore_errors; } if ($Build_Release) { $Status = Build ($c, "ALL - Win32 Release"); return if $Status != 0 && !$Ignore_errors; } } } # Only builds the core libraries. sub Build_Custom_VC7 () { print STDERR "Building Custom\n"; print "Building Custom directories specified\n";# if ($verbose == 1); print "Build " if ($verbose); print "Debug " if ($verbose) && ($Build_Debug); print "Release " if ($verbose) && ($Build_Release); print "\n" if ($verbose); my @custom_list = Find_Sln (@directories); print "List now is @custom_list \n"; foreach $c (@custom_list) { print "List now is $c \n"; if ($Build_Debug) { $Status = Build_VC7 ($c, "debug"); return if $Status != 0 && !$Ignore_errors; } if ($Build_Release) { $Status = Build_VC7 ($c, "release"); return if $Status != 0 && !$Ignore_errors; } } } # Build all examples and directories sub Build_All_VC7 () { push @directories, @ace_core_dirs; push @directories, @tao_core_dirs; push @directories, @orbsvcs_core_dirs; push @directories, @dance_core_dirs; push @directories, @ciao_core_dirs; print STDERR "First pass (libraries)\n" if ($print_status == 1); print "\nmsvc_mpc_auto_compile: First Pass CORE (libraries)\n"; Build_Custom_VC7 (); my @new_directory_search = "$project_root"; my @configurations = Find_Sln (@new_directory_search); print STDERR "Second pass (for other things)\n" if ($print_status == 1); print "\nmsvc_mpc_auto_compile: Second Pass (rest of the stuff)\n"; foreach $c (@configurations) { print "\nUsing $c for compilation\n"; if ($Build_Debug) { $Status = Build_VC7 ($c, "debug"); return if $Status != 0 && !$Ignore_errors; } if ($Build_Release) { $Status = Build_VC7 ($c, "release"); return if $Status != 0 && !$Ignore_errors; } } } ## Parse command line argument while ( $#ARGV >= 0 && $ARGV[0] =~ /^(-|\/)/ ) { if ($ARGV[0] =~ '-k') { # Ignore errors print "Ignore errors\n" if ( $verbose ); $Ignore_errors = 1; } elsif ($ARGV[0] =~ /^-d$/i) { # debug $debug = 1; } elsif ($ARGV[0] =~ '-vc7') { # Use VC7 project and solution files. print "Using VC7 files\n" if ( $verbose ); $vc7 = 1; } elsif ($ARGV[0] =~ '-vc8') { # Use VC8 project and solution files. print "Using VC8 files\n" if ( $verbose ); $vc7 = 1; # vc8 is like vc7 } elsif ($ARGV[0] =~ '-vc9') { # Use VC9 project and solution files. print "Using VC9 files\n" if ( $verbose ); $vc7 = 1; # vc9 is like vc7 } elsif ($ARGV[0] =~ '-v') { # verbose mode $verbose = 1; } elsif ($ARGV[0] =~ '-s') { # status messages $print_status = 1; } elsif ($ARGV[0] =~ '-u') { # USEENV print "Using Environment\n" if ($verbose); $useenv = '/USEENV'; } elsif ($ARGV[0] =~ '-ACE') {# Build ACE and its tests print "Building ACE\n" if ( $verbose ); $use_custom_dir = 1; push @directories, @ace_core_dirs; } elsif ($ARGV[0] =~ '-TAO') {# Build TAO and its tests print "Building TAO\n" if ( $verbose ); $use_custom_dir = 1; push @directories, @ace_core_dirs; push @directories, @tao_core_dirs; } elsif ($ARGV[0] =~ '-ORBSVCS') {# Build TAO/ORBSVCS and its tests print "Building ACE+TAO+orbsvcs\n" if ( $verbose ); $use_custom_dir = 1; push @directories, @ace_core_dirs; push @directories, @tao_core_dirs; push @directories, @orbsvcs_core_dirs; } elsif ($ARGV[0] =~ '-CIAO') {# Build the CIAO and related # libraries print "Building only CIAO\n" if ( $verbose ); $use_custom_dir = 1; push @directories, @ace_core_dirs; push @directories, @tao_core_dirs; push @directories, @orbsvcs_core_dirs; push @directories, @dance_core_dirs; push @directories, @ciao_core_dirs; } elsif ($ARGV[0] =~ '-ALL') {# Build the CIAO and related # libraries print "Building ALL \n" if ( $verbose ); $build_all = 1; } elsif ($ARGV[0] =~ '-dir') { # Compile only a specific directory shift; print "Adding directory $ARGV[0]\n" if ( $verbose ); $use_custom_dir = 1; push @directories, $ARGV[0]; } elsif ($ARGV[0] =~ '-project_root') { # use different root than ACE_ROOT shift; print "Using project root $ARGV[0]\n" if ( $verbose ); $project_root = $ARGV[0]; } elsif ($ARGV[0] =~ '-rebuild') { # Rebuild all print "Rebuild all\n" if ( $verbose ); $Build_Cmd = "/REBUILD"; } elsif ($ARGV[0] =~ '-clean') { # Clean print "Cleaning all\n" if ( $verbose ); $Build_Cmd = "/CLEAN"; } elsif ($ARGV[0] =~ '-Debug') { # Debug versions print "Building Debug Version\n" if ( $verbose ); $Build_Debug = 1; } elsif ($ARGV[0] =~ '-Release') { # Release versions print "Building Release Version\n" if ( $verbose ); $Build_Release = 1; } elsif ($ARGV[0] =~ '-(\?|h)') { # Help information print "Options\n"; print "-d = Debug (only print out projects)\n"; print "-k = Ignore Errors\n"; print "-v = Script verbose Mode\n"; print "-s = Print status messages to STDERR\n"; print "-u = Tell MSVC to use the environment\n"; print "-vc7 = Use MSVC 7 toolset\n"; print "-vc8 = Use MSVC 8 toolset\n"; print "-vc9 = Use MSVC 9 toolset\n"; print "\n"; print "-ACE = Build ACE and its tests\n"; print "-TAO = Build ACE+TAO and its tests\n"; print "-ORBSVCS = Build ACE+TAO+ORBSVCS and its tests\n"; print "-CIAO = Build ACE+TAO+ORBSVCS+CIAO and its tests\n"; print "-dir = Compile custom directories\n"; print "-project_root = Use different root directory than ACE_ROOT\n"; print "\n"; print "-rebuild = Rebuild All\n"; print "-clean = Clean\n"; print "-Debug = Compile Debug versions\n"; print "-Release = Compile Release versions\n"; exit; } else { warn "$0: error unknown option $ARGV[0]\n"; die -1; } shift; } if (!$Build_Debug && !$Build_Release) { $Build_Debug = 1; $Build_Release = 1; } print "MPC version of msvc_mpc_auto_compile: Begin\n"; if ($vc7) { Build_All_VC7 if ($build_all && !$use_custom_dir); Build_Custom_VC7 if $use_custom_dir; } else { Build_All if ($build_all && !$use_custom_dir); Build_Custom if $use_custom_dir; } print "msvc_mpc_auto_compile: End\n"; print STDERR "End\n" if ($print_status == 1); ace-6.4.5+dfsg.orig/bin/split-cpp.pl0000755000175000017500000003075013154167357015324 0ustar tggtgg#! /usr/bin/perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # # Splits C++ source files into one file per function or data item. # # Author: David L. Levine, with much help and encouragment from # Umar Syyid and Gonzalo A. Diethelm. # Completed by Andrew Gilpin, July 2000 # Date: 10 November 1998 # # For each C++ source file: # 1) Extracts the "intro" code, i.e., #includes and declarations. # 2) Identifies function definitions, relying on {, and } at the # beginning of a line, to delineate the function begin and # end. # # Assumptions: (applies only to the files being split, i.e. .cpp files) # * Function definition bodies are terminated with } appearing at # the beginning of a line. # * Free-standing (outside of functions) macro invocations must be # followed by a blank line, or terminated with a semicolon. # * A function must not have a blank line between its header # (signature) and its body. # * There aren't multiple C-style comments on one line, with code # between them. # * typedefs are on a single line # * A #endif doesn't have a multi-line C comment starting on that line. # The first three lines above let this script run without specifying the # full path to perl, as long as it is in the user's PATH. # Taken from perlrun man page. # Changes made by Andrew Gilpin (June - July 2000) # * Added option -c to use .c extension instead of .cpp extension # * Prints message when no filenames are specified on the command line # * Changed -? option to -h so that it works properly in most shells # * Added option -s to skip certain files, but copy them to $split_dir, # renaming them. (filename.cpp -> $split_dir/filename_S1.cpp). This is # here so that ACE can selectively not split certain files (namely those # that this script doesn't work with :) # * Added support for classes declared in the .cpp file. $usage="usage: $0 [-h] [-d] [-v] [-c] [-s filename] filenames\n"; #### Configuration parameters. $verbose = 0; $debug = 0; $split_dir = 'SPLIT'; $extension = 'cpp'; @files_to_skip = (); #### Constants. $DIR_SEPARATOR = $^O eq "MSWin32" ? '\\' : '/'; #### #### Process command line args. #### while ( $#ARGV >= $[ && $ARGV[0] =~ /^-/ ) { if ( $ARGV[0] eq '-d' ) { $debug = 1; } elsif ( $ARGV[0] eq '-v' ) { $verbose = 1; } elsif ( $ARGV[0] eq '-c' ) { $extension = 'c'; } elsif ( $ARGV[0] eq '-s' ) { push @files_to_skip, $ARGV[1]; shift; } elsif ( $ARGV[0] eq '-h' ) { print "$usage"; exit; } else { print STDERR "$0: unknown option $ARGV[0]\n"; die $usage; } shift; } &main (); #### #### Reset state, to process a new file starting with a clean slate. #### sub reset { #### Working data buffers. @intro = (); @current_comments = (); @current_code = (); @if = (); @save_if = (); @endif = (); @unknown = (); ####@unknown_s = (); #### State variables. $current_file_number = 0; $top_of_file = 1; $in_braces = 0; $in_nonfunction_code = 0; $in_C_comment = 0; $intro_length = 0; $preprocessor_continuation = 0; $preserved_ifs = 0; } sub main { #### Print error message if no files are specified. #### We need to do this before we modify anything on disk. die "No files specified!\n$usage" if (@ARGV == 0); #### Remove the destination subdirectory, if it exists. #### Attempts to clean it out using unlink may fail because #### it can have many files. if (-d "$split_dir") { system ("/bin/rm -r $split_dir") << 256 && die "$0: unable to rm \"$split_dir\"\n"; } #### Create the destination subdirectory. mkdir "$split_dir", 0755 || die "$0: unable to create $split_dir directory: $!\n"; MAIN_LOOP: foreach $file (@ARGV) { #### Strip off filename extension. ($basename = $file) =~ s/\.[^\.]+$//; foreach $skip_file (@files_to_skip) { if ($skip_file eq $file) { system ("/bin/cp $file $split_dir/" . $basename. "_S1\.$extension"); next MAIN_LOOP; } } &reset (); print "FILE: $file\n" if $verbose; open INPUT, "$file" || die "$0: unable to open \"$file\"\n"; while () { #### Strip comments from $line and use that for processing. #### But, use $_ for output, so that comments will be preserved. my $line = $_; #### If we're in the midst of a multiline C comment, see #### if it's finished on this line. if ($in_C_comment) { if ($line =~ s%^.*\*/%%) { #### End C-style comment. $in_C_comment = 0; if ($line =~ /^\s*$/ && ! $in_braces) { #### No code on the line. #&save_comment ($_); next; } } else { unless ($in_braces) { #&save_comment ($_); next; } } } #### Strip C++-style comments. if ($line =~ s%\s*//.*$%%) { if ($line =~ /^\s*$/ && ! $in_braces) { #### C++-style comment, without any code on the line. #&save_comment ($_); next; } } #### And C-style comments. if ($line =~ m%/\*%) { #### Begin C-style comment. Strip any complete comment(s), #### then see what's left. $line =~ s%\s*/\*.*\*/\s*%%g; #### check to see if a preprocessor is on this line if (! $in_braces) { if ($line eq '') { #### The line just had comment(s). Save it. #&save_comment ($_); next; } else { #### There's other text on the line. See if it's just the #### start of a comment. if ($line =~ m%/\*% && $line !~ m%\*/%) { #### The C-style comment isn't terminated on this line. $in_C_comment = 1; #&save_comment ($_); next; } } } } #### For now, skip ACE_RCSID's. Eventually, we might want to #### consider putting them in _every_ file, if they're enabled. next if $line =~ /^ACE_RCSID/; if ($in_braces) { push @unknown, $_; if ($line =~ /{/) { ++$in_braces; } elsif ($line =~ /^};/) { #### }; at beginning of line could signify end of class --$in_braces; if ($in_braces == 0) { push @intro, @unknown; @unknown = (); } } elsif ($line =~ /^}/) { #### } at beginning of line signifies end of function. --$in_braces; push @current_code, @unknown; @unknown = (); &finish_current ($basename, ++$current_file_number); } elsif ($line =~ /};/) { #### end of multi-line data delcaration --$in_braces; if ($in_braces == 0) { push @current_code, @unknown; @unknown = (); &finish_current ($basename, ++$current_file_number); } } } else { #### Not in braces. if (($line =~ m%[^/]*{%) && (! $preprocessor_continuation)) { #### { signifies beginning of braces (obviously :). if ($line =~ /};/) { #### braces end on this line push @unknown, $_; push @current_code, @unknown; @unknown = (); &finish_current ($basename, ++$current_file_number); } else { push @unknown, $_; $in_braces = 1; $in_nonfunction_code = $top_of_file = 0; } } elsif ($line =~ /^}/) { warn "$0: skipping unexpected } on line $. of \"$file\"\n"; next; } elsif ($line =~ /^typedef/) { push @intro, $_; } elsif ($line =~ /^\s*#/ || $preprocessor_continuation) { #### Preprocessor directive. if ($in_nonfunction_code) { push @unknown, $_; } else { push @intro, $_; } $top_of_file = 0; $preprocessor_continuation = /\\$/ ? 1 : 0; if ($line =~ m%^\s*#\s*if\s*(.*)(/.*)*$%) { push @save_if, $_; unshift @endif, "#endif /* $1 [Added by split-cpp.] */\n"; } elsif ($line =~ /^\s*#\s*endif/) { #### End an #if/#else block. unless (defined pop @save_if) { pop @if; if ($preserved_ifs > 0) { --$preserved_ifs; } } shift @endif; #### } elsif ($line =~ /^\s*#/) { #### Any other preprocessor directive. } } elsif ($line =~ /^\s*$/) { #### Whitespace only, or empty line.. push @current_code, "\n"; if ($in_nonfunction_code) { #### In the midst of non-function code, we reached a #### blank line. Assume that we're done with it. &finish_current ($basename, ++$current_file_number); } else { #### Not in a function, so add to intro. Just in case data or #### a function follow it, flush now. $preserved_ifs += $#save_if + 1; &flush_current (\@intro); } } elsif ($line =~ /;/) { #### Data definition or semicolon-terminated macro invocation. push @unknown, $_; $top_of_file = 0; #### Is it file-static? Squash newlines out of @current_code. my $statement = join (' ', @current_code); if ($statement =~ /([^=[(]+)[=[(](.*)/) { if ($1 =~ /static/) { #### Move code to the intro. push @intro, @current_comments; @current_comments = (); &flush_current (\@intro); #### Not separate code. $in_nonfunction_code = 0; #### ???? Extract name from the left side and save for #### later matching. } else { if ($statement =~ /^USEUNIT\s*\(/) { #### Special-case those Borland USEUNIT things. &flush_current (\@intro); } else { #### Non-static entity, with semicolon. Wrap it up. push @current_code, @unknown; @unknown = (); &finish_current ($basename, ++$current_file_number); } } } else { #### Dunno. Wrap it up, anyways. push @current_code, @unknown; @unknown = (); &finish_current ($basename, ++$current_file_number); } } else { #### Beginning of data definition or function or class. push @unknown, $_; $in_nonfunction_code = 1; $top_of_file = 0; } } if (eof) { close (ARGV); #### To reset line number counter. if ($#intro > $intro_length) { #### Leftover prepreprocessor statement(s), such as #pragma #### instantiate. &finish_current ($basename, ++$current_file_number); } } } close INPUT; } }; #### #### Save a comment in the appropriate array. #### #sub save_comment { # my ($comment) = @_; # # if ($top_of_file) { # push @intro, $comment; # } else { # push @current_comments, $comment; # } #} #### #### Flush the contents of the @current_code array to the destination #### argument array. It is passed by reference. #### sub flush_current { my ($destination) = @_; push @$destination, @current_code; @current_code = (); } #### #### Flush what we've got now to an output (split) file. #### sub finish_current { my ($basename, $current_file_number) = @_; my $current_file_name = sprintf "$split_dir$DIR_SEPARATOR${basename}_S%d.$extension", $current_file_number++; if ($verbose) { print "CURRENT OUTPUT FILE: $current_file_name\n"; print "INTRO:\n"; print @intro; print @if; print @current_comments; print "CURRENT CODE:\n"; print @current_code; print @endif; } open OUTPUT, "> $current_file_name" || die "unable to open $current_file_name\n"; print OUTPUT "// Automatically generated by ACE's split-cpp.\n" . "// DO NOT EDIT!\n\n"; if ($debug) { print OUTPUT "INTRO:\n", @intro, "IF:\n", @if, "COMMENTS:\n", @current_comments, "CURRENT:\n", @current_code, "ENDIF:\n", @endif; } else { print OUTPUT @intro, @if, @current_comments, @current_code, @endif; } close OUTPUT; #### For detection of leftover preprocessor statements and #### comments at end of file. $intro_length = $#intro; @current_comments = @current_code = @save_if = (); $in_braces = $in_nonfunction_code = 0; } ace-6.4.5+dfsg.orig/bin/generate_doxygen.pl0000755000175000017500000002212713154167357016737 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # -*- perl -*- # require POSIX; require File::Path; use Cwd; use File::Spec; use File::Temp qw/ tempfile tempdir /; use Env qw(ACE_ROOT TAO_ROOT CIAO_ROOT DDS_ROOT); # Configuration and default values if (!defined $TAO_ROOT) { $TAO_ROOT = "$ACE_ROOT/TAO"; } if (!defined $CIAO_ROOT) { $CIAO_ROOT = "$TAO_ROOT/CIAO"; } if (!defined $DANCE_ROOT) { $DANCE_ROOT = "$TAO_ROOT/DAnCE"; } $is_release = 0; $exclude_ace = 0; $exclude_tao = !-r "$TAO_ROOT/VERSION"; $exclude_ciao = !-r "$CIAO_ROOT/VERSION"; $exclude_dance = !-r "$DANCE_ROOT/VERSION"; $verbose = 0; $perl_path = '/usr/bin/perl'; $html_output_dir = '.'; $footer = ''; $dds = 0; if (defined $DDS_ROOT && -r "$DDS_ROOT/VERSION") { $dds_path = Cwd::abs_path($DDS_ROOT); $cwd_path = Cwd::abs_path(getcwd()); if ($dds_path eq $cwd_path) { $dds = $exclude_ace = $exclude_tao = $exclude_ciao = 1; } } @ACE_DOCS = ('ace', 'ace_rmcast', 'ace_ssl', 'ace_qos', 'ace_inet', 'acexml'); @TAO_DOCS = ('tao' ,'tao_anytypecode' ,'tao_portableserver' ,'tao_pi' ,'tao_pi_server' ,'tao_rtportableserver' ,'tao_compression' ,'tao_transportcurrent' ,'tao_rtcorba' ,'tao_dynamicany' ,'tao_dynamicinterface' ,'tao_iormanip' ,'tao_iortable' ,'tao_ziop' ,'tao_esf' ,'tao_rtevent' ,'tao_cosevent' ,'tao_cosnotification' ,'tao_implrepo' ,'tao_strategies' ,'tao_smartproxies' ,'tao_av' ,'tao_security' ,'tao_ssliop' ,'tao_cosnaming' ,'tao_costime' ,'tao_costrader' ,'tao_portablegroup' ,'tao_ifr'); @CIAO_DOCS = ('ciao_dds4ccm' ,'ciao'); @DANCE_DOCS = ('DAnCE'); @DDS_DOCS = ('dds'); # Modify defaults using the command line arguments &parse_args (); $wrote_configh = 0; if (!-r "$ACE_ROOT/ace/config.h") { open(CONFIG_H, ">$ACE_ROOT/ace/config.h") || die "Cannot create config file\n"; print CONFIG_H "#include \"ace/config-doxygen.h\"\n"; close(CONFIG_H); $wrote_configh = 1; } &generate_doxy_files ('ACE', " $ACE_ROOT", " $ACE_ROOT/VERSION", @ACE_DOCS) if (!$exclude_ace); &generate_doxy_files ('TAO', " $TAO_ROOT", " $TAO_ROOT/VERSION", @TAO_DOCS) if (!$exclude_tao); &generate_doxy_files ('CIAO', " $CIAO_ROOT", " $CIAO_ROOT/VERSION", @CIAO_DOCS) if (!$exclude_ciao); &generate_doxy_files ('DANCE'," $DANCE_ROOT", " $DANCE_ROOT/VERSION", @DANCE_DOCS) if (!$exclude_dance); &generate_doxy_files ('DDS', "$DDS_ROOT", " $DDS_ROOT/VERSION", @DDS_DOCS) if $dds; unlink "$ACE_ROOT/ace/config.h" if $wrote_configh; exit 0; sub parse_args { my @ARGS = (); while ($#ARGV >= 0) { if (!($ARGV[0] =~ m/^-/)) { push @ARGS, $ARGV[0]; } elsif ($ARGV[0] eq "-is_release") { $is_release = 1; } elsif ($ARGV[0] eq "-exclude_ace") { $exclude_ace = 1; } elsif ($ARGV[0] eq "-exclude_tao") { $exclude_tao = 1; } elsif ($ARGV[0] eq "-exclude_ciao") { $exclude_ciao = 1; } elsif ($ARGV[0] eq "-exclude_dance") { $exclude_dance = 1; } elsif ($ARGV[0] eq "-include_dds") { $dds = 1; } elsif ($ARGV[0] eq "-verbose") { $verbose = 1; } elsif ($ARGV[0] eq "-perl_path" && $#ARGV >= 1) { $perl_path = $ARGV[1]; shift; } elsif ($ARGV[0] eq "-footer" && $#ARGV >= 1) { $footer = $ARGV[1]; shift; } elsif ($ARGV[0] eq "-html_output" && $#ARGV >= 1) { $html_output_dir = $ARGV[1]; shift; } else { print "Ignoring option $ARGV[0]\n"; } shift @ARGV; } @ARGV = @ARGS; } #is $arg1 the same path as "$arg2/$arg3"? sub same_dir { my $lhs = shift; my $rhs_base = shift; my $rhs_dir = shift; my $rhs = File::Spec->catdir($rhs_base, $rhs_dir); return File::Spec->canonpath($lhs) eq File::Spec->canonpath($rhs); } sub generate_doxy_files { my $KIT = shift; my $ROOT_DIR = shift; my $VERSION_FILE= shift; my @DOCS = @_; my $VERSION = 'Snapshot ('. POSIX::strftime("%Y/%m/%d-%H:%M", localtime) .')'; my $KIT_path = ($KIT eq 'CIAO') ? 'TAO/CIAO' : $KIT; my $translate_paths = ($KIT eq 'TAO' && !same_dir($TAO_ROOT, $ACE_ROOT, 'TAO')) || ($KIT eq 'CIAO' && !same_dir($CIAO_ROOT, $TAO_ROOT, 'CIAO')); foreach my $i (@DOCS) { if ($is_release) { my ($major, $minor, $beta) = &get_versions ($KIT, $VERSION_FILE); $VERSION = $major.'.'.$minor.'.'.$beta; } my $input = "$ROOT_DIR/etc/".$i.".doxygen"; ($fh, $output) = tempfile(TEMPLATE => 'XXXXXXXX', SUFFIX => '.doxygen', TMPDIR => 1, DESTROY => 1); open(DOXYINPUT, $input) || die "Cannot open doxygen input file $input\n"; open(DOXYOUTPUT, ">$output") || die "Cannot open doxygen output file $output\n"; my $generate_man = 0; my $generate_html = 0; my @output_dirs = (); while () { chomp; if (/^PROJECT_NUMBER/) { print DOXYOUTPUT "PROJECT_NUMBER = ", $VERSION, "\n"; next; } elsif (/^PERL_PATH /) { print DOXYOUTPUT "PERL_PATH = $perl_path\n"; next; } elsif (/^QUIET / && $verbose) { print DOXYOUTPUT "QUIET = NO\n"; next; } elsif (/^INLINE_SOURCES/ && $is_release) { print DOXYOUTPUT "INLINE_SOURCES = NO\n"; next; } elsif (/^SOURCE_BROWSER/ && $is_release) { print DOXYOUTPUT "SOURCE_BROWSER = NO\n"; next; } elsif (/^VERBATIM_HEADERS/ && $is_release) { print DOXYOUTPUT "VERBATIM_HEADERS = NO\n"; next; } elsif (/^GENERATE_MAN/ && /= YES/) { $generate_man = 1; } elsif (/^GENERATE_HTML/ && /= YES/) { $generate_html = 1; } elsif ($generate_html && /^HTML_OUTPUT/) { my @field = split(' = '); if ($#field >= 1) { my $html_out_dir = "$html_output_dir/$field[1]"; push @output_dirs, $html_out_dir; print DOXYOUTPUT "HTML_OUTPUT = $html_out_dir\n"; next; } } elsif ($generate_html && /^GENERATE_TAGFILE/) { my @field = split(' = '); if ($#field >= 1) { my $html_out_dir = "$html_output_dir/$field[1]"; print DOXYOUTPUT "GENERATE_TAGFILE = $html_out_dir\n"; next; } } elsif ($generate_html && /^TAGFILES\s*=\s*(.*)$/) { my $value = $1; while ($value =~ /\\$/) { chop $value; #removes trailing \ my $line = ; chomp $line; $value .= ' ' . $line; } my @values = split(' ', $value); print DOXYOUTPUT "HTML_FOOTER = $footer\n"; map {$_ = $html_output_dir . '/' . $_; } @values; print DOXYOUTPUT 'TAGFILES = ' . join(' ', @values) . "\n"; next; } elsif ($generate_man && /^MAN_OUTPUT/) { my @field = split(' = '); if ($#field >= 1) { push @output_dirs, $field[1]; } } elsif ($translate_paths && /^(INPUT|INCLUDE_PATH)\s*=\s*(.*)$/) { my $keyword = $1; my $value = $2; while ($value =~ /\\$/) { chop $value; #removes trailing \ my $line = ; chomp $line; $value .= ' ' . $line; } $value =~ s/$KIT_path/${"${KIT}_ROOT"}/g; print DOXYOUTPUT "$keyword = $value\n"; next; } print DOXYOUTPUT $_, "\n"; } close (DOXYOUTPUT); close (DOXYINPUT); foreach my $i (@output_dirs) { File::Path::mkpath($i, 0, 0755); } &run_doxy ($output); unlink $output; } if ($generate_man) { open(FIND, "find man -type f -print |") or die "Can't run find\n"; while () { chomp; my $name_with_whitespace = $_; next unless ($name_with_whitespace =~ /\s/); my $name_without_whitespace = $name_with_whitespace; $name_without_whitespace =~ s/\s+//g; rename $name_with_whitespace, $name_without_whitespace; } close FIND; } } sub run_doxy { my $config = shift; open(DOX,"doxygen $config 2>&1 |") || die "cannot start ACE doxygen process\n"; while () { print $_; } close (DOX) || die "error while running doxygen on $config\n"; } ######## ######## Retrieve version information from VERSION file(s). ######## sub get_versions () { my $KIT = shift; my $VERSION_FILE = shift; my ($major_version, $minor_version, $beta_version); open (VERSION, '<'.$VERSION_FILE) || die "$0: unable to open $VERSION_FILE\n"; while () { chomp; if (/$KIT version (\d+)\.(\d+)\.(\d+)/) { $major_version = $1; $minor_version = $2; $beta_version = $3; last; } elsif (/$KIT version (\d+)\.(\d+)[^\.]/) { #### Previous release was a minor. $major_version = $1; $minor_version = $2; $beta_version = '0'; last; } elsif (/$KIT version (\d+)[^\.]/) { #### Previous release was a major. $major_version = $1; $minor_version = '0'; $beta_version = '0'; last; } } close VERSION; return ($major_version, $minor_version, $beta_version); } ace-6.4.5+dfsg.orig/bin/fuzz.pl0000755000175000017500000027275613154167357014425 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # Fuzz is a script whose purpose is to check through ACE/TAO/CIAO files for # easy to spot (by a perl script, at least) problems. use lib "$ENV{ACE_ROOT}/bin"; if (defined $ENV{srcdir}) { use lib "$ENV{srcdir}/bin"; } use Cwd; use File::Find; use File::Basename; use Getopt::Std; use PerlACE::Run_Test; ###### TODO # # Add tests for these: # # - Guards in .h files # - no global functions # - other commit_check checks # # And others in ACE_Guidelines and Design Rules # # Also add a -g flag to ignore tao_idl generated files # ###### END TODO # Lists of all the files @files_cdp = (); @files_cpp = (); @files_inl = (); @files_h = (); @files_html = (); @files_dsp = (); @files_dsw = (); @files_gnu = (); @files_idl = (); @files_pl = (); @files_py = (); @files_changelog = (); @files_makefile = (); @files_mpc = (); @files_bor = (); @files_noncvs = (); @files_sln = (); @files_vcproj = (); @files_run_pl = (); @files_generic = (); @files_doxygen = (); @files_conf = (); @files_rb = (); @files_features = (); # To keep track of errors and warnings $errors = 0; $warnings = 0; # to register suppressed tests %suppressed_tests = (); # to register excluded directories @excluded_dirs = (); ############################################################################## # Use 'svn -q st' to get a list of locally modified # files to look through sub find_mod_svn_files () { unless (open (SVN, "svn -q st |")) { print STDERR "Error: Could not run svn\n"; return 0; } while () { # 1234567 (see "svn help st" for column definitions) if (/^[MA].....\s+(.*)$/) { store_file ($1); } } close (SVN); return 1; } # Use 'git status -s' to get a list of locally modified # files to look through sub find_mod_git_files () { unless (open (GIT, "git status -s |")) { print STDERR "Error: Could not run git\n"; return 0; } while () { if (/^ [MA] +(.*)$/) { store_file ($1); } } close (GIT); return 1; } sub find_mod_files () { if (!(find_mod_svn_files() && find_mod_git_files())) { print "Could use neither svn nor git to find modified files\n"; exit (1); } } sub is_excluded ($) { # exclude will contain the full file name my $exclude = shift; foreach (@excluded_dirs) { if ($exclude =~ /$_/) { return 1; } } return 0; } # Find_Files will search for files with certain extensions in the # directory tree sub find_files () { # wanted is only used for the File::Find sub wanted { store_file ($File::Find::name); } find (\&wanted, '.'); } # sub store_file ($) { my $name = shift; return if is_excluded ($name); if ($name =~ /\.(c|cc|cpp|cxx|tpp)$/i) { push @files_cpp, ($name); } elsif ($name =~ /\.(inl|i)$/i) { push @files_inl, ($name); } elsif ($name =~ /\.(h|hh|hpp|hxx)$/i) { push @files_h, ($name); } elsif ($name =~ /\.(htm|html)$/i) { push @files_html, ($name); } elsif ($name =~ /\.(bor)$/i) { push @files_bor, ($name); } elsif ($name =~ /\.(GNU)$/i) { push @files_gnu, ($name); } elsif ($name =~ /\.(dsp|vcp)$/i) { push @files_dsp, ($name); } elsif ($name =~ /\.(dsw|vcp)$/i) { push @files_dsw, ($name); } elsif ($name =~ /\.(pidl|idl|idl3|idl3p)$/i) { push @files_idl, ($name); } elsif ($name =~ /\.pl$/i) { if ($name =~ /fuzz.pl/) { return; } push @files_pl, ($name); if ($name =~ /^run.*\.pl$/i) { push @files_run_pl, ($name); } } elsif ($name =~ /\.py$/i) { push @files_py, ($name); } elsif ($name =~ /\.(rb|erb)$/i) { push @files_rb, ($name); } elsif ($name =~ /\.features$/i) { push @files_features, ($name); } elsif ($name =~ /\.vcproj$/i) { push @files_vcproj, ($name); } elsif ($name =~ /\.sln$/i) { push @files_sln, ($name); } elsif ($name =~ /ChangeLog/i && -f $name) { push @files_changelog, ($name); } elsif ($name =~ /\/GNUmakefile.*.[^~]$/) { push @files_makefile, ($name); } elsif ($name =~ /\.(mpc|mwc|mpb|mpt)$/i) { push @files_mpc, ($name); } elsif ($name =~ /\.(icc|ncb|zip)$/i) { push @files_noncvs, ($name); } elsif ($name =~ /\.(cdp)$/i) { push @files_cdp, ($name); } elsif ($name =~ /\.(doxygen)$/i) { push @files_doxygen, ($name); } elsif ($name =~ /\.(conf)$/i) { if ($name =~ /\.(WCHAR_T.conf|UTF-16.conf)$/i) { return; } push @files_conf, ($name); } elsif ($name =~ /\.(conf.xml)$/i) { if ($name =~ /\.(WCHAR_T.conf.xml|UTF-16.conf.xml)$/i) { return; } push @files_conf, ($name); } elsif ($name =~ /\.(pm|cmd|java|sh|txt|xml)$/i) { push @files_generic, ($name); } elsif ($name =~ /README$/i) { push @files_generic, ($name); } } ############################################################################## ## Just messages sub print_error ($) { my $msg = shift; print "Error: $msg\n"; ++$errors; } sub print_warning ($) { my $msg = shift; print "Warning: $msg\n"; ++$warnings; } ############################################################################## ## Check if test is suppressed sub is_suppressed () { my $method = (split (/::/, (caller(1))[3]))[-1]; return (defined $suppressed_tests{$method} ? 1 : 0); } ############################################################################## ## Tests # The point of this test is to check for the existence of ACE_INLINE # or ASYS_INLINE in a .cpp file. This is most commonly caused by # copy/pasted code from a .inl/.i file sub check_for_inline_in_cpp () { return if is_suppressed (); print "Running ACE_INLINE/ASYS_INLINE check\n"; foreach $file (@files_cpp) { if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; while () { if (/^ACE_INLINE/) { print_error ("$file:$.: ACE_INLINE found"); } if (/^ASYS_INLINE/) { print_error ("$file:$.: ASYS_INLINE found"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks to make sure we have no files with $Id string in them. sub check_for_id_string () { return if is_suppressed (); print "Running \$Id\$ string check\n"; foreach $file (@files_cpp, @files_inl, @files_h, @files_mpc, @files_bor, @files_gnu, @files_html, @files_idl, @files_pl, @files_cdp, @files_py, @files_conf, @files_generic, @files_features) { my $found = 0; if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; while () { if (/\$id\$/) { print_error ("$file:$.: Incorrect \$id\$ found (correct casing)"); } if (/\$Id:\$/) { print_error ("$file:$.: Incorrect \$Id:\$ found (remove colon)"); } if (/\$Id\$/ || /\$Id: /) { $found = 1; } } close (FILE); if ($found == 1) { print_error ("$file: \$Id\$ string found, not used anymore."); } } else { print STDERR "Error: Could not open $file\n"; } } } # check for _MSC_VER sub check_for_msc_ver_string () { return if is_suppressed (); print "Running _MSC_VER check\n"; foreach $file (@files_cpp, @files_inl, @files_h) { my $found = 0; if (open (FILE, $file)) { my $disable = 0; my $mscline = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_msc_ver/) { $disable = 1; } if (/FUZZ\: enable check_for_msc_ver/) { $disable = 0; } if ($disable == 0 and /\_MSC_VER \<= 1200/) { $found = 1; $mscline = $.; } if ($disable == 0 and /\_MSC_VER \>= 1200/) { $found = 1; $mscline = $.; } if ($disable == 0 and /\_MSC_VER \> 1200/) { $found = 1; $mscline = $.; } if ($disable == 0 and /\_MSC_VER \< 1300/) { $found = 1; $mscline = $.; } if ($disable == 0 and /\_MSC_VER \<= 1300/) { $found = 1; $mscline = $.; } if ($disable == 0 and /\_MSC_VER \>= 1300/) { $found = 1; $mscline = $.; } if ($disable == 0 and /\_MSC_VER \< 1310/) { $found = 1; $mscline = $.; } if ($disable == 0 and /\_MSC_VER \>= 1310/) { $found = 1; $mscline = $.; } } close (FILE); if ($found == 1) { print_error ("$file:$mscline: Incorrect _MSC_VER check found"); } } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for the newline at the end of a file sub check_for_newline () { return if is_suppressed (); print "Running newline check\n"; foreach $file (@files_cpp, @files_inl, @files_h, @files_html, @files_idl, @files_pl) { if (open (FILE, $file)) { my $line; print "Looking at file $file\n" if $opt_d; while () { $line = $_ } close (FILE); if ($line !~ /\n$/) { print_error ("$file:$.: No ending newline found in $file"); } } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for files that are not allowed to be in svn sub check_for_noncvs_files () { return if is_suppressed (); print "Running non svn files check\n"; foreach $file (@files_noncvs, @files_dsp, @files_dsw, @files_makefile, @files_bor) { print_error ("File $file should not be in svn!"); } } # This test checks for the use of ACE_SYNCH_MUTEX in TAO/CIAO, # TAO_SYNCH_MUTEX should used instead. sub check_for_ACE_SYNCH_MUTEX () { return if is_suppressed (); print "Running ACE_SYNCH_MUTEX check\n"; ITERATION: foreach $file (@files_cpp, @files_inl, @files_h) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_ACE_SYNCH_MUTEX/) { $disable = 1; } if (/FUZZ\: enable check_for_ACE_SYNCH_MUTEX/) { $disable = 0; next; } if ($disable == 0 and /ACE_SYNCH_MUTEX/) { # It is okay to use ACE_SYNCH_MUTEX in ACE # so don't check the ACE directory. The below # will check it for TAO and CIAO. if (($file !~ /.*TAO.*/)) { next ITERATION; } # Disable the check in the ESF directory for the # time being until we fix the issues there. if(($file =~ /.*TAO\/orbsvcs\/orbsvcs\/ESF.*/)) { next ITERATION; } print_error ("$file:$.: found ACE_SYNCH_MUTEX, use TAO_SYNCH_MUTEX instead"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for not having export files in CIAO, all have to be --- # generated using TAO_IDL. If you have a file that must be in the repository # remove the generated automatically by line sub check_for_export_file () { return if is_suppressed (); print "Running export file check\n"; ITERATION: foreach $file (@files_h) { if (($file =~ /.*CIAO.*export.h/) || ($file =~ /.*DAnCE.*export.h/)) { if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; while () { if (/generated automatically by/) { print_error ("$file:$.: file should be generated by TAO_IDL, check -Gxh** option"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } } # This test checks for the use of ACE_Thread_Mutex in TAO/CIAO, # TAO_SYNCH_MUTEX should used instead to make the code build # in single-threaded builds. sub check_for_ACE_Thread_Mutex () { return if is_suppressed (); print "Running ACE_Thread_Mutex check\n"; ITERATION: foreach $file (@files_cpp, @files_inl, @files_h) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_ACE_Thread_Mutex/) { $disable = 1; } if (/FUZZ\: enable check_for_ACE_Thread_Mutex/) { $disable = 0; next; } if ($disable == 0 and /ACE_Thread_Mutex/) { # It is okay to use ACE_Thread_Mutex in ACE # so don't check the ACE directory. The below # will check it for TAO and CIAO. if (($file !~ /.*TAO.*/)) { next ITERATION; } print_error ("$file:$.: found ACE_Thread_Mutex, use TAO_SYNCH_MUTEX instead to allow the code to work in single-threaded builds"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for the use of ACE_Guard # ACE_GUARD should used because it checks if we really got a lock # in single-threaded builds. sub check_for_ACE_Guard () { return if is_suppressed (); print "Running ACE_Guard check\n"; ITERATION: foreach $file (@files_cpp, @files_inl, @files_h) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_ACE_Guard/) { $disable = 1; } if (/FUZZ\: enable check_for_ACE_Guard/) { $disable = 0; next; } if ($disable == 0 and /ACE_Guard/) { print_error ("$file:$.: found ACE_Guard, use ACE_GUARD"); } if ($disable == 0 and /ACE_Read_Guard/) { print_error ("$file:$.: found ACE_Read_Guard, use ACE_READ_GUARD"); } if ($disable == 0 and /ACE_Write_Guard/) { print_error ("$file:$.: found ACE_Write_Guard, use ACE_WRITE_GUARD"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for the use of tabs, spaces should be used instead of tabs sub check_for_tab () { return if is_suppressed (); print "Running tabs check\n"; ITERATION: foreach $file (@files_cpp, @files_inl, @files_h, @files_idl, @files_cdp, @files_doxygen, @files_changelog) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_tab/) { $disable = 1; } if (/FUZZ\: enable check_for_tab/) { $disable = 0; } if ($disable == 0 and /.*\t.*/) { print_error ("$file:$.: found tab"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } sub check_for_trailing_whitespace () { return if is_suppressed (); print "Running trailing_whitespaces check\n"; ITERATION: foreach $file (@files_cpp, @files_inl, @files_h, @files_idl, @files_cdp, @files_pl, @files_generic) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_trailing_whitespace/) { $disable = 1; } if (/FUZZ\: enable check_for_trailing_whitespace/) { $disable = 0; } if ($disable == 0 and /\s\n$/) { print_error ("$file:$.: found trailing whitespace"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for the lack of ACE_OS sub check_for_lack_ACE_OS () { return if is_suppressed (); $OS_NS_arpa_inet_symbols = "inet_addr|inet_aton|inet_ntoa|inet_ntop|inet_pton"; $OS_NS_ctype_symbols = "isalnum|isalpha|iscntrl|isdigit|isgraph|islower|isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper|isblank|isascii|isctype|iswctype"; $OS_NS_dirent_symbols = "closedir|opendir|readdir|readdir_r|rewinddir|scandir|alphasort|seekdir|telldir|opendir_emulation|scandir_emulation|closedir_emulation|readdir_emulation"; $OS_NS_dlfcn_symbols = "dlclose|dlerror|dlopen|dlsym"; $OS_NS_errno_symbols = "last_error|set_errno_to_last_error|set_errno_to_wsa_last_error"; $OS_NS_fcntl_symbols = "fcntl|open"; $OS_NS_math_symbols = "floor|ceil|log2"; $OS_NS_netdb_symbols = "gethostbyaddr|gethostbyaddr_r|gethostbyname|gethostbyname_r|getipnodebyaddr|getipnodebyname|getmacaddress|getprotobyname|getprotobyname_r|getprotobynumber|getprotobynumber_r|getservbyname|getservbyname_r|netdb_acquire|netdb_release"; $OS_NS_poll_symbols = "poll"; $OS_NS_pwd_symbols = "endpwent|getpwent|getpwnam|getpwnam_r|setpwent"; $OS_NS_regex_symbols = "compile|step"; $OS_NS_signal_symbols = "kill|pthread_sigmask|sigaction|sigaddset|sigdelset|sigemptyset|sigfillset|sigismember|signal|sigprocmask|sigsuspend|raise"; $OS_NS_stdio_symbols = "fileno|checkUnicodeFormat|clearerr|cuserid|fclose|fdopen|fflush|fgetc|getc|fgetpos|fgets|flock_adjust_params|flock_init|flock_destroy|flock_rdlock|flock_tryrdlock|flock_trywrlock|flock_unlock|flock_wrlock|fopen|default_win32_security_attributes|default_win32_security_attributes_r|get_win32_versioninfo|get_win32_resource_module|set_win32_resource_module|fprintf|ungetc|fputc|putc|fputs|fread|freopen|fseek|fsetpos|ftell|fwrite|perror|printf|puts|rename|rewind|snprintf|sprintf|tempnam|vsprintf|vsnprintf|asprintf|aswprintf|vasprintf|vaswprintf"; $OS_NS_stdlib_symbols = "_exit|abort|atexit|atof|atol|atoi|atop|bsearch|calloc|exit|free|getenv|getenvstrings|itoa|itoa_emulation|itow_emulation|malloc|mkstemp|mkstemp_emulation|mktemp|setenv|unsetenv|putenv|qsort|rand|rand_r|realloc|realpath|set_exit_hook|srand|strenvdup|strtod|strtol|strtol_emulation|strtoul|strtoul_emulation|strtoll|strtoll_emulation|strtoull|strtoull_emulation|system|getprogname|setprogname"; $OS_NS_string_symbols = "memchr|memchr_emulation|memcmp|memcpy|fast_memcpy|memmove|memset|strcat|strchr|strcmp|strcpy|strcspn|strdup|strdup_emulation|strecpy|strerror|strerror_emulation|strsignal|strlen|strncat|strnchr|strncmp|strncpy|strnlen|strnstr|strpbrk|strrchr|strrchr_emulation|strsncpy|strspn|strstr|strtok|strtok_r|strtok_r_emulation"; $OS_NS_strings_symbols = "strcasecmp|strncasecmp|strcasecmp_emulation"; $OS_NS_stropts_symbols = "getmsg|getpmsg|fattach|fdetach|ioctl|isastream|putmsg|putpmsg"; $OS_NS_sys_mman_symbols = "madvise|mmap|mprotect|msync|munmap|shm_open|shm_unlink"; $OS_NS_sys_msg_symbols = "msgctl|msgget|msgrcv|msgsnd"; $OS_NS_sys_resource_symbols = "getrlimit|getrusage|setrlimit"; $OS_NS_sys_select_symbols = "select"; $OS_NS_sys_sendfile_symbols = "sendfile|sendfile_emulation"; $OS_NS_sys_shm_symbols = "shmat|shmctl|shmdt|shmget"; $OS_NS_sys_socket_symbols = "accept|bind|closesocket|connect|enum_protocols|getpeername|getsockname|getsockopt|join_leaf|listen|recv|recvfrom|recvmsg|recvv|send|sendmsg|sendto|sendv|setsockopt|shutdown|if_nametoindex|if_indextoname|if_nameindex|socket_init|socket_fini|socket|socketpair"; $OS_NS_sys_stat_symbols = "creat|filesize|fstat|lstat|mkdir|mkfifo|stat|umask"; $OS_NS_sys_time_symbols = "gettimeofday"; $OS_NS_sys_uio_symbols = "readv|readv_emulation|writev|writev_emulation"; $OS_NS_sys_utsname_symbols = "uname"; $OS_NS_sys_wait_symbols = "wait|waitpid"; $OS_NS_Thread_symbols = "cleanup_tss|condattr_init|condattr_destroy|cond_broadcast|cond_destroy|cond_init|cond_signal|cond_timedwait|cond_wait|event_destroy|event_init|event_pulse|event_reset|event_signal|event_timedwait|event_wait|lwp_getparams|lwp_setparams|mutex_destroy|mutex_init|mutex_lock|mutex_lock_cleanup|mutex_trylock|mutex_unlock|priority_control|recursive_mutex_cond_unlock|recursive_mutex_cond_relock|recursive_mutex_destroy|recursive_mutex_init|recursive_mutex_lock|recursive_mutex_trylock|recursive_mutex_unlock|rw_rdlock|rw_tryrdlock|rw_trywrlock|rw_trywrlock_upgrade|rw_unlock|rw_wrlock|rwlock_destroy|rwlock_init|sched_params|scheduling_class|sema_destroy|sema_init|sema_post|sema_trywait|sema_wait|semctl|semget|semop|set_scheduling_params|sigtimedwait|sigwait|sigwaitinfo|thr_cancel|thr_cmp|thr_continue|thr_create|thr_equal|thr_exit|thr_getconcurrency|thr_getprio|thr_getspecific_native|thr_getspecific|thr_join|thr_get_affinity|thr_set_affinity|thr_key_detach|thr_key_used|thr_keycreate_native|thr_keycreate|thr_keyfree|thr_kill|thr_min_stack|thr_self|thr_setcancelstate|thr_setcanceltype|thr_setconcurrency|thr_setprio|thr_setspecific_native|thr_setspecific|thr_sigsetmask|thr_suspend|thr_testcancel|thr_yield|thread_mutex_destroy|thread_mutex_init|thread_mutex_lock|thread_mutex_trylock|thread_mutex_unlock|unique_name"; $OS_NS_time_symbols = "asctime|asctime_r|clock_gettime|clock_settime|ctime|ctime_r|difftime|gmtime|gmtime_r|localtime|localtime_r|mktime|nanosleep|readPPCTimeBase|strftime|strptime|strptime_emulation|strptime_getnum|time|timezone|tzset"; $OS_NS_unistd_symbols = "access|alarm|allocation_granularity|argv_to_string|chdir|rmdir|close|dup|dup2|execl|execle|execlp|execv|execve|execvp|fork|fork_exec|fsync|ftruncate|getcwd|getgid|getegid|getopt|getpagesize|getpgid|getpid|getppid|getuid|geteuid|hostname|isatty|lseek|llseek|num_processors|num_processors_online|pipe|pread|pwrite|read|read_n|readlink|sbrk|setgid|setegid|setpgid|setregid|setreuid|setsid|setuid|seteuid|sleep|string_to_argv|swab|sysconf|sysinfo|truncate|ualarm|unlink|write|write_n"; $OS_NS_wchar_symbols = "fgetwc|wcscat_emulation|wcschr_emulation|wcscmp_emulation|wcscpy_emulation|wcscspn_emulation|wcsicmp_emulation|wcslen_emulation|wcsncat_emulation|wcsncmp_emulation|wcsncpy_emulation|wcsnicmp_emulation|wcspbrk_emulation|wcsrchr_emulation|wcsrchr_emulation|wcsspn_emulation|wcsstr_emulation|wslen|wscpy|wscmp|wsncmp|ungetwc"; print "Running ACE_OS check\n"; foreach $file (@files_cpp, @files_inl) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_lack_ACE_OS/) { $disable = 1; } if (/FUZZ\: enable check_for_lack_ACE_OS/) { $disable = 0; } if ($disable == 0) { if($file !~ /.c$/ && $file !~ /S.cpp$/ && $file !~ /S.inl$/ && $file !~ /C.cpp$/ && $file !~ /C.inl$/) { if($file !~ /OS_NS_arpa_inet/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_arpa_inet_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_arpa_inet.h"); } } if($file !~ /OS_NS_ctype/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_ctype_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_ctype.h"); } } if($file !~ /OS_NS_dirent/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_dirent_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_dirent.h"); } } if($file !~ /OS_NS_dlfcn/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_dlfcn_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_dlfcn.h"); } } if($file !~ /OS_NS_errno/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_errno_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_errno.h"); } } if($file !~ /OS_NS_fcntl/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_fcntl_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_fcntl.h"); } } if($file !~ /OS_NS_math/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_math_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_math."); } } if($file !~ /OS_NS_netdb/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_netdb_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_netdb.h"); } } if($file !~ /OS_NS_poll/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_netdb_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_poll.h"); } } if($file !~ /OS_NS_pwd/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_pwd_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_pwd.h"); } } if($file !~ /OS_NS_regex/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_regex_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_regex.h"); } } if($file !~ /OS_NS_signal/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_signal_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_signal.h"); } } if($file !~ /OS_NS_stdlib/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_stdlib_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_stdlib.h"); } } if($file !~ /OS_NS_stdio/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_stdio_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_stdio.h"); } } if($file !~ /OS_NS_string/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_string_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_string.h"); } } if($file !~ /OS_NS_strings/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_strings_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_strings.h"); } } if($file !~ /OS_NS_stropts/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_stropts_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_stropts.h"); } } if($file !~ /OS_NS_sys_mman/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_sys_mman_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_sys_mman.h"); } } if($file !~ /OS_NS_sys_msg/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_sys_msg_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_sys_msg.h"); } } if($file !~ /OS_NS_sys_resource/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_sys_resource_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_sys_resource.h"); } } if($file !~ /OS_NS_sys_select/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_sys_select_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_sys_select.h"); } } if($file !~ /OS_NS_sys_sendfile/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_sys_sendfile_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_sys_sendfile.h"); } } if($file !~ /OS_NS_sys_shm/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_sys_shm_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_sys_shm.h"); } } if($file !~ /OS_NS_sys_socket/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_sys_socket_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_sys_socket.h"); } } if($file !~ /OS_NS_sys_stat/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_sys_stat_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_sys_stat.h"); } } if($file !~ /OS_NS_sys_time/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_sys_time_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_sys_time.h"); } } if($file !~ /OS_NS_sys_uio/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_sys_uio_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_sys_uio.h"); } } if($file !~ /OS_NS_sys_utsname/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_sys_utsname_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_sys_utsname.h"); } } if($file !~ /OS_NS_sys_wait/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_sys_wait_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_sys_wait.h"); } } if($file !~ /OS_NS_Thread/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_Thread_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_Thread.h"); } } if($file !~ /OS_NS_time/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_time_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_time.h"); } } if($file !~ /OS_NS_unistd/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_unistd_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_unistd.h"); } } if($file !~ /OS_NS_wchar/) { if(/(\s+:{0,2}|\(:{0,2}|\s*!:{0,2}|^|\):{0,2})($OS_NS_wchar_symbols)\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: missing ACE_OS use ace/OS_NS_wchar.h"); } } } } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for the use of exception specification, # exception specification has fallen out of favor, and generally # should not be used. sub check_for_exception_spec () { return if is_suppressed (); print "Running exception specification check\n"; foreach $file (@files_cpp, @files_inl, @files_h) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_exception_sepc/) { $disable = 1; } if (/FUZZ\: enable check_for_exception_sepc/) { $disable = 0; } if ($disable == 0) { if(/throw\s*\(\s*\)/) { #next; } elsif(/(^|\s+)throw\s*\(/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: exception specification found"); } } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for the use of NULL, # NULL shouldn't be used, use 0 instead sub check_for_NULL () { return if is_suppressed (); print "Running NULL usage check\n"; foreach $file (@files_cpp, @files_inl, @files_h) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_NULL/) { $disable = 1; } if (/FUZZ\: enable check_for_NULL/) { $disable = 0; } if ($disable == 0) { if(/(\(|\)|\s+|=)NULL(\)|\s+|\;|\,)/ and $` !~ /\/\// and $` !~ /\/\*/ and $` !~ /\*\*+/ and $` !~ /\s+\*+\s+/) { print_error ("$file:$.: NULL found"); } } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for improper main declaration, # the proper form should look like: # int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) sub check_for_improper_main_declaration () { return if is_suppressed (); print "Running Improper main() declaration check\n"; foreach $file (@files_cpp) { if (open (FILE, $file)) { my $disable = 0; my $type_of_main; my $multi_line; my $not_found_end_line_count= 0; print "Looking at file $file\n" if $opt_d; while () { if (!defined $multi_line) { if (/FUZZ\: disable check_for_improper_main_declaration/) { $disable = 1; next; } elsif (/FUZZ\: enable check_for_improper_main_declaration/) { $disable = 0; next; } elsif ($disable == 0) { s/^\s+//; ## Remove leading space s/\s*(\/\/.*)?$//; ## Remove trailing space and line comments if (s/^(?:.*\s)?(main|ACE_TMAIN)\s*//) { $type_of_main = $1; ## main or ACE_TMAIN $multi_line = $_; ## Rest of the line } else { next; } } } else { $_ =~ s/^\s+//; ## Remove leading space $_ =~ s/\s*(\/\/.*)?$//; ## Remove trailling space and line comments if ($multi_line eq "") { ## Append this line to existing statement. $multi_line = $_; } else { $multi_line .= ' ' . $_; } } $multi_line =~ s!^(/+\*.*?\*/\s*)*!!; ## Remove leading /* ... */ comments next if ($multi_line eq ""); ## Must have something after main if ($multi_line !~ m/^\(/) { ## Not a function opening bracket, we will ignore this one ## it is not a main function. undef $multi_line; $not_found_end_line_count = 0; } elsif ($multi_line =~ s/^\(\s*([^\)]*?)\s*\)[^;\{]*?\{//) { $multi_line = $1; ## What was between the main's ( and ) $multi_line =~ s/\s{2,}/ /g; ## Compress white space my $was = $multi_line; $multi_line =~ s!([^/])\*\s([^/])!$1\*$2!g; ## Remove space after * (except around comment) $multi_line =~ s!([^/])\s\[!$1\[!g; ## Remove space before [ (except following comment) $multi_line =~ s!\s?\*/\s?/\*\s?! !g; ## Connect seporate adjacent /* ... */ comments if ($multi_line =~ s!^([^,]*?)\s?,\s?(/+\*.*?\*/\s?)*!!) { # Fails if only 1 parameter (ignore this main) my $arg1 = $1; if ($multi_line =~ s/^(\w[\w\d]*)\s?//) { # Fails if no type for 2nd parameter (ignore this main) my $arg2_type = $1; $multi_line =~ s!^(?:/+\*.*?\*/\s?)?(\**)(\w[\w\d]*|\s?/\*.*?\*/\s?)?!!; my $prefix = $1; ## should be * or ** my $name = $2; ## is now arg2's variable name $multi_line =~ s!\s?\*/\s?/\*\s?! !g; ## Connect seporate adjacent /* ... */ comments ## remove any comment after postfix if ($multi_line =~ s!\s?(/+\*.*?\*/)$!! && $name eq '') { $name = "$1 "; ## Some name argv in comment after [] } ## multi_line now postfix, should be [] if ($type_of_main ne 'ACE_TMAIN' || $arg2_type ne 'ACE_TCHAR' || !(($prefix eq '*' && $multi_line eq '[]') || ($prefix eq '**' && $multi_line eq '' )) ) { print_error ("$file:$.: $type_of_main ($was) should be ACE_TMAIN ($arg1, ACE_TCHAR \*$name\[])"); } } } undef $multi_line; $not_found_end_line_count = 0; } elsif ($not_found_end_line_count < 10) { # Limit the search for ( ... ) following main to ten lines ++$not_found_end_line_count; } else { undef $multi_line; $not_found_end_line_count = 0; } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for the use of "inline" instead of ACE_INLINE sub check_for_inline () { return if is_suppressed (); print "Running inline check\n"; foreach $file (@files_inl) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_inline/) { $disable = 1; } if (/FUZZ\: enable check_for_inline/) { $disable = 0; } if ($disable == 0 and m/^\s*inline/) { print_error ("$file:$.: 'inline' keyword found"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for the inclusion of math.h. math.h should be avoided # since on some platforms, "exceptions" is defined as a struct, which will # cause problems with exception handling sub check_for_math_include () { return if is_suppressed (); print "Running math.h test\n"; foreach $file (@files_h, @files_cpp, @files_inl) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_math_include/) { $disable = 1; } if (/FUZZ\: enable check_for_math_include/) { $disable = 0; } if ($disable == 0 and /^\s*#\s*include\s*(\/\*\*\/){0,1}\s*\/) { print_error ("$file:$.: included"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for the inclusion of streams.h. # // FUZZ: disable check_for_streams_include sub check_for_streams_include () { return if is_suppressed (); print "Running ace/streams.h test\n"; foreach $file (@files_h, @files_cpp, @files_inl) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_streams_include/) { $disable = 1; } if (/FUZZ\: enable check_for_streams_include/) { $disable = 0; } if ($disable == 0 and /^\s*#\s*include\s*\"ace\/streams\.h\"/) { print_error ("$file:$.: expensive ace/streams.h included; consider ace/iosfwd.h"); print " ace/streams.h is very expensive in both "; print "compile-time and footprint. \n"; print " Please consider including ace/iosfwd.h instead.\n\n"; } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for the inclusion of Synch*.h. sub check_for_synch_include () { return if is_suppressed (); print "Running ace/Synch*.h test\n"; foreach $file (@files_h, @files_cpp, @files_inl) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_synch_include/) { $disable = 1; } if (/FUZZ\: enable check_for_synch_include/) { $disable = 0; } if ($disable == 0 and (/^\s*#\s*include\s*\"(ace\/Synch\.h)\"/ or /^\s*#\s*include\s*\"(ace\/Synch_T\.h)\"/)) { my $synch = $1; print_error ("$file:$.: expensive $synch included; consider individual synch file"); print " $synch is very expensive in both "; print "compile-time and footprint. \n"; print " Please consider including one of the "; print "individual synch files instead.\n\n"; } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # For general readability, lines should not contain more than 80 characters sub check_for_line_length () { return if is_suppressed (); print "Running line length test\n"; foreach $file (@files_h, @files_cpp, @files_inl) { if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; while () { # Make sure to ignore ACE_RCSID lines, since they # are difficult to get under 80 chars. if (/.{80,}/ and !/^ACE_RCSID/) { print_error ("$file:$.: line longer than 80 chars"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # For preprocessor directives, only the old C style comments (/* */) # should be used, not the newer // style. sub check_for_preprocessor_comments () { return if is_suppressed (); print "Running preprocessor comment test\n"; foreach $file (@files_h, @files_cpp, @files_inl) { if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; while () { if (/^\#.*\/\//) { print_error ("$file:$.: C++ comment in directive"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # We should not have empty files in the repo sub check_for_empty_files () { return if is_suppressed (); print "Running empty file test\n"; foreach $file (@files_inl, @files_cpp, @files_rb) { my $found_non_empty_line = 0; if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; while () { next if /^[[:blank:]]*$/; # skip empty lines next if /^[[:blank:]]*\/\//; # skip C++ comments next if /^[[:blank:]]*\/\*/; # skip C++ comments $found_non_empty_line = 1; last; } close (FILE); if ($found_non_empty_line == 0) { print_error ("$file:1: empty file should not be in the repository"); } } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for the use of the Win32 Unicode string defines # or outdated ASYS_* macros # We should only be using the ACE_TCHAR, ACE_TEXT macros instead. sub check_for_tchar { return if is_suppressed (); print "Running TCHAR test\n"; foreach $file (@files_h, @files_cpp, @files_inl) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_tchar/) { $disable = 1; } if (/FUZZ\: enable check_for_tchar/) { $disable = 0; } if ($disable == 0) { if (/LPTSTR/) { print_error ("$file:$.: LPTSTR found"); } if (/LPCTSTR/) { print_error ("$file:$.: LPCTSTR found"); } if (/ASYS_TCHAR/) { print_error ("$file:$.: ASYS_TCHAR found"); } elsif (/TCHAR/ and !/ACE_TCHAR/) { ### Do a double check, since some macros do have TCHAR ### (like DEFAULTCHARS) if (/^TCHAR[^\w_]/ or /[^\w_]TCHAR[^\w_]/) { print_error ("$file:$.: TCHAR found"); } } if (/ASYS_TEXT/) { print_error ("$file:$.: ASYS_TEXT found"); } elsif (/TEXT/ and !/ACE_TEXT/) { ### Do a double check, since there are several macros ### that end with TEXT if (/^TEXT\s*\(/ or /[^\w_]TEXT\s*\(/) { print_error ("$file:$.: TEXT found"); } } } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This checks to see if Makefiles define a DEPENDENCY_FILE, and if they do # whether or not it's in the cvs repo. sub check_for_dependency_file () { return if is_suppressed (); print "Running DEPENDENCY_FILE test\n"; foreach $file (@files_makefile) { if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; while () { if (/^DEPENDENCY_FILE\s* =\s*(.*)/) { my $depend = $1; my $path = $file; $path =~ s/\/GNUmakefile.*/\//; $depend = $path . $depend; unless (open (DFILE, $depend)) { print_error ("DEPENDENCY_FILE \"$depend\" not found"); print " Either add \"$depend\" to svn "; print "or remove DEPENDENCY_FILE variable\n"; print " from $file\n\n"; } close (DFILE); } } close (FILE); } else { print_error ("cannot open $file"); } } } # This checks to see if GNUmakefiles define a MAKEFILE, and if it matches the # name of the GNUmakefile sub check_for_makefile_variable () { return if is_suppressed (); print "Running MAKEFILE variable test\n"; foreach $file (@files_makefile) { if (!(substr($file,-4) eq ".bor") and !(substr($file,-3) eq ".am") and !(substr($file,-4) eq ".vac") and !(substr($file,-4) eq ".alt")) { if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; my $makevarfound = 0; my $filename = basename($file,""); while () { if (/^MAKEFILE\s*=\s*(.*)/) { $makevarfound = 1; $makevar = $1; if (!($makevar eq $filename)) { print_error ("$file:$.: MAKEFILE variable $makevar != $filename"); print " Change MAKEFILE = $filename in $file.\n\n"; } } } if ($makevarfound == 0 and !($filename eq "GNUmakefile")) { print_error ("$file:$.: MAKEFILE variable missing in $file"); print " Add MAKEFILE = $filename to the top of $file.\n\n"; } close (FILE); } else { print_error ("cannot open $file"); } } } } # This checks to make sure files include ace/post.h if ace/pre.h is included # and vice versa. sub check_for_pre_and_post () { return if is_suppressed (); print "Running pre.h/post.h test\n"; foreach $file (@files_h) { my $pre = 0; my $post = 0; if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_pre_and_post/) { $disable = 1; } if (/FUZZ\: enable check_for_pre_and_post/) { $disable = 0; } if ($disable == 0) { if (/^\s*#\s*include\s*\"ace\/pre\.h\"/) { print_error ("$file:$.: pre.h missing \"/**/\""); ++$pre; } if (/^\s*#\s*include\s*\s*\"ace\/post\.h\"/) { print_error ("$file:$.: post.h missing \"/**/\""); ++$post; } if (/^\s*#\s*include\s*\/\*\*\/\s*\"ace\/pre\.h\"/) { ++$pre; } if (/^\s*#\s*include\s*\/\*\*\/\s*\"ace\/post\.h\"/) { ++$post; } } } close (FILE); if ($disable == 0 && $pre != $post) { print_error ("$file:1: pre.h/post.h mismatch"); } } else { print STDERR "Error: Could not open $file\n"; } } } # This test verifies that the same number of "#pragma warning(push)" and # "#pragma warning(pop)" pragmas are used in a given header. sub check_for_push_and_pop () { return if is_suppressed (); print "Running #pragma (push)/(pop) test\n"; foreach $file (@files_h) { my $push_count = 0; my $pop_count = 0; if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_push_and_pop/) { $disable = 1; } if (/FUZZ\: enable check_for_push_and_pop/) { $disable = 0; } if ($disable == 0) { if (/^\s*#\s*pragma\s*warning\s*\(\s*push[,1-4]*\s*\)/) { ++$push_count; } if (/^\s*#\s*pragma\s*warning\s*\(\s*pop\s*\)/) { ++$pop_count; } } } close (FILE); if ($disable == 0 && $push_count != $pop_count) { print_error ("$file: #pragma warning(push)/(pop) mismatch"); } } else { print STDERR "Error: Could not open $file\n"; } } } # This test verifies that the same number of # "ACE_VERSIONED_NAMESPACE_BEGIN_DECL" and # "ACE_END_VERSIONED_NAMESPACE_DECL" macros are used in a given # source file. sub check_for_versioned_namespace_begin_end () { return if is_suppressed (); print "Running versioned namespace begin/end test\n"; foreach $file (@files_cpp, @files_inl, @files_h) { my $begin_count = 0; my $end_count = 0; if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; while () { if (/^\s*\w+_BEGIN_VERSIONED_NAMESPACE_DECL/) { ++$begin_count; } if (/^\s*\w+_END_VERSIONED_NAMESPACE_DECL/) { ++$end_count; } if ($begin_count > $end_count and /^\s*#\s*include(\s*\/\*\*\/)?\s*"/) { print_error ("$file:$.: #include directive within Versioned namespace block"); } } close (FILE); if ($begin_count != $end_count) { print_error ("$file: Versioned namespace begin($begin_count)/end($end_count) mismatch"); } } else { print STDERR "Error: Could not open $file\n"; } } } # Check doxygen @file comments sub check_for_mismatched_filename () { return if is_suppressed (); print "Running doxygen \@file test\n"; foreach $file (@files_h, @files_cpp, @files_inl, @files_idl) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (m/\@file\s*([^\s]+)/){ # $file includes complete path, $1 is the name after # @file. We must check whether the last part of $file # is equal to $1 if ($file !~ /$1$/) { print_error ("$file:$.: \@file mismatch in $file, found $1"); } } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # check for bad run_test sub check_for_bad_run_test () { return if is_suppressed (); print "Running run_test.pl test\n"; foreach $file (@files_run_pl) { if (open (FILE, $file)) { my $is_run_test = 0; my $sub = 0; if (($file =~ /.*TAO\/examples\/Advanced.*/)) { next ITERATION; } if (($file =~ /.*TAO\/orbsvcs\/examples\/Security\/Send_File.*/)) { next ITERATION; } print "Looking at file $file\n" if $opt_d; while () { if (m/PerlACE/ || m/ACEutils/) { $is_run_test = 1; } if ($is_run_test == 1) { if (m/ACEutils/) { print_error ("$file:$.: ACEutils.pm still in use"); } if (m/unshift \@INC/) { print_error ("$file:$.: unshifting \@INC; use \"use lib\""); } if (m/\$EXEPREFIX/) { print_error ("$file:$.: using \$EXEPREFIX"); } if (m/\$EXE_EXT/) { print_error ("$file:$.: using \$EXE_EXT"); } if (m/Sys::Hostname/) { print_error ("$file:$.: using Sys::Hostname"); } if (m/PerlACE::wait_interval_for_process_creation/) { print_error ("$file:$.: using PerlACE::wait_interval_for_process_creation"); } if (m/PerlACE::waitforfile_timed/) { print_error ("$file:$.: using PerlACE::waitforfile_timed"); } if (m/PerlACE::is_vxworks_test/) { print_error ("$file:$.: using PerlACE::is_vxworks_test"); } if (m/PerlACE::add_lib_path/) { print_error ("$file:$.: using PerlACE::add_lib_path, use AddLibPath on the target"); } if (m/PerlACE::Run_Test/) { print_error ("$file:$.: using PerlACE::Run_Test, use PerlACE::TestTarget"); } if (m/PerlACE::random_port/) { print_error ("$file:$.: using PerlACE::random_port, use TestTarget::random_port"); } if (m/PerlACE::Process/) { print_error ("$file:$.: using PerlACE::Process"); } if (m/PerlACE::TestConfig/) { print_error ("$file:$.: using PerlACE::TestConfig"); } if (m/ACE_RUN_VX_TGTHOST/) { print_error ("$file:$.: using ACE_RUN_VX_TGTHOST, use TestTarget::HostName"); } if (m/Spawn(Wait(Kill)?)?\s*\(.+\->ProcessStop.*\)/) { print_error ("$file:$.: uses Stop together with Spawn"); } if (m/Spawn(Wait(Kill)?)?\s*\(\d+\)/) { print_error ("$file:$.: uses hardcoded timeout for Spawn"); } if (m/Kill\s*\(\d+\)/) { print_error ("$file:$.: uses hardcoded timeout for Kill"); } if (m/unlink/) { print_error ("$file:$.: using unlink"); } if (m/PerlACE::LocalFile/) { print_error ("$file:$.: using PerlACE::LocalFile"); } if (m/\$DIR_SEPARATOR/) { print_error ("$file:$.: using \$DIR_SEPARATOR"); } if (m/ACE\:\:/ && !m/PerlACE\:\:/) { print_error ("$file:$.: using ACE::*"); } if (m/Process\:\:/ && !m/PerlACE\:\:Process\:\:/) { print_error ("$file:$.: using Process::*"); } if (m/Process\:\:Create/) { print_error ("$file:$.: using Process::Create"); } if (m/^ [^ ]/) { print_warning ("$file:$.: using two-space indentation"); } if (m/^\s*\t/) { print_error ("$file:$.: Indenting using tabs"); } if (m/^\s*\{/ && $sub != 1) { print_warning ("$file:$.: Using Curly Brace alone"); } if (m/timedout/i && !m/\#/) { print_error ("$file:$.: timedout message found"); } if (m/^\s*sub/) { $sub = 1; } else { $sub = 0; } } } close (FILE); if ($is_run_test) { my @output = `perl -wc $file 2>&1`; foreach $output (@output) { chomp $output; if ($output =~ m/error/i) { print_error ($output); } elsif ($output !~ m/syntax OK/) { print_warning ($output); } } } } } } # Check for links to ~schmidt/ACE_wrappers/, which should not be in the # documentation sub check_for_absolute_ace_wrappers() { return if is_suppressed (); print "Running absolute ACE_wrappers test\n"; foreach $file (@files_html) { if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; while () { if (m/\~schmidt\/ACE_wrappers\//) { chomp; print_error ("$file:$.: ~schmidt/ACE_wrappers found"); print_error ($_); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # Check for generated headers in the code documentation sub check_for_generated_headers() { return if is_suppressed (); print "Running generated headers test\n"; foreach $file (@files_cpp, @files_inl, @files_h) { if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; while () { if (m/Code generated by the The ACE ORB \(TAO\) IDL Compiler/) { chomp; print_error ("$file:$.: header found"); print_error ($_); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } sub check_for_numeric_log() { return if is_suppressed (); print "Running check for numeric flags in DAnCE and DDS4CCM\n"; foreach $file (@files_inl, @files_cpp, @files_h) { if (open (FILE, $file)) { while () { # look for debug statements if (m/DANCE_DEBUG\s*\(\s*\d*\s*,/) { print_warning ("$file:$.: Found numeric log level in debug statement"); } if (m/DANCE_ERROR\s*\(\s*\d\s*,/) { print_warning ("$file:$.: Found numeric log level in error statement"); } if (m/DANCE_TRACE_LOG\s*\(\s*\d\s*,/) { print_warning ("$file:$.: Found numeric log level in trace log statement"); } if (m/DDS4CCM_DEBUG\s*\(\s*\d*\s*,/) { print_warning ("$file:$.: Found numeric log level in debug statement"); } if (m/DDS4CCM_ERROR\s*\(\s*\d\s*,/) { print_warning ("$file:$.: Found numeric log level in error statement"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # Make sure ACE_[OS_]TRACE matches the function/method sub check_for_bad_ace_trace() { return if is_suppressed (); print "Running TRACE test\n"; foreach $file (@files_inl, @files_cpp) { if (open (FILE, $file)) { my $class; my $function; print "Looking at file $file\n" if $opt_d; while () { # look for methods or functions if (m/(^[^\s][^\(]*)\:\:([^\:^\(]*[^\s^\(])\s*/) { $class = $1; $function = $2; } elsif (m/^([^\s^\(^\#]*) \(/i) { $class = ""; $function = $1; } elsif (m/^(operator.*) \(/i) { $class = ""; $function = $1; } elsif (m/^class (.*)\s*:/) { $class = $1; $function = ""; } elsif (m/^class (.*)\s*$/) { $class = $1; $function = ""; } # print "TRACE_CHECK. Class = $class\n"; # Look for TRACE statements if (m/ACE_OS_TRACE\s*\(\s*\"(.*)\"/ || m/ACE_TRACE\s*\(\s*\"(.*)\"/ || m/CIAO_TRACE\s*\(\s*\"(.*)\"/ || m/DANCE_TRACE\s*\(\s*\"(.*)\"/ || m/DDS4CCM_TRACE\s*\(\s*\"(.*)\"/) { my $trace = $1; # reduce the classname if ($class =~ m/([^\s][^\<^\s]*)\s*\) { next if m/^\s*\/\//; next if m/^\s*$/; # Check for backslashes in paths. if (m/\*.*\\[^ ]*:/) { print_error ("$file:$.: Backslashes in file path"); } # Check for svn conflict tags if (m/^<<<<>>>>/) { print_error ("$file:$.: svn conflict markers"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } sub check_for_deprecated_macros () { return if is_suppressed (); ## Take the current working directory and remove everything up to ## ACE_wrappers (or ACE for the peer-style checkout). This will be ## used to determine when the use of ACE_THROW_SPEC is an error. my($cwd) = getcwd(); if ($cwd =~ s/.*(ACE_wrappers)/$1/) { } elsif ($cwd =~ s/.*(ACE)/$1/) { } print "Running deprecated macros check\n"; foreach $file (@files_cpp, @files_inl, @files_h) { if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; while () { if (/ACE_THROW_SPEC/) { ## Do not use ACE_THROW_SPEC in TAO or CIAO. if ($file =~ /TAO|CIAO/i || $cwd =~ /TAO|CIAO/i) { print_error ("$file:$.: ACE_THROW_SPEC found."); } } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for ptr_arith_t usage in source code. ptr_arith_t # is non-portable. Use ptrdiff_t instead. sub check_for_ptr_arith_t () { return if is_suppressed (); print "Running ptr_arith_t check\n"; foreach $file (@files_cpp, @files_inl, @files_h) { if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; while () { next if m/^\s*\/\//; # Ignore C++ comments. next if m/^\s*$/; # Skip lines only containing # whitespace. # Check for ptr_arith_t usage. This test should # ignore typedefs, and should only catch variable # declarations and parameter types. if (m/ptr_arith_t / || m/ptr_arith_t,/) { print_error ("$file:$.: ptr_arith_t; use ptrdiff_t instead."); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for the #include # This check is suggested by Don Hinton to force user to use # " " instead of <> to avoid confict with Doxygen. sub check_for_include () { return if is_suppressed (); print "Running the include check\n"; foreach $file (@files_h, @files_cpp, @files_inl, @files_idl) { my $bad_occurance = 0; if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_include/) { $disable = 1; } if (/FUZZ\: enable check_for_include/) { $disable = 0; } if ($disable == 0) { if (/^\s*#\s*include\s*<[(ace)|(TAO)|(CIAO)]\/.*>/) { print_error ("$file:$.: include used"); ++$bad_occurance; } if (/^\s*#\s*include\s*/) { print_error ("$file:$.: include used"); ++$bad_occurance; } if (/^\s*#\s*include\s*/) { print_error ("$file:$.: include used"); ++$bad_occurance; } } } close (FILE); if ($disable == 0 && $bad_occurance > 0 ) { print_error ("$file:1: found $bad_occurance usage(s) of #include <> of ace\/tao\/ciao."); } } else { print STDERR "Error: Could not open $file\n"; } } } # This test verifies that all equality, relational and logical # operators return bool, as is the norm for modern C++. # # NOTE: This test isn't fool proof yet. sub check_for_non_bool_operators () { return if is_suppressed (); print "Running non-bool equality, relational and logical operator check\n"; foreach $file (@files_h, @files_inl, @files_cpp) { if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; my $found_bool = 0; my $found_return_type = 0; while () { if ($found_bool == 0 && (/[^\w]bool\s*$/ || /^bool\s*$/ || /\sbool\s+\w/ || /^bool\s+\w/ || /[^\w]return\s*$/)) { $found_bool = 1; $found_return_type = 0; next; } if ($found_bool == 0 && $found_return_type == 0 && /^(?:\w+|\s+\w+)\s*$/ && !/[^\w]return\s*$/) { $found_return_type = 1; $found_bool = 0; next; } if ($found_bool == 0 && /(?\s*::)operator\s*(?:!|<|<=|>|>=|==|!=|&&|\|\|)\s*\(/ && !/\(.*operator\s*(?:!|<|<=|>|>=|==|!=|&&|\|\|)\s*\(/ && !/^\s*return\s+/) { print_error ("$file:$.: non-bool return type for operator"); } $found_return_type = 0; $found_bool = 0; } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test verifies that all filenames are short enough sub check_for_long_file_names () { return if is_suppressed (); my $max_filename = 50; my $max_mpc_projectname = $max_filename - 12; ## GNUmakefile.[project_name] print "Running file names check\n"; foreach $file (@files_cpp, @files_inl, @files_h, @files_html, @files_dsp, @files_dsw, @files_gnu, @files_idl, @files_pl, @files_changelog, @files_makefile, @files_bor, @files_mpc, @files_generic) { if ( length( basename($file) ) >= $max_filename ) { print_error ("File name $file meets or exceeds $max_filename chars."); } } foreach $file (grep(/\.mpc$/, @files_mpc)) { if (open(FH, $file)) { my($blen) = length(basename($file)) - 4; ## .mpc while() { if (/project\s*(:.*)\s*{/) { if ($blen >= $max_mpc_projectname) { print_warning ("File name $file meets or exceeds $max_mpc_projectname chars."); } } elsif (/project\s*\(([^\)]+)\)/) { my($name) = $1; if ($name =~ /\*/) { my($length) = length($name) + (($name =~ tr/*//) * $blen); if ($length >= $max_mpc_projectname) { print_warning ("Project name ($name) from $file will meet or exceed $max_mpc_projectname chars when expanded by MPC."); } } else { if (length($name) >= $max_mpc_projectname) { print_warning ("Project name ($name) from $file meets or exceeds $max_mpc_projectname chars."); } } } } close(FH); } } } sub check_for_refcountservantbase () { return if is_suppressed (); print "Running PortableServer::RefCountServantBase derivation check\n"; foreach $file (@files_h, @files_cpp, @files_inl) { if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; while () { if (/PortableServer::RefCountServantBase/) { print_error ("$file:$.: reference to deprecated PortableServer::RefCountServantBase"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } sub check_for_old_documentation_style () { return if is_suppressed (); print "Running documentation style check\n"; foreach $file (@files_h, @files_cpp, @files_inl) { if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; while () { if (/\/\/\s*\= TITLE/) { print_error ("$file:$.: found old documentation style // = TITLE"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } sub check_for_TAO_Local_RefCounted_Object () { return if is_suppressed (); print "Running TAO_Local_RefCounted_Object check\n"; ITERATION: foreach $file (@files_h, @files_cpp, @files_inl) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_TAO_Local_RefCounted_Object/) { $disable = 1; } if (/FUZZ\: enable check_for_TAO_Local_RefCounted_Object/) { $disable = 0; } if ($disable == 0 and /TAO_Local_RefCounted_Object/) { print_error ("$file:$.: TAO_Local_RefCounted_Object is deprecated, use CORBA::LocalObject instead"); } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for the correct use of ORB_init() so as # to be compatible with wide character builds. sub check_for_ORB_init () { return if is_suppressed (); print "Running the ORB_init() wide character incompatibility check\n"; foreach $file (@files_cpp, @files_inl) { if (open (FILE, $file)) { my $disable = 0; my $multi_line; my $not_found_end_line_count= 0; print "Looking at file $file\n" if $opt_d; while () { if (!defined $multi_line) { if (/FUZZ\: disable check_for_ORB_init/) { $disable = 1; next; } elsif (/FUZZ\: enable check_for_ORB_init/) { $disable = 0; next; } elsif ($disable == 0) { s/^\s+//; ## Remove leading space s/\s*(\/\/.*)?$//; ## Remove trailling space and line comments if (s/^([^=]*=)?\s*(CORBA\s*::\s*)?ORB_init\s*//) { $multi_line = $_; ## Rest of the line } else { next; } } } else { $_ =~ s/^\s+//; ## Remove leading space $_ =~ s/\s*(\/\/.*)?$//; ## Remove trailling space and line comments if ($multi_line eq "") { ## Append this line to existing statement. $multi_line = $_; } else { $multi_line .= ' ' . $_; } } my $testing = $multi_line; if ($testing =~ s/^\(([^\"\/\)]*(\"([^\"\\]*(\\.)*)\")?(\/+\*.*?\*\/\s*)*)*\)//) { # $testing has thrown away what we actually want, i.e. # we want to ignore what's left in $testing. $multi_line = substr ($multi_line, 0, -length ($testing)); $multi_line =~ s!/\*.*?\*/! !g; ## Remove any internal /* ... */ comments $multi_line =~ s!\s{2,}! !g; ## collapse multi spaces $multi_line =~ s/^\(\s*//; ## Trim leading ( and space $multi_line =~ s/\s*\)$//; ## Trim trailing space and ) if ($multi_line =~ s/^[^,]*,\s*//) { # If this fails there is only 1 parameter (which we will ignore) # 1st parameter has been removed by the above, split up remaining 2 & 3 $multi_line =~ s/^([^,]*),?\s*//; my $param2 = $1; $param2 =~ s/\s+$//; # Trim trailing spaces print_error ("$file:$.: ORB_init() 2nd parameter requires static_cast(0)") if ($param2 eq '0'); print_error ("$file:$.: ORB_init() 3rd parameter is redundant (default orbID or give as string)") if ($multi_line eq '0'); print_error ("$file:$.: ORB_init() 3rd parameter is redundant (default orbID already \"\")") if ($multi_line eq '""'); } undef $multi_line; $not_found_end_line_count = 0; } elsif ($not_found_end_line_count < 10) { # Limit the search for ( ... ) following ORB_init to ten lines ++$not_found_end_line_count; } else { undef $multi_line; $not_found_end_line_count = 0; } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } # This test checks for the presence of an include for ace/OS.h # which should never occur. Only user code is allowed to include OS.h. sub check_for_include_OS_h () { return if is_suppressed (); print "Running the OS.h inclusion check\n"; foreach $file (@files_h, @files_cpp, @files_inl) { if (open (FILE, $file)) { my $disable = 0; print "Looking at file $file\n" if $opt_d; while () { if (/FUZZ\: disable check_for_include_OS_h/) { $disable = 1; next; } elsif (/FUZZ\: enable check_for_include_OS_h/) { $disable = 0; next; } elsif ($disable == 0 and /^\s*#\s*include\s*<[(ace)|(TAO)|(CIAO)]\/.*>/) { print_error ("$file:$.: include used"); } else { if ($disable == 0 and /^\s*#\s*include\s*"ace\/OS.h"/) { print_error ("$file:$.: include ace/OS.h used"); } } } close (FILE); } else { print STDERR "Error: Could not open $file\n"; } } } sub check_for_ace_log_categories () { return if is_suppressed (); print "Running the ACE log categories check\n"; my @macros = qw/HEX_DUMP ERROR ERROR_RETURN ERROR_BREAK DEBUG/; my $macros = join ('|', @macros); for my $f (@files_h, @files_cpp, @files_inl) { my $cat = 'ACE'; $f =~ s!\\!/!g; if ($f =~ /\bace\/(\w+)/) { next if $1 eq 'Log_Msg' || $` =~ /\/protocols\/$/; $cat = 'ACELIB'; } elsif ($f =~ /tao\// && $f !~ /interop-tests\//) { $cat = 'TAOLIB'; } elsif ($f =~ /\/orbsvcs\// && $f !~ /tests|examples/i) { $cat = 'ORBSVCS'; } elsif ($f =~ /CIAO\// || $f =~ /DAnCE\//) { next; } elsif ($f =~ /tests\/Log_Msg_Test\.cpp/) { next; } if (open (IN, $f)) { print "Looking at file $f for category $cat\n" if $opt_d; my $disable = 0; while () { if (/FUZZ: disable check_for_ace_log_categories/) { $disable = 1; next; } elsif (/FUZZ: enable check_for_ace_log_categories/) { $disable = 0; next; } elsif ($disable == 0 && /\b(ACE|ACELIB|TAOLIB|ORBSVCS)_($macros)\b/g && $1 ne $cat) { print_error ("$f:$.: found log macro $1_$2, " . "expecting ${cat}_$2"); } } close IN; } else { print STDERR "Error: Could not open $f\n"; } } } ############################################################################## use vars qw/$opt_c $opt_d $opt_x $opt_h $opt_l $opt_t $opt_s $opt_m/; if (!getopts ('cdx:hl:t:s:mv') || $opt_h) { print "fuzz.pl [-cdhm] [-l level] [-t test_names] [file1, file2, ...]\n"; print "\n"; print " -c only look at the files passed in\n"; print " -d turn on debugging\n"; print " -x specify comma-separated list of path masks\n"; " (regex) to exclude\n"; print " -h display this help\n"; print " -l level set detection level (default = 5)\n"; print " -t test_names specify comma-separated list of tests to run\n". " this will disable the run level setting\n"; print " -s test_names specify comma-separated list of tests to suppress\n". " this will supplement the run level setting\n"; print " -m only check locally modified files (uses svn)\n"; print "======================================================\n"; print "list of the tests that could be run or suppressed:\n"; print < 0) ? 1 : 0; } if ($opt_s) { my @tests = split '\s*,\s*', $opt_s; for my $test (@tests) { $suppressed_tests{$test} = 1; } } print "--------------------Configuration: Fuzz - Level ",$opt_l, "--------------------\n"; check_for_export_file () if ($opt_l >= 4); check_for_trailing_whitespace () if ($opt_l >= 4); check_for_lack_ACE_OS () if ($opt_l >= 6); check_for_ACE_Guard () if ($opt_l >= 1); check_for_generated_headers () if ($opt_l >= 6); check_for_bad_run_test () if ($opt_l >= 5); check_for_deprecated_macros () if ($opt_l >= 1); check_for_refcountservantbase () if ($opt_l >= 1); check_for_msc_ver_string () if ($opt_l >= 3); check_for_empty_files () if ($opt_l >= 1); check_for_noncvs_files () if ($opt_l >= 1); check_for_streams_include () if ($opt_l >= 6); check_for_dependency_file () if ($opt_l >= 1); check_for_makefile_variable () if ($opt_l >= 1); check_for_inline_in_cpp () if ($opt_l >= 2); check_for_id_string () if ($opt_l >= 1); check_for_newline () if ($opt_l >= 1); check_for_ACE_Thread_Mutex () if ($opt_l >= 1); check_for_ACE_SYNCH_MUTEX () if ($opt_l >= 1); check_for_tab () if ($opt_l >= 1); check_for_exception_spec () if ($opt_l >= 1); check_for_NULL () if ($opt_l >= 1); check_for_inline () if ($opt_l >= 2); check_for_math_include () if ($opt_l >= 3); check_for_synch_include () if ($opt_l >= 6); check_for_line_length () if ($opt_l >= 8); check_for_preprocessor_comments () if ($opt_l >= 7); check_for_tchar () if ($opt_l >= 4); check_for_pre_and_post () if ($opt_l >= 4); check_for_push_and_pop () if ($opt_l >= 4); check_for_versioned_namespace_begin_end () if ($opt_l >= 4); check_for_mismatched_filename () if ($opt_l >= 2); check_for_absolute_ace_wrappers () if ($opt_l >= 3); check_for_bad_ace_trace () if ($opt_l >= 4); check_for_changelog_errors () if ($opt_l >= 4); check_for_ptr_arith_t () if ($opt_l >= 4); check_for_include () if ($opt_l >= 5); check_for_non_bool_operators () if ($opt_l > 2); check_for_long_file_names () if ($opt_l >= 1); check_for_improper_main_declaration () if ($opt_l >= 1); check_for_TAO_Local_RefCounted_Object () if ($opt_l >= 1); check_for_include_OS_h () if ($opt_l >= 1); check_for_numeric_log () if ($opt_l >= 3); check_for_ORB_init () if ($opt_l >= 1); check_for_old_documentation_style () if ($opt_l >= 6); check_for_ace_log_categories () if ($opt_l >= 5); print "\nfuzz.pl - $errors error(s), $warnings warning(s)\n"; exit (1) if $errors > 0; ace-6.4.5+dfsg.orig/bin/mpc-mode.el0000644000175000017500000001601313154167357015070 0ustar tggtgg;;; mpc-mode.el --- Makefile Project Creator mode for Emacs ;; Author: Jules Colding ;; Maintainer: Jules Colding ;; Keywords: languages, faces, mpc ;; Copyright (C) 2008 Jules Colding ;; ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;; A major mode for editing MPC input. Please see: ;; ;; http://downloads.ociweb.com/MPC/MakeProjectCreator.pdf ;; ;; Derived from autoconf-mode.el by Martin Buchholz (martin@xemacs.org) ;; Many thanks to the follwing kind people for extensions, bugfixes and ;; other contributions: ;; ;; * William R. Otte ;; Indentation and syntax table. ;; ;; Put this file somewhere in your emacs load path and add the following ;; to your Emacs configuration file: ;; ;; (require 'mpc-mode) ;; ;; ;; You may also add something like this to the top of your MPC files ;; to force a specific indentation mode: ;; ;; // -*- Mode: MPC; tab-width: 2; indent-tabs-mode: t; -*- ;;; Code: (require 'font-lock) (defvar mpc-mode-hook nil) (defvar mpc-mode-map (let ((mpc-mode-map (make-sparse-keymap))) (define-key mpc-mode-map '[(control c) (control c)] 'comment-region) (define-key mpc-mode-map '[(control j)] 'newline-and-indent) mpc-mode-map) "Keymap for MPC major mode") (defvar mpc-font-lock-keywords `( ("\\(project\\)" 1 font-lock-warning-face t) ("\\(workspace\\)" 1 font-lock-warning-face t) ("(\\([^()]*\\))" 1 font-lock-constant-face t) ("\\(IDL_Files\\)" 1 font-lock-keyword-face t) ("\\(Source_Files\\)" 1 font-lock-keyword-face t) ("\\(Header_Files\\)" 1 font-lock-keyword-face t) ("\\(Inline_Files\\)" 1 font-lock-keyword-face t) ("\\(Template_Files\\)" 1 font-lock-keyword-face t) ("\\(Resource_Files\\)" 1 font-lock-keyword-face t) ("\\(Pkgconfig_Files\\)" 1 font-lock-keyword-face t) ("\\(exclude\\)" 1 font-lock-type-face t) ("\\(custom_only\\)" 1 font-lock-type-face t) ("\\(cmdline\\)" 1 font-lock-type-face t) ("\\(avoids\\)" 1 font-lock-type-face t) ("\\(exename\\)" 1 font-lock-type-face t) ("\\(install =\\)" 1 font-lock-type-face t) ("\\(install +=\\)" 1 font-lock-type-face t) ("\\(install -=\\)" 1 font-lock-type-face t) ("\\(libs\\)" 1 font-lock-type-face t) ("\\(lit_libs\\)" 1 font-lock-type-face t) ("\\(linkflags\\)" 1 font-lock-type-face t) ("\\(specific\\)" 1 font-lock-type-face t) ("\\(macros\\)" 1 font-lock-type-face t) ("\\(after\\)" 1 font-lock-type-face t) ("\\(libout\\)" 1 font-lock-type-face t) ("\\(libpaths\\)" 1 font-lock-type-face t) ("\\(includes\\)" 1 font-lock-type-face t) ("\\(automatic\\)" 1 font-lock-type-face t) ("\\(command\\)" 1 font-lock-type-face t) ("\\(output_option\\)" 1 font-lock-type-face t) ("\\(header_pre_extension\\)" 1 font-lock-type-face t) ("\\(header_outputext\\)" 1 font-lock-type-face t) ("\\(sharedname\\)" 1 font-lock-type-face t) ("\\(dynamicflags\\)" 1 font-lock-type-face t) ("\\(idlflags\\)" 1 font-lock-type-face t) ("\\(:\\)" 1 font-lock-builtin-face t) ("\\( = \\)" 1 font-lock-builtin-face t) ("\\(+=\\)" 1 font-lock-builtin-face t) ("\\(-=\\)" 1 font-lock-builtin-face t) ("\\(//\\)" 1 font-lock-comment-face t) ("\\//\\(.*\\)" 1 font-lock-comment-face t) "default font-lock-keywords") ) ;; Indenting logic (defun mpc-indent-line () "Indent current line as MPC directives" (interactive) (beginning-of-line) (if (bobp) (indent-line-to 0) ; if we are at start of file, zero indent (let ((not-found-hint t) cur-indent (close-brace nil)) (save-excursion ; otherwise, we are not looking at a }, so we need to go back to find the (if (looking-at ".*}") (setq close-brace t)) (while not-found-hint ; nearest indentation hint (forward-line -1) (if (looking-at ".*{") (progn (setq cur-indent (+ (current-indentation) tab-width)) (setq not-found-hint nil)) (if (looking-at ".*}") (progn (setq cur-indent (current-indentation)) (if (< cur-indent 0) (setq cur-indent 0)) (setq not-found-hint nil)) (if (bobp) (setq not-found-hint nil)))))) (if close-brace (setq cur-indent (- cur-indent tab-width))) (if cur-indent (indent-line-to cur-indent) (indent-line-to 0)))) ) ;; Create a syntax table. Derived from fundamental mode, it will automatically ;; highlight strings, and behave correctly on most words. (defvar mpc-mode-syntax-table nil "syntax table used in mpc mode") (setq mpc-mode-syntax-table (make-syntax-table)) (modify-syntax-entry ?_ "w" mpc-mode-syntax-table) ; underscore is a valid part of a word (modify-syntax-entry ?- "w" mpc-mode-syntax-table) ; hyphen is a valid part of a word (modify-syntax-entry ?/ ". 12b" mpc-mode-syntax-table) ; c++-style comments (modify-syntax-entry ?\n "> b" mpc-mode-syntax-table) ; c++-style comments ;;;###autoload (defun mpc-mode () "A major-mode to edit MPC files. \\{mpc-mode-map} " (interactive) (kill-all-local-variables) (use-local-map mpc-mode-map) (make-local-variable 'comment-start) (setq comment-start "//") (make-local-variable 'parse-sexp-ignore-comments) (setq parse-sexp-ignore-comments t) (make-local-variable 'tab-width) (make-local-variable 'font-lock-defaults) (make-local-variable 'indent-line-function) (setq major-mode 'mpc-mode) (setq mode-name "MPC") (setq font-lock-defaults `(mpc-font-lock-keywords nil t)) (setq indent-line-function 'mpc-indent-line) (set-syntax-table mpc-mode-syntax-table) (run-hooks 'mpc-mode-hook) ) (add-to-list 'auto-mode-alist '("\\.mwb\\'" . mpc-mode)) (add-to-list 'auto-mode-alist '("\\.mwc\\'" . mpc-mode)) (add-to-list 'auto-mode-alist '("\\.mpb\\'" . mpc-mode)) (add-to-list 'auto-mode-alist '("\\.mpc\\'" . mpc-mode)) (provide 'mpc-mode) ;;; mpc-mode.el ends here ace-6.4.5+dfsg.orig/bin/clean_dsp.pl0000755000175000017500000000145613154167357015342 0ustar tggtgg# DSP cleaner $if_depth = 0; @saved_lines = (); $dirty = 0; $in_dependency = 0; die "Not enough args" if ($#ARGV < 0); open (FILE, "<$ARGV[0]"); loop: while () { # Check for dependency information if (/^DEP/ || /^NODEP/) { $in_dependency = 1; } if ($in_dependency) { $in_dependency = 0 if (!/\\$/); goto loop; } # Check for empty !IF blocks if (/^\!IF/) { ++$if_depth; } push @saved_lines, $_ if ($if_depth > 0); if (/^\!ENDIF/) { --$if_depth; print @saved_lines if ($if_depth == 0 && $dirty == 1); @saved_lines = (); $dirty = 0; } elsif ($if_depth == 0) { print; } $dirty = 1 if ($if_depth > 0 && !/^\!/ && !/^\s+$/); } close (FILE); ace-6.4.5+dfsg.orig/bin/DependencyGenerator/0000775000175000017500000000000013157240624016763 5ustar tggtggace-6.4.5+dfsg.orig/bin/DependencyGenerator/GNUDependencyWriter.pm0000644000175000017500000000153613154167357023161 0ustar tggtggpackage GNUDependencyWriter; # ************************************************************ # Description : Generates GNU Makefile dependencies. # Author : Chad Elliott # Create Date : 2/10/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use DependencyWriter; use vars qw(@ISA); @ISA = qw(DependencyWriter); # ************************************************************ # Subroutine Section # ************************************************************ sub process { my($objects) = $_[1]; my($files) = $_[2]; ## Sort the dependencies to make them reproducible return '$(sort ' . join(' ', @$objects). "): \\\n " . join(" \\\n ", sort @$files) . "\n"; } 1; ace-6.4.5+dfsg.orig/bin/DependencyGenerator/GNUObjectGenerator.pm0000644000175000017500000000163713154167357022765 0ustar tggtggpackage GNUObjectGenerator; # ************************************************************ # Description : Generates object files for GNU Makefiles. # Author : Chad Elliott # Create Date : 5/23/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ObjectGenerator; use vars qw(@ISA); @ISA = qw(ObjectGenerator); # ************************************************************ # Subroutine Section # ************************************************************ sub process { my($noext) = $_[1]; $noext =~ s/\.[^\.]+$//o; $noext =~ s/.+\/// if $noext =~ /\.\.\//; return ["\$(VDIR)$noext.\$(SOEXT)", "\$(VDIR)$noext.\$(OBJEXT)", "\$(VSHDIR)$noext.\$(SOEXT)", "\$(VSHDIR)$noext.\$(OBJEXT)", ]; } 1; ace-6.4.5+dfsg.orig/bin/DependencyGenerator/GNUIDLObjectGenerator.pm0000644000175000017500000000242013154167357023305 0ustar tggtggpackage GNUIDLObjectGenerator; # ************************************************************ # Description : Generates object files for GNU IDL Makefiles. # Author : Chip Jones # Create Date : 11/01/2011 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ObjectGenerator; use vars qw(@ISA); @ISA = qw(ObjectGenerator); # ************************************************************ # Subroutine Section # ************************************************************ sub process { my($noext) = $_[1]; $noext =~ s/\.[^\.]+$//o; $noext =~ s/.+\/// if $noext =~ /\.\.\//; return ["\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_CLIENT_HDR_EXT)", "\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_CLIENT_INL_EXT)", "\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_CLIENT_SRC_EXT)", "\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_SERVER_HDR_EXT)", "\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_SERVER_SRC_EXT)", "\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_SERVER_THDR_EXT)", "\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_SERVER_TINL_EXT)", "\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_SERVER_TSRC_EXT)" ]; } 1; ace-6.4.5+dfsg.orig/bin/DependencyGenerator/GNUIDLDependencyWriter.pm0000644000175000017500000000164313154167357023511 0ustar tggtggpackage GNUIDLDependencyWriter; # ************************************************************ # Description : Generates GNU IDL Makefile dependencies. # Author : Chip Jones # Create Date : 11/01/2011 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use DependencyWriter; use vars qw(@ISA); @ISA = qw(DependencyWriter); # ************************************************************ # Subroutine Section # ************************************************************ sub process { my($objects) = $_[1]; my($files) = $_[2]; ## Sort the dependencies to make them reproducible if (scalar @$files > 0) { return '$(sort ' . join(' ', @$objects) . "): \\\n " . join(" \\\n ", sort @$files) . "\n"; } else { return; } } 1; ace-6.4.5+dfsg.orig/bin/copy-script.sh0000755000175000017500000000026613154167357015663 0ustar tggtgg#!/bin/sh for i in *.gz *.bz2 *.zip *.md5; do d=`echo $i | sed 's/\.[tz][ai][rp]/-$1&/'` echo "Copying $i to $d" cp -ip $i /export/www/download.dre/previous_versions/$d done ace-6.4.5+dfsg.orig/bin/cleanbuilds.sh0000755000175000017500000000073413154167357015674 0ustar tggtgg#!/bin/sh if test -z $1; then CURRENTDATE=YYYY_MM_DD; else CURRENTDATE=$1; fi wget http://teststat.remedy.nl/teststat/cleanbuild_testfails-$CURRENTDATE.txt -O cleanbuild.txt # grep -h \!FIXED_BUGS_ONLY ${ACE_ROOT}/tests/*.lst ${ACE_ROOT}/bin/*.lst ${TAO_ROOT}/bin/*.lst ${CIAO_ROOT}/bin/*.lst ${DANCE_ROOT}/bin/*.lst | sed -e "s/^\([^\:]*\).*/\1/" | sed -e "s/\(\/run_test.pl\)\?\s*$//" > Ignore.txt # cat cleanbuild.txt | grep -v -f Ignore.txt | tee cleanbuildresults.txt ace-6.4.5+dfsg.orig/bin/ace_tests.lst0000644000175000017500000000206113154167357015541 0ustar tggtgg# This is the list of run_test.pl's that need to be run by # auto_run_tests.pl. # Each line has its own test, and a test can be followed by a # list of configurations it does _not_ run on. # # Example: TAO\examples\foo\run_test.pl: !MINIMUM !ST # # NOTE: This file contains tests only for ACE. Please do not include # tests in TAO here.. tests/run_test.pl examples/Reactor/WFMO_Reactor/run_test.pl: !Cygwin !VxWorks !ACE_FOR_TAO !LabVIEW_RT !FACE_SAFETY protocols/tests/RMCast/run_test.pl: RMCAST !ST !NO_MCAST !nsk !LynxOS !ACE_FOR_TAO !VxWorks !LabVIEW_RT protocols/tests/HTBP/ping/run_test.pl: !NO_UUID !nsk !LynxOS !ACE_FOR_TAO !VxWorks !LabVIEW_RT !FACE_SAFETY protocols/tests/HTBP/Send_Recv_Tests/run_test.pl: !NO_UUID !nsk !LynxOS !ACE_FOR_TAO !VxWorks !LabVIEW_RT !FACE_SAFETY protocols/tests/HTBP/Send_Large_Msg/run_test.pl: !NO_UUID !nsk !LynxOS !ACE_FOR_TAO !VxWorks !LabVIEW_RT !FACE_SAFETY protocols/tests/HTBP/Reactor_Tests/run_test.pl: !NO_UUID !nsk !LynxOS !ACE_FOR_TAO !VxWorks !LabVIEW_RT !FACE_SAFETY tests/non_mpc_makefile/Bug_3708_Regression.pl: !ARCH ace-6.4.5+dfsg.orig/bin/main2TMAIN.pl0000755000175000017500000000104713154167357015205 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -pi -S $0 ${1+"$@"}' & eval 'exec perl -pi -S $0 $argv:q' if 0; # # You may want to run the "find" command with this script, which maybe # something like this: # # find . -type f \( -name "*.C" -o -name "*.cc" -o -name "*.c" -o -name "*.cpp" \) -print | xargs $ACE_ROOT/bin/auto_ptr.perl # The first three lines above let this script run without specifying the # full path to perl, as long as it is in the user's PATH. # Taken from perlrun man page. s/main( *\(int[ A-Za-z]*, *ACE_TCHAR)/ACE_TMAIN$1/g; ace-6.4.5+dfsg.orig/bin/auto_ptr.perl0000755000175000017500000000110513154167357015565 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -pi -S $0 ${1+"$@"}' & eval 'exec perl -pi -S $0 $argv:q' if 0; # You may want to run the "find" command with this script, which maybe # something like this: # # find . -type f \( -name "*.i" -o -name "*.h" -o -name "*.C" -o -name "*.cc" -o -name "*.c" -o -name "*.cpp" -o -name "*.hpp" -o -name "*.ipp" \) -print | xargs $ACE_ROOT/bin/auto_ptr.perl # The first three lines above let this script run without specifying the # full path to perl, as long as it is in the user's PATH. # Taken from perlrun man page. s/__TEXT/ACE_TEXT/g; ace-6.4.5+dfsg.orig/bin/performance_stats.sh0000755000175000017500000001403413154167357017124 0ustar tggtgg#!/bin/sh # if [ $# -lt 1 ]; then echo "Usage: $0 " exit 0 fi DEST=$1 DATE=`date +%Y/%m/%d-%H:%M` mkdir -p $DEST/images mkdir -p $DEST/data mkdir -p $DEST/source COMPILER="gcc" COMMON_TESTS="AMI DII DSI Deferred Single_Threaded Thread_Per_Connection Thread_Pool AMH_Single_Threaded" SEQUENCE_TESTS="AMI DII DSI Deferred Single_Threaded Thread_Per_Connection Thread_Pool AMH_Single_Threaded" SEQ_TEST_TYPE="octet long short char double longlong" cd $DEST/source /bin/sync sleep 10 ( cd $ACE_ROOT/performance-tests/TCP; ./run_test.pl ) >tcp_test.log 2>&1 if grep -q 'Client throughput: ' tcp_test.log; then ( echo -n $DATE " "; awk '/^Client throughput:/ {print $3}' tcp_test.log ) >> TCP.txt; fi /bin/sync sleep 10 ( cd $TAO_ROOT/performance-tests/Latency/Single_Threaded; ./default_configuration.pl > $DEST/source/Default.log 2>&1 ) if grep -q 'Total throughput: ' Default.log; then ( echo -n $DATE " "; awk '/^Total throughput:/ {print $3}' Default.log ) >> Default.txt fi /bin/sync sleep 2 ( cd $TAO_ROOT/performance-tests/Sequence_Latency/Single_Threaded; for i in $SEQ_TEST_TYPE; do ( ./default_configuration.pl -t $i > $DEST/source/Sequence_Default_${i}.log 2>&1 if grep -q 'Total throughput: ' $DEST/source/Sequence_Default_${i}.log; then ( echo -n $DATE " "; awk '/^Total throughput:/ {print $3}' $DEST/source/Sequence_Default_${i}.log ) >> $DEST/source/Sequence_Default_${i}.txt fi ) done ) for i in $COMMON_TESTS; do /bin/sync sleep 10 ( cd $TAO_ROOT/performance-tests/Latency/${i}; ./run_test.pl > $DEST/source/${i}.log 2>&1 ) if grep -q 'Total throughput: ' ${i}.log; then ( echo -n $DATE " "; awk '/^Total throughput:/ {print $3}' $DEST/source/${i}.log ) >> ${i}.txt fi done for i in $SEQUENCE_TESTS; do /bin/sync sleep 10 ( cd $TAO_ROOT/performance-tests/Sequence_Latency/${i}; for j in $SEQ_TEST_TYPE; do ( ./run_test.pl -t $j > $DEST/source/Sequence_${i}_${j}.log 2>&1 if grep -q 'Total throughput: ' $DEST/source/Sequence_${i}_${j}.log; then ( echo -n $DATE " "; awk '/^Total throughput:/ {print $3}' $DEST/source/Sequence_${i}_${j}.log ) >> $DEST/source/Sequence_${i}_${j}.txt fi ) done ) done for i in $COMMON_TESTS TCP Default; do $ACE_ROOT/bin/generate_performance_chart.sh ${i}.txt ${i}.png "$i" 1024,768 /bin/cp ${i}.png $DEST/images/${i}.png /usr/bin/tac ${i}.txt > $DEST/data/${i}.txt /usr/bin/tail -5 ${i}.txt > $DEST/data/LAST_${i}.txt done for i in $SEQ_TEST_TYPE ; do $ACE_ROOT/bin/generate_performance_chart.sh Sequence_Default_${i}.txt Sequence_Default_${i}.png "Default Configuration for $i sequences" 1024,768 /bin/cp Sequence_Default_${i}.png $DEST/images/Sequence_Default_${i}.png /usr/bin/tac $DEST/source/Sequence_Default_${i}.txt > $DEST/data/Sequence_Default_${i}.txt /usr/bin/tail -5 $DEST/source/Sequence_Default_${i}.txt > $DEST/data/LAST_Sequence_Default_${i}.txt done for i in $SEQUENCE_TESTS; do for j in $SEQ_TEST_TYPE; do $ACE_ROOT/bin/generate_performance_chart.sh Sequence_${i}_${j}.txt Sequence_${i}_${j}.png "Sequence_$i_$j" 1024,768 /bin/cp Sequence_${i}_${j}.png $DEST/images/Sequence_${i}_${j}.png /usr/bin/tac Sequence_${i}_${j}.txt > $DEST/data/Sequence_${i}_${j}.txt /usr/bin/tail -5 Sequence_${i}_${j}.txt > $DEST/data/LAST_Sequence_${i}_${j}.txt done done gnuplot <<_EOF_ >/dev/null 2>&1 set xdata time set timefmt '%Y/%m/%d-%H:%M' set xlabel 'Date (YYYYMMDD)' set xtics rotate set ylabel 'Throughput (Requests/Second)' set yrange [0:] set terminal png small size 1024,768 color set output "/dev/null" plot 'AMI.txt' using 1:2 title 'AMI' w l replot 'DII.txt' using 1:2 title 'DII' w l replot 'DSI.txt' using 1:2 title 'DSI' w l replot 'Deferred.txt' using 1:2 title 'Deferred' w l replot 'Single_Threaded.txt' using 1:2 title 'Single_Threaded' w l replot 'Default.txt' using 1:2 title 'Single_Threaded (Defaults)' w l replot 'Thread_Per_Connection.txt' using 1:2 title 'Thread_Per_Connection' w l replot 'Thread_Pool.txt' using 1:2 title 'Thread_Pool' w l replot 'AMH_Single_Threaded.txt' using 1:2 title 'AMH' w l replot 'TCP.txt' using 1:2 title 'TCP/IP' w l set output "All.png" replot exit _EOF_ gnuplot <<_EOF_ >/dev/null 2>&1 set xdata time set timefmt '%Y/%m/%d-%H:%M' set xlabel 'Date (YYYYMMDD)' set xtics rotate set ylabel 'Throughput (Requests/Second)' set yrange [0:] set terminal png small size 1024,768 color set output "/dev/null" plot 'AMI.txt' using 1:2 title 'AMI' w l replot 'DII.txt' using 1:2 title 'DII' w l replot 'DSI.txt' using 1:2 title 'DSI' w l replot 'Deferred.txt' using 1:2 title 'Deferred' w l replot 'Single_Threaded.txt' using 1:2 title 'Single_Threaded' w l replot 'Default.txt' using 1:2 title 'Single_Threaded (Defaults)' w l replot 'Thread_Per_Connection.txt' using 1:2 title 'Thread_Per_Connection' w l replot 'Thread_Pool.txt' using 1:2 title 'Thread_Pool' w l replot 'AMH_Single_Threaded.txt' using 1:2 title 'AMH' w l set output "CORBA.png" replot exit _EOF_ /bin/cp CORBA.png All.png $DEST/images/ cd $DEST/data /bin/uname -a > uname.txt $COMPILER -v > gcc.txt 2>&1 $COMPILER -dumpversion > gccversion.txt 2>&1 /lib/libc.so.6 | sed -e 's//\>/g' > libc.txt cat /proc/cpuinfo > cpuinfo.txt cat /proc/meminfo > meminfo.txt if [ -e "/etc/SuSE-release" ]; then cat /etc/SuSE-release > linuxversion.txt fi if [ -e "/etc/redhat-release" ]; then cat /etc/redhat-release > linuxversion.txt fi if [ -e "/etc/fedora-release" ]; then cat /etc/fedora-release > linuxversion.txt fi cat $ACE_ROOT/ace/config.h > config.h.txt cat $ACE_ROOT/include/makeinclude/platform_macros.GNU > platform_macros.GNU.txt cat $ACE_ROOT/bin/MakeProjectCreator/config/default.features > default.features.txt cp $ACE_ROOT/html/Stats/* $DEST ace-6.4.5+dfsg.orig/bin/diff-builds-and-group-fixed-tests-only.sh0000755000175000017500000000232413154167357022702 0ustar tggtgg#!/bin/sh if test -z $1; then newdate=`date -u +%Y_%m_%d`; else newdate=$1; fi if test -z $2; then prefix=`date -u +%Y%m%d%a`; else prefix=$2; fi if test -z $3; then olddate=2017_08_14; else olddate=$3; fi if test -z $ACE_ROOT; then ACE_ROOT=..; fi if test -z $TAO_ROOT; then TAO_ROOT=${ACE_ROOT}/TAO; fi if test -z $CIAO_ROOT; then CIAO_ROOT=${TAO_ROOT}/CIAO; fi if test -z $DANCE_ROOT; then DANCE_ROOT=${TAO_ROOT}/DAnCE; fi if test -z $DDS_ROOT; then DDS_ROOT=${TAO_ROOT}/DDS; fi # grep -h \!FIXED_BUGS_ONLY ${ACE_ROOT}/tests/*.lst ${ACE_ROOT}/bin/*.lst ${TAO_ROOT}/bin/*.lst ${CIAO_ROOT}/bin/*.lst ${DANCE_ROOT}/bin/*.lst ${DDS_ROOT}/bin/*.lst | sed -e "s/^\([^\:]*\).*/\1/" | sed -e "s/\(\/run_test.pl\)\?\s*$//" > ${prefix}-Ignore.txt # perl ${ACE_ROOT}/bin/diff-builds.pl -r -D $olddate -D $newdate | perl -ne 'print unless /^(\@\@|[ \-][a-zA-Z])/' | grep -v -f ${prefix}-Ignore.txt | tee ${prefix}-Builds.txt | grep '+[a-zA-Z]' | sort | uniq -c | sort -n -r -s | sort -k3 -r -s > ${prefix}-Tests.txt perl ${ACE_ROOT}/bin/diff-builds.pl -D $olddate -D $newdate | perl -ne 'print unless /^(\@\@|[ \-][a-zA-Z])/' | grep -v -f ${prefix}-Ignore.txt | grep '+[a-zA-Z]' | sort | uniq -c | sort -n -r -s > ${prefix}-Tests-NoTestRev.txt ace-6.4.5+dfsg.orig/bin/ace-install0000755000175000017500000003535713154167357015203 0ustar tggtgg#!/bin/sh ##################################################################### # install_ace: distill the minimal stuff out of the ACE+TAO distribution # alias cpio 'xargs -i echo {}'; # just for testing the script # # according to David Levine on 1999/01/09: # # An even better way would be to only build what you need. # These directories are probably a good start: # # ace # apps/gperf/src # TAO/tao # TAO/TAO_IDL # TAO/orbsvcs # # netsvcs ? - not built in here, probably useful # ##################################################################### # actions unpack=0 config=0 compile=0 install=0 force=0 # can we do it? die=0 ##################################################################### # check for install_ace options ##################################################################### while [ $# -gt 0 ]; do case $1 in ########################################## # help output -h | --help*) echo " " echo "`basename $0` [options]" echo " " echo "options:" echo " -h, --help show brief help" echo " " echo "required options:" echo " -r, --aceroot=ACE_ROOT use ACE_ROOT directory for build/install" echo " " echo "extracting and configuring options:" echo " -z, --archive=FILE unpack specified source archive" echo " -p, --platform=HEADER,MAKE use HEADER,MAKE as config.h, platform_macros" echo " " echo "compiling options:" echo " -c, --compile=ACE_OPTS compile with make options (e.g. debug=0)" echo " " echo "installing options:" echo " -i, --install=ACE_DEST install into ACE_DEST directory" echo " -a, --arch=ACE_ARCH use ACE_ARCH subdirs for arch-dependent files" echo " " echo "miscellaneous options:" echo " -f, --force don't ask for confirmation before proceeding" echo " " exit 0 ;; ########################################## # required options -r) shift if [ $# -gt 0 ]; then ACE_ROOT=$1; export ACE_ROOT else echo "no ACE_ROOT specified" exit 1 fi shift ;; --aceroot*) ACE_ROOT=`echo $1 | sed -e 's/^[^=]*=//g'`; export ACE_ROOT shift ;; ########################################## # extracting and configuring options -z) shift if [ $# -gt 0 ]; then ACE_ARCHIVE=$1; export ACE_ARCHIVE unpack=1 else echo "no archive specified" exit 1 fi shift ;; --archive*) ACE_ARCHIVE=`echo $1 | sed -e 's/^[^=]*=//g'`; export ACE_ARCHIVE unpack=1 shift ;; -p) shift if [ $# -gt 0 ]; then ACE_HEADER=`echo $1 | cut -f 1 -d ,`; export ACE_HEADER ACE_MAKE=`echo $1 | cut -f 2 -d ,`; export ACE_MAKE else echo "no header,make files specified" exit 1 fi config=1 shift ;; --platform*) stuff=`echo $1 | sed -e 's/^[^=]*=//g'` ACE_HEADER=`echo $stuff | cut -f 1 -d ,`; export ACE_HEADER ACE_MAKE=`echo $stuff | cut -f 2 -d ,`; export ACE_MAKE config=1 shift ;; ########################################## # compiling options -c) shift if [ $# -gt 0 ]; then ACE_OPTS="$1"; export ACE_OPTS compile=1 else echo "no compilation options specified (e.g. debug=0)" exit 1 fi shift ;; --compile*) ACE_OPTS=`echo $1 | sed -e 's/^[^=]*=//g'`; export ACE_OPTS compile=1 shift ;; ########################################## # installing options -i) shift if [ $# -gt 0 ]; then ACE_DEST=$1; export ACE_DEST install=1 else echo "no installation target directory specified (e.g. /tools/ace)" exit 1 fi shift ;; --install*) ACE_DEST=`echo $1 | sed -e 's/^[^=]*=//g'`; export ACE_DEST install=1 shift ;; -a) shift if [ $# -gt 0 ]; then ACE_ARCH=$1; export ACE_ARCH else echo "no installation target architecture specified" exit 1 fi shift ;; --arch*) ACE_ARCH=`echo $1 | sed -e 's/^[^=]*=//g'`; export ACE_ARCH shift ;; ########################################## # miscellaneous options -f) shift force=1 ;; *) # no more options, get on with life if [ $# -gt 0 ]; then echo "unrecognized option: $1" exit 1 fi ;; esac done ##################################################################### # sanity checks for required variables ##################################################################### if [ $install -ne 0 -a $compile -ne 0 -a $unpack -eq 0 ]; then echo "- No actions specified." die=1 fi if [ $unpack -ne 0 -a $compile -ne 0 -a $config -eq 0 ] \ || [ $unpack -ne 0 -a $install -ne 0 -a $config -eq 0 ]; then echo "- Must set platform config options with --platform option" echo " (`basename $0` -h for help) to unpack and compile/install" die=1 fi if [ -z "$ACE_ROOT" ]; then echo "- Must set ACE_ROOT directory before proceeding..." echo " The directory may be set with the ACE_ROOT environment" echo " variable or the --aceroot option (`basename $0` -h for help)" die=1 fi if [ $install -eq 1 -a -z "$ACE_ARCH" ]; then # just set it to blank if we want to flatten this level of subdirectory ACE_ARCH="" fi if [ $die -ne 0 ]; then echo "- terminating `basename $0` script" exit 2 fi ##################################################################### # announce intentions ##################################################################### echo "This script will perform the following actions:" echo "using ACE_ROOT directory: $ACE_ROOT" if [ $unpack -ne 0 ]; then echo " " echo "Extracting:" echo "- unpack source archive: $ACE_ARCHIVE" fi if [ $config -ne 0 ]; then echo " " echo "Configuring:" echo "- platform config.h header: $ACE_HEADER" echo "- platform makefile macros: $ACE_MAKE" fi if [ $compile -ne 0 ]; then echo " " echo "Compiling:" echo "- ACE/TAO compile options: $ACE_OPTS" fi if [ $install -ne 0 ]; then echo " " echo "Installing:" echo "- install target directory: $ACE_DEST" echo "- install target arch: $ACE_ARCH" fi echo "" ##################################################################### # confirm desire to proceed ##################################################################### if [ $force -eq 0 ]; then echo " " echo "Type 'yes' to proceed, anything else to exit" read ready if [ "$ready" != "yes" ]; then echo "Terminating install script. Thank you for playing." echo "We have some lovely parting gifts for you. =)" exit 1 fi fi ##################################################################### # extract ACE and TAO ##################################################################### if [ $unpack -ne 0 ]; then echo "Unpacking $ACE_ARCHIVE..." cd `dirname $ACE_ROOT` gzip -dc $ACE_ARCHIVE | tar xvf - fi ##################################################################### # configure ACE and TAO ##################################################################### if [ $config -ne 0 ]; then echo "Configuring: $ACE_HEADER,$ACE_MAKE..." # copy the files if they exist test -f $ACE_ROOT/ace/$ACE_HEADER \ && cp $ACE_ROOT/ace/$ACE_HEADER $ACE_ROOT/ace/config.h test -f $ACE_ROOT/include/makeinclude/$ACE_MAKE \ && cp $ACE_ROOT/include/makeinclude/$ACE_MAKE \ $ACE_ROOT/include/makeinclude/platform_macros.GNU # print error message and die if they don't if [ ! -f $ACE_ROOT/ace/$ACE_HEADER ]; then echo "error: $ACE_HEADER doesn't exist" die=1 fi if [ ! -f $ACE_ROOT/include/makeinclude/$ACE_MAKE ]; then echo "error: $ACE_MAKE doesn't exist" die=1 fi if [ $die -ne 0 ]; then exit $die fi fi ##################################################################### # compile ACE and TAO ##################################################################### if [ $compile -ne 0 ]; then echo "Compiling: $ACE_OPTS..." ########################################## # add ACE_ROOT/ace to LD_LIBRARY_PATH so tao_idl can find libACE.so if [ "`uname -s`" = "HP-UX" ]; then if [ ! -z "$SHLIB_PATH" ]; then SHLIB_PATH=$ACE_ROOT/ace:$SHLIB_PATH else SHLIB_PATH=$ACE_ROOT/ace; export SHLIB_PATH fi else if [ ! -z "$LD_LIBRARY_PATH" ]; then LD_LIBRARY_PATH=$ACE_ROOT/ace:$LD_LIBRARY_PATH else LD_LIBRARY_PATH=$ACE_ROOT/ace; export LD_LIBRARY_PATH fi fi ########################################## # compile a few select directories for d in ace apps/gperf/src TAO/tao TAO/TAO_IDL TAO/orbsvcs TAO/utils; do echo --- Building in $d. cd "$ACE_ROOT/$d" make $ACE_OPTS if [ $? -ne 0 ]; then echo --- Error during build: $? exit $? fi done fi ##################################################################### # install ACE and TAO ##################################################################### if [ $install -ne 0 ]; then echo "Installing: $ACE_DEST..." ########################################## # determine final target directories ACE_VER=`head -n 1 $ACE_ROOT/VERSION | sed -e 's/^[^0-9]*//' -e 's/[, ].*//'` ACE_DIR="$ACE_DEST/ACE-$ACE_VER"; export ACE_DIR TAO_VER=`head -n 1 $ACE_ROOT/TAO/VERSION | sed -e 's/^[^0-9]*//' -e 's/[, ].*//'` TAO_DIR="$ACE_DEST/TAO-$TAO_VER"; export ACE_DIR ########################################## # create target directories as needed echo "creating target directories..." ace_dirs="$ACE_DIR $ACE_DIR/include $ACE_DIR/man" ace_arch_dirs="$ACE_DIR/$ACE_ARCH/include/ace \ $ACE_DIR/$ACE_ARCH/bin $ACE_DIR/$ACE_ARCH/lib" tao_dirs="$TAO_DIR $TAO_DIR/include $TAO_DIR/include/orbsvcs" tao_arch_dirs="$TAO_DIR/$ACE_ARCH/include \ $TAO_DIR/$ACE_ARCH/bin $TAO_DIR/$ACE_ARCH/lib" for dir in $ace_dirs $ace_arch_dirs $tao_dirs $tao_arch_dirs; do if [ ! -d $dir ]; then echo $dir mkdir -p $dir fi done ########################################## # copy TAO stuff cd $ACE_ROOT/TAO cp VERSION $TAO_DIR/$ACE_ARCH/TAO-VERSION # copy TAO includes echo "Copying include files..." find tao -type f -name "*.idl" -print | cpio -p -d -V $TAO_DIR/include find tao -type f -name "*.pidl" -print | cpio -p -d -V $TAO_DIR/include find tao -type f -name "*.h" -print | grep -v "^config\.h" | cpio -p -d -V $TAO_DIR/include find tao -type f \( -name "*.i" -o -name "*.inl" \) -print | cpio -p -d -V $TAO_DIR/include find tao -type f -name "*.cpp" -print | cpio -p -d -V $TAO_DIR/include # NOTE: may need all .h, .i and .cpp under TAO/orbsvcs, instead of just TAO/orbsvcs/orbsvcs cd orbsvcs find orbsvcs -type f -name "*.idl" -print | cpio -p -d -V $TAO_DIR/include find orbsvcs -type f -name "*.pidl" -print | cpio -p -d -V $TAO_DIR/include find orbsvcs -type f -name "*.h" -print | grep -v "^config\.h" | cpio -p -d -V $TAO_DIR/include find orbsvcs -type f \( -name "*.i" -o -name "*.inl" \) -print | cpio -p -d -V $TAO_DIR/include find orbsvcs -type f -name "*.cpp" -print | cpio -p -d -V $TAO_DIR/include cd .. # copy TAO libs echo "Copying libraries..." for f in `find . -type f -name "lib?*" -not -name "*\.dsw" -not -name "*Test*" -print`; do echo $f cp $f $TAO_DIR/$ACE_ARCH/lib done # copy TAO executables echo "Copying executables..." ALL_PROGS=`find orbsvcs -type f -perm /a+x -print | grep -v ".*lib.*" | grep -v ".\.pl" | grep -v test | grep -v example` ALL_PROGS="`find utils -type f -perm /a+x -print` $ALL_PROGS" PROGS=`echo $ALL_PROGS | tr " " "\n" | grep -v test | grep -v default.bld | grep -v README | grep -v GNUmakefile` for f in TAO_IDL/tao_idl $PROGS; do echo $f cp $f $TAO_DIR/$ACE_ARCH/bin done ########################################## # copy ACE stuff cd $ACE_ROOT cp VERSION $ACE_DIR/$ACE_ARCH/ACE-VERSION # copy ACE includes echo "Copying include files..." find ace -type f -name "*.h" -print | grep -v "^config\.h" | cpio -p -d -V $ACE_DIR/include find ace -type f \( -name "*.i" -o -name "*.inl" \) -print | cpio -p -d -V $ACE_DIR/include find ace -type f -name "*.cpp" -print | cpio -p -d -V $ACE_DIR/include cp ace/config.h $ACE_DIR/$ACE_ARCH/include/ace/config.h chmod -R a+r $ACE_DIR/$ACE_ARCH/include # copy ACE libs echo "Copying libraries..." for f in `find . -type f -name "lib?*" -not -name "*\.dsw" -not -name "*Test*" -print`; do # only copy libs if they're not already in $TAO_DIR/$ACE_ARCH/lib maybe_tao_lib=$TAO_DIR/$ACE_ARCH/lib/`basename $f` if [ ! -f $maybe_tao_lib ]; then echo $f cp $f $ACE_DIR/$ACE_ARCH/lib fi test -f $maybe_tao_lib && echo "library $f already installed with TAO" done # copy ACE executables echo "Copying executables..." ACE_PROGS=apps/gperf/src/gperf for f in $ACE_PROGS; do echo $f cp $f $ACE_DIR/$ACE_ARCH/bin done # copy ACE man pages echo "Copying man pages..." find man -type f -print | cpio -p -d -V $ACE_DIR # PERMISSIONS chmod -R a+r $ACE_DEST find $ACE_DEST -type d -exec chmod a+x {} \; find $ACE_DEST -type f -perm /a+x -exec chmod a+x {} \; fi # if [ $install -ne 0 ] ##################################################################### # that's all, folks ##################################################################### echo "`basename $0`: done." ace-6.4.5+dfsg.orig/bin/clean_sems.sh0000755000175000017500000000074213154167357015517 0ustar tggtgg#!/bin/sh SYSTEM=`uname -s` IPCS="ipcs" IPCRM="ipcrm -s" if [ "$SYSTEM" = "Darwin" ]; then USER=`id | sed 's/(.*//; s/uid=//'` IPCS="ngvipc -s" IPCRM="ngvipc -s -R" elif [ -z "$USER" ]; then USER=`id | sed 's/).*//; s/.*(//'` fi case "$SYSTEM" in "Linux" ) ipcs -a | grep $USER | awk '{ print ($2) }' | xargs -r ipcrm sem; ;; * ) semids=`$IPCS | grep "^s" | grep $USER | awk '{ print ($2) }'` for p in $semids do $IPCRM $p done ;; esac ace-6.4.5+dfsg.orig/bin/ACE+TAO+CIAO+DAnCE.json0000644000175000017500000001206613154167357016330 0ustar tggtgg// Policy used in Coverity tests. // // Generates UNCALLED defects for functions which are not called by any test. // Generates INSUFFICIENT_COVERAGE defects for functions which do not have // 100% line coverage. // Generates INSUFFICIENT_FILE_COVERAGE defects for files which do not // have 100% line coverage. // // The line immediately following a coverity[TA.COVERAGE] annotation // (i.e. in source code comments) is ignored for coverage purposes. // Lines with xnocover annotations are ignored for coverage purposes. { type: "Coverity test policy definition", format_version: 1, recent_date_cutoff: "2012-03-07", // 6.1.0 old_date_cutoff: "2010-12-14", // 6.0.0 rules: [ { violation_name: "INSUFFICIENT_COVERAGE", aggregation_granularity: "function", minimum_line_coverage_pct: 100, use_filters: [ "exclude_annotated_lines", "executed_code", "focus_on_my_source", "exclude_logging_code", "exclude_throw_statements", "exclude_error_handlers" ] }, ], define_filters: [ { filter_name: "executed_code", function_filters: [ { is_executed: true, exclusion_reason: "unexecuted code", } ] }, { filter_name: "exclude_annotated_lines", line_filters: [ { not: { or: [ { line_regex: "coverity\\[TA\\.COVERAGE\\]", line_offset: -1 }, { line_regex: "xnocover" }, ] }, exclusion_reason: "coverage annotation", } ] }, { filter_name: "exclude_logging_code", line_filters: [ { not: { or: [ { line_regex: "ACE_DEBUG" }, { line_regex: "ACE_ERROR" }, { line_regex: "ACE_ERROR_RETURN" }, { line_regex: "ACELIB_DEBUG" }, { line_regex: "ACELIB_ERROR" }, { line_regex: "ACELIB_ERROR_RETURN" }, { line_regex: "TAOLIB_DEBUG" }, { line_regex: "TAOLIB_ERROR" }, { line_regex: "TAOLIB_ERROR_RETURN" }, { line_regex: "DANCE_DEBUG" }, { line_regex: "DANCE_ERROR" }, { line_regex: "DANCE_ERROR_RETURN" }, { line_regex: "CIAO_DEBUG" }, { line_regex: "CIAO_ERROR" }, { line_regex: "CIAO_ERROR_RETURN" }, { line_regex: "DDS4CCM_DEBUG" }, { line_regex: "DDS4CCM_ERROR" }, { line_regex: "DDS4CCM_ERROR_RETURN" }, { line_regex: "DDS4CCM_PRINT_DEBUG_CORBA_EXCEPTION" }, { line_regex: "DDS4CCM_PRINT_CORBA_EXCEPTION" }, { line_regex: "DDS4CCM_debug_level" }, { line_regex: "CIAO_debug_level" }, { line_regex: "TAO_debug_level" }, { line_regex: "DAnCE_debug_level" }, { line_regex: "DANCE_debug_level" }, { line_regex: "DDS4CCM_DEBUG_LEVEL" }, { line_regex: "CIAO_DEBUG_LEVEL" }, { line_regex: "DAnCE_DEBUG_LEVEL" }, { line_regex: "DANCE_DEBUG_LEVEL" }, { line_regex: "DDS4CCM::debug_level" }, { line_regex: "CIAO::debug_level" }, { line_regex: "DAnCE::debug_level" }, { line_regex: "DANCE::debug_level" }, { line_regex: "ORBSVCS_DEBUG" }, { line_regex: "ORBSVCS_ERROR" }, { line_regex: "ORBSVCS_ERROR_RETURN" }, { line_regex: "VDBG" }, { line_regex: "VDBG_LVL" }, { line_regex: "Transport_debug_level" }, { line_regex: "_tao_print_exception" }, ] }, exclusion_reason: "policy indicates no need to test logging code", } ] }, { filter_name: "exclude_throw_statements", line_filters: [ { exclusion_reason: "on throw path", not: { contains_astnode: { dominated_by_astnode: { expression_kind: "throw" , } } } } ] }, { filter_name: "exclude_error_handlers", line_filters: [ { not: { line_regex: "return\\s+-1" }, exclusion_reason: "policy indicates no need to test error handlers", } ] }, { filter_name: "focus_on_my_source", file_filters: [ { exclusion_reason: "outside interesting source locations", and: [ { or: [ { file_name_regex: ".*/ACE/ace/.*" }, { file_name_regex: ".*/DDS/dds/DCPS/.*" }, { file_name_regex: ".*/TAO/tao/.*" }, { file_name_regex: ".*/TAO/orbsvcs/orbsvcs/Naming/.*" }, { file_name_regex: ".*/TAO/orbsvcs/orbsvcs/Notify/.*" }, { file_name_regex: ".*/TAO/orbsvcs/orbsvcs/Event/.*" }, { file_name_regex: ".*/CIAO/ciao/.*" }, { file_name_regex: ".*/CIAO/connectors/dds4ccm/impl/.*" }, { file_name_regex: ".*/DAnCE/dance/LocalityManager.*" }, { file_name_regex: ".*/DAnCE/tools/Config_Handlers/DynAny_Handler.*" } ] }, { not: { file_name_regex: "CIAO/connectors/dds4ccm/impl/ndds" }} ] } ] }, ] } ace-6.4.5+dfsg.orig/bin/count_lines0000755000175000017500000001531413154167357015320 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # -*- perl -*- use File::Basename; $cmd= basename($0); if ($#ARGV < 0) { die "Usage: $cmd module...\n"; } @match_order = (); %typeRE = (); &initfiletypes; foreach $module (@ARGV) { if ( ! -d $module ) { warn "$cmd: no such directory $module\n"; next; } open(DIRS, "find $module -type d|"); @dirs = grep {if(!/CVS/) {chop;}} ; close(DIRS); open(FIND, "find $module -type f|"); @files = grep {if (!/build/ && !/CVS/ && !/rpc\+\+/ && !/\.bpr$/ && !/\.mdp$/ && !/\.MDP$/ && !/\.dsp$/ && !/\.DSP$/ && !/\.dsw$/ && !/\.DSW$/ && !/\.mak$/ && !/\.MAK$/ && !/\.o$/ && !/\.sl$/ && !/\.a$/) {chop;}} ; close(FIND); $totdirs = $#dirs; $totfiles = $#files; $totlines = 0; %lines = (); foreach $file (@files) { $n = 0; if (!open(IN, $file)) { warn "$cmd: cannot open '$file' for reading\n"; next; } while() { $n++; } close(IN); $lines{$file} = $n; $totlines += $n; } # Define two associative arrays to keep the results for each kind # of file. %linespertype = (); %filespertype = (); foreach $type (keys %typeRE) { $linespertype{$type} = 0; $filespertype{$type} = 0; } # The file is classified and added to the corresponding variable. FILE: while (($file, $l) = each %lines) { foreach $type (@match_order) { $re = $typeRE{$type}; if($file =~ m/$re/) { $linespertype{$type} += $l; $filespertype{$type}++; next FILE; } } print STDERR "Unmatched file: $file\n"; } format STDOUT_TOP= @||| $% Lines of code in module @<<<<<<<<<<<<<<<<<<<< $module Files: @>>>>>>>> $totfiles Directories: @>>>>>>>> $totdirs Lines: @>>>>>>>> $totlines File type lines files ---------------------------- ------------------ ----------------- . format STDOUT= @<<<<<<<<<<<<<<<<<<<<<<<<<<< @>>>>>>>>>>>>>>>>> @>>>>>>>>>>>>>>>> $type, $typelines, $typefiles . foreach $type (@match_order) { $typelines = $linespertype{$type}; $typefiles = $filespertype{$type}; if ($typefiles != 0) { write; } } # Forzamos un newpage para cada modulo. $- = 0; } sub updateRE { local $desc = shift; local $re = shift; if (exists $typeRE{$desc}) { local $mix = $typeRE{$desc} . '|(' . $re . ')'; $typeRE{$desc} = $mix; } else { $typeRE{$desc} = '(' . $re . ')'; push @match_order, $desc; } } sub initfiletypes { # Here we define the regular expressions for each kind of file. # This RE must be mutually exclusive, a file will not be counted # twice, but it could be unproperly classified. local %filenames = ('GNUmakefile' => 'Makefile', 'Makefile.*' => 'Makefile', 'README' => 'README files', 'COPYING' => 'Licenses', 'LICENSE.*' => 'Licenses', 'ChangeLog.*' => 'ChangeLog', 'ChangeLog-.*' => 'ChangeLog', '.cvsignore' => 'Control CVS', 'run_test.pl' => 'Test driver', 'run_test' => 'Test driver', 'run_tests' => 'Test driver', 'run_test.sh' => 'Test driver'); local %fileexts = ('cc' => 'C++ sources', 'cpp' => 'C++ sources', 'inl' => 'C++ sources', 'i' => 'C++ sources', 'h' => 'Headers', 'hh' => 'Headers', 'c' => 'C/C++ sources', 'idl' => 'IDL sources', 'IDL' => 'IDL sources', 'pidl' => 'IDL sources', 'y' => 'yacc source', 'yy' => 'yacc source', 'l' => 'lex source', 'll' => 'lex source', 'php' => 'php script', 'pm' => 'perl script', 'pl' => 'perl script', 'perl' => 'perl script', 'py' => 'python script', 'GNU' => 'GNU make config', 'tex' => '(La)TeX', 'txt' => 'Text files', '1' => 'man pages', '3' => 'man pages', 'html' => 'HTML', 'bib' => 'BibTeX', 'sty' => 'TeX styles', 'bld' => 'VxWorks build file', 'am' => 'Automake file', 'icc' => 'VisualAge project files', 'icp' => 'VisualAge project files', 'vac' => 'VisualAge project files', 'vcp' => 'Microsof eMbedded Visual Tools project files', 'vcw' => 'Microsof eMbedded Visual Tools project files', 'bpr' => 'Borland project files', 'bor' => 'Borland project files', 'dsp' => 'DevStudio project files', 'DSP' => 'DevStudio project files', 'mdp' => 'MSVC project files', 'MDP' => 'MSVC project files', 'dsw' => 'MSVC workspaces', 'DSW' => 'MSVC workspaces', 'mak' => 'MSVC MAK files', 'MAK' => 'MSVC MAK files', 'java' => 'JAVA source', 'class' => 'JAVA class', 'cccc' => 'codecount output', 'gif' => 'GIF images', 'conf' => 'Svc_Config files', 'diff' => 'patches', 'zip' => 'Compressed files', 'gz' => 'Compressed files', 'EXE' => 'Win32 executable', 'shar' => 'Shar archive', 'mib' => 'MIB definition files', 'gperf' => 'GPERF input', 'phil.*'=> 'Test driver' ); local %paths = (); local ($desc, $reseed); while (($reseed, $desc) = each %filenames) { local $re = '/' . $reseed . '$'; updateRE($desc, $re); } while (($reseed, $desc) = each %fileexts) { local $re = '/[^/]*\.' . $reseed . '$'; updateRE($desc, $re); } while (($reseed, $desc) = each %paths) { local $re = $reseed; updateRE($desc, $re); } updateRE('Others', '.*'); # while (($desc, $reseed) = each %typeRE) { # print STDERR $desc, " ==> ", $reseed, "\n"; # } } ace-6.4.5+dfsg.orig/bin/footprint_stats.sh0000755000175000017500000000412313154167357016645 0ustar tggtgg#!/bin/sh # if [ $# -lt 1 ]; then echo "Usage: $0 [DEST]" exit 0 fi DEST=$1 DATE=`date +%Y/%m/%d-%H:%M` BINS="$TAO_ROOT/tests/ORB_init/ORB_init $TAO_ROOT/tests/ORB_destroy/ORB_destroy" LIBS="$ACE_ROOT/ace/libACE.a \ $TAO_ROOT/tao/libTAO.a \ $TAO_ROOT/tao/PortableServer/libTAO_PortableServer.a \ $TAO_ROOT/tao/Strategies/libTAO_Strategies.a \ $TAO_ROOT/tao/SmartProxies/libTAO_SmartProxies.a \ $TAO_ROOT/tao/DynamicAny/libTAO_DynamicAny.a \ $TAO_ROOT/tao/DynamicInterface/libTAO_DynamicInterface.a \ $TAO_ROOT/tao/IFR_Client/libTAO_IFR_Client.a \ $TAO_ROOT/tao/BiDir_GIOP/libTAO_BiDirGIOP.a \ $TAO_ROOT/tao/IORManipulation/libTAO_IORManip.a \ $TAO_ROOT/tao/IORTable/libTAO_IORTable.a \ $TAO_ROOT/tao/TypeCodeFactory/libTAO_TypeCodeFactory.a \ $TAO_ROOT/tao/RTCORBA/libTAO_RTCORBA.a \ $TAO_ROOT/tao/IORInterceptor/libTAO_IORInterceptor.a \ $TAO_ROOT/tao/Messaging/libTAO_Messaging.a \ $TAO_ROOT/tao/ObjRefTemplate/libTAO_ObjRefTemplate.a \ $TAO_ROOT/tao/Valuetype/libTAO_Valuetype.a \ $TAO_ROOT/tao/RTScheduling/libTAO_RTScheduler.a \ $TAO_ROOT/tao/AnyTypeCode/libTAO_AnyTypeCode.a \ $TAO_ROOT/tao/PI/libTAO_PI.a \ $TAO_ROOT/tao/PI_Server/libTAO_PI_Server.a \ $TAO_ROOT/tao/Codeset/libTAO_Codeset.a \ $TAO_ROOT/tao/CodecFactory/libTAO_CodecFactory.a \ $TAO_ROOT/tao/RTPortableServer/libTAO_RTPortableServer.a" mkdir -p $DEST/source mkdir -p $DEST/data mkdir -p $DEST/images for i in $BINS; do b=`basename $i` if [ -x $i ]; then ( echo -n $DATE " "; size $i | grep -v text | awk '{print $4}' ) >> $DEST/source/${b}_size.txt fi done for i in $LIBS; do b=`basename $i`; if [ -f $i ]; then ( echo -n $DATE " "; size $i | awk '{s += $4} END {print s}' ) >> $DEST/source/${b}_size.txt fi done cd $DEST/source for i in $LIBS $BINS; do b=`basename $i` /usr/bin/tac ${b}_size.txt > $DEST/data/${b}_size.txt /usr/bin/tail -5 ${b}_size.txt > $DEST/data/LAST_${b}_size.txt $ACE_ROOT/bin/generate_footprint_chart.sh ${b}_size.txt $DEST/images/${b}_size.png $b done ace-6.4.5+dfsg.orig/bin/LabVIEW_RT/0000775000175000017500000000000013157240624014634 5ustar tggtggace-6.4.5+dfsg.orig/bin/LabVIEW_RT/Reboot_Target.ini0000755000175000017500000000404513154167357020111 0ustar tggtgg[Reboot_Target] server.app.propertiesEnabled=True server.ole.enabled=True server.tcp.paranoid=True server.tcp.servic="My Computer/VI Server" server.vi.callsEnabled=True server.vi.propertiesEnabled=True WebServer.DirectoryIndex="index.htm" WebServer.MimeTypes="htm;text/html;gif;image/gif;jpg;image/jpeg;png;image/png;txt;text/plain;html;text/html;jpeg;image/jpeg;css;text/css;llb;application/x-labview-llb;vi;application/x-labview-vi;doc;application/msword;dot;application/msword;bin;application/octet-stream;exe;application/octet-stream;rtf;application/rtf;pdf;application/pdf;ai;application/postscript;eps;application/postscript;ps;application/postscript;csh;application/x-csh;gtar;application/x-gtar;gz;application/x-gz;sh;application/x-sh;tar;application/x-tar;zip;application/zip;hqx;application/mac-binhex40;ua;audio/basic;wav;audio/wav;tif;image/tiff;tiff;image/tiff;xbm;image/x-xbitmap;rtx;text/richtext;qt;video/quicktime;mov;video/quicktime;avi;video/x-msvideo;movie;video/x-sgi-movie;aif;audio/aif;aifc;audio/aif;aiff;audio/aif;aim;application/x-aim;dif;video/x-dv;div;video/x-dv;js;application/x-javascript;pntg;image/x-macpaint;xlb;application/vnd.ms-excel;xls;application/vnd.ms-excel;ppa;application/vnd.ms-powerpoint;ppt;application/vnd.ms-powerpoint;pps;application/vnd.ms-powerpoint;pot;application/vnd.ms-powerpoint;pwz;application/vnd.ms-powerpoint;mid;audio/mid;midi;audio/mid;enc;video/mpeg;m1v;video/mpeg;mp2;video/mpeg;mpa;video/mpeg;mpe;video/mpeg;mpeg;video/mpeg;mpg;video/mpeg;psd;image/x-photoshop;bmp;image/bmp;pic;image/pic;ra;audio/vnd.rn-realaudio;rf;image/vnd.rf-realflash;rm;application/vnd.rn-realmedia;rp;image/vnd.rn-realpix;ram;audio/x-pn-realaudio;rmm;audio/x-pn-realaudio;rnx;application/vnd.rn-realplayer;rt;text/vnd.rn-realtext;rv;video/vnd.rn-realvideo;smi;application/smil;ssm;application/streamingmedia;sithqx;application/mac-binhex40;sit;application/x-stuffit" WebServer.RootPath=C:\Program Files\National Instruments\LabVIEW 8.2\www WebServer.TcpAccess="c+*" WebServer.ViAccess="+*" DebugServerEnabled=False DebugServerWaitOnLaunch=False ace-6.4.5+dfsg.orig/bin/LabVIEW_RT/README0000644000175000017500000000575413154167357015535 0ustar tggtgg This directory contains utilities for running the ACE+TAO test suite on a LabVIEW RT 8 / Phar Lap ETS target. Although it's running Phar Lap ETS, and thus would normally be able to run programs, this environment is different than plain Phar Lap ETS in that the LabVIEW RT layer takes up the only process able to run on Phar Lap. Thus, everything executed needs to be done via LabVIEW RT facilities. Thus, we have the following restrictions: 1. There's no NFS, no SMB; there's a target filesystem but no direct access. 2. No executables can be directly executed. This yields the following: - All test "programs" are built as DLLs instead of executables. The DLL has a known "main" entrypoint. To run the test, the DLL must be copied down to the target, explicitly loaded, and its entrypoint called. MPC will automatically build these DLLs when an executable is specified in the MPC file by basing the MPC project on the labviewrt_dll.mpb base. This is done by supplying "-base labviewrt_dll" on the MPC command line. - There is a test-controlling DLL that lives on the LabVIEW RT target, and is loaded when the target boots. This DLL spawns a thread that listens on a TCP port for connections; it runs a text-based protocol by which it can be directed to load and run test DLLs and report results. This DLL is in the labview_test_controller subdirectory; see its ReadMe.txt file for more details. - The Perl test framework in PerlACE has a ProcessLVRT.pm and TestTarget_LVRT.pm that know how to run the test protocol, get the log file back from the target, etc. in order to integrate the LabVIEW RT scheme into the ACE+TAO testing framework. - If a test encounters any significant errors that would produce something akin to a crash or significant leak on a multi-process OS, it will probably render the LabVIEW RT target unuseable and unresponsive. There are two utilities in this directory that will help in this sort of situation: 1. Reboot_Target.exe: A Windows executable that runs a LabVIEW VI to reboot a local target box. If the box is alive enough to be contacted and run the LabVIEW VI that triggers the reboot, this works fine. However, if the box is unresponsive, as it usually is, this doesn't work. The advantage of this utility is that it doesn't require any additional hardware or software. 2. PXI_Reset.exe: A Windows executable that runs a LabVIEW VI to trigger a hardware reset on the target box. This utility works all the time since it does a hardware reset. However, it requires an additional piece of hardware that connects to the host PC via USB and connects to the DB9 on the back of the PXI target. This little hardware box was custom-made by Lockheed Martin, so you can't just go buy one at Radio Shack. If neither of these utilities is workable for you, you can probably use a programmable power strip that can cycle the power on the target, and write a utility that drives it. ace-6.4.5+dfsg.orig/bin/LabVIEW_RT/labview_test_controller/0000775000175000017500000000000013157240624021567 5ustar tggtggace-6.4.5+dfsg.orig/bin/LabVIEW_RT/labview_test_controller/labview_test_controller.cpp0000644000175000017500000004143713154167357027245 0ustar tggtgg// // Defines the entry point for the LabVIEW RT test controller DLL application. // This DLL is loaded at system boot by LabVIEW RT. The controller waits for // TCP connections from the ACE+TAO test scripts. The test scripts will direct // operation of the tests via commands sent over TCP. In order to be ready for // connections without intervention via VI, the initial load will spawn a // thread that sets up the listening socket. #include "stdafx.h" #include #include #include #include #include #include #include #include #include #include #include // NULL is the documented way to check DLL handles, and this is plain // Windows code, not ACE, so we stick to the Microsoft way... // FUZZ: disable check_for_NULL // This is plain Windows code, not ACE. Therefore we disable // the check for ACE_OS // FUZZ: disable check_for_lack_ACE_OS // TEST_FUNC is the prototype for the called test's main entrypoint. It's // the normal C main. typedef int (*TEST_FUNC) (int argc, char *argv[]); // Thread entrypoints static unsigned int __stdcall test_control (void *param); static unsigned int __stdcall peer_svc (void *peer_p); static unsigned int __stdcall run_test (void *test_p); static const char *format_errmsg (unsigned int errcode, const char *prefix); // Logging information static const char *LogName = "acetao.log"; static HANDLE logf = INVALID_HANDLE_VALUE; BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { if (ul_reason_for_call == DLL_PROCESS_ATTACH) { return (0 != _beginthreadex (0, // security 8 * 1024, // stack size test_control, // entrypoint 0, // param 0, // creation flags 0)); // ptr to thread id } return TRUE; } class Test { public: Test () : dll_handle_ (NULL), thr_handle_ (0), entry_ (0), running_ (false), status_ (-1) {} ~Test (); HANDLE handle (void) { return this->thr_handle_; } int run (void); const char *start (const char *name); bool status (int *exit_status); int wait (void); void kill (void); // Clean up remnants of a test run. void cleanup (void); private: HMODULE dll_handle_; HANDLE thr_handle_; TEST_FUNC entry_; bool running_; int status_; enum { CMDLINE_LEN = 1024, ARGV_SIZE = 100 }; char name_[CMDLINE_LEN]; char cmdline_[CMDLINE_LEN]; int argc_; char *argv_[ARGV_SIZE]; }; class Peer { public: Peer (SOCKET h) : handle_ (h) {} // Run the Peer's session; intended to be called from a new thread devoted // to this peer's session. int svc (void); private: Peer () {}; // Process command input from socket. int command (void); // Send a reply string to the peer. int reply (const char *msg); SOCKET handle_; Test test_; }; // Run a peer session; assume there's a thread for each session, so this // object has all it needs for context located in 'this' object, and it can // block at any point as long as one remembers that there is one or more // test threads running and some attention must be paid to the encapsulated // socket handle over which this object receives control commands from the // host test driver. int Peer::svc (void) { // Read commands until EOF (peer closed) or protocol error while (0 == this->command ()) ; closesocket (this->handle_); this->handle_ = INVALID_SOCKET; return 0; } int Peer::command (void) { // The protocol exchanges with the peer are execpted to be lock-step // request-reply command lines, so we can make assumptions about a complete // line being available to make life easier. const int MAX_RECV = 1024; char line[MAX_RECV], *p; p = &line[0]; int count = 0, len = 0; while ((count = recv (this->handle_, p, MAX_RECV - len, 0)) > 0) { p[count] = '\0'; len += count; p += count; char *nl; if ((nl = strchr (line, '\n')) == 0) continue; // At this point we have a 0-terminated string with a newline ending // the command line. Break out and process the command. break; } if (count <= 0) return -1; // Relay closed/error socket to caller char *cmd = strtok (line, "\t \n\r"); if (cmd == 0) { char err[1024]; sprintf (err, "Can't parse input: %s\n", line); this->reply (err); return -1; } // Which command is it? These commands are known: // // run [args] // Run test in the named test-dll; respond with "OK" or an error string. // status // If test still running return "RUNNING" else return exit status. // wait // Wait for test to exit; return "OK" // kill // Kill the thread with the most recent test; return "OK". // snaplog // Take a snapshot of the current stdout/stderr log to a new file // name and reset the stdout/stderr log. if (strcmp ("run", cmd) == 0) { char *test = strtok (0, "\t \n\r"); if (test == 0) { this->reply ("Malformed run command\n"); return -1; } // start() pulls apart the rest of the command line... const char *errmsg = this->test_.start (test); if (errmsg == 0) this->reply ("OK\n"); else this->reply (errmsg); } else if (strcmp ("status", cmd) == 0) { int status; if (this->test_.status (&status)) { char retvalmsg[64]; sprintf (retvalmsg, "%d\n", status); this->reply (retvalmsg); } else this->reply ("RUNNING\n"); } else if (strcmp ("wait", cmd) == 0) { int status = this->test_.wait (); char retvalmsg[64]; sprintf (retvalmsg, "%d\n", status); this->reply (retvalmsg); } else if (strcmp ("kill", cmd) == 0) { // Killing things is bad... say we can't and the host should reboot us. this->reply ("NO - please reboot me\n"); } else if (strcmp ("waitforfile", cmd) == 0) { char *name = strtok (0, "\t \n\r"); if (name == 0) { this->reply ("Malformed waitforfile command\n"); return -1; } char *secs_s = strtok (0, "\t \n\r"); int secs = 0; if (secs_s == 0 || (secs = atoi (secs_s)) <= 0) { this->reply ("Malformed waitforfile command\n"); return -1; } struct _stat info; const char *msg = 0; bool found = false; while (secs > 0) { if (_stat (name, &info) == -1) // No file yet { if (errno != ENOENT) { // Something more serious than no file yet; bail out. msg = format_errmsg (errno, name); break; } } else { if (info.st_size > 0) { found = true; break; } } // Either no file yet, or it's there but with no content yet. Sleep (1 * 1000); // arg is in msec --secs; } if (found) this->reply ("OK\n"); else if (secs == 0) this->reply ("TIMEOUT\n"); else this->reply (msg); } else if (strcmp ("snaplog", cmd) == 0) { if (logf == INVALID_HANDLE_VALUE) { this->reply ("NONE\n"); } else { CloseHandle (logf); if (0 == rename (LogName, "snapshot.txt")) { char abspath[1024]; if (_fullpath (abspath, "snapshot.txt", 1024)) { strcat (abspath, "\n"); this->reply (abspath); } else { // Last ditch effort to get a name back to the client this->reply ("\\ni-rt\\system\\snapshot.txt\n"); } } else { this->reply ("NONE\n"); } // Reset stdout/stderr to a new file logf = CreateFile (LogName, FILE_ALL_ACCESS, FILE_SHARE_READ, 0, // security CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); SetStdHandle (STD_OUTPUT_HANDLE, logf); SetStdHandle (STD_ERROR_HANDLE, logf); } } else { this->reply ("Unrecognized command\n"); return -1; } return 0; } int Peer::reply (const char *msg) { int len = (int)strlen (msg); // size_t -> int return send (this->handle_, msg, len, 0) > 0 ? 0 : -1; } Test::~Test () { this->cleanup (); } int Test::run (void) { this->running_ = true; try { this->status_ = (this->entry_) (this->argc_, this->argv_); } catch (...) { // Try to note this exception then save the log file before bailing out. DWORD bl; char msg[256]; sprintf (msg, "Exception in %s caught by labview_test_controller\n", this->name_); WriteFile (logf, msg, (DWORD)strlen(msg), &bl, 0); FlushFileBuffers (logf); CloseHandle (logf); throw; } this->running_ = false; // It's possible to cleanup() here; however, that would introduce a race // with start() following beginthreadex(). So do all the cleanup on user // action - either getting status, waiting, killing, or running another // test. Or, terminating the connection. return 0; } const char * Test::start (const char *name) { if (this->running_) return "Already running\n"; const char *msg = 0; // Reset test status to not inadvertantly report a previous test. this->status_ = -1; this->cleanup (); // Resets cmdline_, argc_, argv_ // The command line is part-way through being tokenized by strtok(). It // left off after the program name. Anything remaining are the command // line arguments for the program. Pick off whatever is there, copy it // to the cmdline_ array and fill in argc_/argv_ for the eventual run. strcpy (this->name_, name); this->argv_[0] = this->name_; this->argc_ = 1; size_t cmdchars = 0; for (char *token = strtok (0, "\t \n\r"); token != 0 && (cmdchars + strlen (token) + 1) < CMDLINE_LEN; token = strtok (0, "\t \n\r")) { // We have a new token and it will fit in cmdline_. Copy it to the // next spot in cmdline_, add it to argv_/argc_ then update cmdchars // to account for the copied-in token and its nul terminator. strcpy (&this->cmdline_[cmdchars], token); this->argv_[this->argc_] = &this->cmdline_[cmdchars]; ++this->argc_; cmdchars += (strlen (token) + 1); } char libspec[1024]; sprintf (libspec, "%s.dll", name); if ((this->dll_handle_ = LoadLibrary (libspec)) == NULL) return format_errmsg (GetLastError (), libspec); this->entry_ = (TEST_FUNC) GetProcAddress (this->dll_handle_, "main"); if (this->entry_ == NULL) { msg = format_errmsg (GetLastError (), "main"); this->cleanup (); return msg; } else { unsigned int thread_id; /* unused */ uintptr_t h = _beginthreadex (0, // security 1024 * 1024, // stack size run_test, // entrypoint (void *)this, // arglist 0, // initflag &thread_id); // thread ID this->thr_handle_ = (HANDLE) h; if (h == 0) // Test thread may have access to thr_handle_ { msg = format_errmsg (GetLastError (), "spawn"); this->cleanup (); return msg; } } return 0; } bool Test::status (int *exit_status) { if (this->running_) return false; // still running *exit_status = this->status_; this->cleanup (); return true; } int Test::wait (void) { WaitForSingleObject (this->thr_handle_, INFINITE); if (!this->running_) this->cleanup (); return this->status_; } void Test::kill (void) { TerminateThread (this->thr_handle_, -1); this->cleanup (); this->running_ = false; this->status_ = -1; } // Clean up remnants of a test run. void Test::cleanup (void) { if (this->dll_handle_ != NULL) { FreeLibrary (this->dll_handle_); this->dll_handle_ = NULL; } if (this->thr_handle_ != 0) { CloseHandle (this->thr_handle_); this->thr_handle_ = 0; } this->entry_ = 0; this->argc_ = 0; for (int i = 0; i < ARGV_SIZE; ++i) this->argv_[i] = 0; memset (this->cmdline_, 0, CMDLINE_LEN); } static unsigned int __stdcall test_control (void * /* param */) { // cd to ace dir?? (can this be an env variable?) // redirect stdout/stderr to a file logf = CreateFile (LogName, FILE_ALL_ACCESS, FILE_SHARE_READ, 0, // security OPEN_ALWAYS, // Don't crush a previous one FILE_ATTRIBUTE_NORMAL, 0); if (logf == INVALID_HANDLE_VALUE) perror (LogName); else { SetFilePointer (logf, 0, 0, FILE_END); // Append new content SetStdHandle (STD_OUTPUT_HANDLE, logf); SetStdHandle (STD_ERROR_HANDLE, logf); } WORD want; WSADATA offer; want = MAKEWORD (2, 2); if (0 != WSAStartup (want, &offer)) { perror ("WSAStartup"); CloseHandle (logf); return WSAGetLastError (); } // listen on port 8888 (can I set an env variable for this?) SOCKET acceptor = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); sockaddr_in listen_addr; memset (&listen_addr, 0, sizeof (listen_addr)); listen_addr.sin_family = AF_INET; listen_addr.sin_addr.s_addr = INADDR_ANY; listen_addr.sin_port = htons (8888); if (SOCKET_ERROR == bind (acceptor, (struct sockaddr *)&listen_addr, sizeof (listen_addr))) { perror ("bind"); } else { listen (acceptor, 10); SOCKET peer; while ((peer = accept (acceptor, 0, 0)) != INVALID_SOCKET) { Peer *p = new Peer (peer); if (p == 0) { perror ("Out of memory"); closesocket (peer); peer = INVALID_SOCKET; continue; } if (0 == _beginthreadex (0, // security 64 * 1024, // stack size peer_svc, // entrypoint (void *)p, // param 0, // creation flags 0)) // ptr to thread id { perror ("beginthreadex peer"); closesocket (peer); delete p; } p = 0; peer = INVALID_SOCKET; } perror ("accept"); } closesocket (acceptor); WSACleanup (); return 0; } // Entrypoint for thread that's spawned to run a peer's session. Direct // control to the peer class. static unsigned int __stdcall peer_svc (void *peer_p) { Peer *p = (Peer *)peer_p; DWORD status = p->svc (); delete p; return status; } // Entrypoint for the thread spawned to run a test. The thread arg is the // Test * - call back to the test's run() method; return the test exit code // as the thread's return value. static unsigned int __stdcall run_test (void *test_p) { Test *t = (Test *)test_p; return t->run (); } // Format a Windows system or Winsock error message given an error code. static const char * format_errmsg (unsigned int errcode, const char *prefix) { static const size_t errmsgsize = 1024; static char errmsg[errmsgsize]; sprintf (errmsg, "%s: ", prefix); size_t len = strlen (errmsg); char *next = &errmsg[len]; size_t max_fmt = errmsgsize - len; if (0 != FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, 0, errcode, 0, // Use default language next, (DWORD)max_fmt, 0)) { strcat (errmsg, "\n"); return errmsg; } errno = errcode; char *msg = _strerror (prefix); sprintf (errmsg, "err %d: %s", errcode, msg); return errmsg; } #ifdef TEST_RUNNER_EXPORTS #define TEST_RUNNER_API __declspec(dllexport) #else #define TEST_RUNNER_API __declspec(dllimport) #endif __declspec(dllexport) int test_entry(void) { return 0; } ace-6.4.5+dfsg.orig/bin/LabVIEW_RT/labview_test_controller/stdafx.cpp0000644000175000017500000000045613154167357023577 0ustar tggtgg// stdafx.cpp : source file that includes just the standard includes // labview_test_controller.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file ace-6.4.5+dfsg.orig/bin/LabVIEW_RT/labview_test_controller/test.cpp0000644000175000017500000000056513154167357023266 0ustar tggtgg#include __declspec(dllimport) int test_entry(void); // This is plain Windows code, not ACE. Therefore we disable // the check for ACE_OS // FUZZ: disable check_for_lack_ACE_OS // FUZZ: disable check_for_improper_main_declaration int main (int, char *[]) { char line[80]; test_entry(); puts ("Ok, go... hit return to stop."); gets (line); return 0; } ace-6.4.5+dfsg.orig/bin/LabVIEW_RT/labview_test_controller/test.vcproj0000644000175000017500000000661713154167357024013 0ustar tggtgg ace-6.4.5+dfsg.orig/bin/LabVIEW_RT/labview_test_controller/labview_test_controller.sln0000644000175000017500000000305613154167357027252 0ustar tggtggMicrosoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "labview_test_controller", "labview_test_controller.vcproj", "{646E6863-F3BE-403A-8B53-20C02664907B}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcproj", "{01781FA2-36A3-49DA-A00C-2DEAE6A286FF}" ProjectSection(ProjectDependencies) = postProject {646E6863-F3BE-403A-8B53-20C02664907B} = {646E6863-F3BE-403A-8B53-20C02664907B} EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {646E6863-F3BE-403A-8B53-20C02664907B}.Debug.ActiveCfg = Debug|Win32 {646E6863-F3BE-403A-8B53-20C02664907B}.Debug.Build.0 = Debug|Win32 {646E6863-F3BE-403A-8B53-20C02664907B}.Release.ActiveCfg = Release|Win32 {646E6863-F3BE-403A-8B53-20C02664907B}.Release.Build.0 = Release|Win32 {01781FA2-36A3-49DA-A00C-2DEAE6A286FF}.Debug.ActiveCfg = Debug|Win32 {01781FA2-36A3-49DA-A00C-2DEAE6A286FF}.Debug.Build.0 = Debug|Win32 {01781FA2-36A3-49DA-A00C-2DEAE6A286FF}.Release.ActiveCfg = Release|Win32 {01781FA2-36A3-49DA-A00C-2DEAE6A286FF}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal ace-6.4.5+dfsg.orig/bin/LabVIEW_RT/labview_test_controller/stdafx.h0000644000175000017500000000056013154167357023240 0ustar tggtgg// stdafx.h : include file for standard system include files, or // project specific include files that are used frequently, but are // changed infrequently // #pragma once #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers // Windows Header Files: #include // TODO: reference additional headers your program requires here ace-6.4.5+dfsg.orig/bin/LabVIEW_RT/labview_test_controller/ReadMe.txt0000644000175000017500000000762213154167357023502 0ustar tggtgg ======================================================================== DYNAMIC LINK LIBRARY : labview_test_controller Project Overview ======================================================================== The labview_test_controller DLL is needed to control execution and reporting for ACE+TAO tests on a LabVIEW RT/Pharlap ETS target. The LabVIEW RT environment can not execute programs - LabVIEW RT itself is the one program that runs on the Pharlap ETS base, so no other processes can be started. This DLL is built on the host VC7.1 Windows machine and copied to the target. The target's \ni-rt.ini file must have the full path of the labview_test_controller.dll on the target added to the [STARTUP] section, EarlyStartupLibraries key. If there are already entries in that key, append labview_test_controller.dll's path with a semi-colon separator. For example, this is what mine ended up as: [STARTUP] EarlyStartupLibraries=C:\ni-rt\system\lvuste.dll;C:\ni-rt\system\tsengine.dll;C:\ni-rt\system\nisl_emb.dll;C:\ni-rt\labview_test_controller.dll; MainExe=/ni-rt/system/emblview.exe After setting up the ni-rt.ini file and the DLL, reboot the target to load the controller DLL. Keep in mind that the current working directory while tests are running will be, at least on mine, \ni-rt\system. The test logs end up in \ni-rt\system\log. The labview_test_controller spawns a thread when the DLL is loaded at system start. The child thread starts listening on TCP port 8888. For each new connection to port 8888 a new thread is spawned to run the session. The test host issues text commands to the controller via this TCP connection. The responses are text as well. Thus, it's possible to test it using plain telnet. There's also a "test" project in this VC7.1 solution. The test project is a simple console app that calls the main thread's entrypoint in labview_test_controller, facilitating its testing on the host Windows machine where there's decent debugging capability. Debugging on the LabVIEW target is by printf only. The client side of the TCP connection that drives this test controller is in the ACE_wrappers/bin/PerlACE/ProcessLVRT.pm. The TestTarget_LVRT.pm is also involved in testing on the LabVIEW RT target. The remainder of this is what Visual Studio .NET generated for this project. ======================================================================== AppWizard has created this labview_test_controller DLL for you. This file contains a summary of what you will find in each of the files that make up your labview_test_controller application. labview_test_controller.vcproj This is the main project file for VC++ projects generated using an Application Wizard. It contains information about the version of Visual C++ that generated the file, and information about the platforms, configurations, and project features selected with the Application Wizard. labview_test_controller.cpp This is the main DLL source file. When created, this DLL does not export any symbols. As a result, it will not produce a .lib file when it is built. If you wish this project to be a project dependency of some other project, you will either need to add code to export some symbols from the DLL so that an export library will be produced, or you can set the Ignore Input Library property to Yes on the General propert page of the Linker folder in the project's Property Pages dialog box. ///////////////////////////////////////////////////////////////////////////// Other standard files: StdAfx.h, StdAfx.cpp These files are used to build a precompiled header (PCH) file named labview_test_controller.pch and a precompiled types file named StdAfx.obj. ///////////////////////////////////////////////////////////////////////////// Other notes: AppWizard uses "TODO:" comments to indicate parts of the source code you should add to or customize. ///////////////////////////////////////////////////////////////////////////// ace-6.4.5+dfsg.orig/bin/LabVIEW_RT/labview_test_controller/labview_test_controller.vcproj0000644000175000017500000001022713154167357027757 0ustar tggtgg ace-6.4.5+dfsg.orig/bin/LabVIEW_RT/PXI_Reset.ini0000755000175000017500000000404113154167357017147 0ustar tggtgg[PXI_Reset] server.app.propertiesEnabled=True server.ole.enabled=True server.tcp.paranoid=True server.tcp.servic="My Computer/VI Server" server.vi.callsEnabled=True server.vi.propertiesEnabled=True WebServer.DirectoryIndex="index.htm" WebServer.MimeTypes="htm;text/html;gif;image/gif;jpg;image/jpeg;png;image/png;txt;text/plain;html;text/html;jpeg;image/jpeg;css;text/css;llb;application/x-labview-llb;vi;application/x-labview-vi;doc;application/msword;dot;application/msword;bin;application/octet-stream;exe;application/octet-stream;rtf;application/rtf;pdf;application/pdf;ai;application/postscript;eps;application/postscript;ps;application/postscript;csh;application/x-csh;gtar;application/x-gtar;gz;application/x-gz;sh;application/x-sh;tar;application/x-tar;zip;application/zip;hqx;application/mac-binhex40;ua;audio/basic;wav;audio/wav;tif;image/tiff;tiff;image/tiff;xbm;image/x-xbitmap;rtx;text/richtext;qt;video/quicktime;mov;video/quicktime;avi;video/x-msvideo;movie;video/x-sgi-movie;aif;audio/aif;aifc;audio/aif;aiff;audio/aif;aim;application/x-aim;dif;video/x-dv;div;video/x-dv;js;application/x-javascript;pntg;image/x-macpaint;xlb;application/vnd.ms-excel;xls;application/vnd.ms-excel;ppa;application/vnd.ms-powerpoint;ppt;application/vnd.ms-powerpoint;pps;application/vnd.ms-powerpoint;pot;application/vnd.ms-powerpoint;pwz;application/vnd.ms-powerpoint;mid;audio/mid;midi;audio/mid;enc;video/mpeg;m1v;video/mpeg;mp2;video/mpeg;mpa;video/mpeg;mpe;video/mpeg;mpeg;video/mpeg;mpg;video/mpeg;psd;image/x-photoshop;bmp;image/bmp;pic;image/pic;ra;audio/vnd.rn-realaudio;rf;image/vnd.rf-realflash;rm;application/vnd.rn-realmedia;rp;image/vnd.rn-realpix;ram;audio/x-pn-realaudio;rmm;audio/x-pn-realaudio;rnx;application/vnd.rn-realplayer;rt;text/vnd.rn-realtext;rv;video/vnd.rn-realvideo;smi;application/smil;ssm;application/streamingmedia;sithqx;application/mac-binhex40;sit;application/x-stuffit" WebServer.RootPath=C:\Program Files\National Instruments\LabVIEW 8.0\www WebServer.TcpAccess="c+*" WebServer.ViAccess="+*" DebugServerEnabled=False DebugServerWaitOnLaunch=False ace-6.4.5+dfsg.orig/bin/mwc.pl0000755000175000017500000000364613154167357014203 0ustar tggtgg#! /usr/bin/perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # ****************************************************************** # Author: Chad Elliott # Date: 6/17/2002 # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** require 5.006; use strict; use FindBin; use File::Spec; use File::Basename; my($basePath) = (defined $FindBin::RealBin ? $FindBin::RealBin : File::Spec->rel2abs(dirname($0))); if ($^O eq 'VMS') { $basePath = File::Spec->rel2abs(dirname($0)) if ($basePath eq ''); $basePath = VMS::Filespec::unixify($basePath); } $basePath .= '/MakeProjectCreator'; my($mpcroot) = $ENV{MPC_ROOT}; my($mpcpath) = (defined $mpcroot ? $mpcroot : dirname(dirname($basePath)) . '/MPC'); unshift(@INC, $mpcpath . '/modules'); if (defined $mpcroot) { print "MPC_ROOT was set to $mpcroot.\n"; } if (! -d "$mpcpath/modules") { print STDERR "ERROR: Unable to find the MPC modules in $mpcpath.\n"; if (defined $mpcroot) { print STDERR "Your MPC_ROOT environment variable does not point to a ", "valid MPC location.\n"; } else { print STDERR "You can set the MPC_ROOT environment variable to the ", "location of MPC.\n"; } exit(255); } require Driver; # ************************************************************ # Subroutine Section # ************************************************************ sub getBasePath { return $mpcpath; } # ************************************************************ # Main Section # ************************************************************ my($driver) = new Driver($basePath, Driver::workspaces()); exit($driver->run(@ARGV)); ace-6.4.5+dfsg.orig/bin/mail_test_stats.sh0000755000175000017500000000231213154167357016600 0ustar tggtgg#!/bin/sh if test -z $1; then CURRENTDATE=`date -u +%Y_%m_%d`; else CURRENTDATE=$1; fi if test -z $2; then PREFIX=`date -u +%Y%m%d%a`; else PREFIX=$2; fi if test -z $3; then MAILTO="devo-group@list.isis.vanderbilt.edu"; else MAILTO=$3; fi cd $ACE_ROOT/bin ./diff-builds-and-group-fixed-tests-only.sh $CURRENTDATE $PREFIX ./cleanbuilds.sh $CURRENTDATE MAIL="mail -S smtp=mail.remedy.nl" MAILFROM="jwillemsen@remedy.nl" MAIL_ATTACHMENTS= for fn in `ls *Tests.txt`; do MAIL_ATTACHMENTS=$MAIL_ATTACHMENTS+"-a $fn " done for fn in `ls *NoTestRev.txt`; do MAIL_ATTACHMENTS=$MAIL_ATTACHMENTS+"-a $fn " done mailfile="/tmp/rsmailfile" { echo "Sending test statistics for" $CURRENTDATE echo cat *NoTestRev.txt echo echo "Sending with revision number" cat *Tests.txt echo echo "Sending results per build" cat *Builds.txt } > $mailfile $MAIL -v -r $MAILFROM -s "ACE/TAO/CIAO/DAnCE test statistics for $CURRENTDATE" $MAILTO < $mailfile rm -f $mailfile mailfile="/tmp/rsmailfile" { echo "Sending failing tests for " $CURRENTDATE echo cat cleanbuildresults.txt } > $mailfile $MAIL -v -r $MAILFROM -s "ACE/TAO/CIAO/DAnCE failing tests for $CURRENTDATE" $MAILTO < $mailfile rm -f $mailfile ace-6.4.5+dfsg.orig/bin/bin.mpc0000644000175000017500000000025013154167357014312 0ustar tggtgg// -*- MPC -*- project(bin) : aceexe, script { exename = envinfo Source_Files { envinfo.cpp } Script_Files { auto_run_tests.pl ace_tests.lst } } ace-6.4.5+dfsg.orig/bin/generate_export_file.pl0000755000175000017500000001076413154167357017606 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # -*- perl -*- # Replacement for the old trusty GenExportH.bat # Creates the nice little *_export file which is used for # importing and exporting of symbols in DLLs. # (they are soooo cute!) use Getopt::Std; ############################################################################## # Grab the options $flags = join (" ", @ARGV); if (!getopts ('df:hsn') || $opt_h) { print STDERR "generate_export_file.pl [-d] [-f dependency] [-n] library_name\n", "\n", " -d Turn on debug mode\n", " -f Adds a dependency to another *_HAS_DLL macro\n", " -n Do not add in ACE_AS_STATIC_LIBS check\n", "\n", "generate_export_file creates the *_export files that are used\n", "in exporting of symbols for DLLs (and not exporting them when\n", "the library is static). If library_name is something like\n", "\"Foo\", then the file will contain definitions for Foo_Export\n", "and FOO_SINGLETON_DECLARE, etc. which will be controlled by\n", "FOO_HAS_DLL, etc.\n"; exit (1); } if (defined $opt_d) { print STDERR "Debugging Turned on\n"; if (defined $opt_f) { print STDERR "Dependency to $opt_f\n"; } if (defined $opt_n) { print STDERR "ACE_AS_STATIC_LIBS turned off\n"; } } if ($#ARGV < 0) { print STDERR "No library_name specified, use -h for help\n"; exit (1); } $name = shift @ARGV; $ucname = uc $name; ############################################################################## # Prologue $prologue = ' // -*- C++ -*- // Definition for Win32 Export directives. // This file is generated automatically by generate_export_file.pl '."$flags".' // ------------------------------'." #ifndef -UC-_EXPORT_H #define -UC-_EXPORT_H #include \"ace/config-all.h\" "; ############################################################################## # Static Stuff if (!defined $opt_n) { $static_stuff = " #if defined (ACE_AS_STATIC_LIBS) && !defined (-UC-_HAS_DLL) # define -UC-_HAS_DLL 0 #endif /* ACE_AS_STATIC_LIBS && -UC-_HAS_DLL */ "; } ############################################################################## # Dependencies if (defined $opt_f) { $has_dll = " #if defined ($opt_f) # if !defined (-UC-_HAS_DLL) # define -UC-_HAS_DLL 0 # endif /* ! -UC-_HAS_DLL */ #else # if !defined (-UC-_HAS_DLL) # define -UC-_HAS_DLL 1 # endif /* ! -UC-_HAS_DLL */ #endif "; } else { $has_dll = " #if !defined (-UC-_HAS_DLL) # define -UC-_HAS_DLL 1 #endif /* ! -UC-_HAS_DLL */ "; } ############################################################################## # Epilogue $epilogue = " #if defined (-UC-_HAS_DLL) && (-UC-_HAS_DLL == 1) # if defined (-UC-_BUILD_DLL) # define -NC-_Export ACE_Proper_Export_Flag # define -UC-_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) # define -UC-_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) # else /* -UC-_BUILD_DLL */ # define -NC-_Export ACE_Proper_Import_Flag # define -UC-_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) # define -UC-_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) # endif /* -UC-_BUILD_DLL */ #else /* -UC-_HAS_DLL == 1 */ # define -NC-_Export # define -UC-_SINGLETON_DECLARATION(T) # define -UC-_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) #endif /* -UC-_HAS_DLL == 1 */ // Set -UC-_NTRACE = 0 to turn on library specific tracing even if // tracing is turned off for ACE. #if !defined (-UC-_NTRACE) # if (ACE_NTRACE == 1) # define -UC-_NTRACE 1 # else /* (ACE_NTRACE == 1) */ # define -UC-_NTRACE 0 # endif /* (ACE_NTRACE == 1) */ #endif /* !-UC-_NTRACE */ #if (-UC-_NTRACE == 1) # define -UC-_TRACE(X) #else /* (-UC-_NTRACE == 1) */ # if !defined (ACE_HAS_TRACE) # define ACE_HAS_TRACE # endif /* ACE_HAS_TRACE */ # define -UC-_TRACE(X) ACE_TRACE_IMPL(X) # include \"ace/Trace.h\" #endif /* (-UC-_NTRACE == 1) */ #endif /* -UC-_EXPORT_H */ // End of auto generated file. "; ############################################################################## # Print the stuff out foreach $export ($prologue, $static_stuff, $has_dll, $epilogue) { ## -NC- stands for normal case, the name as it is ## -UC- stands for the name all upper case map { s/-NC-/$name/g; s/-UC-/$ucname/g; } $export; print $export; }; ace-6.4.5+dfsg.orig/bin/create_ace_build0000755000175000017500000001607313154167357016233 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # Creates an ACE build tree in directory "build/" below the current # directory, which must be an ACE "top level" directory (such as # $ACE_ROOT). The build tree directory structure mirrors that of the ACE # top level directory structure, except that instead of containing any plain # files, it contains only symlinks to the files in the ACE top level structure. # # This program has a similar purpose to "clone", but in addition to # only creating symlinks (clone creates hard links, by default), this # script: # 1) uses relative rather than absolute symlinks, # 2) tries not to put junk files into the build tree, # 3) only creates a new tree in a build/ directory below the current, # top level ACE directory (it's a feature :-), but it does enforce # consistency). # # This program can be re-run on a build tree at any time in order to # update it. It will add symlinks for newly added files, and remove # any that are no longer valid. # # If the starts with "build/", that part will be removed # from it. # # The first three lines above let this script run without specifying the # full path to perl, as long as it is in the user's PATH. # Taken from perlrun man page. use File::Find (); use File::Basename; use FileHandle; print "You should consider using clone_build_tree.pl found with MPC\n"; $usage = "usage: $0 -? | [-a] [-d ] [-v] \n"; $directory_mode = 0777; #### Will be modified by umask, also. $verbose = 0; $source='.'; $absolute= 0; $perl_version = $] + 0; if ($perl_version >= 5) { #### Use an eval so that this script will compile with perl4. eval <<'PERL5_CWD' require Cwd; sub cwd { Cwd::getcwd (); } PERL5_CWD } else { sub cwd { local ($pwd); chop ($pwd = `pwd`); $pwd; } } my($starting_dir) = cwd (); my(@nlinks) = (); my($build_re) = undef; sub cab_link { my($real) = shift; my($fake) = shift; my($uif) = ($^O eq 'MSWin32' ? 'link' : 'symlink'); print "$uif $real $fake\n" if $verbose; my($status) = 0; if ($^O eq 'MSWin32') { my($fixed) = $fake; $fixed =~ s/$build_re//; push(@nlinks, $fixed); chdir(dirname($fake)); $status = link ($real, basename($fake)); chdir($starting_dir); } else { $status = symlink ($real, $fake); } if (!$status) { warn "$0: $uif to $fake failed\n"; } } #### #### Process command line args. #### while ($#ARGV >= 0 && $ARGV[0] =~ /^-/) { if ($ARGV[0] eq '-v') { $verbose = 1; } elsif ($ARGV[0] eq '-d') { if ($ARGV[1] =~ /^\d+$/) { $directory_mode = eval ($ARGV[1]); shift; } else { warn "$0: must provide argument for -d option\n"; die $usage; } } elsif ($ARGV[0] eq '-a') { $source = &cwd (); $absolute = 1; } elsif ($ARGV[0] eq '-?') { print "$usage"; exit; } else { warn "$0: unknown option $ARGV[0]\n"; die $usage; } shift; } die $usage unless $#ARGV == 0; $build = $ARGV[0]; $build =~ s%^build[/\\]%%; #### remove leading "build/", if any $build = "build/$build"; ## Set up the build regular expression use under MSWin32 if ($^O eq 'MSWin32') { ## Get the original build name $build_re = $build; ## Remove any trailing slashes $build_re =~ s/[\\\/]+$//; ## Add a single trailing slash $build_re .= '/'; ## Escape any special characters $build_re =~ s/([\\\$\[\]\(\)\.])/\\$1/g; } #### #### Check that we're in an ACE "top level" directory. #### (-d 'ace' && -d 'include') || die "$0: must be in an ACE top level (ACE_ROOT) directory!\n"; #### #### Create build directories, if needed. #### -d 'build' || mkdir ('build', $directory_mode); -d "$build" || mkdir ("$build", $directory_mode); #### #### Get all ACE plain file and directory names. #### @files = (); sub wanted { my ($dev,$ino,$mode,$nlink,$uid,$gid); /^CVS\z/s && ($File::Find::prune = 1) || /^build\z/s && ($File::Find::prune = 1) || /^\..*obj\z/s && ($File::Find::prune = 1) || /^Templates\.DB\z/s && ($File::Find::prune = 1) || /^Debug\z/s && ($File::Find::prune = 1) || /^Release\z/s && ($File::Find::prune = 1) || /^Static_Debug\z/s && ($File::Find::prune = 1) || /^Static_Release\z/s && ($File::Find::prune = 1) || ( ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) && ! -l $_ && ! /^core\z/s && ! /^.*\.state\z/s && ! /^.*\.so\z/s && ! /^.*\.[oa]\z/s && ! /^.*\.dll\z/s && ! /^.*\.lib\z/s && ! /^.*\.obj\z/s && ! /^.*~\z/s && ! /^\.\z/s && ! /^\.#.*\z/s && ! /^.*\.log\z/s ) && push(@files, $File::Find::name); } File::Find::find({wanted => \&wanted}, '.'); #### #### Create directories and symlinks to files. #### foreach $file (@files) { $file =~ s%^./%%g; #### excise leading ./ directory component if (-d $file) { unless (-d "$build/$file") { print "mkdir $build/$file, $directory_mode\n" if $verbose; mkdir ("$build/$file", $directory_mode); } } else { unless (-e "$build/$file") { if (!$absolute) { $up = '../..'; while ($file =~ m%/%g) { $up .= '/..'; } cab_link("$up/$file", "$build/$file"); } else { $path = $source . '/' . $file; cab_link("$path", "$build/$file"); } } } } #### #### Find all the symlinks in the build directory, and remove ones #### that are no longer actually linked to a file. #### if ($^O eq 'MSWin32') { my($lfh) = new FileHandle(); my($txt) = "$build/create_ace_build.links"; if (open($lfh, "$txt")) { while(<$lfh>) { my($line) = $_; $line =~ s/\s+$//; if (-e $line) { push(@nlinks, $line); } else { print "Removing $build/$line \n" if $verbose; unlink("$build/$line") || warn "$0: unlink of $build/$line failed\n"; } } close($lfh); } ## Rewrite the link file. unlink($txt); if (open($lfh, ">$txt")) { foreach my $file (@nlinks) { print $lfh "$file\n"; } close($lfh); } } else { @lfiles = (); sub lcheck { ## There's no way to know if we have hard linked back to a now ## non-existent file. So, just do the normal -l on the file ## which will cause no files to be pushed on Windows. if (-l $_) { push(@lfiles, $File::Find::name); } } File::Find::find({wanted => \&lcheck}, $build); foreach (@lfiles) { local @s = stat $_; if ($#s == -1) { print "Removing $_ \n" if $verbose; unlink $_ || warn "$0: unlink of $_ failed\n"; } } } #### #### Done: print message. #### print "\nCompleted creation of $build/.\n"; my($msg) = ''; if (! -e "$build/ace/config.h") { $msg .= "$build/ace/config.h"; } if ($^O ne 'MSWin32' && ! -e "$build/include/makeinclude/platform_macros.GNU") { if ($msg ne '') { $msg .= " and\n"; } $msg .= "$build/include/makeinclude/platform_macros.GNU"; } if ($msg ne '') { print "Be sure to setup $msg.\n"; } #### EOF ace-6.4.5+dfsg.orig/bin/ace_install_pkgconfig.pl0000755000175000017500000000266513154167357017722 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # ******************************************************************** # ace_install_pkgconfig.pl - Creates *.pc files for pkg-config in the # installed location, based on the *.pc.in # files from the source tree, with @foo@ # variables replaced with their values. # Called from the MPC-generated makefiles. # ******************************************************************** use strict; use Getopt::Long; my ($prefix, $libdir, $libs, $destdir, $version, %custom); GetOptions('prefix=s' => \$prefix, 'libdir=s' => \$libdir, 'libs=s' => \$libs, 'destdir=s' => \$destdir, 'version=s' => \$version, 'custom=s' => \%custom); my %subs = ('LIBS' => $libs, 'VERSION' => $version, 'exec_prefix' => $prefix, 'prefix' => $prefix, 'includedir' => "$prefix/include", 'libdir' => "$prefix/$libdir"); for my $k (keys %custom) { $subs{$k} = $custom{$k}; } my $pcdir = "${destdir}$prefix/$libdir/pkgconfig"; if (scalar @ARGV && ! -d $pcdir) { mkdir($pcdir, 0755); } for my $file (@ARGV) { open IN, $file; my $pcfile = $file; $pcfile =~ s/\.in$//; open OUT, ">$pcdir/$pcfile"; while () { s/@(\w+)@/exists $subs{$1} ? $subs{$1} : $&/ge; print OUT $_; } close OUT; close IN; } ace-6.4.5+dfsg.orig/bin/g++dep0000755000175000017500000001117713154167357014046 0ustar tggtgg#! /bin/sh # This utility is a lightly edited version of the freed Berkeley # script `mkdep'. The current script is intended to work for GNU G++. # Here is the original BSD header: # @(#)mkdep.sh 1.7 (Berkeley) 10/13/87 # if [ $# = 0 ] ; then echo 'usage: g++dep [-p] [-f makefile] [flags] file ...' exit 1 fi DO_ACE_MAKE_DEPEND=0 MAKE=GNUmakefile STOPNOW=0 REL="" while [ $STOPNOW -eq 0 ] do case $1 in # -e for compatibility with depgen.pl -e) shift; shift ;; # -f allows you to select a makefile name -f) MAKE=$2 shift; shift ;; # the -p flag produces "program: program.c" style dependencies # so .o's don't get produced -p) SED='s;\.o;;' shift ;; # -A implies -r and fixes the .obj line, hate -A) REL="ACE_ROOT TAO_ROOT "$REL DO_ACE_MAKE_DEPEND=1 shift ;; # -r allows the use of relative pathnames... -r) REL="ACE_ROOT TAO_ROOT "$REL shift ;; # -R VARNAME allows you to specify a variable which should be used # to generate relative paths if it's defined. You can use multiple # -R options, but be careful if one of the values is a proper # subset of a subsequent value, because I suspect that sed will # substitute for the first value properly, but not for the # second. You might be able to get around this by reordering and # having the more specific values lead the less specific values. -R) REL=$2" "$REL shift; shift;; *) STOPNOW=1 esac done if [ ! -w $MAKE ]; then echo "g++dep: no writeable file \"$MAKE\"" exit 1 fi TMP=/tmp/g++dep$$ SCRIPT=${TMP}_script trap 'rm -f $TMP $SCRIPT; exit 1' 1 2 3 13 15 cp $MAKE ${MAKE}.bak sed -e '/DO NOT DELETE THIS LINE/,$d' < $MAKE > $TMP cat << _EOF_ >> $TMP # DO NOT DELETE THIS LINE -- g++dep uses it. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. _EOF_ # Local files may appear as './foo' change that to 'foo' echo 's; \./; ;g' >$SCRIPT # If the -p flag is set we want to change 'foo.o' to simply 'foo' echo $SED >>$SCRIPT # Dependencies on local files are better expressed like that, instead # of using $(TAO_ROOT) or $(ACE_ROOT). This is specially important # for IDL generated files. echo "s;`pwd`/;;g" >>$SCRIPT if [ -z "$TAO_ROOT" ]; then TAO_ROOT=${ACE_ROOT}/TAO fi # This is a long series of commands to change the actual value of # $ACE_ROOT to '$(ACE_ROOT)', similar changes are done for TAO_ROOT # and any number of "variables" defined via the -R option. for varname in $REL; do varvalue=$(eval echo \$${varname}) echo "s;"$varvalue";$""("$varname");g" >>$SCRIPT done if [ $DO_ACE_MAKE_DEPEND -eq 1 ]; then # Append a series of commands to the sed script that help with the # ACE build style (.obj subdirectories, plaform indenpendent # dependencies, etc.) # To avoid interpolation we build this string in pieces, the idea is # to generate a rule that will convert # foo.o: # into # .obj/foo.o .shobj/foo.o .obj/foo.so .shobj/foo.so: # # will be foo.o foo. LONG_TARGET="$""(sort " for i in VDIR VSHDIR; do for j in OBJEXT SOEXT; do LONG_TARGET=${LONG_TARGET}"$""("${i}")\1.$""("${j}") " done done LONG_TARGET=${LONG_TARGET}")" cat >>$SCRIPT <>$TMP /bin/rm -f $SCRIPT cat << _EOF_ >> $TMP # IF YOU PUT ANYTHING HERE IT WILL GO AWAY _EOF_ # copy to preserve permissions cp $TMP $MAKE rm -f ${MAKE}.bak $TMP exit 0 ace-6.4.5+dfsg.orig/bin/regenerate_exports.pl0000755000175000017500000000212013154167357017304 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # Goes through ACE/TAO and replaces use File::Find; use Cwd; $args = ''; $root = cwd.'/'; while ($#ARGV >= 0) { $args = $args . ' ' . shift @ARGV; } # wanted is only used for the File::Find sub wanted { my $file = $File::Find::name; $file =~ s/\.\//$root/; if ($File::Find::name =~ /\_export\.h$/i) { my $flag = 0; my $name = ''; if (!open (FILE, $file)) { print STDERR "Error: Could not open $file\n"; } while () { $flag = 1 if ((/generate_export/ || /GenExportH/) && $flag == 0); $name = $1 if (/define (\w*)_Export/); } if ($flag == 1) { print "Regenerating: $file\n"; if ($OSNAME eq 'MSWIn32') { $file =~ s/\//\\/g; } system ("perl -S generate_export_file.pl $args $name > $file"); } else { print "Skipping: $file\n"; } close FILE; } } find (\&wanted, "."); ace-6.4.5+dfsg.orig/bin/clone.csh0000644000175000017500000000072013154167357014642 0ustar tggtgg#!/bin/csh set src_root=`pwd` set dst_root=`abspath $1` set subdirs=`find * -type d -print` mkdir $dst_root set files=`find * \( -type d -prune \) -o -type f -print` if ($#files) then ln $files $dst_root endif if ($#subdirs) then foreach subdir ($subdirs) cd $src_root mkdir $dst_root/$subdir cd $src_root/$subdir set files=`find * \( -type d -prune \) -o -type f -print` if ($#files) then ln $files $dst_root/$subdir endif end endif exit 0 ace-6.4.5+dfsg.orig/bin/msvc_static_compile.pl0000755000175000017500000002701313154167357017436 0ustar tggtgg# Win32 auto_compile script. if (!$ENV{ACE_ROOT}) { $ACE_ROOT = getcwd ()."\\"; warn "ACE_ROOT not defined, defaulting to ACE_ROOT=$ACE_ROOT"; } else { $ACE_ROOT = $ENV{ACE_ROOT}; } use lib "$ENV{ACE_ROOT}/bin"; use File::Find; use PerlACE::Run_Test; use Cwd; @directories = (); @ace_dirs = ("$ACE_ROOT\\ace", "$ACE_ROOT\\ACEXML\\common", "$ACE_ROOT\\ACEXML\\parser", "$ACE_ROOT\\ACEXML\\apps", "$ACE_ROOT\\ACEXML\\tests", "$ACE_ROOT\\ACEXML\\examples", "$ACE_ROOT\\apps", "$ACE_ROOT\\ASNMP", "$ACE_ROOT\\examples", "$ACE_ROOT\\netsvcs", "$ACE_ROOT\\performance-tests", "$ACE_ROOT\\protocols", "$ACE_ROOT\\tests", "$ACE_ROOT\\websvcs"); $debug = 0; $verbose = 0; $print_status = 0; $Ignore_errors = 0; # By default, bail out if an error occurs. $Build_LIB = 0; $Build_Debug = 0; $Build_Release = 0; $Build_All = 1; $build_core_only = 0; $Build_Cmd = "/BUILD"; $use_custom_dir = 0; $useenv = ''; $vc7 = 0; $name_mod = ''; $mod_name = 0; $proj_ext = '.dsp'; # Build sub Build ($$) { my ($project, $config) = @_; if ($debug == 1) { print "$project\n"; return 0; } else { print "Auto_compiling $project : $config\n"; print "Building $project $config\n" if $verbose; return system ("msdev.com $project /MAKE \"$config\" $Build_Cmd $useenv"); } } # Build sub Build_VC7 ($$) { my ($project, $config) = @_; if ($debug == 1) { print "$project\n"; return 0; } else { print "Auto_compiling $project : $config\n"; print "Building $project $config\n" if $verbose; return system ("devenv.com $project $Build_Cmd $config $useenv"); } } sub Find_Dsw (@) { my (@dir) = @_; @array = (); sub wanted_dsw { $array[++$#array] = $File::Find::name if ($File::Find::name =~ /\.dsw$/i); } find (\&wanted_dsw, @dir); print "List of dsw's \n" if ($verbose == 1); return @array; } sub Find_Sln (@) { my (@dir) = @_; @array = (); sub wanted_sln { $array[++$#array] = $File::Find::name if ($File::Find::name =~ /\.sln$/i); } find (\&wanted_sln, @dir); print "List of sln's \n" if ($verbose == 1); return @array; } sub Rename_Files ($$) { my ($target) = shift; my ($newext) = shift; my (@array) = (); sub wanted_file { my ($text) = shift; my ($next) = shift; if ($File::Find::name =~ /^(.*)$text$/i) { my ($newname) = $1 . $next; rename ($File::Find::name, $newname); } } find (sub { wanted_file ($target, $newext) }, $ACE_ROOT); } # Only builds the core libraries. sub Build_Core () { print STDERR "Building Core of ACE/TAO\n" if ($print_status == 1); print "\nmsvc_static_compile: Building Core of ACE/TAO\n"; print "Build \n" if ($verbose); print "Debug " if ($verbose) && ($Build_Debug); print "Release " if ($verbose) && ($Build_Release); print "LIB " if ($verbose) && ($Build_LIB); print "\n" if ($verbose); my @core_list = (); if ($Build_LIB) { push (@file_list, "/bin/msvc_static_order.lst"); foreach my$test_lst (@file_list) { my $config_list = new PerlACE::ConfigList; $config_list->load ($ACE_ROOT.$test_lst); foreach $test ($config_list->valid_entries ()) { if ($mod_name) { @plist = split (/\//, $test); $fname = pop @plist; $fname_mod = $name_mod; $fname_mod =~ s/\*/$fname/; push @plist,($fname_mod); push (@core_list, join('/', @plist) . $proj_ext); } else { push (@core_list, $test . $proj_ext); } } } if ( $vc7 ) { foreach $c (@core_list) { if ($Build_Debug) { $Status = Build_VC7 ($c, "debug"); return if $Status != 0 && !$Ignore_errors; } if ($Build_Release) { $Status = Build_VC7 ($c, "release"); return if $Status != 0 && !$Ignore_errors; } } } else { foreach $c (@core_list) { if ($Build_Debug) { $Status = Build ($c, "ALL - Win32 Debug"); return if $Status != 0 && !$Ignore_errors; } if ($Build_Release) { $Status = Build ($c, "ALL - Win32 Release"); return if $Status != 0 && !$Ignore_errors; } } } } } sub Build_All () { my @configurations = Find_Dsw (@directories); print STDERR "Building selected projects\n" if ($print_status == 1); print "\nmsvc_static_compile: Building selected projects\n"; $count = 0; foreach $c (@configurations) { print STDERR "Configuration ".$count++." of ".$#configurations."\n" if ($print_status == 1); if ($Build_Debug) { $Status = Build ($c, "ALL - Win32 Debug"); return if $Status != 0 && !$Ignore_errors; } if ($Build_Release) { $Status = Build ($c, "ALL - Win32 Release"); return if $Status != 0 && !$Ignore_errors; } } } sub Build_All_VC7 () { my @configurations = Find_Sln (@directories); print STDERR "Building selected projects\n" if ($print_status == 1); print "\nmsvc_static_compile: Building selected projects\n"; $count = 0; foreach $c (@configurations) { print STDERR "Configuration ".$count++." of ".$#configurations."\n" if ($print_status == 1); if ($Build_Debug) { $Status = Build_VC7 ($c, "debug"); return if $Status != 0 && !$Ignore_errors; } if ($Build_Release) { $Status = Build_VC7 ($c, "release"); return if $Status != 0 && !$Ignore_errors; } } } ## Parse command line argument while ( $#ARGV >= 0 && $ARGV[0] =~ /^(-|\/)/ ) { if ($ARGV[0] =~ '-k') { # Ignore errors print "Ignore errors\n" if ( $verbose ); $Ignore_errors = 1; } elsif ($ARGV[0] =~ /^-d$/i) { # debug $debug = 1; } elsif ($ARGV[0] =~ '-vc7') { # Use VC7 project and solution files. print "Using VC7 files\n" if ( $verbose ); $vc7 = 1; $proj_ext = '.vcproj'; } elsif ($ARGV[0] =~ '-vc8') { # Use VC8 project and solution files. print "Using VC8 files\n" if ( $verbose ); $vc7 = 1; # VC8 is like VC7 $proj_ext = '.vcproj'; } elsif ($ARGV[0] =~ '-vc9') { # Use VC9 project and solution files. print "Using VC9 files\n" if ( $verbose ); $vc7 = 1; # VC9 is like VC7 $proj_ext = '.vcproj'; } elsif ($ARGV[0] =~ '-v') { # verbose mode $verbose = 1; } elsif ($ARGV[0] =~ '-name_modifier') { # use MPC name_modifier for project shift; print "Setting name_modifier $ARGV[0]\n" if ( $verbose ); $name_mod = $ARGV[0]; $mod_name = 1; } elsif ($ARGV[0] =~ '-s') { # status messages $print_status = 1; } elsif ($ARGV[0] =~ '-u') { # USEENV print "Using Environment\n" if ($verbose); $useenv = '/USEENV'; } elsif ($ARGV[0] =~ '-CORE') { # Build the core of ace/tao print "Building only Core\n" if ( $verbose ); $build_core_only = 1; } elsif ($ARGV[0] =~ '-ACE') { # Build ACE and its programs print "Building ACE\n" if ( $verbose ); $use_custom_dir = 1; push @directories, @ace_dirs; } elsif ($ARGV[0] =~ '-TAO') { # Build TAO and its programs print "Building TAO\n" if ( $verbose ); $use_custom_dir = 1; # Other tests depend on the lib in this dir so we need to force it # to the front of the build list. This is pretty ugly. push @directories, ("$ACE_ROOT\\TAO\\orbsvcs\\tests\\Notify\\lib"); push @directories, ("$ACE_ROOT\\TAO"); } elsif ($ARGV[0] =~ '-dir') { # Compile only a specific directory shift; print "Adding directory $ARGV[0]\n" if ( $verbose ); $use_custom_dir = 1; push @directories, $ARGV[0]; } elsif ($ARGV[0] =~ '-rebuild') { # Rebuild all print "Rebuild all\n" if ( $verbose ); $Build_Cmd = "/REBUILD"; } elsif ($ARGV[0] =~ '-clean') { # Clean print "Cleaning all\n" if ( $verbose ); $Build_Cmd = "/CLEAN"; } elsif ($ARGV[0] =~ '-Debug') { # Debug versions print "Building Debug Version\n" if ( $verbose ); $Build_Debug = 1; $Build_All = 0; } elsif ($ARGV[0] =~ '-Release') { # Release versions print "Building Release Version\n" if ( $verbose ); $Build_Release = 1; $Build_All = 0; } elsif ($ARGV[0] =~ '-LIB') { # Build LIB only print "Build LIB only\n" if ( $verbose ); $Build_LIB = 1; $Build_All = 0; } elsif ($ARGV[0] =~ '-(\?|h)') { # Help information print "Options\n"; print "-d = Debug (only print out projects)\n"; print "-k = Ignore Errors\n"; print "-v = Script verbose Mode\n"; print "-s = Print status messages to STDERR\n"; print "-u = Tell MSVC to use the environment\n"; print "-vc7 = Use MSVC 7 toolset\n"; print "-vc8 = Use MSVC 8 toolset\n"; print "-name_modifier = Use MPC name_modifier to match projects\n"; print "\n"; print "-CORE = Build the Core libraries\n"; print "-ACE = Build ACE and its programs\n"; print "-TAO = Build TAO and its programs\n"; print "-dir = Compile custom directories\n"; print "\n"; print "-rebuild = Rebuild All\n"; print "-clean = Clean\n"; print "-Debug = Compile Debug versions\n"; print "-Release = Compile Release versions\n"; print "-LIB = Comple LIB Configurations\n"; exit; } else { warn "$0: error unknown option $ARGV[0]\n"; die -1; } shift; } if (!$Build_DLL && !$Build_LIB) { $Build_DLL = 1; $Build_LIB = 1; } if (!$Build_Debug && !$Build_Release) { $Build_Debug = 1; $Build_Release = 1; } if ($#directories < 0) { @directories = ($ACE_ROOT); } print "msvc_static_compile: Begin\n"; print STDERR "Beginning Core Build\n" if ($print_status == 1); if (!$use_custom_dir || $build_core_only) { if ($vc7) { ## devenv is too smart for it's own good. When a .vcproj is specified, ## as is done when building the CORE, it will find the solution to which ## the .vcproj belongs and begin to build additional portions of the ## solution. This is not what we want as dependencies are not set up ## between library projects. my($sln) = '.sln'; my($core_sln) = $sln . '.build_core'; Rename_Files ($sln, $core_sln); foreach my $sig ('INT', 'TERM') { $SIG{$sig} = sub { print STDERR "Renaming solution files, please be patient...\n"; Rename_Files ($core_sln, $sln); exit(1); }; } Build_Core (); Rename_Files ($core_sln, $sln); foreach my $sig ('INT', 'TERM') { $SIG{$sig} = 'DEFAULT'; } } else { Build_Core (); } } print STDERR "Beginning Full Build\n" if ($print_status == 1); if ( $vc7 ) { Build_All_VC7 if !$build_core_only; } else { Build_All if !$build_core_only; } print "msvc_static_compile: End\n"; print STDERR "End\n" if ($print_status == 1); ace-6.4.5+dfsg.orig/bin/cltime.pl0000755000175000017500000000030613154167357014660 0ustar tggtgguse strict; my($name) = shift; my($email) = shift; my($entry) = scalar(gmtime()); my($tz) = 'UTC'; $entry =~ s/(:\d\d\s+)(.*)(\d\d\d\d)$/$1$tz $3/; $entry .= " $name <$email>"; print $entry; ace-6.4.5+dfsg.orig/bin/doxygen-convert-h.pl0000755000175000017500000003415113154167357016770 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # doxygen-convert-h.pl is a script that would be used to convert old # documented style ACE/TAO header files to doxygen style. # TODO List: # (Search for @todo in this script) use File::Copy; use FileHandle; use Getopt::Std; ############################################################################## # Parse the options if (!getopts ('dDhsu') || $opt_h) { print "doxygen-convert-h.pl [-dDhsu] filenames or directories\n"; print "\n"; print " -d debug script\n"; print " -D really verbose debug\n"; print " -h display this help\n"; print " -s print result to stdout\n"; print " -u turn off file verification\n"; exit (1); } ## if verbose debug, also regular debug $opt_d = 1 if (defined $opt_D); ############################################################################## # Find the files @files = (); sub recursive_find { my($file) = shift; my(@rfiles) = (); my($fh) = new FileHandle(); if (opendir($fh, $file)) { foreach my $f (grep(!/^\.\.?$/, readdir($fh))) { if ($f ne '.svn') { my($full) = "$file/$f"; if (-d $full) { push(@rfiles, recursive_find($full)); } else { push(@rfiles, $full) if ($f =~ /\.(h|hxx|hpp|hh|inl|idl|cpp|cxx|cc|c|C)$/) ; } } } closedir($fh); } return @rfiles; } foreach $arg (@ARGV) { my @results = glob $arg; if ($#results < 0) { print STDERR "File not Found: $arg\n" } else { foreach my $result (@results) { if (-d $result) { push(@files, recursive_find($result)); } else { push(@files, $result); } } } } ############################################################################## # Subroutines used to change the file. $fail = 0; sub verify (@) { my (@contents) = @_; print "Verification\n" if (defined $opt_d); my $found_id = 0; my $found_filename = 0; foreach $line (@contents) { $found_id = 1 if ($line =~ /\$Id\:/); $found_filename = 1 if ($line =~ /\= FILENAME/); } return 0 if ($found_id == 1 && $found_filename == 1); # failed return 1; } sub format_description (@) { my (@description) = @_; my @after = (); my $line; if ($#description < 1) { foreach $line (@description) { $line =~ s/\/\// \* \@brief /; push @after, $line; } } else { foreach $line (@description) { $line =~ s/\/\// \*/; $line =~ s/\* /\* /; push @after, $line; } } return @after; } sub fix_file_header (@) { my (@before) = @_; my @after = (); my @description = (); my $id = "\$Id\$\n"; my $authors = ""; my $state = 'before'; ## state = before, filename, description, author, after, done print "Fixing File Header\n" if (defined $opt_d); LOOP: foreach $line (@before) { printf ("%10s %s", $state, $line) if (defined $opt_D); if ($state eq 'done') { push @after, $line; next LOOP; } if ($state eq 'before') { if ($line =~ /\-\*\- C\+\+ \-\*\-/) { push @after, $line; } elsif ($line =~ /\$Id\:(.*)\n/) { $id = "\$Id\:$1"; } elsif ($line =~ /===================/) { push @after, "//========================================". "=====================================\n"; push @after, "/**\n"; } elsif ($line =~ /\= FILENAME/) { $state = 'filename'; next LOOP; } elsif ($line !~ /^\s*\/\//) { push @after, $line; } } if ($state eq 'filename') { if ($line =~ /\/\/ (.+)/) { push @after, " * \@file $1\n"; push @after, " *\n"; push @after, " * $id\n"; push @after, " *\n"; } elsif ($line =~ /\= DESCRIPTION/) { $state = 'description'; next LOOP; } elsif ($line =~ /\= AUTHOR/) { $state = 'author'; next LOOP; } elsif ($line =~ /===================/) { $state = 'after'; ### Fall through so the after can put the ending in } } if ($state eq 'description') { if ($line =~ /\= AUTHOR/) { push @after, format_description (@description); @description = (); push @after, " *\n"; $state = 'author'; next LOOP; } elsif ($line =~ /===================/) { push @after, format_description (@description); @description = (); push @after, " *\n"; $state = 'after'; ### Fall through } push @description, $line; } if ($state eq 'author') { if ($line =~ /\/\/ (.+)\n/) { $authors .= $1; } elsif ($line =~ /===================/ || $line =~ /\= DESCRIPTION/) { ## print the authors if ($authors ne "") { @authors = split /\,/, $authors; foreach $author (@authors) { if ($author =~ /^ (.*)/) { $author = $1; } push @after, " * \@author $author\n"; } } if ($line =~ /\= DESCRIPTION/) { push @after, " *\n"; $state = 'description'; next LOOP; } else { $state = 'after'; ## Fall through } } } if ($state eq 'after') { if ($line =~ /===================/) { ## print the rest push @after, " */\n"; push @after, "//========================================". "=====================================\n"; push @after, "\n"; $state = 'done'; } next LOOP; } } return @after; } sub fix_class_headers (@) { my (@before) = @_; my @after = (); my @store = (); my $classname = ""; my $state = 'outside'; ## state = ## outside = not in class ## template = stored template line ## class = started collecting lines, in case of a class ## header = after a class foo, but before any methods print "Fixing class headers\n" if (defined $opt_d); LOOP: foreach $line (@before) { printf ("%10s %s", $state, $line) if (defined $opt_D); if ($state eq 'outside') { if ($line =~ /^\s*template/) { push @store, $line; $state = 'template'; next LOOP; } elsif ($line =~ /^\s*class/) { $state = 'class'; ## Fall through } else { push @after, $line; } } if ($state eq 'template') { if ($line =~ /^\s*class/) { $state = 'class'; ## Fall through } else { push @after, @store; @store = (); push @after, $line; $state = 'outside'; next LOOP; } } if ($state eq 'class') { if ($line =~ /^\s*class(.*)\n/) { push @store, $line; my @s = split / /, $1; if ($s[1] =~ /export$/i) { $classname = $s[2]; } else { $classname = $s[1]; } } elsif ($line =~ /^\s*\{/) { push @store, $line; } elsif ($line =~ /^\s*\/\//) { $state = 'header'; ### Fall through } else { push @after, @store; @store = (); push @after, $line; $state = 'outside'; next LOOP; } } if ($state eq 'header') { if ($line =~ /^\s*\/\//) { push @headers, $line; } else { my $prefix = ''; $line =~ /^(\s*)[\w\/]/; ### used to get indent my $indent = $1; push @after, "$indent/**\n"; push @after, "$indent * \@class $classname\n"; foreach $header (@headers) { if ($header =~ /\= TITLE/) { push @after, "$indent *\n"; $prefix = "$indent * \@brief"; } elsif ($header =~ /\= DESCRIPTION/) { push @after, "$indent *\n"; $prefix = "$indent *"; } elsif ($header !~ /\/\/\s*\n/) { my $myline = $header; $myline =~ s/\s*\/\/\s*/$prefix /; push @after, $myline; $prefix = "$indent *"; } } push @after, "$indent */\n"; @headers = (); push @after, @store; push @after, $line; @store = (); $state = 'outside'; next LOOP; } } } return @after; } sub format_comment (@) { my (@comments) = @_; my @after = (); my $line; if ($#comments < 2) { foreach $line (@comments) { $line =~ s/\/\//\/\/\//; push @after, $line; } } else { my $line = $comments[0]; $line =~ /^(\s*)\//; my $indent = $1; push @after, "$indent/**\n"; foreach $line (@comments) { $line =~ s/\/\// */; push @after, $line; } push @after, "$indent */\n"; } return @after; } sub fix_class_members (@) { my (@before) = @_; my @after = (); my @method = (); my @comment = (); my $classfound = 0; my $classlevel = 0; my $level = 0; print "Fixing class methods\n" if (defined $opt_d); LOOP: foreach $line (@before) { if ($line =~ /\{/ && $line !~ /^\s*\/\//) { $level++; } if ($line =~ /^\s*class/ && $line !~ /\;/ && $level == $classlevel) { $classlevel++; } if ($line =~ /\}/ && $line !~ /^\s*\/\//) { if ($classlevel == $level) { $classlevel--; } $level--; } printf ("%2d%2d", $level, $classlevel) if (defined $opt_D); if ($level == $classlevel && $level > 0) { if ($line =~ /^\s*public/ || $line =~ /^\s*private/ || $line =~ /\s*protected/ || $line =~ /^\s*\n$/ || $line =~ /^\s*\{/ || $line =~ /^\s*\}/ || $line =~ /^\s*\#/) { push @after, format_comment (@comment); push @after, @method; @comment = (); @method = (); print " $line" if (defined $opt_D); push @after, $line; } elsif ($line =~ /^\s*\/\//) { print "C $line" if (defined $opt_D); if ($#method >= 0) { push @comment, $line; } else { push @after, $line; } } else { print "M $line" if (defined $opt_D); push @method, $line; } } else { push @after, format_comment (@comment); push @after, @method; @comment = (); @method = (); print " $line" if (defined $opt_D); push @after, $line; } } if ($level > 0 || $classlevel > 0) { $fail = 1; $failmessage = "Brace level recognition failed" } return @after; } ############################################################################## # Read in the files. FILELOOP: foreach $file (@files) { print "\n" if (defined $opt_d); print "$file\n"; print "\n" if (defined $opt_d); $fail = 0; my @contents = (); ### Read file into @contents print "Reading\n" if (defined $opt_d); unless (open (FILE, "<$file")) { print STDERR "$file: $!\n"; next FILELOOP; } @contents = ; close (FILE); ### Verify file print "Verifying file\n" if (defined $opt_d); if (!defined $opt_u) { if (verify (@contents) == 1) { print "$file did not pass verification\n"; next FILELOOP; } elsif (defined $opt_d) { print "Passed verification\n"; } } ### Fix up parts of it print "Fixing file\n" if (defined $opt_d); @contents = fix_file_header (@contents); @contents = fix_class_headers (@contents); @contents = fix_class_members (@contents); if ($fail != 0) { print "$file: $failmessage\n"; } else { if (defined $opt_s) { print @contents; } elsif (!defined $opt_D) { ### Save @contents back to the file print "Saving\n" if (defined $opt_d); unless (open (FILE, ">$file")) { print STDERR "$file: $!\n"; next FILELOOP; } foreach $line (@contents) { print FILE $line; } close (FILE); } } } ace-6.4.5+dfsg.orig/bin/generate_topinfo_charts.sh0000755000175000017500000000043313154167357020277 0ustar tggtgg#!/bin/sh gnuplot <<_EOF_ >/dev/null 2>&1 set xdata time set xtics rotate set timefmt '%Y/%m/%d-%H:%M' set xlabel 'Date (MM/DD)' set ylabel 'Size (KBytes) $4' set terminal png small size 800,600 color set output "$2" plot '$1' using 1:2 title '$3' w l exit _EOF_ ace-6.4.5+dfsg.orig/bin/indent_macros.pl0000755000175000017500000000225013154167357016230 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -i -S $0 ${1+"$@"}' & eval 'exec perl -i -S $0 $argv:q' if 0; # This perl script re-arrange the macro indentation so it's easier to # see the layering relationship. $lineno = 0; $indent = 0; sub inc_indent { $indent += 2; } sub dec_indent { $indent -= 2; } sub get_indent { $retv = 0; print STDERR "$0 (", $lineno, "): Unbalanced macro pairs\n" if ($indent < 0); $retv = $indent - 1 if ($indent > 0); $retv; } while (<>) { $lineno++; if (/^[ \t]*\#[ \t]*((if|el|en|).*)/) { $cont = $1; $temp = $2; if ($temp =~ /if/) { print "#", " " x &get_indent (), $cont,"\n"; inc_indent (); } elsif ($temp =~ /el/) { dec_indent (); print "#", " " x &get_indent (), $cont,"\n"; inc_indent (); } elsif ($temp =~ /en/) { dec_indent (); print "#", " " x &get_indent (), $cont,"\n"; } else { print "#", " " x &get_indent (), $cont,"\n"; } } else { print $_; } } die ("$0 (EOF): Unbalanced macro pairs\n") if ($indent != 0); ace-6.4.5+dfsg.orig/bin/topinfo_iorsize_stats.sh0000755000175000017500000000353513154167357020051 0ustar tggtgg#!/bin/sh # if [ $# -lt 3 ]; then echo "Usage: $0 [DEST] [USER] [OPTIMIZED]" exit 0 fi DEST=$1 US=$2 OPT=$3 DATE=`date +%Y/%m/%d-%H:%M` cd $ACE_ROOT LD_LIBRARY_PATH=$ACE_ROOT/ace export LD_LIBRARY_PATH PATH=/usr/bin:/bin:$PATH export PATH cd $TAO_ROOT/performance-tests/Memory/IORsize # start the server. If OPT == 1 then start the optimized version, else # the non-optimized version if test $OPT == 1 then ./server -ORBSvcConf server.conf & else ./server & fi s_id=$!; server_start_size=`cat /proc/$s_id/status | grep VmRSS | awk '{print $2}'`; # Just sleep for 2 seconds. sleep 2; # Check whether the server has started file="test.ior" if test -f $file then # start the client ./client & c_id=$!; # Wait till all the invocations are done sleep 30; # Get the size once the client has made sufficient invocations. s_invocations=`cat /proc/$s_id/status | grep VmRSS | awk '{print $2}'`; let "actual_server_growth=${s_invocations}-${server_start_size}"; if test $OPT == 1 then echo $DATE $s_invocations >> $DEST/source/server_opt_ior_size.txt echo $DATE $actual_server_growth >> $DEST/source/opt_ior_size.txt else echo $DATE $s_invocations >> $DEST/source/server_ior_size.txt echo $DATE $actual_server_growth >> $DEST/source/actual_ior_size.txt fi # Kill the server and client. We will look at better ways of doing # this later. kill -9 $c_id; kill -9 $s_id; rm -f $file else echo $file doesnt exist fi cd $DEST/source STRING="for 50000 IORs" FILES="server_opt opt server actual" for i in $FILES ; do /usr/bin/tac ${i}_ior_size.txt > $DEST/data/${i}_ior_size.txt /usr/bin/tail -5 ${i}_ior_size.txt > $DEST/data/LAST_${i}_ior_size.txt $ACE_ROOT/bin/generate_topinfo_charts.sh ${i}_ior_size.txt $DEST/images/${i}_ior_size.png ${i}_ior_size.txt done ace-6.4.5+dfsg.orig/bin/PerlACE/0000775000175000017500000000000013157240624014251 5ustar tggtggace-6.4.5+dfsg.orig/bin/PerlACE/Process_Win32.pm0000644000175000017500000003247713154167357017232 0ustar tggtgg#! /usr/bin/perl use PerlACE::Run_Test; package PerlACE::Process; use strict; use Win32::Process; use File::Basename; use Cwd; # Make sure the File::Which module is installed on the machine # before trying to use it. If the module is installed on this # machine, then it will be included because of the eval () # statement below. my $has_which = eval ("use File::Which; 1;") ? 1 : 0; ############################################################################### # This is what GetExitCode will return if the process is still running. my $STILL_ACTIVE = 259; ############################################################################### ### Constructor and Destructor # # Hack in purify support thru 2 environment variables: # ACE_RUN_PURIFY_CMD: complete path to purify executable # ACE_RUNTEST_DELAY: wait delay factor, default to 10 if # ACE_RUN_PURIFY_CMD is defined, or 1 if # ACE_RUN_PURIFY_CMD is not defined. # ** Notice that when ACE_RUN_PURIFY_CMD is define, PerlACE::Process # reports the return status of *purify*, not the process being purified. # # Also hack in the ability to run the test on a WinCE device using the # ACE_WINCE_TEST_CONTROLLER environment variable. If set, it specifies a # controlling program to use for setting up and executing the test. # Further setup can be specialized depending on the value of the variable. sub new { my $proto = shift; my $class = ref ($proto) || $proto; my $self = {}; $self->{EXECUTABLE} = shift; $self->{ARGUMENTS} = shift; $self->{TARGET} = undef; $self->{RUNNING} = 0; $self->{IGNOREEXESUBDIR} = 0; $self->{IGNOREHOSTROOT} = 0; $self->{PROCESS} = undef; $self->{PURIFY_CMD} = $ENV{'ACE_RUN_PURIFY_CMD'}; $self->{PURIFY_OPT} = $ENV{'ACE_RUN_PURIFY_OPT'}; if (!defined $PerlACE::Process::WAIT_DELAY_FACTOR) { if (defined $self->{PURIFY_CMD}) { $PerlACE::Process::WAIT_DELAY_FACTOR = 10; } else { $PerlACE::Process::WAIT_DELAY_FACTOR = 1; } } $self->{WINCE_CTL} = $ENV{'ACE_WINCE_TEST_CONTROLLER'}; bless ($self, $class); return $self; } sub DESTROY { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: <", $self->{EXECUTABLE}, "> still running upon object destruction\n"; $self->Kill (); } } ############################################################################### ### Some Accessors sub Normalize_Executable_Name($) { my $self = shift; my $executable = shift; my $basename = basename ($executable); my $dirname = dirname ($executable). '/'; my $subdir; if (defined $self->{TARGET}) { $subdir = $self->{TARGET}->ExeSubDir(); } else { $subdir = $PerlACE::Process::ExeSubDir; } $executable = $dirname.$subdir.$basename.".EXE"; ## Installed executables do not conform to the ExeSubDir if (! -x $executable && -x $dirname.$basename.'.EXE') { $executable = $dirname.$basename.'.EXE'; } $executable =~ s/\//\\/g; # / <- # color coding issue in devenv return $executable; } sub Executable { my $self = shift; if (@_ != 0) { $self->{EXECUTABLE} = shift; } my $executable = $self->{EXECUTABLE}; # If the target's config has a different ACE_ROOT, rebase the executable # from $ACE_ROOT to the target's root. if (defined $self->{TARGET} && $self->{TARGET}->ACE_ROOT() ne $ENV{'ACE_ROOT'}) { $executable = File::Spec->rel2abs($executable); $executable = File::Spec->abs2rel($executable, $ENV{'ACE_ROOT'}); $executable = $self->{TARGET}->ACE_ROOT() . "/$executable"; } # After VxWorks adopts the TARGET scheme, can do away with this block. if ($self->{IGNOREHOSTROOT} == 0) { if (PerlACE::is_vxworks_test()) { $executable = PerlACE::VX_HostFile ($executable); } } if ($self->{IGNOREEXESUBDIR} == 0) { $executable = $self->Normalize_Executable_Name ($executable); } else { if ($executable !~ m/\.(BAT|EXE|COM)$/i) { $executable = $executable.".EXE"; } $executable =~ s/\//\\/g; # / <- # color coding issue in devenv # If there is no directory in the executable name, then we are going # to search the PATH for the executable. if ($has_which && $executable !~ m/\//) { my $which = File::Which::which ($executable); if ($which ne "") { $executable = $which; } } } return $executable; } sub Arguments { my $self = shift; if (@_ != 0) { $self->{ARGUMENTS} = shift; } return $self->{ARGUMENTS}; } sub CommandLine () { my $self = shift; my $commandline = $self->Executable (); $commandline = '"' . $commandline . '"' if $commandline =~ /\s/; if (defined $self->{ARGUMENTS}) { $commandline .= ' '.$self->{ARGUMENTS}; } return $commandline; } sub IgnoreExeSubDir { my $self = shift; # If we have -Config ARCH, do not set IGNOREEXESUBDIR, since with ARCH # all executables (even those in $ACE_ROOT/bin, etc.) are located in the # architecture-specific subdirectory. if (@_ != 0 && !grep(($_ eq 'ARCH'), @PerlACE::ConfigList::Configs)) { $self->{IGNOREEXESUBDIR} = shift; } elsif (@_ != 0 && $self->{EXECUTABLE} =~ /perl$/) { print ("==== automatically ignoring...\n"); $self->{IGNOREEXESUBDIR} = shift; } return $self->{IGNOREEXESUBDIR}; } sub IgnoreHostRoot { my $self = shift; if (@_ != 0) { $self->{IGNOREHOSTROOT} = shift; } return $self->{IGNOREHOSTROOT}; } ############################################################################### ### Spawning processes # Spawn the process and continue. sub Spawn () { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> already running\n"; return -1; } if (!defined $self->{EXECUTABLE}) { print STDERR "ERROR: Cannot Spawn: No executable specified\n"; return -1; } if ($self->{IGNOREEXESUBDIR} == 0) { if (!-f $self->Executable ()) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> not found\n"; return -1; } if (!-x $self->Executable ()) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> not executable\n"; return -1; } } my $state = 0; my $cmdline = ""; my $executable = ""; my $chdir_needed = 0; my $curdir_bak; if (defined $self->{PURIFY_CMD}) { my $orig_cmdline = $self->CommandLine (); $executable = $self->{PURIFY_CMD}; my $basename = basename ($self->{EXECUTABLE}); my $PurifyOptions = $self->{PURIFY_OPT}; if (!defined $PurifyOptions) { $PurifyOptions = "/run ". # "/save-data=$basename.pfy ". "/save-text-data=$basename.pfytxt ". "/AllocCallStackLength=20 ". "/ErrorCallStackLength=20 ". "/HandlesInUseAtExit ". "/InUseAtExit ". "/LeaksAtExit "; } $cmdline = "purify " . "$PurifyOptions ". "$orig_cmdline" ; } elsif (defined $self->{WINCE_CTL}) { $executable = $self->Executable (); $cmdline = $self->CommandLine (); # Generate a script to copy the test down to the device, run it, # copy the log file(s) back to the log directory, then delete the # program and log files on the remote device. unless (open (SCRIPT, ">start_test.cmd")) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> failed to create start_test.cmd\n"; return -1; } my $testname = basename($executable,'.EXE'); my $here = getcwd(); $here =~ s/\//\\/g; $executable =~ s/^\.//; # Chop leading . $executable = $here . $executable; # Fully qualified name # Take off the test name from the start of the command line. # The command name is preprended in the script below. my @tokens = split(' ', $cmdline); @tokens = splice(@tokens,1); $cmdline = join(' ', @tokens); print SCRIPT "copy $executable 1:\\Windows\n"; print SCRIPT "start /wait $testname $cmdline\n"; print SCRIPT "copy 1:\\log\\$testname*.txt $here\\log\n"; print SCRIPT "del 1:\\Windows\\$testname.exe\n"; print SCRIPT "del 1:\\log\\$testname*.txt\n"; close SCRIPT; $executable = $ENV{'ComSpec'}; my $pocket_device_opts = $ENV{'ACE_PCE_DEVICE'}; $cmdline = "cmd /C start /B /WAIT $self->{WINCE_CTL} $pocket_device_opts -m NAME=start_test.cmd;WAIT=401000; -e" } elsif (defined $ENV{'ACE_TEST_WINDOW'}) { $state = ($ENV{'ACE_TEST_WINDOW'} =~ /\/k/i ? CREATE_NEW_CONSOLE : DETACHED_PROCESS); $executable = $ENV{'ComSpec'}; $cmdline = $ENV{'ACE_TEST_WINDOW'} . ' ' . $self->CommandLine(); } else { $executable = $self->Executable (); $cmdline = $self->CommandLine (); if ((defined $self->{TARGET}) && ($ENV{'ACE_ROOT'} ne $self->{TARGET}->ACE_ROOT ())) { $chdir_needed = 1; $curdir_bak = cwd (); chdir (dirname ($executable)); } } if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "$executable $cmdline\n"; } my %backup_ENV = %ENV; # update environment for target if (defined $self->{TARGET}) { if (!defined $self->{TARGET}->{REMOTE_SHELL}) { my $x_env_ref = $self->{TARGET}->{EXTRA_ENV}; while ( my ($env_key, $env_value) = each(%$x_env_ref) ) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "INFO: adding target environment $env_key=$env_value\n"; } $ENV{$env_key} = $env_value; } } if ($self->{TARGET}->{LIBPATH}) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "INFO: adding target libpath ".$self->{TARGET}->{LIBPATH}."\n"; } PerlACE::add_lib_path ($self->{TARGET}->{LIBPATH}); } } my $status = Win32::Process::Create ($self->{PROCESS}, $executable, $cmdline, ($state == 0 ? 1 : 0), $state, '.'); %ENV = %backup_ENV; if ($chdir_needed) { chdir ($curdir_bak); } if ($status == 0) { print STDERR "ERROR: Spawn failed for <", $self->CommandLine (), ">\n"; return -1; } $self->{RUNNING} = 1; return 0; } # Wait for the process to exit or kill after a time period sub WaitKill ($) { my $self = shift; my $timeout = shift; my $status = $self->TimedWait ($timeout); if ($status == -1) { print STDERR "ERROR: $self->{EXECUTABLE} timedout\n"; $self->Kill (); # Don't need to Wait since we are on Win32 } $self->{RUNNING} = 0; return $status; } # Do a Spawn and immediately WaitKill sub SpawnWaitKill ($) { my $self = shift; my $timeout = shift; if ($self->Spawn () == -1) { return -1; } return $self->WaitKill ($timeout); } # Kill the process sub Kill ($) { my $self = shift; my $notused = shift; #Used in Process_Unix.pm if ($self->{RUNNING} && !defined $ENV{'ACE_TEST_WINDOW'}) { Win32::Process::Kill ($self->{PROCESS}, -1); } $self->{RUNNING} = 0; } # Terminate the process and wait for it to finish sub TerminateWaitKill ($) { my $self = shift; my $timeout = shift; if ($self->{RUNNING}) { print STDERR "INFO: $self->{EXECUTABLE} being killed.\n"; Win32::Process::Kill ($self->{PROCESS}, 0); } return $self->WaitKill ($timeout); } # Wait until a process exits. # return -1 if the process is still alive. sub Wait ($) { my $self = shift; my $timeout = shift; if (!defined $timeout || $timeout < 0) { $timeout = INFINITE; } else { $timeout = $timeout * 1000 * $PerlACE::Process::WAIT_DELAY_FACTOR; } my $result = 0; if ($self->{RUNNING}) { $result = Win32::Process::Wait ($self->{PROCESS}, $timeout); if ($result == 0) { return -1; } } Win32::Process::GetExitCode ($self->{PROCESS}, $result); $self->{RUNNING} = 0; return $result; } # Wait for a process to exit with a timeout sub TimedWait ($) { my($self) = shift; my($timeout) = shift; return $self->Wait($timeout); } ### sub kill_all { my $procmask = shift; my $target = shift; my $pid = -1; for my $line (`tasklist /nh /fo csv`) { # find matching process line if ($line =~ /$procmask/) { # find process PID if ($line =~ /^\"[^\"]+\",\"(\d+)\",/) { $pid = $1; Win32::Process::KillProcess ($pid, 0); # kill process if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "INFO: Killed process at [$line]\n" } } } } } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/MSProject.pm0000644000175000017500000002120713154167357016465 0ustar tggtgg#! /usr/bin/perl package PerlACE::MSProject; use strict; use FileHandle; ############################################################################### # Constructor sub new { my $proto = shift; my $class = ref ($proto) || $proto; my $self = {}; $self->{FILENAME} = shift; $self->{VERSION} = undef; $self->{NAME} = undef; %{$self->{CONFIGS}} = (); bless ($self, $class); return $self; } ############################################################################### # Accessors sub Filename { my $self = shift; if (@_ != 0) { $self->{FILENAME} = shift; } return $self->{FILENAME}; } sub Version () { my $self = shift; return $self->{VERSION}; } sub Name () { my $self = shift; return $self->{NAME}; } sub Configs () { my $self = shift; return keys %{$self->{CONFIGS}}; } sub DepOutputFile ($) { my $self = shift; my $config = shift; if (!defined $config) { print STDERR "Error: No configuration specified\n"; return; } my $name = $self->OutputFile ($config); if ($name =~ m/\.dll$/) { $name = $self->LibraryFile ($config); } $name =~ s/.*\\//; # / <- For devenv $name =~ s/.*\///; return $name; } sub OutputFile ($) { my $self = shift; my $config = shift; if (!defined $config) { print STDERR "Error: No configuration specified\n"; return; } if (%{$self->{CONFIGS}}->{$config}->{LINK} =~ m/out\:\"([^\"]*)\"/) { return $1; } elsif (defined $self->Name ()) { my $filename = $self->Filename; my $ext = ""; if (%{$self->{CONFIGS}}->{$config}->{LINK} =~ m/\/dll/) { $ext = ".dll"; } elsif (%{$self->{CONFIGS}}->{$config}->{LINK} =~ m/\/subsystem\:/) { $ext = ".exe"; } else { $ext = ".lib"; } $filename =~ s/\.[^\.]*$/$ext/; return $filename; } } sub LibraryFile ($) { my $self = shift; my $config = shift; my $dll = undef; if (!defined $config) { print STDERR "Error: No configuration specified\n"; return; } if ($self->OutputFile ($config) =~ m/([^\/\\]*)\.dll$/i) { $dll = $1; } if (defined $dll) { if (%{$self->{CONFIGS}}->{$config}->{LINK} =~ m/implib\:\"([^\"]*)\"/i) { return $1; } else { $dll =~ s/.*\\//ig; # / <- Just here to fix color coding in devenv beta return $self->OutputDir ($config). $dll . ".lib"; } } } sub OutputDir ($) { my $self = shift; my $config = shift; if (!defined $config) { print STDERR "Error: No configuration specified\n"; return; } return %{$self->{CONFIGS}}->{$config}->{OUTPUTDIR}; } sub IntermidiateDir ($) { my $self = shift; my $config = shift; if (!defined $config) { print STDERR "Error: No configuration specified\n"; return; } return %{$self->{CONFIGS}}->{$config}->{INTERMEDIATEDIR}; } sub TargetDir ($) { my $self = shift; my $config = shift; if (!defined $config) { print STDERR "Error: No configuration specified\n"; return; } return %{$self->{CONFIGS}}->{$config}->{TARGETDIR}; } sub CPPOptions ($) { my $self = shift; my $config = shift; if (!defined $config) { print STDERR "Error: No configuration specified\n"; return; } return %{$self->{CONFIGS}}->{$config}->{CPP}; } sub LINKOptions ($) { my $self = shift; my $config = shift; if (!defined $config) { print STDERR "Error: No configuration specified\n"; return; } return %{$self->{CONFIGS}}->{$config}->{LINK}; } sub Libs($) { my $self = shift; my $config = shift; if (!defined $config) { print STDERR "Error: No configuration specified\n"; return; } return %{$self->{CONFIGS}}->{$config}->{LIBS}; } sub UsesTAOIDL () { my $self = shift; return $self->{TAOIDL}; } sub Compiler () { my $self = shift; return $self->{COMPILER}; } ############################################################################### # Big methods sub Load () { my $self = shift; my $config = "Unknown"; $self->{valid} = 0; my $fh = new FileHandle; unless ($fh->open ("<" . $self->{FILENAME})) { print "Could not open file ", $self->{FILENAME}, ": ", $_; return; } while (<$fh>) { if (m/^\#.*Project File - Name=\"([^\"]*)\"/) { $self->{NAME} = $1; } if (m/^\#.*Format Version (.*)/) { $self->{VERSION} = $1; } # Check for configurations if (m/^\!.*IF \"\$\(CFG\)\" == \".* - (.*)$\"/) { $config = $1; } elsif (m/^\!ENDIF$/) { $config = ""; } # Check for directories if (m/\# PROP Output_Dir \"(.*)\"/) { %{$self->{CONFIGS}}->{$config}->{OUTPUTDIR} = $1; } elsif (m/\# PROP Intermediate_Dir \"(.*)\"/) { %{$self->{CONFIGS}}->{$config}->{INTERMEDIATEDIR} = $1; } elsif (m/\# PROP Target_Dir \"(.*)\"/) { %{$self->{CONFIGS}}->{$config}->{TARGETDIR} = $1; } # Look at CPP options if (m/\# ADD BASE CPP(.*)$/ || m/\# ADD CPP(.*)$/) { my @flags = split (/ \//, $1); foreach my $flag (@flags) { if ($flag && %{$self->{CONFIGS}}->{$config}->{CPP} !~ m/$flag/) { %{$self->{CONFIGS}}->{$config}->{CPP} .= " /$flag"; } } } elsif (m/\# SUBTRACT CPP(.*)$/ || m/\# SUBTRACT BASE CPP(.*)$/) { my @flags = split (/ \//, $1); foreach my $flag (@flags) { if ($flag && %{$self->{CONFIGS}}->{$config}->{CPP} =~ m/$flag/) { %{$self->{CONFIGS}}->{$config}->{CPP} =~ s/ \/$flag//g; } } } # Look at LINK32 options if (m/\# ADD BASE LINK32(.*)$/ || m/\# ADD LINK32(.*)$/ || m/\# ADD BASE LIB32(.*)$/ || m/\# ADD LIB32(.*)$/) { my @flags = split (/ \//, $1); foreach my $flag (@flags) { my $found = 0; my @libs = split (/ /, $flag); foreach my $lib (@libs) { if ($lib =~ m/\.lib$/) { if (%{$self->{CONFIGS}}->{$config}->{LIBS} !~ m/\Q$lib\E/) { %{$self->{CONFIGS}}->{$config}->{LIBS} .= " $lib"; } $found = 1; } } if (!$found && $flag) { my $shortflag = $flag; if ($flag =~ m/^(.*)\:/) { $shortflag = $1; } if (%{$self->{CONFIGS}}->{$config}->{LINK} !~ m/ \/$shortflag/) { %{$self->{CONFIGS}}->{$config}->{LINK} .= " /$flag"; } } } } elsif (m/\# SUBTRACT BASE LINK32(.*)$/ || m/\# SUBTRACT LINK32(.*)$/ || m/\# SUBTRACT BASE LIB32(.*)$/ || m/\# SUBTRACT LIB32(.*)$/) { my @flags = split (/ \//, $1); foreach my $flag (@flags) { my $shortflag = $flag; if ($flag =~ m/^(.*)\:/) { $shortflag = $1; } if ($flag && %{$self->{CONFIGS}}->{$config}->{LINK} =~ m/ (\/$shortflag\:[^ ]*)/) { %{$self->{CONFIGS}}->{$config}->{LINK} =~ s/ \Q$1\E//ig; } } } if (m/^\# Name \".* - (.*)\"/ && defined %{$self->{CONFIGS}}->{"Unknown"}) { %{$self->{CONFIGS}}->{$1} = %{$self->{CONFIGS}}->{"Unknown"}; delete %{$self->{CONFIGS}}->{"Unknown"}; } if (m/tao\_idl/ && m/\$\(InputName\)\.idl/ || m/tao\_idl/ && m/\$\(InputPath\)/) { $self->{TAOIDL} = 1; } } $fh->close (); $self->{valid} = 1; } ############################################################################### # Build functions sub Build ($) { my $self = shift; my ($config) = @_; my $command = $self->Compiler () . " " . $self->Filename () . " /USEENV" . " /MAKE \"" . $self->Name () . " - " . $config . "\""; system $command; } sub Clean ($) { my $self = shift; my ($config) = @_; my $command = $self->Compiler () . " " . $self->Filename () . " /USEENV" . " /MAKE \"" . $self->Name () . " - " . $config . "\" /CLEAN"; system $command; } 1;ace-6.4.5+dfsg.orig/bin/PerlACE/TestTarget_Android.pm0000644000175000017500000002567113154167357020356 0ustar tggtgg#! /usr/bin/perl package PerlACE::TestTarget_Android; # ****************************************************************** # Description : Creates a PerlACE::Android # Author : Marcel Smit # Create Date : 29/20/2008 # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** use strict; use PerlACE::TestTarget; use PerlACE::ProcessVX; use File::Copy; use File::Glob; use File::Spec; use File::Basename; use Cwd; use English; use POSIX "sys_wait_h"; require PerlACE::ProcessAndroid; our @ISA = qw(PerlACE::TestTarget); $PerlACE::TestTarget_Android::EMULATOR_RUNNING = 0; $PerlACE::TestTarget_Android::LIBS = (); sub new { my $proto = shift; my $config_name = shift; my $component = shift; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "New Android target: $config_name : $component\n"; } my $class = ref ($proto) || $proto; my $self = {}; bless ($self, $class); $self->GetConfigSettings($config_name); $self->{FSROOT} = $ENV{'ANDROID_FS_ROOT'}; $self->{PROCESS} = undef; $self->{RUNNING} = 0; # Start the target. if ($PerlACE::TestTarget_Android::EMULATOR_RUNNING == 0) { $self->start_target (); } return $self; } sub DESTROY { my $self = shift; if ($self->{RUNNING} == 1) { # kill the emulator. No need to shutdown gracefully. if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Killing the Android emulator\n"; } $self->KillAll ('emulator*'); $self->KillAll ('adb'); $PerlACE::TestTarget_Android::EMULATOR_RUNNING = 0; $PerlACE::TestTarget_Android::LIBS = (); } } # ****************************************************************** # Subroutine Section # ****************************************************************** sub LocalFile { my $self = shift; my $file = shift; my $newfile = $self->{FSROOT} . "/" . $file; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Android LocalFile for $file is $newfile\n"; } return $newfile; } sub AddLibPath ($) { my $self = shift; my $dir = shift; my $noarch = shift; # If we have -Config ARCH, use the -ExeSubDir setting as a sub-directory # of the lib path. This is in addition to the regular LibPath. if (!$noarch && defined $self->{ARCH}) { $self->AddLibPath($dir, 1); $dir .= '/' . $self->{EXE_SUBDIR}; } if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Adding libpath $dir\n"; } $self->{LIBPATH} = PerlACE::concat_path ($self->{LIBPATH}, $dir); } sub CreateProcess { my $self = shift; my $process = new PerlACE::ProcessAndroid ($self, @_); return $process; } sub NeedReboot ($) { my $self = shift; $self->{REBOOT_NEEDED} = 1; } # Reboot target sub RebootNow ($) { my $self = shift; $self->{REBOOT_NEEDED} = undef; print STDERR "Attempting to reboot target...\n"; $self->reboot (); } sub start_target () { # For now, we're assuming one target (avd) is running in the test environment. # Need to change this when more than one avd's need to start my $self = shift; my $silent; if (!defined $ENV{'ACE_TEST_VERBOSE'}) { $silent = "2> /dev/null" } if (! defined ($ENV{'ANDROID_SDK_ROOT'})) { print STDERR "Error: Android SDK root not defined.\n"; return 0; } if (! defined ($ENV{'ANDROID_AVD_NAME'})) { print STDERR "Error: Android AVD name not defined.\n"; return 0; } my $avd_name = $ENV{'ANDROID_AVD_NAME'}; my $android_process = $ENV{'ANDROID_SDK_ROOT'} . "/tools/android"; my $avd_process = $ENV{'ANDROID_SDK_ROOT'} . "/tools/emulator"; my $adb_process = $ENV{'ANDROID_SDK_ROOT'} . "/platform-tools/adb"; my $user_data_image = $ENV{'ANDROID_SDK_HOME'} . "/.android/avd/" . $avd_name . ".avd/userdata-qemu.img"; my $avd_options = "-noaudio -no-window -wipe-data"; if (defined ($ENV{'ANDROID_AVD_OPTIONS'})) { print STDERR "Resetting AVD options\n"; $avd_options = $ENV{'ANDROID_AVD_OPTIONS'}; } $self->KillAll ("emulator*"); FORK: { if ($self->{PROCESS} = fork) { #parent here bless $self; } elsif (defined $self->{PROCESS}) { #child here my $user_image_cmd = "rm -f " . $user_data_image; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Removing user data image: $user_image_cmd\n"; } system ( $user_image_cmd ); if ($? != 0) { print STDERR "failed to execute: $!\n"; } my $avd_cmd = "$avd_process" .' -avd ' . "$avd_name $avd_options"; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Starting emulator cmd: $avd_cmd\n"; } system ( $avd_cmd ); if ($? != 0) { print STDERR "failed to execute: $!\n"; } exit; } elsif ($! =~ /No more process/) { #EAGAIN, supposedly recoverable fork error sleep 5; redo FORK; } else { # weird fork error print STDERR "ERROR: Can't fork <" . $avd_process . ">: $!\n"; } } eval { my $timeout = $self->AdbWaitForDeviceTimeout (); local $SIG{ALRM} = sub { die "alarm\n" }; # NB: \n required alarm $timeout; # start the waiting... my $wait_cmd = $adb_process . ' wait-for-device'; system ( $wait_cmd ); # reset alarm alarm 0; }; if ($@) { # timed out exit unless $@ eq "alarm\n"; # propagate unexpected errors } else { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Emulator is running <$self->{PROCESS}> -> start the tests.\n"; } } # AVD is up and running and ready to spawn executables. # First some preparation. my $cmd = $adb_process . ' shell "mkdir ' . $self->{FSROOT} . '/tmp "' . $silent; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Start to execute : $cmd\n"; } system ( $cmd ); $self->{RUNNING} = 1; $PerlACE::TestTarget_Android::EMULATOR_RUNNING = 1; return 0; } sub WaitForFileTimed ($) { my $self = shift; my $file = shift; my $timeout = shift; my $silent; if (!defined $ENV{'ACE_TEST_VERBOSE'}) { $silent = ' > /dev/null 2>&1'; } if ($PerlACE::Process::WAIT_DELAY_FACTOR > 0) { $timeout *= $PerlACE::Process::WAIT_DELAY_FACTOR; } my $newfile = $self->LocalFile ($file); if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Android waits $timeout seconds for $newfile\n"; } # Since the file is available on the target (which we cannot reach), # we will try to pull the file from the target to a local directory. # If succeed, the the file is there an we can continue. my $adb_process = $ENV{'ANDROID_SDK_ROOT'} . "/platform-tools/adb"; my $fsroot_target = $self->{FSROOT}; my $cmd_copy_ior = $adb_process . ' pull ' . $newfile . ' ' . File::Spec->tmpdir() . '/' . basename ($newfile) . $silent; while ($timeout-- != 0) { # copy the ior back to the host sytem if (system ( $cmd_copy_ior ) == 0) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Pull $newfile succeeded\n"; } return 0; } sleep (1); } return -1; } sub DeleteFile ($) { my $self = shift; my $file = shift; my $adb_process = $ENV{'ANDROID_SDK_ROOT'} . "/platform-tools/adb"; my $silent; if (!defined $ENV{'ACE_TEST_VERBOSE'}) { $silent = ' > /dev/null 2>&1'; } my $targetfile = $self->LocalFile ($file); my $cmd = "$adb_process" . ' shell rm '. "$targetfile" . $silent; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "DeleteFile cmd: $cmd\n"; } system ( $cmd ); if ($? != 0) { return -1; } return 0; } sub Kill () { my $self = shift; if ($self->{RUNNING} == 1) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Killing emulator process <$self->{PROCESS}>\n"; } my $cnt = kill (1, $self->{PROCESS}); waitpid ($self->{PROCESS}, WNOHANG); if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Killed $cnt process(es)\n"; } # $self->check_return_value ($?); } $self->{RUNNING} = 0; } sub KillAll ($) { my $self = shift; my $procmask = shift; if ($OSNAME eq 'MSWin32') { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Killall not implemented for Windows\n"; return; } } else { my $cmd_killall = "killall -q -r $procmask"; system ( $cmd_killall ); } } sub PutFile ($) { my $self = shift; my $src = shift; my $silent; if (!defined $ENV{'ACE_TEST_VERBOSE'}) { $silent = "2> /dev/null" } my $adb_process = $ENV{'ANDROID_SDK_ROOT'} . "/platform-tools/adb"; my $targetfile = $self->LocalFile ($src); my $cmd = "$adb_process" . ' push '. "\"$src\" \"$targetfile\" $silent"; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "PutFile cmd: $cmd\n"; } system ( $cmd ); if ($? != 0) { return -1; } return 0; } sub GetFile ($) { my $self = shift; my $remote_file = shift; my $local_file = shift; my $silent; if (!defined $ENV{'ACE_TEST_VERBOSE'}) { $silent = "2> /dev/null" } my $adb_process = $ENV{'ANDROID_SDK_ROOT'} . "/platform-tools/adb"; if (!defined $local_file) { $local_file = $remote_file; } $remote_file = $self->LocalFile($remote_file); my $cmd = "$adb_process" . ' pull '. "$remote_file $local_file $silent"; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "GetFile cmd: $cmd\n"; } system ( $cmd ); if ($? != 0) { return -1; } return 0; } sub PutLib ($) { my $self = shift; my $newlib = shift; my $tgtlib = shift; my $silent; if (!defined $ENV{'ACE_TEST_VERBOSE'}) { $silent = "2> /dev/null" } foreach my $lib (@{$PerlACE::TestTarget_Android::LIBS}) { if ($lib eq $newlib) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Duplicate lib $newlib\n"; } return 0; } } my $adb_process = $ENV{'ANDROID_SDK_ROOT'} . "/platform-tools/adb"; my $cmd = "$adb_process" . ' push '. "\"$newlib\" \"$tgtlib\" $silent"; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "PutLib cmd: $cmd\n"; } system ( $cmd ); if ($? != 0) { return -1; } # keep tabs on copied libs push(@{$PerlACE::TestTarget_Android::LIBS}, $newlib); return 0; } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/ProcessVX_Unix.pm0000644000175000017500000003757413154167357017534 0ustar tggtgg#! /usr/bin/perl package PerlACE::ProcessVX; use strict; use POSIX "sys_wait_h"; use File::Basename; use File::Spec; use Config; use FileHandle; use Cwd; eval { require Net::Telnet; }; ############################################################################### ### Grab signal names my @signame; if (defined $Config{sig_name}) { my $i = 0; foreach my $name (split (' ', $Config{sig_name})) { $signame[$i] = $name; $i++; } } else { my $i; for ($i = 0; $i < 255; ++$i) { $signame[$i] = $i; } } ############################################################################### # This is what GetExitCode will return if the process is still running. my $STILL_ACTIVE = 259; ############################################################################### ### Constructor and Destructor sub new { my $proto = shift; my $class = ref ($proto) || $proto; my $self = {}; $self->{RUNNING} = 0; $self->{IGNOREEXESUBDIR} = 1; $self->{IGNOREHOSTROOT} = 0; $self->{PROCESS} = undef; $self->{EXECUTABLE} = shift; $self->{ARGUMENTS} = shift; if (!defined $PerlACE::ProcessVX::WAIT_DELAY_FACTOR) { $PerlACE::ProcessVX::WAIT_DELAY_FACTOR = 2; } if (!defined $PerlACE::ProcessVX::RebootCmd) { $PerlACE::ProcessVX::RebootCmd = "reboot 0x02"; } bless ($self, $class); return $self; } sub DESTROY { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: <", $self->{EXECUTABLE}, "> still running upon object destruction\n"; $self->Kill (); } if (defined $ENV{'ACE_RUN_VX_IBOOT'} && !defined $ENV{'ACE_RUN_VX_NO_SHUTDOWN'}) { # Shutdown the target to save power $self->iboot_cycle_power(1); } } ############################################################################### # Use the "expect" program to invoke telnet, doesn't need Perl's Net::Telnet. # This is run by the child process which was forked from Spawn(). sub expect_telnet { my($host, $port, $prompt, $cmdsRef) = @_; my $pid = open(EXP, "|expect -f -") or die "ERROR: Could not run 'expect'"; $SIG{'TERM'} = sub { # If the parent wants to Kill() this process, kill 'TERM', $pid; # send a SIGTERM to the expect process and $SIG{'TERM'} = 'DEFAULT'; # then go back to the normal handler for TERM kill 'TERM', $$; # and invoke it. }; print EXP <{RUNNING} == 1) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> already running\n"; return -1; } if (!defined $self->{EXECUTABLE}) { print STDERR "ERROR: Cannot Spawn: No executable specified\n"; return -1; } if ($self->{IGNOREEXESUBDIR} == 0) { if (!-f $self->Executable ()) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> not found\n"; return -1; } } my $status = 0; my $cmdline; # Reboot the target if necessery $self->reboot(); my $program = $self->Executable (); my $exe_cwdrel = dirname ($program); my $prjroot = defined $ENV{'ACE_RUN_VX_PRJ_ROOT'} ? $ENV{'ACE_RUN_VX_PRJ_ROOT'} : $ENV{'ACE_ROOT'}; $exe_cwdrel = cwd() if length ($exe_cwdrel) == 0; $exe_cwdrel = File::Spec->abs2rel($exe_cwdrel, $prjroot); my $cwdrel = File::Spec->abs2rel(cwd(), $prjroot); $program = basename($program, $PerlACE::ProcessVX::ExeExt); my @cmds; my $cmdnr = 0; my $arguments = ""; my $prompt = ''; my $exesubdir = defined $ENV{'ACE_RUN_VX_EXE_SUBDIR'} ? $ENV{'ACE_RUN_VX_EXE_SUBDIR'} : ""; if (defined $ENV{'ACE_RUN_VX_STARTUP_SCRIPT'}) { if (defined $ENV{'ACE_RUN_VX_STARTUP_SCRIPT_ROOT'}) { $cmds[$cmdnr++] = 'cd "' . $ENV{'ACE_RUN_VX_STARTUP_SCRIPT_ROOT'} . '"'; } $cmds[$cmdnr++] = '< ' . $ENV{'ACE_RUN_VX_STARTUP_SCRIPT'}; } if (defined $ENV{'ACE_RUN_VX_STARTUP_COMMAND'}) { $cmds[$cmdnr++] = $ENV{'ACE_RUN_VX_STARTUP_COMMAND'}; } if ($PerlACE::VxWorks_RTP_Test) { $cmds[$cmdnr++] = 'cmd'; if ( defined $ENV{'ACE_RUN_VX_TGTSVR_DEFGW'} && $self->{SET_VX_DEFGW}) { $cmds[$cmdnr++] = "C mRouteAdd(\"0.0.0.0\", \"" . $ENV{'ACE_RUN_VX_TGTSVR_DEFGW'} . "\", 0,0,0)"; $PerlACE::ProcessVX::VxDefGw = 0; } if (defined $ENV{'ACE_RUN_VX_TGT_STARTUP_SCRIPT'}) { my(@start_commands); if (handle_startup_script ($ENV{'ACE_RUN_VX_TGT_STARTUP_SCRIPT'}, \@start_commands)) { push @cmds, @start_commands; $cmdnr += scalar @start_commands; } } $cmds[$cmdnr++] = 'cd "' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $cwdrel . '"'; $cmds[$cmdnr++] = 'C putenv("TMPDIR=' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $cwdrel . '")'; if (defined $ENV{'ACE_RUN_ACE_DEBUG'}) { $cmds[$cmdnr++] = 'C putenv("ACE_DEBUG=' . $ENV{'ACE_RUN_ACE_DEBUG'} . '")'; } if (defined $ENV{'ACE_RUN_TAO_ORB_DEBUG'}) { $cmds[$cmdnr++] = 'C putenv("TAO_ORB_DEBUG=' . $ENV{'ACE_RUN_TAO_ORB_DEBUG'} . '")'; } if (defined $ENV{'ACE_RUN_ACE_LD_SEARCH_PATH'}) { $cmds[$cmdnr++] = 'C putenv("ACE_LD_SEARCH_PATH=' . $ENV{'ACE_RUN_ACE_LD_SEARCH_PATH'} . '")'; } if (defined $self->{TARGET}) { my $x_env_ref = $self->{TARGET}->{EXTRA_ENV}; while ( my ($env_key, $env_value) = each(%$x_env_ref) ) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "INFO: adding target environment $env_key=$env_value\n"; } $cmds[$cmdnr++] = 'C putenv("' . $env_key. '=' . $env_value . '")'; } } if (defined $ENV{'ACE_RUN_VX_CHECK_RESOURCES'}) { $cmds[$cmdnr++] = 'C memShow()'; } $cmdline = $program . $PerlACE::ProcessVX::ExeExt . ' ' . $self->{ARGUMENTS}; $cmds[$cmdnr++] = $cmdline; $prompt = '\[vxWorks \*\]\# $'; } if ($PerlACE::VxWorks_Test) { if ( defined $ENV{'ACE_RUN_VX_TGTSVR_DEFGW'} && $PerlACE::ProcessVX::VxDefGw) { $cmds[$cmdnr++] = "mRouteAdd(\"0.0.0.0\", \"" . $ENV{'ACE_RUN_VX_TGTSVR_DEFGW'} . "\", 0,0,0)"; $PerlACE::ProcessVX::VxDefGw = 0; } if (defined $ENV{'ACE_RUN_VX_TGT_STARTUP_SCRIPT'}) { my(@start_commands); if (handle_startup_script ($ENV{'ACE_RUN_VX_TGT_STARTUP_SCRIPT'}, \@start_commands)) { push @cmds, @start_commands; $cmdnr += scalar @start_commands; } } my(@load_commands); my(@unload_commands); if (!$PerlACE::Static && !$PerlACE::VxWorks_RTP_Test) { my $vxtest_file = $program . '.vxtest'; if (handle_vxtest_file($self, $vxtest_file, \@load_commands, \@unload_commands)) { $cmds[$cmdnr++] = "cd \"$ENV{'ACE_RUN_VX_TGTSVR_ROOT'}/lib\""; push @cmds, @load_commands; $cmdnr += scalar @load_commands; } else { print STDERR "ERROR: Cannot find <", $vxtest_file, ">\n"; return -1; } } $cmds[$cmdnr++] = 'cd "' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $exe_cwdrel . "/" . $exesubdir . '"'; $cmds[$cmdnr++] = 'putenv("TMPDIR=' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $cwdrel . '")'; if (defined $ENV{'ACE_RUN_VX_CHECK_RESOURCES'}) { $cmds[$cmdnr++] = 'memShow()'; } if (defined $ENV{'ACE_RUN_ACE_DEBUG'}) { $cmds[$cmdnr++] = 'putenv("ACE_DEBUG=' . $ENV{'ACE_RUN_ACE_DEBUG'} . '")'; } if (defined $ENV{'ACE_RUN_TAO_ORB_DEBUG'}) { $cmds[$cmdnr++] = 'putenv("TAO_ORB_DEBUG=' . $ENV{'ACE_RUN_TAO_ORB_DEBUG'} . '")'; } if (defined $ENV{'ACE_RUN_ACE_LD_SEARCH_PATH'}) { $cmds[$cmdnr++] = 'putenv("ACE_LD_SEARCH_PATH=' . $ENV{'ACE_RUN_ACE_LD_SEARCH_PATH'} . '")'; } if (defined $self->{TARGET}) { my $x_env_ref = $self->{TARGET}->{EXTRA_ENV}; while ( my ($env_key, $env_value) = each(%$x_env_ref) ) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "INFO: adding target environment $env_key=$env_value\n"; } $cmds[$cmdnr++] = 'putenv("' . $env_key. '=' . $env_value . '")'; } } $cmds[$cmdnr++] = 'ld <'. $program . $PerlACE::ProcessVX::ExeExt; $cmdline = $program . $PerlACE::ProcessVX::ExeExt . ' ' . $self->{ARGUMENTS}; if (defined $self->{ARGUMENTS}) { ($arguments = $self->{ARGUMENTS})=~ s/\"/\\\"/g; ($arguments = $self->{ARGUMENTS})=~ s/\'/\\\'/g; $arguments = ",\"" . $arguments . "\""; } if (defined $ENV{'ACE_RUN_VX_TGTSRV_WORKINGDIR'}) { $cmds[$cmdnr++] = 'cd "' . $ENV{'ACE_RUN_VX_TGTSRV_WORKINGDIR'} . '"'; } else { $cmds[$cmdnr++] = 'cd "' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $cwdrel . '"'; } $cmds[$cmdnr++] = 'ace_vx_rc = vx_execae(ace_main' . $arguments . ')'; $cmds[$cmdnr++] = 'unld "'. $program . $PerlACE::ProcessVX::ExeExt . '"'; push @cmds, @unload_commands; $cmdnr += scalar @unload_commands; $prompt = '-> $'; } FORK: { if ($self->{PROCESS} = fork) { #parent here bless $self; } elsif (defined $self->{PROCESS}) { #child here my $telnet_port = $ENV{'ACE_RUN_VX_TGT_TELNET_PORT'}; my $telnet_host = $ENV{'ACE_RUN_VX_TGT_TELNET_HOST'}; if (!defined $telnet_host) { $telnet_host = $ENV{'ACE_RUN_VX_TGTHOST'}; } if (!defined $telnet_port) { $telnet_port = 23; } if (defined $ENV{'ACE_RUN_VX_USE_EXPECT'}) { expect_telnet($telnet_host, $telnet_port, $prompt, \@cmds); sleep(2); exit; } if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "Opening telnet connection <" . $telnet_host . ":". $telnet_port . ">\n"; } my $t = new Net::Telnet(Timeout => 600, Errmode => 'return', Host => $telnet_host, Port => $telnet_port); if (!defined $t) { die "ERROR: Telnet failed to <" . $telnet_host . ":". $telnet_port . ">"; } my $retries = 10; while ($retries--) { if (!$t->open()) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "Couldn't open telnet connection; sleeping then retrying\n"; } if ($retries == 0) { die "ERROR: Telnet open to <" . $telnet_host . ":". $telnet_port . "> " . $t->errmsg; } sleep(5); } else { last; } } my $target_login = $ENV{'ACE_RUN_VX_LOGIN'}; my $target_password = $ENV{'ACE_RUN_VX_PASSWORD'}; if (defined $target_login) { $t->waitfor('/VxWorks login: $/'); $t->print("$target_login"); } if (defined $target_password) { $t->waitfor('/Password: $/'); $t->print("$target_password"); } my $buf = ''; # wait for the prompt my $prompt1 = '->[\ ]$'; while (1) { my $blk = $t->get; print $blk; $buf .= $blk; if ($buf =~ /$prompt1/) { last; } } if ($buf !~ /$prompt1/) { die "ERROR: Didn't got prompt but got <$buf>"; } my $i = 0; my @lines; while($i < $cmdnr) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print $cmds[$i]."\n"; } if ($t->print ($cmds[$i++])) { # After each command wait for the prompt my $buf = ''; while (1) { my $blk = $t->get; print $blk; $buf .= $blk; if ($buf =~ /$prompt/) { last; } } } else { print $t->errmsg; } } $t->close(); sleep(2); exit; } elsif ($! =~ /No more process/) { #EAGAIN, supposedly recoverable fork error sleep 5; redo FORK; } else { # weird fork error print STDERR "ERROR: Can't fork <" . $cmdline . ">: $!\n"; } } $self->{RUNNING} = 1; return 0; } # Terminate the process and wait for it to finish sub TerminateWaitKill ($) { my $self = shift; my $timeout = shift; if ($self->{RUNNING}) { print STDERR "INFO: $self->{EXECUTABLE} being killed.\n"; kill ('TERM', $self->{PROCESS}); $PerlACE::ProcessVX::DoVxInit = 1; # force reboot on next run } return $self->WaitKill ($timeout); } # really only for internal use sub check_return_value ($) { my $self = shift; my $rc = shift; my $CC_MASK = 0xff00; # Exit code processing if ($rc == 0) { return 0; } elsif ($rc == $CC_MASK) { print STDERR "ERROR: <", $self->{EXECUTABLE}, "> failed: $!\n"; $PerlACE::ProcessVX::DoVxInit = 1; # force reboot on next run return ($rc >> 8); } elsif (($rc & 0xff) == 0) { $rc >>= 8; return $rc; } # Remember Core dump flag my $dump = 0; if ($rc & 0x80) { $rc &= ~0x80; $dump = 1; } # check for ABRT, KILL or TERM if ($rc == 6 || $rc == 9 || $rc == 15) { return 0; } print STDERR "ERROR: <", $self->{EXECUTABLE}, "> exited with "; print STDERR "coredump from " if ($dump == 1); print STDERR "signal $rc : ", $signame[$rc], "\n"; $PerlACE::ProcessVX::DoVxInit = 1; # force reboot on next run return 0; } sub Kill () { my $self = shift; if ($self->{RUNNING} && !defined $ENV{'ACE_TEST_WINDOW'}) { kill ((defined $ENV{'ACE_RUN_VX_USE_EXPECT'}) ? 'TERM' : 'KILL', $self->{PROCESS}); waitpid ($self->{PROCESS}, 0); $self->check_return_value ($?); } $self->{RUNNING} = 0; } # Wait until a process exits. # return -1 if the process is still alive. sub Wait ($) { my $self = shift; my $timeout = shift; if (!defined $timeout || $timeout < 0) { waitpid ($self->{PROCESS}, 0); } else { return TimedWait($self, $timeout); } } sub TimedWait ($) { my $self = shift; my $timeout = shift; if ($PerlACE::Process::WAIT_DELAY_FACTOR > 0) { $timeout *= $PerlACE::Process::WAIT_DELAY_FACTOR; } # Multiply with 10 because we wait a tenth of a second each time $timeout *= 10; while ($timeout-- != 0) { my $pid = waitpid ($self->{PROCESS}, &WNOHANG); if ($pid != 0 && $? != -1) { return $self->check_return_value ($?); } select(undef, undef, undef, 0.1); } $PerlACE::ProcessVX::DoVxInit = 1; # force reboot on next run return -1; } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/ProcessVX_Win32.pm0000644000175000017500000003124013154167357017473 0ustar tggtgg#! /usr/bin/perl package PerlACE::ProcessVX; use strict; use Win32::Process; use File::Basename; use File::Spec; use FileHandle; use Cwd; eval { require Net::Telnet; }; ############################################################################### # This is what GetExitCode will return if the process is still running. my $STILL_ACTIVE = 259; ############################################################################### ### Constructor and Destructor sub new { my $proto = shift; my $class = ref ($proto) || $proto; my $self = {}; $self->{RUNNING} = 0; $self->{IGNOREEXESUBDIR} = 1; $self->{IGNOREHOSTROOT} = 0; $self->{PROCESS} = undef; $self->{EXECUTABLE} = shift; $self->{ARGUMENTS} = shift; if (!defined $PerlACE::ProcessVX::WAIT_DELAY_FACTOR) { $PerlACE::ProcessVX::WAIT_DELAY_FACTOR = 3; } if (!defined $PerlACE::ProcessVX::RebootCmd) { $PerlACE::ProcessVX::RebootCmd = "reboot"; } bless ($self, $class); return $self; } sub DESTROY { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: <", $self->{EXECUTABLE}, "> still running upon object destruction\n"; $self->Kill (); } if (!defined $ENV{'ACE_TEST_VERBOSE'}) { unlink "run_vx.pl"; } if (defined $ENV{'ACE_RUN_VX_IBOOT'} && !defined $ENV{'ACE_RUN_VX_NO_SHUTDOWN'}) { # Shutdown the target to save power $self->iboot_cycle_power(1); } } ############################################################################### ### Spawning processes # Spawn the process and continue. sub Spawn () { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> already running\n"; return -1; } if (!defined $self->{EXECUTABLE}) { print STDERR "ERROR: Cannot Spawn: No executable specified\n"; return -1; } if ($self->{IGNOREEXESUBDIR} == 0) { if (!-f $self->Executable ()) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> not found\n"; return -1; } } my $status = 0; my $cmdline; # Reboot the target if necessery $self->reboot(); my $program = $self->Executable (); my $cwdrel = dirname ($program); my $prjroot = defined $ENV{'ACE_RUN_VX_PRJ_ROOT'} ? $ENV{'ACE_RUN_VX_PRJ_ROOT'} : $ENV{'ACE_ROOT'}; if (length ($cwdrel) > 0) { $cwdrel = File::Spec->abs2rel( cwd(), $prjroot ); } else { $cwdrel = File::Spec->abs2rel( $cwdrel, $prjroot ); } $cwdrel =~ s/\\/\//g; $program = basename($program, $PerlACE::ProcessVX::ExeExt); unlink "run_vx.pl"; my $oh = new FileHandle(); if (!open($oh, ">run_vx.pl")) { print STDERR "ERROR: Unable to write to run_vx.pl\n"; exit -1; } my @cmds; my $cmdnr = 0; my $arguments = ""; my $prompt = ''; my $exesubdir = defined $ENV{'ACE_RUN_VX_EXE_SUBDIR'} ? $ENV{'ACE_RUN_VX_EXE_SUBDIR'} : ""; if (defined $ENV{'ACE_RUN_VX_STARTUP_SCRIPT'}) { if (defined $ENV{'ACE_RUN_VX_STARTUP_SCRIPT_ROOT'}) { @cmds[$cmdnr++] = 'cd "' . $ENV{'ACE_RUN_VX_STARTUP_SCRIPT_ROOT'} . '"'; } @cmds[$cmdnr++] = '< ' . $ENV{'ACE_RUN_VX_STARTUP_SCRIPT'}; } if (defined $ENV{'ACE_RUN_VX_STARTUP_COMMAND'}) { @cmds[$cmdnr++] = $ENV{'ACE_RUN_VX_STARTUP_COMMAND'}; } if ($PerlACE::VxWorks_RTP_Test) { @cmds[$cmdnr++] = 'cmd'; if ( defined $ENV{'ACE_RUN_VX_TGTSVR_DEFGW'} && $PerlACE::ProcessVX::VxDefGw) { @cmds[$cmdnr++] = "C mRouteAdd(\"0.0.0.0\", \"" . $ENV{'ACE_RUN_VX_TGTSVR_DEFGW'} . "\", 0,0,0)"; $PerlACE::ProcessVX::VxDefGw = 0; } if (defined $ENV{'ACE_RUN_VX_TGT_STARTUP_SCRIPT'}) { my(@start_commands); if (handle_startup_script ($ENV{'ACE_RUN_VX_TGT_STARTUP_SCRIPT'}, \@start_commands)) { push @cmds, @start_commands; $cmdnr += scalar @start_commands; } } @cmds[$cmdnr++] = 'cd "' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $cwdrel . '"'; @cmds[$cmdnr++] = 'C putenv("TMPDIR=' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $cwdrel . '")'; if (defined $ENV{'ACE_RUN_ACE_DEBUG'}) { @cmds[$cmdnr++] = 'C putenv("ACE_DEBUG=' . $ENV{'ACE_RUN_ACE_DEBUG'} . '")'; } if (defined $ENV{'ACE_RUN_TAO_ORB_DEBUG'}) { @cmds[$cmdnr++] = 'C putenv("TAO_ORB_DEBUG=' . $ENV{'ACE_RUN_TAO_ORB_DEBUG'} . '")'; } if (defined $ENV{'ACE_RUN_ACE_LD_SEARCH_PATH'}) { @cmds[$cmdnr++] = 'C putenv("ACE_LD_SEARCH_PATH=' . $ENV{'ACE_RUN_ACE_LD_SEARCH_PATH'} . '")'; } if (defined $self->{TARGET}) { my $x_env_ref = $self->{TARGET}->{EXTRA_ENV}; while ( my ($env_key, $env_value) = each(%$x_env_ref) ) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "INFO: adding target environment $env_key=$env_value\n"; } @cmds[$cmdnr++] = 'C putenv("' . $env_key. '=' . $env_value . '")'; } } if (defined $ENV{'ACE_RUN_VX_CHECK_RESOURCES'}) { @cmds[$cmdnr++] = 'C memShow()'; } $cmdline = $program . $PerlACE::ProcessVX::ExeExt . ' ' . $self->{ARGUMENTS}; @cmds[$cmdnr++] = $cmdline; $prompt = '\[vxWorks \*\]\# $'; } if ($PerlACE::VxWorks_Test) { if ( defined $ENV{'ACE_RUN_VX_TGTSVR_DEFGW'} && $PerlACE::ProcessVX::VxDefGw) { @cmds[$cmdnr++] = "mRouteAdd(\"0.0.0.0\", \"" . $ENV{'ACE_RUN_VX_TGTSVR_DEFGW'} . "\", 0,0,0)"; $PerlACE::ProcessVX::VxDefGw = 0; } if (defined $ENV{'ACE_RUN_VX_TGT_STARTUP_SCRIPT'}) { my(@start_commands); if (handle_startup_script ($ENV{'ACE_RUN_VX_TGT_STARTUP_SCRIPT'}, \@start_commands)) { push @cmds, @start_commands; $cmdnr += scalar @start_commands; } } my(@load_commands); my(@unload_commands); if (!$PerlACE::Static && !$PerlACE::VxWorks_RTP_Test) { my $vxtest_file = $program . '.vxtest'; if (handle_vxtest_file($self, $vxtest_file, \@load_commands, \@unload_commands)) { @cmds[$cmdnr++] = "cd \"$ENV{'ACE_RUN_VX_TGTSVR_ROOT'}/lib\""; push @cmds, @load_commands; $cmdnr += scalar @load_commands; } else { print STDERR "ERROR: Cannot find <", $vxtest_file, ">\n"; return -1; } } @cmds[$cmdnr++] = 'cd "' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $cwdrel . "/" . $exesubdir . '"'; @cmds[$cmdnr++] = 'putenv("TMPDIR=' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $cwdrel . '")'; if (defined $ENV{'ACE_RUN_VX_CHECK_RESOURCES'}) { @cmds[$cmdnr++] = 'memShow()'; } if (defined $ENV{'ACE_RUN_ACE_DEBUG'}) { @cmds[$cmdnr++] = 'putenv("ACE_DEBUG=' . $ENV{'ACE_RUN_ACE_DEBUG'} . '")'; } if (defined $ENV{'ACE_RUN_TAO_ORB_DEBUG'}) { @cmds[$cmdnr++] = 'putenv("TAO_ORB_DEBUG=' . $ENV{'ACE_RUN_TAO_ORB_DEBUG'} . '")'; } if (defined $ENV{'ACE_RUN_ACE_LD_SEARCH_PATH'}) { @cmds[$cmdnr++] = 'putenv("ACE_LD_SEARCH_PATH=' . $ENV{'ACE_RUN_ACE_LD_SEARCH_PATH'} . '")'; } if (defined $self->{TARGET}) { my $x_env_ref = $self->{TARGET}->{EXTRA_ENV}; while ( my ($env_key, $env_value) = each(%$x_env_ref) ) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "INFO: adding target environment $env_key=$env_value\n"; } @cmds[$cmdnr++] = 'putenv("' . $env_key. '=' . $env_value . '")'; } } @cmds[$cmdnr++] = 'ld <'. $program . $PerlACE::ProcessVX::ExeExt; if (defined $self->{ARGUMENTS}) { ($arguments = $self->{ARGUMENTS})=~ s/\"/\\\"/g; ($arguments = $self->{ARGUMENTS})=~ s/\'/\\\'/g; $arguments = ",\"" . $arguments . "\""; } if (defined $ENV{'ACE_RUN_VX_TGTSRV_WORKINGDIR'}) { @cmds[$cmdnr++] = 'cd "' . $ENV{'ACE_RUN_VX_TGTSRV_WORKINGDIR'} . '"'; } else { @cmds[$cmdnr++] = 'cd "' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $cwdrel . '"'; } @cmds[$cmdnr++] = 'ace_vx_rc = vx_execae(ace_main' . $arguments . ')'; @cmds[$cmdnr++] = 'unld "'. $program . $PerlACE::ProcessVX::ExeExt . '"'; push @cmds, @unload_commands; $cmdnr += scalar @unload_commands; $prompt = '-> $'; } print $oh "require Net::Telnet;\n"; print $oh "my \@cmds;\n"; print $oh "my \$prompt = '$prompt';\n"; my $i = 0; while($i < $cmdnr) { print $oh "\@cmds[$i] = '" . @cmds[$i++] . "';\n"; } print $oh "my \$cmdnr = $cmdnr;\n\n"; print $oh <<'__END__'; my $ok; my $telnet_port = $ENV{'ACE_RUN_VX_TGT_TELNET_PORT'}; my $telnet_host = $ENV{'ACE_RUN_VX_TGT_TELNET_HOST'}; if (!defined $telnet_host) { $telnet_host = $ENV{'ACE_RUN_VX_TGTHOST'}; } if (!defined $telnet_port) { $telnet_port = 23; } my $t = new Net::Telnet(Timeout => 600, Errmode => 'return', Host => $telnet_host, Port => $telnet_port); if (!defined $t) { die "ERROR: Telnet failed to <" . $telnet_host . ":". $telnet_port . ">"; } if (!$t->open()) { die "ERROR: Telnet open to <" . $telnet_host . ":". $telnet_port . "> " . $t->errmsg; } __END__ if (defined $ENV{'ACE_RUN_VX_TERMSERV_DEV'}) { print $oh <<'__END__'; $t->prompt('/' . $ENV{'ACE_RUN_VX_IBOOT_USER'} . '>$/'); $t->login($ENV{'ACE_RUN_VX_IBOOT_USER'}, $ENV{'ACE_RUN_VX_IBOOT_PASSWORD'}); $t->print('direct ' . $ENV{'ACE_RUN_VX_TERMSERV_DEV'}); $t->waitfor('/Entering Direct mode/'); $t->print(''); __END__ } print $oh <<'__END__'; my $target_login = $ENV{'ACE_RUN_VX_LOGIN'}; my $target_password = $ENV{'ACE_RUN_VX_PASSWORD'}; if (defined $target_login) { $t->waitfor('/VxWorks login: $/'); $t->print("$target_login"); } if (defined $target_password) { $t->waitfor('/Password: $/'); $t->print("$target_password"); } # wait for the prompt my $buf = ''; my $prompt1 = '-> $'; while (1) { my $blk = $t->get; print $blk; $buf .= $blk; if ($buf =~ /$prompt1/) { last; } } if ($buf !~ /$prompt1/) { die "ERROR: Didn't got prompt but got <$buf>"; } my $i = 0; my @lines; while($i < $cmdnr) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print @cmds[$i]."\n"; } if ($t->print (@cmds[$i++])) { my $buf = ''; while (1) { my $blk = $t->get; print $blk; $buf .= $blk; if ($buf =~ /$prompt/) { last; } } } else { print $t->errmsg; } } $t->close(); sleep(2); exit; __END__ close($oh); Win32::Process::Create ($self->{PROCESS}, "$^X", "$^X run_vx.pl", 0, 0, '.'); Win32::Process::GetExitCode ($self->{PROCESS}, $status); if ($status != $STILL_ACTIVE) { print STDERR "ERROR: Spawn failed for <", "$^X run_vx.pl", ">\n"; exit $status; } $self->{RUNNING} = 1; return 0; } # Wait for a process to exit with a timeout sub TimedWait ($) { my($self) = shift; my($timeout) = shift; return $self->Wait($timeout); } # Terminate the process and wait for it to finish sub TerminateWaitKill ($) { my $self = shift; my $timeout = shift; if ($self->{RUNNING}) { print STDERR "INFO: $self->{EXECUTABLE} being killed.\n"; Win32::Process::Kill ($self->{PROCESS}, 0); $PerlACE::ProcessVX::DoVxInit = 1; # force reboot on next run } return $self->WaitKill ($timeout); } # Wait until a process exits. # return -1 if the process is still alive. sub Wait ($) { my $self = shift; my $timeout = shift; if (!defined $timeout || $timeout < 0) { $timeout = INFINITE; } else { $timeout = $timeout * 1000 * $PerlACE::ProcessVX::WAIT_DELAY_FACTOR; } my $result = 0; if ($self->{RUNNING}) { $result = Win32::Process::Wait ($self->{PROCESS}, $timeout); if ($result == 0) { return -1; } } Win32::Process::GetExitCode ($self->{PROCESS}, $result); $self->{RUNNING} = 0; if ($result != 0) { $PerlACE::ProcessVX::DoVxInit = 1; # force reboot on next run } return $result; } # Kill the process sub Kill () { my $self = shift; if ($self->{RUNNING}) { Win32::Process::Kill ($self->{PROCESS}, -1); } $self->{RUNNING} = 0; } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/Process.pm0000644000175000017500000000334013154167357016233 0ustar tggtgg#! /usr/bin/perl package PerlACE::Process; use strict; use English; use POSIX qw(:time_h); $PerlACE::Process::ExeSubDir = './'; sub delay_factor { my($lps) = 128; my($factor) = 1; ## Keep increasing the loops per second until the amount of time ## exceeds the number of clocks per second. The original code ## did not multiply $ticks by 8 but, for faster machines, it doesn't ## seem to return false values. The multiplication is done to minimize ## the amount of time it takes to determine the correct factor. while(($lps <<= 1)) { my($ticks) = clock(); for(my $i = $lps; $i >= 0; $i--) { } $ticks = clock() - $ticks; if ($ticks * 8 >= CLOCKS_PER_SEC) { $factor = 500000 / (($lps / $ticks) * CLOCKS_PER_SEC); last; } } return $factor; } ### Check for -ExeSubDir commands, store the last one my @new_argv = (); for(my $i = 0; $i <= $#ARGV; ++$i) { if ($ARGV[$i] eq '-ExeSubDir') { if (defined $ARGV[$i + 1]) { $PerlACE::Process::ExeSubDir = $ARGV[++$i].'/'; } else { print STDERR "You must pass a directory with ExeSubDir\n"; exit(1); } } else { push @new_argv, $ARGV[$i]; } } @ARGV = @new_argv; $PerlACE::Process::WAIT_DELAY_FACTOR = (defined $ENV{'ACE_RUNTEST_DELAY'}) ? $ENV{'ACE_RUNTEST_DELAY'} : 1; # Set the process's target. If there's none, behavior falls back to pre-target # behavior. sub Target($) { my $self = shift; $self->{TARGET} = shift; } if ($OSNAME eq "MSWin32") { require PerlACE::Process_Win32; } elsif ($OSNAME eq "VMS") { require PerlACE::Process_VMS; } else { require PerlACE::Process_Unix; } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/ProcessWinCE_Unix.pm0000644000175000017500000002733313154167357020134 0ustar tggtgg#! /usr/bin/perl package PerlACE::ProcessVX; use strict; use POSIX "sys_wait_h"; use File::Basename; use File::Spec; use Config; use FileHandle; use Cwd; eval { require Net::Telnet; }; ############################################################################### ### Grab signal names my @signame; if (defined $Config{sig_name}) { my $i = 0; foreach my $name (split (' ', $Config{sig_name})) { $signame[$i] = $name; $i++; } } else { my $i; for ($i = 0; $i < 255; ++$i) { $signame[$i] = $i; } } ############################################################################### # This is what GetExitCode will return if the process is still running. my $STILL_ACTIVE = 259; ############################################################################### ### Constructor and Destructor sub new { my $proto = shift; my $class = ref ($proto) || $proto; my $self = {}; $self->{RUNNING} = 0; $self->{IGNOREEXESUBDIR} = 1; $self->{IGNOREHOSTROOT} = 0; $self->{PROCESS} = undef; $self->{EXECUTABLE} = shift; $self->{ARGUMENTS} = shift; $self->{TARGET} = shift; if (!defined $PerlACE::ProcessVX::WAIT_DELAY_FACTOR) { $PerlACE::ProcessVX::WAIT_DELAY_FACTOR = 2; } if (!defined $PerlACE::ProcessVX::RebootCmd) { $PerlACE::ProcessVX::RebootCmd = "reboot 0x02"; } bless ($self, $class); return $self; } sub DESTROY { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: <", $self->{EXECUTABLE}, "> still running upon object destruction\n"; $self->Kill (); } if (defined $ENV{'ACE_RUN_VX_IBOOT'} && !defined $ENV{'ACE_RUN_VX_NO_SHUTDOWN'}) { # Shutdown the target to save power $self->iboot_cycle_power(1); } } ############################################################################### # Spawn the process and continue. sub Spawn () { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> already running\n"; return -1; } if (!defined $self->{EXECUTABLE}) { print STDERR "ERROR: Cannot Spawn: No executable specified\n"; return -1; } if ($self->{IGNOREEXESUBDIR} == 0) { if (!-f $self->Executable ()) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> not found\n"; return -1; } } my $status = 0; my $cmdline; # Reboot the target if necessery $self->reboot(); my $program = $self->Executable (); my $cwdrel = dirname ($program); my $prjroot = defined $ENV{'ACE_RUN_VX_PRJ_ROOT'} ? $ENV{'ACE_RUN_VX_PRJ_ROOT'} : $ENV{'ACE_ROOT'}; if (length ($cwdrel) > 0) { $cwdrel = File::Spec->abs2rel( cwd(), $prjroot ); } else { $cwdrel = File::Spec->abs2rel( $cwdrel, $prjroot ); } $program = basename($program, $PerlACE::ProcessVX::ExeExt); my @cmds; my $cmdnr = 0; my $arguments = ""; my $prompt = ''; my $exesubdir = defined $ENV{'ACE_RUN_VX_EXE_SUBDIR'} ? $ENV{'ACE_RUN_VX_EXE_SUBDIR'} : ""; if (defined $ENV{'ACE_RUN_VX_STARTUP_SCRIPT'}) { if (defined $ENV{'ACE_RUN_VX_STARTUP_SCRIPT_ROOT'}) { $cmds[$cmdnr++] = 'cd "' . $ENV{'ACE_RUN_VX_STARTUP_SCRIPT_ROOT'} . '"'; } $cmds[$cmdnr++] = '< ' . $ENV{'ACE_RUN_VX_STARTUP_SCRIPT'}; } if (defined $ENV{'ACE_RUN_VX_STARTUP_COMMAND'}) { $cmds[$cmdnr++] = $ENV{'ACE_RUN_VX_STARTUP_COMMAND'}; } $cmds[$cmdnr++] = 'cd ' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $cwdrel . "/" . $exesubdir; $cmds[$cmdnr++] = 'set TMPDIR=' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $cwdrel; if (defined $ENV{'ACE_RUN_ACE_DEBUG'}) { $cmds[$cmdnr++] = 'set ACE_DEBUG=' . $ENV{'ACE_RUN_ACE_DEBUG'}; } if (defined $ENV{'ACE_RUN_TAO_ORB_DEBUG'}) { $cmds[$cmdnr++] = 'set TAO_ORB_DEBUG=' . $ENV{'ACE_RUN_TAO_ORB_DEBUG'}; } if (defined $ENV{'ACE_RUN_ACE_LD_SEARCH_PATH'}) { $cmds[$cmdnr++] = 'set ACE_LD_SEARCH_PATH=' . $ENV{'ACE_RUN_ACE_LD_SEARCH_PATH'}; } my(@load_commands); my(@unload_commands); my $vxtest_file = $program . '.vxtest'; if (handle_vxtest_file($self, $vxtest_file, \@load_commands, \@unload_commands)) { push @cmds, @load_commands; $cmdnr += scalar @load_commands; } else { print STDERR "ERROR: Cannot find <", $vxtest_file, ">\n"; } if (defined $self->{ARGUMENTS}) { ($arguments = $self->{ARGUMENTS})=~ s/\"/\\\"/g; ($arguments = $self->{ARGUMENTS})=~ s/\'/\\\'/g; } $cmdline = $program . ' ' . $arguments; if (defined $ENV{'ACE_RUN_VX_TGTSRV_WORKINGDIR'}) { $cmds[$cmdnr++] = 'cd ' . $ENV{'ACE_RUN_VX_TGTSRV_WORKINGDIR'}; } else { $cmds[$cmdnr++] = 'cd ' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $cwdrel; } $cmds[$cmdnr++] = $cmdline; if (!defined $ENV{'ACE_TEST_VERBOSE'}) { push @cmds, @unload_commands; $cmdnr += scalar @unload_commands; } $prompt = '[\\\\].*>[\ ]$'; FORK: { if ($self->{PROCESS} = fork) { #parent here bless $self; } elsif (defined $self->{PROCESS}) { #child here my $telnet_port = $ENV{'ACE_RUN_VX_TGT_TELNET_PORT'}; my $telnet_host = $ENV{'ACE_RUN_VX_TGT_TELNET_HOST'}; if (!defined $telnet_host) { $telnet_host = $ENV{'ACE_RUN_VX_TGTHOST'}; } if (!defined $telnet_port) { $telnet_port = 23; } if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "Opening telnet connection <" . $telnet_host . ":". $telnet_port . ">\n"; } my $t = new Net::Telnet(Timeout => 600, Errmode => 'return', Host => $telnet_host, Port => $telnet_port); if (!defined $t) { die "ERROR: Telnet failed to <" . $telnet_host . ":". $telnet_port . ">"; } my $retries = 10; while ($retries--) { if (!$t->open()) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "Couldn't open telnet connection; sleeping then retrying\n"; } if ($retries == 0) { die "ERROR: Telnet open to <" . $telnet_host . ":". $telnet_port . "> " . $t->errmsg; } sleep(5); } else { last; } } my $target_login = $ENV{'ACE_RUN_VX_LOGIN'}; my $target_password = $ENV{'ACE_RUN_VX_PASSWORD'}; if (defined $target_login) { $t->waitfor('/VxWorks login: $/'); $t->print("$target_login"); } if (defined $target_password) { $t->waitfor('/Password: $/'); $t->print("$target_password"); } my $buf = ''; # wait for the prompt while (1) { my $blk = $t->get; print $blk; $buf .= $blk; if ($buf =~ /$prompt/) { last; } } if ($buf !~ /$prompt/) { die "ERROR: Didn't got prompt but got <$buf>"; } my $i = 0; my @lines; while($i < $cmdnr) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print $cmds[$i]."\n"; } if ($t->print ($cmds[$i++])) { # After each command wait for the prompt my $buf = ''; while (1) { my $blk = $t->get; print $blk; $buf .= $blk; if ($buf =~ /$prompt/) { last; } } } else { print $t->errmsg; } } $t->close(); sleep(2); exit; } elsif ($! =~ /No more process/) { #EAGAIN, supposedly recoverable fork error sleep 5; redo FORK; } else { # weird fork error print STDERR "ERROR: Can't fork <" . $cmdline . ">: $!\n"; } } $self->{RUNNING} = 1; return 0; } # Terminate the process and wait for it to finish sub TerminateWaitKill ($) { my $self = shift; my $timeout = shift; if ($self->{RUNNING}) { print STDERR "INFO: $self->{EXECUTABLE} being killed.\n"; kill ('TERM', $self->{PROCESS}); $PerlACE::ProcessVX::DoVxInit = 1; # force reboot on next run } return $self->WaitKill ($timeout); } # really only for internal use sub check_return_value ($) { my $self = shift; my $rc = shift; my $CC_MASK = 0xff00; # Exit code processing if ($rc == 0) { return 0; } elsif ($rc == $CC_MASK) { print STDERR "ERROR: <", $self->{EXECUTABLE}, "> failed: $!\n"; $PerlACE::ProcessVX::DoVxInit = 1; # force reboot on next run return ($rc >> 8); } elsif (($rc & 0xff) == 0) { $rc >>= 8; return $rc; } # Remember Core dump flag my $dump = 0; if ($rc & 0x80) { $rc &= ~0x80; $dump = 1; } # check for ABRT, KILL or TERM if ($rc == 6 || $rc == 9 || $rc == 15) { return 0; } print STDERR "ERROR: <", $self->{EXECUTABLE}, "> exited with "; print STDERR "coredump from " if ($dump == 1); print STDERR "signal $rc : ", $signame[$rc], "\n"; $PerlACE::ProcessVX::DoVxInit = 1; # force reboot on next run return 0; } sub Kill () { my $self = shift; if ($self->{RUNNING} && !defined $ENV{'ACE_TEST_WINDOW'}) { kill ('KILL', $self->{PROCESS}); waitpid ($self->{PROCESS}, 0); $self->check_return_value ($?); } $self->{RUNNING} = 0; } # Wait until a process exits. # return -1 if the process is still alive. sub Wait ($) { my $self = shift; my $timeout = shift; if (!defined $timeout || $timeout < 0) { waitpid ($self->{PROCESS}, 0); } else { return TimedWait($self, $timeout); } } sub TimedWait ($) { my $self = shift; my $timeout = shift; if ($PerlACE::Process::WAIT_DELAY_FACTOR > 0) { $timeout *= $PerlACE::Process::WAIT_DELAY_FACTOR; } while ($timeout-- != 0) { my $pid = waitpid ($self->{PROCESS}, &WNOHANG); if ($pid != 0 && $? != -1) { return $self->check_return_value ($?); } sleep 1; } $PerlACE::ProcessVX::DoVxInit = 1; # force reboot on next run return -1; } sub handle_vxtest_file { my $self = shift; my $vxtestfile = shift; my $vx_ref = shift; my $unld_ref = shift; my $fh = new FileHandle; if (defined $self->{TARGET} && $self->{TARGET}->SystemLibs()) { my @tokens = split(/;/, $self->{TARGET}->SystemLibs()); foreach my $token (@tokens) { push @$vx_ref, "copy " . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/lib/" . $token . " ."; unshift @$unld_ref, "del " . $token; } } if (!$PerlACE::Static) { if (open ($fh, $vxtestfile)) { my $line1 = <$fh>; chomp $line1; while(<$fh>) { $line1 = $_; chomp $line1; push @$vx_ref, "copy " . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/lib/$line1" . ".dll ."; unshift @$unld_ref, "del $line1" . ".dll"; } close $fh; } else { return 0; } } return 1; } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/ProcessLVRT.pm0000644000175000017500000002115013154167357016742 0ustar tggtgg#! /usr/bin/perl # # ProcessLVRT - how to run ACE+TAO tests on a LabVIEW RT target. # Tests on LabVIEW RT are not executables - LabVIEW RT can't start plain # executables; the tests are built/packaged as DLLs and loaded and executed # from a DLL loaded at LabVIEW RT boot time. The DLL on the target listens # on a TCP port (8888 by default) for connections from the host. Host requests # actions using text commands to the target. # # NOTE: This module requires the Net-Telnet Perl module. # # We can FTP files to and from the LabVIEW target, but there's no NFS or # SMB shares. package PerlACE::ProcessLVRT; our @ISA = "PerlACE::Process"; use strict; use Cwd; use English; use File::Basename; use Net::FTP; use Net::Telnet; use POSIX qw(:time_h); $PerlACE::ProcessLVRT::ExeSubDir = './'; ### Check for -ExeSubDir commands, store the last one my @new_argv = (); for(my $i = 0; $i <= $#ARGV; ++$i) { if ($ARGV[$i] eq '-ExeSubDir') { if (defined $ARGV[$i + 1]) { $PerlACE::ProcessLVRT::ExeSubDir = $ARGV[++$i].'/'; } else { print STDERR "You must pass a directory with ExeSubDir\n"; exit(1); } } else { push @new_argv, $ARGV[$i]; } } @ARGV = @new_argv; ### Constructor and Destructor sub new { my $proto = shift; my $class = ref ($proto) || $proto; my $self = {}; $self->{TARGET} = shift; $self->{EXECUTABLE} = shift; $self->{ARGUMENTS} = shift; $self->{RUNNING} = 0; $self->{IGNOREEXESUBDIR} = 1; bless ($self, $class); return $self; } sub DESTROY { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: <", $self->{EXECUTABLE}, "> still running upon object destruction\n"; $self->Kill (); } if (defined $self->{TELNET}) { $self->{TELNET}->close(); $self->{TELNET} = undef; } } ############################################################################### # Adjust executable name for LabVIEW RT testing needs. These tests are DLLs. sub Executable { my $self = shift; if (@_ != 0) { $self->{EXECUTABLE} = shift; } my $executable = $self->{EXECUTABLE}; my $basename = basename ($executable); my $dirname = dirname ($executable). '/'; my $subdir = $PerlACE::ProcessLVRT::ExeSubDir; if (defined $self->{TARGET}) { $subdir = $self->{TARGET}->ExeSubDir(); } $executable = $dirname.$subdir.$basename.".DLL"; $executable =~ s/\//\\/g; # / <- # color coding issue in devenv return $executable; } sub Arguments { my $self = shift; if (@_ != 0) { $self->{ARGUMENTS} = shift; } return $self->{ARGUMENTS}; } sub CommandLine () { my $self = shift; my $commandline = "run " . basename($self->Executable(), ".dll"); if (defined $self->{ARGUMENTS}) { $commandline .= ' '.$self->{ARGUMENTS}; } return $commandline; } ############################################################################### # Spawn the process and continue. sub Spawn () { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> already running\n"; return -1; } if (!defined $self->{EXECUTABLE}) { print STDERR "ERROR: Cannot Spawn: No executable specified\n"; return -1; } if ($self->{IGNOREEXESUBDIR} == 0) { if (!-f $self->Executable ()) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> not found\n"; return -1; } } my $status = 0; my $program = $self->Executable (); my $cwdrel = dirname ($program); my $target_ace_root = $self->{TARGET}->ACE_ROOT(); if (length ($cwdrel) > 0) { $cwdrel = File::Spec->abs2rel(cwd(), $target_ace_root); } else { $cwdrel = File::Spec->abs2rel($cwdrel, $target_ace_root); } $self->{TARGET}->{FTP}->cwd($self->{TARGET}->{FSROOT}); $self->{TARGET}->{FTP}->binary(); $self->{TARGET}->{FTP}->put($program); my $targethost = $self->{TARGET}->{IPNAME}; my $targetport = $self->{TARGET}->{CTLPORT}; $self->{TELNET} = new Net::Telnet(Errmode => 'return'); if (!$self->{TELNET}->open(Host => $targethost, Port => $targetport)) { print STDERR "ERROR: target $targethost:$targetport: ", $self->{TELNET}->errmsg(), "\n"; $self->{TELNET} = undef; $self->{TARGET}->NeedReboot; $self->{TARGET}->{FTP}->delete($program); return -1; } my $cmdline = $self->CommandLine(); if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "-> $cmdline\n"; } $self->{TELNET}->print("$cmdline"); my $reply; $reply = $self->{TELNET}->getline(); if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "<- $reply\n"; } if ($reply eq "OK\n") { $self->{RUNNING} = 1; return 0; } print STDERR "ERROR: can't $cmdline: " . $reply . "\n"; $self->{TARGET}->{FTP}->delete($program); # Not unless can't get the response. $self->{TARGET}->NeedReboot; return -1; } # Wait for the process to exit or kill after a time period sub WaitKill ($) { my $self = shift; my $timeout = shift; my $status = $self->TimedWait ($timeout); $self->{RUNNING} = 0; # If the test timed out, the target is probably toast. Don't bother # trying to get the log file until after rebooting and resetting FTP. if ($status == -1) { print STDERR "ERROR: $self->{EXECUTABLE} timedout\n"; $self->Kill(); } # Now get the log file from the test, and delete the test from # the target. The FTP session should still be open. my $program = $self->Executable (); my $logname = basename($program,".dll") . ".log"; my $target_log_path = $self->{TARGET}->{FSROOT} . "\\log\\" . $logname; $program = basename($program); $self->{TARGET}->{FTP}->delete($program); $self->{TARGET}->{FTP}->get($target_log_path,"log\\$logname"); $self->{TARGET}->{FTP}->delete($target_log_path); return $status; } # Do a Spawn and immediately WaitKill sub SpawnWaitKill ($) { my $self = shift; my $timeout = shift; my $status = $self->Spawn (); if ($status == 0) { $status = $self->WaitKill ($timeout); } return $status; } sub TerminateWaitKill ($) { my $self = shift; my $timeout = shift; if ($self->{RUNNING}) { print STDERR "INFO: $self->{EXECUTABLE} being killed.\n"; $self->Kill(); } return $self->WaitKill ($timeout); } sub Kill () { my $self = shift; if ($self->{RUNNING}) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "-> kill\n"; } $self->{TELNET}->print("kill"); # Just wait for any reply; don't care what it is. my $reply = $self->{TELNET}->getline(); if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "<- $reply\n"; } } $self->{RUNNING} = 0; # Trying to kill a LabVIEW RT thread and recover is probably futile. Just # reboot and reset the FTP connection. if (defined $self->{TELNET}) { $self->{TELNET}->close(); $self->{TELNET} = undef; } $self->{TARGET}->RebootReset; } # Wait until a process exits. # return -1 if the process is still alive. sub Wait ($) { my $self = shift; my $timeout = shift; if (!defined $timeout || $timeout < 0) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "-> wait\n"; } $self->{TELNET}->print("wait"); my $reply = $self->{TELNET}->getline(Timeout => 300); $self->{RUNNING} = 0; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "<- $reply\n"; } return 0+ $reply; } else { return TimedWait($self, $timeout); } } sub TimedWait ($) { my $self = shift; my $timeout = shift; my $reply; if (!$self->{RUNNING}) { return -1; } CHECK: while ($timeout > 0) { $self->{TELNET}->print ("status"); if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "-> status\n"; } $reply = $self->{TELNET}->getline(Timeout => $timeout); if (!defined $reply) { last CHECK; } if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "<- $reply\n"; } if ($reply =~ /^RUNNING/) { sleep 2; $timeout -= 2; next CHECK; } # Have a status; return it. $self->{RUNNING} = 0; return 0+ $reply; } return -1; } ### sub kill_all { my $procmask = shift; my $target = shift; ## NOT IMPLEMENTED YET } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/ConfigList.pm0000644000175000017500000000750513154167357016665 0ustar tggtgg#! /usr/bin/perl package PerlACE::ConfigList; use strict; use FileHandle; @PerlACE::ConfigList::Configs = (); @PerlACE::ConfigList::Excludes = (); my @new_argv = (); for(my $i = 0; $i <= $#ARGV; ++$i) { if ($ARGV[$i] eq '-Config') { if (defined $ARGV[$i + 1]) { push @PerlACE::ConfigList::Configs, $ARGV[++$i]; } else { print STDERR "You must pass a configuration with -Config\n"; exit(1); } } elsif ($ARGV[$i] eq '-Exclude') { if (defined $ARGV[$i + 1]) { push @PerlACE::ConfigList::Excludes, $ARGV[++$i]; } else { print STDERR "You must pass an exclude pattern with -Exclude\n"; exit(1); } } else { push @new_argv, $ARGV[$i]; } } @ARGV = @new_argv; sub new () { my $self = {}; @{$self->{MY_CONFIGS}} = @PerlACE::ConfigList::Configs; bless $self; return $self; } sub my_config_list { my $self = shift; if (@_) { @{$self->{MY_CONFIGS}} = @_; } return @{$self->{MY_CONFIGS}}; } sub add_one_config ($) { my $self = shift; my $newconfig = shift; push @{$self->{MY_CONFIGS}}, $newconfig; } sub check_config (@) { my $self = shift; my @testconfigs = @_; my $the_config_allows_this = 1; # default case is true # Go though each ID on the line in turn... foreach my $config (@testconfigs) { my $required_found = !($config =~ /^\w/); foreach my $myconfig (@{$self->{MY_CONFIGS}}) { if ($config eq "!$myconfig") { $the_config_allows_this = 0; } if ($config eq $myconfig) { $required_found = 1; } } if (!$required_found) { $the_config_allows_this = 0; } } return $the_config_allows_this; } sub load ($) { my $self = shift; my $filename = shift; my $fh = new FileHandle; if (!$fh->open ("< $filename")) { print STDERR "Could not open $filename: $!\n"; exit (1); } while (<$fh>) { chomp; if (/^\s*$/ || /^#/) { next; } # compress white space s/\s+/ /g; my $entry = ''; my $configs = ''; ($entry, $configs) = split /:/; # remove trailing white spaces $entry =~ s/\s+$//; push @{$self->{ENTRIES}}, $entry; if (defined $configs) { @{$self->{CONFIGS}->{$entry}} = split (" ", $configs); } } $fh->close (); } sub valid_entries () { my $self = shift; my @entries = (); my $exclude = 0; foreach my $entry (@{$self->{ENTRIES}}) { $exclude = 0; foreach my $expat (@PerlACE::ConfigList::Excludes) { if ($entry =~ /$expat/) { $exclude = 1; last; } } if (!$exclude && $self->check_config (@{$self->{CONFIGS}->{$entry}})) { push @entries, $entry; } } return @entries; } sub list_configs () { my $self = shift; my %allconfigs = {}; my $list = ''; foreach my $entry (@{$self->{ENTRIES}}) { foreach my $config (@{$self->{CONFIGS}->{$entry}}) { $config =~ s/!//g; if ($allconfigs{$config} != 1) { $list .= $config.' '; $allconfigs{$config} = 1; } } } return $list; } sub dump () { my $self = shift; print "============================================================\n"; print "Config\n"; foreach my $config (@{$self->{MY_CONFIGS}}) { print $config, "\n"; } print "\n"; print "Entries\n"; foreach my $entry (@{$self->{ENTRIES}}) { print "- ", $entry, ": "; foreach my $config (@{$self->{CONFIGS}->{$entry}}) { print $config, " "; } print "\n"; } print "============================================================\n"; } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/README0000644000175000017500000001071313154167357015141 0ustar tggtgg HOW TO USE THE DOC TEST FRAMEWORK --------------------------------- The test framework is driven by a Perl script. Run_Test.pm contains some useful, miscellaneous functions. The main classes that control test runs are TestTarget and Process, and the platform-specific derivations of these. The test framework runs scripted tests, examines the output, and writes results to an output file that's parsed for scoreboard generation. It's very important to get the output; from ACE, it's test log files, for TAO, it's stderr output from the test procedures. Either way, it has to get back to somewhere the locally running script can process it. By default, all test procedures run on the local host. It is possible to redirect the execution to other machines. This is necessary for testing environments such as VxWorks and LabVIEW RT, which do not support the local execution of these build and testing scripts. Thus, the build is done on a host system and executed on the target. For multi-component tests, such as TAO server and client, the components can (and most often do) run on different machines. For example, a test may run the server component on the embedded target and the client component on the local build host. To redirect execution of a test's component, you must do three things: 1. Assign a number to the component in the test script. By convention, 1 is the component that runs on a target. In TAO, this is generally the server; in the case of ACE tests, it is the only part. Number 2 is, by convention, the TAO client, or the piece to run on the build host. 2. Set an environment variable, DOC_TEST_. For example, DOC_TEST_1, DOC_TEST_2. The value of the environment variable is a configuration name. 3. Set environment variables for the configuration name. These environment variables hold the information used to run the test component on the configuration. The environment variables are named _. Different types of configurations may require different configuration items, depending on their capabilities and needs. However, the following must be set: _OS: The OS type, e.g., vxworks or labview_rt. If this is "local", the component runs on the local host but with an alternate set of settings, such as ACE_ROOT, TAO_ROOT. _IPNAME: The machine's IP hostname or address _ACE_ROOT: ACE_ROOT for the configuration's files _TAO_ROOT: TAO_ROOT for the configuration's files _TEST_ROOT: Root directory for target path translation, when $TEST_ROOT is set, indicating both are reachable from host. _TEST_FSROOT: Root directory for target node path, translation, when $TEST_ROOT is set. Used to translate to a different filesystem, when not reachable from host. _EXE_SUBDIR: Subdirectory for the executable _PROCESS_START_WAIT_INTERVAL: Time waited for the process to start. Default 15 seconds. _PROCESS_STOP_WAIT_INTERVAL: Time waited for the process to stop. Default 10 seconds. _HOSTNAME: Hostname that has to be used _IBOOT: iBoot for this target _REBOOT_TIME: How long does it take to reboot this target _REBOOT: Do we need to reboot this target _STARTUP_COMMAND: Command to be executed after target has been booted _TELNET_HOST: Host name where we have to connect to with telnet _TELNET_PORT: Port number where we have to connect to with telnet If there is no DOC_TEST_ environment variable when the component runs, that component is executed on the local machine. This is the case for most builds. ace-6.4.5+dfsg.orig/bin/PerlACE/MSProject/0000775000175000017500000000000013157240624016117 5ustar tggtggace-6.4.5+dfsg.orig/bin/PerlACE/MSProject/VCP.pm0000644000175000017500000000076213154167357017120 0ustar tggtgg package PerlACE::MSProject::VCP; use strict; use PerlACE::MSProject; our @ISA = ("PerlACE::MSProject"); ############################################################################### # Constructor sub new { my $proto = shift; my $class = ref ($proto) || $proto; my $self = $class->SUPER::new (@_); $self->{COMPILER} = "evc.com"; bless ($self, $class); return $self; } ############################################################################### # Accessors 1;ace-6.4.5+dfsg.orig/bin/PerlACE/MSProject/DSP.pm0000644000175000017500000000074713154167357017121 0ustar tggtgg package PerlACE::MSProject::DSP; use strict; use PerlACE::MSProject; our @ISA = ("PerlACE::MSProject"); ############################################################################### # Constructor sub new { my $proto = shift; my $class = ref ($proto) || $proto; my $self = $class->SUPER::new (@_); $self->{COMPILER} = "msdev.com"; bless ($self, $class); return $self; } ############################################################################### 1;ace-6.4.5+dfsg.orig/bin/PerlACE/TestTarget_VxWorks.pm0000644000175000017500000000420213154167357020404 0ustar tggtgg#! /usr/bin/perl package PerlACE::TestTarget_VxWorks; # ****************************************************************** # Description : Creates a PerlACE::ProcessVX # Author : Chad Elliott # Create Date : 6/20/2008 # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** use PerlACE::TestTarget; use strict; use PerlACE::ProcessVX; use Cwd; use English; our @ISA = qw(PerlACE::TestTarget); # ****************************************************************** # Subroutine Section # ****************************************************************** sub LocalFile { my($self, $file) = @_; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "LocalFile is $file\n"; } return $file; } sub AddLibPath ($) { my $self = shift; my $dir = shift; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Adding libpath $dir\n"; } PerlACE::add_lib_path ($dir); } sub CreateProcess { my $self = shift; my $process = new PerlACE::ProcessVX (@_); $process->{TARGET} = $self; return $process; } # Need a reboot when this target is destroyed. sub NeedReboot ($) { my $self = shift; $self->{REBOOT_NEEDED} = 1; } # Reboot target sub RebootNow ($) { my $self = shift; $self->{REBOOT_NEEDED} = undef; print STDERR "Attempting to reboot target...\n"; reboot (); } sub WaitForFileTimed ($) { my $self = shift; my $file = shift; my $timeout = shift; my $cwdrel = $file; my $prjroot = defined $ENV{'ACE_RUN_VX_PRJ_ROOT'} ? $ENV{'ACE_RUN_VX_PRJ_ROOT'} : $ENV{'ACE_ROOT'}; if (length ($cwdrel) > 0) { $cwdrel = File::Spec->abs2rel( cwd(), $prjroot ); } else { $cwdrel = File::Spec->abs2rel( $cwdrel, $prjroot ); } my $newfile = $self->{HOST_ROOT} . "/" . $cwdrel . "/" . $file; return PerlACE::waitforfile_timed ($newfile, $timeout); } sub KillAll ($) { my $self = shift; my $procmask = shift; PerlACE::ProcessVX::kill_all ($procmask, $self); } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/perlace.mpc0000644000175000017500000000025513154167357016375 0ustar tggtgg// -*- MPC -*- project(PerlACE) : script { Script_Files { ConfigList.pm Process.pm Process_Unix.pm Process_Win32.pm Run_Test.pm } custom_only=1 } ace-6.4.5+dfsg.orig/bin/PerlACE/ProcessVX.pm0000644000175000017500000003024213154167357016512 0ustar tggtgg#! /usr/bin/perl package PerlACE::ProcessVX; use strict; use English; use POSIX qw(:time_h); $PerlACE::ProcessVX::ExeSubDir = './'; $PerlACE::ProcessVX::DoVxInit = (defined $ENV{'ACE_RUN_VX_NO_INITIAL_REBOOT'}) ? 0 : 1; $PerlACE::ProcessVX::VxDefGw = 1; $PerlACE::ProcessVX::RebootTime = (defined $ENV{'ACE_RUN_VX_REBOOT_TIME'}) ? $ENV{'ACE_RUN_VX_REBOOT_TIME'} : 90; $PerlACE::ProcessVX::ExeExt = ($PerlACE::VxWorks_RTP_Test) ? '.vxe' : '.out'; $PerlACE::ProcessVX::RebootCmd = $ENV{'ACE_RUN_VX_REBOOT_CMD'}; # Wait for the process to exit or kill after a time period sub WaitKill ($) { my $self = shift; my $timeout = shift; my $status = $self->TimedWait ($timeout); if ($status == -1) { print STDERR "ERROR: $self->{EXECUTABLE} timedout\n"; $self->Kill (); # Don't need to Wait since we are on Win32 $PerlACE::ProcessVX::DoVxInit = 1; # force reboot on next run } $self->{RUNNING} = 0; return $status; } # Do a Spawn and immediately WaitKill sub SpawnWaitKill ($) { my $self = shift; my $timeout = shift; if ($self->Spawn () == -1) { return -1; } return $self->WaitKill ($timeout); } ############################################################################### ### Some Accessors sub Normalize_Executable_Name { my $self = shift; my $executable = shift; my $basename = basename ($executable); my $dirname = dirname ($executable). '/'; $executable = $dirname.$PerlACE::ProcessVX::ExeSubDir.$basename.$PerlACE::ProcessVX::ExeExt; ## Installed executables do not conform to the ExeSubDir if (! -e $executable && -e $dirname.$basename.$PerlACE::ProcessVX::ExeExt) { $executable = $dirname.$basename.$PerlACE::ProcessVX::ExeExt; } return $executable; } sub Executable { my $self = shift; if (@_ != 0) { $self->{EXECUTABLE} = shift; } my $executable = $self->{EXECUTABLE}; if ($self->{IGNOREEXESUBDIR} == 0) { $executable = $self->Normalize_Executable_Name ($executable); } else { $executable = $executable.$PerlACE::ProcessVX::ExeExt; } return $executable; } sub Arguments { my $self = shift; if (@_ != 0) { $self->{ARGUMENTS} = shift; } return $self->{ARGUMENTS}; } sub CommandLine () { my $self = shift; my $commandline = $self->Executable (); if (defined $self->{ARGUMENTS}) { $commandline .= ' '.$self->{ARGUMENTS}; } return $commandline; } sub IgnoreExeSubDir { my $self = shift; if (@_ != 0) { $self->{IGNOREEXESUBDIR} = shift; } return $self->{IGNOREEXESUBDIR}; } sub IgnoreHostRoot { my $self = shift; if (@_ != 0) { $self->{IGNOREHOSTROOT} = shift; } return $self->{IGNOREHOSTROOT}; } sub delay_factor { my($lps) = 128; my($factor) = 1; ## Keep increasing the loops per second until the amount of time ## exceeds the number of clocks per second. The original code ## did not multiply $ticks by 8 but, for faster machines, it doesn't ## seem to return false values. The multiplication is done to minimize ## the amount of time it takes to determine the correct factor. while(($lps <<= 1)) { my($ticks) = clock(); for(my $i = $lps; $i >= 0; $i--) { } $ticks = clock() - $ticks; if ($ticks * 8 >= CLOCKS_PER_SEC) { $factor = 500000 / (($lps / $ticks) * CLOCKS_PER_SEC); last; } } return $factor; } sub iboot_cycle_power { my $self = shift; my $mode = shift; # mode 0 is reboot, mode 1 is just shutdown my ($iboot_host, $iboot_outlet, $iboot_user, $iboot_passwd ) = ($ENV{'ACE_RUN_VX_IBOOT'}, $ENV{'ACE_RUN_VX_IBOOT_OUTLET'}, $ENV{'ACE_RUN_VX_IBOOT_USER'}, $ENV{'ACE_RUN_VX_IBOOT_PASSWORD'}); my $v = $ENV{'ACE_TEST_VERBOSE'}; if ($v) { print "Using iBoot: $iboot_host\n"; if (defined $iboot_outlet) { print "Using iBoot Outlet #: $iboot_outlet\n"; } } # There are three cases to handle here: # 1. using a single-outlet iBoot # 2. using a multi-outlet iBootBar with custom firmware # 3. using a multi-outlet iBootBar with standard firmware # # In cases 1 & 2, we use the iPAL protocol; in case 3 we # use a telnet connection and the command-line syntax. # # We determine that it's case #3 by the concurrent presence # of an outlet number, an iboot username, and an iboot password # in the environment. # if (defined($iboot_outlet) && defined($iboot_user) && defined($iboot_passwd)) { # We perform case #3 # This case doesn't support shutdown return if $mode == 1; my $t = new Net::Telnet(); $t->prompt('/iBootBar \> /'); my $savedmode = $t->errmode(); $t->errmode("return"); my $retries = 5; my $is_open = 0; while ($retries--) { my $r = $t->open($iboot_host); if ($r == 1) { $is_open = 1; last; } } continue { print "Couldn't open connection; sleeping then retrying\n" if ($v); sleep(5); } if (! $is_open) { print "Unable to open $iboot_host.\n" if ($v); return 0; } $t->errmode($savedmode); # Simple login b/c Net::Telnet::login hardcodes the prompts $t->waitfor('/User Name:\s*$/i'); $t->print($iboot_user); $t->waitfor('/password:\s*/i'); $t->print($iboot_passwd); $t->waitfor($t->prompt); print "successfully logged in to $iboot_host\n" if ($v); my $output = $t->cmd("set outlet $iboot_outlet cycle"); print "successfully cycled power on outlet $iboot_outlet\n" if ($v); $t->close(); } else { # Perform cases 1 & 2 my $iboot; my $text; if (!defined($iboot_passwd)) { $iboot_passwd = "PASS"; } my $ipal_command_series; if (defined $iboot_outlet) { $ipal_command_series = ($mode == 0 ? ['E', 'D'] : ['E']); } else { $ipal_command_series = ($mode == 0 ? ['f', 'n'] : ['f']); } foreach my $ipal_cmd (@$ipal_command_series) { my $retries = 3; my $is_open = 0; while ($retries--) { $iboot = IO::Socket::INET->new ("$iboot_host"); if ($iboot) { # if ACE_RUN_VX_IBOOT_OUTLET is defined, we're using # the iBootBar, and we're using the iPAL Protocol # to communicate with the iBootBar if (defined $iboot_outlet) { $iboot->send ("\e".$iboot_passwd."\e".$iboot_outlet.$ipal_cmd); } else { $iboot->send ("\e".$iboot_passwd."\e$ipal_cmd\r"); } $iboot->recv ($text,128); print "iBoot is currently: $text (iteration $retries)\n" if ($v); $iboot->close(); if (defined $iboot_outlet) { $text = substr $text, $iboot_outlet - 1, 1; if ($text eq "0" || $text eq "1") { $is_open = 1; last; } else { print "iBoot is $text; sleeping then retrying\n" if ($v); sleep(5); } } else { if ($text eq "OFF" || $text eq "ON") { $is_open = 1; last; } else { print "iBoot is $text; sleeping then retrying\n" if ($v); sleep(5); } } } else { print "Unable to execute 'reboot' command, going to try another $retries times!\n"; } } if (!$is_open) { print "Unable to reboot using $iboot_host.\n" if ($v); return 0; } } } } sub reboot { my $self = shift; my $iboot; my $text; my $t; my $ok; my $target_login = $ENV{'ACE_RUN_VX_LOGIN'}; my $target_password = $ENV{'ACE_RUN_VX_PASSWORD'}; ## ## initialize VxWorks kernel (reboot!) if needed if ($PerlACE::ProcessVX::DoVxInit || $ENV{'ACE_RUN_VX_TGT_REBOOT'}) { if (defined $ENV{'ACE_RUN_VX_REBOOT_TOOL'}) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "Calling: $ENV{'ACE_RUN_VX_REBOOT_TOOL'}\n"; } system ($ENV{'ACE_RUN_VX_REBOOT_TOOL'}); } else { if (defined $ENV{'ACE_RUN_VX_IBOOT'}) { $self->iboot_cycle_power(0); } else { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "Executing 'reboot' command over Telnet to ".$ENV{'ACE_RUN_VX_TGTHOST'}.".\n"; } $t = new Net::Telnet(Timeout => 10, Prompt => '/-> $/', Errmode => 'return'); $t->open($ENV{'ACE_RUN_VX_TGTHOST'}); if (defined $target_login) { $t->waitfor('/VxWorks login: $/'); $t->print("$target_login"); } if (defined $target_password) { $t->waitfor('/Password: $/'); $t->print("$target_password"); } $t->print(""); $ok = $t->waitfor('/-> $/'); if ($ok) { $t->print($PerlACE::ProcessVX::RebootCmd); sleep(5); } else { print "ERROR: FAILED to execute 'reboot' command!\n"; } $t->close(); } } $PerlACE::ProcessVX::VxDefGw = 1; $PerlACE::ProcessVX::DoVxInit = 0; sleep($PerlACE::ProcessVX::RebootTime); } } # Helper for spawning with list of kernel modules in a .vxtest file sub handle_vxtest_file { my $self = shift; my $vxtestfile = shift; my $vx_ref = shift; my $unld_ref = shift; my $fh = new FileHandle; if (open ($fh, $vxtestfile)) { my $line1 = <$fh>; chomp $line1; while(<$fh>) { $line1 = $_; chomp $line1; push @$vx_ref, "ld < lib$line1" . ".so"; unshift @$unld_ref, "unld \"lib$line1" . ".so\""; } close $fh; } else { return 0; } return 1; } # Load a file that is used as startup script. This script has to be # located on the host system sub handle_startup_script { my $script = shift; my $cmds = shift; my $fh = new FileHandle; if (open ($fh, $script)) { while(<$fh>) { my $line1 = $_; chomp $line1; push @$cmds, "$line1"; } close $fh; } else { return 0; } return 1; } ### Check for -ExeSubDir commands, store the last one my @new_argv = (); for(my $i = 0; $i <= $#ARGV; ++$i) { if ($ARGV[$i] eq '-ExeSubDir') { if (defined $ARGV[$i + 1]) { $PerlACE::ProcessVX::ExeSubDir = $ARGV[++$i].'/'; } else { print STDERR "You must pass a directory with ExeSubDir\n"; exit(1); } } else { push @new_argv, $ARGV[$i]; } } @ARGV = @new_argv; $PerlACE::ProcessVX::WAIT_DELAY_FACTOR = $ENV{'ACE_RUNTEST_DELAY'}; if (defined $ENV{'ACE_TEST_WINCE'}) { if ($OSNAME eq "MSWin32") { require PerlACE::ProcessWinCE; } else { require PerlACE::ProcessWinCE_Unix; } } else { if ($OSNAME eq "MSWin32") { require PerlACE::ProcessVX_Win32; } else { require PerlACE::ProcessVX_Unix; } } ### sub kill_all { my $procmask = shift; my $target = shift; ## NOT IMPLEMENTED YET } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/TestTarget_LVRT.pm0000644000175000017500000002022713154167357017555 0ustar tggtgg#! /usr/bin/perl # # TestTarget_LVRT - how to manage the test environment on a LabVIEW RT target. # # We can FTP files to and from the LabVIEW target, but there's no NFS or # SMB shares. # Most information about the target itself is specified via environment # variables. Environment variables with settings are named using the target's # config name with a specific suffix. The current environment variables are: # _IPNAME - the host name/IP of the target. # _CTLPORT- the TCP port number to connect to for the test # controller. If this is not set, port 8888 is used. # _FSROOT - the root of the filesystem on the target where # ACE files will be created from (cwd, if you will). # If this is not set, "\ni-rt" is used as the root. # # Each of these settings are stored in a member variable of the same name in # each object. The process objects can access them using, e.g., # $self->{TARGET}->{IPNAME}. # # This class also makes an FTP object available to process objects that are # created. FTP is set up before creating a process object and can be used to # transfer files to and from the LVRT target. package PerlACE::TestTarget_LVRT; our @ISA = "PerlACE::TestTarget"; ### Constructor and Destructor sub new { my $proto = shift; my $config_name = shift; my $class = ref ($proto) || $proto; my $self = {}; bless ($self, $class); $self->GetConfigSettings($config_name); my $targethost; my $env_name = $config_name.'_IPNAME'; if (exists $ENV{$env_name}) { $targethost = $ENV{$env_name}; } else { print STDERR "You must define target hostname/IP with $env_name\n"; undef $self; return undef; } $env_name = $config_name.'_CTLPORT'; if (exists $ENV{$env_name}) { $self->{CTLPORT} = $ENV{$env_name}; } else { print STDERR "Warning: no $env_name variable; falling back to ", "port 8888\n"; $self->{CTLPORT} = 8888; } $env_name = $config_name.'_FSROOT'; my $fsroot = '\\ni-rt\\system'; if (exists $ENV{$env_name}) { $fsroot = $ENV{$env_name}; } else { print STDERR "Warning: no $env_name variable; falling back ", "to $fsroot\n"; } $self->{FSROOT} = $fsroot; $self->{REBOOT_CMD} = $ENV{'ACE_REBOOT_LVRT_CMD'}; if (!defined $self->{REBOOT_CMD}) { $self->{REBOOT_CMD} = 'I_Need_A_Reboot_Command'; } $self->{REBOOT_TIME} = $ENV{'ACE_LVRT_REBOOT_TIME'}; if (!defined $self->{REBOOT_TIME}) { $self->{REBOOT_TIME} = 200; } $self->{REBOOT_TIME} = $ENV{'ACE_RUN_LVRT_REBOOT_TIME'}; if (!defined $self->{REBOOT_TIME}) { $self->{REBOOT_TIME} = 200; } $self->{REBOOT_NEEDED} = undef; $self->{FTP} = new Net::FTP ($targethost); $self->{IPNAME} = $targethost; if (!defined $self->{FTP}) { print STDERR "Error opening FTP to $targethost: $@\n"; $self->{REBOOT_NEEDED} = 1; undef $self; return undef; } $self->{FTP}->login("",""); return $self; } sub DESTROY { my $self = shift; # Reboot if needed; set up clean for the next test. if (defined $self->{REBOOT_NEEDED} && $self->{REBOOT_CMD}) { $self->RebootNow; } # See if there's a log; should be able to retrieve it from rebooted target. if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "LVRT target checking for remaining log...\n"; } $self->GetStderrLog(); if (defined $self->{FTP}) { $self->{FTP}->close; $self->{FTP} = undef; } } ################################################################## sub LocalFile ($) { my $self = shift; my $file = shift; my $newfile = $self->{FSROOT} . '\\' . $file; print STDERR "LVRT LocalFile for $file is $newfile\n"; return $newfile; } sub DeleteFile ($) { my $self = shift; $self->{FTP}->login("",""); foreach my $file (@_) { my $newfile = $self->LocalFile($file); $self->{FTP}->delete($newfile); } } sub GetFile ($) { # Use FTP to retrieve the file from the target; should still be open. # If only one name is given, use it for both local and remote (after # properly LocalFile-ing it). If both names are given, assume the caller # knows what he wants and don't adjust the paths. my $self = shift; my $remote_file = shift; my $local_file = shift; if (!defined $local_file) { $local_file = $remote_file; $remote_file = $self->LocalFile($local_file); } $self->{FTP}->ascii(); if ($self->{FTP}->get($remote_file, $local_file)) { return 0; } return -1; } sub WaitForFileTimed ($) { my $self = shift; my $file = shift; my $timeout = shift; my $newfile = $self->LocalFile($file); my $targetport = $self->{CTLPORT}; my $target = new Net::Telnet(Errmode => 'return'); if (!$target->open(Host => $self->{IPNAME}, Port => $targetport)) { print STDERR "ERROR: target $self->{IPNAME}:$targetport: ", $target->errmsg(), "\n"; return -1; } my $cmdline = "waitforfile $newfile $timeout"; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "-> $cmdline\n"; } $target->print("$cmdline"); my $reply; # Add a small comms delay factor to the timeout $timeout = $timeout + 2; $reply = $target->getline(Timeout => $timeout); if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "<- $reply\n"; } $target->close(); if ($reply eq "OK\n") { return 0; } return -1; } sub CreateProcess ($) { my $self = shift; my $process = new PerlACE::ProcessLVRT ($self, @_); return $process; } sub GetStderrLog ($) { my $self = shift; # Tell the target to snapshot the stderr log; if there is one, copy # it up here and put it out to our stderr. my $targetport = $self->{CTLPORT}; my $target = new Net::Telnet(Errmode => 'return'); if (!$target->open(Host => $self->{IPNAME}, Port => $targetport)) { print STDERR "ERROR: target $self->{IPNAME}:$targetport: ", $target->errmsg(), "\n"; return; } my $cmdline = "snaplog"; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "-> $cmdline\n"; } $target->print("$cmdline"); my $reply; $reply = $target->getline(); if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "<- $reply\n"; } $target->close(); if ($reply eq "NONE\n") { return; } chomp $reply; if (undef $self->{FTP}) { $self->{FTP} = new Net::FTP ($self->{IPNAME}); if (!defined $self->{FTP}) { print STDERR "$@\n"; return -1; } $self->{FTP}->login("",""); } $self->{FTP}->ascii(); if ($self->{FTP}->get($reply, "stderr.txt")) { $self->{FTP}->delete($reply); open(LOG, "stderr.txt"); while () { print STDERR; } close LOG; unlink "stderr.txt"; } return; } # Copy a file to the target. Adjust for different types (DLL, EXE, TEXT) # and debug/non (for DLLs). Additionally, a file can be removed when this # object is deleted, or left in place. sub NeedFile ($) { my $self = shift; } # Need a reboot when this target is destroyed. sub NeedReboot ($) { my $self = shift; $self->{REBOOT_NEEDED} = 1; } # Reboot target sub RebootNow ($) { my $self = shift; $self->{REBOOT_NEEDED} = undef; print STDERR "Attempting to reboot target...\n"; if (defined $self->{FTP}) { $self->{FTP}->close; $self->{FTP} = undef; } system ($self->{REBOOT_CMD}); sleep ($self->{REBOOT_TIME}); } # Reboot now then try to restore the FTP connection. sub RebootReset ($) { my $self = shift; $self->RebootNow; my $targethost = $self->{IPNAME}; $self->{FTP} = new Net::FTP ($targethost); if (!defined $self->{FTP}) { print STDERR "Error reestablishing FTP to $targethost: $@\n"; } else { $self->{FTP}->login("",""); } } sub KillAll ($) { my $self = shift; my $procmask = shift; PerlACE::ProcessLVRT::kill_all ($procmask, $self); } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/ProcessWinCE.pm0000644000175000017500000002253113154167357017124 0ustar tggtgg#! /usr/bin/perl package PerlACE::ProcessVX; use strict; use Win32::Process; use File::Basename; use File::Spec; use FileHandle; use Cwd; eval { require Net::Telnet; }; ############################################################################### # This is what GetExitCode will return if the process is still running. my $STILL_ACTIVE = 259; ############################################################################### ### Constructor and Destructor sub new { my $proto = shift; my $class = ref ($proto) || $proto; my $self = {}; $self->{RUNNING} = 0; $self->{IGNOREEXESUBDIR} = 1; $self->{IGNOREHOSTROOT} = 0; $self->{PROCESS} = undef; $self->{TARGET} = shift; $self->{EXECUTABLE} = shift; $self->{ARGUMENTS} = shift; if (!defined $PerlACE::ProcessVX::WAIT_DELAY_FACTOR) { $PerlACE::ProcessVX::WAIT_DELAY_FACTOR = 3; } if (!defined $PerlACE::ProcessVX::RebootCmd) { $PerlACE::ProcessVX::RebootCmd = "reboot"; } bless ($self, $class); return $self; } sub DESTROY { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: <", $self->{EXECUTABLE}, "> still running upon object destruction\n"; $self->Kill (); } if (!defined $ENV{'ACE_TEST_VERBOSE'}) { unlink "run_vx.pl"; } if (defined $ENV{'ACE_RUN_VX_IBOOT'} && !defined $ENV{'ACE_RUN_VX_NO_SHUTDOWN'}) { # Shutdown the target to save power $self->iboot_cycle_power(1); } } ############################################################################### ### Spawning processes # Spawn the process and continue. sub Spawn () { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> already running\n"; return -1; } if (!defined $self->{EXECUTABLE}) { print STDERR "ERROR: Cannot Spawn: No executable specified\n"; return -1; } if ($self->{IGNOREEXESUBDIR} == 0) { if (!-f $self->Executable ()) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> not found\n"; return -1; } } my $status = 0; my $cmdline; # Reboot the target if necessery $self->reboot(); my $program = $self->Executable (); my $cwdrel = dirname ($program); my $prjroot = defined $ENV{'ACE_RUN_VX_PRJ_ROOT'} ? $ENV{'ACE_RUN_VX_PRJ_ROOT'} : $ENV{'ACE_ROOT'}; if (length ($cwdrel) > 0) { $cwdrel = File::Spec->abs2rel( cwd(), $prjroot ); } else { $cwdrel = File::Spec->abs2rel( $cwdrel, $prjroot ); } $cwdrel =~ s/\\/\//g; $program = basename($program, $PerlACE::ProcessVX::ExeExt); unlink "run_vx.pl"; my $oh = new FileHandle(); if (!open($oh, ">run_vx.pl")) { print STDERR "ERROR: Unable to write to run_vx.pl\n"; exit -1; } my @cmds; my $cmdnr = 0; my $arguments = ""; my $prompt = ''; my $exesubdir = defined $ENV{'ACE_RUN_VX_EXE_SUBDIR'} ? $ENV{'ACE_RUN_VX_EXE_SUBDIR'} : ""; if (defined $ENV{'ACE_RUN_VX_STARTUP_SCRIPT'}) { if (defined $ENV{'ACE_RUN_VX_STARTUP_SCRIPT_ROOT'}) { @cmds[$cmdnr++] = 'cd "' . $ENV{'ACE_RUN_VX_STARTUP_SCRIPT_ROOT'} . '"'; } @cmds[$cmdnr++] = '< ' . $ENV{'ACE_RUN_VX_STARTUP_SCRIPT'}; } if (defined $ENV{'ACE_RUN_VX_STARTUP_COMMAND'}) { @cmds[$cmdnr++] = $ENV{'ACE_RUN_VX_STARTUP_COMMAND'}; } @cmds[$cmdnr++] = 'cd ' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $cwdrel . "/" . $exesubdir; @cmds[$cmdnr++] = 'set TMPDIR=' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $cwdrel; if (defined $ENV{'ACE_RUN_ACE_DEBUG'}) { @cmds[$cmdnr++] = 'set ACE_DEBUG=' . $ENV{'ACE_RUN_ACE_DEBUG'}; } if (defined $ENV{'ACE_RUN_TAO_ORB_DEBUG'}) { @cmds[$cmdnr++] = 'set TAO_ORB_DEBUG=' . $ENV{'ACE_RUN_TAO_ORB_DEBUG'}; } if (defined $ENV{'ACE_RUN_ACE_LD_SEARCH_PATH'}) { @cmds[$cmdnr++] = 'set ACE_LD_SEARCH_PATH=' . $ENV{'ACE_RUN_ACE_LD_SEARCH_PATH'}; } my(@load_commands); my(@unload_commands); my $vxtest_file = $program . '.vxtest'; if (handle_vxtest_file($self, $vxtest_file, \@load_commands, \@unload_commands)) { push @cmds, @load_commands; $cmdnr += scalar @load_commands; } else { print STDERR "ERROR: Cannot find <", $vxtest_file, ">\n"; } if (defined $self->{ARGUMENTS}) { ($arguments = $self->{ARGUMENTS})=~ s/\"/\\\"/g; ($arguments = $self->{ARGUMENTS})=~ s/\'/\\\'/g; } $cmdline = $program . ' ' . $arguments; if (defined $ENV{'ACE_RUN_VX_TGTSRV_WORKINGDIR'}) { @cmds[$cmdnr++] = 'cd ' . $ENV{'ACE_RUN_VX_TGTSRV_WORKINGDIR'}; } else { @cmds[$cmdnr++] = 'cd ' . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/" . $cwdrel; } @cmds[$cmdnr++] = $cmdline; if (!defined $ENV{'ACE_TEST_VERBOSE'}) { push @cmds, @unload_commands; $cmdnr += scalar @unload_commands; } $prompt = '\> $'; print $oh "require Net::Telnet;\n"; print $oh "my \@cmds;\n"; print $oh "my \$prompt = '$prompt';\n"; my $i = 0; while($i < $cmdnr) { print $oh "\@cmds[$i] = '" . @cmds[$i++] . "';\n"; } print $oh "my \$cmdnr = $cmdnr;\n\n"; print $oh <<'__END__'; my $telnet_port = $ENV{'ACE_RUN_VX_TGT_TELNET_PORT'}; my $telnet_host = $ENV{'ACE_RUN_VX_TGT_TELNET_HOST'}; if (!defined $telnet_host) { $telnet_host = $ENV{'ACE_RUN_VX_TGTHOST'}; } if (!defined $telnet_port) { $telnet_port = 23; } my $t = new Net::Telnet(Timeout => 600, Errmode => 'return', Host => $telnet_host, Port => $telnet_port); if (!defined $t) { die "ERROR: Telnet failed to <" . $telnet_host . ":". $telnet_port . ">"; } $t->open(); my $ok = false; my $buf = ''; while (1) { my $blk = $t->get; print $blk; $buf .= $blk; if ($buf =~ /$prompt/) { $ok = true; last; } } if ($ok) { my $i = 0; my @lines; while($i < $cmdnr) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR @cmds[$i]."\n"; } if ($t->print (@cmds[$i++])) { my $buf = ''; while (1) { my $blk = $t->get; printf $blk; $buf .= $blk; if ($buf =~ /$prompt/) { last; } } } else { print $t->errmsg; } } } else { die "ERROR: No prompt appeared\n"; } $t->close(); sleep(2); exit; __END__ close($oh); Win32::Process::Create ($self->{PROCESS}, "$^X", "$^X run_vx.pl", 0, 0, '.'); Win32::Process::GetExitCode ($self->{PROCESS}, $status); if ($status != $STILL_ACTIVE) { print STDERR "ERROR: Spawn failed for <", "$^X run_vx.pl", ">\n"; exit $status; } $self->{RUNNING} = 1; return 0; } # Wait for a process to exit with a timeout sub TimedWait ($) { my($self) = shift; my($timeout) = shift; return $self->Wait($timeout); } # Terminate the process and wait for it to finish sub TerminateWaitKill ($) { my $self = shift; my $timeout = shift; if ($self->{RUNNING}) { print STDERR "INFO: $self->{EXECUTABLE} being killed.\n"; Win32::Process::Kill ($self->{PROCESS}, 0); $PerlACE::ProcessVX::DoVxInit = 1; # force reboot on next run } return $self->WaitKill ($timeout); } # Wait until a process exits. # return -1 if the process is still alive. sub Wait ($) { my $self = shift; my $timeout = shift; if (!defined $timeout || $timeout < 0) { $timeout = INFINITE; } else { $timeout = $timeout * 1000 * $PerlACE::ProcessVX::WAIT_DELAY_FACTOR; } my $result = 0; if ($self->{RUNNING}) { $result = Win32::Process::Wait ($self->{PROCESS}, $timeout); if ($result == 0) { return -1; } } Win32::Process::GetExitCode ($self->{PROCESS}, $result); if ($result != 0) { $PerlACE::ProcessVX::DoVxInit = 1; # force reboot on next run } return $result; } # Kill the process sub Kill () { my $self = shift; if ($self->{RUNNING}) { Win32::Process::Kill ($self->{PROCESS}, -1); } $self->{RUNNING} = 0; } sub handle_vxtest_file { my $self = shift; my $vxtestfile = shift; my $vx_ref = shift; my $unld_ref = shift; my $fh = new FileHandle; if (defined $self->{TARGET} && $self->{TARGET}->SystemLibs()) { my @tokens = split(/;/, $self->{TARGET}->SystemLibs()); foreach my $token (@tokens) { push @$vx_ref, "copy \"" . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/lib/" . $token . "\" ."; } } if (!$PerlACE::Static) { if (open ($fh, $vxtestfile)) { my $line1 = <$fh>; chomp $line1; while(<$fh>) { $line1 = $_; chomp $line1; push @$vx_ref, "copy \"" . $ENV{'ACE_RUN_VX_TGTSVR_ROOT'} . "/lib/$line1" . "d.dll\" ."; unshift @$unld_ref, "del $line1" . "d.dll"; } close $fh; } else { return 0; } } return 1; } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/Run_Test.pm0000644000175000017500000002016113154167357016360 0ustar tggtgg#! /usr/bin/perl # This module contains a few miscellanous functions and some # startup ARGV processing that is used by all tests. use PerlACE::Process; use PerlACE::ConfigList; package PerlACE; use File::Spec; use Cwd; $PerlACE::ACE_ROOT = $ENV{ACE_ROOT}; if(exists $ENV{TAO_ROOT}) { $PerlACE::TAO_ROOT = $ENV{TAO_ROOT}; } else { $PerlACE::TAO_ROOT = "$PerlACE::ACE_ROOT/TAO"; } if(exists $ENV{CIAO_ROOT}) { $PerlACE::CIAO_ROOT = $ENV{CIAO_ROOT}; } else { $PerlACE::CIAO_ROOT = "$PerlACE::TAO_ROOT/CIAO"; } my $config = new PerlACE::ConfigList; $PerlACE::TestConfig = $config; # load VxWorks Process helpers in case this is a VxWorks target build $PerlACE::Static = $config->check_config("STATIC"); $PerlACE::VxWorks_Test = $config->check_config("VxWorks"); $PerlACE::VxWorks_RTP_Test = $config->check_config("VxWorks_RTP"); if ($PerlACE::VxWorks_Test or $PerlACE::VxWorks_RTP_Test) { require PerlACE::ProcessVX; } # Load LabVIEW RT Process helpers in case this is a LabVIEW RT target build. $PerlACE::LabVIEW_RT_Test = $config->check_config("LabVIEW_RT"); if ($PerlACE::LabVIEW_RT_Test) { require PerlACE::ProcessLVRT; } $PerlACE::WinCE_Test = $config->check_config("WINCE"); if ($PerlACE::WinCE_Test) { if ($OSNAME eq "MSWin32") { require PerlACE::ProcessWinCE; } else { require PerlACE::ProcessWinCE_Unix; } } $PerlACE::Android_Test = $config->check_config("ANDROID"); if ($PerlACE::Android_Test) { require PerlACE::ProcessAndroid; } # Figure out the svc.conf extension $svcconf_ext = $ENV{'ACE_RUNTEST_SVCCONF_EXT'}; if (!defined $svcconf_ext) { $svcconf_ext = ".conf"; } # Default timeout. NSCORBA needs more time for process start up. $wait_interval_for_process_creation = (($PerlACE::VxWorks_Test or $PerlACE::VxWorks_RTP_Test) ? 60 : 15); if ($^O eq 'VMS') { $wait_interval_for_process_creation *= 3; } elsif ($^O eq 'nto') { ## QNX can be slow to start processes $wait_interval_for_process_creation += 5; } $wait_interval_for_process_shutdown = (($PerlACE::VxWorks_Test or $PerlACE::VxWorks_RTP_Test) ? 30 : 10); # Turn on autoflush $| = 1; sub LocalFile ($) { my $file = shift; if (File::Spec->file_name_is_absolute( $file )) { return $file; } my $newfile = getcwd () . '/' . $file; if ($^O eq "MSWin32") { $newfile =~ s/\//\\/g; } elsif ($^O eq 'cygwin') { chop($newfile = `/usr/bin/cygpath -w $newfile`); $newfile =~ s/\\/\\\\/g; } return $newfile; } sub rebase_path { my $path = shift; my $cur_root = shift; my $new_root = shift; $path = File::Spec->rel2abs ($path); $path = File::Spec->abs2rel ($path, $cur_root); return $new_root."/".$path; } sub VX_HostFile($) { my $file = shift; return rebase_path ($file, $ENV{'ACE_ROOT'}, $ENV{'HOST_ROOT'}); } # Returns a random port within the range of 10002 - 32767 sub random_port { return (int(rand($$)) % 22766) + 10002; } # Returns a unique id, uid for unix, last digit of IP for NT sub uniqueid { if ($^O eq "MSWin32") { my $uid = 1; open (IPNUM, "ipconfig|") || die "Can't run ipconfig: $!\n"; while () { if (/Address/) { $uid = (split (/: (\d+)\.(\d+)\.(\d+)\.(\d+)/))[4]; } } close IPNUM; return $uid; } else { return $>; } } # Waits until a file exists sub waitforfile { local($file) = @_; select(undef, undef, undef, 0.1) while (!(-e $file && -s $file)); } sub waitforfile_timed { my $file = shift; my $maxtime = shift; $maxtime *= (($PerlACE::VxWorks_Test || $PerlACE::VxWorks_RTP_Test) ? $PerlACE::ProcessVX::WAIT_DELAY_FACTOR : $PerlACE::Process::WAIT_DELAY_FACTOR); # Multiply with 10 because we wait a tenth of a second each time $maxtime *= 10; while ($maxtime-- != 0) { if (-e $file && -s $file) { return 0; } select(undef, undef, undef, 0.1); } return -1; } sub check_n_cleanup_files { my $file = shift; my @flist = glob ($file); my $cntr = 0; my $nfile = scalar(@flist); if ($nfile != 0) { for (; $cntr < $nfile; $cntr++) { print STDERR "File <$flist[$cntr]> exists but should be cleaned up\n"; } unlink @flist; } } sub generate_test_file { my $file = shift; my $size = shift; while ( -e $file ) { $file = $file."X"; } my $data = "abcdefghijklmnopqrstuvwxyz"; $data = $data.uc($data)."0123456789"; open( INPUT, "> $file" ) || die( "can't create input file: $file" ); for($i=62; $i < $size ; $i += 62 ) { print INPUT $data; } $i -= 62; if ($i < $size) { print INPUT substr($data, 0, $size-$i); } close(INPUT); return $file; } sub is_labview_rt_test() { return ($PerlACE::LabVIEW_RT_Test); } sub is_vxworks_test() { return ($PerlACE::VxWorks_Test || $PerlACE::VxWorks_RTP_Test); } sub is_vxworks_rtp_test() { return ($PerlACE::VxWorks_RTP_Test); } sub concat_path { my $pathlist = shift; my $path = shift; if ((!defined $pathlist) || $pathlist =~ /^\s*$/) { return $path; } else { return $pathlist . ($^O eq 'MSWin32' ? ';' : ':') . $path; } } sub add_path { my $name = shift; my $value = shift; $ENV{$name} = concat_path ($ENV{$name}, $value); } sub add_lib_path { my($value) = shift; # Set the library path supporting various platforms. foreach my $env ('PATH', 'DYLD_LIBRARY_PATH', 'LD_LIBRARY_PATH', 'SHLIB_PATH') { add_path($env, $value); if (grep(($_ eq 'ARCH'), @PerlACE::ConfigList::Configs)) { add_path($env, $value . '/' . $PerlACE::Process::ExeSubDir); } } if (defined $ENV{'HOST_ROOT'}) { add_path('PATH', VX_HostFile ($value)); add_path('LD_LIBRARY_PATH', VX_HostFile ($value)); add_path('LIBPATH', VX_HostFile ($value)); add_path('SHLIB_PATH', VX_HostFile ($value)); } } sub check_privilege_group { if ($^O eq 'hpux') { my($access) = 'RTSCHED'; my($status) = 0; my($getprivgrp) = '/bin/getprivgrp'; if (-x $getprivgrp) { if (open(GPG, "$getprivgrp |")) { while() { if (index($_, $access) >= 0) { $status = 1; } } close(GPG); } } if (!$status) { print STDERR "WARNING: You must have $access privileges to run this test.\n", " Run \"man 1m setprivgrp\" for more information.\n"; exit(0); } } } # waits until it finds a matching regular expression in a file # escape metacharacters in the text to wait for sub waitforfileoutput { my $file = shift; my $waittext = shift; if (-e $file && -s $file) { open (DATA, $file); while (my $line = ) { if ($line =~ /($waittext)/) { close(DATA); return 0; } } close(DATA); } sleep 1; } sub waitforfileoutput_timed { my $file = shift; my $waittext = shift; my $maxtime = shift; $maxtime *= (($PerlACE::VxWorks_Test || $PerlACE::VxWorks_RTP_Test) ? $PerlACE::ProcessVX::WAIT_DELAY_FACTOR : $PerlACE::Process::WAIT_DELAY_FACTOR); # Multiply with 10 because we wait a tenth of a second each time $maxtime *= 10; while ($maxtime-- != 0) { if (-e $file && -s $file) { open (DATA, $file); while (my $line = ) { if ($line =~ /($waittext)/) { close(DATA); return 0; } } close(DATA); } select(undef, undef, undef, 0.1); } return -1; } sub GetArchDir { my $dir = shift; if (grep(($_ eq 'ARCH'), @PerlACE::ConfigList::Configs)) { return $dir . $PerlACE::Process::ExeSubDir; } return $dir; } # Add PWD to the load library path add_lib_path ('.'); $sleeptime = 5; 1; ace-6.4.5+dfsg.orig/bin/PerlACE/Process_Unix.pm0000644000175000017500000006750313154167357017251 0ustar tggtgg#! /usr/bin/perl package PerlACE::Process; use strict; use POSIX "sys_wait_h"; use Cwd; use File::Basename; use Config; ############################################################################### ### Grab signal names my @signame; if (defined $Config{sig_name}) { my $i = 0; foreach my $name (split (' ', $Config{sig_name})) { $signame[$i] = $name; $i++; } } else { my $i; for ($i = 0; $i < 255; ++$i) { $signame[$i] = $i; } } ############################################################################### ### Constructor and Destructor sub new { my $proto = shift; my $class = ref ($proto) || $proto; my $self = {}; $self->{RUNNING} = 0; $self->{IGNOREEXESUBDIR} = 0; $self->{IGNOREHOSTROOT} = 0; $self->{PROCESS} = undef; $self->{EXECUTABLE} = shift; $self->{ARGUMENTS} = shift; $self->{VALGRIND_CMD} = $ENV{'ACE_RUN_VALGRIND_CMD'}; if (!defined $PerlACE::Process::WAIT_DELAY_FACTOR) { if (defined $self->{PURIFY_CMD}) { $PerlACE::Process::WAIT_DELAY_FACTOR = 10; } elsif (defined $self->{VALGRIND_CMD}) { $PerlACE::Process::WAIT_DELAY_FACTOR = 10; } else { $PerlACE::Process::WAIT_DELAY_FACTOR = 1; } } bless ($self, $class); return $self; } sub DESTROY { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: <", $self->{EXECUTABLE}, "> still running upon object destruction\n"; $self->Kill (); } if (defined $self->{SCRIPTFILE}) { unlink $self->{SCRIPTFILE}; } } ############################################################################### ### Some Accessors sub Executable { my $self = shift; if (@_ != 0) { $self->{EXECUTABLE} = shift; } my $executable = $self->{EXECUTABLE}; if ($self->{IGNOREHOSTROOT} == 0) { if (PerlACE::is_vxworks_test()) { $executable = PerlACE::VX_HostFile ($executable); } } if ($self->{IGNOREEXESUBDIR}) { return $executable; } my $basename = basename ($executable); my $dirname = dirname ($executable).'/'; my $subdir = $PerlACE::Process::ExeSubDir; if (defined $self->{TARGET} && defined $self->{TARGET}->{EXE_SUBDIR}) { $subdir = $self->{TARGET}->{EXE_SUBDIR}; } $executable = $dirname . $subdir . $basename; return $executable; } sub Arguments { my $self = shift; if (@_ != 0) { $self->{ARGUMENTS} = shift; } return $self->{ARGUMENTS}; } sub ReadPidFile () { my $self = shift; my $tgt_pidfile = shift; my $rc = 0; # If a filesystem mapping exists if (defined $self->{TARGET} && defined $self->{TARGET}{TEST_FSROOT} && defined $ENV{TEST_ROOT}) { my $pidfile = PerlACE::rebase_path ($tgt_pidfile, $self->{TARGET}->{TEST_FSROOT}, $self->{TARGET}->{TEST_ROOT}); if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Checking for pid file $pidfile\n"; } if (-f $pidfile) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Found mapped pid file\n"; } if (open(PID, "<$pidfile")) { $rc = ; close PID; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Read $rc from mapped file\n"; } if ($rc) { unlink $pidfile; } } else { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Could not open mapped pid file\n"; } } } else { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Could not find mapped file " . basename($pidfile) . "\n"; } } } else { my $shell = $self->{TARGET}->{REMOTE_SHELL}; print STDERR "trying to remote read PID from file $tgt_pidfile\n"; $rc = int(`$shell 'if [ -e $tgt_pidfile -a -s $tgt_pidfile ] ; then cat $tgt_pidfile; rm -f $tgt_pidfile >/dev/null 2>&1; else echo 0; fi'`); } return $rc; } sub CommandLine () { my $self = shift; my $exe = File::Spec->rel2abs ($self->Executable ()); my $cur_root = $ENV{TEST_ROOT}; # Translate to target if (defined $self->{TARGET} && defined $ENV{TEST_ROOT} && defined $self->{TARGET}->{TEST_ROOT}) { $exe = PerlACE::rebase_path ($exe, $ENV{TEST_ROOT}, $self->{TARGET}->{TEST_ROOT}); $cur_root = $self->{TARGET}->{TEST_ROOT}; } # Translate to different filesystem if (defined $self->{TARGET} && defined $ENV{TEST_ROOT} && defined $self->{TARGET}->{TEST_FSROOT}) { $exe = PerlACE::rebase_path ($exe, $cur_root, $self->{TARGET}->{TEST_FSROOT}); } elsif (defined $self->{TARGET} && defined $self->{TARGET}->{TARGET_FSROOT}) { # If the target's config has a different filesystem root, rebase the executable # from local root to the target's root. $exe = File::Spec->rel2abs ($exe); $exe = PerlACE::rebase_path ($exe, $self->{TARGET}->{HOST_FSROOT}, $self->{TARGET}->{TARGET_FSROOT}); } my $commandline = $exe; if (defined $self->{REMOTEINFO}) { my($method) = $self->{REMOTEINFO}->{method}; my($username) = $self->{REMOTEINFO}->{username}; my($remote) = $self->{REMOTEINFO}->{hostname}; my($exepath) = $self->{REMOTEINFO}->{exepath}; my($libpath) = $self->{REMOTEINFO}->{libpath}; my($exe) = (defined $exepath ? "$exepath/" . basename($commandline) : $commandline); $commandline = "$method -l $username $remote \""; if (defined $libpath) { my($csh) = (defined $self->{REMOTEINFO}->{shell} && $self->{REMOTEINFO}->{shell} =~ /csh/); foreach my $pvar ('DYLD_LIBRARY_PATH', 'LD_LIBRARY_PATH', 'LIBPATH', 'SHLIB_PATH') { if ($csh) { $commandline .= "if (! \\\$?$pvar) setenv $pvar; " . "setenv $pvar $libpath:\\\$$pvar; "; } else { $commandline .= "$pvar=$libpath:\\\$$pvar; export $pvar; "; } } my($env) = $self->{REMOTEINFO}->{env}; if (defined $env) { foreach my $pvar (keys %$env) { if ($csh) { $commandline .= "setenv $pvar $$env{$pvar}; "; } else { $commandline .= "$pvar=$$env{$pvar}; export $pvar; "; } } } } $commandline .= $exe; } if (defined $self->{ARGUMENTS}) { $commandline .= ' '.$self->{ARGUMENTS}; } # Avoid modifying TAO/tests run_test.pl scripts by using the # ACE_RUNTEST_ARGS environment variable to append command line # arguments. if ($^O eq "nonstop_kernel") { my $global_args = $ENV{'ACE_RUNTEST_ARGS'}; if ((length($global_args) > 0) && ($commandline !~ /tao_idl/)) { $commandline = $commandline . ' ' . $global_args; } } if (defined $self->{REMOTEINFO}) { $commandline .= '"'; } elsif (defined $self->{TARGET} && defined $self->{TARGET}->{REMOTE_SHELL}) { my($shell) = $self->{TARGET}->{REMOTE_SHELL}; my $x_env_ref = $self->{TARGET}->{EXTRA_ENV}; my($root) = $self->{TARGET}->ACE_ROOT(); if (!defined $root) { $root = $ENV{'ACE_ROOT'}; } my $exedir = cwd (); if (defined $self->{TARGET} && defined $ENV{TEST_ROOT} && defined $self->{TARGET}->{TEST_ROOT}) { $exedir = PerlACE::rebase_path ($exedir, $ENV{TEST_ROOT}, $self->{TARGET}->{TEST_ROOT}); if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "INFO: rebased run script exedir to [",$exedir,"]\n"; } } my $tgt_exedir = $exedir; if (defined $self->{TARGET} && defined $ENV{TEST_ROOT} && defined $self->{TARGET}->{TEST_FSROOT}) { $tgt_exedir = PerlACE::rebase_path ($exedir, $self->{TARGET}->{TEST_ROOT}, $self->{TARGET}->{TEST_FSROOT}); } elsif (defined $self->{TARGET} && defined $self->{TARGET}->{TARGET_FSROOT}) { $tgt_exedir = PerlACE::rebase_path ($exedir, $self->{TARGET}->{HOST_FSROOT}, $self->{TARGET}->{TARGET_FSROOT}); if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "INFO: rebased run script exedir to [",$tgt_exedir,"]\n"; } } if (!defined $self->{PIDFILE}) { # PIDFILE is based on target file system $self->{PIDFILE} = "$tgt_exedir/ace-".rand(time).".pid"; } if (!defined $self->{SCRIPTFILE}) { # SCRIPTFILE is based on host file system $self->{SCRIPTFILE} = "$exedir/run-".rand(time).".sh"; } ## create scriptfile my $libpath = "$root/lib"; if (defined $self->{TARGET}->{LIBPATH}) { $libpath = PerlACE::concat_path ($libpath, $self->{TARGET}->{LIBPATH}); } # add working dir by default as for local executions my $run_script = # "if [ ! -e /tmp/.acerun ]; then mkdir /tmp/.acerun; fi\n". "cd $tgt_exedir\n". "export LD_LIBRARY_PATH=$libpath:.:\$LD_LIBRARY_PATH\n". "export DYLD_LIBRARY_PATH=$libpath:.:\$DYLD_LIBRARY_PATH\n". "export LIBPATH=$libpath:.:\$LIBPATH\n". "export SHLIB_PATH=$libpath:.:\$SHLIB_PATH\n". "export PATH=\$PATH:$root/bin:$root/lib:$libpath:.\n"; if (defined $self->{TARGET}->{dance_root}) { $run_script .= "export DANCE_ROOT=$self->{TARGET}->{dance_root}\n"; } if (defined $self->{TARGET}->{ace_root}) { $run_script .= "export ACE_ROOT=$self->{TARGET}->{ace_root}\n"; } if (defined $self->{TARGET}->{tao_root}) { $run_script .= "export TAO_ROOT=$self->{TARGET}->{tao_root}\n"; } if (defined $self->{TARGET}->{ciao_root}) { $run_script .= "export CIAO_ROOT=$self->{TARGET}->{ciao_root}\n"; } while ( my ($env_key, $env_value) = each(%$x_env_ref) ) { $run_script .= "export $env_key=\"$env_value\"\n"; } $run_script .= "$commandline &\n"; $run_script .= "MY_PID=\$!\n". "echo \$MY_PID > ".$self->{PIDFILE}."\n"; if (defined $ENV{'ACE_TEST_VERBOSE'}) { $run_script .= "echo INFO: Process started remote with pid [\$MY_PID]\n"; } $run_script .= "wait \$MY_PID\n"; unless (open (RUN_SCRIPT, ">".$self->{SCRIPTFILE})) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> failed to create ",$self->{SCRIPTFILE},"\n"; return -1; } print RUN_SCRIPT $run_script; close RUN_SCRIPT; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "INFO: created run script [",$self->{SCRIPTFILE},"]\n", $run_script; } if ($self->{TARGET}->PutFile ($self->{SCRIPTFILE}) == -1) { print STDERR "ERROR: Failed to copy <", $self->{SCRIPTFILE}, "> to target \n"; return -1; } $commandline = "$shell \"source $tgt_exedir/".basename ($self->{SCRIPTFILE})."\""; } return $commandline; } sub IgnoreExeSubDir { my $self = shift; # If we have -Config ARCH, do not set IGNOREEXESUBDIR, since with ARCH # all executables (even those in $ACE_ROOT/bin, etc.) are located in the # architecture-specific subdirectory. if (@_ != 0 && !grep(($_ eq 'ARCH'), @PerlACE::ConfigList::Configs)) { $self->{IGNOREEXESUBDIR} = shift; } elsif (@_ != 0 && $self->{EXECUTABLE} =~ /perl$/) { $self->{IGNOREEXESUBDIR} = shift; } return $self->{IGNOREEXESUBDIR}; } sub IgnoreHostRoot { my $self = shift; if (@_ != 0) { $self->{IGNOREHOSTROOT} = shift; } return $self->{IGNOREHOSTROOT}; } sub RemoteInformation { my($self) = shift; my(%params) = @_; ## Valid keys for %params ## hostname - The remote hostname ## method - either rsh or ssh ## username - The remote user name ## exepath - The remote path to the executable ## shell - The shell of the remote user ## libpath - A library path for libraries required by the executable ## env - A hash reference of name value pairs to be set in the ## environment prior to executing the executable. ## ## At a minimum, the user must provide the remote hostname. if (defined $params{'hostname'}) { my(@pwd) = getpwuid($<); $self->{REMOTEINFO} = \%params; if (!defined $self->{REMOTEINFO}->{'method'}) { $self->{REMOTEINFO}->{'method'} = 'ssh'; } if (!defined $self->{REMOTEINFO}->{'username'}) { $self->{REMOTEINFO}->{'username'} = $pwd[0] || $ENV{LOGNAME} || $ENV{USERNAME}; } if (!defined $self->{REMOTEINFO}->{'shell'}) { $self->{REMOTEINFO}->{'shell'} = basename($pwd[8]); } } } ############################################################################### # Spawn the process and continue; sub Normalize_Executable_Name { my $executable = shift; my $basename = basename ($executable); my $dirname = dirname ($executable). '/'; $executable = $dirname.$PerlACE::Process::ExeSubDir.$basename; return $executable; } sub Spawn () { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> already running\n"; return -1; } if (!defined $self->{EXECUTABLE}) { print STDERR "ERROR: Cannot Spawn: No executable specified\n"; return -1; } if ($self->{IGNOREEXESUBDIR} == 0) { if (!defined $self->{REMOTEINFO} && !(defined $self->{TARGET} && (defined $self->{TARGET}->{REMOTE_SHELL} || defined $self->{TARGET}->{TARGET_FSROOT})) && !-f $self->Executable ()) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> not found\n"; return -1; } } my $cmdline = ""; my $executable = ""; if (defined $self->{VALGRIND_CMD}) { my $orig_cmdline = $self->CommandLine(); $executable = $self->{VALGRIND_CMD}; my $basename = basename ($self->{EXECUTABLE}); $cmdline = "$executable $orig_cmdline"; } elsif (defined $ENV{'ACE_TEST_WINDOW'}) { $cmdline = $ENV{'ACE_TEST_WINDOW'} . ' ' . $self->CommandLine(); } else { $executable = $self->Executable(); $executable = File::Spec->rel2abs ($executable); if (defined $self->{TARGET} && defined $self->{TARGET}->{TARGET_FSROOT}) { # If the target's config has a different filesystem root, rebase the executable # from local root to the target's root. $executable = PerlACE::rebase_path ($executable, $self->{TARGET}->{HOST_FSROOT}, $self->{TARGET}->{TARGET_FSROOT}); } $cmdline = $self->CommandLine(); } FORK: { if ($self->{PROCESS} = fork) { #parent here bless $self; } elsif (defined $self->{PROCESS}) { #child here my @cmdlist = $self->parse_command_line($cmdline); if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "INFO: $cmdline\n"; foreach my $arg (@cmdlist) { print "INFO: argument - '$arg'\n"; } } # update environment for target if (defined $self->{TARGET}) { if (!(defined $self->{TARGET}->{REMOTE_SHELL} || defined $self->{REMOTEINFO})) { my $x_env_ref = $self->{TARGET}->{EXTRA_ENV}; while ( my ($env_key, $env_value) = each(%$x_env_ref) ) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "INFO: adding target environment $env_key=$env_value\n"; } $ENV{$env_key} = $env_value; } } if ($self->{TARGET}->{LIBPATH}) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print "INFO: adding target libpath ".$self->{TARGET}->{LIBPATH}."\n"; } PerlACE::add_lib_path ($self->{TARGET}->{LIBPATH}); } } if (!(defined $self->{VALGRIND_CMD} || defined $ENV{'ACE_TEST_WINDOW'}) && (defined $self->{TARGET}) && ($ENV{'ACE_ROOT'} ne $self->{TARGET}->ACE_ROOT ())) { my $x_dir = dirname ($executable); chdir ($x_dir); } exec @cmdlist; die "ERROR: exec failed for <" . $cmdline . ">\n"; } elsif ($! =~ /No more process/) { #EAGAIN, supposedly recoverable fork error sleep 5; redo FORK; } else { # weird fork error print STDERR "ERROR: Can't fork <" . $cmdline . ">: $!\n"; } } if (defined $self->{TARGET} && defined $self->{TARGET}->{REMOTE_SHELL}) { my $pidfile = $self->{PIDFILE}; ## wait max 10 * $PerlACE::Process::WAIT_DELAY_FACTOR sec for pid file to appear my $start_tm = time (); my $max_wait = 10; if ($PerlACE::Process::WAIT_DELAY_FACTOR > 0) { $max_wait *= $PerlACE::Process::WAIT_DELAY_FACTOR; } my $rc = 1; while ((time() - $start_tm) < $max_wait) { select(undef, undef, undef, 0.2); $rc = $self->ReadPidFile($pidfile); if ($rc != 0) { $self->{REMOTE_PID} = $rc; last; } } if (!defined $self->{REMOTE_PID}) { print STDERR "Remote command <" . $cmdline . ">: No PID found at Spawn.\n"; } } $self->{RUNNING} = 1; return 0; } sub WaitKill ($) { my $self = shift; my $timeout = shift; if ($self->{RUNNING} == 0) { return 0; } my $status = $self->TimedWait ($timeout); if ($status == -1) { print STDERR "ERROR: $self->{EXECUTABLE} timedout\n"; $self->Kill (); } $self->{RUNNING} = 0; return $status; } # Do a Spawn and immediately WaitKill sub SpawnWaitKill ($) { my $self = shift; my $timeout = shift; if ($self->Spawn () == -1) { return -1; } return $self->WaitKill ($timeout); } sub TerminateWaitKill ($) { my $self = shift; my $timeout = shift; if ($self->{RUNNING}) { print STDERR "INFO: $self->{EXECUTABLE} being killed.\n"; kill ('TERM', $self->{PROCESS}); } return $self->WaitKill ($timeout); } # really only for internal use sub check_return_value ($) { my $self = shift; my $rc = shift; # NSK OSS has a 32-bit waitpid() status my $is_NSK = ($^O eq "nonstop_kernel"); my $CC_MASK = $is_NSK ? 0xffff00 : 0xff00; # Exit code processing if ($rc == 0) { return 0; } elsif ($rc == $CC_MASK) { print STDERR "ERROR: <", $self->{EXECUTABLE}, "> failed: $!\n"; return ($rc >> 8); } elsif (($rc & 0xff) == 0) { $rc >>= 8; return $rc; } # Ignore NSK 16-bit completion code $rc &= 0xff if $is_NSK; # Remember Core dump flag my $dump = 0; if ($rc & 0x80) { $rc &= ~0x80; $dump = 1; } # check for ABRT, KILL or TERM if ($rc == 6 || $rc == 9 || $rc == 15) { return 0; } print STDERR "ERROR: <", $self->{EXECUTABLE}, "> exited with "; print STDERR "coredump from " if ($dump == 1); print STDERR "signal $rc : ", $signame[$rc], "\n"; return 255; } # for internal use sub parse_command_line ($) { my $self = shift; my $cmdline = shift; $cmdline =~ s/^\s+//; my @cmdlist = (); while ($cmdline ne '') { if ($cmdline =~ /^\"([^\"\\]*(?:\\.[^\"\\]*)*)\"(.*)/) { my $unquoted = $1; $cmdline = $2; $unquoted =~ s/\\\"/\"/g; push @cmdlist, $unquoted; } elsif ($cmdline =~ /^\'([^\'\\]*(?:\\.[^\'\\]*)*)\'(.*)/) { my $unquoted = $1; $cmdline = $2; $unquoted =~ s/\\\'/\'/g; push @cmdlist, $unquoted; } elsif ($cmdline =~ /^([^\s]*)(.*)/) { push @cmdlist, $1; $cmdline = $2; } else { # this must be some kind of error push @cmdlist, $cmdline; } $cmdline =~ s/^\s+//; } return @cmdlist; } sub Kill ($) { my $self = shift; my $ignore_return_value = shift; # If Remote PID not known, but should be if (defined $self->{TARGET} && defined $self->{TARGET}->{REMOTE_SHELL} && !defined $self->{REMOTE_PID}) { my $rc = $self->ReadPidFile($self->{PIDFILE}); if ($rc != 0) { $self->{REMOTE_PID} = $rc; } } my $child_killed = 0; if ($self->{RUNNING} && !defined $ENV{'ACE_TEST_WINDOW'}) { if (defined $self->{TARGET} && defined $self->{TARGET}->{REMOTE_SHELL}) { # Kill remote process if (defined $self->{REMOTE_PID}) { my $cmd = $self->{TARGET}->{REMOTE_SHELL}." kill -s KILL ".$self->{REMOTE_PID}; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "INFO: Killing remote process <", $cmd, ">\n"; select(undef, undef, undef, .5); } $cmd = `$cmd 2>&1`; # Wait to give remote process time to exit select(undef, undef, undef, 3.0); } else { print STDERR "INFO: remote process PID unknown, can't kill\n"; } } else { kill ('KILL', $self->{PROCESS}); $child_killed = 1; } for(my $i = 0; $i < 10; $i++) { my $pid = waitpid ($self->{PROCESS}, WNOHANG); if ($pid > 0) { if (! $ignore_return_value) { $self->check_return_value ($?); } last; } else { if (!$child_killed) { # Kill child process (may be remote shell)) kill ('KILL', $self->{PROCESS}); $child_killed = 1; } select(undef, undef, undef, .5); } } } $self->{RUNNING} = 0; } # Wait until a process exits. # return -1 if the process is still alive. sub Wait ($) { my $self = shift; my $timeout = shift; if (!defined $self->{PROCESS}) { return 0; } if (!defined $timeout || $timeout < 0) { return waitpid ($self->{PROCESS}, 0); } else { return TimedWait($self, $timeout); } } sub TimedWait ($) { my $self = shift; my $timeout = shift; if (!defined $self->{PROCESS}) { return 0; } if ($PerlACE::Process::WAIT_DELAY_FACTOR > 0) { $timeout *= $PerlACE::Process::WAIT_DELAY_FACTOR; } # Multiply with 10 because we wait a tenth of a second each time $timeout *= 10; while ($timeout-- != 0) { my $pid = waitpid ($self->{PROCESS}, &WNOHANG); if ($pid != 0 && $? != -1) { return $self->check_return_value ($?); } select(undef, undef, undef, 0.1); } return -1; } ### sub kill_all { my $procmask = shift; my $target = shift; my $pid = -1; my $cmd; my $valgrind_cmd = $ENV{'ACE_RUN_VALGRIND_CMD'}; my $ps_cmd = 'ps -ef'; my $ps_pid_field = 1; my $ps_cmd_field = 7; my $ps_skip_first = 1; my @ps_fields = 0; if (defined $target && defined $target->{PS_CMD}) { ## in case a special command is required ## format: ::[:] $ps_cmd_field = -1; @ps_fields = split (/:/, $target->{PS_CMD}); $ps_cmd = $ps_fields[0]; if (@ps_fields > 1) { $ps_pid_field = $ps_fields[1]; if (@ps_fields > 2) { $ps_cmd_field = $ps_fields[2]; if (@ps_fields > 3) { $ps_skip_first = ($ps_fields[3] == '1' ? 1 : 0); } } } else { print STDERR "ERROR: Missing field index for PID in [PS_CMD=".$target->{PS_CMD}."]\n"; return 0; } @ps_fields = 0; } else { my $which_ps; if (defined $target && defined $target->{REMOTE_SHELL}) { $which_ps = $target->{REMOTE_SHELL} . ' which ps'; } else { $which_ps = 'which ps'; } my $ps_file = `$which_ps`; if (defined $target && defined $target->{REMOTE_SHELL}) { $which_ps = $target->{REMOTE_SHELL} . " readlink $ps_file"; $ps_file = `$which_ps`; } $ps_file =~ s/^\s+//; $ps_file =~ s/\s+$//; if (($ps_file =~ /busybox/) or ((-l $ps_file) and (readlink ($ps_file)) =~ /busybox/)) { ## some embedded targets use BusyBox for base tools ## with different arguments $ps_cmd = 'ps w'; $ps_pid_field = 0; $ps_cmd_field = 4; } } if (defined $target && defined $target->{REMOTE_SHELL}) { $ps_cmd = $target->{REMOTE_SHELL}.' '.$ps_cmd; } for my $line (`$ps_cmd`) { if ($ps_skip_first) { # skip first line (headers) $ps_skip_first = 0; } else { # split line @ps_fields = split (/\s+/, $line); if (@ps_fields > $ps_pid_field && @ps_fields > $ps_cmd_field) { $pid = $ps_fields[$ps_pid_field]; # process PID # take care of valgrind runs if (defined $valgrind_cmd) { my $pos = index ($line, $valgrind_cmd); if ($pos >= 0) { $cmd = substr ($line, $pos + length ($valgrind_cmd)); $cmd =~ s/^\s+//; # strip leading ws @ps_fields = split (/\s+/, $cmd); $cmd = $ps_fields[0]; } else { $cmd = $line; } } else { if ($ps_cmd_field >= 0) { $cmd = $ps_fields[$ps_cmd_field]; # process cmd / executable } else { $cmd = $line; } } # match process cmd if ($cmd =~ /$procmask/) { if (defined $target && defined $target->{REMOTE_SHELL}) { my $kill_cmd = $target->{REMOTE_SHELL}." kill -s KILL $pid"; $kill_cmd = `$kill_cmd`; } else { kill ('KILL', $pid); # kill process } if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "INFO: Killed process at [$line]\n"; } } } } } } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/TestTarget_WinCE.pm0000644000175000017500000001134713154167357017736 0ustar tggtgg#! /usr/bin/perl package PerlACE::TestTarget_WinCE; # ****************************************************************** # Description : Creates a PerlACE::WinCE # Author : Johnny Willemsen # Create Date : 29/20/2008 # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** use strict; use PerlACE::TestTarget; use PerlACE::ProcessVX; use File::Copy; use Cwd; use English; our @ISA = qw(PerlACE::TestTarget); sub new { my $proto = shift; my $config_name = shift; my $class = ref ($proto) || $proto; my $self = {}; bless ($self, $class); $self->GetConfigSettings($config_name); my $targethost; my $env_name = $config_name.'_IPNAME'; if (exists $ENV{$env_name}) { $targethost = $ENV{$env_name}; } else { print STDERR "You must define target hostname/IP with $env_name\n"; undef $self; return undef; } $env_name = $config_name.'_FS_ROOT'; my $fsroot = '\network\temp\ACE\wince6'; if (exists $ENV{$env_name}) { $fsroot = $ENV{$env_name}; } else { print STDERR "Warning: no $env_name variable; falling back ", "to $fsroot\n"; } $self->{FSROOT} = $fsroot; $self->{REBOOT_CMD} = $ENV{'ACE_REBOOT_LVRT_CMD'}; if (!defined $self->{REBOOT_CMD}) { $self->{REBOOT_CMD} = 'I_Need_A_Reboot_Command'; } $self->{REBOOT_TIME} = $ENV{'ACE_LVRT_REBOOT_TIME'}; if (!defined $self->{REBOOT_TIME}) { $self->{REBOOT_TIME} = 200; } $self->{REBOOT_TIME} = $ENV{'ACE_RUN_LVRT_REBOOT_TIME'}; if (!defined $self->{REBOOT_TIME}) { $self->{REBOOT_TIME} = 200; } $self->{REBOOT_NEEDED} = undef; my $telnet_port = $ENV{'ACE_RUN_VX_TGT_TELNET_PORT'}; my $telnet_host = $ENV{'ACE_RUN_VX_TGT_TELNET_HOST'}; if (!defined $telnet_host) { $telnet_host = $ENV{'ACE_RUN_VX_TGTHOST'}; } if (!defined $telnet_port) { $telnet_port = 23; } if (!defined $self->{HOST_ROOT}) { $self->{HOST_ROOT} = $self->{FSROOT}; } $PerlACE::ProcessVX::ExeExt = '.exe'; return $self; } # ****************************************************************** # Subroutine Section # ****************************************************************** sub LocalFile { my $self = shift; my $file = shift; my $cwdrel = $file; my $prjroot = defined $ENV{'ACE_RUN_VX_PRJ_ROOT'} ? $ENV{'ACE_RUN_VX_PRJ_ROOT'} : $ENV{'ACE_ROOT'}; if (length ($cwdrel) > 0) { $cwdrel = File::Spec->abs2rel( cwd(), $prjroot ); } else { $cwdrel = File::Spec->abs2rel( $cwdrel, $prjroot ); } my $newfile = $self->{FSROOT} . "/" . $cwdrel . "/" . $file; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "WinCE LocalFile for $file is $newfile\n"; } return $newfile; } sub AddLibPath ($) { my $self = shift; my $dir = shift; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Adding libpath $dir\n"; } PerlACE::add_lib_path ($dir); } sub CreateProcess { my $self = shift; if ($OSNAME eq "MSWin32") { my $process = new PerlACE::ProcessVX ($self, @_); return $process; } else { my $process = new PerlACE::ProcessVX (@_, $self); return $process; } } # Need a reboot when this target is destroyed. sub NeedReboot ($) { my $self = shift; $self->{REBOOT_NEEDED} = 1; } # Reboot target sub RebootNow ($) { my $self = shift; $self->{REBOOT_NEEDED} = undef; print STDERR "Attempting to reboot target...\n"; reboot (); } sub WaitForFileTimed ($) { my $self = shift; my $file = shift; my $timeout = shift; my $cwdrel = $file; my $prjroot = defined $ENV{'ACE_RUN_VX_PRJ_ROOT'} ? $ENV{'ACE_RUN_VX_PRJ_ROOT'} : $ENV{'ACE_ROOT'}; if (length ($cwdrel) > 0) { $cwdrel = File::Spec->abs2rel( cwd(), $prjroot ); } else { $cwdrel = File::Spec->abs2rel( $cwdrel, $prjroot ); } my $newfile = $self->{HOST_ROOT} . "/" . $cwdrel . "/" . $file; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "WinCE waits for $newfile timeout $timeout\n"; } return PerlACE::waitforfile_timed ($newfile, $timeout); } # Put file from a to b sub PutFile ($) { my $self = shift; my $src = shift; return 0; } sub DeleteFile ($) { my $self = shift; my $file = shift; my $newfile = $self->LocalFile($file); if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "delete $newfile\n"; } unlink ("$newfile"); } sub KillAll ($) { my $self = shift; my $procmask = shift; PerlACE::ProcessVX::kill_all ($procmask, $self); } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/ProcessAndroid.pm0000644000175000017500000004574213154167357017550 0ustar tggtgg#! /usr/bin/perl package PerlACE::ProcessAndroid; use POSIX "sys_wait_h"; use File::Basename; use File::Spec; use FileHandle; use Cwd; use Config; use strict; ############################################################################### ### Grab signal names my @signame; if (defined $Config{sig_name}) { my $i = 0; foreach my $name (split (' ', $Config{sig_name})) { $signame[$i] = $name; $i++; } } else { my $i; for ($i = 0; $i < 255; ++$i) { $signame[$i] = $i; } } ############################################################################### ### Constructor and Destructor sub new { my $proto = shift; my $class = ref ($proto) || $proto; my $self = {}; $self->{TARGET} = shift; $self->{RUNNING} = 0; $self->{IGNOREEXESUBDIR} = 1; $self->{IGNOREHOSTROOT} = 0; $self->{PROCESS} = undef; $self->{EXECUTABLE} = shift; # Only set argument when they are really supplied via the # CreateProcess call. If the weren't supplied, an error like # Process_Android::HASH (0x...) is generated. if (@_ == 1) { $self->{ARGUMENTS} = shift; } else { $self->{ARGUMENTS} = ""; } $self->{FSROOT} = $ENV{'ANDROID_FS_ROOT'}; bless ($self, $class); # copy the test executable to the target at forehand $self->copy_executable (); return $self; } sub DESTROY { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: <", $self->{EXECUTABLE}, "> still running upon object destruction\n"; $self->Kill (); } if (defined $self->{SCRIPTFILE}) { unlink $self->{SCRIPTFILE}; } if (defined $self->{UNLINKLIST}) { foreach my $ul (@{$self->{UNLINKLIST}}) { unlink $ul; } } } ############################################################################### sub Arguments { my $self = shift; if (@_ != 0) { $self->{ARGUMENTS} = shift; if (defined $self->{SCRIPTFILE}) { if (!defined $self->{UNLINKLIST}) { $self->{UNLINKLIST} = (); } push(@{$self->{UNLINKLIST}}, $self->{SCRIPTFILE}); $self->{SCRIPTFILE} = undef; } } return $self->{ARGUMENTS}; } sub Executable { my $self = shift; if (@_ != 0) { $self->{EXECUTABLE} = shift; if (defined $self->{SCRIPTFILE}) { if (!defined $self->{UNLINKLIST}) { $self->{UNLINKLIST} = (); } push(@{$self->{UNLINKLIST}}, $self->{SCRIPTFILE}); $self->{SCRIPTFILE} = undef; } # copy the (new) test executable to the target # previously scanned .vxtest files and detected libraries # will not be scanned/copied twice $self->copy_executable (); } my $executable = $self->{EXECUTABLE}; # If the target's config has a different ACE_ROOT, rebase the executable # from $ACE_ROOT to the target's root. if (defined $self->{TARGET} && $self->{TARGET}->ACE_ROOT() ne $ENV{'ACE_ROOT'}) { $executable = PerlACE::rebase_path ($executable, $ENV{'ACE_ROOT'}, $self->{TARGET}->ACE_ROOT()); } if ($self->{IGNOREEXESUBDIR}) { return $executable; } my $basename = basename ($executable); my $dirname = dirname ($executable).'/'; my $subdir = $PerlACE::Process::ExeSubDir; if (defined $self->{TARGET} && defined $self->{TARGET}->{EXE_SUBDIR}) { $subdir = $self->{TARGET}->{EXE_SUBDIR}; } $executable = $dirname . $subdir . $basename; return $executable; } sub Wait ($) { my $self = shift; my $timeout = shift; if (!defined $timeout || $timeout < 0) { waitpid ($self->{PROCESS}, 0); } else { return $self->TimedWait($timeout); } } # really only for internal use sub check_return_value ($) { my $self = shift; my $rc = shift; if ($rc < 0x80) { return $rc; } # Remember Core dump flag my $dump = 0; if ($rc & 0x80) { $rc &= ~0x80; $dump = 1; } # check for ABRT, KILL or TERM if ($rc == 6 || $rc == 9 || $rc == 15) { return 0; } print STDERR "ERROR: <", $self->{EXECUTABLE}, "> exited with "; print STDERR "coredump from " if ($dump == 1); print STDERR "signal $rc : ", $signame[$rc], "\n"; return 255; } sub TimedWait ($) { my $self = shift; my $timeout = shift; if ($PerlACE::Process::WAIT_DELAY_FACTOR > 0) { $timeout *= $PerlACE::Process::WAIT_DELAY_FACTOR; } if (defined $ENV{'ACE_TEST_VERBOSE'} && $self->{PROCESS} > 0) { print STDERR "Wait $timeout to finish executable $self->{PROCESS}. "; print STDERR "RUNNING: $self->{RUNNING}\n"; } # Multiply with 10 because we wait a tenth of a second each time $timeout *= 10; while ($timeout-- != 0 && $self->{PROCESS} > 0 && $self->{RUNNING} == 1) { my $pid = waitpid ($self->{PROCESS}, WNOHANG); if ($pid != 0 && $? != -1) { if (defined $ENV{'ACE_TEST_VERBOSE'} && $self->{PROCESS} > 0) { print STDERR "Executable $self->{PROCESS} finished ($pid)\n"; } last; } select(undef, undef, undef, 0.1); } # attempt to retrieve exitstatus from remote .rc file my $shell = $ENV{'ANDROID_SDK_ROOT'} . '/platform-tools/adb shell'; my $rcfile = $self->{RCFILE}; ## wait max 5 * $PerlACE::Process::WAIT_DELAY_FACTOR sec for RC file to appear my $start_tm = time (); my $max_wait = 5; if ($PerlACE::Process::WAIT_DELAY_FACTOR > 0) { $max_wait *= $PerlACE::Process::WAIT_DELAY_FACTOR; } my $rc = -255; while ((time() - $start_tm) < $max_wait) { select(undef, undef, undef, 0.2); $rc = int(`$shell 'if [ -e $rcfile -a -s $rcfile ] ; then cat $rcfile; rm -f $rcfile >/dev/null 2>&1; else echo -255; fi'`); if ($rc != -255) { return $self->check_return_value ($rc); } } if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Exit TimedWait with Process: $self->{PROCESS}, Running: $self->{RUNNING}\n"; } return -1; } sub Kill () { my $self = shift; if ($self->{RUNNING} == 1) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Killing process <$self->{PROCESS}>\n"; } # killing the adb process, not the actual test executable. kill (1, $self->{PROCESS}); my $pid = waitpid ($self->{PROCESS}, WNOHANG); if ($pid == -1) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Process <$self->{PROCESS}> already ended\n"; } } elsif ($pid == $self->{PROCESS}) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Process <$self->{PROCESS}> ended\n"; } } } $self->{RUNNING} = 0; } sub WaitKill ($) { my $self = shift; my $timeout = shift; if ($self->{RUNNING} == 0) { return 0; } my $status = $self->TimedWait ($timeout); if ($status == -1) { print STDERR "ERROR: $self->{EXECUTABLE} timedout\n"; $self->Kill (); } $self->{RUNNING} = 0; return $status; } # Do a Spawn and immediately WaitKill # sub SpawnWaitKill ($) { my $self = shift; my $timeout = shift; if ($self->Spawn () == -1) { return -1; } my $result = 0; if ($self->{RUNNING} == 1) { $result = $self->WaitKill ($timeout); } return $result; } sub TerminateWaitKill ($) { my $self = shift; my $timeout = shift; if ($self->{RUNNING}) { print STDERR "INFO: $self->{EXECUTABLE} being killed.\n"; my $killcmd = $ENV{'ANDROID_SDK_ROOT'} . '/platform-tools/adb shell "kill -s TERM ' . $self->{REMOTE_PID} . '"'; system ($killcmd); } return $self->WaitKill ($timeout); } sub IgnoreExeSubDir { my $self = shift; if (@_ != 0) { $self->{IGNOREEXESUBDIR} = shift; } return $self->{IGNOREEXESUBDIR}; } sub IgnoreHostRoot { my $self = shift; if (@_ != 0) { $self->{IGNOREHOSTROOT} = shift; } return $self->{IGNOREHOSTROOT}; } sub Spawn () { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> already running\n"; return -1; } if (!defined $self->{EXECUTABLE}) { print STDERR "ERROR: Cannot Spawn: No executable specified\n"; return -1; } if ($self->{IGNOREEXESUBDIR} == 0) { if (!-f $self->Executable ()) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> not found\n"; return -1; } } my $status = 0; my $fsroot_target = $ENV{'ANDROID_FS_ROOT'}; my $exe = $self->Executable (); my $program = "$fsroot_target/".basename($exe); my($test, $dir, $suffix) = fileparse($program); my $local_xdir = cwd (); if (!defined $self->{PIDFILE}) { $self->{PIDFILE} = "$fsroot_target/ace-".rand(time).".pid"; } if (!defined $self->{RCFILE}) { $self->{RCFILE} = "$fsroot_target/ace-".rand(time).".rc"; } if (!defined $self->{SCRIPTFILE}) { $self->{SCRIPTFILE} = "$local_xdir/run-".rand(time).".sh"; } ## create scriptfile my $run_script = # "if [ ! -e /tmp/.acerun ]; then mkdir /tmp/.acerun; fi\n". "cd $fsroot_target\n". "export LD_LIBRARY_PATH=$fsroot_target/lib:.:\$LD_LIBRARY_PATH\n". "export PATH=\$PATH:$fsroot_target/lib:.\n". "export ACE_ROOT=$fsroot_target\n"; if (defined $self->{TARGET} && defined $self->{TARGET}->{EXTRA_ENV}) { my $x_env_ref = $self->{TARGET}->{EXTRA_ENV}; while ( my ($env_key, $env_value) = each(%$x_env_ref) ) { $run_script .= "export $env_key=\"$env_value\"\n"; } } $run_script .= "./$test $self->{ARGUMENTS} &\n"; $run_script .= "MY_PID=\$!\n". "echo \$MY_PID > ".$self->{PIDFILE}."\n"; if (defined $ENV{'ACE_TEST_VERBOSE'}) { $run_script .= "echo INFO: Process started remote with pid [\$MY_PID]\n"; } $run_script .= "wait \$MY_PID\n"; $run_script .= "MY_RC=\$?\n". "echo \$MY_RC > ".$self->{RCFILE}."\n"; if (defined $ENV{'ACE_TEST_VERBOSE'}) { $run_script .= "echo INFO: Process [\$MY_PID] returned exit code [\$MY_RC]\n"; } unless (open (RUN_SCRIPT, ">".$self->{SCRIPTFILE})) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> failed to create ",$self->{SCRIPTFILE},"\n"; return -1; } print RUN_SCRIPT $run_script; close RUN_SCRIPT; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "INFO: created run script [",$self->{SCRIPTFILE},"]\n", $run_script; } $self->PutFile ($self->{SCRIPTFILE}, "$fsroot_target/".basename($self->{SCRIPTFILE})); my $adb_process = $ENV{'ANDROID_SDK_ROOT'} . "/platform-tools/adb"; my $cmd = $adb_process . ' shell "cd ' . $fsroot_target . ' && source ./' . basename($self->{SCRIPTFILE}) . '"'; FORK: { if ($self->{PROCESS} = fork) { bless $self; } elsif (defined $self->{PROCESS}) { $self->{RUNNING} = 1; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Start to execute: $cmd\n"; } exec ( $cmd ); exit; } elsif ($! =~ /No more process/) { sleep 5; redo FORK; } else { print STDERR "ERROR: Can't fork <" . $cmd . ">: $!\n"; } } my $shell = $adb_process . ' shell'; my $pidfile = $self->{PIDFILE}; ## wait max 10 * $PerlACE::Process::WAIT_DELAY_FACTOR sec for pid file to appear my $start_tm = time (); my $max_wait = 10; if ($PerlACE::Process::WAIT_DELAY_FACTOR > 0) { $max_wait *= $PerlACE::Process::WAIT_DELAY_FACTOR; } my $rc = 1; while ((time() - $start_tm) < $max_wait) { select(undef, undef, undef, 0.2); $rc = int(`$shell 'if [ -e $pidfile -a -s $pidfile ] ; then cat $pidfile; rm -f $pidfile >/dev/null 2>&1; else echo 0; fi'`); if ($rc != 0) { $self->{REMOTE_PID} = $rc; last; } } if (!defined $self->{REMOTE_PID}) { print STDERR "ERROR: Remote command failed <" . $test . ' ' . $self->{ARGUMENTS} . ">: $! No PID found.\n"; return -1; } $self->{RUNNING} = 1; return 0; } sub copy_executable ($) { my $self = shift; my $fsroot_target = $ENV{'ANDROID_FS_ROOT'}; my $program = $self->Executable (); # never copy program subdirectory if specified (like '../Generic_Servant/server') my $exe = "$fsroot_target/".basename($program); $self->{SHLIBS} = (); $self->{VXTESTS} = (); $self->{XLIBPATH} = (); push (@{$self->{XLIBPATH}}, '.'); if (defined $self->{TARGET} && defined $self->{TARGET}->{LIBPATH}) { foreach my $libpath (split(/:|;/, $self->{TARGET}->{LIBPATH})) { push(@{$self->{XLIBPATH}}, $libpath); } } $self->PutFile ("$program", $exe); if ($PerlACE::Static == 0) { # collect libraries from .vxtest file $self->process_vxtest ($program.'.vxtest'); # collect libraries from extra lib paths (might be dynamically loaded) $self->collect_extra_libs (); # collect any runtime lib dependencies specified $self->collect_runtime_libs (); # copy all collected libraries foreach my $lib (@{$self->{SHLIBS}}) { $self->PutFile ($lib, "$self->{FSROOT}/lib/".basename($lib)); } # handle defined system libraries if (defined $self->{TARGET} && defined $self->{TARGET}->{SYSTEM_LIBS}) { $self->copy_system_libs ($self->{TARGET}->{SYSTEM_LIBS}); } } } sub process_vxtest ($) { my $self = shift; my $newvxtest = shift; foreach my $vxtest (@{$self->{VXTESTS}}) { if ($vxtest eq $newvxtest) { return; } } if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Processing vxtest file $newvxtest\n"; } $self->collect_vxtest_libs ($newvxtest); } sub add_unique_lib ($) { my $self = shift; my $newlib = shift; foreach my $lib (@{$self->{SHLIBS}}) { if ($lib eq $newlib) { return 0; } } if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Collecting library $newlib\n"; } push(@{$self->{SHLIBS}}, $newlib); return 1; } sub collect_vxtest_libs () { my $self = shift; my $vxtestfile = shift; my $fh = new FileHandle; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Analyzing vxtest file <$vxtestfile>\n"; } if (open ($fh, $vxtestfile)) { my $line1 = <$fh>; chomp $line1; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Analyzing vxtest file: Found line $line1\n"; } while(<$fh>) { $line1 = $_; chomp $line1; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Analyzing vxtest file: Found line $line1\n"; } $self->collect_vxtest_lib ($line1); } } close $fh; } sub collect_vxtest_lib ($) { my $self = shift; my $name = shift; my $query; my @libpaths = ("$ENV{'ACE_ROOT'}/lib"); push (@libpaths, @{$self->{XLIBPATH}}); foreach my $libpath (@libpaths) { $query = "$libpath/lib$name.so"; if (-e $query) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Found $name in library directory $libpath\n"; } # look for versioned and non-versioned filenames my @files = glob ($query . '*'); foreach my $file (@files) { $self->add_unique_lib ($file); } } } } sub collect_extra_libs () { my $self = shift; # treat current dir as extra libpath my @libpaths = (@{$self->{XLIBPATH}}); my $query; my $vxtest; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Inspecting libpaths (@libpaths) for extra libraries\n"; } foreach my $libpath (@libpaths) { # look for versioned and non-versioned libraries $query = "$libpath/lib*.so*"; my @files = glob ($query); foreach my $file (@files) { if ($self->add_unique_lib ($file) == 1) { # check for possible .vxtest for new lib dependency $vxtest = basename ($file); $vxtest =~ s/^lib(.*)[\.]so([\.].*)?$/\1/; if (-e "$libpath/$vxtest.vxtest") { # process .vxtest file if not yet processed before $self->process_vxtest ("$libpath/$vxtest.vxtest"); } } } } } sub collect_runtime_libs () { my $self = shift; # only need to test ACE_ROOT/lib since all libs from '.' and extra libpaths are copied already my @libpaths = ("$ENV{'ACE_ROOT'}/lib"); my $query; if (defined $self->{TARGET} && defined $self->{TARGET}->{RUNTIME_LIBDEP}) { foreach my $runtimelib (@{$self->{TARGET}->{RUNTIME_LIBDEP}}) { if (-e $runtimelib) { $self->add_unique_lib ($runtimelib); } else { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Inspecting libpaths (@libpaths) for runtime libe $runtimelib\n"; } foreach my $libpath (@libpaths) { # look for versioned and non-versioned libraries $query = "$libpath/lib$runtimelib.so*"; my @files = glob ($query); foreach my $file (@files) { $self->add_unique_lib ($file); } } } } } } sub copy_system_libs () { my $self = shift; my $syslibs = shift; my @liblist = split (',', $syslibs); foreach my $lib (@liblist) { if (-e $lib) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Found system library $lib\n"; } $self->PutFile ($lib, "$self->{FSROOT}/lib/" . basename ($lib)); } else { print STDERR "Cannot find system library $lib!\n"; } } } sub PutFile ($) { my $self = shift; my $src = shift; my $dest = shift; if (defined $self->{TARGET}) { return $self->{TARGET}->PutLib($src, $dest); } else { my $silent; if (!defined $ENV{'ACE_TEST_VERBOSE'}) { $silent = "2> /dev/null" } my $adb_process = $ENV{'ANDROID_SDK_ROOT'} . "/platform-tools/adb"; my $cmd = "$adb_process" . ' push '. "\"$src\" \"$dest\" $silent"; if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "PutFile cmd: $cmd\n"; } system ( $cmd ); if ($? != 0) { return -1; } return 0; } } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/TestTarget.pm0000644000175000017500000004567413154167357016723 0ustar tggtgg#! /usr/bin/perl # # The TestTarget class is for operations that are per-target while testing. # They can be overridden for specific needs like embedded systems, etc. package PerlACE::TestTarget; use strict; use English; use POSIX qw(:time_h); use File::Copy; use File::Spec; use File::Basename; use PerlACE::Run_Test; use Socket; use Sys::Hostname; use Cwd; ############################################################################### # Create the proper kind of TestTarget based on specified test component. # Pass the component number as the first argument. If there's no # DOC_TEST_ environment variable, use the local machine. sub create_target { my $component = shift; if ($component == 0) { print STDERR "Warning: components should be numbers, not names\n"; } my $target = undef; my $envname = "DOC_TEST_\U$component"; if (!exists $ENV{$envname}) { $envname = "DOC_TEST_DEFAULT"; if (!exists $ENV{$envname}) { $target = new PerlACE::TestTarget("default"); return $target; } } my $config_name = $ENV{$envname}; # There's a configuration name; use it to look up the platform. $config_name = uc $config_name; $envname = $config_name.'_OS'; if (!exists $ENV{$envname}) { print STDERR "$config_name requires an OS type in $envname\n"; return undef; } my $config_os = $ENV{$envname}; SWITCH: { if ($config_os =~ m/local|remote|avd/i) { $target = new PerlACE::TestTarget ($config_name); last SWITCH; } if ($config_os =~ m/LabVIEW_RT/i) { require PerlACE::TestTarget_LVRT; $target = new PerlACE::TestTarget_LVRT ($config_name); last SWITCH; } if ($config_os =~ /VxWorks/i) { require PerlACE::TestTarget_VxWorks; $target = new PerlACE::TestTarget_VxWorks ($config_name); last SWITCH; } if ($config_os =~ /WinCE/i) { require PerlACE::TestTarget_WinCE; $target = new PerlACE::TestTarget_WinCE ($config_name); last SWITCH; } if ($config_os =~ /ANDROID/i) { require PerlACE::TestTarget_Android; $target = new PerlACE::TestTarget_Android ($config_name, $component); last SWITCH; } print STDERR "$config_os is an unknown OS type!\n"; } return $target; } ### Constructor and Destructor sub new { my $proto = shift; my $class = ref ($proto) || $proto; my $self = {}; my $config_name = shift; bless ($self, $class); $self->GetConfigSettings($config_name); return $self; } sub DESTROY { my $self = shift; } # If there was a config name specified, use it to look up the configure # info. Else, use the traditional defaults. sub GetConfigSettings ($) { my $self = shift; my $config_name = shift; my $env_prefix = ''; my $fs_root; my $tgt_fs_root; if (defined $config_name) { $env_prefix = $config_name."_"; } my $env_name = $env_prefix.'ACE_ROOT'; if (exists $ENV{$env_name}) { $self->{ace_root} = $ENV{$env_name}; } else { # Fall back to naked ACE_ROOT if no config-specific one. $self->{ace_root} = $ENV{'ACE_ROOT'}; } $tgt_fs_root = dirname($self->{ace_root}); if (exists $ENV{'ACE_ROOT'}) { $fs_root = dirname($ENV{'ACE_ROOT'}); } else { $fs_root = $tgt_fs_root; } $env_name = $env_prefix.'TAO_ROOT'; if (exists $ENV{$env_name}) { $self->{tao_root} = $ENV{$env_name}; } elsif ($fs_root ne $tgt_fs_root && -d "$fs_root/TAO") { # flat directory structure $self->{tao_root} = "$tgt_fs_root/TAO"; } elsif ($fs_root ne $tgt_fs_root && -d "$fs_root/ACE/TAO") { # hierarchical struture $self->{tao_root} = "$self->{ace_root}/TAO"; } elsif (exists $ENV{'TAO_ROOT'}) { if ($fs_root ne $tgt_fs_root) { $self->{tao_root} = PerlACE::rebase_path ($ENV{'TAO_ROOT'}, $fs_root, $tgt_fs_root); } else { $self->{tao_root} = $ENV{'TAO_ROOT'}; } } else { # fall back to assuming classic hierarchical struture $self->{tao_root} = "$self->{ace_root}/TAO"; } $env_name = $env_prefix.'CIAO_ROOT'; if (exists $ENV{$env_name}) { $self->{ciao_root} = $ENV{$env_name}; } elsif ($fs_root ne $tgt_fs_root && -d "$fs_root/CIAO") { # flat directory structure $self->{ciao_root} = "$tgt_fs_root/CIAO"; } elsif ($fs_root ne $tgt_fs_root && -d "$fs_root/ACE/TAO/CIAO") { # hierarchical struture $self->{ciao_root} = "$self->{tao_root}/CIAO"; } elsif (exists $ENV{'CIAO_ROOT'}) { if ($fs_root ne $tgt_fs_root) { $self->{ciao_root} = PerlACE::rebase_path ($ENV{'CIAO_ROOT'}, $fs_root, $tgt_fs_root); } else { $self->{ciao_root} = $ENV{'CIAO_ROOT'}; } } else { # fall back to assuming classic hierarchical struture $self->{ciao_root} = "$self->{tao_root}/CIAO"; } $env_name = $env_prefix.'DANCE_ROOT'; if (exists $ENV{$env_name}) { $self->{dance_root} = $ENV{$env_name}; } elsif ($fs_root ne $tgt_fs_root && -d "$fs_root/DAnCE") { # flat directory structure $self->{dance_root} = "$tgt_fs_root/DAnCE"; } elsif ($fs_root ne $tgt_fs_root && -d "$fs_root/ACE/TAO/DAnCE") { # hierarchical struture $self->{dance_root} = "$self->{tao_root}/DAnCE"; } elsif (exists $ENV{'DANCE_ROOT'}) { if ($fs_root ne $tgt_fs_root) { $self->{dance_root} = PerlACE::rebase_path ($ENV{'DANCE_ROOT'}, $fs_root, $tgt_fs_root); } else { $self->{dance_root} = $ENV{'DANCE_ROOT'}; } } else { # fall back to assuming classic hierarchical struture $self->{dance_root} = "$self->{tao_root}/DAnCE"; } $env_name = $env_prefix.'TEST_ROOT'; if (exists $ENV{$env_name}) { $self->{TEST_ROOT} = $ENV{$env_name}; } else { $self->{TEST_ROOT} = $self->{ACE_ROOT}; } $env_name = $env_prefix.'TEST_FSROOT'; if (exists $ENV{$env_name}) { $self->{TEST_FSROOT} = $ENV{$env_name}; } if ($fs_root ne $tgt_fs_root) { $self->{HOST_FSROOT} = $fs_root; $self->{TARGET_FSROOT} = $tgt_fs_root; } $env_name = $env_prefix.'EXE_SUBDIR'; if (exists $ENV{$env_name}) { $self->{EXE_SUBDIR} = $ENV{$env_name}.'/'; } else { # If no ExeSubDir given via env variable, and this is an unnamed # config, allow use of the subdir specified on the command line. # This preserves historical behavior. if (defined $config_name && $config_name ne 'default') { $self->{EXE_SUBDIR} = './'; } else { $self->{EXE_SUBDIR} = $PerlACE::Process::ExeSubDir; } } $env_name = $env_prefix.'ARCH'; if (exists $ENV{$env_name}) { $self->{ARCH} = $ENV{$env_name}; } elsif ($config_name eq 'default' && grep(($_ eq 'ARCH'), @PerlACE::ConfigList::Configs)) { $self->{ARCH} = 1; } $env_name = $env_prefix.'PROCESS_START_WAIT_INTERVAL'; if (exists $ENV{$env_name}) { $self->{PROCESS_START_WAIT_INTERVAL} = $ENV{$env_name}; } else { $self->{PROCESS_START_WAIT_INTERVAL} = 15; } $env_name = $env_prefix.'PROCESS_STOP_WAIT_INTERVAL'; if (exists $ENV{$env_name}) { $self->{PROCESS_STOP_WAIT_INTERVAL} = $ENV{$env_name}; } else { $self->{PROCESS_STOP_WAIT_INTERVAL} = 10; } $env_name = $env_prefix.'ADB_WAIT_FOR_DEVICE_TIMEOUT'; if (exists $ENV{$env_name}) { $self->{ADB_WAIT_FOR_DEVICE_TIMEOUT} = $ENV{$env_name}; } else { $self->{ADB_WAIT_FOR_DEVICE_TIMEOUT} = 120; } $env_name = $env_prefix.'HOSTNAME'; if (exists $ENV{$env_name}) { $self->{HOSTNAME} = $ENV{$env_name}; } else { $self->{HOSTNAME} = hostname(); } $env_name = $env_prefix.'IP_ADDRESS'; if (exists $ENV{$env_name}) { $self->{IP_ADDRESS} = $ENV{$env_name}; } $env_name = $env_prefix.'IBOOT'; if (exists $ENV{$env_name}) { $self->{IBOOT} = $ENV{$env_name}; } $env_name = $env_prefix.'IBOOT_PASSWD'; if (exists $ENV{$env_name}) { $self->{IBOOT_PASSWD} = $ENV{$env_name}; } $env_name = $env_prefix.'IBOOT_OUTLET'; if (exists $ENV{$env_name}) { $self->{IBOOT_OUTLET} = $ENV{$env_name}; } $env_name = $env_prefix.'IBOOT_USER'; if (exists $ENV{$env_name}) { $self->{IBOOT_USER} = $ENV{$env_name}; } $env_name = $env_prefix.'IBOOT_PASSWD'; if (exists $ENV{$env_name}) { $self->{IBOOT_PASSWD} = $ENV{$env_name}; } $env_name = $env_prefix.'REBOOT_TIME'; if (exists $ENV{$env_name}) { $self->{REBOOT_TIME} = $ENV{$env_name}; } else { $self->{REBOOT_TIME} = 0; } $env_name = $env_prefix.'REBOOT'; if (exists $ENV{$env_name}) { $self->{REBOOT} = $ENV{$env_name}; } else { $self->{REBOOT} = 0; } $env_name = $env_prefix.'STARTUP_COMMAND'; if (exists $ENV{$env_name}) { $self->{STARTUP_COMMAND} = $ENV{$env_name}; } $env_name = $env_prefix.'TELNET_HOST'; if (exists $ENV{$env_name}) { $self->{TELNET_HOST} = $ENV{$env_name}; } else { $self->{TELNET_HOST} = $self->{HOSTNAME}; } $env_name = $env_prefix.'TELNET_PORT'; if (exists $ENV{$env_name}) { $self->{TELNET_PORT} = $ENV{$env_name}; } else { $self->{TELNET_PORT} = 23; } $env_name = $env_prefix.'HOST_ROOT'; if (exists $ENV{$env_name}) { $self->{HOST_ROOT} = $ENV{$env_name}; } $env_name = $env_prefix.'SYSTEM_LIBS'; if (exists $ENV{$env_name}) { $self->{SYSTEM_LIBS} = $ENV{$env_name}; } $env_name = $env_prefix.'REMOTE_SHELL'; if (exists $ENV{$env_name}) { $self->{REMOTE_SHELL} = $ENV{$env_name}; } $env_name = $env_prefix.'PUT_CMD'; if (exists $ENV{$env_name}) { $self->{PUT_CMD} = $ENV{$env_name}; } $env_name = $env_prefix.'GET_CMD'; if (exists $ENV{$env_name}) { $self->{GET_CMD} = $ENV{$env_name}; } $env_name = $env_prefix.'LIBPATH'; if (exists $ENV{$env_name}) { $self->{LIBPATH} = $ENV{$env_name}; } $env_name = $env_prefix.'REMOTE_FILETEST'; if (exists $ENV{$env_name}) { $self->{REMOTE_FILETEST} = $ENV{$env_name}; } $env_name = $env_prefix.'REMOTE_FILERM'; if (exists $ENV{$env_name}) { $self->{REMOTE_FILERM} = $ENV{$env_name}; } $env_name = $env_prefix.'PS_CMD'; if (exists $ENV{$env_name}) { $self->{PS_CMD} = $ENV{$env_name}; } $env_name = $env_prefix.'KILLALL_CMD'; if (exists $ENV{$env_name}) { $self->{KILLALL_CMD} = $ENV{$env_name}; } $self->{EXTRA_ENV} = {}; $env_name = $env_prefix.'EXTRA_ENV'; if (exists $ENV{$env_name}) { my @x_env = split (' ', $ENV{$env_name}); foreach my $x_env_s (@x_env) { if ($x_env_s =~ /(\w+)=(.*)/) { $self->{EXTRA_ENV}->{$1} = $2; } elsif (exists $ENV{$env_prefix.$x_env_s}) { $self->{EXTRA_ENV}->{$x_env_s} = $ENV{$env_prefix.$x_env_s}; } } } $self->{RUNTIME_LIBDEP} = (); } ################################################################## sub ACE_ROOT ($) { my $self = shift; return $self->{ace_root}; } sub TAO_ROOT ($) { my $self = shift; return $self->{tao_root}; } sub CIAO_ROOT ($) { my $self = shift; return $self->{ciao_root}; } sub DANCE_ROOT ($) { my $self = shift; return $self->{dance_root}; } sub HostName ($) { my $self = shift; return $self->{HOSTNAME}; } sub IP_Address ($) { my $self = shift; if (!defined $self->{IP_ADDRESS}) { my @host = gethostbyname($self->{HOSTNAME}); if (scalar(@host) == 0) { $self->{IP_ADDRESS} = "not found"; } else { $self->{IP_ADDRESS} = inet_ntoa($host[4]); } if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Target host [" . $self->{HOSTNAME} . "] has ipaddres : " . $self->{IP_ADDRESS}; } } return $self->{IP_ADDRESS}; } sub ExeSubDir ($) { my $self = shift; my $new_val = shift; if (defined $new_val) { $self->{EXE_SUBDIR} = $new_val; } return $self->{EXE_SUBDIR}; } sub GetArchDir { my $self = shift; my $dir = shift; if (exists $self->{ARCH}) { return $dir . $self->{EXE_SUBDIR}; } return $dir; } sub SystemLibs ($) { my $self = shift; return $self->{SYSTEM_LIBS}; } sub RandomPort ($) { my $self = shift; return (int(rand($$)) % 22766) + 10002; } sub ProcessStartWaitInterval ($) { my $self = shift; return $self->{PROCESS_START_WAIT_INTERVAL}; } sub ProcessStopWaitInterval ($) { my $self = shift; return $self->{PROCESS_STOP_WAIT_INTERVAL}; } sub AdbWaitForDeviceTimeout ($) { my $self = shift; return $self->{ADB_WAIT_FOR_DEVICE_TIMEOUT}; } sub LocalEnvDir ($) { my $self = shift; my $dir = shift; my $newdir = $dir; if (defined $self->{TARGET_FSROOT}) { $newdir = PerlACE::rebase_path ($dir, $self->{HOST_FSROOT}, $self->{TARGET_FSROOT}); } if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "LocalEnvDir for $dir is $newdir\n"; } return $newdir; } # Convert a file in current directory to be local to the target sub LocalFile ($) { my $self = shift; my $file = shift; my $newfile = PerlACE::LocalFile($file); if (defined $self->{TARGET_FSROOT}) { $newfile = PerlACE::rebase_path ($newfile, $self->{HOST_FSROOT}, $self->{TARGET_FSROOT}); } if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "LocalFile for $file is $newfile\n"; } return $newfile; } sub AddLibPath ($) { my $self = shift; my $dir = shift; my $noarch = shift; # If we have -Config ARCH, use the -ExeSubDir setting as a sub-directory # of the lib path. This is in addition to the regular LibPath. if ((defined $noarch && !$noarch) && defined $self->{ARCH}) { $self->AddLibPath($dir, 1); $dir .= '/' . $self->{EXE_SUBDIR}; } if ($self->ACE_ROOT () eq $ENV{'ACE_ROOT'}) { # add (relative) path without rebasing if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Adding libpath $dir\n"; } $self->{LIBPATH} = PerlACE::concat_path ($self->{LIBPATH}, $dir); } else { # add rebased path $dir = PerlACE::rebase_path ($dir, $self->{HOST_FSROOT}, $self->{TARGET_FSROOT}); if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Adding libpath $dir\n"; } $self->{LIBPATH} = PerlACE::concat_path ($self->{LIBPATH}, $dir); } } sub AddRuntimeLibrary ($) { my $self = shift; my $lib = shift; push(@{$self->{RUNTIME_LIBDEP}}, $lib); } sub SetEnv ($) { my $self = shift; my $env_name = shift; my $env_value = shift; $self->{EXTRA_ENV}->{$env_name} = $env_value; } sub GetEnv ($) { my $self = shift; my $env_name = shift; return $self->{EXTRA_ENV}->{$env_name}; } sub DeleteFile ($) { my $self = shift; my $file = shift; my $newfile = $self->LocalFile($file); my $remote_rm = (defined $self->{REMOTE_FILERM}) ? 1 : 0; if ((($file eq $newfile) || (File::Spec->rel2abs($file) eq File::Spec->rel2abs($newfile))) && !(defined $self->{REMOTE_FILERM})) { unlink ($newfile); } else { my $cmd; if ($self->{REMOTE_FILERM} =~ /^\d*$/) { $cmd = $self->{REMOTE_SHELL} . " 'test -e $newfile && rm $newfile'"; } else { $cmd = $self->{REMOTE_FILERM} . ' ' . $newfile; } if (system ($cmd) != 0) { print STDERR "ERROR executing [".$cmd."]\n"; } } } sub GetFile ($) { # On local host, the file is already there. my $self = shift; my $remote_file = shift; my $local_file = shift; if (!defined $local_file) { $local_file = $remote_file; $remote_file = $self->LocalFile($local_file); } if (defined $self->{GET_CMD}) { if (system ($self->{GET_CMD}.' '.$remote_file.' '.$local_file) != 0) { print STDERR "ERROR executing [".$self->{GET_CMD}." $remote_file $local_file]\n"; } } elsif (($remote_file ne $local_file) && (File::Spec->rel2abs($remote_file) ne File::Spec->rel2abs($local_file))) { copy ($remote_file, $local_file); } return 0; } # Put file from a to b sub PutFile ($) { my $self = shift; my $src = shift; my $dest = $self->LocalFile ($src); if (defined $self->{PUT_CMD}) { if (system ($self->{PUT_CMD}.' '.$src.' '.$dest) != 0) { print STDERR "ERROR executing [".$self->{PUT_CMD}." $src $dest]\n"; } } elsif (($src ne $dest) && (File::Spec->rel2abs($src) ne File::Spec->rel2abs($dest))) { copy ($src, $dest); } return 0; } sub WaitForFileTimed ($) { my $self = shift; my $file = shift; my $timeout = shift; # expand path and possibly map to remote target root my $newfile = $self->LocalFile($file); if (defined $self->{REMOTE_SHELL} && defined $self->{REMOTE_FILETEST}) { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Waiting for remote $file using path $newfile\n"; } $timeout *= $PerlACE::Process::WAIT_DELAY_FACTOR; my $cmd = $self->{REMOTE_SHELL}; if ($self->{REMOTE_FILETEST} =~ /^\d*$/) { $cmd .= " 'test -e $newfile && test -s $newfile ; echo \$?'"; } else { $cmd .= $self->{REMOTE_FILETEST} . ' ' . $file; } my $rc = 1; my $mark_tm = time (); # start time while ($timeout > 0) { $rc = int(`$cmd`); if ($rc == 0) { return 0; } select(undef, undef, undef, 0.1); $timeout -= (time () - $mark_tm); $mark_tm = time (); } return -1; } else { if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Waiting for local $file using path $newfile\n"; } return PerlACE::waitforfile_timed ($newfile, $timeout); } } sub CreateProcess ($) { my $self = shift; my $process = new PerlACE::Process (@_); $process->Target($self); return $process; } # Don't need to do anything in most cases. sub GetStderrLog ($) { my $self = shift; return; } sub KillAll ($) { my $self = shift; my $procmask = shift; if (defined $self->{KILLALL_CMD}) { my $cmd = $self->{KILLALL_CMD} . ' ' . $procmask; if (defined $self->{REMOTE_SHELL}) { $cmd = $self->{REMOTE_SHELL} . ' ' . $cmd; } if (defined $ENV{'ACE_TEST_VERBOSE'}) { print STDERR "Executing $cmd\n"; } system ($cmd); } else { PerlACE::Process::kill_all ($procmask, $self); } } 1; ace-6.4.5+dfsg.orig/bin/PerlACE/Process_VMS.pm0000644000175000017500000001502513154167357016763 0ustar tggtgg#! /usr/bin/perl package PerlACE::Process; use strict; use POSIX "sys_wait_h"; use Cwd; use File::Basename; use Config; use VmsProcess; ############################################################################### ############################################################################### ### Grab signal names my @signame; if (defined $Config{sig_name}) { my $i = 0; foreach my $name (split (' ', $Config{sig_name})) { $signame[$i] = $name; $i++; } } else { my $i; for ($i = 0; $i < 255; ++$i) { $signame[$i] = $i; } } ############################################################################### ### Constructor and Destructor sub new { my $proto = shift; my $class = ref ($proto) || $proto; my $self = {}; $self->{RUNNING} = 0; $self->{IGNOREEXESUBDIR} = 0; $self->{PROCESS} = undef; $self->{EXECUTABLE} = shift; $self->{ARGUMENTS} = shift; $self->{VALGRIND_CMD} = $ENV{'ACE_RUN_VALGRIND_CMD'}; if (!defined $PerlACE::Process::WAIT_DELAY_FACTOR) { if (defined $self->{PURIFY_CMD}) { $PerlACE::Process::WAIT_DELAY_FACTOR = 10; } elsif (defined $self->{VALGRIND_CMD}) { $PerlACE::Process::WAIT_DELAY_FACTOR = 5; } else { $PerlACE::Process::WAIT_DELAY_FACTOR = 1; } } bless ($self, $class); return $self; } sub DESTROY { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: <", $self->{EXECUTABLE}, "> still running upon object destruction\n"; $self->Kill (); } } ############################################################################### ### Some Accessors sub Executable { my $self = shift; if (@_ != 0) { $self->{EXECUTABLE} = shift; } my $executable = $self->{EXECUTABLE}; if ($self->{IGNOREEXESUBDIR}) { return $executable; } my $basename = basename ($executable); my $dirname = dirname ($executable). '/'; if ($dirname != "") { $executable = $dirname.$PerlACE::Process::ExeSubDir.$basename; } else { $executable = $dirname.$basename; } if ( !-x $executable ) { if ( -x $executable.'.exe' ) { $executable = $executable.'.exe'; } } return $executable; } sub Arguments { my $self = shift; if (@_ != 0) { $self->{ARGUMENTS} = shift; } return $self->{ARGUMENTS}; } sub CommandLine () { my $self = shift; my $commandline = $self->Executable (); if (defined $self->{ARGUMENTS}) { $commandline .= ' '.$self->{ARGUMENTS}; } return $commandline; } sub IgnoreExeSubDir { my $self = shift; if (@_ != 0) { $self->{IGNOREEXESUBDIR} = shift; } return $self->{IGNOREEXESUBDIR}; } sub IgnoreHostRoot { my $self = shift; if (@_ != 0) { $self->{IGNOREHOSTROOT} = shift; } return $self->{IGNOREHOSTROOT}; } ############################################################################### # Spawn the process and continue; sub Spawn () { my $self = shift; if ($self->{RUNNING} == 1) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> already running\n"; return -1; } if (!defined $self->{EXECUTABLE}) { print STDERR "ERROR: Cannot Spawn: No executable specified\n"; return -1; } if ($self->{IGNOREEXESUBDIR} == 0) { if (!-f $self->Executable ()) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> not found\n"; return -1; } if (!-x $self->Executable ()) { print STDERR "ERROR: Cannot Spawn: <", $self->Executable (), "> not executable\n"; return -1; } } $self->{PROCESS} = VmsProcess::Spawn $self->{EXECUTABLE}, $self->{ARGUMENTS}; if ($self->{PROCESS}) { #parent here bless $self; } else { # weird fork error print STDERR "ERROR: Can't spawn <" . $self->CommandLine () . ">: $!\n"; } $self->{RUNNING} = 1; return 0; } sub WaitKill ($) { my $self = shift; my $timeout = shift; my $status = $self->TimedWait ($timeout); if ($status == -1) { print STDERR "ERROR: $self->{EXECUTABLE} timedout\n"; $self->Kill (); } $self->{RUNNING} = 0; return $status; } # Do a Spawn and immediately WaitKill sub SpawnWaitKill ($) { my $self = shift; my $timeout = shift; if ($self->Spawn () == -1) { return -1; } return $self->WaitKill ($timeout); } sub TerminateWaitKill ($) { my $self = shift; my $timeout = shift; if ($self->{RUNNING}) { print STDERR "INFO: $self->{EXECUTABLE} being killed.\n"; kill ('TERM', $self->{PROCESS}); } return $self->WaitKill ($timeout); } # really only for internal use sub check_return_value ($) { my $self = shift; my $rc = shift; if ($rc == 0) { return 0; } elsif ($rc == 0xff00) { print STDERR "ERROR: <", $self->{EXECUTABLE}, "> failed: $!\n"; return ($rc >> 8); } elsif (($rc & 0xff) == 0) { $rc >>= 8; return $rc; } my $dump = 0; if ($rc & 0x80) { $rc &= ~0x80; $dump = 1; } # check for ABRT, KILL or TERM if ($rc == 6 || $rc == 9 || $rc == 15) { return 0; } print STDERR "ERROR: <", $self->{EXECUTABLE}, "> exited with "; print STDERR "coredump from " if ($dump == 1); print STDERR "signal $rc : ", $signame[$rc], "\n"; return 0; } sub Kill () { my $self = shift; if ($self->{RUNNING}) { kill ('KILL', $self->{PROCESS}); waitpid ($self->{PROCESS}, 0); $self->check_return_value ($?); } $self->{RUNNING} = 0; } # Wait until a process exits. # return -1 if the process is still alive. sub Wait ($) { my $self = shift; my $timeout = shift; if (!defined $timeout || $timeout < 0) { waitpid ($self->{PROCESS}, 0); } else { return TimedWait($self, $timeout); } } sub TimedWait ($) { my $self = shift; my $timeout = shift; $timeout *= $PerlACE::Process::WAIT_DELAY_FACTOR; my $status; my $pid = VmsProcess::TimedWaitPid ($self->{PROCESS}, $timeout, $status); if ($pid > 0) { return $self->check_return_value ($status); } return -1; } ### sub kill_all { my $procmask = shift; my $target = shift; ## NOT IMPLEMENTED YET } 1; ace-6.4.5+dfsg.orig/bin/ACETAOCIAO.style0000644000175000017500000003134113154167357015520 0ustar tggtgg ace-6.4.5+dfsg.orig/bin/ace_components0000755000175000017500000000452513154167357015775 0ustar tggtgg#! /bin/sh # # Encapsulates set/access of a components file, which records set of # components that were built in a library. Intended to be used by # GNUmakefiles and scripts. See ACE_wrappers/ace/GNUmakefile for an # example. # usage="usage: $0 --ace | --orbsvcs | --tao \ [--remove | --set \" \"]" #### #### Make sure that ACE_ROOT, and TAO_ROOT are set. #### if [ ! "$ACE_ROOT" ]; then echo $0': your ACE_ROOT environment variable is not set!' 1>&2 exit -1 fi if [ ! "$TAO_ROOT" ]; then TAO_ROOT=$ACE_ROOT/TAO export TAO_ROOT fi #### #### Process command line arguments. #### if [ $# -ge 1 ]; then case $1 in --ace) components_file=$ACE_ROOT/ace/ACE_COMPONENTS.list ;; --orbsvcs) components_file=$TAO_ROOT/orbsvcs/orbsvcs/ORBSVCS_COMPONENTS.list ;; --tao) components_file=$TAO_ROOT/tao/TAO_COMPONENTS.list ;; *) echo $usage; exit -1 ;; esac shift else echo $usage exit -1 fi set_components=0 append_components=0 if [ $# -ge 1 ]; then if [ $1 = '--set' ]; then set_components=1 shift if [ $# -eq 1 ]; then components=$1 shift else echo $usage exit -1 fi elif [ $1 = '--append' ]; then append_components=1 shift if [ $# -eq 1 ]; then components=$1 shift else echo $usage exit -1 fi elif [ $1 = '--remove' ]; then rm -f $components_file else echo $usage exit -1 fi fi if [ $set_components -eq 1 ]; then #### #### Update the components file, if it has changed since last set. #### if [ -f $components_file ]; then if echo "$components" | diff - $components_file > /dev/null; then : else echo "$components" > $components_file fi else echo "$components" > $components_file fi elif [ $append_components -eq 1 ]; then #### #### Update the components file, if it has changed since last set. #### if [ -f $components_file ]; then if cat $components_file | grep "$components" > /dev/null; then : else (cat $components_file; echo "$components") | tr ' ' '\012' | sort -u > $components_file.$$ mv -f $components_file.$$ $components_file fi else echo "$components" > $components_file fi else #### #### Access the contents of the components file, if it exists. #### if [ -f $components_file ]; then cat $components_file fi fi ace-6.4.5+dfsg.orig/bin/envinfo.cpp0000644000175000017500000000157713154167357015226 0ustar tggtgg#include "ace/ACE.h" #include "ace/Log_Msg.h" #include "ace/OS_main.h" #include "ace/OS_NS_sys_utsname.h" int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_DEBUG ((LM_INFO, ACE_TEXT ("ACE: %u.%u.%u\n"), ACE::major_version(), ACE::minor_version(), ACE::beta_version())); ACE_utsname uname; ACE_OS::uname(&uname); #if defined (ACE_LACKS_UTSNAME_T) ACE_DEBUG ((LM_INFO, ACE_TEXT ("OS: %s %s\n"), uname.sysname, uname.release)); #else ACE_DEBUG ((LM_INFO, ACE_TEXT ("OS: %C %C\n"), uname.sysname, uname.release)); #endif ACE_DEBUG ((LM_INFO, ACE_TEXT ("Compiler: %s %u.%u\n"), ACE::compiler_name(), ACE::compiler_major_version(), ACE::compiler_minor_version(), ACE::compiler_beta_version())); return 0; } ace-6.4.5+dfsg.orig/bin/valgrind.supp0000644000175000017500000001175613154167357015575 0ustar tggtgg { Memcheck:Leak fun:* obj:*cc1plus } { Memcheck:Leak fun:* obj:*g++* } { Memcheck:Leak ... obj:*/bin/perl } { Memcheck:Leak ... obj:*/bin/bash } { Memcheck:Leak ... obj:*/bin/grep } { Memcheck:Cond ... obj:*/bin/grep } { Memcheck:Leak ... obj:*/bin/ps } { Memcheck:Leak ... obj:*/bin/ls } # { # # Memcheck:Param # fun:* # fun:NDDS_Transport_UDPv4_send # fun:RTINetioSender_send # } { Memcheck:Addr8 fun:__memcpy_ssse3_back } { Memcheck:Addr8 fun:__strspn_sse42 } { Memcheck:Leak fun:* fun:*ACE_Log_Msg_Manager*get_lock* } { Memcheck:Leak ... fun:*ACE_Log_Msg*close* } { Memcheck:Leak fun:* fun:*ACE_Log_Msg_Manager*init_backend* } { Memcheck:Leak fun:calloc fun:_dlerror_run } { Memcheck:Leak fun:malloc fun:add_to_global fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run } { Memcheck:Leak fun:calloc fun:_dl_new_object fun:_dl_map_object_from_fd fun:_dl_map_object fun:openaux fun:_dl_catch_error fun:_dl_map_object_deps fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run } { Memcheck:Leak fun:malloc fun:_dl_map_object_deps fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run } { Memcheck:Leak fun:calloc fun:_dl_check_map_versions fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run } { Memcheck:Leak fun:malloc fun:_dl_new_object fun:_dl_map_object_from_fd fun:_dl_map_object fun:openaux fun:_dl_catch_error fun:_dl_map_object_deps fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run } { Memcheck:Leak fun:calloc fun:do_lookup_x fun:_dl_lookup_symbol_x } { Memcheck:Leak fun:malloc fun:open_path fun:_dl_map_object fun:openaux fun:_dl_catch_error fun:_dl_map_object_deps fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run } { Memcheck:Leak fun:malloc fun:_dl_close_worker fun:_dl_close fun:_dl_catch_error fun:_dlerror_run fun:dlclose } { Memcheck:Leak fun:malloc ... fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run } { Memcheck:Leak fun:malloc obj:/usr/lib64/libicuuc.so.42.0 } { Memcheck:Leak fun:calloc fun:_dl_new_object } { Memcheck:Leak fun:malloc fun:_dl_scope_free } { Memcheck:Leak fun:malloc fun:_dl_lookup_symbol_x } { Memcheck:Leak fun:malloc fun:_dl_new_object } { Memcheck:Leak fun:malloc fun:open_path fun:_dl_map_object } { Memcheck:Leak fun:malloc fun:realloc fun:_dl_new_object } { Memcheck:Leak fun:* fun:*_dl_scope_free* } { Memcheck:Leak fun:* fun:*_dl_new_object* } { Memcheck:Leak fun:* fun:*NDDSConfigLogger*get_instance* } { Memcheck:Leak fun:* fun:*register_or_unregister_typeI* } { Memcheck:Leak fun:malloc fun:dl_open_worker } { Memcheck:Addr8 fun:wcscmp } { Memcheck:Leak ... fun:PRESPsReaderQueue_initializeQueryConditionInventory } { Memcheck:Param writev(vector[...]) fun:writev fun:*ACE*sendv* fun:*TAO_IIOP_Transport*send* fun:*TAO_Transport*drain_queue_helper* fun:*TAO_Transport*drain_queue_i* fun:*TAO_Transport*send_synch_message_helper* ... fun:*TAO_IIOP_Transport*send_message* } { Memcheck:Value8 fun:*nibble2hex* fun:*ORB*object_to_string* } { Memcheck:Cond obj:/usr/lib/libz.so.1.2.3 obj:/usr/lib/libz.so.1.2.3 fun:deflate fun:compress2 } ace-6.4.5+dfsg.orig/bin/add_rel_link.sh0000755000175000017500000000505313154167357016015 0ustar tggtgg#!/bin/sh # This script assumes it is being run by bash # ======= needed functions ====== # abspath relpath curentpath abspath () { # treat "./" as a special case if expr "$1" : '\./' >/dev/null; then b=`echo $1 | sed 's@\./@@'` echo $2/$b return 0 fi b=$1 a=$2 # for each "../" we remove one directory from the current path # and leading "../" from the relative path # until we have the unique part in b and the abs prefix in a while expr "$b" : '\.\./' >/dev/null do b=`echo $b | sed 's@\.\./@@'` a=`echo $a | sed 's@/[^/]*$@@'` done # return the completed absolute path echo $a/$b } # relpath abspath curentpath relpath () { # take "/" off beginning a=`echo $1 | sed 's@^/@@'` # take "/" off beginning and add to end b=`echo $2 | sed 's@^/@@;s@$@/@'` while true do if [ "$b" = "" ]; then break; fi a1=`echo $a | sed 's@\([^/]*\)/.*@\1@'` b1=`echo $b | sed 's@\([^/]*\)/.*@\1@'` if [ "$a1" != "$b1" ]; then break; fi a=`echo $a | sed 's@[^/]*/@@'` b=`echo $b | sed 's@[^/]*/@@'` done # a now has the unique part of the path c="" # c will have the required number of "../"'s while [ "$b" != "" ] do c="../$c" b=`echo $b | sed 's@[^/]*/@@'` done # return the completed relative path echo "$c$a" } # ====== MAIN ====== # Assume any relative path passed in is relative to the current directory # Given $1 is a path to the source file # Given $2 is a path of the link to be created # Create a link that has the relative path to the source file # That is, $1 converted relative to $2 # Check if $1 is absolute or already relative #echo add_rel_link.sh $1 $2 if expr "$1" : '\/' >/dev/null; then # The source path is absolute, this is the expected case # Check if $2 is absolute or relative if expr "$2" : '\/' >/dev/null; then # The link path is already absolute, so just use it lpath=$2 else # The link path is relative, this is the expected case # WARNING: don't use $PWD here, it won't work right # WARNING: pwd may be a shell alias. Use /bin/pwd. cur=`/bin/pwd` lpath=`abspath $2 $cur` fi # take name off the end of the dest ldir=`echo $lpath | sed 's@/[^/]*$@@'` # If the original path and the ldir do not originate in the same # directory tree, we should just use absolute paths if [ "`echo $1 | cut -d/ -f2`" != "`echo $ldir | cut -d/ -f2`" ]; then spath=$1 else spath=`relpath $1 $ldir` fi # use the completed relative path and the given designation path echo ln -s $spath $2 ln -s $spath $2 else # The source path is already relative, so just use it echo ln -s $1 $2 ln -s $1 $2 fi ace-6.4.5+dfsg.orig/bin/ace_ld0000755000175000017500000001251313154167357014203 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # Drop-in replacement for "ld" that supports munching. # # The first three lines above let this script run without specifying the # full path to perl, as long as it is in the user's PATH. # Taken from perlrun man page. ## ## Symbols that produce a warning due to size changing. ## This is a harmless known bug with the version of gcc that comes with ## Tornado II. Anything in this list will be suppressed unless the -w ## option is used. ## my(@symbols) = ('dequeue__t17ACE_Message_Queue1Z14ACE_NULL_SYNCHRP17ACE_Message_BlockP14ACE_Time_Value', 'activate__t17ACE_Message_Queue1Z14ACE_NULL_SYNCH', ); $usage = "usage: $0 [-? | [-w] [-o ] [[-C --] [-m ] [-n ]] [-f]]] " . "\n"; #### To avoid quoting problems on the command line, all arguments #### between -C and -- are combined into the single compile command. $compile_option = 0; $ss_change_warn = 0; #### #### process command line args #### while ( $#ARGV >= 0 && $ARGV[0] =~ /^-/ ) { if ( $ARGV[0] eq '-C' ) { $compile_option = 1; if ( $ARGV[1] !~ /^[-].+$/ ) { $compile = $ARGV[1]; shift; } else { print STDERR "$0: must provide argument for -c option\n"; die $usage; } } elsif ( $ARGV[0] eq '--' ) { $compile_option = 0; } elsif ( $ARGV[0] eq '-m' ) { if ( $ARGV[1] !~ /^[-].+$/ ) { $munch = $ARGV[1]; shift; } else { print STDERR "$0: must provide argument for -m option\n"; die $usage; } } elsif ( $ARGV[0] eq '-n' ) { if ( $ARGV[1] !~ /^[-].+$/ ) { $nm = $ARGV[1]; shift; } else { print STDERR "$0: must provide argument for -n option\n"; die $usage; } } elsif ( $ARGV[0] eq '-o' ) { if ( $ARGV[1] !~ /^[-].+$/ ) { $vdir = $ARGV[1]; shift; } else { print STDERR "$0: must provide argument for -o option\n"; die $usage; } } elsif ( $ARGV[0] eq '-w' ) { $ss_change_warn = 1; } elsif ( $ARGV[0] eq '-?' ) { print "$usage"; exit; } else { if ($compile_option) { $compile .= " $ARGV[0]"; } else { warn "$0: unknown option $ARGV[0]\n"; die $usage; } } shift; } #### #### If $vdir is empty, set default object file directory (.obj) #### if ($vdir eq ''){ $vdir = ".obj"; } #### #### Save link command, i.e., current @ARGV, for use below. #### @args = @ARGV; #### #### Find full path to each library. #### @libDirs = (); $current_dir_in_libDirs = 0; @libs = (); @objs = ''; foreach $arg (@ARGV) { if ($arg =~ /^['"]?-L([\S]+)/) { ($dir = $1) =~ s%/+$%%; #### trim any trailing slashes push (@libDirs, $dir); $current_dir_in_libDirs = 1 if $dir eq '.'; } elsif ($arg =~ /^['"]?-l([\S]+)/) { push (@libs, $1); } elsif ($arg =~ /\.o$/) { push (@objs, $arg); } } #### Add . to libDirs if it doesn't already have it. push (@libDirs, ".") unless $current_dir_in_libDirs; foreach $lib (@libs) { foreach $libDir (@libDirs) { if (-e "$libDir/lib$lib.a") { $full_path{$lib} = "$libDir/lib$lib.a"; last; } } } #### #### Set up signal handler. #### $done = 0; $SIG{'HUP'} = $SIG{'INT'} = $SIG{'QUIT'} = $SIG{'TERM'} = 'cleanup'; #### #### Munch, if $munch is non-null. #### if ($munch) { $munch_objs = join (' ', @objs); $munch_libs = join (' ', values %full_path); open (MUNCH, "$nm $munch_objs $munch_libs | $munch |") || &fail ("$0: unable to run \"$nm\" or \"$munch\"\n"); open (CTORDTOR, "> __ctordtor.c") || &fail ("$0: unable to open \"__ctordtor.c\"\n"); while () { #### Filter out munch output that contains '.cpp'. It results from #### .cpp files that have no text or data, e.g., .cpp files that #### only contain template instantiations. These lines confuse g++. print CTORDTOR unless /\.cpp/; } close CTORDTOR || &fail ("$0: unable to write \"__ctordtor.c\"\n"); close MUNCH; system ("$compile -o $vdir/__ctordtor.o __ctordtor.c") && &fail ("$0: \"$compile\" failed\n"); } #### #### Construct the link command from @args and perform the link. #### if ($munch) { #### Insert ctordtor object file before first library in link command. $arg_lib = 0; foreach $arg (@ARGV) { if ($arg =~ /^['"]?-l/) { last; } ++$arg_lib; } splice (@args, $arg_lib, 0, "$vdir/__ctordtor.o"); } $link_command = join (' ', @args); if (open(PP, "$link_command 2>&1 |")) { while() { my($line) = $_; if ($ss_change_warn) { print $line; } else { my($found) = 0; foreach my $symbol (@symbols) { if ($line =~ /Warning: size of symbol `$symbol\'/) { $found = 1; } } if (!$found) { print $line; } } } close(PP); if ($? ne 0) { fail ("$0: $link_command failed\n"); } } else { fail ("$0: $link_command failed\n"); } $done = 1; &cleanup; #### #### #### sub fail { local ($message) = @_; warn $message; &cleanup; } #### #### clean up when done or on signal #### sub cleanup { unlink "__ctordtor.c", "$vdir/__ctordtor.o"; if ($done) { exit 0; } else { exit 1; } } #### EOF ace-6.4.5+dfsg.orig/bin/diff-builds.pl0000755000175000017500000002211413154167357015574 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # -*- perl -*- use File::Spec qw/ tmpdir /; use File::Temp qw/ tempfile tempdir /; use POSIX qw/ strftime /; my $debugging = 0; # Print additional info my $verbose = '-q'; # WGET verbosity my $new_errors_only = 0; # Show new errors only my $clean_builds_only = 1; # Only diff todays clean builds my $append_revision_to_new_test_fails = 0; # Default to not doing this. # The root of the test statistics my $teststaturl = "http://teststat.remedy.nl/teststat/builds/"; my $allbuildsurl = "http://teststat.remedy.nl/teststat/buildscore"; my $cleanbuildsurl = "http://teststat.remedy.nl/teststat/cleanbuildtests"; # Determine the available timestamps for a build on a date, # by scanning the index page (build.html) sub find_timestamps ($$) { my ($file,$date) = @_; # print "\nSearching for $file, $date\n"; open (INDEX, "wget " . $verbose . " \'" . $teststaturl . $file . ".html\' -O - |") || die "***Could not read the index page for $file\n"; # Split at all HTML tags, except my @suffixes = split ( /[<][b-zB-Z\/]+[>]/, ); close (INDEX); # Select only those of the "href=..." that match our file and date my $rx = quotemeta ( $file . '_' . $date); my @temp = map { (/${rx}_([0-9][0-9]_[0-9][0-9])/) ? $1 : "" } @suffixes; return grep /^[0-9]/, @temp; } # Determine the timestamp by scanning the index sub find_closest_earlier { my ($file,$date) = @_; open (INDEX, "wget " . $verbose . " \'" . $teststaturl . $file . ".html\' -O - |") || die "***Could not read the index page for $file\n"; # Split at all HTML tags, except my @suffixes = split ( /[<][b-zB-Z\/]+[>]/, ); close (INDEX); # Select only those of the "href=..." that match our file my $rx = quotemeta ( $file); my @temp = map { (/${rx}_([0-9][0-9][0-9][0-9]_[0-9][0-9]_[0-9][0-9])/ && $1 le $date) ? $1 : undef } @suffixes; my @temp2 = grep /^[0-9]/, @temp; if ($#temp2 == -1) { return undef; } return $temp2[0]; } sub select_builds ($$$) { my ($rdates, $rbuilds, $rfiles) = @_; my @dates = @{$rdates}; my @builds = @{$rbuilds}; if ($#dates eq 1) { $rfiles->[0] = $rbuilds->[0]; $rfiles->[1] = $rbuilds->[0]; } elsif ($#builds eq 1) { $rfiles->[0] = $rbuilds->[0]; $rfiles->[1] = $rbuilds->[1]; $rdates->[1] = $rdates->[0]; } else { die "Dates: $#dates, Builds: $#builds\n"; } return 0; } sub load_failed_tests_list ($$) { my ($file, $original_date) = @_; my $date = $original_date; my $last_tried_date = $original_date; my @timestamps = (); while ($#timestamps < 0) { @timestamps = find_timestamps ($file, $date); if ($#timestamps == -1) { $date = find_closest_earlier ($file, $date); if (!$date) { print "***Found no builds for $file on, or before $original_date\n"; return File::Spec->devnull(); } print "***No builds for $file on $last_tried_date. The closest earlier is " . $date . "\n"; $last_tried_date = $date; next; } print "Build times for $file on $date are " . join (', ', @timestamps) . "\n" unless !$debugging; } my $tmpdir = File::Spec->tmpdir(); my $fullfile = $file .'_' . $date . '_' . $timestamps[0]; my ($fh, $tmpfile) = tempfile ($fullfile . ".XXXXXX", UNLINK => 1, DIR => $tmpdir); print "wget " . $verbose . " \'" .$teststaturl . $fullfile . ".txt\' -O - | sort >\'" . $tmpfile . '\'' . "\n" unless !$debugging; system ("wget " . $verbose . " \'" .$teststaturl . $fullfile . ".txt\' -O - | sort >\'" . $tmpfile . '\''); close ($fh); return $tmpfile; } sub differentiate ($$$) { my ($rfiles, $rdates, $revision) = @_; print "Difference for dates " . join (', ', @$rdates) . "\n" unless !$debugging; my $first_file = load_failed_tests_list ($rfiles->[0], $rdates->[0]); my $second_file = load_failed_tests_list ($rfiles->[1], $rdates->[1]); open (DIFF, "diff -u \'" . $first_file . "\' \'" . $second_file . "\' 2>&1 |") || die "***Failed to diff \'" . $first_file . "\' \'" . $second_file . "\'\n"; while () { # Don't filter out the build details when printing the new errors only if (/^---/) { # Previous Build Date print; } elsif (/^\+\+\+/) { # Current Build date if ($revision) { chomp; print "$_ ($revision)\n"; } else { print; } } elsif (/^[^\+]/) { # Anything except a new error print unless ($new_errors_only == 1); } elsif ($append_revision_to_new_test_fails && $revision) { chomp; print "$_ ($revision)\n"; } else { print; } } close (DIFF); print "\n"; } sub find_builds ($$$$$) { my ($rbuilds, $buildscoreurl, $selectcolumn_name, $revision_hash, $selectcolumn_revision) = @_; print "Reading from $buildscoreurl\n" unless !$debugging; open (CLEANS, "wget " . $verbose . " \'" . $buildscoreurl . "\' -O - |") || die "Could not read builds score page $buildscoreurl\n"; # Split at all spaces for(my $begin=0; ;) { chomp; my @columns = split (/ +/); if (/=+/) { $begin++; next; } if ($begin) { my $temp = %{$revision_hash}; $temp->{$columns[$selectcolumn_name]} = $columns[$selectcolumn_revision]; push (@{$rbuilds}, $columns[$selectcolumn_name]); } } close (CLEANS); sort @{$rbuilds}; print "Using builds @{$rbuilds}\n" unless !$debugging; } my @dates = (); my @builds = (); my @files = (); while ($arg = shift(@ARGV)) { if ($arg eq "-h" || $arg eq "-?") { print "Prints a diff for the list of test failures, for two builds on a certain date\n\n"; print "diff-builds [-n] [-d] [-D date] [-A] [build ...]\n"; print "\n"; print " -n -- Show only new test failing (default=no)\n"; print " -d -- Show debug info\n"; print " -h -- Prints this information\n"; print " -D date -- Specify a date. Either YYYY_MM_DD or YYYY-MM-DD works\n"; print " Use two date parameters to specify an interval\n"; print " -A -- Use all builds, not just the clean (successful) ones\n"; print " -r -- Append SVN revision numbers to NEW test names\n"; print " build -- Specify the build name. As it appears on the scoreboard\n"; print " Works with two builds and one date to show the differences\n"; print " between them. One build and two dates works, too.\n"; print " Just a single date (no builds) implies comparing all of \n"; print " today's builds with the builds on the supplied date.\n"; exit 0; } if ($arg eq '-D') { my $date = shift(@ARGV); $date =~ s/-/_/g; push (@dates, $date); print "Date=$date\n" unless !$debugging; } elsif ($arg eq '-v') { $verbose = undef; } elsif ($arg eq '-d') { $debugging = 1; } elsif ($arg eq '-n') { $new_errors_only = 1; } elsif ($arg eq '-A') { $clean_builds_only = 0; } elsif ($arg eq '-r') { $append_revision_to_new_test_fails = 1; } else { push (@builds, $arg); print "Build=$arg\n" unless !$debugging; } } # Diff the todays clean builds with the ones from a specific date if ($#builds == -1 && $#dates >= 0) { my %revisions = {}; # only the start date given - implies we should # use the today's date if ($#dates == 0) { $dates[1] = strftime ("%Y_%m_%d", gmtime); } if ($clean_builds_only) { find_builds (\@builds, $cleanbuildsurl . "-" . $dates[1] . ".txt" , 8, \%revisions, 7); } else { find_builds (\@builds, $allbuildsurl . "-" . $dates[1] . ".txt" , 4, \%revisions, 3); } foreach $build (sort @builds) { $files[0] = $files[1] = $build; differentiate (\@files, \@dates, $revisions{$build} ); } } else { die "More than one date or build name are required" unless ($#dates + $#builds ge 1); print "dates=@dates ($#dates)\n" unless !$debugging; print "builds=@builds ($#builds)\n" unless !$debugging; select_builds (\@dates, \@builds, \@files); differentiate (\@files, \@dates, 0); } __END__ =head1 diff-builds.pl Diff the lists of failing tests =item DESCRIPTION Prints a diff for the list of test failures, for two builds on a certain date. Or, for two dates and a certain build. =item EXAMPLE diff-builds.pl WinXP_VC71_NET_Static_Debug -D 2006_04_17 -D 2006_05_12 =item AUTHOR Iliyan Jeliazkov ace-6.4.5+dfsg.orig/bin/msvc_static_order.lst0000644000175000017500000004541213154167357017310 0ustar tggtgg# This file lists the project files that must be build first in a static # build using msvc_static_compile.pl ace/ace ace/ACE_ETCL ace/ACE_ETCL_Parser ace/MonitorControl/MonitorControl Kokyu/Kokyu ACEXML/parser/parser/ACEXML_Parser ACEXML/common/ACEXML apps/gperf/src/gperf TAO/TAO_IDL/TAO_IDL_BE TAO/TAO_IDL/TAO_IDL_FE TAO/TAO_IDL/TAO_IDL_EXE TAO/tao/TAO TAO/tao/AnyTypeCode TAO/tao/CodecFactory TAO/tao/Codeset TAO/tao/PI TAO/tao/PortableServer TAO/tao/PI_Server TAO/tao/Valuetype TAO/tao/ObjRefTemplate TAO/tao/IORInterceptor TAO/tao/DynamicAny TAO/tao/IORManipulation TAO/tao/IORTable TAO/tao/Messaging TAO/tao/DynamicInterface TAO/tao/Strategies TAO/tao/RTCORBA TAO/tao/RTPortableServer TAO/tao/Utils TAO/tao/TAO_Utils TAO/tao/RTScheduler TAO/tao/IFR_Client TAO/tao/TypeCodeFactory TAO/tao/ImR_Client TAO/tao/CSD_Framework TAO/tao/CSD_ThreadPool TAO/tao/TC TAO/tao/DiffServPolicy TAO/tao/Monitor TAO/orbsvcs/orbsvcs/Svc_Utils TAO/orbsvcs/orbsvcs/CosNaming_IDL TAO/orbsvcs/orbsvcs/CosNaming TAO/orbsvcs/orbsvcs/CosNaming_Skel TAO/orbsvcs/orbsvcs/CosNaming_Serv TAO/orbsvcs/orbsvcs/CosProperty_IDL TAO/orbsvcs/orbsvcs/CosProperty TAO/orbsvcs/orbsvcs/CosProperty_Skel TAO/orbsvcs/orbsvcs/CosProperty_Serv TAO/orbsvcs/orbsvcs/CosTrading_IDL TAO/orbsvcs/orbsvcs/CosTrading TAO/orbsvcs/orbsvcs/CosTrading_Skel TAO/orbsvcs/orbsvcs/CosTrading_Serv TAO/orbsvcs/orbsvcs/HTIOP TAO/orbsvcs/orbsvcs/AV TAO/orbsvcs/orbsvcs/ETCL TAO/orbsvcs/orbsvcs/RTCosScheduling TAO/orbsvcs/orbsvcs/RTEvent TAO/orbsvcs/orbsvcs/RTEvent_Skel TAO/orbsvcs/orbsvcs/RTEvent_Serv TAO/orbsvcs/orbsvcs/RTSched TAO/orbsvcs/orbsvcs/RTSchedEvent TAO/orbsvcs/orbsvcs/CosEvent_IDL TAO/orbsvcs/orbsvcs/CosEvent TAO/orbsvcs/orbsvcs/CosEvent_Skel TAO/orbsvcs/orbsvcs/CosEvent_Serv TAO/orbsvcs/orbsvcs/RTKokyuEvent TAO/orbsvcs/orbsvcs/CosConcurrency_IDL TAO/orbsvcs/orbsvcs/CosConcurrency TAO/orbsvcs/orbsvcs/CosConcurrency_Skel TAO/orbsvcs/orbsvcs/CosConcurrency_Serv TAO/orbsvcs/orbsvcs/CosLifeCycle TAO/orbsvcs/orbsvcs/CosTime TAO/orbsvcs/orbsvcs/CosNotification_IDL TAO/orbsvcs/orbsvcs/CosNotification TAO/orbsvcs/orbsvcs/CosNotification_Skel TAO/orbsvcs/orbsvcs/CosNotification_Serv TAO/orbsvcs/orbsvcs/CosNotification_Persist TAO/orbsvcs/orbsvcs/DsLogAdmin_IDL TAO/orbsvcs/orbsvcs/DsLogAdmin TAO/orbsvcs/orbsvcs/DsLogAdmin_Skel TAO/orbsvcs/orbsvcs/DsLogAdmin_Serv TAO/orbsvcs/orbsvcs/DsEventLogAdmin_IDL TAO/orbsvcs/orbsvcs/DsEventLogAdmin TAO/orbsvcs/orbsvcs/DsEventLogAdmin_Skel TAO/orbsvcs/orbsvcs/DsEventLogAdmin_Serv TAO/orbsvcs/orbsvcs/DsNotifyLogAdmin_IDL TAO/orbsvcs/orbsvcs/DsNotifyLogAdmin TAO/orbsvcs/orbsvcs/DsNotifyLogAdmin_Skel TAO/orbsvcs/orbsvcs/DsNotifyLogAdmin_Serv TAO/orbsvcs/orbsvcs/PortableGroup TAO/orbsvcs/orbsvcs/FTORB_Utils TAO/orbsvcs/orbsvcs/FT_ClientORB TAO/orbsvcs/orbsvcs/FT_ServerORB TAO/orbsvcs/orbsvcs/FtRtEvent TAO/orbsvcs/orbsvcs/FaultTolerance TAO/orbsvcs/orbsvcs/CosLoadBalancing TAO/orbsvcs/orbsvcs/IFRService TAO/orbsvcs/orbsvcs/RTCORBAEvent TAO/orbsvcs/orbsvcs/RT_Notification TAO/orbsvcs/orbsvcs/RTEventLogAdmin_IDL TAO/orbsvcs/orbsvcs/RTEventLogAdmin TAO/orbsvcs/orbsvcs/RTEventLogAdmin_Skel TAO/orbsvcs/orbsvcs/RTEventLogAdmin_Serv TAO/orbsvcs/orbsvcs/Security TAO/orbsvcs/Naming_Service/Naming_Service TAO/orbsvcs/ImplRepo_Service/ImR_Activator_IDL TAO/orbsvcs/ImplRepo_Service/ImR_Locator_IDL TAO/orbsvcs/ImplRepo_Service/ImR_Activator TAO/orbsvcs/ImplRepo_Service/ImR_Activator_Service TAO/orbsvcs/ImplRepo_Service/ImR_Locator TAO/orbsvcs/ImplRepo_Service/ImR_Locator_Service TAO/orbsvcs/ImplRepo_Service/tao_imr TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager_Lib TAO/orbsvcs/orbsvcs/FTRT_ClientORB TAO/orbsvcs/tests/Concurrency/CC_client TAO/orbsvcs/tests/Event/lib/Event_Test_Lib TAO/orbsvcs/tests/Event/Mcast/Common/ECMcastTests_lib TAO/orbsvcs/tests/Trading/Trading_Test_Lib TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/CosEC_RtEC_Based_lib TAO/orbsvcs/performance-tests/RTEvent/lib/RTEC_Perf TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Lib TAO/tests/Smart_Proxies/Collocation/SP_Collocation_Idl TAO/tests/Smart_Proxies/Collocation/SP_Collocation_TestStubsLib TAO/tests/Collocation/Collocation_Idl TAO/tests/Collocation/Collocation_Test_Stub TAO/tests/Collocation/Collocation_Diamond TAO/tests/ORB_Local_Config/Two_DLL_ORB/Two_DLL_ORB_Idl TAO/tests/TransportCurrent/lib/Current_Test_Lib_Idl TAO/tests/TransportCurrent/lib/Current_Test_Lib_Client TAO/tests/TransportCurrent/lib/Current_Test_Lib_Server TAO/examples/POA/Generic_Servant/POA_Generic_Servant_Lib TAO/examples/Simple/time-date/Simple_Time_Date_Lib TAO/docs/tutorials/Quoter/idl/Quoter_Idl_Lib TAO/performance-tests/RTCorba/Multiple_Endpoints/Common/RTCORBA_Common TAO/examples/RTScheduling/Job TAO/examples/RTScheduling/RTSchedSynch TAO/examples/RTScheduling/RTSchedTestLib tests/Test_Output tests/DLL_Test_Parent TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Lib performance-tests/Synch-Benchmarks/Synch_Lib/Synch_Lib examples/Service_Configurator/Misc/Service_Configurator_Misc_Timer examples/Timer_Queue/Timer_Queue_Library ASNMP/asnmp/asnmp_lib netsvcs/lib/netsvcs netsvcs/clients/Naming/Client/Netsvsc_Client_Test_Lib netsvcs/clients/Naming/Dump_Restore/Netsvcs_Dump_Restore_Lib websvcs/lib/websvcs protocols/ace/HTBP/HTBP protocols/ace/RMCast/RMCast protocols/ace/TMCast/TMCast TAO/CIAO/CCF/CCF/CIDL/CIDL TAO/CIAO/CCF/CCF/CodeGenerationKit/CodeGenerationKit TAO/CIAO/CCF/CCF/CompilerElements/CompilerElements TAO/CIAO/CCF/CCF/IDL2/IDL2 TAO/CIAO/CCF/CCF/IDL3/IDL3 TAO/CIAO/CIDLC/CIDLC TAO/CIAO/ciao/CIAO_Client TAO/CIAO/ciao/CIAO_Container TAO/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events_Base TAO/DAnCE/Deployment/Deployment_stub TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent TAO/CIAO/ciaosvcs/Events/CIAO_Events TAO/DAnCE/Deployment/Deployment_svnt TAO/DAnCE/Interfaces/ExecutionManager_stub TAO/DAnCE/DomainApplicationManager/DomainApplicationManager TAO/CIAO/ciao/CIAO_Server TAO/DAnCE/ExecutionManager/ExecutionManager TAO/DAnCE/Interfaces/NodeManager_stub TAO/DAnCE/NodeApplication/Config_Manager TAO/DAnCE/NodeApplication/NodeApp_Configurator TAO/DAnCE/NodeApplication/NA_Configurator TAO/DAnCE/NodeApplication/NoOp_Configurator TAO/DAnCE/NodeApplication/NodeApplicationLib TAO/DAnCE/NodeApplication/NodeApplication TAO/DAnCE/NodeApplication/RTNA_Configurator TAO/DAnCE/TargetManager/CIAO_TargetManager_stub TAO/DAnCE/NodeApplicationManager/NodeApplicationManager TAO/DAnCE/NodeManager/Monitor_Monitorlib TAO/DAnCE/NodeManager/NodeManager_svnt TAO/DAnCE/NodeManager/NodeManager TAO/CIAO/tools/Config_Handlers/XSC_XML_Generation TAO/CIAO/tools/Config_Handlers/XSC_XML_Handlers TAO/CIAO/tools/Config_Handlers/Utils/CIAO_XML_Utils TAO/CIAO/tools/Config_Handlers/XSC_DynAny_Handler TAO/CIAO/tools/Config_Handlers/XSC_Config_Handlers_Common TAO/CIAO/tools/Config_Handlers/CIAO_Events/CIAO_Events_XML_Generation TAO/CIAO/tools/Config_Handlers/CIAO_Events/CIAO_Events_Handlers TAO/CIAO/tools/Config_Handlers/RT-CCM/RT_CCM_XML_Generation TAO/CIAO/tools/Config_Handlers/RT-CCM/RT_CCM_Config_Handlers TAO/CIAO/tools/Config_Handlers/XSC_Config_Handlers TAO/CIAO/tools/Config_Handlers/Package_Handlers/Package_Config_Handlers TAO/DAnCE/RepositoryManager/RepositoryManager TAO/DAnCE/Plan_Generator/Plan_Generator TAO/DAnCE/Utils/DAnCE_Utils TAO/DAnCE/Plan_Launcher/Plan_Launcher_Impl TAO/DAnCE/Plan_Launcher/Plan_Launcher TAO/DAnCE/RepositoryManager/RMAdmin TAO/DAnCE/StaticConfigurator/StaticDAnCEParser TAO/DAnCE/TargetManager/CIAO_TargetManager_svnt TAO/DAnCE/TargetManager/CIAO_TargetManager_exec TAO/DAnCE/TargetManager/TMClient TAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip_stub TAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip_svnt TAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip_exec TAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_client TAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_client_dynamic TAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_client_ex TAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_client_simple TAO/bin/PerlCIAO/PerlCIAO TAO/CIAO/docs/tutorials/Quoter/Simple/Stock_Base/Stock_Base_idl_gen TAO/CIAO/docs/tutorials/Quoter/Simple/Stock_Base/Stock_Base_stub TAO/CIAO/docs/tutorials/Quoter/Simple/Stock_Base/Stock_Base_skel TAO/CIAO/docs/tutorials/Quoter/Simple/Stock_Base/Stock_Base_StockBroker_idl_gen TAO/CIAO/docs/tutorials/Quoter/Simple/Stock_Base/Stock_Base_StockBroker_cidl_gen TAO/CIAO/docs/tutorials/Quoter/Simple/Stock_Base/Stock_Base_StockBroker_stub TAO/CIAO/docs/tutorials/Quoter/Simple/Stock_Base/Stock_Base_StockBroker_exec TAO/CIAO/docs/tutorials/Quoter/Simple/Stock_Base/Stock_Base_StockBroker_svnt TAO/CIAO/docs/tutorials/Quoter/Simple/Stock_Base/Stock_Base_StockBrokerDriver TAO/CIAO/docs/tutorials/Quoter/Simple/Stock_Base/Stock_Base_StockDistributor_idl_gen TAO/CIAO/docs/tutorials/Quoter/Simple/Stock_Base/Stock_Base_StockDistributor_cidl_gen TAO/CIAO/docs/tutorials/Quoter/Simple/Stock_Base/Stock_Base_StockDistributor_stub TAO/CIAO/docs/tutorials/Quoter/Simple/Stock_Base/Stock_Base_StockDistributor_exec TAO/CIAO/docs/tutorials/Quoter/Simple/Stock_Base/Stock_Base_StockDistributor_svnt TAO/CIAO/docs/tutorials/Quoter/Simple/Stock_Base/Stock_Base_StockDistributorDriver TAO/CIAO/examples/BasicSP/BasicSP_lem_gen TAO/CIAO/examples/BasicSP/BasicSP_stub_gen TAO/CIAO/examples/BasicSP/BasicSP_stub TAO/CIAO/examples/BasicSP/BasicSP_exec TAO/CIAO/examples/BasicSP/BMClosedED/BMClosedED_lem_gen TAO/CIAO/examples/BasicSP/BMClosedED/BMClosedED_stub_gen TAO/CIAO/examples/BasicSP/BMClosedED/BMClosedED_stub TAO/CIAO/examples/BasicSP/BMClosedED/BMClosedED_exec TAO/CIAO/examples/BasicSP/BasicSP_svnt TAO/CIAO/examples/BasicSP/BMClosedED/BMClosedED_svnt TAO/CIAO/examples/BasicSP/BMDevice/BMDevice_lem_gen TAO/CIAO/examples/BasicSP/BMDevice/BMDevice_stub_gen TAO/CIAO/examples/BasicSP/BMDevice/BMDevice_stub TAO/CIAO/examples/BasicSP/BMDevice/BMDevice_exec TAO/CIAO/examples/BasicSP/BMDevice/BMDevice_svnt TAO/CIAO/examples/BasicSP/BMDisplay/BMDisplay_lem_gen TAO/CIAO/examples/BasicSP/BMDisplay/BMDisplay_stub_gen TAO/CIAO/examples/BasicSP/BMDisplay/BMDisplay_stub TAO/CIAO/examples/BasicSP/BMDisplay/BMDisplay_exec TAO/CIAO/examples/BasicSP/BMDisplay/BMDisplay_svnt TAO/CIAO/examples/BasicSP/EC/EC_stub_gen TAO/CIAO/examples/BasicSP/EC/EC_stub TAO/CIAO/examples/BasicSP/EC/EC_client TAO/CIAO/examples/BasicSP/EC/EC_controller TAO/CIAO/examples/BasicSP/EC/EC_lem_gen TAO/CIAO/examples/BasicSP/EC/EC_exec TAO/CIAO/examples/BasicSP/EC/EC_svnt TAO/CIAO/examples/Display/Display_Base/Display_Base_idl_gen TAO/CIAO/examples/Display/Display_Base/Display_Base_stub TAO/CIAO/examples/Display/Display_Base/Display_Base_skel TAO/CIAO/examples/Display/GPS/Display_GPS_idl_gen TAO/CIAO/examples/Display/GPS/Display_GPS_cidl_gen TAO/CIAO/examples/Display/GPS/Display_GPS_stub TAO/CIAO/examples/Display/GPS/Display_GPS_exec TAO/CIAO/examples/Display/GPS/Display_GPS_svnt TAO/CIAO/examples/Display/NavDisplay/Display_NavDisplay_idl_gen TAO/CIAO/examples/Display/NavDisplay/Display_NavDisplay_cidl_gen TAO/CIAO/examples/Display/NavDisplay/Display_NavDisplay_stub TAO/CIAO/examples/Display/NavDisplay/Display_NavDisplay_exec TAO/CIAO/examples/Display/NavDisplay/Display_NavDisplay_svnt TAO/CIAO/examples/Display/NavDisplayGUI_exec/Display_NavDisplayGUI_exec TAO/CIAO/examples/Display/NavDisplayGUI_exec/Display_NavDisplayGUI_svnt TAO/CIAO/examples/Display/RateGen/Display_RateGen_idl_gen TAO/CIAO/examples/Display/RateGen/Display_RateGen_cidl_gen TAO/CIAO/examples/Display/RateGen/Display_RateGen_stub TAO/CIAO/examples/Display/RateGen/Display_RateGen_exec TAO/CIAO/examples/Display/RateGen/Display_RateGen_svnt TAO/CIAO/examples/Display/RateGen/Display_controller TAO/CIAO/examples/Hello/Hello_Base/Hello_Base_idl_gen TAO/CIAO/examples/Hello/Hello_Base/Hello_Base_stub TAO/CIAO/examples/Hello/Hello_Base/Hello_Base_skel TAO/CIAO/examples/Hello/Receiver/Hello_Receiver_idl_gen TAO/CIAO/examples/Hello/Receiver/Hello_Receiver_cidl_gen TAO/CIAO/examples/Hello/Receiver/Hello_Receiver_stub TAO/CIAO/examples/Hello/Receiver/Hello_Receiver_exec TAO/CIAO/examples/Hello/Receiver/Hello_Receiver_svnt TAO/CIAO/examples/Hello/Sender/Hello_Sender_idl_gen TAO/CIAO/examples/Hello/Sender/Hello_Sender_cidl_gen TAO/CIAO/examples/Hello/Sender/Hello_Sender_stub TAO/CIAO/examples/Hello/Sender/Hello_Sender_exec TAO/CIAO/examples/Hello/Sender/Hello_Sender_svnt TAO/CIAO/examples/Hello/Sender/Hello_starter TAO/CIAO/examples/Null_Component/Null_Interface_idl_gen TAO/CIAO/examples/Null_Component/Null_Interface_stub TAO/CIAO/examples/Null_Component/Null_Interface_skel TAO/CIAO/examples/Null_Component/Null_Component_idl_gen TAO/CIAO/examples/Null_Component/Null_Component_cidl_gen TAO/CIAO/examples/Null_Component/Null_Component_stub TAO/CIAO/examples/Null_Component/Null_Component_exec TAO/CIAO/examples/Null_Component/Null_Component_svnt TAO/CIAO/examples/Null_Component/Null_Component_StaticDAnCEApp TAO/CIAO/examples/Swapping/Hello_Base/Swapping_Hello_Base_idl_gen TAO/CIAO/examples/Swapping/Hello_Base/Swapping_Hello_Base_stub TAO/CIAO/examples/Swapping/Hello_Base/Swapping_Hello_Base_skel TAO/CIAO/examples/Swapping/Receiver/Swapping_Hello_Receiver_idl_gen TAO/CIAO/examples/Swapping/Receiver/Swapping_Hello_Receiver_cidl_gen TAO/CIAO/examples/Swapping/Receiver/Swapping_Hello_Receiver_stub TAO/CIAO/examples/Swapping/Receiver/Swapping_Hello_Receiver_exec TAO/CIAO/examples/Swapping/Receiver/Swapping_Hello_Receiver_svnt TAO/CIAO/examples/Swapping/Sender/Swapping_Hello_Sender_idl_gen TAO/CIAO/examples/Swapping/Sender/Swapping_Hello_Sender_cidl_gen TAO/CIAO/examples/Swapping/Sender/Swapping_Hello_Sender_stub TAO/CIAO/examples/Swapping/Sender/Swapping_Hello_Sender_exec TAO/CIAO/examples/Swapping/Sender/Swapping_Hello_Sender_exec_1 TAO/CIAO/examples/Swapping/Sender/Swapping_Hello_Sender_exec_2 TAO/CIAO/examples/Swapping/Sender/Swapping_Hello_Sender_svnt TAO/CIAO/examples/Swapping/Sender/Swapping_Hello_Starter TAO/CIAO/performance-tests/Benchmark/Benchmark_idl_gen TAO/CIAO/performance-tests/Benchmark/Benchmark_stub TAO/CIAO/performance-tests/Benchmark/Benchmark_skel TAO/CIAO/performance-tests/Benchmark/Benchmark_server TAO/CIAO/performance-tests/Benchmark/RoundTripClient/Benchmark_RoundTripClient_idl_gen TAO/CIAO/performance-tests/Benchmark/RoundTripClient/Benchmark_RoundTripClient_cidl_gen TAO/CIAO/performance-tests/Benchmark/RoundTripClient/Benchmark_RoundTripClient_stub TAO/CIAO/performance-tests/Benchmark/RoundTripClient/Benchmark_RoundTripClient_exec TAO/CIAO/performance-tests/Benchmark/RoundTripClient/Benchmark_RoundTripClient_svnt TAO/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient_client TAO/CIAO/performance-tests/Benchmark/Multi_Threaded/Multi_Threaded_client TAO/CIAO/performance-tests/Benchmark/RoundTrip/Benchmark_RoundTrip_idl_gen TAO/CIAO/performance-tests/Benchmark/RoundTrip/Benchmark_RoundTrip_cidl_gen TAO/CIAO/performance-tests/Benchmark/RoundTrip/Benchmark_RoundTrip_stub TAO/CIAO/performance-tests/Benchmark/RoundTrip/Benchmark_RoundTrip_exec TAO/CIAO/performance-tests/Benchmark/RoundTrip/Benchmark_RoundTrip_svnt TAO/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip_client TAO/CIAO/performance-tests/Benchmark/RoundTripServer/RoundTrip_server TAO/CIAO/performance-tests/Protocols/common/Protocols_idl_gen TAO/CIAO/performance-tests/Protocols/common/Protocols_stub TAO/CIAO/performance-tests/Protocols/common/Protocols_skel TAO/CIAO/performance-tests/Protocols/Receiver/Protocols_Receiver_idl_gen TAO/CIAO/performance-tests/Protocols/Receiver/Protocols_Receiver_cidl_gen TAO/CIAO/performance-tests/Protocols/Receiver/Protocols_Receiver_stub TAO/CIAO/performance-tests/Protocols/Receiver/Protocols_Receiver_exec TAO/CIAO/performance-tests/Protocols/Receiver/Protocols_Receiver_svnt TAO/CIAO/performance-tests/Protocols/Sender/Protocols_Sender_idl_gen TAO/CIAO/performance-tests/Protocols/Sender/Protocols_Sender_cidl_gen TAO/CIAO/performance-tests/Protocols/Sender/Protocols_Sender_stub TAO/CIAO/performance-tests/Protocols/Sender/Protocols_Sender_exec TAO/CIAO/performance-tests/Protocols/Sender/Protocols_Sender_svnt TAO/CIAO/performance-tests/Protocols/Controller/Protocols_Controller TAO/CIAO/tests/Bug_2130_Regression/interfaces/ENW_stub TAO/CIAO/tests/Bug_2130_Regression/SEC_CheckPoint/TSEC_CheckPoint_stub TAO/CIAO/tests/Bug_2130_Regression/SEC_CheckPoint/TSEC_CheckPoint_controller TAO/CIAO/tests/Bug_2130_Regression/interfaces/ENW_skel TAO/CIAO/tests/Bug_2130_Regression/SEC_CheckPoint/TSEC_CheckPoint_svnt TAO/CIAO/tests/Bug_2130_Regression/SEC_CheckPoint/TSEC_CheckPoint_exec TAO/CIAO/tests/CIDL/CodeGen/Basic_idl_gen TAO/CIAO/tests/CIDL/CodeGen/Basic_stub TAO/CIAO/tests/CIDL/CodeGen/Basic_skel TAO/CIAO/tests/CIDL/CodeGen/Basic_CodeGen_idl_gen TAO/CIAO/tests/CIDL/CodeGen/Basic_CodeGen_cidl_gen TAO/CIAO/tests/CIDL/CodeGen/Basic_CodeGen_stub TAO/CIAO/tests/CIDL/CodeGen/Basic_CodeGen_exec TAO/CIAO/tests/CIDL/CodeGen/Basic_CodeGen_svnt TAO/CIAO/tests/IDL3/Components/ComplexComponent/Attributes/Attributes_stub TAO/CIAO/tests/IDL3/Components/ComplexComponent/EventSink/EventSink_stub TAO/CIAO/tests/IDL3/Components/ComplexComponent/EventSource/EventSource_stub TAO/CIAO/tests/IDL3/Components/ComplexComponent/Facets/Facets_stub TAO/CIAO/tests/IDL3/Components/ComplexComponent/Receptacles/Receptacles_stub TAO/CIAO/tests/IDL3/Components/SimpleComponent/SimpleComponent_stub TAO/CIAO/tests/IDL3/Events/Abstract/Abstract_stub TAO/CIAO/tests/IDL3/Events/Any/EventAny_local TAO/CIAO/tests/IDL3/Events/Regular/Regular_stub TAO/CIAO/tests/IDL3/Homes/Attributes/HomeAttributes_stub TAO/CIAO/tests/IDL3/Homes/Basic/IDL3_Basic_stub TAO/CIAO/tests/IDL3/Homes/Factory/Factory_stub TAO/CIAO/tests/IDL3/Homes/Finder/Finder_stub TAO/CIAO/tests/IDL3/Homes/Inheritance/Inheritance_stub TAO/CIAO/tools/IDL3_to_IDL2/TAO_IDL3_TO_IDL2_BE TAO/CIAO/tools/IDL3_to_IDL2/TAO_IDL3_TO_IDL2_EXE TAO/CIAO/tests/IDL3/ImpliedIDL/All/ConvertIDL3 TAO/CIAO/tests/IDL3/ImpliedIDL/Components/Basic/ICBasic_stub TAO/CIAO/tests/IDL3/ImpliedIDL/Components/EventSink/ICEventSink_stub TAO/CIAO/tests/IDL3/ImpliedIDL/Components/EventSource/ICEventSource_stub TAO/CIAO/tests/IDL3/ImpliedIDL/Components/Receptacles/ICReceptacles_stub TAO/CIAO/tests/IDL3/ImpliedIDL/Events/Events_stub TAO/CIAO/tests/IDL3/ImpliedIDL/Homes/Homes_stub TAO/CIAO/tests/IDL3/Lookup/LookupTest_stub TAO/CIAO/tests/Minimum/Minimum_Base/Minimum_Base_idl_gen TAO/CIAO/tests/Minimum/Minimum_Base/Minimum_Base_stub TAO/CIAO/tests/Minimum/Minimum_Base/Minimum_Base_skel TAO/CIAO/tests/Minimum/Receiver/Minimum_Base_Receiver_idl_gen TAO/CIAO/tests/Minimum/Receiver/Minimum_Base_Receiver_cidl_gen TAO/CIAO/tests/Minimum/Receiver/Minimum_Base_Receiver_stub TAO/CIAO/tests/Minimum/Receiver/Minimum_Base_Receiver_exec TAO/CIAO/tests/Minimum/Receiver/Minimum_Base_Receiver_svnt TAO/CIAO/tests/Minimum/Sender/Minimum_Base_Sender_idl_gen TAO/CIAO/tests/Minimum/Sender/Minimum_Base_Sender_cidl_gen TAO/CIAO/tests/Minimum/Sender/Minimum_Base_Sender_stub TAO/CIAO/tests/Minimum/Sender/Minimum_Base_Sender_exec TAO/CIAO/tests/Minimum/Sender/Minimum_Base_Sender_svnt TAO/CIAO/tools/Config_Handlers/CIAO_Events/CIAO_Events_Handlers_Tests TAO/CIAO/tools/Config_Handlers/XSC_Config_Handlers_Tests TAO/CIAO/tools/Config_Handlers/Package_Handlers/Package_Config_Handlers_Tests ace-6.4.5+dfsg.orig/bin/auto_compile0000755000175000017500000004017513154167357015461 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # -*- perl -*- # This script checkouts ACE from CVS, updates the "clone" directory, # compiles $ACE_ROOT/ace and $ACE_ROOT/tests and finally runs # $ACE_ROOT/tests/run_tests.sh. # # If it detects any problem it send email. # # DO NOT invoke this script from your crontab, use # auto_compile_wrapper for that. # # This script requires Perl5. # # TODO: Modify the script or split it in such a way that the main copy # can be obtained either using cvs or downloading the latest beta # from the WWW. # # The first three lines above let this script run without specifying the # full path to perl, as long as it is in the user's PATH. # Taken from perlrun man page. use File::Basename; use File::Copy; use FileHandle; require POSIX; # This are the sub-directories (in the module) we really compile. # Find out the command name. $CMD = basename($0); $dont_update = 0; # $copy_logs = 1; # $LOG_DESTINATION = $ENV{'HOME'}.'/.www-docs/auto_compile'; $copy_logs = 0; $LOG_DESTINATION='bugzilla'.'@cs.wustl.edu'; $dont_build_tao = 0; $dont_run = 0; $makefile_suffix = ""; $pre_realclean = 0; $post_realclean = 0; $report_success = 0; $debug = 0; $sandbox = ''; $sandbox_timeout = 600; $sendreport = 0; @BUILD_LIST= (); @CONFIGURATION_OPTIONS = (); @ARGS = (); while ($#ARGV >= 0) { if (!($ARGV[0] =~ m/^-/)) { push @ARGS, $ARGV[0]; } elsif ($ARGV[0] eq "-single_threaded") { print STDERR "$CMD: obsolete option $ARGV[0], " ."please use -config instead\n"; push @CONFIGURATION_OPTIONS, 'ST'; } elsif ($ARGV[0] eq "-minimum_corba") { print STDERR "$CMD: obsolete option $ARGV[0], " ."please use -config instead\n"; push @CONFIGURATION_OPTIONS, 'MINIMUM'; } elsif ($ARGV[0] eq "-ami") { print STDERR "$CMD: obsolete option $ARGV[0], " ."please use -config instead\n"; push @CONFIGURATION_OPTIONS, 'AMI'; } elsif ($ARGV[0] eq "-smart_proxies") { print STDERR "$CMD: obsolete option $ARGV[0], " ."please use -config instead\n"; push @CONFIGURATION_OPTIONS, 'SMART_PROXIES'; } elsif ($ARGV[0] eq "-static") { print STDERR "$CMD: obsolete option $ARGV[0], " ."please use -config instead\n"; push @CONFIGURATION_OPTIONS, 'STATIC'; } elsif ($ARGV[0] eq "-config") { shift; push @CONFIGURATION_OPTIONS, $ARGV[0]; } elsif ($ARGV[0] eq "-build_list") { shift; @BUILD_LIST = split (/,/, $ARGV[0]); } elsif ($ARGV[0] eq "-dont_update") { $dont_update = 1; } elsif ($ARGV[0] eq "-copy_logs") { shift; $copy_logs = 1; $LOG_DESTINATION = $ARGV[0]; } elsif ($ARGV[0] eq "-sandbox") { shift; $sandbox = $ARGV[0]; } elsif ($ARGV[0] eq "-sandbox_timeout") { shift; $sandbox_timeout = $ARGV[0]; } elsif ($ARGV[0] eq "-dont_run") { $dont_run = 1; } elsif ($ARGV[0] eq "-pre_realclean") { $pre_realclean = 1; } elsif ($ARGV[0] eq "-post_realclean") { $post_realclean = 1; } elsif ($ARGV[0] eq "-report_success") { $report_success = 1; } elsif ($ARGV[0] eq "-debug") { $debug = 1; } elsif ($ARGV[0] eq "-sendreport") { $sendreport = 1; } elsif ($ARGV[0] eq "-notao") { $dont_build_tao = 1; } elsif ($ARGV[0] eq "-make_type") { shift; $makefile_suffix = $ARGV[0]; } else { print "Ignoring option $ARGV[0]\n"; } shift; } # Extract configuration information from command line. # TODO: Some validation and checking should be done here. $CHECKOUT = $ARGS[0]; $BUILD = $ARGS[1]; $LOGDIR = $ARGS[2]; $ADMIN = $ARGS[3]; $MAIL = "mail"; if ($#ARGS >= 4) { $MAIL = $ARGS[4]; } $LOG_URL = "http://ace.cs.wustl.edu/~bugzilla/auto_compile_logs/"; if ($#ARGS >= 5) { $LOG_URL = $ARGS[5]; } # This is the module we will checkout unless a different one is on the # command line. $MODULE='ACE_wrappers'; if ($#ARGS >= 6) { $MODULE = $ARGS[6]; } $ENV{'ACE_ROOT'} = $CHECKOUT . '/' . $MODULE . '/build/' . $BUILD; $ENV{'TAO_ROOT'} = $CHECKOUT . '/' . $MODULE . '/build/' . $BUILD . '/TAO'; # We obtain our revision to report errors. $REVISION='$Revision$ '; # When an error is found we try to die gracefully and send some email # to ADMIN. $disable_file = $LOGDIR . '/.disable'; $histfile = $LOGDIR . '/history'; $LOGBASE = POSIX::strftime("%Y_%m_%d_%H_%M", localtime); $LOGFILE = $LOGDIR . '/' . $LOGBASE . '.txt'; $HOST = `hostname`; chop $HOST; $LOG_NAME = $HOST . '_' . $BUILD . '/' . $LOGBASE . '.txt'; $STATUS = "OK"; if ($debug) { print "CHECKOUT = $CHECKOUT\n"; print "BUILD = $BUILD\n"; print "LOGDIR = $LOGDIR\n"; print "ADMIN = $ADMIN\n"; print "MAIL = $MAIL\n"; print "ACE_ROOT = $ENV{ACE_ROOT}\n"; print "TAO_ROOT = $ENV{TAO_ROOT}\n"; print "CONFIGURATION_OPTIONS = ", @CONFIGURATION_OPTIONS, "\n"; } push @INC, $CHECKOUT . '/' . $MODULE . '/bin'; require PerlACE::ConfigList; $config_list = new PerlACE::ConfigList; $config_list->my_config_list (@CONFIGURATION_OPTIONS); if ($#BUILD_LIST == -1) { if ($dont_build_tao) { @BUILD_LIST=('ace', 'netsvcs', 'tests'); } else { @BUILD_LIST=('.', 'TAO'); } } sub mydie { my $DEST_DIR = $LOG_DESTINATION.'/'.$HOST.'_'.$BUILD; mkdir $DEST_DIR,0755 if (!-d $DEST_DIR); if (open(STATUS, '>'.$DEST_DIR.'/status.txt')) { print STATUS "SCOREBOARD_STATUS: Inactive\n"; close STATUS; } unlink $disable_file; die $_ . "\n"; } @RUN_LIST = (); if ($debug) { @BUILD_LIST = ('ace'); @RUN_LIST = ('TAO/tests/OctetSeq/run_test.pl'); $ADMIN = $ENV{'LOGNAME'}; } else { $config_list->load ($CHECKOUT . '/' . $MODULE . '/' . 'build/' . $BUILD . '/bin/auto_run_tests.lst'); @RUN_LIST = $config_list->valid_entries (); } sub mail_logs { open (MAIL, "|".$MAIL.' -s AUTO_COMPILE_LOG='.$LOG_NAME.' '.$LOG_DESTINATION) || mydie "Cannot open mail pipe for: $LOG_NAME\n"; print MAIL 'This is the log for: ', "\n"; print MAIL $CMD, ' [', $REVISION, "] for $HOST/$BUILD\n"; print MAIL "\n================================================================\n"; if (open (THELOG, "$LOGFILE")) { while () { print MAIL $_; } close (THELOG); } close (MAIL); # Ignore errors.... } sub copy_logs { local $DEST_DIR = $LOG_DESTINATION.'/'.$HOST.'_'.$BUILD; mkdir $DEST_DIR,0755 if (!-d $DEST_DIR); copy($LOGFILE, $DEST_DIR.'/'.$LOGBASE.'.txt'); local $MAKE_PRETTY="$CHECKOUT/$MODULE/bin/make_pretty.pl"; system ("perl $MAKE_PRETTY -b -i $LOGFILE >$DEST_DIR/$LOGBASE"."_brief.html"); system ("perl $MAKE_PRETTY -i $LOGFILE >$DEST_DIR/$LOGBASE".".html"); chmod 0644, $DEST_DIR.'/'.$LOGBASE.'.txt' , $DEST_DIR.'/'.$LOGBASE.'_brief.html' , $DEST_DIR.'/'.$LOGBASE.'.html' ; } sub report_errors { # First clear the lock, so the next execution works... unlink $disable_file; # Ignore errors! if ($sendreport) { # Now send a summary of the errors to the ADMIN account, if there are any. if ($#_ >= 0) { local $to = $ADMIN; open (MAIL, "|".$MAIL.' -s "[AUTO_COMPILE] '.$HOST.' '.$BUILD.'" '.$to) || mydie "Cannot open mail pipe for: $_\n"; print MAIL 'The following message is brought to you by: ', "\n"; print MAIL $CMD, ' [', $REVISION, "] for $BUILD on $HOST\n\n"; print MAIL "\nPlease check the following log for more info:\n\n"; print MAIL $LOG_URL, '?', $HOST, '_', $BUILD, "\n\n"; local $m; foreach $m (@_) { print MAIL $m, "\n"; } close (MAIL); # Ignore errors.... } } # Now send the complete log to bugzilla... if ($copy_logs) { copy_logs (); } else { mail_logs (); } } ### MAIN FUNCTION if (-f $disable_file) { print 'The following message is brought to you by: ', "\n"; print $CMD, ' [', $REVISION, "] for $BUILD on $CHECKOUT\n"; print "DISABLED\n"; exit 0; } open (DISABLE, '>' . $disable_file) || die "cannot open disable file <$disable_file>\n"; print DISABLE "auto_compile <$date> is running\n"; close (DISABLE) || die "cannot close disable file"; open(HIST, '>>' . $histfile) # Do not use 'mydie' to report the problem, it tries to remove the # disable file || mydie "cannot open history file \"$histfile\"\n"; $date = localtime; print HIST $CMD, ': running at ', $date, ' '; open(LOG, '>' . $LOGFILE) || mydie "cannot open log file"; LOG->autoflush (); # The following lines are useful when debugging the script or wrapper. # print LOG $CHECKOUT, " ", $BUILD, " ", $LOGDIR, " ", $ADMIN, "\n"; #while (($key,$value) = each %ENV) { # print LOG $key, " = ", $value, "\n"; #} print LOG "#################### CVS\n"; my $DEST_DIR = $LOG_DESTINATION.'/'.$HOST.'_'.$BUILD; mkdir $DEST_DIR,0755 if !-d $DEST_DIR; if (open(STATUS, '>'.$DEST_DIR.'/status.txt')) { print STATUS "SCOREBOARD_STATUS: CVS\n"; close STATUS; } chdir($CHECKOUT) || mydie "Cannot chdir to $CHECKOUT"; if ($dont_update == 0) { $date = localtime; print LOG "$CMD: starting checkout at ", $date, "\n"; open(CVS, "cvs -q checkout -P $MODULE 2>&1 |") || mydie "cannot start checkout of $MODULE"; $conflicts = 0; while () { if (m/^C /) { ($unused, $entry) = split('/'); if (($entry ne "ChangeLog\n") && ($entry ne "THANKS\n")) { $conflicts = 1; } } print LOG $_; } close(CVS); # || mydie "error while checking out $MODULE"; $date = localtime; print LOG "$CMD: checkout finished at ", $date, "\n"; if ($conflicts != 0) { mydie "conflicts on checkout"; } } chdir($MODULE) || mydie "cannot chdir to $MODULE"; $date = localtime; print LOG "$CMD: starting clone at ", $date, "\n"; open(CLONE, "perl bin/create_ace_build -a -v $BUILD 2>&1 |") || mydie "cannot clone directory"; while() { print LOG $_; } close(CLONE) || mydie "error while cloning ACE_ROOT"; $date = localtime; print LOG "$CMD: clone finished at ", $date, "\n"; chdir('build/' . $BUILD) || mydie "cannot chdir to $BUILD"; @failures = (); if ($makefile_suffix ne "") { $MAKEFLAGS = "-f Makefile.$makefile_suffix"; } print LOG "#################### Compiler\n"; if (open(STATUS, '>'.$DEST_DIR.'/status.txt')) { print STATUS "SCOREBOARD_STATUS: Compile\n"; close STATUS; } if ($pre_realclean) { foreach $i (reverse(@BUILD_LIST)) { $date = localtime; print LOG "$CMD: =============================================\n"; print LOG "$CMD: make realclean in $i started at ", $date, "\n"; open(MAKE, "make -k $MAKEFLAGS -C $i realclean 2>&1 |") || mydie "cannot start make in $i"; while () { # Ignore errors.... } if (close(MAKE) == 0) { push @failures, "errors while cleaning $i"; } $date = localtime; print LOG "$CMD: make realclean in $i finished at ", $date, "\n"; print LOG "$CMD: =============================================\n\n"; } } $MAKEFLAGS .= ""; foreach $i (@BUILD_LIST) { $date = localtime; print LOG "$CMD: =============================================\n"; print LOG "$CMD: make for $i started at ", $date, "\n"; open(MAKE, "make -k $MAKEFLAGS -C $i 2>&1 |") || mydie "cannot start make for $i"; local $current_dir = $i; local $last_error = ""; local $this_error = 0; local $this_warning = 0; while () { chop; $this_error = $this_warning = 0; if ($^O eq 'hpux' && m/^Warning:[ \t]+[0-9]+ future errors were detected/) { next; } print LOG $_, "\n"; if (m/^make(\[[0-9]+\])?: Entering directory /) { s/^make(\[[0-9]+\])?: Entering directory //; s%^$ENV{'ACE_ROOT'}/%%; $current_dir = $_; } if (m/error:/i || m/error /i || m/^make(\[[0-9]+\])?: \*\*\*/) { $this_error = 1; } if ($^O eq 'aix' && m/\d+-\d+ \([SI]\)/) { $this_error = 1; } if ($this_error) { if ($last_error ne $current_dir || STATUS eq "COMPILATION WARNING") { $STATUS = "COMPILATION ERROR"; push @failures, "Error while compiling in $current_dir \n"; $last_error = $current_dir; } } if (m/warning:/i || m/warning /i || m/Info: /i) { $this_warning = 1; if ($^O eq 'aix' && m/^ld: \d+-\d+ WARNING: Duplicate symbol: .*ACE.*/) { $this_warning = 0; } } if ($^O eq 'aix' && m/\d+-\d+ \(W\)/) { $this_warning = 1; } if ($this_warning) { if ($last_error ne $current_dir) { if ($STATUS eq "OK") { $STATUS = "COMPILATION WARNING"; } push @failures, "Warning while compiling in $current_dir\n"; $last_error = $current_dir; } } } if (close(MAKE) == 0) { push @failures, "errors while running make in $i"; } $date = localtime; print LOG "$CMD: make for $i finished at ", $date, "\n"; print LOG "$CMD: =============================================\n\n"; } print LOG "#################### Tests\n"; if (open(STATUS, '>'.$DEST_DIR.'/status.txt')) { print STATUS "SCOREBOARD_STATUS: Tests\n"; close STATUS; } if ($dont_run == 0) { my $config_params; if ($#CONFIGURATION_OPTIONS != -1) { $config_params = ' -Config '; } $config_params .= join ' -Config ', @CONFIGURATION_OPTIONS; foreach my $i (@RUN_LIST) { local $directory = '.'; local $program = $i; if ($i =~ /(.*)\/([^\/]*)$/) { $directory = $1; $program = $2; } $date = localtime; print LOG "\n\n$CMD: ================ $date ================\n"; print LOG "auto_run_tests: $i\n"; local $subdir = $CHECKOUT .'/'. $MODULE .'/build/'. $BUILD .'/'. $directory; chdir ($subdir) || mydie "cannot chdir to $subdir"; $run_error = 0; my $prefix = ''; if ($sandbox ne "") { $prefix = $sandbox.' '.$sandbox_timeout.' '; } if (open(RUN, $prefix."perl $program $config_params 2>&1 |") == 0) { push @failures, "cannot run $program in $directory"; next; } while () { print LOG $_; if (m/Error/ || m/ERROR/ || m/FAILED/ || m/EXCEPTION/ || m/pure virtual /i) { if ($STATUS eq "OK") { $STATUS = "RUNTIME ERROR"; } $run_error = 1; } } if (close(RUN) == 0) { if ($STATUS eq "OK") { $STATUS = "RUNTIME ERROR"; } print LOG "ERROR, non-zero status returned by test script\n"; push @failures, "Error when closing pipe for $program in $directory"; next; } $date = localtime; print LOG "$CMD: $program finished ", $date, "\n"; if ($run_error != 0) { push @failures, "errors detected while running $program in $directory"; } } } if ($post_realclean) { foreach $i (reverse(@BUILD_LIST)) { $date = localtime; print LOG "$CMD: =============================================\n"; print LOG "$CMD: make realclean in $i started at ", $date, "\n"; open(MAKE, "make -k $MAKEFLAGS -C $i realclean 2>&1 |"); while () { # Ignore errors.... } if (close(MAKE) == 0) { push @failures, "errors while cleaning $i"; } $date = localtime; print LOG "$CMD: make realclean in $i finished at ", $date, "\n"; print LOG "$CMD: =============================================\n\n"; } } print LOG "#################### Config\n"; chdir($CHECKOUT . "/" . $MODULE . "/build/" . $BUILD) || mydie "Cannot chdir to $CHECKOUT/$MODULE/build/$BUILD"; open (CONFIG, "perl bin/nightlybuilds/print_config.pl $CHECKOUT/$MODULE/build/$BUILD 2>&1 |") || mydie "Cannot run print_config.pl script"; while () { print LOG $_; } close (CONFIG) || mydie "Error while running print_config.pl script"; report_errors @failures; print LOG "#################### End\n"; if (open(STATUS, '>'.$DEST_DIR.'/status.txt')) { print STATUS "SCOREBOARD_STATUS: Inactive\n"; close STATUS; } close(LOG) || mydie "cannot close LOGFILE"; print HIST "$STATUS\n"; close(HIST) || mydie "cannot close history file"; unlink $disable_file || die "cannot unlink disable file"; if ($report_success && $STATUS eq "OK") { report_errors "Congratulations: No errors or warnings detected\n"; } exit 0; ace-6.4.5+dfsg.orig/bin/cle.pl0000755000175000017500000001623513154167357014156 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # ****************************************************************** # Author: Chad Elliott # Date: 6/18/2002 # ****************************************************************** use strict; use Cwd; use File::Basename; use Sys::Hostname; if ( $^O eq 'VMS' ) { require VMS::Filespec; import VMS::Filespec qw(unixpath); } unshift(@INC, getExecutePath($0) . 'ChangeLogEditor'); require ChangeLogEdit; require EmailTranslator; # ************************************************************ # Subroutine Section # ************************************************************ sub which { my($prog) = shift; my($exec) = $prog; my($part) = ''; if ( $^O eq 'VMS' ) { my($envSep) = ';'; if (defined $ENV{'PATH'}) { foreach $part (split(/$envSep/, $ENV{'PATH'})) { $part .= "$prog"; if ( -x $part ) { $exec = $part; last; } } } } else { my($envSep) = ($^O eq 'MSWin32' ? ';' : ':'); if (defined $ENV{'PATH'}) { foreach $part (split(/$envSep/, $ENV{'PATH'})) { $part .= "/$prog"; if ( -x $part ) { $exec = $part; last; } } } } return $exec; } sub getExecutePath { my($prog) = shift; my($loc) = ''; if ( $^O eq 'VMS' ) { if ($prog ne basename($prog)) { my($dir) = unixpath( dirname($prog) ); if ($prog =~ /^[\/\\]/) { $loc = $dir; } else { $loc = unixpath(getcwd()) . $dir; } } else { $loc = unixpath( dirname(which($prog)) ); } if ($loc eq '.') { $loc = unixpath( getcwd() ); } } else { if ($prog ne basename($prog)) { if ($prog =~ /^[\/\\]/ || $prog =~ /^[A-Za-z]:[\/\\]?/) { $loc = dirname($prog); } else { $loc = getcwd() . '/' . dirname($prog); } } else { $loc = dirname(which($prog)); } $loc =~ s/\/\.$//; if ($loc eq '.') { $loc = getcwd(); } if ($loc ne '') { $loc .= '/'; } } return $loc; } sub getDefaultDomain { my($domain) = undef; my($host) = hostname(); if (defined $host) { ## First try the hostname if ($host =~ /[^\.]+\.(.*)/) { $domain = $1; } else { ## Next try the hosts file my($hosts) = ($^O eq 'MSWin32' ? "$ENV{SystemRoot}/system32/drivers/etc/hosts" : '/etc/hosts'); my($fh) = new FileHandle(); if (open($fh, $hosts)) { while(<$fh>) { if (/$host\.([^\s]+)/) { $domain = $1; last; } } close($fh); } if (!defined $domain) { ## Next try ipconfig on Windows if ($^O eq 'MSWin32') { if (open($fh, 'ipconfig /all |')) { while(<$fh>) { if (/Primary\s+DNS\s+Suffix[^:]+:\s+(.*)/) { $domain = $1; } elsif (/DNS\s+Suffix\s+Search[^:]+:\s+(.*)/) { $domain = $1; } } close($fh); } } else { ## Try /etc/resolv.conf on UNIX if (open($fh, '/etc/resolv.conf')) { while(<$fh>) { if (/search\s+(.*)/) { $domain = $1; last; } } close($fh); } } } } } return $domain; } sub usageAndExit { my($arg) = shift; my($base) = basename($0); if (defined $arg) { print "$arg\n\n"; } print "Usage: $base [ChangeLog File] [user name] [email address]\n" . " " . (' ' x length($base)) . "[-d ]\n\n" . " Uses cvs to determine which files are modified or added\n" . " and generates a bare ChangeLog entry based on those files.\n" . " This script should be run at the same directory level in\n" . " which the ChangeLog exists. The entry is prepended to the\n" . " existing ChangeLog.\n" . "\n" . " Email addresses are generated with a certain set of\n" . " defaults and can be modified using various environment\n" . " variables. By default email addresses are generated\n" . " using the user last name followed by an underscore and\n" . " the first initial of the user first name followed by the\n" . " email domain.\n" . "\n" . " REPLYTO If this environment variable is set, the value\n" . " is used as the email address.\n" . " CL_USERNAME This environment variable is used to override\n" . " the user name (obtained from the password file).\n" . " CL_CHANGELOG_FILE This environment variable is used as the\n". " [ChangeLog File] argument if none is given\n". " on the command line.\n". "\n" . " The user name and email address can be passed as a parameter to\n" . " this script. If either is not passed, then the script will try\n" . " to determine it automatically.\n" . "\n" . " If -d is used, everything on the command line after it is\n" . " considered a directory or file to be considered in the\n" . " ChangeLog entry.\n"; exit(0); } # ************************************************************ # Subroutine Section # ************************************************************ my($file) = undef; my($name) = undef; my($email) = undef; my(@dirs) = (); my($restdirs) = 0; foreach my $arg (@ARGV) { if ($restdirs) { push(@dirs, $arg); } elsif ($arg eq '-h') { usageAndExit(); } elsif ($arg eq '-d') { $restdirs = 1; } elsif ($arg =~ /^\-/) { usageAndExit("Unrecognized parameter: $arg"); } elsif (!defined $file) { $file = $arg; } elsif (!defined $name) { $name = $arg; } elsif (!defined $email) { $email = $arg; } } if (!defined $file) { if (defined $ENV{CL_CHANGELOG_FILE}) { $file = $ENV{CL_CHANGELOG_FILE}; } else { $file = 'ChangeLog'; } } if (!defined $name) { my(@pwd) = (); if (defined $ENV{CL_USERNAME}) { $pwd[6] = $ENV{CL_USERNAME}; } else { if ($^O eq 'MSWin32' || $^O eq 'cygwin') { $pwd[6] = 'unknown'; } else { @pwd = getpwuid($<); $pwd[6] =~ s/,//g; } } $name = $pwd[6]; } if (!defined $email) { my($trans) = new EmailTranslator(getDefaultDomain()); $email = $trans->translate($name); } my($editor) = new ChangeLogEdit($name, $email); my($status, $error, $unknown) = $editor->edit($file, @dirs); if (defined $unknown) { my(@uarray) = @$unknown; if ($#uarray >= 0) { print "WARNING: The following files are unknown to the ", "revision control system:\n"; foreach my $unk (@uarray) { print "$unk\n"; } print "\n"; } } if ($status) { print "You are now ready to edit the $file.\n"; } else { print "$error\n"; } exit($status ? 0 : 1); ace-6.4.5+dfsg.orig/bin/inspxe-cl.sup0000644000175000017500000000504513154167357015503 0ustar tggtggsuppression = { type = {thread_start} stacks = { { !!!; func=_start,mod=ld-linux-x86-64.so.2,line=4496,func_line=4496; } } } suppression = { type = {uninitialized_memory_access} stacks = { allocation={ !!!; func=call_init,mod=ld-linux-x86-64.so.2,src=dl-init.c,line=84,func_line=50; } { !!!; func=strlen,mod=libc.so.6,src=strlen.S,line=205,func_line=139; } } } suppression = { type = {uninitialized_memory_access} stacks = { allocation={ !!!; func=call_init,mod=ld-linux-x86-64.so.2,src=dl-init.c,line=84,func_line=50; } { !!!; func=strlen,mod=libc.so.6,src=strlen.S,line=206,func_line=140; } } } suppression = { type = {uninitialized_memory_access} stacks = { allocation={ !!!; func=__libc_start_main,mod=libc.so.6,src=libc-start.c,line=269,func_line=150; } { !!!; func=strlen,mod=libc.so.6,src=strlen.S,line=205,func_line=139; } } } suppression = { type = {uninitialized_memory_access} stacks = { allocation={ !!!; func=__libc_start_main,mod=libc.so.6,src=libc-start.c,line=269,func_line=150; } { !!!; func=strlen,mod=libc.so.6,src=strlen.S,line=206,func_line=140; } } } suppression = { type = {uninitialized_memory_access} stacks = { allocation={ !!!; func=__libc_start_main,mod=libc.so.6,src=libc-start.c,line=269,func_line=150; } { !!!; func=strlen,mod=libc.so.6,src=strlen.S,line=204,func_line=138; } } } suppression = { type = {invalid_memory_access} stacks = { { !!!; func=strlen,mod=libc.so.6,src=strlen.S,line=137,func_line=71; } } } suppression = { type = {invalid_memory_access} stacks = { { !!!; func=__get_nprocs,mod=libc.so.6,src=getsysstats.c,line=132,func_line=5; } } } suppression = { type = {uninitialized_memory_access} stacks = { allocation={ !!!; func=__libc_start_main,mod=libc.so.6,src=libc-start.c,line=269,func_line=150; } { !!!; func=strlen,mod=libc.so.6,src=strlen.S,line=216,func_line=150; } } } suppression = { type = {uninitialized_memory_access} stacks = { allocation={ !!!; func=__libc_start_main,mod=libc.so.6,src=libc-start.c,line=269,func_line=150; } { !!!; func=strlen,mod=libc.so.6,src=strlen.S,line=217,func_line=151; } } } suppression = { type = {unreachable_memory_leak} stacks = { allocation={ !!!; func=strsignal,mod=libc.so.6,src=strsignal.c,line=56,func_line=15; } } } suppression = { type = {reachable_memory_leak} stacks = { allocation={ !!!; func=__cxa_finalize,mod=libc.so.6,src=cxa_finalize.c,line=56,func_line=26; } } } ace-6.4.5+dfsg.orig/bin/make_release.py0000755000175000017500000010422413154167357016041 0ustar tggtgg#!/usr/bin/python # -*- coding: utf-8 -*- # @file make_release.py # @author William R. Otte # # Packaging script for ACE/TAO from __future__ import with_statement from time import strftime import re import tempfile import shutil import subprocess import shlex import multiprocessing ################################################## #### Global variables ################################################## """ Options from the command line """ opts=None """ Arguments from the command line """ args=None """ Absolute path from the git workspace to be used for the release""" doc_root=None """ A dict containing version information used for the release. This dict contains entries of the form COMPONENT_version COMPONENT_micro COMPONENT_minor COMPONENT_major COMPONENT_code """ comp_versions = dict () old_comp_versions = dict () release_date = strftime (# ie: Mon Jan 23 00:35:37 CST 2006 "%a %b %d %H:%M:%S %Z %Y") cpu_count = multiprocessing.cpu_count() # Packaging configuration """ This is a regex that detects files that SHOULD NOT have line endings converted to CRLF when being put into a ZIP file """ bin_regex = re.compile ("\.(mak|mdp|ide|exe|ico|gz|zip|xls|sxd|gif|vcp|vcproj|vcw|sln|dfm|jpg|png|vsd|bz2|pdf|ppt|graffle|pptx|odt|sh)$") ################################################## #### Utility Methods ################################################## def parse_args (): from optparse import OptionParser parser = OptionParser ("usage %prog [options]") parser.add_option ("--major", dest="release_type", action="store_const", help="Create a major release.", default=None, const="major") parser.add_option ("--minor", dest="release_type", action="store_const", help="Create a minor release.", default=None, const="minor") parser.add_option ("--micro", dest="release_type", action="store_const", help="Create a micro release.", default=None, const="micro") parser.add_option ("--tag", dest="tag", action="store_true", help="Tag the repositorie with all needed tags", default=False) parser.add_option ("--update", dest="update", action="store_true", help="Update the version numbers", default=False) parser.add_option ("--push", dest="push", action="store_true", help="Push all changes to remote", default=False) parser.add_option ("--kit", dest="action", action="store_const", help="Create kits. DO NOT USE WITH --tag", default=None, const="kit") parser.add_option ("--dest", dest="package_dir", action="store", help="Specify destination for the created packages.", default=None) parser.add_option ("--root", dest="repo_root", action="store", help="Specify an alternate repository root", default="https://github.com/DOCGroup/ACE_TAO.git") parser.add_option ("--mpc_root", dest="mpc_root", action="store", help="Specify an alternate MPC repository root", default="https://github.com/DOCGroup/MPC.git") parser.add_option ("-n", dest="take_action", action="store_false", help="Take no action", default=True) parser.add_option ("--verbose", dest="verbose", action="store_true", help="Print out actions as they are being performed", default=False) (options, arguments) = parser.parse_args () if options.tag: if options.release_type is None: parser.error ("When tagging, must specify a release type") if options.update is False: print "Warning: You are tagging a release, but not requesting a version increment" if options.push is False: print "Warning: You are tagging a release, but not requesting a push to remote" return (options, arguments) def ex (command): from os import system global opts vprint ("Executing " + command) if not opts.take_action: print "Executing " + command return status = system(command) if status != 0: print "ERROR: Nonzero return value from " + command raise Exception ### # Checks that the users environment is sane. # def check_environment (): from os import getenv global doc_root, opts doc_root = getenv ("DOC_ROOT") if (doc_root is None): print "ERROR: Environment DOC_ROOT must be defined." return False return True def vprint (string): """ Prints the supplied message if verbose is enabled""" global opts if opts.verbose: print string ################################################## #### Tagging methods ################################################## def commit (files): """ Commits the supplied list of files to the repository. """ import shutil, os global comp_versions version = "ACE+TAO-%d_%d_%d" % (comp_versions["ACE_major"], comp_versions["ACE_minor"], comp_versions["ACE_micro"]) vprint ("Committing the following files for " + version + " ".join (files)) if opts.take_action: for file in files: print "Adding file " + file + " to commit" ex ("git add " + file) ex ("git commit -m\"" + version + "\"") # print "Checked in files, resuling in revision ", rev.number def check_workspace (): """ Checks that the DOC and MPC repositories are up to date. """ global opts, doc_root try: ex ("cd $DOC_ROOT/ACE_TAO && git pull -p") print "Successfully updated ACE/TAO working copy" except: print "Unable to update ACE/TAO workspace at " + doc_root raise try: ex ("cd $DOC_ROOT/MPC && git pull -p") print "Successfully updated MPC working copy to revision " except: print "Unable to update the MPC workspace at " + doc_root + "/ACE/MPC" raise vprint ("Repos root URL = " + opts.repo_root + "\n") vprint ("Repos MPC root URL = " + opts.mpc_root + "\n") def update_version_files (component): """ Updates the version files for a given component. This includes Version.h, the PRF, and the VERSION file.""" global comp_versions, opts, release_date vprint ("Updating version files for " + component) import re retval = list () ## Update component/VERSION with open (component + "/VERSION", "r+") as version_file: new_version = re.sub (component + " version .*", "%s version %s, released %s" % (component, comp_versions[component + "_version"], release_date), version_file.read ()) if opts.take_action: version_file.seek (0) version_file.truncate (0) version_file.write (new_version) else: print "New version file for " + component print new_version vprint ("Updating Version.h for " + component) retval += [component + "/VERSION"] ## Update component/component/Version.h version_header = """ // -*- C++ -*- // This is file was automatically generated by $ACE_ROOT/bin/make_release.py #define %s_MAJOR_VERSION %s #define %s_MINOR_VERSION %s #define %s_MICRO_VERSION %s #define %s_BETA_VERSION %s #define %s_VERSION \"%s\" #define %s_VERSION_CODE %s #define %s_MAKE_VERSION_CODE(a,b,c) (((a) << 16) + ((b) << 8) + (c)) """ % (component, comp_versions[component + "_major"], component, comp_versions[component + "_minor"], component, comp_versions[component + "_micro"], component, comp_versions[component + "_micro"], component, comp_versions[component + "_version"], component, comp_versions[component + "_code"], component) if opts.take_action: with open (component + '/' + component.lower () + "/Version.h", 'r+') as version_h: version_h.write (version_header) else: print "New Version.h for " + component print version_header retval += [component + '/' + component.lower () + "/Version.h"] # Update component/PROBLEM-REPORT-FORM vprint ("Updating PRF for " + component) version_string = re.compile ("^\s*(\w+) +VERSION ?:") with open (component + "/PROBLEM-REPORT-FORM", 'r+') as prf: new_prf = "" for line in prf.readlines (): match = None match = version_string.search (line) if match is not None: vprint ("Found PRF Version for " + match.group (1)) line = re.sub ("(\d\.)+\d?", comp_versions[match.group(1) + "_version"], line) new_prf += line if opts.take_action: prf.seek (0) prf.truncate (0) prf.writelines (new_prf) else: print "New PRF for " + component print "".join (new_prf) retval += [component + "/PROBLEM-REPORT-FORM"] return retval def update_spec_file (): global comp_versions, opts with open (doc_root + "/ACE_TAO/ACE/rpmbuild/ace-tao.spec", 'r+') as spec_file: new_spec = "" for line in spec_file.readlines (): if line.find ("define ACEVER ") is not -1: line = "%define ACEVER " + comp_versions["ACE_version"] + "\n" if line.find ("define TAOVER ") is not -1: line = "%define TAOVER " + comp_versions["TAO_version"] + "\n" if line.find ("define is_major_ver") is not -1: if opts.release_type == "micro": line = "%define is_major_ver 0\n" else: line = "%define is_major_ver 1\n" new_spec += line if opts.take_action: spec_file.seek (0) spec_file.truncate (0) spec_file.writelines (new_spec) else: print "New spec file:" print "".join (new_spec) return [doc_root + "/ACE_TAO/ACE/rpmbuild/ace-tao.spec"] def update_debianbuild (): """ Updates ACE_ROOT/debian directory. - renames all files with version nrs in name to new scheme. - updates version nrs in file debian/control Currently ONLY ACE & TAO stuff is handled here """ global comp_versions import glob import re from os.path import basename from os.path import dirname from os.path import join files = list () prev_ace_ver = None prev_tao_ver = None # rename files mask = re.compile ("(libace|libkokyu|libnetsvcs)(.*)(\d+\.\d+\.\d+)(.*)") tao = re.compile ("tao", re.IGNORECASE) for fname in glob.iglob(doc_root + '/ACE_TAO/ACE/debian/*'): print "Considering " + fname match = None fbase = basename (fname) match = mask.search (fbase) fnewname = None if match is not None: if tao.search (fbase) is not None: fnewname = join (dirname (fname), match.group (1) + match.group (2) + comp_versions["TAO_version"] + match.group (4)) prev_tao_ver = match.group (3) else: fnewname = join (dirname (fname), match.group (1) + match.group (2) + comp_versions["ACE_version"] + match.group (4)) prev_ace_ver = match.group (3) print prev_ace_ver # print prev_tao_var if fnewname is not None: if opts.take_action: print "Rename: " + fname + " to " + fnewname + "\n" ex ("git mv " + fname + " " + fnewname) else: print "Rename: " + fname + " to " + fnewname + "\n" # update debianbuild/control def update_ver (match): if match.group (1) == 'libtao': return match.group (1) + match.group (2) + comp_versions["TAO_version"] + match.group (4) else: return match.group (1) + match.group (2) + comp_versions["ACE_version"] + match.group (4) with open (doc_root + "/ACE_TAO/ACE/debian/debian.control", 'r+') as control_file: new_ctrl = "" for line in control_file.readlines (): if re.search ("^(Package|Depends|Suggests):", line) is not None: line = mask.sub (update_ver, line) elif re.search ('^Replaces:', line) is not None: print comp_versions["ACE_version"] line = line.replace (prev_ace_ver, comp_versions["ACE_version"]) new_ctrl += line if opts.take_action: control_file.seek (0) control_file.truncate (0) control_file.writelines (new_ctrl) else: print "New control file:" print "".join (new_ctrl) files.append (doc_root + "/ACE_TAO/ACE/debian/debian.control") # rewrite debian/dsc dsc_lines = """Format: 1.0 Source: ACE+src-%s Version: %s Binary: ace Maintainer: Johnny Willemsen Architecture: any Build-Depends: gcc, make, g++, debhelper (>= 5), dpkg-dev, libssl-dev (>= 0.9.7d), dpatch (>= 2.0.10), libxt-dev (>= 4.3.0), libfltk1.1-dev (>= 1.1.4), libqt4-dev (>= 4.4~rc1-4), tk-dev, docbook-to-man, autoconf, automake, libtool, autotools-dev, doxygen, graphviz, libfox-1.6-dev Files: 65b34001c9605f056713a7e146b052d1 46346654 ACE-src-%s.tar.gz """ % (comp_versions["ACE_version"], comp_versions["TAO_version"], comp_versions["ACE_version"]) if opts.take_action: with open (doc_root + "/ACE_TAO/ACE/debian/ace.dsc", 'r+') as dsc_file: dsc_file.seek (0) dsc_file.truncate (0) dsc_file.writelines (dsc_lines) else: print "New dsc file:\n" print dsc_lines files.append (doc_root + "/ACE_TAO/ACE/debian/ace.dsc") return files def get_and_update_versions (): """ Gets current version information for each component, updates the version files, creates changelog entries, and commit the changes into the repository.""" global comp_versions, opts try: get_comp_versions ("ACE") get_comp_versions ("TAO") if opts.update: files = list () files += update_version_files ("ACE") files += update_version_files ("TAO") files += create_changelog ("ACE") files += create_changelog ("TAO") files += update_spec_file () files += update_debianbuild () print "Committing " + str(files) commit (files) except: print "Fatal error in get_and_update_versions." raise def create_changelog (component): """ Creates a changelog entry for the supplied component that includes the version number being released""" vprint ("Creating ChangeLog entry for " + component) global old_comp_versions, comp_versions, opts old_tag = "ACE+TAO-%d_%d_%d" % (old_comp_versions["ACE_major"], old_comp_versions["ACE_minor"], old_comp_versions["ACE_micro"]) # Generate changelogs per component ex ("cd $DOC_ROOT/ACE_TAO && git log " + old_tag + "..HEAD " + component + " > " + component + "/ChangeLogs/" + component + "-" + comp_versions[component + "_version_"]) return ["%s/ChangeLogs/%s-%s" % (component, component, comp_versions[component + "_version_"])] def get_comp_versions (component): """ Extracts the current version number from the VERSION file and increments it appropriately for the release type requested.""" vprint ("Detecting current version for " + component) import re global old_comp_versions, comp_versions, opts micro = re.compile ("version (\d+)\.(\d+)\.(\d+)") minor = re.compile ("version (\d+)\.(\d+)[^\.]") major = re.compile ("version (\d+)[^\.]") with open (component + "/VERSION") as version_file: for line in version_file: match = None match = micro.search (line) if match is not None: vprint ("Detected micro version %s.%s.%s" % (match.group (1), match.group (2), match.group (3))) comp_versions[component + "_major"] = int (match.group (1)) comp_versions[component + "_minor"] = int (match.group (2)) comp_versions[component + "_micro"] = int (match.group (3)) break match = minor.search (line) if match is not None: vprint ("Detected minor version %s.%s" % (match.group (1), match.group (2))) comp_versions[component + "_major"] = int (match.group (1)) comp_versions[component + "_minor"] = int (match.group (2)) comp_versions[component + "_micro"] = 0 break match = major.search (line) if match is not None: vprint ("Detected major version " + match.group (1) + ".0") comp_versions[component + "_major"] = int (match.group (1)) comp_versions[component + "_minor"] = 0 comp_versions[component + "_micro"] = 0 break print "FATAL ERROR: Unable to locate current version for " + component raise Exception # Also store the current release (old from now) old_comp_versions[component + "_major"] = comp_versions[component + "_major"] old_comp_versions[component + "_minor"] = comp_versions[component + "_minor"] old_comp_versions[component + "_micro"] = comp_versions[component + "_micro"] if opts.update: if opts.release_type == "major": comp_versions[component + "_major"] += 1 comp_versions[component + "_minor"] = 0 comp_versions[component + "_micro"] = 0 elif opts.release_type == "minor": comp_versions[component + "_minor"] += 1 comp_versions[component + "_micro"] = 0 elif opts.release_type == "micro": comp_versions[component + "_micro"] += 1 #if opts.release_type == "micro": comp_versions [component + "_version"] = \ str (comp_versions[component + "_major"]) + '.' + \ str (comp_versions[component + "_minor"]) + '.' + \ str (comp_versions[component + "_micro"]) comp_versions [component + "_version_"] = \ str (comp_versions[component + "_major"]) + '_' + \ str (comp_versions[component + "_minor"]) + '_' + \ str (comp_versions[component + "_micro"]) comp_versions [component + "_code"] = \ str((comp_versions[component + "_major"] << 16) + \ (comp_versions[component + "_minor"] << 8) + \ comp_versions[component + "_micro"]) old_comp_versions [component + "_version"] = \ str (old_comp_versions[component + "_major"]) + '.' + \ str (old_comp_versions[component + "_minor"]) + '.' + \ str (old_comp_versions[component + "_micro"]) old_comp_versions [component + "_version_"] = \ str (old_comp_versions[component + "_major"]) + '_' + \ str (old_comp_versions[component + "_minor"]) + '_' + \ str (old_comp_versions[component + "_micro"]) if opts.update: vprint ("Updating from version %s to version %s" % (old_comp_versions [component + "_version"], comp_versions [component + "_version"])) else: vprint ("Found version %s" % (comp_versions [component + "_version"])) # else: # comp_versions [component + "_version"] = \ # str (comp_versions[component + "_major"]) + '.' + \ # str (comp_versions[component + "_minor"]) def update_latest_tag (which, branch): """ Update one of the Latest_* tags externals to point the new release """ global opts tagname = "Latest_" + which # Remove tag locally vprint ("Removing tag %s" % (tagname)) ex ("cd $DOC_ROOT/ACE_TAO && git tag -d " + tagname) vprint ("Placing tag %s" % (tagname)) ex ("cd $DOC_ROOT/ACE_TAO && git tag -a " + tagname + " -m\"" + tagname + "\"") def push_latest_tag (which, branch): """ Update one of the Latest_* tags externals to point the new release """ global opts tagname = "Latest_" + which if opts.push: # Remove tag in the remote orgin ex ("cd $DOC_ROOT/ACE_TAO && git push origin :refs/tags/" + tagname) vprint ("Pushing tag %s" % (tagname)) ex ("cd $DOC_ROOT/ACE_TAO && git push origin " + tagname) def tag (): """ Tags the DOC and MPC repositories for the version and push that remote """ global comp_versions, opts tagname = "ACE+TAO-%d_%d_%d" % (comp_versions["ACE_major"], comp_versions["ACE_minor"], comp_versions["ACE_micro"]) if opts.tag: if opts.take_action: vprint ("Placing tag %s on ACE_TAO" % (tagname)) ex ("cd $DOC_ROOT/ACE_TAO && git tag -a " + tagname + " -m\"" + tagname + "\"") vprint ("Placing tag %s on MPC" % (tagname)) ex ("cd $DOC_ROOT/MPC && git tag -a " + tagname + " -m\"" + tagname + "\"") # Update latest tag if opts.release_type == "major": update_latest_tag ("Major", tagname) elif opts.release_type == "minor": update_latest_tag ("Minor", tagname) elif opts.release_type == "micro": update_latest_tag ("Beta", tagname) update_latest_tag ("Micro", tagname) else: vprint ("Placing tag %s on ACE_TAO" % (tagname)) vprint ("Placing tag %s on MPC" % (tagname)) print "Creating tags:\n" print "Placing tag " + tagname + "\n" def push (): """ Tags the DOC and MPC repositories for the version and push that remote """ global comp_versions, opts tagname = "ACE+TAO-%d_%d_%d" % (comp_versions["ACE_major"], comp_versions["ACE_minor"], comp_versions["ACE_micro"]) if opts.push: if opts.take_action: vprint ("Pushing ACE_TAO master to origin") ex ("cd $DOC_ROOT/ACE_TAO && git push origin master") vprint ("Pushing tag %s on ACE_TAO" % (tagname)) ex ("cd $DOC_ROOT/ACE_TAO && git push origin tag " + tagname) vprint ("Pushing tag %s on MPC" % (tagname)) ex ("cd $DOC_ROOT/MPC && git push origin tag " + tagname) # Update latest tag if opts.release_type == "major": push_latest_tag ("Major", tagname) elif opts.release_type == "minor": push_latest_tag ("Minor", tagname) elif opts.release_type == "micro": push_latest_tag ("Beta", tagname) push_latest_tag ("Micro", tagname) else: vprint ("Pushing tag %s on ACE_TAO" % (tagname)) vprint ("Pushing tag %s on MPC" % (tagname)) print "Pushing tags:\n" print "Pushing tag " + tagname + "\n" ################################################## #### Packaging methods ################################################## def export_wc (stage_dir): global doc_root, comp_versions tag = "ACE+TAO-%d_%d_%d" % (comp_versions["ACE_major"], comp_versions["ACE_minor"], comp_versions["ACE_micro"]) # Clone the ACE repository with the needed tag print ("Retrieving ACE with tag " + tag) ex ("git clone --depth 1 --branch " + tag + " " + opts.repo_root + " " + stage_dir + "/ACE_TAO") # Clone the MPC repository with the needed tag print ("Retrieving MPC with tag " + tag) ex ("git clone --depth 1 --branch " + tag + " " + opts.mpc_root + " " + stage_dir + "/MPC") # Setting up stage_dir print ("Moving ACE") ex ("mv " + stage_dir + "/ACE_TAO/ACE " + stage_dir + "/ACE_wrappers") print ("Moving TAO") ex ("mv " + stage_dir + "/ACE_TAO/TAO " + stage_dir + "/ACE_wrappers/TAO") print ("Moving MPC") ex ("mv " + stage_dir + "/MPC " + stage_dir + "/ACE_wrappers/MPC") def update_packages (text_files, bin_files, stage_dir, package_dir): import os print "Updating packages...." os.chdir (stage_dir) # -g appends, -q for quiet operation zip_base_args = " -gqu " # -l causes line ending conversion for windows zip_text_args = " -l " zip_file = stage_dir + "/zip-archive.zip" # -r appends, -f specifies file. tar_args = "-uf " tar_file = stage_dir + "/tar-archive.tar" # Zip binary files print "\tAdding binary files to zip...." p = subprocess.Popen (shlex.split ("xargs zip " + zip_base_args + zip_file), stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True) instream, outstream = (p.stdin, p.stdout) instream.write (bin_files) instream.close () outstream.close () # Need to wait for zip process spawned by popen2 to complete # before proceeding. os.wait () print "\tAdding text files to zip....." p = subprocess.Popen (shlex.split ("xargs zip " + zip_base_args + zip_text_args + zip_file), stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True) instream, outstream = (p.stdin, p.stdout) instream.write (text_files) instream.close () outstream.close () # Need to wait for zip process spawned by popen2 to complete # before proceeding. os.wait () # Tar files print "\tAdding to tar file...." if (not os.path.exists (tar_file)): open(tar_file, 'w').close () p = subprocess.Popen (shlex.split ("xargs tar " + tar_args + tar_file), stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True) instream, outstream = (p.stdin, p.stdout) instream.write (' ' + bin_files + ' ' + text_files) instream.close () print outstream.read () outstream.close () os.wait () def move_packages (name, stage_dir, package_dir): """ Copies the temporary files from the stage_dir to the package_dir. Renames them to name.tar and name.zip, respectively, and compresses the tarfile with gzip and bzip2. """ import shutil, os from os.path import join print "Storing packages for ", name # Take care of the zip file print "\tZip file..." target_file = join (package_dir, name + ".zip") shutil.copy (join (stage_dir, "zip-archive.zip"), target_file) ex ("md5sum " + target_file + " > " + target_file + ".md5") tar_file = join (stage_dir, "tar-archive.tar") target_file = join (package_dir, name + ".tar") # bzip print "\tBzip2 file....." shutil.copy (tar_file, target_file) ex ("bzip2 " + target_file) ex ("md5sum " + target_file + ".bz2 > " + target_file + ".bz2.md5") print "\tgzip file....." shutil.copy (tar_file, target_file) ex ("gzip " + target_file) ex ("md5sum " + target_file + ".gz > " + target_file + ".gz.md5") def create_file_lists (base_dir, prefix, exclude): """ Creates two lists of files: files that need CR->CRLF conversions (useful for zip files) and those that don't, excluding filies/directories found in exclude. """ import os text_files = list () bin_files = list () for root, dirs, files in os.walk (base_dir, topdown=True): # print "root", root relroot = root.replace (base_dir, "") # print "relroot", relroot if len(relroot) and relroot[0] == '/': relroot = relroot [1:] excluded = False for item in exclude: dir_item = item + '/' if relroot.startswith (dir_item) or relroot.startswith (item): # print "excluding", relroot excluded = True # else: # print relroot, "does not start with", dir_item, "or", item if excluded: continue # Remove dirs that are listed in our exclude pattern for item in dirs: # print "item", item # Remove our excludes if (item) in exclude: # print "Removing " + item + " from consideration...." dirs.remove (item) # Remove files that are listed in our exclude pattern for item in files: fullitem = os.path.join (relroot, item) if fullitem in exclude or item in exclude: # print "Removing " + fullitem + " from consideration...." continue else: if bin_regex.search (fullitem) is not None: bin_files.append ('"' + os.path.join (prefix, fullitem) + '"') else: text_files.append ('"' + os.path.join (prefix, fullitem) + '"') return (text_files, bin_files) def write_file_lists (comp, text, bin): outfile = open (comp + ".files", 'w') outfile.write ("\n".join (text)) outfile.write (".............\nbin files\n.............\n") outfile.write ("\n".join (bin)) outfile.close () def package (stage_dir, package_dir, decorator): """ Packages ACE, ACE+TAO releases of current staged tree, with decorator appended to the name of the archive. """ from os.path import join from os import remove from os import chdir chdir (stage_dir) text_files = list () bin_files = list () # Erase our old temp files try: # print "removing files", join (stage_dir, "zip-archive.zip"), join (stage_dir, "tar-archive.tar") remove (join (stage_dir, "zip-archive.zip")) remove (join (stage_dir, "tar-archive.tar")) except: print "error removing files", join (stage_dir, "zip-archive.zip"), join (stage_dir, "tar-archive.tar") pass # swallow any errors text_files, bin_files = create_file_lists (join (stage_dir, "ACE_wrappers"), "ACE_wrappers", ["TAO", ".gitignore", ".git"]) # write_file_lists ("fACE" + decorator, text_files, bin_files) update_packages ("\n".join (text_files), "\n".join (bin_files), stage_dir, package_dir) move_packages ("ACE" + decorator, stage_dir, package_dir) text_files = list () bin_files = list () # for TAO: text_files, bin_files = create_file_lists (join (stage_dir, "ACE_wrappers/TAO"), "ACE_wrappers/TAO", [".gitignore", ".git"]) # write_file_lists ("fTAO" + decorator, text_files, bin_files) update_packages ("\n".join (text_files), "\n".join (bin_files), stage_dir, package_dir) move_packages ("ACE+TAO" + decorator, stage_dir, package_dir) def generate_workspaces (stage_dir): """ Generates workspaces in the given stage_dir """ print "Generating workspaces..." global opts import os # Make sure we are in the right directory... os.chdir (os.path.join (stage_dir, "ACE_wrappers")) # Set up our environment os.putenv ("ACE_ROOT", os.path.join (stage_dir, "ACE_wrappers")) os.putenv ("MPC_ROOT", os.path.join (stage_dir, "ACE_wrappers", "MPC")) os.putenv ("TAO_ROOT", os.path.join (stage_dir, "ACE_wrappers", "TAO")) os.putenv ("CIAO_ROOT", "") os.putenv ("DANCE_ROOT", "") os.putenv ("DDS_ROOT", "") # Create option strings mpc_command = os.path.join (stage_dir, "ACE_wrappers", "bin", "mwc.pl") exclude_option = ' -exclude TAO/TAO_*.mwc ' workers_option = ' -workers ' + str(cpu_count) mpc_option = ' -recurse -hierarchy -relative ACE_ROOT=' + stage_dir + '/ACE_wrappers ' mpc_option += ' -relative TAO_ROOT=' + stage_dir + '/ACE_wrappers/TAO ' msvc_exclude_option = ' ' vc12_option = ' -name_modifier *_vc12 ' vc14_option = ' -name_modifier *_vc14 ' vs2017_option = ' -name_modifier *_vs2017 ' redirect_option = str () if not opts.verbose: redirect_option = " >> ../mpc.log 2>&1" print "\tGenerating GNUmakefiles...." ex (mpc_command + " -type gnuace " + exclude_option + workers_option + mpc_option + redirect_option) print "\tGenerating VC12 solutions..." ex (mpc_command + " -type vc12 " + msvc_exclude_option + mpc_option + workers_option + vc12_option + redirect_option) print "\tGenerating VC14 solutions..." ex (mpc_command + " -type vc14 " + msvc_exclude_option + mpc_option + workers_option + vc14_option + redirect_option) print "\tGenerating VS2017 solutions..." ex (mpc_command + " -type vs2017 " + msvc_exclude_option + mpc_option + workers_option + vs2017_option + redirect_option) print "\tCorrecting permissions for all generated files..." ex ("find ./ -name '*.vc[p,w]' -or -name '*.bmak' -or -name '*.vcproj' -or -name '*.sln' -or -name '*.vcxproj' -or -name '*.filters' -or -name 'GNUmake*' | xargs chmod 0644") def create_kit (): """ Creates kits """ import os from os.path import join # Get version numbers for this working copy, note this will # not update the numbers. print "Getting current version information...." get_comp_versions ("ACE") get_comp_versions ("TAO") print "Creating working directories...." stage_dir, package_dir = make_working_directories () print "Exporting working copy..." export_wc (stage_dir) ### make source only packages package (stage_dir, package_dir, "-src") generate_workspaces (stage_dir) ### create standard packages. package (stage_dir, package_dir, "") def make_working_directories (): """ Creates directories that we will be working in. In particular, we will have DOC_ROOT/stage-PID and DOC_ROOT/packages-PID """ global doc_root import os.path, os stage_dir = os.path.join (doc_root, "stage-" + str (os.getpid ())) package_dir = os.path.join (doc_root, "package-" + str (os.getpid ())) os.mkdir (stage_dir) os.mkdir (package_dir) return (stage_dir, package_dir) def main (): global opts if opts.action == "kit": print "Creating a kit." raw_input ("Press enter to continue") create_kit () else: print "Making a " + opts.release_type + " release." raw_input ("Press enter to continue") get_and_update_versions () tag () push () if __name__ == "__main__": (opts, args) = parse_args () if check_environment() is not True: exit (1) main () ace-6.4.5+dfsg.orig/bin/generate_compile_stats.sh0000755000175000017500000007555013154167357020137 0ustar tggtgg#! /bin/sh # # This script generate metrics html pages for either compile times or # footprint. # # Compile times: # Parse the build.txt file from an autobuild that was generated with the # g++_metric.sh script, e.g., with CXX=g++_metric.sh which outputs # compile times on a per object basis, and use the data to generate time # series graphs with gnuplot. # # Footprint: # Parse the build.txt file and and the *.map files, generated with LDFLAGS # set to =-Xlinker -M -Xlinker -Map -Xlinker \$@.map and static_libs_only=1. # # For use with an autobuild, place a line something like this in the xml file, # after the log file is closed, but before it's moved. # # # ############################################################################### # # usage # ############################################################################### usage () { echo "Usage: `basename $0` [--base=] [--name=] [--compiler=compiler]" echo " [target_file]" echo " [Footprint|Compilation] [] []" echo "" echo "--base This option can be used to set the base root directory to" echo " something other than the default \$ACE_ROOT." echo "--name This option can be used to set the software title to something" echo " other than the default ACE+TAO+CIAO+DAnCE." echo "--compiler This option can be used to set the compiler to something" echo " other than the default gcc." echo "input_file This is the compilation log file." echo "destination_directory This designates the location of the generated html." echo "target_file This is similar to input_file, but should contain no errors." echo "date Set the date used in all generated html pages." echo "fudge_factor Add the specified number of seconds to the compilation time" echo " for each target." echo "" echo "Options must be specified in the order shown above." exit } ############################################################################### # # parse_time # # this only works for english # assumes the date is formatted like this: Sat Apr 12 18:19:31 UTC 2003 # and outputs this: 2003/04/12-18:19 # ############################################################################### parse_time () { # todo: add a format parameter local INDEX=0 local PT_MONTH="" local PT_DAY="" local PT_YEAR="" local PT_HOUR="" local PT_MINUTE="" local PT_SECOND="" local PT_TIMEZONE="" read -a line for token in "${line[@]}"; do #echo "$INDEX = $token" case $INDEX in 1 ) case $token in Jan ) PT_MONTH="01" ;; Feb ) PT_MONTH="02" ;; Mar ) PT_MONTH="03" ;; Apr ) PT_MONTH="04" ;; May ) PT_MONTH="05" ;; Jun ) PT_MONTH="06" ;; Jul ) PT_MONTH="07" ;; Aug ) PT_MONTH="08" ;; Sep ) PT_MONTH="09" ;; Oct ) PT_MONTH="10" ;; Nov ) PT_MONTH="11" ;; Dec ) PT_MONTH="12" ;; esac ;; 2 ) PT_DAY="$token" ;; 3 ) PT_HOUR="${token%%:*}" PT_MINUTE="${token%:*}" PT_MINUTE="${PT_MINUTE#*:}" PT_SECOND="${token##*:}" ;; 4 ) PT_TIMEZONE="$token" ;; 5 ) PT_YEAR="$token" ;; esac let INDEX=$INDEX+1 done if [ "$1" = "debug" ]; then echo "month = $PT_MONTH" echo "day = $PT_DAY" echo "year = $PT_YEAR" echo "hour = $PT_HOUR" echo "min = $PT_MINUTE" echo "sec = $PT_SECOND" echo "tz = $PT_TIMEZONE" fi echo "$PT_YEAR/$PT_MONTH/$PT_DAY-$PT_HOUR:$PT_MINUTE" } ############################################################################### # # strip_date # # grab date from line with following format: # ################### End [Fri Apr 11 00:18:31 2003 UTC] # and return it in this format: Fri Apr 11 00:18:31 UTC 2003 which is # what parse_time() expects # ############################################################################### strip_date () { local INDEX=0 local TEMP_DATE="" local DATE="" read -a line for token in "${line[@]}"; do #echo "$INDEX = $token" case $INDEX in 2 ) DATE=${token#[} ;; 7 ) DATE="$DATE ${token%]} $TEMP_DATE" ;; # this is a hack since the autobuild scripts don't format the date # correctly... :-( 6 ) TEMP_DATE=$token ;; * ) DATE="$DATE $token" ;; esac let INDEX=$INDEX+1 done echo $DATE } ############################################################################### # # parse # # Parse the commandline and validate the inputs # ############################################################################### parse () { echo "parse()" while [ $# -gt 1 ]; do if [ -n "`echo $1 | grep '^--base=.*'`" ]; then BASE_ROOT=`echo $1 | sed 's/^--base=//'` shift elif [ -n "`echo $1 | grep '^--name=.*'`" ]; then BASE_TITLE=`echo $1 | sed 's/^--name=//'` shift elif [ -n "`echo $1 | grep '^--compiler.*'`" ]; then COMPILER=`echo $1 | sed 's/^--compiler=//'` shift else break fi done # set input file and destination (required) if [ $# -gt 1 ]; then INFILE=$1 DEST=$2 if ! [ -e "$INFILE" ]; then echo "input_file $INFILE does not exist." usage fi else usage fi # set the target file from command line if [ $# -gt 2 ]; then TARGETS=$3 else TARGETS=$INFILE fi # set type of metric from command line if [ $# -gt 3 ]; then METRIC=$4 else METRIC="Compilation" fi echo "metric = ($METRIC)" # set the date from command line if [ $# -gt 4 ]; then DATE=$5 else DATE=`tail -n 1 $INFILE | strip_date | parse_time` fi echo "date = ($DATE)" # set fudge factor from commandline (for testing) if [ $# -gt 5 ]; then FUDGE_FACTOR=$6 else FUDGE_FACTOR=0 fi } ############################################################################### # # gen_chart # # Generate the actual charts and move them to ${DEST} # ############################################################################### gen_chart () { local object=$1 local DEST=$2 local TYPE=$3 local EXT="txt" local YLABEL="Compile Time (Seconds)" local FACTOR=1 local low=$4 local high=$5 if [ "$TYPE" = "Footprint" ]; then EXT="size" if [ ${high} -gt 1024 ]; then YLABEL="Footprint (KBytes)" FACTOR=1024 else YLABEL="Footprint (Bytes)" FACTOR=1 fi fi let low="${low}/${FACTOR}" let high="${high}/${FACTOR}" sort -t'/' -k1n -k2n -k3n ${DEST}/data/${object}.${EXT} | grep -E ^2 > tmp.txt gnuplot <' echo '
' echo '

All the experiments run on the system described below. ' echo 'The machine is running Linux (' if [ -e "/etc/SuSE-release" ]; then cat /etc/SuSE-release fi if [ -e "/etc/redhat-release" ]; then cat /etc/redhat-release fi echo "), and we use " $COMPILER " version " $COMPILER -dumpversion > ${DEST}/compilerversion.txt 2>&1 cat ${DEST}/compilerversion.txt echo ' to compile '$BASE_TITLE'.

' if [ -z "$MPC_ROOT" ]; then MPC_ROOT=$ACE_ROOT/MPC fi CFG_FILES=$ACE_ROOT/ace/config.h if [ -r $ACE_ROOT/bin/MakeProjectCreator/config/default.features ]; then CFG_FILES="$CFG_FILES $ACE_ROOT/bin/MakeProjectCreator/config/default.features" elif [ -r $MPC_ROOT/config/default.features ]; then CFG_FILES="$CFG_FILES $MPC_ROOT/config/default.features" fi CFG_FILES="$CFG_FILES $ACE_ROOT/include/makeinclude/platform_macros.GNU" echo '' for cfg_file in $CFG_FILES; do if [ -r $cfg_file ]; then echo "" echo '' fi done echo '' echo '' echo '' echo '' echo '' echo '
ACE+TAO+CIAO+DAnCE Configuration`basename $cfg_file`
'
      cat $cfg_file
      echo '
CPU Information/proc/cpuinfo
'

  cat /proc/cpuinfo

  echo '
Available Memory/proc/meminfo
'

  cat /proc/meminfo

  echo '
OS Versionuname -a
'

  /bin/uname -a

  echo '
Compiler Version'$COMPILER' -v
' $COMPILER -v > ${DEST}/compiler.txt 2>&1 cat ${DEST}/compiler.txt if [ -e "/lib/libc.so.6" ]; then echo '
Library Version/lib/libc.so.6
'

    /lib/libc.so.6 | sed -e 's//\>/g'
  fi

  echo '
' echo '' } ############################################################################### # # create_page # ############################################################################### create_page () { # always strip off "ACE___" / "TAO___" / "CIAO___" local BASE=$1 local TYPE=$2 local EXT="" local BASE_NAME=${BASE#ACE___} local BASE_NAME=${BASE#TAO___} local BASE_NAME=${BASE#CIAO___} local BASE_NAME=${BASE#DAnCE___} local TITLE="${TYPE} metrics for ${BASE_NAME//___//}" if [ "$TYPE" = "Compilation" ]; then EXT="txt" UNITS="100th's of seconds" else EXT="size" UNITS="Bytes" fi # header echo "" echo "$TITLE" echo '' echo '' echo "

$TITLE


" if [ -e "${DEST}/images/${BASE}_${TYPE}.png" ]; then echo '

' echo "\"$BASE\"

' fi echo "


" echo "

Detail (${DATE})

" echo '' echo '' echo "" echo '' while read i; do if [ -e "${DEST}/data/${i}.${EXT}" ]; then LAST=0 PRE=0 VAL_TMP=0 VAL_INT=0 VAL_SIGN="+" echo '" let PRE=`sort -t'/' -k1n -k2n -k3n ${DEST}/data/${i}.${EXT} | grep -E ^2 | tail -n2 | head -n1 | cut -d" " -f2` let VAL_TMP="((($LAST+1)-($PRE+1))*1000)/($PRE+1)" if [ $VAL_TMP -lt 0 ]; then VAL_SIGN="-" let VAL_TMP="-1*$VAL_TMP" elif [ $VAL_TMP -eq 0 ]; then VAL_SIGN= fi let VAL_INT="$VAL_TMP/10" let VAL_TENTH="$VAL_TMP-($VAL_INT*10)" echo "" echo "" echo "" else echo '" echo "" fi done # for echo '
ObjectLast Compile
Date$UNITS%chgData
' if [ -e "${DEST}/${i}_${TYPE}.html" ]; then # strip off "ACE___" if it exists NAME=${i#ACE___} # strip off "TAO___" if it exists NAME=${i#TAO___} # strip off "CIAO___" if it exists NAME=${i#CIAO___} # strip off "DAnCE___" if it exists NAME=${i#DAnCE___} echo "${NAME//___//}" elif [ -e "${DEST}/images/${i}_${TYPE}.png" ]; then # since you'll only have images if it's a composite, strip off the # path for the name if [ "$TYPE" = "Footprint" ]; then # if we are doing footprint, add library llib=`grep -e "lib.*\.a" ${DEST}/size_composites.txt | grep ${i} | awk '{print $1}'` #echo "lib $llib" #llib="${llib% :}" llib="${llib//___//}" NAME="${llib}(${i##*___})" else NAME="${i##*___}" fi echo "${NAME}" else echo "${i##*___}" fi echo '' echo `sort -t'/' -k1n -k2n -k3n ${DEST}/data/${i}.${EXT} | grep -E ^2 | tail -n1 | cut -d" " -f1` let LAST=`sort -t'/' -k1n -k2n -k3n ${DEST}/data/${i}.${EXT} | grep -E ^2 | tail -n1 | cut -d" " -f2` echo "$LAST${VAL_SIGN}${VAL_INT}.${VAL_TENTH}Data
' echo "${i}" echo '' echo '?' echo "???
' # footer echo '' } ############################################################################### # # sort_list # ############################################################################### sort_list () { # sort the dependency files if [ -e ${DEST}/tmp_list ]; then rm ${DEST}/tmp_list fi touch ${DEST}/tmp_list for i in $@; do echo "$i" >> ${DEST}/tmp_list #echo $i done sort -f ${DEST}/tmp_list } ############################################################################### # # create_html # ############################################################################### create_html () { echo "create_html()" local DEST=$1 local TYPE=$2 local ALL_OBJS="" local ACE_OBJS="" local TAO_OBJS="" local CIAO_OBJS="" local DAnCE_OBJS="" while read base colon files; do # create individual page for app/lib sort_list ${files} | create_page ${base} ${TYPE} \ > ${DEST}/${base}_${TYPE}.html if [ "${base}" != "${base#DAnCE}" ]; then DAnCE_OBJS="${DAnCE_OBJS} ${base}" elif [ "${base}" != "${base#CIAO}" ]; then CIAO_OBJS="${CIAO_OBJS} ${base}" elif [ "${base}" != "${base#TAO}" ]; then TAO_OBJS="${TAO_OBJS} ${base}" elif [ "${base}" != "${base#ACE}" ]; then ACE_OBJS="${ACE_OBJS} ${base}" fi ALL_OBJS="${ALL_OBJS} ${base}" done # create main page create_index_page ${TYPE} > ${DEST}/index.html if [ "${TYPE}" = "Compilation" ] || [ "${TYPE}" = "Footprint" ]; then if [ $BASE_TITLE = $DEFAULT_TITLE ]; then name="ace_${TYPE}.html" sort_list ${ACE_OBJS} | create_page "ACE" ${TYPE} > ${DEST}/${name} name="tao_${TYPE}.html" sort_list ${TAO_OBJS} | create_page "TAO" ${TYPE} > ${DEST}/${name} name="ciao_${TYPE}.html" sort_list ${CIAO_OBJS} | create_page "CIAO" ${TYPE} > ${DEST}/${name} name="dance_${TYPE}.html" sort_list ${DAnCE_OBJS} | create_page "DAnCE" ${TYPE} > ${DEST}/${name} else name="all_${TYPE}.html" sort_list ${ALL_OBJS} | create_page $BASE_TITLE ${TYPE} > ${DEST}/${name} fi fi } ############################################################################### # # main program # ############################################################################### INFILE="" DEST="" TARGETS="" DATE="" METRIC="Compilation" FUDGE_FACTOR=0 BASE_ROOT=$ACE_ROOT DEFAULT_TITLE=ACE+TAO+CIAO+DAnCE BASE_TITLE=$DEFAULT_TITLE COMPILER="gcc" parse $@ create_dirs "${DEST}/" create_dirs "${DEST}/" if [ "$METRIC" = "Compilation" ]; then ######################################################## # compile times # grab the compile time metrics for objects only and process them grep "compile time(0):" $INFILE | grep "\.o" | cut -d' ' -f3,4,5 | process_file # Create ${DEST}/composites.txt with entries like this: # tests___OS_Test : tests___OS_Test.o tests___Main.o create_composite_list $TARGETS # compile times cat ${DEST}/composites.txt | rollup_compile_times find ${DEST}/data/ -name "*.txt" | create_images ${DEST} "Compilation" cat ${DEST}/composites.txt | create_html ${DEST} "Compilation" elif [ "$METRIC" = "Footprint" ]; then ######################################################## # footprint # Create ${DEST}/libraries.txt with entries like this: # ace___libACE.a create_library_list $TARGETS # Create ${DEST}/composites.txt with entries like this: # tests___OS_Test : tests___OS_Test.o tests___Main.o create_composite_list $TARGETS # Run size on the executables and append results to *.size file. cat ${DEST}/composites.txt | footprint # Run size on the libraries and append results to *.size for the # library and each contained object. # It also creates ${DEST}/size_composites.txt based on size output for # libraries with entries like this: # ace___libACE.a : ace___ACE.o ace___Addr.o cat ${DEST}/libraries.txt | footprint LIB # Add executables to ${DEST}/size_composites.txt based on output # from the map files (created with LDFLAGS=-Xlinker -M -Xlinker # -Map -Xlinker $(@).map). Find the map files of we want based on # entries in ${DEST}/composites.txt. cat ${DEST}/composites.txt | create_size_composites find ${DEST}/data/ -name "*.size" | create_images ${DEST} "Footprint" cat ${DEST}/size_composites.txt | create_html ${DEST} "Footprint" else echo "metric type ($METRIC) not recognized" usage fi ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/0000775000175000017500000000000013157240624016562 5ustar tggtggace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/0000775000175000017500000000000013157240624020027 5ustar tggtggace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vc12.features0000644000175000017500000000003213154167357022343 0ustar tggtggssl=0 qos=1 rwho=0 sctp=0 ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/wfmo.mpb0000644000175000017500000000006413154167357021505 0ustar tggtgg// -*- MPC -*- feature(wfmo) { requires += wfmo } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_tk.mpb0000644000175000017500000000050613154167357021764 0ustar tggtgg// -*- MPC -*- project { requires += tk // Depends on configuration from include/makeinclude/platform_*.GNU verbatim(gnuace,local) { CPPFLAGS += $(PLATFORM_TCL_CPPFLAGS) $(PLATFORM_TK_CPPFLAGS) LIBS += $(PLATFORM_TCL_LIBS) $(PLATFORM_TK_LIBS) LDFLAGS += $(PLATFORM_TCL_LDFLAGS) $(PLATFORM_TK_LDFLAGS) } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/kokyu.mpb0000644000175000017500000000015313154167357021676 0ustar tggtgg// -*- MPC -*- project : acelib { after += Kokyu libs += Kokyu includes += $(ACE_ROOT)/Kokyu }ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/versioned_namespace.mpb0000644000175000017500000000041413154167357024546 0ustar tggtgg// -*- MPC -*- feature(versioned_namespace) { macros += ACE_HAS_VERSIONED_NAMESPACE=1 // Users, define the ACE_VERSIONED_NAMESPACE_NAME preprocessor // symbol in your ace/config.h to override the default versioned // namespace name of the form ACE_5_4_7. } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/aceexe.mpb0000644000175000017500000000013013154167357021761 0ustar tggtgg// -*- MPC -*- project: acedefaults, acenosubsets, ace_for_tao, versioned_namespace { } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/htbp.mpb0000644000175000017500000000031013154167357021464 0ustar tggtgg// -*- MPC -*- project : acelib { avoids += ace_for_tao // Requires ACE_Configuration_Heap requires += ace_uuid after += HTBP libs += ACE_HTBP includes += $(ACE_ROOT)/protocols } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/install_headers.mpb0000644000175000017500000000010413154167357023671 0ustar tggtgg// -*- MPC -*- project { specific { install_headers = 1 } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vcpartialmacros.mpt0000644000175000017500000000036413154167357023754 0ustar tggtgg// -*- MPC -*- // ACE specific macros for nmake, vc6, and vc7 MFC Release { defines += ACE_HAS_MFC=1 ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER } MFC Debug { defines += ACE_HAS_MFC=1 ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_idl_dependencies.mpb0000644000175000017500000000015313154167357024622 0ustar tggtgg// -*- MPC -*- feature(ace_idl_dependencies) { specific(gnuace) { idlflags += -DGEN_IDL_MAKE_DEPS } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vc_warnings.mpb0000644000175000017500000000233613154167357023061 0ustar tggtgg// -*- MPC -*- // This file contains a number of optional features that disable VC // warnings regarding various items that VC turned into warnings that were // not present in earlier versions. Some people may consider these superfluous // or have already checked code to be sure it causes no trouble. So these // warnings are disabled by default. To enable them, generate your projects // with the feature set to 0. feature(vc_avoid_crt_secure_warnings) { specific(prop:microsoft) { macros += _CRT_SECURE_NO_WARNINGS _CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_DEPRECATE } } feature(!vc_scl_secure_warnings) { specific(prop:microsoft) { macros += _SCL_SECURE_NO_WARNINGS } } feature(vc_avoid_this_in_initializer_warnings) { specific(prop:microsoft) { DisableSpecificWarnings += 4355 } } feature(vc_avoid_winsock_warnings) { specific(prop:microsoft) { macros += _WINSOCK_DEPRECATED_NO_WARNINGS } } feature(vc_avoid_hides_local_declaration) { specific(vc14) { DisableSpecificWarnings += 4456 } } feature(vc_avoid_hides_global_declaration) { specific(vc14) { DisableSpecificWarnings += 4459 } } feature(vc_avoid_hides_class_member) { specific(vc14) { DisableSpecificWarnings += 4458 } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vcl.mpb0000644000175000017500000000040113154167357021314 0ustar tggtgg// -*- MPC -*- project { requires += vcl macros += ACE_HAS_VCL=1 specific(bmake, bds4) { use_vcl = 1 lit_libs += rtl vcl compile_flags += -tW -tWV linkflags += -aa } verbatim(borland,macros) { VCL=1 } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/svc_conf_files.mpb0000644000175000017500000000011513154167357023514 0ustar tggtggproject { Define_Custom(Svc_Conf) { inputext = .conf, .conf.xml } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/winregistry.mpb0000644000175000017500000000013413154167357023121 0ustar tggtgg// -*- MPC -*- feature(winregistry) { avoids += ace_for_tao requires += winregistry } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ipv6.mpb0000644000175000017500000000007213154167357021420 0ustar tggtgg// -*- MPC -*- feature(ipv6) { macros += ACE_HAS_IPV6 } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/qos.mpb0000644000175000017500000000013413154167357021335 0ustar tggtgg// -*- MPC -*- feature(qos) { after += QoS libs += ACE_QoS macros += ACE_HAS_QOS } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/acelib.mpb0000644000175000017500000000014413154167357021753 0ustar tggtgg// -*- MPC -*- project: acedefaults, acenosubsets, ace_for_tao, versioned_namespace, pkgconfig { } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_fl.mpb0000644000175000017500000000076013154167357021751 0ustar tggtgg// -*- MPC -*- project : ace_x11, ace_gl { requires += fl // Depends on configuration from include/makeinclude/platform_*.GNU verbatim(gnuace,local) { CPPFLAGS += $(PLATFORM_FL_CPPFLAGS) CPPFLAGS += $(PLATFORM_GL_CPPFLAGS) $(PLATFORM_X11_CPPFLAGS) LIBS += $(PLATFORM_FL_LIBS) $(PLATFORM_GL_LIBS) $(PLATFORM_X11_LIBS) LDFLAGS += $(PLATFORM_FL_LDFLAGS) $(PLATFORM_GL_LDFLAGS) LDFLAGS += $(PLATFORM_X11_LDFLAGS) } specific(prop:microsoft) { libs += fltkdll } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/em3.features0000644000175000017500000000003213154167357022254 0ustar tggtggssl=0 qos=1 rwho=0 sctp=0 ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_openssl.mpb0000644000175000017500000000112713154167357023031 0ustar tggtgg// -*- MPC -*- project : openssl { // For gnuace we want to use built-in macros instead of // the values provided by the openssl base project. specific (gnuace) { lit_libs -= ssl crypto includes -= $(SSL_ROOT)/include includes -= /usr/kerberos/include libpaths -= $(SSL_ROOT)/lib } // These values get set in platform_macros.GNU or defaulted // in wrapper_macros.GNU if the GNU make variable ssl is set to 1. specific (gnuace) { compile_flags += $(PLATFORM_SSL_CPPFLAGS) linkflags += $(PLATFORM_SSL_LDFLAGS) pure_libs += $(PLATFORM_SSL_LIBS) } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/install.mpb0000644000175000017500000000012513154167357022201 0ustar tggtgg// -*- MPC -*- project : install_bin, install_lib, install_headers, install_data { } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/labviewrt_dll.mpb0000644000175000017500000000077013154167357023373 0ustar tggtgg// // This base project changes all projects to generate DLLs regardless of // whether it's an exe or a dll project. The DLLs still go in the place the // exe would have been generated, just as a DLL, not an EXE. // This is needed when generating projects to build LabVIEW RT "programs" // that must be loaded as DLLs. project { macros += ACE_BUILD_LABVIEW_EXE_AS_DLL specific(vc71) { configuration_type = 2 exe_ext = .dll common_defines -= _CONSOLE common_defines += _WINDOWS } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/conv_lib.mpb0000644000175000017500000000010513154167357022324 0ustar tggtgg// -*- MPC -*- project { specific { install_this_target = 1 } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vc9.features0000644000175000017500000000003213154167357022271 0ustar tggtggssl=0 qos=1 rwho=0 sctp=0 ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/install_bin.mpb0000644000175000017500000000011013154167357023023 0ustar tggtgg// -*- MPC -*- project { specific { install_this_target = 1 } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/minizip.mpb0000644000175000017500000000015113154167357022211 0ustar tggtgg// -*- MPC -*- project { after += minizip libs += minizip includes += $(ACE_ROOT)/contrib } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_etcl.mpb0000644000175000017500000000011313154167357022267 0ustar tggtgg// -*- MPC -*- project : acelib { after += ACE_ETCL libs += ACE_ETCL } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/tmcast.mpb0000644000175000017500000000023013154167357022023 0ustar tggtgg// -*- MPC -*- project: acelib, threads { avoids += ace_for_tao after += TMCast libs += ACE_TMCast includes += $(ACE_ROOT)/protocols } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_athena.mpb0000644000175000017500000000011213154167357022577 0ustar tggtgg// -*- MPC -*- project: ace_xt { requires += athena lit_libs += Xaw } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_athena3d.mpb0000644000175000017500000000015513154167357023035 0ustar tggtgg// -*- MPC -*- project: ace_xt { macros += ACE_HAS_ATHENA3D requires += athena3d lit_libs += Xaw3d } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_zlib.mpb0000644000175000017500000000003013154167357022276 0ustar tggtggfeature(zlib): zlib { } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_zzip.mpb0000644000175000017500000000002713154167357022340 0ustar tggtggfeature(zzip): zzip { }ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ssl_for_tao.mpb0000644000175000017500000000022613154167357023047 0ustar tggtgg// -*- MPC -*- feature(ace_for_tao) { // Does not include ACE_SSL asynch stream support. after += SSL_FOR_TAO libs += ACE_SSL_FOR_TAO } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/install_lib.mpb0000644000175000017500000000011013154167357023021 0ustar tggtgg// -*- MPC -*- project { specific { install_this_target = 1 } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/rmcast.mpb0000644000175000017500000000023113154167357022022 0ustar tggtgg// -*- MPC -*- project : acelib, threads { avoids += ace_for_tao after += RMCast libs += ACE_RMCast includes += $(ACE_ROOT)/protocols } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/pkgconfig.mpb0000644000175000017500000000012213154167357022477 0ustar tggtgg// -*- MPC -*- project { Define_Custom(pkgconfig) { inputext = .pc.in } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_x11.mpb0000644000175000017500000000045113154167357021756 0ustar tggtgg// -*- MPC -*- project { specific(prop:microsoft) { } else { requires += x11 } // Depends on configuration from include/makeinclude/platform_*.GNU verbatim(gnuace,local) { CPPFLAGS += $(PLATFORM_X11_CPPFLAGS) LIBS += $(PLATFORM_X11_LIBS) LDFLAGS += $(PLATFORM_X11_LDFLAGS) } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_qt4reactor.mpb0000644000175000017500000000020313154167357023430 0ustar tggtgg// -*- MPC -*- project : acelib, ace_qt4 { requires += ace_qt4reactor after += ACE_Qt4Reactor libs += ACE_QtReactor } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/crosscompile.mpb0000644000175000017500000000067013154167357023242 0ustar tggtgg // -*- MPC -*- project { avoids += cross_compile specific(prop:microsoft) { nocross = 1 } specific(cdt6) { nocross = 1 } verbatim(gnuace, circuit) { ifneq ($(CROSS-COMPILE),) all clean realclean idl_stubs depend lib_warning require_warning avoid_warning install: " @echo This project will not build on CROSS-COMPILE platforms." else } verbatim(gnuace, bottom) { endif # CROSS-COMPILE } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/threads.mpb0000644000175000017500000000006113154167357022164 0ustar tggtgg// -*- MPC -*- project { requires += threads } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_xt.mpb0000644000175000017500000000064213154167357022002 0ustar tggtgg// -*- MPC -*- project: ace_x11 { // this feature by default is set to 1 as projects dependent on Xt has their own features requires += xt // Depends on configuration from include/makeinclude/platform_*.GNU verbatim(gnuace,local) { CPPFLAGS += $(PLATFORM_XT_CPPFLAGS) $(PLATFORM_X11_CPPFLAGS) LIBS += $(PLATFORM_XT_LIBS) $(PLATFORM_X11_LIBS) LDFLAGS += $(PLATFORM_XT_LDFLAGS) $(PLATFORM_X11_LDFLAGS) } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/acemfcexe.mpb0000644000175000017500000000031013154167357022447 0ustar tggtgg// -*- MPC -*- project: aceexe, ace_mfc { specific(vc8, vc9, vc10) { common_defines -= _CONSOLE } specific(vc8, vc9) { SubSystem = 2 } specific(vc10) { SubSystem = Windows } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/wb26.features0000644000175000017500000000007413154167357022356 0ustar tggtgg// We're always cross-compiling with wb26 cross_compile = 1 ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vc10.features0000644000175000017500000000003213154167357022341 0ustar tggtggssl=0 qos=1 rwho=0 sctp=0 ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_motif.mpb0000644000175000017500000000011013154167357022453 0ustar tggtgg// -*- MPC -*- project: ace_xt { requires += motif lit_libs += Xm } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/global.features0000644000175000017500000001051613154167357023040 0ustar tggtgg// The global features file contains the default feature settings. // By default, if a feature isn't listed here then it is enabled. // If it is listed, then the value assigned to the feature is interpreted // as a boolean value. You really shouldn't have to edit this file except // to change the defaults. If you want to override these values you can do // one of two things. // // 1) Create a default.features in this directory with the features you // want enabled or disabled. // 2) Create a feature file anywhere you like with the features you want and // use the -feature_file option to specify where it is located. // // Feature definitions from this file are always overwritten by -features // command option of mwc.pl. // // This file is somewhat akin to the platform_macros.GNU file in that build // settings can be set here. // Enable these by default. acexml = 1 ace_svcconf = 1 ace_token = 1 ace_idl_dependencies = 1 // By default we disable these. ace_for_tao = 0 cross_compile = 0 ssl = 0 openssl11 = 0 qos = 0 rapi = 0 repo = 0 minimum_corba = 0 java = 0 zlib = 0 zzip = 0 bzip2 = 0 lzo1 = 0 lzo2 = 0 ipv6 = 0 mfc = 0 rpc = 0 sctp = 0 boost = 0 dummy_label = 0 wince = 0 uses_wchar = 0 // i.e. unicode gen_ostream = 0 ziparchive = 0 negotiate_codesets = 0 notify_monitor_control = 0 versioned_namespace = 0 vcl = 0 stl = 0 xsc = 0 tao_idl_fe_gen = 0 ace_svcconf_gen = 0 xerces = 0 xerces2 = 0 xerces3 = 0 ofccm = 0 ndds = 0 nddsmonitor = 0 mcpp = 0 wireshark = 0 old_stdstream = 0 exclude_inet = 0 inet_ssl = 0 coredx = 0 dds4ccm_opendds = 0 dds4ccm_ndds = 0 dds4ccm_splice = 0 dds4ccm_coredx = 0 openmp = 0 // Features for various GUI libraries // Some of features are switched on because they are also controlled // by higher level features eg. gl is 1 because it is necessary for fl, // but if someone turns on fl, we may assume gl is available. This way makefile // generation is simplified. Moreover all internal ACE features like ace_qtreactor // and tao_qtresource are also turn on, because we want to build every component // related with if qt is provided. It is proposed to not remove // switched on features from global.features just because features are available // by default. This file is also a kind of ACE capabilities documentation, hence // it is better to enumerate here all features recognized by ACE. // 1 - wxWindows (wxWidgets) libraries are available wxWindows = 0 // 1 - Motif (Lestif) libraries are available motif = 0 // 1 - Athena widgets libraries are available athena = 0 // 1 - X11 libraries are available x11 = 1 // 1 - X Toolkit libraries are available xt = 0 // 1 - Tk libraries are available tk = 0 // 1 - Fast Light toolkit libraries are available (assume lowercase h in header files) fl = 0 // 1 - Qt3 libraries are available qt = 0 qt3 = 0 // 1 - Qt4 core libraries are available qt4 = 0 // 1 - Fox libraries are available fox = 0 // 1 - OpenGL libraries are available gl = 1 // Features for ACE support for various GUI libraries // Use QtReactor ace_qtreactor = 1 // Use XtReactor ace_xtreactor = 1 // Use TkReactor ace_tkreactor = 1 // Use FlReactor ace_flreactor = 1 // Use FoxReactor ace_foxreactor = 1 // Features for TAO support for various GUI libraries // Use QtResources for TAO tao_qtresource = 1 // Use XtResources for TAO tao_xtresource = 1 // Use TkResources for TAO tao_tkresource = 1 // Use FlResources for TAO tao_flresource = 1 // Use FoxResources for TAO tao_foxresource = 1 //Use the ZIP_Wrapper feature for when using the ZIP wrapper classes ZIP_Wrapper = 0 // Feature for CORBA subsets corba_e_compact = 0 corba_e_micro = 0 // Footprint feature optimize_collocated_invocations = 1 // Option to disable iiop tao_no_iiop = 0 // Option to enable the linking of the TAO_CodecFactory library // whenever TAO is linked in link_codecfactory = 0 // Feature for LwCCM ccm_lw = 1 // Feature for CCM for disabling events. ccm_noevent = 0 // Feature for direct collocation ccm_direct_collocation = 0 valuetype_out_indirection=1 ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vc9nmake.mpb0000644000175000017500000000011513154167357022247 0ustar tggtgg// -*- MPC -*- project { specific(nmake) { add_compile -= /Wp64 } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/gnuace.features0000644000175000017500000000004313154167357023034 0ustar tggtggssl=1 qt4=1 fl=1 tk=1 xt=1 sctp=1 ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vc11nmake.mpb0000644000175000017500000000003413154167357022320 0ustar tggtgg// -*- MPC -*- project { } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/avoids_ace_for_tao.mpb0000644000175000017500000000010013154167357024332 0ustar tggtgg// -*- MPC -*- feature(ace_for_tao) { avoids += ace_for_tao } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_unicode.mpb0000644000175000017500000000011513154167357022770 0ustar tggtgg// -*- MPC -*- feature (uses_wchar) : unicode { macros += ACE_USES_WCHAR } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/nmake.features0000644000175000017500000000003213154167357022663 0ustar tggtggssl=0 qos=1 rwho=0 sctp=0 ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/wxwindows.mpb0000644000175000017500000000055613154167357022614 0ustar tggtgg// -*- MPC -*- project { requires += wxWindows verbatim(gnuace,local) { # work based on the configuration of the wxWindows installation # PLATFORM_WX_* defined in includes/makeincludes/*_macros.GNU CPPFLAGS += $(PLATFORM_WX_CPPFLAGS) LDFLAGS += $(PLATFORM_WX_LDFLAGS) LDLIBS += $(PLATFORM_WX_LIBS) } // TBD - support other platforms } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_gtk.mpb0000644000175000017500000000041413154167357022131 0ustar tggtgg// -*- MPC -*- project { macros += ACE_HAS_GTK // Depends on configuration from include/makeinclude/platform_*.GNU verbatim(gnuace,local) { CPPFLAGS += $(PLATFORM_GTK_CPPFLAGS) LIBS += $(PLATFORM_GTK_LIBS) LDFLAGS += $(PLATFORM_GTK_LDFLAGS) } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/support_ostream.mpb0000644000175000017500000000013613154167357024003 0ustar tggtgg// -*- MPC -*- feature(gen_ostream) { requires += gen_ostream macros += GEN_OSTREAM_OPS } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/mc_test_utils.mpb0000644000175000017500000000024313154167357023412 0ustar tggtggproject { includes += ../../.. //TODO: support for ^(HERE) variable expansion libpaths += .. after += MC_Test_Utilities libs += MC_Test_Utilities } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vc8.features0000644000175000017500000000003213154167357022270 0ustar tggtggssl=0 qos=1 rwho=0 sctp=0 ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_output.mpb0000644000175000017500000000006713154167357022710 0ustar tggtgg// -*- MPC -*- project { libout = $(ACE_ROOT)/lib } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ssl_full.mpb0000644000175000017500000000020313154167357022353 0ustar tggtgg// -*- MPC -*- feature(!ace_for_tao) { // Includes ACE_SSL asynch stream support. after += SSL libs += ACE_SSL } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/script.mpb0000644000175000017500000000013713154167357022042 0ustar tggtgg// -*- MPC -*- project { Define_Custom(Script) { automatic = 1 inputext = .sh } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/test_files.mpb0000644000175000017500000000013513154167357022675 0ustar tggtggproject { Define_Custom(Test) { automatic=0 } Test_Files { run_test*.pl } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_gl.mpb0000644000175000017500000000061113154167357021745 0ustar tggtgg// -*- MPC -*- project : ace_x11 { requires += gl // Depends on configuration from include/makeinclude/platform_*.GNU verbatim(gnuace,local) { CPPFLAGS += $(PLATFORM_GL_CPPFLAGS) $(PLATFORM_X11_CPPFLAGS) LIBS += $(PLATFORM_GL_LIBS) $(PLATFORM_X11_LIBS) LDFLAGS += $(PLATFORM_GL_LDFLAGS) $(PLATFORM_GL_LDFLAGS) } specific(prop:microsoft) { lit_libs += OpenGL32 } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vcfullmacros.mpt0000644000175000017500000000045113154167357023257 0ustar tggtgg// -*- MPC -*- // ACE specific macros for nmake, vc6, and vc7 Static MFC Release { defines += ACE_HAS_MFC=1 ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER } Static MFC Debug { defines += ACE_HAS_MFC=1 ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER } conditional_include "vcpartialmacros" ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/install_data.mpb0000644000175000017500000000060113154167357023171 0ustar tggtgg// -*- MPC -*- project { // With gnuace, when install_this_target = 1 (see install_bin or install_lib) // files listed as InstallData_Files { ... } will be installed to the "data" // location for the system (such as /usr/local/share/INST_DIR). // The target sub-directory can be modified by setting MPC's "gendir" option. Define_Custom(InstallData) { automatic = 0 } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/MPC.cfg0000644000175000017500000000027713154167357021143 0ustar tggtggincludes = $CIAO_ROOT/MPC/config, $DANCE_ROOT/MPC/config dynamic_types = $ACE_ROOT/bin/MakeProjectCreator, $?DDS_ROOT/MPC, $?TAO_ROOT/MPC, $?XSC_ROOT/MPC main_functions = cplusplus:ACE_TMAIN ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_xtreactor.mpb0000644000175000017500000000020013154167357023350 0ustar tggtgg// -*- MPC -*- project : acelib, ace_xt { requires += ace_xtreactor after += ACE_XtReactor libs += ACE_XtReactor } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_qt4.mpb0000644000175000017500000000010613154167357022052 0ustar tggtgg// -*- MPC -*- project: qt4_core, qt4_gui { macros += ACE_HAS_QT4 } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_tkreactor.mpb0000644000175000017500000000020013154167357023333 0ustar tggtgg// -*- MPC -*- project : acelib, ace_tk { requires += ace_tkreactor after += ACE_TkReactor libs += ACE_TkReactor } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/core.mpb0000644000175000017500000000004513154167357021464 0ustar tggtgg// -*- MPC -*- project : install { } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/inet.mpb0000644000175000017500000000036713154167357021502 0ustar tggtgg// -*- MPC -*- project : acelib { avoids += wince avoids += old_stdstream avoids += exclude_inet avoids += ace_for_tao avoids += corba_e_compact after += INet libs += ACE_INet includes += $(ACE_ROOT)/protocols } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vc71.features0000644000175000017500000000003213154167357022350 0ustar tggtggssl=0 qos=1 rwho=0 sctp=0 ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_etcl_parser.mpb0000644000175000017500000000013313154167357023645 0ustar tggtgg// -*- MPC -*- project : ace_etcl { after += ACE_ETCL_Parser libs += ACE_ETCL_Parser } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vc8nmake.mpb0000644000175000017500000000003413154167357022246 0ustar tggtgg// -*- MPC -*- project { } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vs2017nmake.mpb0000644000175000017500000000063413154167357022516 0ustar tggtgg// -*- MPC -*- feature (nmake_avoid_Wp64) { specific(nmake) { add_compile -= /Wp64 } } feature(vc_avoid_hides_local_declaration) { specific(nmake) { DisableSpecificWarnings += 4456 } } feature(vc_avoid_hides_global_declaration) { specific(nmake) { DisableSpecificWarnings += 4459 } } feature(vc_avoid_hides_class_member) { specific(nmake) { DisableSpecificWarnings += 4458 } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_foxreactor.mpb0000644000175000017500000000020413154167357023515 0ustar tggtgg// -*- MPC -*- project : acelib, ace_fox { requires += ace_foxreactor after += ACE_FoxReactor libs += ACE_FoxReactor } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/man.mpb0000644000175000017500000000015713154167357021313 0ustar tggtgg// -*- MPC -*- project { Define_Custom(Man) { automatic = 1 inputext = .1 .2 .3 .4 .5 .6 .7 .8 } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ssl.mpb0000644000175000017500000000045413154167357021341 0ustar tggtgg// -*- MPC -*- // In the future, other ssl libraries could be supported // by creating a new xyzssl.mpb similar to openssl.mpb. // You would then derive the following project from this base. project : acelib, ssl_full, ssl_for_tao, ace_openssl { requires += ssl macros += ACE_HAS_SSL=1 } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_for_tao.mpb0000644000175000017500000000022313154167357022773 0ustar tggtgg// -*- MPC -*- feature(ace_for_tao) { macros += ACE_LACKS_ACE_TOKEN ACE_LACKS_MSG_WFMO after += ACE_FOR_TAO libs += ACE_FOR_TAO } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_mfc.mpb0000644000175000017500000000007213154167357022111 0ustar tggtgg// -*- MPC -*- project: mfc { macros += ACE_HAS_MFC=1 } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/acedefaults.mpb0000644000175000017500000000202613154167357023015 0ustar tggtgg// -*- MPC -*- project: ipv6, vc_warnings, build_files, test_files, svc_conf_files, ace_unicode, ace_idl_dependencies { staticflags += ACE_AS_STATIC_LIBS includes += $(ACE_ROOT) libpaths += $(ACE_ROOT)/lib // Support the alternative Borland Make project type specific(bmake) { unicode_flags += -DACE_USES_WCHAR macros += MPC_LIB_MODIFIER=\\"$(LIBMODIFIER)$(ULIBMODIFIER)\\" debug_macros += ACE_NO_INLINE=1 } specific(prop:microsoft) { macro_for_lib_modifier=1 } specific(prop:windows) { lit_libs += iphlpapi } specific(cdt6) { win32::platform_libs += ws2_32 mswsock netapi32 release::macros += ACE_NDEBUG ACE_USE_RCSID=0 } } feature(ace_inline) { specific(cdt6,cdt7) { macros += __ACE_INLINE__ } } feature(!ace_inline) { specific(cdt6,cdt7) { macros += ACE_NO_INLINE } } feature(!threads) { specific(cdt6,cdt7) { macros += ACE_MT_SAFE=0 // and without threads we must remove support for AIO. macros -= ACE_HAS_AIO_CALLS platform_libs -= rt } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_qt.mpb0000644000175000017500000000053513154167357021774 0ustar tggtgg// -*- MPC -*- project: qt { // Depends on configuration from include/makeinclude/platform_*.GNU verbatim(gnuace,local) { CPPFLAGS += $(PLATFORM_QT_CPPFLAGS) LIBS += $(PLATFORM_QT_LIBS) LDFLAGS += $(PLATFORM_QT_LDFLAGS) } specific(prop:microsoft) { lit_libs -= qt-mt$(QT_VERSION) pure_libs += $(PLATFORM_QT_LIBS) } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_rlecompressionlib.mpb0000644000175000017500000000016313154167357025100 0ustar tggtgg// -*- MPC -*- project : ace_compressionlib { libs += ACE_RLECompression after += ACE_RLECompression }ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_fox.mpb0000644000175000017500000000040413154167357022137 0ustar tggtgg// -*- MPC -*- project { requires += fox // Depends on configuration from include/makeinclude/platform_*.GNU verbatim(gnuace,local) { CPPFLAGS += $(PLATFORM_FOX_CPPFLAGS) LIBS += $(PLATFORM_FOX_LIBS) LDFLAGS += $(PLATFORM_FOX_LDFLAGS) } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_compressionlib.mpb0000644000175000017500000000014113154167357024371 0ustar tggtgg// -*- MPC -*- project : acelib { libs += ACE_Compression after += ACE_Compression }ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vc11.features0000644000175000017500000000003213154167357022342 0ustar tggtggssl=0 qos=1 rwho=0 sctp=0 ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vc14.features0000644000175000017500000000003213154167357022345 0ustar tggtggssl=0 qos=1 rwho=0 sctp=0 ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_flreactor.mpb0000644000175000017500000000020013154167357023316 0ustar tggtgg// -*- MPC -*- project : acelib, ace_fl { requires += ace_flreactor after += ACE_FlReactor libs += ACE_FlReactor } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_mc.mpb0000644000175000017500000000045413154167357021747 0ustar tggtgg// -*- MPC -*- project : ace_etcl_parser { after += Monitor_Control libs += ACE_Monitor_Control avoids += wince specific (prop:microsoft) { lit_libs += pdh } verbatim (gnuace, local) { "ifeq (1,$(winnt))" " ACE_SHLIBS += pdh.lib" " LDLIBS += pdh.lib" "endif" } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/acenosubsets.mpb0000644000175000017500000000011513154167357023230 0ustar tggtgg// -*- MPC -*- feature(!ace_for_tao) { after += ACE libs += ACE } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vc10nmake.mpb0000644000175000017500000000003413154167357022317 0ustar tggtgg// -*- MPC -*- project { } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/inetssl.mpb0000644000175000017500000000013113154167357022211 0ustar tggtgg// -*- MPC -*- project : inet, ssl { after += INet_SSL libs += ACE_INet_SSL } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vc12nmake.mpb0000644000175000017500000000003413154167357022321 0ustar tggtgg// -*- MPC -*- project { } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_xml_utils.mpb0000644000175000017500000000013513154167357023364 0ustar tggtgg// -*- MPC -*- project : acelib, xerces { after += ACE_XML_Utils libs += ACE_XML_Utils } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/acexml.mpb0000644000175000017500000000030213154167357022001 0ustar tggtgg// -*- MPC -*- project: ace_zzip { avoids += ace_for_tao after += ACEXML_Parser ACEXML libs += ACEXML_Parser ACEXML includes += $(ACE_ROOT)/ACEXML/common requires += acexml } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/bmake.features0000644000175000017500000000013513154167357022653 0ustar tggtgg// bmake.features,v 1.2 2005/08/22 09:35:48 jwillemsen Exp ssl=0 qos=1 cidl=0 rwho=0 sctp=0 ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/stl.mpb0000644000175000017500000000005513154167357021337 0ustar tggtgg// -*- MPC -*- project { requires += stl } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vc14nmake.mpb0000644000175000017500000000063413154167357022331 0ustar tggtgg// -*- MPC -*- feature (nmake_avoid_Wp64) { specific(nmake) { add_compile -= /Wp64 } } feature(vc_avoid_hides_local_declaration) { specific(nmake) { DisableSpecificWarnings += 4456 } } feature(vc_avoid_hides_global_declaration) { specific(nmake) { DisableSpecificWarnings += 4459 } } feature(vc_avoid_hides_class_member) { specific(nmake) { DisableSpecificWarnings += 4458 } } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/default.rel0000644000175000017500000000047413154167357022172 0ustar tggtgg// This is the default relative definitions. Wildcards are acceptable. // // The first column is the name for which we create a relative definition. // The second (optional) column is the value to build up if it isn't defined // as an environment variable. *_ROOT TAO_ROOT, $ACE_ROOT/TAO CIAO_ROOT, $TAO_ROOT/CIAO ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/vs2017.features0000644000175000017500000000003213154167357022532 0ustar tggtggssl=0 qos=1 rwho=0 sctp=0 ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/config/ace_bzip2.mpb0000644000175000017500000000003213154167357022366 0ustar tggtggfeature(bzip2): bzip2 { } ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/modules/0000775000175000017500000000000013157240624020232 5ustar tggtggace-6.4.5+dfsg.orig/bin/MakeProjectCreator/modules/GNUAutobuildProjectCreator.pm0000644000175000017500000000122413154167357025746 0ustar tggtggpackage GNUAutobuildProjectCreator; # ************************************************************ # Description : A Project creator for the GNUAutobuild project type # Author : Chad Elliott # Create Date : 3/13/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use File::Basename; use GNUACEProjectCreator; use MakeProjectBase; use ProjectCreator; use vars qw(@ISA); @ISA = qw(GNUACEProjectCreator MakeProjectBase ProjectCreator); sub extractType { return 'gnuace'; } 1; ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/modules/GNUACEProjectCreator.pm0000644000175000017500000000455413154167357024417 0ustar tggtggpackage GNUACEProjectCreator; # ************************************************************ # Description : A GNU Project Creator for ACE # Author : Chad Elliott # Create Date : 3/13/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use File::Basename; use MakeProjectBase; use ProjectCreator; use vars qw(@ISA); @ISA = qw(MakeProjectBase ProjectCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub expand_variables_from_template_values { #my($self) = shift; return 0; } sub convert_slashes { #my($self) = shift; return 0; } sub fill_value { my($self) = shift; my($name) = shift; if ($name eq 'vpath') { my(%vpath) = (); foreach my $item ($self->get_component_list('source_files')) { my($dname) = $self->relative($self->mpc_dirname($item)); if ($dname ne '.') { $vpath{$dname} = 1; } } my($str) = join(':', keys %vpath); if ($str ne '') { return 'VPATH = .:' . $str . $self->crlf(); } } elsif ($name eq 'tao') { my($incs) = $self->get_assignment('includes'); my($libs) = $self->get_assignment('libpaths'); return ((defined $incs && $incs =~ /tao/i) || (defined $libs && $libs =~ /tao/i)); } elsif ($name eq 'ciao') { my($incs) = $self->get_assignment('includes'); my($libs) = $self->get_assignment('libpaths'); return ((defined $incs && $incs =~ /ciao/i) || (defined $libs && $libs =~ /ciao/i)); } elsif ($name eq 'dance') { my($incs) = $self->get_assignment('includes'); my($libs) = $self->get_assignment('libpaths'); return ((defined $incs && $incs =~ /DAnCE/i) || (defined $libs && $libs =~ /DAnCE/i)); } elsif ($name eq 'genins') { my $ins = ''; $self->get_install_info(sub { $ins .= '#' . $_[0] }); return $ins; } return undef; } sub project_file_prefix { #my($self) = shift; return 'GNUmakefile.'; } sub get_dll_exe_template_input_file { #my($self) = shift; return 'gnuexe'; } sub get_dll_template_input_file { #my($self) = shift; return 'gnudll'; } sub get_template { #my($self) = shift; return 'gnu'; } 1; ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm0000644000175000017500000001476413154167357024753 0ustar tggtggpackage GNUACEWorkspaceCreator; # ************************************************************ # Description : A GNU Workspace (GNUmakefile) creator for ACE # Author : Chad Elliott # Create Date : 5/13/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use GNUACEProjectCreator; use MakeWorkspaceBase; use WorkspaceCreator; use vars qw(@ISA); @ISA = qw(MakeWorkspaceBase WorkspaceCreator); # ************************************************************ # Data Section # ************************************************************ my($base) = 'GNUmakefile'; # ************************************************************ # Subroutine Section # ************************************************************ sub targets { return 'clean depend idl_stubs realclean'; } sub generate_implicit_project_dependencies { #my($self) = shift; return 1; } sub workspace_file_prefix { #my($self) = shift; return $base; } sub pre_workspace { my($self) = shift; my($fh) = shift; my($crlf) = $self->crlf(); print $fh '# -*- makefile -*-', $crlf; $self->workspace_preamble($fh, $crlf, 'GNU ACE Workspace', ''); print $fh 'MAKEFILE = ', $self->get_modified_workspace_name($base, '', 1), $crlf; } sub write_project_targets { my($self) = shift; my($fh) = shift; my($crlf) = shift; my($target) = shift; my($list) = shift; foreach my $project (@$list) { my($dname) = $self->mpc_dirname($project); my($chdir) = ($dname ne '.'); print $fh "\t\$(KEEP_GOING)\@", ($chdir ? "cd $dname && " : ''), "\$(MAKE) -f ", ($chdir ? $self->mpc_basename($project) : $project), " $target$crlf"; } } sub write_comps { my($self) = shift; my($fh) = shift; my($crlf) = $self->crlf(); my(%targnum) = (); my($pjs) = $self->get_project_info(); my($named) = !defined $ENV{MPC_GNUACE_DIRECTORY_DEPS}; my(@list) = $self->number_target_deps($self->get_projects(), $pjs, \%targnum, $named ? 0 : 1); ## Print out some preliminary information print $fh $crlf, "ifeq (\$(findstring k,\$(MAKEFLAGS)),k)$crlf", " KEEP_GOING = -$crlf", "endif$crlf$crlf", "include \$(ACE_ROOT)/include/makeinclude/macros.GNU$crlf"; if ($named) { $self->write_named_targets($fh, $crlf, \%targnum, \@list, 'REMAINING_TARGETS := ' . '$(filter-out all depend,$(TARGETS_NESTED:.nested=)) $(CUSTOM_TARGETS)' . "$crlf$crlf\$(REMAINING_TARGETS)", '', '', $self->project_target_translation(1), 1); } else { ## Determine the ordering of the sub-directories my(@dirs) = (); my(%found) = (); foreach my $file (reverse @list) { my($dir) = $self->get_first_level_directory($file); if ($dir ne '.') { if (!defined $found{$dir}) { $found{$dir} = 1; unshift(@dirs, $dir); } } } my($need_dirs) = ($#dirs > -1); ## Store the local projects in a separate list my(@lprj) = (); my(%dirprj) = (); foreach my $project (@list) { if ($project !~ /\//) { push(@lprj, $project); if ($need_dirs && defined $targnum{$project}) { foreach my $number (@{$targnum{$project}}) { if ($list[$number] =~ /\//) { ## If any local project depends on a project that is not ## in this directory, we can not rely on the directory ## recursion to get the correct dependencies. We will do ## all projects as local targets. @lprj = (); foreach my $prj (@list) { push(@lprj, $prj); if ($prj =~ /\//) { $dirprj{$prj} = 1; } } $need_dirs = 0; last; } } if (!$need_dirs) { last; } } } } if ($#lprj >= 0) { ## Print out the all target first. This will allow multiple projects ## within the same directory to build in parallel. print $fh 'all:'; foreach my $project (@lprj) { print $fh ' ', $$pjs{$project}->[0]; } print $fh $crlf; if ($need_dirs) { foreach my $dir (@dirs) { print $fh "\t\$(KEEP_GOING)\@cd $dir && ", "\$(MAKE) -f \$(MAKEFILE) \$(\@)$crlf"; } } ## Print out each target separately. Make can decide on which ## targets can be built in parallel because we add the local ## dependencies. foreach my $project (@lprj) { print $fh $crlf, '.PHONY: ', $$pjs{$project}->[0], $crlf, $$pjs{$project}->[0], ':'; if (defined $targnum{$project}) { foreach my $number (@{$targnum{$project}}) { print $fh ' ', $$pjs{$list[$number]}->[0]; } } print $fh $crlf, "\t\$(KEEP_GOING)\@"; if (defined $dirprj{$project}) { print $fh "cd ", $self->mpc_dirname($project), " && \$(MAKE) -f ", $self->mpc_basename($project), $crlf; } else { print $fh "\$(MAKE) -f $project$crlf"; } } print $fh $crlf, 'REMAINING_TARGETS := ', '$(subst all, , $(TARGETS_NESTED:.nested=)) $(CUSTOM_TARGETS)', $crlf; } else { print $fh 'REMAINING_TARGETS := $(TARGETS_NESTED:.nested=) ', '$(CUSTOM_TARGETS)', $crlf; } ## Print out the remaing targets. ## They will be handled serially by make. print $fh "\$(REMAINING_TARGETS):$crlf"; foreach my $project (@lprj) { print $fh "\t\$(KEEP_GOING)\@"; if (defined $dirprj{$project}) { print $fh "cd ", $self->mpc_dirname($project), " && \$(MAKE) -f ", $self->mpc_basename($project), " \$(\@)", $crlf; } else { print $fh "\$(MAKE) -f $project \$(\@)$crlf"; } } if ($need_dirs) { foreach my $dir (@dirs) { print $fh "\t\$(KEEP_GOING)\@cd $dir && ", "\$(MAKE) -f \$(MAKEFILE) \$(\@)$crlf"; } } print $fh $crlf; } } 1; ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/modules/VXTestWorkspaceCreator.pm0000644000175000017500000000127613154167357025200 0ustar tggtggpackage VXTestWorkspaceCreator; # ************************************************************ # Description : VxTest Workspace create # Author : Johnny Willemsen # Create Date : 28/03/2008 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VXTestProjectCreator; use WorkspaceCreator; use vars qw(@ISA); @ISA = qw(WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub write_workspace { return 1; } 1; ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/modules/VXTestProjectCreator.pm0000644000175000017500000000325513154167357024647 0ustar tggtggpackage VXTestProjectCreator; # ************************************************************ # Description : A Project Creator for VxWorks testing # Author : Johnny Willemsen # Create Date : 3/27/2008 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ProjectCreator; use vars qw(@ISA); @ISA = qw(ProjectCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub project_file_name { my($self) = shift; my($name) = shift; if (!defined $name) { $name = $self->project_name(); } my($value) = $self->get_assignment('exename'); if (!defined $value) { $value = $self->get_assignment('staticname'); } if (!defined $value) { $value = $self->get_assignment('sharedname'); } return $self->get_modified_project_file_name($value, '.vxtest'); } sub get_template { #my($self) = shift; return 'vxtest'; } sub need_to_write_project { my $self = shift; ## We only want to return 1 if the project has source files and isn't a ## custom-only project. We have to check for custom_only because ## non-custom related project settings are only removed after calling ## need_to_write_project(). if (!$self->get_assignment('custom_only') && $self->SUPER::need_to_write_project() == 1) { ## We only want to return 1 if this is an executable or library project return 1 if ($self->exe_target() || $self->lib_target()); } return 0; } sub warn_useless_project { return 0; } 1; ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/modules/GNUAutobuildWorkspaceCreator.pm0000644000175000017500000000326513154167357026305 0ustar tggtggpackage GNUAutobuildWorkspaceCreator; # ************************************************************ # Description : A GNU Workspace (GNUmakefile) creator that # collates build results for a single makefile # before outputting to stdout. # Author : Chad Elliott, minor modifications by Will Otte # Create Date : 3/22/07 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use GNUACEWorkspaceCreator; use GNUAutobuildProjectCreator; use MakeWorkspaceBase; use WorkspaceCreator; use vars qw(@ISA); @ISA = qw(GNUACEWorkspaceCreator MakeWorkspaceBase WorkspaceCreator); # ************************************************************ # Data Section # ************************************************************ my($base) = 'GNUmakefile'; # ************************************************************ # Subroutine Section # ************************************************************ sub extractType { return 'gnuace'; } sub write_project_targets { my($self) = shift; my($fh) = shift; my($crlf) = shift; my($target) = shift; my($list) = shift; foreach my $project (@$list) { my($dname) = $self->mpc_dirname($project); my($chdir) = ($dname ne '.'); my($output_project) = ($chdir ? $self->mpc_basename($project) : $project); print $fh "\t\@", ($chdir ? "cd $dname && " : ''), "\$(MAKE) -f ", $output_project, " $target &> $output_project.log ; cat $output_project.log ; rm $output_project.log $crlf"; } } 1; ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/README0000644000175000017500000000310513154167357017447 0ustar tggtgg This directory contains ACE- and TAO-specific extensions of MPC. All the base projects in the config directory are ACE- and TAO-specific, along with the perl modules for the gnuace and vxtest types and the templates that go along with those implementations. GNUACE-specific aspects of project keywords ------------------------------------------- requires Specifies which features should be enabled in order to generate the project file. Under the GNUACE type, it also specifies which tao macros should be set to build the target. avoids Specifies which features should be disabled in order to generate the project file. Under the GNUACE type, it also specifies which tao macros should not be set to build the target. The following keywords are GNUACE only: tagname Specifies the make macro to check before building the target tagchecks Specifies the values for tagname to check NOTE: Within the GNUACE project type, setting sharedname to empty and setting staticname to the static library name will result in a project that will generate only static libraries. The default generation mode for the GNUACE project type is named targets. The environment variable MPC_GNUACE_DIRECTORY_DEPS can be set to get the directory based build that was used up until April of 2006. For more information about MPC, see the README and USAGE files in the MPC docs directory. You can anonymously check-out MPC using Subversion: svn co svn://svn.dre.vanderbilt.edu/DOC/MPC/trunk MPC ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/docs/0000775000175000017500000000000013157240624017512 5ustar tggtggace-6.4.5+dfsg.orig/bin/MakeProjectCreator/docs/templates/0000775000175000017500000000000013157240624021510 5ustar tggtggace-6.4.5+dfsg.orig/bin/MakeProjectCreator/docs/templates/gnu.txt0000644000175000017500000000310013154167357023042 0ustar tggtgg// Current as of 2/27/2007 // This defines the role of all the template variables specific to the // 'gnuace' project type. // // Please try to keep this alphabetically sorted. // build_dir_per_project = Specifies to use per project object file output dirs (VDIR and VSHDIR) if set to '1'. ciao = Indicates whether or not this project contains CIAO code. cidlc = The full path to the cidl compiler. cidlc_dep = The full path to the cidl compiler as a dependency. cidlc_flags = The default flags for the cidl compiler. dds = Indicates whether or not this project contains DDS code. idl_files = When a Define_Custom(IDL) is used, they will be accessible through this variable name. install = This is a synonym for exeout. linkflags = Platform specific flags passed during the linking of dynamic libraries and executables. tao = Indicates whether or not this project contains TAO code. tao_idl = The full path to the idl compiler. tao_idl3_to_idl2 = The full path to the idl3 to idl2 compiler. tao_idl3_to_idl2_dep = The full path to the idl3 to idl2 compiler as a dependency. tao_idl_dep = The full path to the idl compiler as a dependency. tao_idlflags = The default flags for the idl compiler. targetoutdir = Specifies a location for all targets and intermediaries within the makefile. It should always end in a slash. vpath = The value will be used as the VPATH setting within the makefile. xerceslib = The name of the Xerces library. xsc_bin = The full path of the XSC executable. xsc_dep = The full path of the XSC executable as a dependency. xsc_flags = The default flags to the XSC executable. ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/templates/0000775000175000017500000000000013157240624020560 5ustar tggtggace-6.4.5+dfsg.orig/bin/MakeProjectCreator/templates/gnu.mpd0000644000175000017500000010133513154167357022064 0ustar tggtgg# -*- Makefile -*- #---------------------------------------------------------------------------- # GNU Makefile # # @file <%project_file%> # # This file was automatically generated by MPC. Any changes made directly to # this file will be lost the next time it is generated. # #---------------------------------------------------------------------------- <%marker(top)%> MAKEFILE = <%project_file%> DEPENDENCY_FILE = .depend.<%project_name%> <%if(compares(build_dir_per_project, 1))%> VDIR_PRJ = <%project_name%>/ <%endif%> <%if(idl_files)%> <%if(contains(idlflags,-DGEN_IDL_MAKE_DEPS))%> <%foreach(idl_files)%> IDL_DEPENDENCY_FILE<%forcount%> = .depend.<%project_name%>_Idl<%forcount%> <%endfor%> IDL_DEPENDENCY_FILES += \ <%foreach(idl_files)%> .depend.<%project_name%>_Idl<%forcount%><%fornotlast(" \\")%> <%endfor%> <%endif%> <%endif%> <%if(exename)%> BIN_UNCHECKED = <%exename%> <%endif%> LIB_PREFIX ?= lib <%if(need_staticflags)%> static_libs_only ?= 1 <%endif%> <%if(staticname)%> ## LIB_CHECKED may be set to empty later on in this file LIB_UNCHECKED = $(LIB_PREFIX)<%libname_prefix%><%staticname%>.$(LIBEXT) LIB_CHECKED = $(LIB_UNCHECKED) LIB_NAME = $(LIB_PREFIX)<%libname_prefix%><%staticname%> <%if(!sharedname)%> static_libs_only = 1 <%endif%> <%endif%> <%if(sharedname)%> ## SHLIB may be set to empty later on in this file SHLIB_UNCHECKED = $(LIB_PREFIX)<%libname_prefix%><%sharedname%>.$(SOEXT) SHLIB = $(SHLIB_UNCHECKED) <%endif%> <%if(tao || ciao || dance)%> TAO_ROOT ?= $(ACE_ROOT)/TAO <%if(ciao)%> CIAO_ROOT ?= $(TAO_ROOT)/CIAO <%endif%> <%if(dance)%> DANCE_ROOT ?= $(TAO_ROOT)/DAnCE <%endif%> <%endif%> <%if(grouped_source_files)%> <%foreach(grouped_source_files)%> <%grouped_source_file%> = \ <%foreach(uniq(grouped_source_file->files))%> <%grouped_source_file->file%><%fornotlast(" \\")%> <%endfor%> <%endfor%> FILES += \ <%foreach(grouped_source_files)%> $(<%grouped_source_file%>)<%fornotlast(" \\")%> <%endfor%> <%else%> FILES = \ <%foreach(uniq(source_files))%> <%source_file%><%fornotlast(" \\")%> <%endfor%> <%endif%> <%if(idl_files)%> <%if(contains(idlflags,-DGEN_IDL_MAKE_DEPS))%> <%foreach(idl_files)%> IDL_DEPS_FLAGS<%forcount%> = <%if(flag_overrides(idl_file, commandflags))%><%flag_overrides(idl_file, commandflags)%><%else%><%idlflags%><%endif%> IDL_DEPS<%forcount%> = <%idl_file%> <%endfor%> <%endif%> <%endif%> <%vpath%> LIBPATHS := <%libpaths%> #---------------------------------------------------------------------------- # Include macros and targets #---------------------------------------------------------------------------- <%marker(macros)%> <%if(xerceslib)%> XERCESLIB ?= <%xerceslib%> <%endif%> <%if(exename)%> LDLIBS =<%foreach(libs)%> -l<%libname_prefix%><%lib%><%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%> <%else%> <%if(sharedname)%> ACE_SHLIBS =<%foreach(libs)%> -l<%libname_prefix%><%lib%><%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%> <%endif%> <%endif%> <%if(tao_idl)%> TAO_IDL = <%tao_idl%> <%endif%> <%if(tao_idl_dep)%> TAO_IDL_DEP = <%tao_idl_dep%>$(EXEEXT) <%endif%> <%if(tao_idlflags)%> TAO_IDLFLAGS = <%tao_idlflags%><%if(!compares(vms_old_make, 1))%>$(if $(ARCH), -g $(call ADD_QUOTE,$(call ADD_ARCH,$(ACE_ROOT)/bin/ace_gperf)))<%endif%> <%endif%> <%if(xsc_bin)%> XSC_BIN = <%xsc_bin%> <%endif%> <%if(xsc_dep)%> XSC_DEP = <%xsc_dep%>$(EXEEXT) <%endif%> <%if(xsc_flags)%> XSC_FLAGS = <%xsc_flags%> <%endif%> <%if(tao_idl3_to_idl2)%> TAO_IDL3_TO_IDL2 = <%tao_idl3_to_idl2%> <%endif%> <%if(tao_idl3_to_idl2_dep)%> TAO_IDL3_TO_IDL2_DEP = <%tao_idl3_to_idl2_dep%>$(EXEEXT) <%endif%> <%if(tao_idl3toidl2flags)%> TAO_IDL3_TO_IDL2_FLAGS = <%tao_idl3toidl2flags%> <%endif%> <%if(tao_idl3_to_xmi)%> TAO_IDL3_TO_XMI = <%tao_idl3_to_xmi%> <%endif%> <%if(tao_idl3_to_xmi_dep)%> TAO_IDL3_TO_XMI_DEP = <%tao_idl3_to_xmi_dep%>$(EXEEXT) <%endif%> <%if(tao_idl3toxmiflags)%> TAO_IDL3_TO_XMI_FLAGS = <%tao_idl3toxmiflags%> <%endif%> <%if(exename)%> PRJ_TYPE = rtp <%else%> PRJ_TYPE = library <%endif%> <%if(exename)%> <%if(install)%> COLLAPSE_SLASHES = $(if $(findstring //,$(1)),$(call COLLAPSE_SLASHES,$(subst //,/,$(1))),$(1)) INSBIN ?= <%if(compares(vms_old_make, 1))%><%install%><%else%>$(call COLLAPSE_SLASHES,<%install%>)<%endif%> <%endif%> ifeq ($(INSBIN),.) ifeq ($(CURDIR),) ifeq ($(PWD),) PWD=$(shell pwd) endif else PWD=$(CURDIR) endif INSBIN = $(PWD)<%if(targetoutdir)%>/<%targetoutdir%><%endif%> <%if(targetoutdir)%> else ifneq ($(INSBIN),) INSBIN := $(INSBIN)/<%targetoutdir%> endif <%endif%> endif <%if(install)%> OUTPUT_DIRECTORY = $(if $(ARCH),$(if $(INSBIN),$(INSBIN)/$(ARCH)),$(INSBIN)) <%else%> OUTPUT_DIRECTORY = $(if $(ARCH),./$(ARCH)) <%endif%> <%else%> <%if(dllout || libout)%> COLLAPSE_SLASHES = $(if $(findstring //,$(1)),$(call COLLAPSE_SLASHES,$(subst //,/,$(1))),$(1)) INSLIB ?= <%if(compares(vms_old_make, 1))%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%><%else%>$(call COLLAPSE_SLASHES,<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>)<%endif%> <%endif%> ifeq ($(INSLIB),.) ifeq ($(CURDIR),) ifeq ($(PWD),) PWD=$(shell pwd) endif else PWD=$(CURDIR) endif INSLIB = $(PWD)<%if(targetoutdir)%>/<%targetoutdir%><%endif%> <%if(targetoutdir)%> else INSLIB := $(INSLIB)/<%targetoutdir%> <%endif%> endif OUTPUT_DIRECTORY = $(INSLIB) <%endif%> <%if(targetoutdir)%> VDIR = <%targetoutdir%>.obj/ VSHDIR = <%targetoutdir%>.shobj/ <%endif%> include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU <%marker(extension)%> <%if(ciao)%> include $(CIAO_ROOT)/rules.ciao.GNU <%endif%> <%if(dance)%> include $(DANCE_ROOT)/rules.dance.GNU <%endif%> <%if(tao)%> include $(TAO_ROOT)/rules.tao.GNU <%endif%> <%if(version)%> GNUACE_PROJECT_VERSION = <%version%> <%else%> GNUACE_PROJECT_VERSION ?= $(ACE_VERSION) <%endif%> <%if(resource_files)%> ifneq (,$(RC)) RESOURCES += \ <%foreach(resource_files)%> <%resource_file%><%fornotlast(" \\")%> <%endfor%> <%if(includes)%> RC_INCLUDE_FLAG ?= --include-dir= RCFLAGS = \ <%foreach(includes)%> $(RC_INCLUDE_FLAG)<%include%><%fornotlast(" \\")%> <%endfor%> <%endif%> endif <%endif%> # To build multiple targets in the same directory on AIX, it works # best to have a template directory per project. # The compiler/linker isn't too smart about instantiating templates... ifdef TEMPINCDIR TEMPINCDIR := $(TEMPINCDIR)/<%project_name%> all: $(TEMPINCDIR) endif ifneq ($(OUTPUT_DIRECTORY),) .PHONY: create_output_directory.local all: create_output_directory.local create_output_directory.local: -@$(MKDIR) "$(OUTPUT_DIRECTORY)" $(ACE_NUL_STDERR) endif <%if(sharedname || staticname || exename)%> <%if(libs && libpaths)%> # turn off libcheck if doing a dry run ifeq ($(findstring n, $(MAKEFLAGS)),n) LIBCHECK = 1 else # turn off libcheck if keep going was passed too ifeq ($(findstring k, $(MAKEFLAGS)),k) LIBCHECK = 1 else ifeq ($(LIBCHECK_PREFIX),) # If the user hasn't specified a place to look for installed libraries, let's set # a reasonable default LIBCHECK_PREFIX = /usr endif LIBCHECK ?= $(filter-out $(foreach lib,<%foreach(libs)%><%libname_prefix%><%lib%><%fornotlast(" ")%><%endfor%>,$(findstring $(lib),$(foreach libpath,<%foreach(libpaths)%><%if(targetoutdir)%><%libpath%>/<%targetoutdir%> <%endif%><%libpath%> $(if $(ARCH),<%libpath%>/$(ARCH)) <%endfor%>$(LIBCHECK_PREFIX)/lib $(LIBCHECK_PREFIX)/lib64 $(LIBCHECK_EXTRA_PATHS) $(INSLIB),$(wildcard $(libpath)/$(LIB_PREFIX)$(lib).* $(libpath)/$(lib).lib)))),<%foreach(libs)%><%libname_prefix%><%lib%><%fornotlast(" ")%><%endfor%>) ifeq ($(LIBCHECK),) LIBCHECK = 1 endif endif endif <%else%> LIBCHECK = 1 <%endif%> <%else%> LIBCHECK = 1 <%endif%> <%if(!exename)%> <%foreach(requires)%> ifeq ($(<%require%>),1) <%endfor%> <%foreach(avoids)%> ifneq ($(<%avoid%>),1) <%endfor%> ifneq ($(LIBCHECK), 1) <%if(staticname)%> LIB_CHECKED = <%endif%> <%if(sharedname)%> SHLIB = <%endif%> all: lib_warning endif <%foreach(avoids)%> else <%if(staticname)%> LIB_CHECKED = <%endif%> <%if(sharedname)%> SHLIB = <%endif%> all: avoid_warning endif <%endfor%> <%foreach(requires)%> else <%if(staticname)%> LIB_CHECKED = <%endif%> <%if(sharedname)%> SHLIB = <%endif%> all: require_warning endif <%endfor%> <%if(tagname)%> ifeq (,$(<%tagname%>)) <%endif%> <%foreach(requires)%> ifeq ($(<%require%>),1) <%endfor%> <%foreach(avoids)%> ifneq ($(<%avoid%>),1) <%endfor%> <%foreach(avoids)%> else <%if(staticname)%> LIB_CHECKED = <%endif%> <%if(sharedname)%> SHLIB = <%endif%> all: avoid_warning endif <%endfor%> <%foreach(requires)%> else <%if(staticname)%> LIB_CHECKED = <%endif%> <%if(sharedname)%> SHLIB = <%endif%> all: require_warning endif <%endfor%> <%if(tagname)%> else <%foreach(requires)%> ifeq ($(<%require%>),1) <%endfor%> <%foreach(avoids)%> ifneq ($(<%avoid%>),1) <%endfor%> <%foreach(tagchecks)%> ifeq (<%tagcheck%>, $(findstring <%tagcheck%>, $(<%tagname%>))) <%endfor%> <%foreach(tagchecks)%> else LIB_CHECKED = SHLIB = endif <%endfor%> <%foreach(avoids)%> else LIB_CHECKED = SHLIB = all: avoid_warning endif <%endfor%> <%foreach(requires)%> else LIB_CHECKED = SHLIB = all: require_warning endif <%endfor%> endif <%endif%> <%endif%> <%if(exename)%> <%foreach(requires)%> ifeq ($(<%require%>),1) <%endfor%> <%foreach(avoids)%> ifneq ($(<%avoid%>),1) <%endfor%> ifeq ($(LIBCHECK), 1) BIN = $(BIN_UNCHECKED)$(EXEEXT) ifdef ARCH ARCH_BIN = $(ARCH)/$(BIN) endif #ARCH else all: lib_warning endif <%foreach(avoids)%> else all: avoid_warning endif <%endfor%> <%foreach(requires)%> else all: require_warning endif <%endfor%> # If it contains ../ at all use notdir. OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) SRC = $(FILES) <%endif%> <%if(sharedname || staticname)%> LSRC = $(FILES) <%endif%> <%marker(circuit)%> include $(ACE_ROOT)/include/makeinclude/macros.GNU include $(ACE_ROOT)/include/makeinclude/rules.common.GNU include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU <%if(exename)%> ifneq ($(INSBIN),) ifneq ($(INSBIN),.) INSTALL = $(VBIN:%=$(INSBIN)/%) CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/$(if $(ARCH),$(ARCH)/)%$(VAR)$(EXEEXT)) endif endif <%endif%> <%if(sharedname || staticname)%> include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU <%endif%> <%if(pch_source)%> ACE_PCH_SOURCE = <%pch_source%> ACE_PCH_FILE = <%basename(pch_header)%>.gch ifeq ($(pchsupport),1) <%if(pch_defines)%> CPPFLAGS +=<%foreach(pch_defines)%> -D<%pch_define%><%endfor%> <%endif%> $(addprefix $(VDIR), $(OBJS)): $(VDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(VSHDIR)$(ACE_PCH_FILE) endif <%endif%> include $(ACE_ROOT)/include/makeinclude/rules.local.GNU ifeq ($(VXWORKSLINK),1) include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) endif <%foreach(source_files)%> <%if(flag_overrides(source_file, buildflags))%> $(VDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%> @$(MKDIR) $(VDIR)<%dirname(source_file)%> <%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%flag_overrides(source_file, buildflags)%> $(ACE_USE_PCH_OPT) $(CC_OUTPUT_FLAG)$(CC_OUTPUT_FLAG_SEP)$@ $< ${MVCMD} ifneq ($(VSHDIR), $(VDIR)) $(VSHDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%> @$(MKDIR) $(VSHDIR)<%dirname(source_file)%> <%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%flag_overrides(source_file, buildflags)%> $(ACE_USE_PCH_OPT) $(PIC) $(CC_OUTPUT_FLAG)$(CC_OUTPUT_FLAG_SEP)$@ $< endif <%else%> <%if(dirname(source_file) && !contains(source_file, \.\./))%> <%if(starts_with(source_file, \$) || !ends_with(source_file, \.cpp))%> $(VDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%> @$(MKDIR) $(VDIR)<%dirname(source_file)%> <%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(ACE_USE_PCH_OPT) $(CC_OUTPUT_FLAG)$(CC_OUTPUT_FLAG_SEP)$@ $< ${MVCMD} ifneq ($(VSHDIR), $(VDIR)) $(VSHDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%> @$(MKDIR) $(VSHDIR)<%dirname(source_file)%> <%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(ACE_USE_PCH_OPT) $(PIC) $(CC_OUTPUT_FLAG)$(CC_OUTPUT_FLAG_SEP)$@ $< endif <%endif%> <%endif%> <%endif%> <%endfor%> <%if(libpaths)%> ifeq ($(VXWORKSLINK),1) LDLIBPATH =<%foreach(libpaths)%> <%if(targetoutdir)%>-L<%libpath%>/<%targetoutdir%> <%endif%>-L<%libpath%><%endfor%><%if(linkflags)%> <%linkflags%><%endif%> else LDFLAGS +=<%foreach(libpaths)%> <%if(targetoutdir)%>-L<%libpath%>/<%targetoutdir%> <%endif%>-L<%libpath%> $(if $(ARCH),-L<%libpath%>/$(ARCH))<%endfor%><%if(linkflags)%> <%linkflags%><%endif%> endif <%endif%> <%if(includes)%> CPPFLAGS +=<%foreach(includes)%> -I<%include%><%endfor%> <%endif%> <%if(macros)%> CPPFLAGS +=<%foreach(macros)%> -D<%macro%><%endfor%> <%endif%> <%if(compile_flags)%> CPPFLAGS += <%compile_flags%> <%endif%> <%if(dynamicflags)%> ifeq ($(shared_libs),1) ifneq ($(SHLIB),) CPPFLAGS +=<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%> endif endif <%endif%> <%if(staticflags || exename)%> ifeq ($(static_libs),1) <%if(staticflags)%> CPPFLAGS +=<%foreach(staticflags)%> -D<%staticflag%><%endfor%> <%endif%> <%if(exename)%> ifeq ($(link_groups), 1) LDLIBS := -Wl,--start-group $(LDLIBS) -Wl,--end-group endif <%endif%> endif <%endif%> #---------------------------------------------------------------------------- # Local targets #---------------------------------------------------------------------------- <%marker(local)%> lib_warning: @echo <%project_name%> will not be built due to the following missing library: $(LIBCHECK) >&2 <%if(requires)%> <%foreach(requires)%> ifneq ($(<%require%>),1) requires_disabled_macros += <%require%> endif <%endfor%> require_warning: @echo <%project_name%> will not be built due to the following disabled make macros: $(requires_disabled_macros)>&2 <%endif%> <%if(avoids)%> <%foreach(avoids)%> ifeq ($(<%avoid%>),1) avoids_enabled_macros += <%avoid%> endif <%endfor%> avoid_warning: @echo <%project_name%> will not be built due to the following enabled make macros: $(avoids_enabled_macros)>&2 <%endif%> <%if(custom_types)%> ## Some OS's have /bin/test others only have /usr/bin/test ifeq ($(wildcard /bin/test), /bin/test) TEST_EXE = /bin/test else ifeq ($(wildcard /usr/bin/test), /usr/bin/test) TEST_EXE = /usr/bin/test endif endif SPACE = $(should_be_unset) $(should_be_unset) <%foreach(custom_types)%> <%if(custom_type->libpath)%> DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):<%custom_type->libpath%>$(if $(ARCH),:<%custom_type->libpath%>/$(ARCH)) LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):<%custom_type->libpath%>$(if $(ARCH),:<%custom_type->libpath%>/$(ARCH)) SHLIB_PATH := $(SHLIB_PATH):<%custom_type->libpath%>$(if $(ARCH),:<%custom_type->libpath%>/$(ARCH)) LIBPATH := $(LIBPATH):<%custom_type->libpath%>$(if $(ARCH),:<%custom_type->libpath%>/$(ARCH)) PATH := $(PATH):<%custom_type->libpath%>$(if $(ARCH),:<%custom_type->libpath%>/$(ARCH)) <%endif%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> GENERATED_DIRTY +=<%foreach(custom_type->input_file->output_files)%> <%if(flag_overrides(custom_type->input_file, gendir))%><%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%><%flag_overrides(custom_type->input_file, gendir)%>/<%endif%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%endfor%> <%if(custom_type->input_file->non_source_output_files)%> OBJS_DEPEND_ON_GENERATED = 1 <%endif%> <%foreach(custom_type->input_file->output_files)%> <%if(forlast && !forfirst)%> ## More than one file is generated by the command and therefore ## it can not be run in parallel. Unfortunately, there is no way to ## say that only this rule can't be run in parallel. However, we can ## determine if the generated files have already been generated. If that's ## the case, then we don't need this special rule. ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) ## If we can find /bin/test, then we will continue ifneq ($(TEST_EXE),) ## If all of the generated files are there, then we need to check ## and make sure that the generated files are up-to-date. If they are not ## then we need the special rule. ifeq ($(shell<%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) "<%custom_type->input_file%>" -nt "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" 2> /dev/null ||<%endfor%> echo 0),) .NOTPARALLEL: <%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || flag_overrides(custom_type->input_file, dependent_libs) || custom_type->dependent_libs)%> else ## By this point, all of the generated files are here and up-to-date ## with respect to the source file. Now we need to make sure that ## they are up-to-date with respect to the generation tool. If the tool ## is newer than the generated files, then we need the special rule. ifeq ($(shell<%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) "<%if(compares(vms_old_make, 1))%><%dep%><%else%>$(call ADD_ARCH,<%dep%>)<%endif%>" -nt "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" 2> /dev/null ||<%endfor%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%><%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) "<%if(compares(vms_old_make, 1))%><%custom_type->dependent%><%else%>$(call ADD_ARCH,<%custom_type->dependent%>)<%endif%>" -nt "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" 2> /dev/null ||<%endfor%><%endfor%><%endif%><%endif%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) "<%if(compares(vms_old_make, 1))%><%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT))<%endif%>" -nt "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" 2> /dev/null ||<%endfor%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) "<%if(compares(vms_old_make, 1))%><%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT))<%endif%>" -nt "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" 2> /dev/null ||<%endfor%><%endfor%><%endif%><%endif%> echo 0),) .NOTPARALLEL: endif <%endif%> endif else .NOTPARALLEL: endif else .NOTPARALLEL: endif <%endif%> <%endfor%> <%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%><%flag_overrides(custom_type->input_file, gendir)%>/<%endif%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(" ")%><%endfor%>: <%custom_type->input_file%><%if(custom_type->input_file->dependencies)%><%foreach(custom_type->input_file->dependencies)%> <%if(contains(custom_type->input_file->dependencie, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%custom_type->input_file->dependencie%>)<%else%><%custom_type->input_file->dependencie%><%endif%><%endfor%><%endif%><%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%> <%if(contains(dep, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%if(compares(vms_old_make, 1))%><%dep%><%else%>$(call ADD_ARCH,<%dep%>)<%endif%>)<%else%><%if(compares(vms_old_make, 1))%><%dep%><%else%>$(call ADD_ARCH,<%dep%>)<%endif%><%endif%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%> <%if(contains(custom_type->dependent, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%if(compares(vms_old_make, 1))%><%custom_type->dependent%><%else%>$(call ADD_ARCH,<%custom_type->dependent%>)<%endif%>)<%else%><%if(compares(vms_old_make, 1))%><%custom_type->dependent%><%else%>$(call ADD_ARCH,<%custom_type->dependent%>)<%endif%><%endif%><%endfor%><%endif%><%endif%> <%if(flag_overrides(custom_type->input_file, gendir))%> <%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%> $(MKDIR) <%flag_overrides(custom_type->input_file, gendir)%> <%endif%> <%endif%> <%if(compares(vms_old_make, 1))%><%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%><%else%>$(if $(findstring ",<%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%>),<%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%>,$(call ADD_QUOTE,$(call ADD_ARCH,<%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%>)))<%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%><%custom_type->input_file%> <%custom_type->output_option%> $@<%else%><%custom_type->input_file%><%endif%> <%if(flag_overrides(custom_type->input_file, postcommand))%> <%foreach(custom_type->input_file)%> <%flag_overrides(custom_type->input_file, postcommand)%> <%endfor%> <%else%> <%if(custom_type->postcommand)%> <%foreach(custom_type->input_file)%> <%custom_type->postcommand%> <%endfor%> <%endif%> <%endif%> <%if(pch_header)%> <%if(custom_type->pch_postrule)%> <%foreach(custom_type->input_file->source_output_files)%> @echo '#include "<%pch_header%>"' > temp.$$$$ && cat <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temp.$$$$ && mv temp.$$$$ <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> <%endfor%> <%endif%> <%endif%> <%if(flag_overrides(custom_type->input_file, dependent_libs) || custom_type->dependent_libs)%> ifneq ($(static_libs_only),1) ifneq ($(CROSS-COMPILE),1) <%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%><%flag_overrides(custom_type->input_file, gendir)%>/<%endif%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(" ")%><%endfor%>:<%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%> <%if(contains(dep_lib, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%if(compares(vms_old_make, 1))%><%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT))<%endif%>)<%else%><%if(compares(vms_old_make, 1))%><%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT))<%endif%><%endif%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%> <%if(contains(custom_type->dependent_lib, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%if(compares(vms_old_make, 1))%><%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT))<%endif%>)<%else%><%if(compares(vms_old_make, 1))%><%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT))<%endif%><%endif%><%endfor%><%endif%><%endif%> endif endif <%endif%> <%endif%> <%endfor%> <%endfor%> ifneq ($(GENERATED_DIRTY),) .PRECIOUS: $(GENERATED_DIRTY) <%if(source_files)%> ## If the generated files are anything but source files, we need to ## ensure that those files are generated before we attempt to build anything ## else. ifeq ($(OBJS_DEPEND_ON_GENERATED),1) $(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) $(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) endif <%else%> <%foreach(requires)%> ifeq ($(<%require%>),1) <%endfor%> <%foreach(avoids)%> ifneq ($(<%avoid%>),1) <%endfor%> all: $(GENERATED_DIRTY) <%foreach(avoids)%> endif <%endfor%> <%foreach(requires)%> endif <%endfor%> <%endif%> endif <%endif%> <%if(idl_files)%> ADDITIONAL_IDL_TARGETS +=<%foreach(idl_files)%> <%if(flag_overrides(idl_file, gendir))%><%if(!compares(flag_overrides(idl_file, gendir),.))%><%flag_overrides(idl_file, gendir)%>/<%endif%><%basenoextension(idl_file)%>$(IDL_CLIENT_HDR_EXT)<%else%><%noextension(idl_file)%>$(IDL_CLIENT_HDR_EXT)<%endif%><%endfor%> idl_stubs: $(ADDITIONAL_IDL_TARGETS) <%if(source_files)%> # This assignment forces make to run the idl_stubs # target before building any of the source files. FORCED_IDL_STUBS = <%source_files%> <%if(pch_source)%>$(ACE_PCH_SOURCE)<%endif%> <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->source_output_files)%> <%foreach(custom_type->input_file->source_output_files)%> FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%if(flag_overrides(custom_type->input_file, gendir))%><%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%><%flag_overrides(custom_type->input_file, gendir)%>/<%endif%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>=) <%endfor%> <%endif%> <%endfor%> <%endfor%> ifneq ($(FORCED_IDL_STUBS),) $(FORCED_IDL_STUBS): idl_stubs endif <%endif%> <%endif%> <%if(exename)%> ifneq ($(VXWORKSLINK),1) <%if(libs && libpaths)%> ifeq ($(static_libs_only), 1) ifeq ($(use_dep_libs), 1) DEPLIBS = $(foreach lib,<%foreach(libs)%> <%libname_prefix%><%lib%><%endfor%> <%lit_libs%>, $(foreach libpath,<%foreach(libpaths)%><%if(targetoutdir)%> <%libpath%>/<%targetoutdir%><%endif%> <%libpath%><%endfor%>, $(wildcard $(libpath)/$(LIB_PREFIX)$(lib).$(LIBEXT)))) endif endif <%endif%> $(VBIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) ifneq (,$(LINK.cc.override)) $(LINK.cc.override) else $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $(filter-out %.a,$^) $(VLDLIBS) $(POSTLINK) endif endif <%endif%> <%if(idl_files)%> <%if(contains(idlflags,-DGEN_IDL_MAKE_DEPS))%> incremental_depend_idl:: <%foreach(idl_files)%> @$(RM) $(IDL_DEPENDENCY_FILE<%forcount%>)_idl.old @cp $(IDL_DEPENDENCY_FILE<%forcount%>) $(IDL_DEPENDENCY_FILE<%forcount%>)_idl.old $(DEPGEN_ENV) $(DEPGEN) -A $(DEPEND_CMD_ARGS) -f $(IDL_DEPENDENCY_FILE<%forcount%>) \ $(IDL_DEPS_FLAGS<%forcount%>) -t gnuidl -DMAKEDEPEND $(IDL_DEPS<%forcount%>) @if cmp -s $(IDL_DEPENDENCY_FILE<%forcount%>) $(IDL_DEPENDENCY_FILE<%forcount%>)_idl.old ;\ then echo "GNUmakefile idl dependencies unchanged for $(IDL_DEPS<%forcount%>)." ;\ else \ echo "GNUmakefile idl dependencies updated for $(IDL_DEPS<%forcount%>)." ;\ fi ;\ $(RM) $(IDL_DEPENDENCY_FILE<%forcount%>)_idl.old ; <%endfor%> <%endif%> <%endif%> realclean: clean ifneq ($(GENERATED_DIRTY),) -$(RM) -r $(GENERATED_DIRTY) endif <%if(postclean)%> -<%eval(postclean)%> <%endif%> __prebuild__: <%foreach(requires)%> ifeq ($(<%require%>),1) <%endfor%> <%foreach(avoids)%> ifneq ($(<%avoid%>),1) <%endfor%> <%if(prebuild)%> @<%eval(prebuild)%> <%else%> @-: <%endif%> <%foreach(avoids requires)%> endif <%endfor%> <%if(postbuild)%> all: __postbuild__ <%if(exename)%> __postbuild__: $(VBIN) <%else%> <%if(sharedname || staticname)%> __postbuild__: $(VLIBS) <%endif%> <%endif%> __postbuild__: <%foreach(requires)%> ifeq ($(<%require%>),1) <%endfor%> <%foreach(avoids)%> ifneq ($(<%avoid%>),1) <%endfor%> @<%eval(postbuild)%> <%foreach(avoids requires)%> endif <%endfor%> <%endif%> .PHONY: install install: <%if(postbuild)%>__postbuild__<%else%>all<%endif%> INSTALL_LIB ?= lib ifneq ($(INSTALL_PREFIX),) ifneq ($(install_rpath),0) UNAME := $(shell uname) ifeq ($(UNAME), HP-UX) LDFLAGS += -Wl,+s,+b,$(INSTALL_PREFIX)/$(INSTALL_LIB) $(LD_RPATH_FLAGS) else ifeq ($(UNAME), Darwin) LDFLAGS += -Wl,-rpath $(INSTALL_PREFIX)/$(INSTALL_LIB) $(LD_RPATH_FLAGS) else LDFLAGS += -Wl,-R$(INSTALL_PREFIX)/$(INSTALL_LIB) $(LD_RPATH_FLAGS) endif endif endif endif <%if(install_this_target)%> PRJINST_OPTIONS ?= INST_DIR ?= <%if(install_dir)%>/<%install_dir%><%else%>/$(notdir $(PWD))<%endif%> COMMA = , SPACE = $(should_be_unset) $(should_be_unset) INSTALLER ?= $(MPC_ROOT)/prj_install.pl CUSTOM_INST_TAGS = $(sort <%custom_install%> <%foreach(custom_types)%><%foreach(custom_type->input_files)%><%if(custom_type->input_file->output_files)%><%custom_type%> <%endif%><%endfor%><%endfor%>) <%if(staticname || sharedname)%> <%if(install_headers)%> LIB_INST_TAGS = header_files template_files inline_files$(if $(CUSTOM_INST_TAGS), $(CUSTOM_INST_TAGS)) LIB_INST_LOCATIONS = $(foreach tag,$(LIB_INST_TAGS),-b $(tag)=include$(INST_DIR)) <%else%> ifeq ($(shared_libs),1) <%endif%> INST_TAGS = lib_output$(if $(LIB_INST_TAGS), $(LIB_INST_TAGS)) INST_LOCATIONS = $(LIB_INST_LOCATIONS) -o lib_output=$(INSTALL_LIB) <%if(!install_headers)%> endif <%endif%> <%else%> <%if(exename)%> INST_TAGS = exe_output INST_LOCATIONS = -o exe_output=bin <%else%> INST_TAGS = $(CUSTOM_INST_TAGS)<%if(custom_inst_tags)%> <%custom_inst_tags%><%endif%> INST_LOCATIONS = $(foreach tag,$(INST_TAGS),-b $(tag)=include$(INST_DIR)) <%endif%> <%endif%> DATA_INST_TAGS = <%foreach(custom_types)%><%if(compares(custom_type, installdata_files))%><%if(custom_type->input_files)%>installdata_files<%endif%><%endif%><%endfor%> INST_LOCATIONS += $(if $(DATA_INST_TAGS),-x installdata_files -b installdata_files=share$(INST_DIR)) INST_TAGS := $(INST_TAGS)$(if $(DATA_INST_TAGS), $(DATA_INST_TAGS)) ifeq ($(INSTALLER),/prj_install.pl) INSTALLER = $(ACE_ROOT)/MPC/prj_install.pl endif ifeq ($(LIBCHECK),1) <%foreach(requires)%> ifeq ($(<%require%>),1) <%endfor%> <%foreach(avoids)%> ifneq ($(<%avoid%>),1) <%endfor%> install: ifeq ($(INST_TAGS),) @echo Nothing to install. else ifeq ($(INSTALL_PREFIX),) @echo The variable INSTALL_PREFIX must be set to install. @echo If binaries are already built and you want to use RPATH, @echo they must be rebuilt after changing INSTALL_PREFIX. @false else perl -ne'if (/^#END MPC-Generated Install Info/) {exit 0}' \ -e'elsif (/^#BEGIN MPC-Generated Install Info/) {$$ok=1}' \ -e'elsif ($$ok && s/^#//) {print}' $(MAKEFILE) | \ $(INSTALLER) -i -s $(subst $(SPACE),$(COMMA),$(INST_TAGS)) \ $(INST_LOCATIONS) $(if $(ARCH),-d $(ARCH)) $(PRJINST_OPTIONS) \ $(DESTDIR)$(INSTALL_PREFIX) <%foreach(custom_types)%> <%if(compares(custom_type, pkgconfig_files))%> <%if(custom_type->input_files)%> $(ACE_ROOT)/bin/ace_install_pkgconfig.pl <%custom_type->input_files%> --destdir "$(DESTDIR)" --prefix $(INSTALL_PREFIX) --libdir $(INSTALL_LIB) --libs "$(LIBS)" --version $(GNUACE_PROJECT_VERSION)<%foreach(pkgconfig_variables)%> --custom "<%pkgconfig_variable%>"<%endfor%> <%endif%> <%endif%> <%endfor%> <%marker(postinstall)%> endif endif <%foreach(requires avoids)%> endif <%endfor%> endif #BEGIN MPC-Generated Install Info <%genins%> #END MPC-Generated Install Info <%endif%> <%marker(bottom)%> ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/templates/gnuexe.mpt0000644000175000017500000000005413154167357022602 0ustar tggtgg// -*- MPC -*- conditional_include "gnudll" ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/templates/gnudll.mpt0000644000175000017500000000007413154167357022576 0ustar tggtgg// -*- MPC -*- conditional_include "common" targetoutdir = ace-6.4.5+dfsg.orig/bin/MakeProjectCreator/templates/vxtest.mpd0000644000175000017500000000043713154167357022631 0ustar tggtgg# VxWorks script for loading libraries used by: <%if(exename)%><%exename%><%endif%><%if(sharedname)%><%sharedname%><%else%><%if(staticname)%><%staticname%><%endif%><%endif%> <%foreach(reverse(libs))%> <%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%> <%endfor%> ace-6.4.5+dfsg.orig/bin/pippen.pl0000755000175000017500000003037713154167357014711 0ustar tggtgg BEGIN { use Cwd; if (!$ENV{ACE_ROOT}) { $ACE_ROOT = getcwd ()."\\"; print STDERR "Error: ACE_ROOT not defined\n"; exit 1; } else { $ACE_ROOT = $ENV{ACE_ROOT}; } } use lib "$ACE_ROOT/bin"; use PerlACE::MSProject::DSP; use PerlACE::MSProject::VCP; use File::DosGlob 'glob'; use DirHandle; use strict; ################################################################################ my $extension; my $recurse = 0; my $list = 0; my $verbose = 0; my @arguments; my @configs; my @roots; my $auto_compile = 0; my $clean = 0; my $debug = 0; my $aceroot = 0; ################################################################################ # Parse command line arguments while ( $#ARGV >= 0) { if ($ARGV[0] =~ m/^-list/i) { $list = 1; } elsif ($ARGV[0] =~ m/^-evc3/i) { $extension = "vcp"; } elsif ($ARGV[0] =~ m/^-msvc6/i) { $extension = "dsp"; } elsif ($ARGV[0] =~ m/^-msvc7/i) { $extension = "vcproj"; } elsif ($ARGV[0] =~ m/^-config/i) { push @configs, $ARGV[1]; shift; } elsif ($ARGV[0] =~ m/^-r/i) { $recurse = 1; } elsif ($ARGV[0] =~ m/^-v/i) { $verbose = 1; } elsif ($ARGV[0] =~ m/^-auto_compile/i) { $auto_compile = 1; } elsif ($ARGV[0] =~ m/^-clean/i) { $clean = 1; } elsif ($ARGV[0] =~ m/^-useroot/i) { push @roots, $ARGV[1]; shift; } elsif ($ARGV[0] =~ m/^-aceroot/i) { $aceroot = 1; } elsif ($ARGV[0] =~ m/^-(\?|h)/i) { # Help information print "Options\n"; print "-list - Prints out the list of project files\n"; print "-config - Use as a configuration\n"; print "-evc3 - Looks for eMbedded Visual C++ 3.0 projects\n"; print "-msvc6 - Looks for Visual C++ 5.0/6.0 projects\n"; print "-msvc7 - Looks for Visual C++ 7.0 projects\n"; print "-clean - Clean instead of building\n"; print "-recurse - Recurse into directories\n"; print "-verbose - Make some noise\n"; print "-auto_compile - Print out auto_compile info during build\n"; print "-useroot - Use as a root to look for dependencies\n"; print "-aceroot - Use %ACE_ROOT% as a dependency root\n"; exit; } elsif ($ARGV[0] =~ m/^-/) { warn "$0: unknown option $ARGV[0]\n"; exit 1; } else { push @arguments, $ARGV[0]; } shift; } if ($#configs < 0) { if (defined $ENV{WINMAKE_CONFIGS}) { @configs = split /:/, $ENV{WINMAKE_CONFIGS}; } elsif (defined $ENV{PIPPEN_CONFIGS}) { @configs = split /:/, $ENV{PIPPEN_CONFIGS}; } else { print STDERR "Error: No config specified\n"; exit 1; } } if (!defined $extension) { my $compiler = ''; if (defined $ENV{WINMAKE_COMPILER}) { $compiler = $ENV{WINMAKE_COMPILER}; } elsif (defined $ENV{PIPPEN_COMPILER}) { $compiler = $ENV{PIPPEN_COMPILER}; } else { print STDERR "Error: No compiler specified\n"; exit 1; } if ($compiler eq "evc3") { $extension = "vcp"; } elsif ($compiler eq "msvc6") { $extension = "dsp"; } elsif ($compiler eq "msvc7") { $extension = "vcproj"; } } ################################################################################ # I like these variables # %projects->{$file}->{BUILD} <- Are we supposed to build this file? # ->{PROJ} <- MSProject object # ->{CONFIGS}->{$config}->{DEPS} <- List of dependencies # ->{DONE} <- Have we compiled it yet? my %projects; # %names->{$output} <- points to the $file used in the above %projects my %names; ################################################################################ # Expand all the files/directories passed in on the command line sub ProjectSearch ($@) { my $build = shift; my @targets = @_; while ($#targets >= 0) { my $target = $targets[0]; if (-d $target) { print " Reading Directory $target\n" if ($verbose); if ($recurse) { my $dh = new DirHandle ($target); if (defined $dh) { foreach my $entry ($dh->read ()) { if (-d "$target/$entry" && $entry ne "." && $entry ne "..") { $entry =~ s/^.\\//; # / <- fix for color coding in devenv push @targets, ($target . "\\". $entry); } } } else { print STDERR "Error: Cannot read $target: $!\n"; } } foreach my $t (glob ($target . "\\*." . $extension)) { print " Adding project $t\n" if ($verbose); %projects->{$t}->{BUILD} = $build; } } else { foreach my $t (glob ($target)) { print " Adding project $t\n" if ($verbose); %projects->{$t}->{BUILD} = $build; } } shift @targets; } } print "=== Expanding Command line Arguments\n" if ($verbose); if ($#arguments < 0) { print " No files specified, defaulting to \".\"\n" if ($verbose); push @arguments, ("."); } ProjectSearch (1, @arguments); print "=== Expanding Root Arguments\n" if ($verbose); ProjectSearch (0, @roots); if ($aceroot == 1) { my $oldrecurse = $recurse; $recurse = 1; my @aceroots = ($ENV{ACE_ROOT}."\\ace", $ENV{ACE_ROOT}."\\apps\\gperf\\src", $ENV{ACE_ROOT}."\\TAO\\TAO_IDL", $ENV{ACE_ROOT}."\\TAO\\tao", $ENV{ACE_ROOT}."\\TAO\\orbsvcs\\orbsvcs"); ProjectSearch (0, @aceroots); $recurse = $oldrecurse; } ################################################################################ # Read each project file to gather dependency and output information print "=== Reading Project Files\n" if ($verbose); foreach my $project (keys %projects) { my $proj; if ($project =~ m/\.dsp$/i) { $proj = new PerlACE::MSProject::DSP ($project); } elsif ($project =~ m/\.vcp$/i) { $proj = new PerlACE::MSProject::VCP ($project); } elsif ($project =~ m/\.vcproj$/i) { print STDERR "Error: MSVC7 not supported yet\n"; } else { print STDERR "Error: Unrecognized file: $project\n"; } print " Loading $project:" if ($verbose); $proj->Load (); foreach my $config (@configs) { foreach my $proj_config ($proj->Configs ()) { if ($proj_config =~ m/\Q$config\E/i) { print " \"$proj_config\"" if ($verbose); my $name = $proj->DepOutputFile ($proj_config); %names->{lc $name} = $project; my @deps = split / /, $proj->Libs ($proj_config); foreach my $dep (@deps) { # $dep =~ s/.*[\/\\]//g; push (@{%projects->{$project}->{CONFIGS}->{$proj_config}->{DEPS}}, $dep); } if ($proj->UsesTAOIDL () == 1) { push @{%projects->{$project}->{CONFIGS}->{$proj_config}->{DEPS}}, ("gperf.exe", "tao_idl.exe"); } } } } print "\n" if ($verbose); %projects->{$project}->{PROJ} = $proj; } ################################################################################ # Clean out the dependency lists, we only keep the libraries which we know # how to generate print "=== Cleaning out Dependency Lists\n" if ($verbose); foreach my $project (keys %projects) { foreach my $config (keys %{%projects->{$project}->{CONFIGS}}) { print " Cleaning Dependencies: $project ($config)\n" if ($verbose); print " Before:", join (" ", @{%projects->{$project}->{CONFIGS}->{$config}->{DEPS}}), "\n" if ($verbose); my @newdeps; foreach my $dep (@{%projects->{$project}->{CONFIGS}->{$config}->{DEPS}}) { $dep =~ s/.*[\/\\]//g; if (defined %names->{lc $dep}) { push @newdeps, $dep; } } print " After:", join (" ", @newdeps), "\n" if ($verbose); @{%projects->{$project}->{CONFIGS}->{$config}->{DEPS}} = @newdeps; } } ################################################################################ # Make sure to build any dependencies found print "=== Walking Dependency Lists\n" if ($verbose); my $finished = 0; do { $finished = 1; foreach my $project (keys %projects) { foreach my $config (keys %{%projects->{$project}->{CONFIGS}}) { if (%projects->{$project}->{BUILD} == 1) { foreach my $dep (@{%projects->{$project}->{CONFIGS}->{$config}->{DEPS}}) { if (%projects->{%names->{lc $dep}}->{BUILD} != 1) { %projects->{%names->{lc $dep}}->{BUILD} = 1; $finished = 0; } } } } } } while (!$finished); ################################################################################ # Output a list, if requested if ($debug) { print "List of Dependencies\n"; print "--------------------\n"; foreach my $project (keys %projects) { print "=== $project\n"; foreach my $config (keys %{%projects->{$project}->{CONFIGS}}) { print " Config: $config\n"; print " Depends: ", join (" ", @{%projects->{$project}->{CONFIGS}->{$config}->{DEPS}}), "\n"; } } print "\n"; print "List of Outputs\n"; print "---------------\n"; foreach my $name (keys %names) { print "$name\n"; } } ################################################################################ # Loop through and print "=== Compiling\n" if ($verbose); my $compilations; # Keep track of the number of compiles done during a pass my $unfinished; my $loop = 1; do { $compilations = 0; $unfinished = 0; foreach my $project (keys %projects) { if (%projects->{$project}->{BUILD} == 1) { foreach my $config (keys %{%projects->{$project}->{CONFIGS}}) { if (%projects->{$project}->{CONFIGS}->{$config}->{DONE} != 1) { my $depsleft = 0; foreach my $dep (@{%projects->{$project}->{CONFIGS}->{$config}->{DEPS}}) { if (%projects->{%names->{lc $dep}}->{CONFIGS}->{$config}->{DONE} != 1) { ++$depsleft; } } if ($depsleft == 0) { ++$compilations; print "Auto_compiling $project : $config\n" if ($auto_compile); if ($list == 1) { if ($clean == 1) { print "Cleaning "; } else { print "Compiling "; } print "$project : $config\n"; } elsif ($clean == 1) { %projects->{$project}->{PROJ}->Clean ($config); } else { %projects->{$project}->{PROJ}->Build ($config); } %projects->{$project}->{CONFIGS}->{$config}->{DONE} = 1; } else { ++$unfinished; } } } } } print " === Loop $loop: $compilations compiles, $unfinished left\n" if ($verbose); ++$loop; } while ($compilations != 0); # Loop through and see if anything wasn't compiled. If so, this means either there is # an error in the script or that there are circular dependencies foreach my $project (keys %projects) { if (%projects->{$project}->{BUILD} == 1) { foreach my $config (keys %{%projects->{$project}->{CONFIGS}}) { if (%projects->{$project}->{CONFIGS}->{$config}->{DONE} != 1) { print STDERR "Error: Project not compiled: $project - $config\n", } } } } ace-6.4.5+dfsg.orig/bin/show_unused_macros.pl0000755000175000017500000001171113154167357017314 0ustar tggtggeval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # ************************************************************ # Description : Find macros in specified config files that # are not referenced in other config files, # but are referenced in the rest of the source # files. # Author : Chad Elliott # Create Date : 12/22/2004 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use Cwd; use FileHandle; use File::Basename; # ************************************************************ # Data Section # ************************************************************ my($in_comment) = undef; # ************************************************************ # Subroutine Section # ************************************************************ sub getline { my($fh) = shift; my($line) = $fh->getline(); if (defined $line) { ## Remove the line feed $line =~ s/\n//; ## Remove one line c comments $line =~ s/\/\*.*\*\///; ## Check for multi lined c comments if ($line =~ s/\/\*.*//) { $in_comment = 1; } elsif ($line =~ s/.*\*\///) { $in_comment = 0; } elsif ($in_comment) { $line = ''; } else { ## Remove c++ comments $line =~ s/\/\/.*//; ## Concatenate lines if ($line =~ s/\\\s*$//) { $line .= getline($fh); } } } return $line; } sub findMacros { my($defines) = shift; my($macros) = shift; my(@files) = @_; foreach my $file (@files) { my($fh) = new FileHandle(); if (open($fh, $file)) { $in_comment = undef; while(defined($_ = getline($fh))) { if (($defines & 1) == 1 && /^\s*#\s*define\s*([^\s]+)/) { my($word) = $1; $word =~ s/\(.*//; if (!defined $$macros{$word}) { $$macros{$word} = $file; } } elsif (($defines & 2) == 2 && /^\s*#\s*if/) { foreach my $word (split(/[^\w]/, $_)) { if ($word =~ /^[^\d]\w+$/ && $word !~ /^if([n]?def)?$/ && $word !~ /^define[d]?/ && $word !~ /^els(e|if)$/ && !defined $$macros{$word}) { $$macros{$word} = $file; } } } } close($fh); } else { print STDERR "Unable to open $file\n"; exit(2); } } } sub usageAndExit { my($msg) = shift; if (defined $msg) { print STDERR "ERROR: $msg\n"; } print STDERR 'Usage: ', basename($0), " [-I ] \n\n", "This script will provide a set of macros that may possibly\n", "be removed from ACE.\n\n", "It should be run under ACE_wrappers/ace and the input should\n", "be the config header file or files planned for removal.\n"; exit(1); } # ************************************************************ # Main Section # ************************************************************ my(@files) = (); my(@dirs) = ('.', 'os_include', 'os_include/sys', 'os_include/netinet', 'os_include/net', 'os_include/arpa', ); for(my $i = 0; $i <= $#ARGV; ++$i) { my($arg) = $ARGV[$i]; if ($arg =~ /^-/) { if ($arg eq '-h') { usageAndExit(); } elsif ($arg eq '-I') { ++$i; if (defined $ARGV[$i]) { push(@dirs, $ARGV[$i]); } else { usageAndExit('-I requires a directory parameter'); } } else { usageAndExit("$arg is an unknown option"); } } else { push(@files, $arg); } } if (!defined $files[0]) { usageAndExit(); } ## First find all of the control macros my(%control) = (); findMacros(3, \%control, @files); ## Now find all of the macros from the other config files my(@other) = grep(!/config-all\.h|config-lite\.h/, ); for(my $i = 0; $i <= $#other; ++$i) { foreach my $file (@files) { if ($other[$i] eq $file) { splice(@other, $i, 1); --$i; last; } } } my(%other) = (); findMacros(3, \%other, @other); my(%notreferenced) = (); foreach my $macro (keys %control) { if (!defined $other{$macro}) { $notreferenced{$macro} = $control{$macro}; } } ## Find all other macros my(@all) = (); foreach my $dir (@dirs) { my($orig) = getcwd(); if (chdir($dir)) { my(@more) = <*.h *.i* *.cpp>; if ($dir ne '.') { foreach my $file (@more) { $file = "$dir/$file"; } } push(@all, @more); chdir($orig); } } for(my $i = 0; $i <= $#all; ++$i) { foreach my $file (@files, @other) { if ($all[$i] eq $file) { splice(@all, $i, 1); --$i; last; } } } my(%all) = (); findMacros(2, \%all, @all); foreach my $macro (sort keys %notreferenced) { if (defined $all{$macro}) { print "$macro\n"; } } ace-6.4.5+dfsg.orig/bin/mpc.pl0000755000175000017500000000365313154167357014172 0ustar tggtgg#! /usr/bin/perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # ****************************************************************** # Author: Chad Elliott # Date: 6/17/2002 # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** require 5.006; use strict; use FindBin; use File::Spec; use File::Basename; my($basePath) = (defined $FindBin::RealBin ? $FindBin::RealBin : File::Spec->rel2abs(dirname($0))); if ($^O eq 'VMS') { $basePath = File::Spec->rel2abs(dirname($0)) if ($basePath eq ''); $basePath = VMS::Filespec::unixify($basePath); } $basePath .= '/MakeProjectCreator'; my($mpcroot) = $ENV{MPC_ROOT}; my($mpcpath) = (defined $mpcroot ? $mpcroot : dirname(dirname($basePath)) . '/MPC'); unshift(@INC, $mpcpath . '/modules'); if (defined $mpcroot) { print STDERR "MPC_ROOT was set to $mpcroot.\n"; } if (! -d "$mpcpath/modules") { print STDERR "ERROR: Unable to find the MPC modules in $mpcpath.\n"; if (defined $mpcroot) { print STDERR "Your MPC_ROOT environment variable does not point to a ", "valid MPC location.\n"; } else { print STDERR "You can set the MPC_ROOT environment variable to the ", "location of MPC.\n"; } exit(255); } require Driver; # ************************************************************ # Subroutine Section # ************************************************************ sub getBasePath { return $mpcpath; } # ************************************************************ # Main Section # ************************************************************ my($driver) = new Driver($basePath, Driver::projects()); exit($driver->run(@ARGV)); ace-6.4.5+dfsg.orig/bin/Uniqueid.pm0000644000175000017500000000055413154167357015171 0ustar tggtgg#! /usr/bin/perl sub uniqueid { if ($^O eq "MSWin32") { my $uid = 1; open (IPNUM, "ipconfig|") || die "Can't run ipconfig: $!\n"; while () { if (/Address/) { $uid = (split (/: (\d+)\.(\d+)\.(\d+)\.(\d+)/))[4]; } } close IPNUM; return $uid; } else { return getpwnam (getlogin ()); } } 1; ace-6.4.5+dfsg.orig/MPC/0000775000175000017500000000000013157240624012705 5ustar tggtggace-6.4.5+dfsg.orig/MPC/depgen.pl0000755000175000017500000000201213154167361014503 0ustar tggtgg#! /usr/bin/perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # ************************************************************ # Description : Generate dependencies for Make and NMake. # Author : Chad Elliott # Create Date : 5/06/2002 # # ************************************************************ # ************************************************************ # Pragma Section # ************************************************************ use strict; use FindBin; use File::Spec; use File::Basename; my $basePath = $FindBin::Bin; if ($^O eq 'VMS') { $basePath = File::Spec->rel2abs(dirname($0)) if ($basePath eq ''); $basePath = VMS::Filespec::unixify($basePath); } unshift(@INC, $basePath . '/modules/Depgen', $basePath . '/modules'); require Driver; # ************************************************************ # Main Section # ************************************************************ my $driver = new Driver(); exit($driver->run(\@ARGV)); ace-6.4.5+dfsg.orig/MPC/PROBLEM-REPORT-FORM0000644000175000017500000000156313154167361015510 0ustar tggtggDocumentation for MPC can be found at the following location. http://downloads.ociweb.com/MPC/docs/html/MakeProjectCreator.html Please consult the documentation to ensure that you are using MPC correctly. If you are still having a problem getting MPC to do what you want, please consult the FAQ before sending a support request. http://www.ociweb.com/products/mpc/mpc-faq When requesting MPC support please provide the following items: MPC version (using mwc.pl -version): Perl version (using perl --version): Operating System and Shell: ACE or TAO version (if using either): The contents of default.features (if any): MPC command line options: Problem description (please be as detailed as possible): Finally, send support requests to support@ociweb.com. You may send questions to the author (elliott_c@ociweb.com), but a response is not guaranteed. ace-6.4.5+dfsg.orig/MPC/combine_dsw.pl0000755000175000017500000001031413154167361015536 0ustar tggtgg#! /usr/bin/perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # ****************************************************************** # Author: Chad Elliott # Date: 4/8/2004 # Description: Combined multiple dsw's into a single dsw # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** use strict; use FileHandle; use File::Basename; # ****************************************************************** # Data Section # ****************************************************************** my $version = '1.3'; # ****************************************************************** # Subroutine Section # ****************************************************************** sub usageAndExit { my $str = shift; print STDERR "$str\n" if (defined $str); print STDERR "Combine DSW v$version\n", "Usage: ", basename($0), " [-u] \n\n", "-u Each input file will be removed after successful ", "combination\n\n", "NOTE: This script will work for vcw's too.\n\n", "Combine multiple dsw's into a single dsw. You can use ", "MPC to generate\n", "dynamic projects and then generate static projects using ", "the -static,\n", "-name_modifier and -apply_project options together. You ", "can then run this\n", "script to combine the workspaces into one.\n"; exit(0); } # ****************************************************************** # Main Section # ****************************************************************** my $output; my $unlink; my @input; for(my $i = 0; $i <= $#ARGV; $i++) { my $arg = $ARGV[$i]; if ($arg =~ /^-/) { if ($arg eq '-u') { $unlink = 1; } else { usageAndExit("Unknown option: $arg"); } } else { if (!defined $output) { $output = $arg; } else { push(@input, $arg); } } } ## Print the usage if there is no output file provided or there isn't at ## least two input files. usageAndExit() if (!defined $output || !defined $input[0] || !defined $input[1]); my $tmp = "$output.$$.tmp"; my $oh = new FileHandle(); if (open($oh, ">$tmp")) { my $msident; for(my $i = 0; $i <= $#input; ++$i) { ## We only want to take the global settings from the last input file. my $input = $input[$i]; my $global = ($i == $#input); ## Read in the input file and write out the parts that are common ## between multiple workspace files (but only on the first input ## file). After that, write out the project information from each ## input file. my $fh = new FileHandle(); if (open($fh, $input)) { my $in_global = 0; while(<$fh>) { if (/Microsoft\s+(Developer\s+Studio|eMbedded\s+Visual)/) { ## We only want to print out the identifier from the first ## input file. if (!$msident) { $msident = 1; print $oh $_; } } else { if (/^Global:/) { $in_global = 1; } elsif ($in_global && /^[#]{79,}/) { $in_global = 0; $_ = ''; } ## Only print out the line if it's not part of the global ## settings (unless this is the last input file). print $oh $_ if (!$in_global || ($global && $in_global)); } } close($fh); } else { print STDERR "ERROR: Unable to open '$input' for reading\n"; exit(2); } } close($oh); ## If the user wants us to remove the input files after successfully ## combining them, then do so here. unlink(@input) if ($unlink); ## We have written the new workspace to a temporary file to allow an ## input file to be the same as an output file. Once we're done, we ## need to move it to it's correct output name. unlink($output); rename($tmp, $output); } else { print STDERR "ERROR: Unable to open '$tmp' for writing\n"; exit(1); } ace-6.4.5+dfsg.orig/MPC/registry.pl0000755000175000017500000001432313154167361015121 0ustar tggtgg#! /usr/bin/perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # ****************************************************************** # Author: Chad Elliott # Date: 12/05/2005 # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** use strict; use FindBin; use FileHandle; use File::Basename; # ****************************************************************** # Data Section # ****************************************************************** my $Registry; my $MPC_ROOT = $FindBin::Bin; $MPC_ROOT =~ s!/!\\!g; my $version = '1.4'; my %types = ('nmake' => ['NMAKE', 'NMAKE'], 'bmake' => ['Borland Make', 'Borland Make'], 'vc6' => ['DSW', 'DSP'], 'vc71' => ['SLN 7.1', 'VCPROJ 7.1'], 'vc8' => ['SLN 8.0', 'VCPROJ 8.0'], 'vc9' => ['SLN 9.0', 'VCPROJ 9.0'], 'vc10' => ['SLN 10.0', 'VCPROJ 10.0'], 'vc11' => ['SLN 11.0', 'VCPROJ 11.0'], 'vc12' => ['SLN 12.0', 'VCPROJ 12.0'], 'vc14' => ['SLN 14.0', 'VCPROJ 14.0'], 'vs2017' => ['SLN 2017', 'PROJ 2017'], 'wix' => ['WiX', 'WiX Project'], ); # ****************************************************************** # Subroutine Section # ****************************************************************** sub set_ext_icon { my($ext, $num) = @_; my $extf = $ext . 'file'; $Registry->{"HKEY_CLASSES_ROOT/.$ext/"} = {'/' => $extf}; $Registry->{"HKEY_CLASSES_ROOT/$extf/"} = {}; $Registry->{"HKEY_CLASSES_ROOT/$extf/DefaultIcon/"} = {'/' => "$MPC_ROOT\\MPC.ico,$num"}; } sub set_dir_command { my($type, $desc) = @_; my $shell = 'HKEY_CLASSES_ROOT/Directory/shell'; my $hash = $Registry->{$shell}; ## If there is no shell setting, just create an empty one. However, ## this isn't very likely. if (!defined $hash) { $Registry->{$shell} = {}; $hash = $Registry->{$shell}; } ## Create an entry for this project type (vc6, vc7, etc.) my $key = 'MPC' . uc($type) . '/'; $hash->{$key} = {'/' => "MPC -> $desc"}; ## Now store the command for creating a workspace for this project ## type. $key .= 'command/'; $hash->{$key} = {'/' => "cmd /c \"cd %L && $MPC_ROOT\\mwc.pl -type $type -recurse || pause\""}; } sub set_mwc_command { my($type, $desc) = @_; my $shell = 'HKEY_CLASSES_ROOT/mwcfile/shell'; my $hash = $Registry->{$shell}; ## Create the new entry for the mwc files. This is likely to not ## exist. if (!defined $hash) { $Registry->{$shell} = {}; $hash = $Registry->{$shell}; } ## Create an entry for this project type (vc6, vc7, etc.) my $key = 'MPC' . uc($type) . '/'; $hash->{$key} = {'/' => "MPC -> $desc"}; ## Now store the command for creating a workspace for this project ## type. $key .= 'command/'; $hash->{$key} = {'/' => "cmd /c \"$MPC_ROOT\\mwc.pl -type $type %L || pause\""}; ## Since MPC will create a workspace out of a directory, we want to do ## the same thing for directories too. set_dir_command($type, $desc); } sub set_mpc_command { my($type, $desc) = @_; my $shell = 'HKEY_CLASSES_ROOT/mpcfile/shell'; my $hash = $Registry->{$shell}; ## Create the new entry for the mpc files. This is likely to not ## exist. if (!defined $hash) { $Registry->{$shell} = {}; $hash = $Registry->{$shell}; } ## Create an entry for this project type (vc6, vc7, etc.) my $key = 'MPC' . uc($type) . '/'; $hash->{$key} = {'/' => "MPC -> $desc"}; ## Now store the command for creating a single project for this project ## type. $key .= 'command/'; $hash->{$key} = {'/' => "cmd /c \"$MPC_ROOT\\mpc.pl -type $type %L || pause\""}; } sub delete_key { my $key = shift; my $val = $Registry->{$key}; ## Delete everything associated with this key (recursively traversing ## each key). if (UNIVERSAL::isa($val, 'HASH')) { foreach my $k (keys %$val) { delete_key($key . $k); } } ## Now get the key itself. delete $Registry->{$key}; } # ****************************************************************** # Main Section # ****************************************************************** if ($^O eq 'MSWin32') { ## Pull in the registry modules and import the necessary items. require Win32::TieRegistry; Win32::TieRegistry->import(TiedRef => \$Registry, Delimiter => '/'); } else { ## Currently, no other registry type is supported. print "ERROR: This script will only run on Windows.\n"; exit(1); } if (defined $ARGV[0]) { if ($ARGV[0] eq '-r') { ## Get rid of the MPC_ROOT environment variable. delete $Registry->{'HKEY_CURRENT_USER/Environment/MPC_ROOT'}; ## Now delete all the keys that this script knows how to make. delete_key('HKEY_CLASSES_ROOT/.mwc/'); delete_key('HKEY_CLASSES_ROOT/mwcfile/'); delete_key('HKEY_CLASSES_ROOT/.mpc/'); delete_key('HKEY_CLASSES_ROOT/mpcfile/'); delete_key('HKEY_CLASSES_ROOT/.mpb/'); delete_key('HKEY_CLASSES_ROOT/mpbfile/'); foreach my $type (keys %types) { delete_key('HKEY_CLASSES_ROOT/Directory/shell/MPC' . uc($type) . '/'); } exit(0); } else { print STDERR "registry v$version\n", "Usage: ", basename($0), " [-r]\n\n", " -r Remove MPC related registry keys.\n\n", "Set the MPC_ROOT environment variable to the location of this script.\n", "Also, add context menus for .mwc files and directories.\n"; exit(0); } } ## Set the MPC_ROOT environment variable. $Registry->{'HKEY_CURRENT_USER/Environment/MPC_ROOT'} = [$MPC_ROOT, 'REG_SZ']; ## Associate the icons with the various MPC file types. set_ext_icon('mwc', 0); set_ext_icon('mpc', 1); set_ext_icon('mpb', 1); ## Create the command settings for each type foreach my $type (keys %types) { set_mwc_command($type, $types{$type}->[0]); set_mpc_command($type, $types{$type}->[1]); } print "You may need to log out and then ", "log back in for some of these settings to take effect.\n"; exit(0); ace-6.4.5+dfsg.orig/MPC/MPC.ico0000644000175000017500000001600013154167361014016 0ustar tggtggMZ@ !L!This program cannot be run in DOS mode. $GdddodhdRichdPELC!  P x@.rdatam@@.rsrcx @@.reloc@@BCQRSDSSi$C,Mz:\home\elliottc\current\Mpc\utils\Mpc_icon\MPC_ICON.pdb @`xef    !)P2d2( @ʦ @ ` @@ @@@`@@@@`` `@`````` @` @` @` @`@@ @@@`@@@@@ @ @ @@ `@ @ @ @ @@@@ @@@@@`@@@@@@@@@`@` @`@@``@`@`@`@`@@ @@@`@@@@@@ @@@`@@@@@@ @@@`@@@@@@ @@@`@@@@ @` @ ` @@ @@@`@@@@`` `@`````` @` @` @` @` @` @ ` @@ @@@`@@@@`` `@`````` @` @` @`[RQR[Z!!!!QZ[Q(yy999999y1(RZ)y99y)[Zy99y[[!y9zz999yyzZz{{9z{zyz{z9z{{rZr{yzzi099{rZ(z{z9rsb)yyajzbyy{z9yrsb)yzjyy99{zzzssbiyyiji9yji99{risbiz9zbzyzz9)!r{jrbj{zzr99qjiz{Qsbs{9rij{99{csbY{99zijzy{QQ[rbYZ{99yzkk{z{rbjQszyzz{cYsbisYYYjsbisZcsc[k???( @ʦ @ ` @@ @@@`@@@@`` `@`````` @` @` @` @`@@ @@@`@@@@@ @ @ @@ `@ @ @ @ @@@@ @@@@@`@@@@@@@@@`@` @`@@``@`@`@`@`@@ @@@`@@@@@@ @@@`@@@@@@ @@@`@@@@@@ @@@`@@@@ @` @ ` @@ @@@`@@@@`` `@`````` @` @` @` @` @` @ ` @@ @@@`@@@@`` `@`````` @` @` @`[RQR[Z!!!!QZ[Q(yy999999y1(RZ)y99y)[Zy99y[9z99yyzz{zyz{z9z{{rZzzi099{r9rsb)yyajzb9yrsb)yzjyy!99zssbiyyiji9yji99{risbiz9zbzyzz9)!r{jrbj{zzr99qjiz{Qsbs{9rij{99{csbY{99zijzy{QQ[rbYZ{99yzkk{z{rbjQszyzz{cYsbisYYYjsbisZcsc[k???  PADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXace-6.4.5+dfsg.orig/MPC/history/0000775000175000017500000000000013157240624014406 5ustar tggtggace-6.4.5+dfsg.orig/MPC/history/ChangeLog-3_40000644000175000017500000016374013154167361016557 0ustar tggtggThu May 17 16:56:54 UTC 2007 Chad Elliott * modules/AutomakeWorkspaceCreator.pm: Provide more opportunities for the WorkspaceHelper to add more information to the generated workspace Makefile.am. Thu May 17 13:36:33 UTC 2007 Chad Elliott * config/global.mpb: Don't add '.' to libpaths for automake. It isn't necessary. * docs/README: Modified *_pre_extension descriptions to be consistent with the *_pre_filename descriptions. * modules/TemplateParser.pm: Provide warnings when templates use the scope function incorrectly. Tue May 15 19:05:59 2007 Steve Huston * templates/vc8platforms.mpt: Added iphlpapi.lib to the lit_libs for Windows Mobile 5.0 Smartphone SDK (ARMV4I) to pick up GetAdaptersAddresses. Thu May 10 05:13:56 UTC 2007 James H. Hill * templates/vc7.mpd: Somehow the UseOfATL was missing a endif statement. Wed May 9 19:16:24 UTC 2007 James H. Hill * docs/templates/vc7.txt: * templates/vc7.mpd: Added support to configuring the usage of Active Template Library (ATL) in vc7 projects. It uses the template variable UseOfATL. Wed Apr 18 09:27:12 UTC 2007 Johnny Willemsen * config/qt.mpb: Added custom QRC. Thanks to Roland Sun for delivering the patch. This is part of bugzilla 2870 Mon Apr 16 15:00:49 UTC 2007 Chad Elliott * modules/MakeProjectCreator.pm: * modules/ProjectCreator.pm: * templates/make.mpd: * templates/makedll.mpt: Added support for using gcj with the 'java' language type. Thu Apr 5 19:09:47 UTC 2007 Chad Elliott * modules/Creator.pm: Fixed a bug where $() vars that appeared after other $() vars would not be expanded with template values. Also, added a performance enhancement when replacing $() vars. Thu Mar 29 13:40:30 UTC 2007 Chad Elliott * modules/Creator.pm: Fixed a bug where $() vars would not be expanded with template values if no relative replacement values were supplied (either implicitly through default.rel or explicitly through -relative). Mon Mar 26 16:22:00 UTC 2007 Chad Elliott * modules/WorkspaceCreator.pm: Added additional code to detect circular dependencies. Without this, there are situations where MPC will go into an infinite loop. * templates/nmake.mpd: Change to look for the dependency generator in MPC_ROOT first and then the other places. Also modified the message to point the user to MPC instead of svn for a dependency generator. Thu Mar 22 17:48:27 UTC 2007 Chad Elliott * modules/WorkspaceCreator.pm: Fixed a bug where using the -name_modifier would end up causing the workspace file names to contain previous workspace names. Thu Mar 22 14:36:53 UTC 2007 Chad Elliott * depgen.pl: * modules/Depgen/DependencyEditor.pm: * modules/Depgen/DependencyGenerator.pm: * modules/Depgen/DependencyWriter.pm: * modules/Depgen/DependencyWriterFactory.pm: * modules/Depgen/Driver.pm: * modules/Depgen/MakeDependencyWriter.pm: * modules/Depgen/MakeObjectGenerator.pm: * modules/Depgen/NMakeDependencyWriter.pm: * modules/Depgen/NMakeObjectGenerator.pm: * modules/Depgen/ObjectGenerator.pm: * modules/Depgen/ObjectGeneratorFactory.pm: * modules/Depgen/Preprocessor.pm: Brought over my dependency generator from ACE. The core of this dependency generator will be used by the ACE specific version (just like the core of MPC). * modules/Driver.pm: Don't perform relative replacement for MPC_ROOT ever. * templates/make.mpd: Use the new dependency generator instead of makedepend. Wed Mar 21 16:54:06 UTC 2007 Chad Elliott * docs/README: Document the way multiple feature names work in feature projects. * templates/make.mpd: * templates/makedll.mpt: Support multiple configurations within a single makefile. Thu Mar 15 13:25:09 UTC 2007 Chad Elliott * modules/DirectoryManager.pm: * modules/WorkspaceCreator.pm: Fixed a bug where a full path to a mpc file specified in an aggregated workspace would not be handled properly. Thanks to Sumant Tambe for reporting this. * modules/VC71WorkspaceCreator.pm: Reverted my change from Wed Mar 14 19:20:48 UTC 2007. It turns out that is wasn't necessary and didn't benefit anyone. Wed Mar 14 19:20:48 UTC 2007 Chad Elliott * modules/ProjectCreator.pm: When setting the 'static_libs_only' feature, use zero if get_static() returns undef. * modules/VC71WorkspaceCreator.pm: Added a ProjectSection for WebsiteProperties that is desired by Visual Studio 2005 SP1. It does not negatively affect Visual Studio 2003 or Visual Studio 2005 (without SP1). Mon Mar 13 00:22:33 UTC 2007 Ossama Othman From Russell Mora * templates/nmake.mpd: * templates/nmakedll.mpt: * templates/nmakeexe.mpt: This option use to be /GX which is now equivalent to /EHsc: /GR[-] enable C++ RTTI /GX[-] enable C++ EH (same as /EHsc) /EHs enable C++ EH (no SEH exc) /EHa enable C++ EH (w/ SEH exc) /EHc extern "C" defaults to nothrow Mon Jul 11 13:26:52 2005 Chad Elliott * templates/nmakedll.mpt: * templates/nmakeexe.mpt: Switch from /GX to /EHs (which is supported by vc6) to avoid build warnings using the Visual Studio 8 compiler with nmake. I don't see why it was changed to /EHs as opposed to /EHsc so changing it to what appears to be correct. Fri Mar 9 13:43:25 UTC 2007 Chad Elliott * modules/ProjectCreator.pm: Set the 'static_libs_only' feature based on whether or not the -static option is used. Thu Mar 08 19:55:44 2007 Steve Huston * templates/vc8dll.mpt: * templates/vc8exe.mpt: * templates/vc8lib.mpt: * templates/vc8libexe.mpt: Replace _CRT_SECURE_NO_DEPRECATE with _CRT_NONSTDC_NO_WARNINGS. We shouldn't defeat the security-related warnings by default, but the _CRT_NONSTDC_NO_WARNINGS are for name changes only (generally a prefixed _) and have no affect on function. Mon Mar 5 13:31:24 UTC 2007 Chad Elliott * docs/templates/vc8java.txt: Added documentation for the vc8java template. * modules/WorkspaceCreator.pm: Fixed a bug where relative paths would come back in "windows" style when generating projects for a windows based project type. All file names need to be in the UNIX style for workspaces. Fri Mar 2 18:14:56 UTC 2007 Chad Elliott * docs/USAGE: * modules/Driver.pm: * modules/MakeWorkspaceBase.pm: * modules/Options.pm: * modules/ProjectCreator.pm: * modules/WorkspaceCreator.pm: Added a new option, -for_eclipse, which is useful only to make based project types. It creates files at the top level that indicate a project to Eclipse. It is used by importing an existing project into the workspace. Fri Mar 2 15:57:34 UTC 2007 Chad Elliott * modules/Creator.pm: Fixed a bug in subtraction where if the element to be subtracted is the first element it would not be removed. Wed Feb 28 13:50:41 UTC 2007 Chad Elliott * modules/AutomakeWorkspaceCreator.pm: Since the top-level Makefile is always added to configure.ac.Makefiles, we need to mark '.' as beeing seen so that ./Makefile is not added too. * modules/Options.pm: Recognize -help so that an error is not printed, but the usage still is. * modules/WorkspaceCreator.pm: Ignore option errors with no message (in case -help is used on the command line within a workspace). Tue Feb 27 15:17:35 UTC 2007 Chad Elliott * devtools/document_template.pl: Modified this script to look one directory up from the templates directory for docs/templates to find documentation for templates that do not reside in the MPC tree. Tue Feb 27 13:33:42 UTC 2007 Chad Elliott * modules/Creator.pm: Avoid an infinite loop when processing -value_template foo=$(FOO). Thanks to Steve Huston for reporting this. Mon Feb 26 17:30:03 UTC 2007 Chad Elliott * modules/BDS4WorkspaceCreator.pm: * modules/BMakeWorkspaceCreator.pm: * modules/CCWorkspaceCreator.pm: * modules/NMakeWorkspaceCreator.pm: * modules/VC6WorkspaceCreator.pm: * modules/VC7WorkspaceCreator.pm: * modules/WinWorkspaceBase.pm: Added a Windows Workspace base module to override methods that are used in Creator::expand_variables(). * modules/Options.pm: Reverted my change from Wed Jan 24 19:04:58 UTC 2007. It turns out that the "extra parameter" was still needed. * modules/ProjectCreator.pm: Corrected a comment about sorting template variable values. Mon Feb 26 13:09:44 UTC 2007 Chad Elliott * docs/README: Moved the Modify_Custom section down to the end of the Define_Custom section. * modules/Creator.pm: Fixed a bug in subtraction where a partial subtraction would occur if an element contained the subtracted element plus other text. * prj_install.pl: Added the -l option to use symbolic links instead of copies. Fri Feb 16 19:56:13 UTC 2007 Johnny Willemsen * config/openssl.mpb: Added support for borland template so that we can use the borland template with openssl Mon Feb 12 13:33:13 UTC 2007 Chad Elliott * docs/README: * modules/ProjectCreator.pm: * templates/nmake.mpd: * templates/vc7.mpd: * templates/vc8.mpd: Changed the source component specific keyword, managed, to be allowed as a project level setting as well. Also, the value of the 'managed' setting can determine different managed c++ levels for vc8 only. Thu Feb 8 19:45:54 UTC 2007 Chad Elliott * config/global.features: By default, disable the ziparchive feature. * docs/README: * modules/ProjectCreator.pm: * templates/nmake.mpd: * templates/vc7.mpd: * templates/vc8.mpd: Added a new source component specific keyword, managed, which indicates that the source files within the scope of this setting are to be treated as Managed C++ (a Microsoft extension). * docs/templates/vc8.txt: * modules/VC8WorkspaceCreator.pm: If the 'add_references' template variable is set, the vc8 C++ projects will have project references inserted into them based on the 'after' keyword setting. Fri Feb 2 17:47:09 UTC 2007 Chad Elliott * config/swig_php.mpb: Added /. after $(PHP_INCLUDE) in the includes setting. In case the PHP_INCLUDE environment variable is not set, something is still passed to the -I option. * config/ziparchive.mpb: Added /. after $(ZIPARCHIVEROOT) in the includes setting. In case the ZIPARCHIVEROOT environment variable is not set, something is still passed to the -I option. And switched to lit_libs. * config/zzip.mpb: For non-Windows based project types, use lit_libs instead of libs. * docs/templates/automake.txt: Documented the automake template variables. * docs/templates/common.txt: Added the definition of the forcount template variable. * modules/AutomakeProjectCreator.pm: * templates/automake.mpd: Replaced the am_includes template variable with the includes project variable. In the past, these were different but now they are exactly the same. Thu Feb 1 18:29:19 UTC 2007 James H. Hill * docs/templates/vc7.txt: * docs/templates/vc8.txt: * templates/vc7.mpd: * templates/vc8.mpd: Added new template variable midl_notlb to suppress the creation of type libraries. Wed Jan 24 19:04:58 UTC 2007 Chad Elliott * modules/CCWorkspaceCreator.pm: Fixed a bug in the dependency code that would make the wrong directory when the -into option was used. * modules/ConfigParser.pm: Provide diagnostic information when an environment variable is used in the configuration file, but is not defined by the user. * modules/Driver.pm: Keep one more directory level when printing out the configuration file. * modules/Options.pm: Removed an extra parameter when setting the template variable overrides. It was no longer necessary due to my change from Fri Jan 12 15:24:27 UTC 2007. * modules/ProjectCreator.pm: * modules/TemplateParser.pm: Fixed a bug where a scoped assignment would make the original assignment disappear completely. The original assignment needs to be maintained so that when the assignment is used outside of a scope it has the value specified by the user. * modules/VC8WorkspaceCreator.pm: * modules/WorkspaceCreator.pm: * templates/vc8csharp.mpd: * templates/vc8java.mpd: * templates/vc8vb.mpd: Provide project references based on the 'after' keyword setting for c#, vb and java projects only. * registry.pl: Added commands to process .mpc files. * templates/cc.mpd: Only output the dependency tag if the 'after' keyword has been set. * templates/make.mpd: * templates/makedll.mpt: Changed the way that output directories are made. The targets no longer depend on the output directory, they are made on the fly. Fri Jan 19 15:34:17 UTC 2007 Chad Elliott * modules/TemplateParser.pm: Fixed a bug where the foreach variable names were not processed correctly if they were mixed case. Thu Jan 18 19:57:42 UTC 2007 Chad Elliott * modules/TemplateParser.pm: Provide a new tmeplate function, remove_from, that will find a particular name in any of the valid component sets (e.g., source_files, header_files, etc.) and remove it from the list. This is used in the change below. * templates/vc8csharp.mpd: If a source file is of the 'subtype' Form or Component, there may be corresponding .Designer.cs and .resx files that are dependent upon the source file. If this is the case, the .Designer.cs and .resx files will automatically be marked as dependent upon the originating source file. In order for this to happen though, the .Designer.cs and .resx files must be in the MPC project either implicitly or explicitly. Thu Jan 18 16:44:51 UTC 2007 Chad Elliott * modules/Creator.pm: Fixed a bug when subtracting a value, the value was escaped for use as a regular expression before calling subtraction_core(). It should only happen inside of Creator::subtraction_core(). * templates/vc8.mpd: The DisableSpecificWarnings template variable value should be semi-colon separated. I'm sure others that will need to change in this same way. Thu Jan 18 14:24:07 UTC 2007 Chad Elliott * config/swig_perl.mpb: Added a specific section for Windows based project types to add $(PERL5_LIB) to lit_libs. * modules/ProjectCreator.pm: Fixed a bug where output extensions of custom definitions that contain text before the extension (e.g, _i.cpp) would cause files to be skipped instead of automatically added. * modules/TemplateParser.pm: When splitting parameters, make sure that we match the regular expression at the beginning of the line. Fri Jan 12 18:24:26 UTC 2007 Chad Elliott * templates/vc8csharp.mpd: Modified the template to use the basename of LastGenOutput and DependentUpon settings. Also, when a .settings file is listed as a resx file it will have the SettingsSingleFileGenerator instead of the ResXFileCodeGenerator when the generates_source template variable is set. Fri Jan 12 15:24:27 UTC 2007 Chad Elliott * modules/Creator.pm: * modules/ProjectCreator.pm: Fixed a bug where mixing project variables and scoped project variables would result in only the values set as scoped project variables being used. Thu Jan 11 19:19:55 UTC 2007 Chad Elliott * config/swig_php.mpb: * config/swig_python.mpb: * config/swig_ruby.mpb: * config/swig_tcl.mpb: Added SWIG base projects for php, python, ruby, and tcl. * generate_export_header.pl: Simplified code to determine the output file name. * modules/ProjectCreator.pm: Fixed a bug where when the -ti option is used within a workspace, subsequent uses of -ti are ignored. Mon Jan 8 13:39:23 UTC 2007 Chad Elliott * modules/AutomakeWorkspaceCreator.pm: During post processing, remove any duplicate targets. Duplicate targets show up as build warnings from automake. Fri Jan 05 19:06:52 2007 Steve Huston * templates/vc7dll.mpt: * templates/vc7exe.mpt: * templates/vc7lib.mpt: * templates/vc7libexe.mpt: Added Pharlap ETS configuration sections to allow generation of Pharlap ETS configurations with VC7.1. Thank you to David Hauck for contributing these changes. Thu Jan 4 16:08:51 UTC 2007 Chad Elliott * devtools/document_template.pl: Changed the table style for the html output. * docs/templates/vc7.txt: Added the output_subdir definition. * docs/templates/vc8.txt: Began documenting the vc8 template. * docs/MPC.sgml: * docs/USAGE: * modules/AutomakeWorkspaceCreator.pm: * modules/BDS4WorkspaceCreator.pm: * modules/Driver.pm: * modules/EM3WorkspaceCreator.pm: * modules/HTMLWorkspaceCreator.pm: * modules/MakeWorkspaceBase.pm: * modules/Options.pm: * modules/ProjectCreator.pm: * modules/VC6WorkspaceCreator.pm: * modules/VC71WorkspaceCreator.pm: * modules/VC7WorkspaceCreator.pm: * modules/VC8WorkspaceCreator.pm: * modules/WorkspaceCreator.pm: Added an option, -nocomments, which causes MPC to generate workspaces without comments at the top. Tue Jan 2 20:07:32 UTC 2007 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug where exclusion of more than one file would result in only the last file listed being excluded. Tue Jan 2 18:05:52 UTC 2007 Chad Elliott * config/zzip.mpb: Since zzip requires zlib, inherit from the zlib base project and and have requires += zlib. * modules/Driver.pm: Simplified determination of workspace or project creators. * modules/VC7ProjectCreator.pm: * modules/VC7WorkspaceCreator.pm: * modules/VC8ProjectCreator.pm: * templates/vc7java.mpd: * templates/vc7java.mpt: * templates/vc8java.mpd: * templates/vc8java.mpt: Added java support for vc7, vc71 and vc8. Wed Dec 20 13:02:13 2006 Johnny Willemsen * modules/BDS4ProjectCreator.pm: * modules/BDS4WorkspaceCreator.pm: Some more rename of bds to bds4 Wed Dec 20 09:25:13 2006 Johnny Willemsen * modules/BDSProjectCreator.pm: * modules/BDSWorkspaceCreator.pm: * templates/bds.mpd: * templates/bdsdll.mpt: * templates/bdsexe.mpt: Renamed to bds4, this is for Borland Developer Studio 4 * config/boost_date_time.mpb: * config/boost_filesystem.mpb: * config/boost_iostreams.mpb: * config/boost_prg_exec_monitor.mpb: * config/boost_program_options.mpb: * config/boost_regex.mpb: * config/boost_serialization.mpb: * config/boost_signals.mpb: * config/boost_test_exec_monitor.mpb: * config/boost_thread.mpb: * config/boost_wave.mpb: * config/xerces.mpb: * docs/MPC.sgml: * docs/USAGE: Updated bds to bds4 Tue Dec 19 11:37:13 2006 J.T. Conklin * templates/automake.mpd: Further whitespace fix so that _SOURCES will be correctly terminated. Tue Dec 19 10:37:10 2006 J.T. Conklin * templates/automake.mpd: Fix extra whitespace in generated Makefile.am's to match what was generated before multiple configuration support was added. Tue Dec 19 18:02:21 UTC 2006 Chad Elliott * templates/automake.mpd: Fixed a bug where exe LDFLAGS would be overwritten with the LDFLAGS_COMMON even when configurations weren't used. Also minimized some of the blank line emissions. * templates/vc7.mpd: * templates/vc7dll.mpt: * templates/vc7exe.mpt: * templates/vc7lib.mpt: * templates/vc7libexe.mpt: * templates/vc8platforms.mpt: Unified the intermediate directories for nmake, vc7 and vc8 for the various machine types (x86, x64, etc.). Tue Dec 19 07:41:59 2006 J.T. Conklin * templates/automake.mpd: If not building separate configurations, define *_CPPFLAGS, *_SOURCES, *_LDFLAGS, etc. directly instead of defining *_CPPFLAGS_COMMON, *_SOURCES_COMMON, *_LDFLAGS_COMMON, etc. and then defining the former in terms of the latter. This results in generated Makefile.am's closer to what MPC generated before configurations support was added (there are some whitespace differences that still need to be tracked down), and closer to what a hand-written Makefile.am would look like. Tue Dec 19 03:38:49 2006 J.T. Conklin * templates/automake.mpd: Fix conditional nesting in *_LDFLAGS* definition so that an empty one isn't emitted. Tue Dec 19 03:01:22 2006 J.T. Conklin * templates/automake.mpd: Move configuration-specific definition for *_DEPENDENCIES to immediate follow the definition for *_DEPENDENCIES_COMMON. Tue Dec 19 02:28:46 2006 J.T. Conklin * templates/automake.mpd: Extend conditional around the *_PROGRAMS and *_LTLIBRARIES definitions to to include the *_CPPFLAGS*, *_SOURCES*, and *_LDFLAGS*. This fixes Makefile.am generation for projects that don't build executables or libraries, such as those that compile *.idl files. Tue Dec 19 02:21:30 2006 J.T. Conklin * templates/automake.mpd: Move configuration-specific definitions for *_CPPFLAGS, *_SOURCES, and *_LDFLAGS to immediately follow the definitions for *_CPPFLAGS_COMMON, *_SOURCES_COMMON, and *_LDFLAGS_COMMON, as makes the resultant Makefile.am easier to read, and makes it easier to add conditionals that effect both configuration- specific and common definitions. Tue Dec 19 01:29:01 2006 J.T. Conklin * templates/automake.mpd: Fix template conditionals around *_LDFLAGS_COMMON definition. When "configurations" support was added, this was mangled and no definition was emitted for library projects. Mon Dec 18 13:48:15 UTC 2006 Chad Elliott * config/cppunit.mpb: Added a comment with a dollar Id. * modules/AutomakeWorkspaceCreator.pm: Sort the features when creating the configure.ac file for repeatability. * modules/NMakeWorkspaceCreator.pm: Change the workspace extension from .nmak to .mak. This is only used when -make_coexistence is used on the command line. * modules/ProjectCreator.pm: When checking to see if a feature is enabled, we will now explicitly set the feature in the feature parser for later use within the AutomakeWorkspaceCreator. Fri Dec 15 19:38:00 UTC 2006 Chad Elliott * config/cppunit.mpb: Added a base project for cppunit. Set the CPPUNIT_ROOT environment variable before processing. * modules/Creator.pm: * modules/ProjectCreator.pm: Fixed a few bugs. 1) If -feature_file was used in a 'cmdline' setting within a .mwc file, it was silently ignored. 2) When setting certain 'cmdline' options within a .mwc file, they would persist outside of the scope in which they were set. 3) If the file specified by -feature_file did not contain a full path, it would not be used unless it was in the current directory. The MPC include paths are now searched if it does not contain a path. Thu Dec 14 14:30:58 UTC 2006 Chad Elliott * PROBLEM-REPORT-FORM: Changed to ask for the Operating System and Shell. * modules/Creator.pm: When expanding variables, warn the user if the value returned from adjust_value() is a hash table. When this happens, it means that a template scope name collides with a variable name contained within $(). * templates/make.mpd: Added support to perform a post link processing command. * templates/makedll.mpt: Added a post link processing command to perform the integrate step for Green Hills on Integrity. Wed Dec 13 17:05:29 UTC 2006 Chad Elliott * config/zlib.mpb: Modified this base project to use an intermediate template variable, zlibname, for Windows based project types. The default remains zlib, but can be overridden on the command line or after this base project has been included. For instance, the dynamic version of this library is named zdll and would require that the user of such library change the zlibname template variable. * modules/Options.pm: Provide indication when template variables are set on the command line. Also, warn users when -value_template is used for a project keyword. * modules/ProjectCreator.pm: Modified the evaluation of template variables such that values set on the command line take precedence over those set in projects. Tue Dec 12 19:46:17 UTC 2006 Chad Elliott * docs/MPC.sgml: * docs/USAGE: * modules/Driver.pm: * modules/OutputMessage.pm: * modules/Parser.pm: * modules/WorkspaceCreator.pm: Removed deprecated environment variables. All functionality provided by the environment variables was moved into the MPC configuration file long ago. Tue Dec 12 14:32:51 UTC 2006 Chad Elliott * docs/README: * modules/ProjectCreator.pm: * templates/vc8csharp.mpd: Added three new C# specific scoped keywords (dependent_upon, generates_source and subtype). See docs/README for more details. Mon Dec 11 19:36:13 UTC 2006 Chad Elliott * config/yacc.mpb: Fixed the postcommand for the custom rule so that both source and header file are created correctly. * modules/ProjectCreator.pm: Fixed a bug where defaults source files for custom definitions may result in incorrect file addition if the generated source file is not the default extension (.cpp). Wed Dec 6 18:08:49 UTC 2006 Chad Elliott * docs/README: * modules/ProjectCreator.pm: * templates/em3.mpd: * templates/nmake.mpd: * templates/vc6.mpd: * templates/vc7.mpd: * templates/vc8.mpd: Added a new source component level setting, no_pch. When set, it specifies that precompiled headers should not be used for the source files listed within the scope of it's setting. Tue Dec 5 03:29:14 UTC 2006 Chad Elliott * docs/MPC.sgml: * docs/USAGE: * modules/Driver.pm: * modules/MPC.pm: * modules/MWC.pm: * modules/Options.pm: * mpc.pl: * mwc.pl: Removed the default project type and simplified the addition of new project/workspace creators. Now, you must specify a type on the command line or a default type in the MPC.cfg. Mon Dec 4 16:02:43 UTC 2006 Chad Elliott * modules/Driver.pm: If no MPC.cfg exists in MPC/config, search the config path from the starting point for mwc.pl (e.g., $ACE_ROOT/bin/mwc.pl). This precludes the removal of $ACE_ROOT/bin/mwc.pl. * config/base.cfg: Removed this file. It is no longer necessary to provide the search paths for ACE related projects. Mon Dec 4 15:08:19 UTC 2006 Chad Elliott * config/base.cfg: Provide default MPC.cfg search paths for ACE related projects. * modules/ProjectCreator.pm: * modules/TemplateParser.pm: Fixed a bug where grouped generated files would be duplicated due to a problem matching up the generated files when gendir is set to '.'. Thu Nov 30 15:31:55 UTC 2006 Chad Elliott * modules/WorkspaceCreator.pm: Fixed bugs where nested scopes and nested workspace aggregation would either not use workspace assignments or not have the right workspace assignments. Thanks to James Hill for pointing this out. Wed Nov 29 19:47:15 UTC 2006 Chad Elliott * modules/BMakeWorkspaceCreator.pm: * modules/MakeWorkspaceBase.pm: * modules/MakeWorkspaceCreator.pm: * modules/NMakeWorkspaceCreator.pm: Factored much of the common code in these workspace types into a single base module. * modules/BDSWorkspaceCreator.pm: * modules/CCWorkspaceCreator.pm: * modules/EM3WorkspaceCreator.pm: * modules/HTMLWorkspaceCreator.pm: * modules/SLEWorkspaceCreator.pm: * modules/VC6WorkspaceCreator.pm: * modules/VC7WorkspaceCreator.pm: * modules/WorkspaceCreator.pm: Factored out the workspace_file_name method into the WorkspaceCreator. Wed Nov 29 19:07:38 UTC 2006 Chad Elliott * docs/MPC.sgml: * docs/USAGE: * modules/MPC.pm: * modules/MWC.pm: * modules/VC8WebProjectCreator.pm: * modules/VC8WebWorkspaceCreator.pm: Removed the vc8web project type. It has been replace with the 'webapp' project keyword in combination with the vc8 projec type. Wed Nov 29 18:18:54 UTC 2006 Chad Elliott * modules/WorkspaceCreator.pm: Fixed a bug where an aggregated workspace with scopes (other than exclude) would not be parsed properly. Thanks to James Hill for bringing this to my attention. Wed Nov 29 12:52:04 UTC 2006 Chad Elliott * templates/automake.mpd: Moved the compile_flags portion out of the CPPFLAGS_COMMON section into the specific _CPPFLAGS settings to allow users to put compile_flags settings inside the configuration definitions. Tue Nov 28 17:37:31 UTC 2006 Chad Elliott * modules/AutomakeWorkspaceCreator.pm: * templates/automake.mpd: Added the ability to set 'configurations' (as is done for vc6, vc7, etc.) so that different versions of executables and libraries can be built from the same Makefile.am. By default, the 'configurations' template variable is not set. Thanks to Friedhelm Wolf for providing the automake template modifications. Mon Nov 27 16:58:31 UTC 2006 Chad Elliott * modules/ProjectCreator.pm: Convert all output files from custom commands if the project type requires slash conversion. * templates/vc7csharp.mpd: * templates/vc7vb.mpd: * templates/vc8csharp.mpd: * templates/vc8vb.mpd: Made resource files not dependent upon any particular source file. Also, re-removed the .aspx support in the vc8 templates. See the modification from Tue Jun 20 12:41:49 UTC 2006. Wed Nov 22 18:07:56 2006 Steve Huston * templates/vc8platforms.mpt: Corrected macros and libs for Smartphone WinCE configurations. Wed Nov 22 20:40:58 UTC 2006 Chad Elliott * modules/ProjectCreator.pm: * templates/vc8csharp.mpd: * templates/vc8vb.mpd: Added support for resource files (.resx or .resources) and .aspx files for both csharp and vb for the vc8 project type. Wed Nov 22 19:54:01 UTC 2006 Chad Elliott * modules/VC8WorkspaceCreator.pm: The adjustment of the website project name wasn't correct. It needed to be the dirname of the project name instead of the basename. Wed Nov 22 19:34:29 UTC 2006 Chad Elliott * docs/README: * modules/ProjectCreator.pm: * modules/VC7ProjectCreator.pm: * modules/VC7WorkspaceCreator.pm: * modules/VC8ProjectCreator.pm: * modules/VC8WebWorkspaceCreator.pm: * modules/VC8WorkspaceCreator.pm: * modules/WorkspaceCreator.pm: Removed the scope keyword, webapp, from the workspace and added a new project keyword named webapp. If webapp is set to 1 in the project, it will be considered a Web Application, will not have a project file written for it and will be included in the workspace all if the project type supports Web Applications. Currently, only the vc8 project type supports them. Wed Nov 22 13:44:33 UTC 2006 Chad Elliott * docs/MPC.sgml: * docs/USAGE: * modules/Driver.pm: Added the ability to set the default type in the MPC configuration file. * docs/README: * modules/VC7WorkspaceCreator.pm: * modules/VC8WebWorkspaceCreator.pm: * modules/VC8WorkspaceCreator.pm: * modules/WorkspaceCreator.pm: Added a new scope keyword, webapp, to allow users to specify web application directories. Any directory specified within a webapp scope will be considered as a web application directory. Currently only the vc8 project type supports web application directories. * modules/ConfigParser.pm: Disallow empty names within the base configuration file (i.e., $VAR that evaluates to empty). Wed Nov 22 10:34:12 2006 Johnny Willemsen * modules/BMakeWorkspaceCreator.mpc: Give the workspace a .bmak extension when using make_coexistence and simplified workspace_file_name() * templates/bmake.mpd: * templates/bmakecommon.mpt: Removed support for the cbx compiler type which was the preview compiler shipped with CBuilderX. Thu Nov 16 13:34:26 UTC 2006 Chad Elliott * docs/README: * modules/ProjectCreator.pm: Added a new feature, Modify_Custom, that can be used to customize an existing Define_Custom. Thu Nov 16 12:25:18 UTC 2006 Chad Elliott * config/global.features: * config/xalanc.mpb: Added support for Xalan-C++. The xalanc feature is off by default. * modules/ConfigParser.pm: Support shell and make style environment variables. Fri Nov 10 16:48:14 UTC 2006 Kevin Heifner * docs/templates/vc7csharp.txt: * docs/templates/vc8csharp.txt: * templates/vc7csharp.mpd: * templates/vc8csharp.mpd: Added a new template variable, 'keyfile', to support assembly signing. Thu Nov 9 13:25:05 UTC 2006 Chad Elliott * modules/GHSWorkspaceCreator.pm: Removed the -I. from the default project and added --one_instantiation_per_object. Mon Nov 6 19:27:44 UTC 2006 Chad Elliott * modules/CCProjectCreator.pm: Code Composer checks the timestamp on the project file. So, we need to compare the output to ensure that we don't update a project file that doesn't need to be. * modules/ProjectCreator.pm: Fixed a bug where generated headers, inline files or template files would not be automatically added in the event that the user provided input for those types (i.e., Header_Files, Inline_Files, or Template_Files) that corresponds to a directory. Now, specifying the following: Header_Files { some_dir_name } works as if the Header_Files section was not supplied, which is equivalent to the following: Header_Files { . } This pertains to automatic addition of generated files. Mon Nov 6 15:11:47 UTC 2006 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug where unrecognized lines in 'specific' sections would not be flagged as an error. * modules/StringProcessor.pm (parse_assignment): Since template variable scopes can have spaces in the names, we must allow scopes to have spaces in the names here as well. * modules/Creator.pm: * modules/WorkspaceCreator.pm: Put quotes around the variable name when displaying an invalid assignment name. This allows spacing to be taken into account. * templates/make.mpd: The implementation for the 'targetoutdir' template variable was incorrect. 'targetoutdir' was not taken into account for the 'libpaths' setting. Thu Oct 26 15:45:18 UTC 2006 Chad Elliott * docs/templates/common.txt: * docs/templates/make.txt: * templates/make.mpd: * templates/makedll.mpt: Renamed the prelink template variable to prelinktarget to avoid conflicting with prelink used in other templates. * docs/templates/vc7.txt: * docs/templates/vc7csharp.txt: * docs/templates/vc7vb.txt: * docs/templates/vc8csharp.txt: Documented the template variables for these existing project types and language combinations. * docs/templates/vc8vb.txt: * modules/VC8ProjectCreator.pm: * templates/vc8vb.mpd: * templates/vc8vb.mpt: Added initial support for Visual Basic with vc8. * templates/bmake.mpd: * templates/nmake.mpd: Support the prelink template variable as is done in vc7 and vc8. * templates/vc7.mpd: Modified the template to use PreprocessorDefinitions for midl_defines under the VCMIDLTool section instead of AdditionalOptions. * templates/vc7csharp.mpd: * templates/vc7csharp.mpt: * templates/vc7vb.mpd: * templates/vc7vb.mpt: * templates/vc8csharp.mpd: * templates/vc8csharp.mpt: Changed the way the 'trace' template variable worked to be consistent between both vb and csharp with vc7 and vc8. Thu Oct 19 17:29:08 UTC 2006 Chad Elliott * modules/GHSWorkspaceCreator.pm: Modified to create an integrate file (for Integrity projects) and use it during the integration step. Mon Oct 16 13:33:46 UTC 2006 Chad Elliott * modules/AutomakeWorkspaceCreator.pm: * modules/BDSWorkspaceCreator.pm: * modules/BMakeWorkspaceCreator.pm: * modules/EM3WorkspaceCreator.pm: * modules/HTMLWorkspaceCreator.pm: * modules/MakeWorkspaceCreator.pm: * modules/NMakeWorkspaceCreator.pm: * modules/VC6WorkspaceCreator.pm: * modules/VC71WorkspaceCreator.pm: * modules/VC7WorkspaceCreator.pm: * modules/VC8WorkspaceCreator.pm: Use the create_command_line_string() method instead of printing the command line directly. This opens the door for disabling this functionality. * mpc.pl: * mwc.pl: Removed the unused Config module. * templates/makedll.mpt: For wrsppc, wrspentium, and ghsppc compilers, use $(CPUTYPE) instead of hard-coding the processor type. * templates/vc8.mpd: Remove the 'output_subdir' template value from all library and executable output paths. Wed Oct 4 17:08:21 UTC 2006 Chad Elliott * modules/GHSWorkspaceCreator.pm: For Integrity, a bsp file can not be added to the "Program" project, it must be added to the "INTEGRITY Application" project. So, for the ghs project type only, add .bsp files as documentation in the project and the bsp documentation files will be added as bsp files when the integrate project is created. Tue Oct 3 11:38:34 UTC 2006 Chad Elliott * modules/Creator.pm: * modules/ProjectCreator.pm: * modules/WorkspaceCreator.pm: Factored out the relative replacement code from the ProjectCreator into the Creator. This required the addition of two template methods to get different sets of data for relative replacement to maintain the same functionality in the ProjectCreator and similar functionality in WorkspaceCreator. * modules/TemplateParser.pm: Fixed a bug where a previous scope of a foreach would hang around even when the scope went away. This could cause strange results when nesting foreach's. Tue Sep 26 21:02:46 UTC 2006 Chad Elliott * docs/templates/bmake.txt: Documented the template variables used by the bmake template. * templates/automake.mpd: * templates/bmake.mpd: * templates/em3.mpd: * templates/make.mpd: * templates/nmake.mpd: * templates/vc6.mpd: * templates/vc7.mpd: * templates/vc7csharp.mpd: * templates/vc7vb.mpd: * templates/vc8.mpd: * templates/vc8csharp.mpd: If a custom definition has an 'output_option' set, the order of listing the input file changes such that it is listed before the output_option setting in the build rule. Tue Sep 26 11:49:52 UTC 2006 Chad Elliott * devtools/document_template.pl: Fixed bugs where complex foreach's (with functions) would not be recognized and default template variable values would be lowercased. * docs/README: Clarified the 'exclude' usage. * docs/USAGE: * docs/templates/cc.txt: * docs/templates/common.txt: * modules/CCProjectCreator.pm: * modules/CCWorkspaceCreator.pm: * modules/MPC.pm: * modules/MWC.pm: * modules/ProjectCreator.pm: * modules/WorkspaceCreator.pm: * templates/cc.mpd: * templates/cccommon.mpt: * templates/ccexe.mpt: * templates/cclib.mpt: Added complete support for Code Composer 2.0. This is an embedded application IDE for Windows only. Fri Sep 22 14:00:10 UTC 2006 Chad Elliott * modules/GHSWorkspaceCreator.pm: * docs/templates/ghs.txt: * templates/ghs.mpd: * templates/ghscommon.mpt: Fixed a couple of issues: 1) Exceptions were hard-coded to be on for all projects. It is now controlled by the 'exceptions' template variable and is on by default. 2) If the primary target is Integrity, Program projects need an intermediate INTEGRITY Application project to perform the integration properly. * modules/TemplateParser.pm: Fixed a bug where getting the default value of a template variable was not case-insensitive as it should have been. Wed Sep 20 16:26:48 UTC 2006 Chad Elliott * config/bison.mpb: * config/flex.mpb: * config/lex.mpb: * config/yacc.mpb: Added a 'requires' setting for each base project matching the file name (e.g requires += bison in bison.mpb). * config/ziparchive.mpb: Removed an extraneous comment. * templates/ghs.mpd: Changed the default primaryTarget to ppc_integrity.tgt and added <%exe_ext%> to <%exename%>. Tue Sep 19 13:04:15 UTC 2006 Chad Elliott * docs/MPC.sgml: * docs/USAGE: * docs/templates/ghs.txt: * modules/GHSProjectCreator.pm: * modules/GHSWorkspaceCreator.pm: * modules/ProjectCreator.pm: * modules/TemplateParser.pm: * templates/ghs.mpd: * templates/ghscommon.mpt: Modified the ghs project type to support the 4.x version of the Multi IDE. With this, the old .bld format has been removed. This version assumes that Multi is being run on Windows. If this is not the case, set the MPC_GHS_UNIX environment variable. * config/mfc.mpb: Used an else on the subsystem specific section instead of explicitly listing out the later versions of Visual C++. When vc9 is released, this file may not need to be modified. * config/openssl.mpb: Added nmake to the section related to Visual C++. * devtools/document_template.pl: Fixed a bug where template parser functions were seen as template variables to be documented. * docs/README: Clarified how the value for 'pure_libs' is interpreted. * templates/makedll.mpt: Updated support for the GHS compiler. Wed Sep 13 15:24:45 UTC 2006 Phil Mesnier * templates/em3.mpd: Fix typo in the base address supplied to the linker. This is necessary to debug WinCE applications. Wed Sep 6 16:20:27 UTC 2006 Chad Elliott * modules/ProjectCreator.pm: Backward compatibility was not complete for the 'install' keyword when scoped in a specific section. The resolve_alias() method did not take scoping into account. Thu Aug 31 23:18:57 UTC 2006 Chad Elliott * devtools/document_template.pl: Fixed a bug where variables found within a <%if()%> were not taken into account. * docs/templates/common.txt: Added some missing common template variable definitions. * docs/templates/make.txt: Defined all of the template variables specific to the make template. * modules/ProjectCreator.pm: Fixed a bug where target output directories (exeout, dllout, libout) were not escaped if they included spaces. * templates/make.mpd: * templates/makedll.mpt: Renamed dependencies to suppports_include which indicates whether a native version of make supports including files the may not exist at the time of make invocation. * templates/bmake.mpd: * templates/em3.mpd: * templates/ghs.mpd: * templates/nmake.mpd: * templates/sle.mpd: * templates/vc6.mpd: * templates/vc7.mpd: * templates/vc8.mpd: Fixed a bug where the lib modifier was still applied to libraries specified by the 'libs' project variable even if the 'use_lib_modifier' template variable was unset. * templates/bmakedll.mpt: * templates/bmakedllexe.mpt: * templates/bmakelib.mpt: * templates/bmakelibexe.mpt: * templates/common.mpt: * templates/em3vcpdll.mpt: * templates/em3vcpdllexe.mpt: * templates/em3vcplib.mpt: * templates/em3vcplibexe.mpt: * templates/nmakedll.mpt: * templates/nmakeexe.mpt: * templates/sledll.mpt: * templates/sleexe.mpt: * templates/vc6dspdll.mpt: * templates/vc6dspdllexe.mpt: * templates/vc6dsplib.mpt: * templates/vc6dsplibexe.mpt: * templates/vc7dll.mpt: * templates/vc7exe.mpt: * templates/vc7lib.mpt: * templates/vc7libexe.mpt: * templates/vc8dll.mpt: * templates/vc8lib.mpt: Factored out the 'use_lib_modifier' and 'use_exe_modifier' template variables into common.mpt. Mon Aug 28 12:09:16 UTC 2006 Chad Elliott * docs/MPC.sgml: * docs/README: * docs/USAGE: * modules/Options.pm: Updated incorrect documentation and added missing information. * modules/Driver.pm: Added a warning about the impending default type removal when no type is specified. * templates/make.mpd: Added the ability to force object files into a specific directory and added the ability to provide a "make include" file to override or augment makefile rules. * templates/vc7.mpd: * templates/vc8.mpd: Converted whitespace to tabs as Visual Studio would used. Mon Aug 21 09:12:12 UTC 2006 Johnny Willemsen * modules/ProjectCreator.pm (get_command_subs): Added crlf to the list, this can then be used in for example the prelink to have a multiline command. Thanks to Kees van Marle for adding this. Sat Aug 19 17:50:12 UTC 2006 Johnny Willemsen * templates/vc7.mpd: * templates/vc8.mpd: Added prelink as template variable, thanks to Kees van Marle for adding this. Sat Aug 19 01:22:51 UTC 2006 Chad Elliott * docs/MPC.sgml: Added this SGML document provided by Thomas Girard. It contains information similar to that which is found in the USAGE file. * docs/USAGE: * modules/Options.pm: Cosmetic changes to the usage output. * modules/Driver.pm: Fixed a bug where an MPC configuration file that didn't exist would be chosen from the code base configuration file. Wed Aug 16 22:22:31 UTC 2006 Chad Elliott * docs/USAGE: Added information to the logging section about the debug setting. * modules/WorkspaceCreator.pm: * modules/WorkspaceHelper.pm: Added a method, perform_custom_processing, to WorkspaceHelper to allow users to be able to inject data into the workspace. Tue Aug 15 23:50:48 UTC 2006 Chad Elliott * docs/USAGE: Fixed a minor typo. * modules/NMakeWorkspaceCreator.pm: Prefix the calls to cd with @ so that they are not printed during a make. * docs/README: * modules/Creator.pm: * modules/Options.pm: * modules/ProjectCreator.pm: * modules/StringProcessor.pm: * templates/bmake.mpd: * templates/em3.mpd: * templates/ghs.mpd: * templates/html.mpd: * templates/make.mpd: * templates/nmake.mpd: * templates/sle.mpd: * templates/vc6.mpd: * templates/vc7.mpd: * templates/vc7csharp.mpd: * templates/vc7vb.mpd: * templates/vc8.mpd: * templates/vc8csharp.mpd: Deprecated the 'install' keyword. It has been replaced with 'exeout' to be consistent with 'dllout' and 'libout'. The use of 'install' will still be accepted. Wed Aug 9 15:11:23 2006 Chris Cleeland * modules/ProjectCreator.pm (expand_variables): Corrected a problem where "pre/" and "post/" include slashes were being changed to have the wrong type of slash. Wed Aug 9 01:14:54 UTC 2006 Chad Elliott * devtools/document_template.pl: Corrected a bug where multiple variables used within a <%foreach%> would not be recognized correctly. * docs/USAGE: Clarified the documentation dealing with the MPC configuration files. * modules/AutomakeWorkspaceCreator.pm: Print out AM_CONDITIONAL's for all of the features known to the FeatureParser. * modules/BMakeWorkspaceCreator.pm: * modules/NMakeWorkspaceCreator.pm: Fixed a bug where an assumption is made that projects in different directories were assumed to be relative. When absolute directories are used, the Makefile would get confused about how to get back to the original directory. * modules/Driver.pm: Compare directories case-insensitively when running on a system that does not support case-sensitive file systems while searching for the correct MPC.cfg. * modules/Creator.pm: * modules/DirectoryManager.pm: * modules/Options.pm: * modules/ProjectCreator.pm: * modules/StringProcessor.pm: * modules/WorkspaceCreator.pm: Factored out and simplified code dealing with parsing assignments. * templates/nmake.mpd: Corrected information about getting a dependency generator for nmake. Thu Aug 3 02:45:12 UTC 2006 Chad Elliott * docs/templates: * docs/templates/common.txt: * devtools/document_template.pl: The script can be used to document all template variables found within a project template (.mpd file). Currently, only the template variables that are common to most templates are documented. * modules/ProjectCreator.pm: * modules/TemplateParser.pm: Added methods to get keywords for use within the devtools scripts. * highlight_template.pl: * devtools/highlight_template.pl: Moved this file into the devtools directory. Fri Jul 28 15:13:01 UTC 2006 Chad Elliott * modules/ProjectCreator.pm: Corrected a bug introduced by my change from Fri Jul 14 17:25:16 UTC 2006. The original change was intended to deal with Windows' inability to have empty environment variables. I have changed it to have a special case where then environment variable value of "" is interpreted as the users intent to have an empty string. Wed Jul 26 22:35:28 UTC 2006 Chad Elliott * docs/LICENSE: * docs/README: * docs/USAGE: Moved these files from the root directory into the newly created docs directory. * modules/TemplateParser.pm: * templates/automake.mpd: Added a new template function, keyname_used, that is used in the automake template to handle the situation where a custom input file is used with more than one custom defined type. If the custom input file caused more than one file to be generated in each custom defintion, the stamp file would be duplicated causing build errors. Tue Jul 25 15:36:29 UTC 2006 Chad Elliott * MPC version 3.4.0 released. Local Variables: add-log-time-format: current-time-string indent-tabs-mode: nil End: ace-6.4.5+dfsg.orig/MPC/history/ChangeLog-4_00000644000175000017500000005770313154167361016555 0ustar tggtggTue Sep 16 14:30:22 UTC 2014 Paul Calabrese * clone_build_tree.pl: Add .classpath to the list of build files cloned when using the -f option. Tue Sep 9 14:43:48 UTC 2014 Chad Elliott * modules/ProjectCreator.pm: Fixed a issue where a name modifier applied to projects and files (-name_modifier and -apply_project) causes the build order to be incorrect with the make project type (and possibly others). Thanks to Hubert Talbot for reporting it and providing the fix. Tue Sep 9 06:52:00 UTC 2014 Johnny Willemsen * docs/USAGE: Fixed typo, thanks to Pau Garcia i Quiles for providing the patch Fri Aug 15 15:31:45 UTC 2014 Dennis Feiock * config/coredx_ts_defaults.mpb: * config/splice_ts_defaults.mpb: Fixed custom action for linux builds. Wed Aug 13 13:51:51 UTC 2014 Dennis Feiock * config/coredx_ts_defaults.mpb: * config/splice_ts_defaults.mpb: Fixed custom action for vc11 builds. * config/udm.mpb: Link against vc10/vc11 libraries instead of the generic vc9 library. Fri Jul 11 14:58:13 UTC 2014 Chad Elliott * modules/ProjectCreator.pm: * templates/vc8csharp.mpd: Added support for resource files. These are different from embedded resource files. Thu Jul 10 14:17:10 UTC 2014 Chad Elliott * modules/Depgen/Driver.pm: Fixed a bug where the -isystem option was not used as an include path option. Mon Jun 30 17:35:25 UTC 2014 Chad Elliott * config/pin_base.mpb: * config/pintool.mpb: * config/winapp.mpb: * config/wireshark.mpb: * docs/README: * docs/USAGE: * modules/VC14ProjectCreator.pm: * modules/VC14WorkspaceCreator.pm: Removed references to vc13. * modules/VC13ProjectCreator.pm: * modules/VC13WorkspaceCreator.pm: * templates/vc13dll.mpt: * templates/vc13exe.mpt: * templates/vc13lib.mpt: * templates/vc13libexe.mpt: * templates/vc13platforms.mpt: Removed these files. It turned out that vc13 was redundant and is covered by vc12. * modules/ProjectCreator.pm: Fixed a bug in the handling of the dependency attribute of the 'after' keyword. Mon Jun 30 12:28:49 UTC 2014 Chad Elliott * modules/VC8WorkspaceCreator.pm: Support a dependency attribute for C# projects. By default, using the 'after' keyword causes a build depency *and* a project reference to be created. Using a dependency attribute of 'ProjectReference=false' on the 'after' setting will cause the build dependency to be retained, but the project reference will not be created. * modules/WorkspaceCreator.pm: If a workspace is in a directory below a project, the project references will be wrong due to the use of '..' within the generated project path. We will resolve the path as much as possible before counting the directory levels to ensure that the generated relative path is correct. Fri Jun 27 15:07:30 UTC 2014 Chad Elliott * docs/templates/vc8csharp.txt: * templates/vc8csharp.mpd: Added support for the UICulture setting. Fri Jun 27 13:55:06 UTC 2014 Chad Elliott * config/pin_base.mpb: * config/pintool.mpb: * config/winapp.mpb: * config/wireshark.mpb: * docs/README: Updated to support vc13. * modules/ProjectCreator.pm: * templates/vc8csharp.mpd: Added support for WPF. This includes the addition of AppDef_Files, Page_Files, and Splash_Files. Thu Jun 26 18:10:32 UTC 2014 Chad Elliott * docs/templates/vc8csharp.txt: * templates/vc8csharp.mpd: Added support for the 'Prefer32Bit' setting. * modules/VC11ProjectCreator.pm: * modules/VC12ProjectCreator.pm: * modules/VC14ProjectCreator.pm: Removed duplicate code. * modules/VC12WorkspaceCreator.pm: Fixed the inheritance and visual studio version number. * modules/VC14WorkspaceCreator.pm: Fixed the inheritance. * docs/USAGE: * modules/VC13ProjectCreator.pm: * modules/VC13WorkspaceCreator.pm: * templates/vc13dll.mpt: * templates/vc13exe.mpt: * templates/vc13lib.mpt: * templates/vc13libexe.mpt: * templates/vc13platforms.mpt: Added support for Visual Studio 2013. Thu Jun 26 16:28:39 UTC 2014 Chad Elliott * templates/vc10dll.mpt: * templates/vc10exe.mpt: * templates/vc10lib.mpt: * templates/vc10libexe.mpt: * templates/vc11dll.mpt: * templates/vc11exe.mpt: * templates/vc11lib.mpt: * templates/vc11libexe.mpt: * templates/vc12dll.mpt: * templates/vc12exe.mpt: * templates/vc12lib.mpt: * templates/vc12libexe.mpt: * templates/vc14dll.mpt: * templates/vc14exe.mpt: * templates/vc14lib.mpt: * templates/vc14libexe.mpt: * templates/vc1xdll.mpt: * templates/vc1xexe.mpt: * templates/vc1xlib.mpt: * templates/vc1xlibexe.mpt: Pulled vc10 through vc14 duplicated settings out into common vc1x template input files. This will make addition of VC1x project types cleaner. Mon Jun 23 12:49:54 UTC 2014 Johnny Willemsen * config/pin_base.mpb: * config/pintool.mpb: * config/winapp.mpb: * docs/html/MakeProjectCreator.html: * registry.pl: Added support for Visual Studio 2014 (vc14) Wed Jun 4 09:36:54 UTC 2014 Johnny Willemsen * modules/VC14ProjectCreator.pm: * modules/VC14WorkspaceCreator.pm: * templates/vc14dll.mpt: * templates/vc14exe.mpt: * templates/vc14lib.mpt: * templates/vc14libexe.mpt: * templates/vc14platforms.mpt: New files for msvc14, partly updated, not tested yet Fri May 23 19:11:37 UTC 2014 Chad Elliott * docs/templates/vc10.txt: * templates/vc10.mpd: Modified to allow the setting of the TargetFrameworkVersion to change the TargetFrameworkVersion of managed C++ projects. Thanks to Charles Calkins for bringing this to my attention. Tue May 6 12:32:53 UTC 2014 Chad Elliott * docs/templates/vc10.txt: * templates/vc10.mpd: Added a template variable to allow the user to override the default intermediate directory. Thanks to Craig Miller for providing this patch. * docs/templates/vc8csharp.txt: Document a missing template variable. Thu Apr 10 08:26:17 UTC 2014 Johnny Willemsen * config/nddslib.mpb: Set RTI_UNIX on non windows Thu Apr 10 06:38:25 UTC 2014 Johnny Willemsen * config/nddslib.mpb: Should set RTI_UNIX on linux Wed Apr 9 13:11:59 UTC 2014 Johnny Willemsen * config/nddslib.mpb: If prop:windows is not set, don't set RTI_UNIX, could be that we are on windows using GNU make. If ACE_PLATFORM_CONFIG is config-win32.h, we do use -DRTI_WIN32, we are than on Windows Fri Mar 21 16:32:10 UTC 2014 Adam Mitz * config/sqlapi.mpb: Added base project for SQLAPI (www.sqlapi.com). * docs/templates/make.txt: * templates/make.mpd: Added a template variable 'default_configuration'. Sun Mar 16 21:50:26 UTC 2014 James H. Hill * config/pintool.mpb: Fixed building pintools on 64-bit Windows machines. Thu Mar 13 12:05:13 UTC 2014 Johnny Willemsen * config/pin_base.mpb: * config/pintool.mpb: * config/winapp.mpb: Added vc12 * registry.pl: Added vc11 and vc12 Wed Mar 12 21:29:08 UTC 2014 James H. Hill * config/winapp.mpb: Fixed vc11 project configuration errors. Fri Mar 7 07:45:41 UTC 2014 Johnny Willemsen * templates/vc10.mpd: Corrected debug_cmd_args and debug_work_dir as template variables Fri Mar 7 04:26:21 UTC 2014 Adam Mitz * modules/MakeWorkspaceBase.pm: When makefiles have a maximum line length limit (only bmake), make sure that 'all' is still the default target in workspaces that have enough projects to exceed that line length limit. Wed Mar 5 21:59:52 UTC 2014 Adam Mitz * templates/make.mpd: Fixed a bug in the previous change for making postbuild always run after the primary output -- now it works with sharedlibs as well. * modules/MakeWorkspaceCreator.pm: * modules/MakeWorkspaceBase.pm: * modules/NMakeWorkspaceCreator.pm: Made the "make depend" target work with parallel make. * modules/Depgen/MakeDependencyWriter.pm: If the environment variable MPC_DEPGEN_EXCLUDE is set, it is used as a whitespace-separated list of patterns. A potential dependency header file that matches one of those patterns is excluded from the depend file. This is useful for speeding up builds that have a subtree with a lot of headers which don't change much (such as third-party headers or the equivalent of /usr/include). Tue Mar 4 04:04:59 UTC 2014 James H. Hill * config/pin_base.mpb: * config/pintool.mpb: Added support for vc10 and vc11. * templates/vc10.mpd: Updated ImageHasSafeExceptionHandlers to take either true|false since current method made it impossible to set ImageHasSafeExceptionHandlers to false. Sun Mar 2 21:55:48 UTC 2014 James H. Hill * config/pin_base.mpb: Fixed link errors with debug version of Pintool on vc10. Fri Feb 28 04:12:34 UTC 2014 James H. Hill * config/pin_base.mpb: * config/pintool.mpb: Added support for vc10. Tue Feb 25 14:17:16 UTC 2014 Johnny Willemsen * templates/bmake.mpd: For bcc32 default to -O1 for optimized builds, not to -O2 because testing showed that -O2 causes some problems with TAO tests Thu Feb 20 07:55:16 UTC 2014 Johnny Willemsen * templates/bmakecommon.mpt: Improvements for bcc64 Mon Feb 17 11:59:48 UTC 2014 Johnny Willemsen * docs/templates/vc10.txt: * templates/vc10.mpd: Added debug_cmd_args and debug_work_dir as template variables Mon Feb 17 11:45:32 UTC 2014 Johnny Willemsen * templates/nmake.mpd: Don't use /FD when compiling sources, that option should only be specified by the MS IDE, not when compiling from a build system or commandline, see http://msdn.microsoft.com/en-us/library/6ce2bkt7.aspx Tue Jan 28 02:37:12 UTC 2014 James H. Hill * config/pin_base.mpb: Fixed configuratation errors for building debug version of pintools on Windows. Mon Jan 6 08:15:22 UTC 2014 Johnny Willemsen * templates/vc10platforms.mpt: Set the platform toolset explicit to v100, thanks to Winston Jenks for pointing out that this should be done Tue Nov 19 17:43:48 UTC 2013 Phil Mesnier * templates/vc10.mpd: Fix for condition that appears when using custom commands in a project that include concatinated steps. The build tool appears to execute the text following the & in the "Invoking" message body. Encapsulating the message string in quotes resolves this. Thanks to Dave Cornelius Tue Nov 19 07:37:13 UTC 2013 Johnny Willemsen * templates/vc11dll.mpt: * templates/vc11exe.mpt: * templates/vc11lib.mpt: * templates/vc11libexe.mpt: Use vc11 instead of vc10, fixes bugzilla 4147, thanks to Russ Noseworthy for reporting this Mon Nov 18 16:12:07 UTC 2013 James H. Hill * config/pin_base.mpb: * config/pintool.mpb: * config/pintool_static.mpb: Fixed compilation errors on Linux. Mon Nov 18 00:05:53 UTC 2013 James H. Hill * config/pin_base.mpb: * config/pintool.mpb: * config/pintool_static.mpb: Refactored base projects to so that there is one for building a static pintool vs building a non-static pintool since it links to different libraries, and the approach for developing either one is completely different. Mon Nov 11 22:29:26 UTC 2013 James H. Hill * config/pin.mpb: Added 'avoids' definition to feature definitions. Mon Nov 11 17:27:23 UTC 2013 Phil Mesnier * docs/USAGE: Clean up a couple of typos. Tue Oct 29 12:30:07 UTC 2013 Johnny Willemsen * modules/VC12ProjectCreator.pm: * modules/VC12WorkspaceCreator.pm: * templates/vc12dll.mpt: * templates/vc12exe.mpt: * templates/vc12lib.mpt: * templates/vc12libexe.mpt: * templates/vc12platforms.mpt: Starter templates for vc12, needs some more work later, just now seperate templates and creators Tue Oct 29 10:41:11 UTC 2013 Johnny Willemsen * docs/README: * docs/USAGE: Added vc11/vc12 Tue Oct 29 10:31:02 UTC 2013 Johnny Willemsen * docs/html/MakeProjectCreator.html: Added vc11/vc12 Tue Oct 29 06:00:44 UTC 2013 James H. Hill * config/pin.mpb: Fixed compilation errors on MacOS X. Fri Oct 25 18:42:59 UTC 2013 James H. Hill * config/pin.mpb: Moved verbatim code from 'top' to 'macros' section. Thu Oct 3 13:13:33 UTC 2013 Johnny Willemsen * config/ndds_ts_defaults.mpb: Don't use quote for dependent, causes Visual Studio not be able to compile files with rtiddsgen Fri Sep 27 20:48:52 UTC 2013 Adam Mitz * config/boost_chrono.mpb: Adding a new mpb for a new Boost library. Sat Sep 7 15:15:55 UTC 2013 Chad Elliott * modules/ConfigParser.pm: Remove leading and trailing spaces from lines read from a file to avoid adding them to paths and other values. * modules/WorkspaceCreator.pm: Replace '.' with '__' in project names used within Graphviz files. Names with periods in them are not accepted. * templates/make.net.mpd: Use libs, lit_libs, and pure_libs as is done within the vc8 C# template. * templates/vc8csharp.mpd: If a config file group has the 'generates_source' setting, we will add a .Designer.cs file to the compile list. Sat Sep 7 03:49:06 UTC 2013 James H. Hill * config/pin.mpb: * config/pintool.mpb: Fixed compilation and runtime errors on MacOS X. Fri Sep 6 20:51:59 UTC 2013 James H. Hill * config/pin.mpb: * config/pintool.mpb: Separated the definitions for linking against Pin without creating a Pintool, and for creating a Pintool. Sat Aug 24 18:40:18 UTC 2013 James H. Hill * config/udm.mpb: Update to latest version of UDM. * config/pintools_32bit.mpb: Removed this file. Sat Aug 24 18:36:37 UTC 2013 James H. Hill * config/pintool.mpb: Renamed base project, and improved support for intel64 and ia32. * config/pintools_32bit.mpb: Removed this file. Mon Aug 19 09:52:47 CDT 2013 Adam Mitz * templates/make.mpd: * templates/makedll.mpt: If we have GNU Make, no need for a rule to touch the .depend file. Mon Aug 19 07:22:20 UTC 2013 Johnny Willemsen * templates/bmake.mpd: bcc64 has no support for pch Wed Aug 7 07:12:31 UTC 2013 Johnny Willemsen * templates/bmake.mpd: * templates/bmakecommon.mpt: * templates/wb30exe.mpt: Optional support for Embarcadero C++ BuilderXE4 using bcc64 commit 868d7e4b98937d72b11704eb8ad176ba3a7a8f0c Author: Johnny Willemsen Date: Wed Jun 26 13:23:05 2013 +0200 Disable warning * templates/bmakecommon.mpt: commit 343897776235c7eec82609fc2662699bc4e8b303 Author: Johnny Willemsen Date: Thu Jun 20 14:04:21 2013 +0200 bcc32 attempt fix * templates/bmake.mpd: commit 419e2b2b441ab8be42a1f07a4c657b1d56cfcfda Author: Johnny Willemsen Date: Mon May 27 21:03:35 2013 +0200 release fix * templates/bmake.mpd: commit 17f31fbe7ace3f9f2eca7ccd97224b4fddab5d13 Author: Johnny Willemsen Date: Mon May 27 20:49:56 2013 +0200 Switch 32/64 * templates/bmake.mpd: commit 9c6f7276d252354d59642acfefb29bdd32a73d64 Author: Johnny Willemsen Date: Mon May 27 20:39:50 2013 +0200 Support for 32/64 common libs * templates/bmake.mpd: * templates/bmakecommon.mpt: commit bf93fc1382d6a5dfc9b8be98b8a3c1e8fb1ca47a Author: Johnny Willemsen Date: Mon May 27 20:32:35 2013 +0200 Handle different libext * templates/bmake.mpd: * templates/bmakecommon.mpt: commit 7d7352e64dd3e6054327df6cf904d66d878a8a14 Author: Johnny Willemsen Date: Mon May 27 20:25:46 2013 +0200 Added path for startup obj * templates/bmake.mpd: commit f258eaa34f75c4eeb01a6ab9dceb1cc0698cdf2f Author: Johnny Willemsen Date: Mon May 27 19:23:33 2013 +0200 Obj extension and startup object * templates/bmake.mpd: * templates/bmakecommon.mpt: commit cf382b74a31665f253fe6d391e4265150cfa08e3 Author: Johnny Willemsen Date: Mon May 27 18:15:17 2013 +0200 Use correct linker * templates/bmake.mpd: commit 967f92ce04790a4eba1b416f9008c7f7c7feb69c Author: Johnny Willemsen Date: Mon May 27 17:13:45 2013 +0200 Use -o instead of -n with bcc64 * templates/bmake.mpd: commit 72498537d3fb82064f1865d9a95bcb4c59267a12 Author: Johnny Willemsen Date: Mon May 27 16:34:37 2013 +0200 64bit needs space after -n * templates/bmake.mpd: commit 347735af4a8c8be4e79dc21dbdeea05949a6778f Author: Johnny Willemsen Date: Mon May 27 16:30:24 2013 +0200 Zap a few options that clang64 doesn't support * templates/bmake.mpd: commit 21237991013bbeb96cf050bc2b85299064a29749 Author: Johnny Willemsen Date: Mon May 27 16:26:54 2013 +0200 Common_flags * templates/bmake.mpd: * templates/bmakecommon.mpt: commit 06a0fb4d793fb13c2288d324c4e67b20304a90cb Author: Johnny Willemsen Date: Mon May 27 16:21:16 2013 +0200 32/64 warnflagsd * templates/bmake.mpd: * templates/bmakecommon.mpt: commit 4db86c833e0edf2dce6d372376d1505ebf353a81 Author: Johnny Willemsen Date: Mon May 27 16:19:08 2013 +0200 Tweak 32/64 OCFLAGS * templates/bmake.mpd: commit 42d96e494a7365c2cb9dff94cacba271baabf9c4 Author: Johnny Willemsen Date: Mon May 27 16:08:23 2013 +0200 Work in progress for bcc64 * templates/bmake.mpd: * templates/bmakecommon.mpt: * templates/wb30exe.mpt: commit 2ce83e3fc41d95463b9234ec0acb02a66bdcfbd6 Author: Johnny Willemsen Date: Mon May 27 15:44:26 2013 +0200 Started with 64bit * templates/bmakecommon.mpt: commit b68f3f361fed4325680f90719b4416f5948daec5 Author: Johnny Willemsen Date: Fri Aug 17 20:42:42 2012 +0200 * templates/bmakecommon.mpt: Revert commit 04c3e35b9cbfd8b2e06d659121ed68e59d5ed0e1 Author: Johnny Willemsen Date: Fri Aug 17 20:39:53 2012 +0200 * templates/bmakecommon.mpt: Added support for BUILDBITS64 Tue Jul 9 15:06:50 UTC 2013 Adam Mitz * templates/make.mpd: If object files are moved to a different directory (by using targetoutdir or obj_dir), apply the transdir function so that source files in relative directories still result in object files within the custom object directory. obj_dir or targetoutdir may contain variable replacement expressions (starting with $) and these are preserved in the .depend files as well. * modules/Depgen/MakeObjectGenerator.pm: Make depgen aware of the different rules for -type make obj dirs. * modules/TemplateParser.pm: Provide a way to escape the variable replacement expressions in makefiles with a general "subst" function (implemented as Perl s///g). * modules/DirectoryManager.pm: In translate_directory(), fixed a bug in the regex for changing repeated occurrences of .. to dotdot. Wed Jun 26 16:14:28 UTC 2013 Phil Mesnier * modules/Version.pm: MPC version 4.0 released. Local Variables: mode: change-log add-log-time-format: (lambda () (progn (setq tz (getenv TZ)) (set-time-zone-rule UTC) (setq time (format-time-string %a %b %e %H:%M:%S %Z %Y (current-time))) (set-time-zone-rule tz) time)) indent-tabs-mode: nil End: ace-6.4.5+dfsg.orig/MPC/history/ChangeLog-3_80000644000175000017500000012021413154167361016550 0ustar tggtggWed Feb 2 14:01:25 UTC 2011 Brian Johnson * clone_build_tree.pl: Removed explicit "build" directory matching in favor of $expected for preventing clone build directory from being. Fri Jan 21 20:44:36 UTC 2011 Brian Johnson * clone_build_tree.pl: Limited core pattern match to just files. Mon Jan 3 18:08:05 UTC 2011 Johnny Willemsen * config/lzo2.mpb: Added support for LZO2_INCDIR Mon Jan 3 15:52:47 UTC 2011 Johnny Willemsen * config/lzo1.mpb: Added support for LZO1_INCDIR Wed Dec 22 17:28:56 UTC 2010 Adam Mitz These changes were initially developed on the "rpmspec" branch. * modules/RpmSpecProjectCreator.pm: * modules/RpmSpecWorkspaceCreator.pm: New type for generating RPM .spec files. * modules/Options.pm: Don't generate trailing whitespace in the list of types. * modules/Creator.pm: Extracted the =, +=, -= handling so it can be reused elsewhere. * modules/WorkspaceCreator.pm: Keep track of aggregated workspaces for use by some particular WorkspaceCreators. Allow "specific" scopes within workspaces. * devtools/document_template.pl: Added ability to process templates embedded in Perl modules. * docs/USAGE: Added new types to the usage info for -type. * docs/README: * docs/html/MakeProjectCreator.css: * docs/html/MakeProjectCreator.html: * docs/html/RpmSpec.html: * docs/html/rpmworkflow.dot: * docs/html/rpmworkflow.png: * docs/templates/rpmspec.txt: Documented rpmspec type and "specific" scopes in workspaces. * modules/mpc_debug.pm: New Perl module to assist with debugging MPC. * modules/Driver.pm: * modules/Parser.pm: * modules/ProjectCreator.pm: * mwc.pl: Use mpc_debug. Mon Dec 20 18:55:04 UTC 2010 Adam Mitz * templates/vc10.mpd: Fixed TargetName for static libs -- previously it was blank. Mon Dec 20 13:40:26 UTC 2010 Chad Elliott * docs/html/MakeProjectCreator.html: Changed the example to use the current project variable name, 'exeout', instead of 'install'. * modules/Options.pm: Warn the user when they provide a path to -relative that is not a full path. * modules/OutputMessage.pm: Change new line characters to a newl line plus spaces to make the messages align. * modules/ProjectCreator.pm: * modules/StringProcessor.pm: Fixed a bug where assignments of values with spaces or $() that ended in a back-slash would result in the removal of one of the surrounding double quotes. Thu Dec 2 12:57:11 UTC 2010 Chad Elliott * docs/README: * docs/html/MakeProjectCreator.html: * modules/ProjectCreator.pm: * templates/vc8.mpd: Committing changes provided by Artur Doci . This provides support for the 'dependent_upon' keyword for use within the scope of Header_Files for C++ projects for vc8 and vc9 only. Thu Dec 2 08:57:38 UTC 2010 Johnny Willemsen * config/ndds_ts_defaults.mpb: Incremented TAO version to 2.0 Wed Dec 1 00:21:47 UTC 2010 Adam Mitz * templates/cdt6platforms.mpt: Set the outputtype_superclass so it works for both debug and release. Tue Nov 30 12:58:03 UTC 2010 Chad Elliott * modules/Creator.pm: * modules/MakeProjectCreator.pm: * modules/ProjectCreator.pm: * modules/VC10ProjectCreator.pm: * modules/VC6WorkspaceCreator.pm: * modules/VC7ProjectCreator.pm: * modules/VC7WorkspaceCreator.pm: * modules/VC8ProjectCreator.pm: * modules/VC8WorkspaceCreator.pm: * modules/WixProjectCreator.pm: Made modifications to the use of constants within the initialization of file level hash maps. They need to be called like functions in order to support Perl 5.6. Fri Nov 12 12:39:55 UTC 2010 Chad Elliott * config/mfc.mpb: * config/winapp.mpb: Factored out portions that instruct a Windows project to be a GUI. * config/wxadvanced.mpb: * config/wxaui.mpb: * config/wxbase.mpb: * config/wxcore.mpb: * config/wxdbgrid.mpb: * config/wxgl.mpb: * config/wxhtml.mpb: * config/wxmedia.mpb: * config/wxnet.mpb: * config/wxodbc.mpb: * config/wxpropertygrid.mpb: * config/wxqa.mpb: * config/wxribbon.mpb: * config/wxrichtext.mpb: * config/wxstc.mpb: * config/wxxml.mpb: * config/wxxrc.mpb: Added base projects for the various wxWindows. * config/wxmake.mpb: * config/wxmsvs.mpb: These base projects are project type specific and designed to work with wxWindows. The comments inside the files describe their use. * modules/BCB2007WorkspaceCreator.pm: * modules/BMakeWorkspaceCreator.pm: * modules/CDT6ProjectCreator.pm: * modules/CDT6WorkspaceCreator.pm: * modules/HTMLWorkspaceCreator.pm: * modules/NMakeWorkspaceCreator.pm: * modules/ProjectCreator.pm: * modules/VC6WorkspaceCreator.pm: * modules/VC7WorkspaceCreator.pm: * modules/VC8WorkspaceCreator.pm: * modules/WB26WorkspaceCreator.pm: * modules/WixWorkspaceCreator.pm: * modules/WorkspaceCreator.pm: Use constants to access the 'project_info' arrays instead of magic numbers. Also, a method from ProjectCreator can be used to pull specific values out of the 'project_info' instead of directly accessing the array. ProjectCreator also has a bug fix relating to the use of Modify_Custom in conjunction with a built-in component type (e.g., Source_Files). If that is used, files that are generated from other custom definitions were not getting added to the project. * templates/makedll.mpt: Changed the link flags to use both -shared and -dynamic. Earlier versions of gcc used -dynamic and later versions use -shared. Fri Nov 12 08:49:38 UTC 2010 Johnny Willemsen * modules/TemplateParser.pm: Committed fix from Adam Mitz that fixed problems with dds4ccm and cdt6/cdt7. Wed Nov 10 02:28:28 UTC 2010 James H. Hill * config/splice_ts_defaults.mpb: Updated the idlflags statement to include a new location since the location of the IDL files changed in OpenSplice DDS 5.3. Thu Nov 4 11:38:47 UTC 2010 Charles Calkins * modules/WixWorkspaceCreator.pm: Fixed fuzz error. Wed Nov 3 16:42:10 UTC 2010 Charles Calkins * modules/CDT6WorkspaceCreator.pm: * modules/NMakeWorkspaceCreator.pm: * modules/TemplateParser.pm: * modules/VC7WorkspaceCreator.pm: * modules/WixWorkspaceCreator.pm: Re-enabled the wix "make_group" flag. Wed Nov 3 15:41:16 UTC 2010 Charles Calkins * modules/VC7WorkspaceCreator.pm: Temporarily removed wix "make_group" flag. Wed Nov 3 15:37:12 UTC 2010 Charles Calkins * modules/CDT6WorkspaceCreator.pm: * modules/TemplateParser.pm: * modules/WixWorkspaceCreator.pm: Temporarily removed wix "make_group" flag. Wed Nov 3 14:53:37 UTC 2010 Charles Calkins * docs/templates/wix.txt: * modules/CDT6WorkspaceCreator.pm: * modules/TemplateParser.pm: * modules/VC7WorkspaceCreator.pm: * modules/WixProjectCreator.pm: * modules/WixWorkspaceCreator.pm: * templates/wix.mpd: * templates/wix.mpt: * templates/wixcs.mpd: * templates/wixcs.mpt: Extended the "wix" project type to support C#, decorated names, internationalized .NET resources, and generation of components and groups based on configurations and platforms. Wed Nov 3 14:31:32 UTC 2010 Adam Mitz * modules/StringProcessor.pm: * modules/TemplateInputReader.pm: Allow a - character in a template variable scope name. * templates/wb30dll.mpt: Use the - character in the buildspec scoped names to match the names used by Wind River Workbench. Mon Nov 1 18:21:59 UTC 2010 Adam Mitz * modules/StringProcessor.pm: Added a "merge" function for appending non-duplicates onto a list. * modules/DirectoryManager.pm: * modules/ProjectCreator.pm: Use the StringProcessor::merge() function where applicable. Fixed a bug where the custom type explicit dependencies (<<) were not tracked separately for each type. Added <%pathsep%> as a pseudo-variable (; or :). Added the capability called "combined custom", which (when enabled by the specific project creator) treats input files used by more than one custom type as if they were just in one type, and that type has multiple commands and the combined set of inputs and outputs. See the HTML documentation for details. * modules/CDT6ProjectCreator.pm: * modules/VC10ProjectCreator.pm: Enabled combined custom. * modules/CDT6WorkspaceCreator.pm: * modules/CDT7ProjectCreator.pm: * modules/CDT7WorkspaceCreator.pm: Added the cdt7 type, which builds on cdt6 and therefore doesn't need its own templates. Eclipse's CDT version 7 comes with the "Helios" (3.6) version of Eclipse. * docs/README: * docs/html/MakeProjectCreator.html: Documented <%pathsep%> and combined-custom. * templates/cdt6cproject.mpd: Cleaned up a lot of formatting and simplifed some of the MPC template language constructs, added uses of cdt7-specific variables. Added support for combined custom. * templates/cdt6project.mpd: Support cdt7. * templates/vc10.mpd: Added support for combined custom. Thu Oct 28 11:44:02 UTC 2010 Chad Elliott * docs/USAGE: * modules/Options.pm: Added information to the -into option description that desribes behavior when a project is referenced via a full path. * docs/html/MakeProjectCreator.html: Fixed the wording of the -base option description. And, added information to the -into option description that desribes behavior when a project is referenced via a full path. * modules/Creator.pm: Added code to warn the user that using the -into option with a project that is referenced via a full path will not work properly. * modules/DirectoryManager.pm: * modules/WorkspaceCreator.pm: Modified to append a slash to directories that are only a drive letter and colon. * mpc.pl: * mwc.pl: Modified these scripts to pull in ACE specific modules and config files if the ACE_ROOT environment variable is set and MPC is located underneath the directory to which ACE_ROOT points. Wed Oct 20 09:18:05 UTC 2010 Johnny Willemsen * config/nddsmonitor.mpb: New base project for RTI ndds monitor library Mon Oct 11 20:40:13 UTC 2010 Chad Elliott * docs/templates/make.txt: * templates/make.mpd: * templates/makedll.mpt: Added support for the 'profile' and 'coverage' template variables. If a compiler has options for profiling and coverage testing, they will be added to the compile and link lines. * modules/CommandHelper.pm: Added a comment about escaping regular expression special characters. * modules/ProjectCreator.pm: Fixed a bug where a source file that was explicitly added and ends in _T.cpp would automatically be added as a template file if the template files component was left defaulted. * templates/nmake.mpd: Added support for the 'profile' template variable. Mon Oct 4 15:32:05 UTC 2010 Adam Mitz * modules/ProjectCreator.pm: * templates/vc8csharp.mpd: Added "Embedded_Resource_Files" as a component name for C#. From Charles Calkins (calkinsc at ociweb dot com). Mon Sep 27 11:44:08 UTC 2010 Johnny Willemsen * config/wireshark.mpb: vc10 support Fri Sep 17 11:25:48 UTC 2010 Chad Elliott * docs/README: * docs/html/MakeProjectCreator.html: * templates/vc8csharp.mpd: Removed trailing whitespace. * docs/templates/make.txt: * modules/MakeWorkspaceCreator.pm: * templates/make.mpd: * templates/makedll.mpt: Added support for the check-syntax target used by emacs. * modules/Options.pm: Fixed a typo. * modules/ProjectCreator.pm: Cleaned up and commented a bit of code. Tue Sep 14 19:38:30 UTC 2010 Adam Mitz * prj_install.pl: Fixed a bug in the symlink-detection logic when the same file appears in more than one MPC component list. Mon Sep 13 21:51:32 UTC 2010 Adam Mitz * docs/templates/vc8csharp.txt: * templates/vc8csharp.mpd: Added and documented the DisableSpecificWarnings template variable. Thanks to Charles Calkins (calkinsc at ociweb dot com) for this and the previous change. Mon Sep 13 21:11:20 UTC 2010 Adam Mitz * docs/USAGE: Fixed a typo. * templates/vc10.mpd: Removed a redundant \ from the OutDir. Added warning_level settings for "all" and "none", adding to the existing levels of 1-4. * docs/templates/vc10.txt: Documented warning levels. Fri Sep 10 15:06:04 UTC 2010 William R. Otte * config/xscdefaults.mpb: Added from CIAO. Tue Aug 31 20:21:25 UTC 2010 Chris Cleeland * templates/cdt6cproject.mpd: Changed announcement message for custom build steps to not include the command. Putting in the command caused problems for custom types whose command included <%quote%>, and those are sometimes required due to other issues. When those other issues are resolved, we can put the command back in the announcement message. Mon Aug 30 19:21:23 UTC 2010 Adam Mitz * modules/CDT6ProjectCreator.pm: Added the ability to override platform auto-detection using an environment variable. * modules/ProjectCreator.pm: Added pre_write_output_file() as a hook method that can be overriden by specific ProjectCreators. * modules/VC10ProjectCreator.pm: Override pre_write_output_file(), but it doesn't do anything yet. * templates/nmake.mpd: - Normalized start-of-line whitespace to be a tab for all lines that start commands (not inline script files). Nmake itself doesn't care about the start-of-line whitespace but it helps editors. - Use /GX- to disable /EHsc when managed. - Generate a unique temp file name instead of always using tempfile.bat. There appears to be a bug with nmake on some machines where it still has an open file handle and it's trying to delete/overwrite the temp file. Mon Aug 30 15:38:18 UTC 2010 Adam Mitz * config/qt4_gui.mpb: Some systems with both qt3 and qt4 installed need to run the moc and uic tools as "moc-qt4" and "uic-qt4". Allow this to be enabled by setting the QT4_SUFFIX environment variable. Fri Aug 27 21:34:44 UTC 2010 Brian Johnson * templates/automake.mpd: * templates/cdt6cproject.mpd: * templates/em3.mpd: * templates/ghs.mpd: * templates/make.mpd: * templates/make.net.mpd: * templates/nmake.mpd: * templates/vc10.mpd: * templates/vc6.mpd: * templates/vc7.mpd: * templates/vc8.mpd: Changed to use !need_staticflag to prevent dependent_libs from being generated for static projects. * templates/wb26wrmakefile.mpd: Added dependent_libs keyword handling to wb26. Fri Aug 27 18:21:22 UTC 2010 Adam Mitz * modules/ProjectCreator.pm: Warn if an assignment to 'after' contains an invalid project name. Fri Aug 27 14:59:06 UTC 2010 Chad Elliott * modules/GHSProjectCreator.pm: * modules/ProjectCreator.pm: * modules/VC8ProjectCreator.pm: * modules/WB30ProjectCreator.pm: Changed post_file_creation() to return an error status. Returning undef indicates no error. A string returned is used as the error message. Additionally, a valid_project_name() has been added and the list of invalid project name characters has been expanded to cover most of those that are not allowed by Visual Studio and those that do not work within a makefile. Thu Aug 26 15:04:04 UTC 2010 Adam Mitz * modules/ProjectCreator.pm: For types with more than one template, only issue the source_callback for the "visible" template. * modules/VC8WorkspaceCreator.pm: The "temporary hack" for vc10 is no longer needed due to this fix in ProjectCreator.pm. Wed Aug 25 20:56:36 UTC 2010 Brian Johnson * modules/ProjectCreator.pm: Added dependent_libs keyword to indicate dependency on a library. It is similar to the dependent keyword, but should be used to make sure to rebuild the project when a library needs to be rebuilt for its dependent executable. * modules/TemplateParser.pm: - keywords was changed to use flag parameters to identify which flags were set for each keyword. These parameters were also used throughout the module instead of hard-coded values. - A new flag was added called get_combined_type which indicates that the types get_xxx function doesn't have an intermediate return value that could be passed back into a doif_xxx function. - process_compound_if had functionality added that if there is a single cmd (not nested), there is a doif function for the type, and if the type doesn't have a combined get function, then the cmd is added in a second time into the cmd array, so that the first pass the get_xxx function is called and its returned value is passed to the doif_xxx function. - basename keyword was changed to have bits 1-3 set and the appropriate functions were added. - dirname was changed to use tp_dirname instead of validated_dirname, so that $(...) and ../ are not removed and so that get_dirname doesn't call doif_dirname and returns the actual dirname. - All get_xxx functions that called their doif_xxx function had the get_combined_type bit added, except transdir, which had get_transdir changed to return the actual translated directory string. * templates/automake.mpd: * templates/cdt6cproject.mpd: * templates/em3.mpd: * templates/ghs.mpd: * templates/make.mpd: * templates/make.net.mpd: * templates/nmake.mpd: * templates/vc10.mpd: * templates/vc6.mpd: * templates/vc7.mpd: * templates/vc8.mpd: Added dependent_libs functionality. * templates/nmake.mpd: Added dependent_libs functionality. Added code for handling custom_types for each configuration. Wed Aug 25 18:36:32 UTC 2010 Adam Mitz * docs/templates/vc10.txt: Completed all template documenatation for vc10. * templates/vc10.mpd: Whitespace changes, removed a duplicated section, and changed some values that were <%if(x)%>true<%endif%> because the user may reasonably want to set them to "false" (since they default to true). * templates/vc8csharp.mpd: Whitespace changes only. Tue Aug 24 19:45:29 UTC 2010 Adam Mitz * docs/templates/vc10.txt: * docs/templates/vc8csharp.txt: Documented recent changes that impact template variables. The vc10 file was generated by the script so it still has placeholders for variables that aren't yet documented. These should be completed before too long. * modules/VC10WorkspaceCreator.pm: * modules/VC8WorkspaceCreator.pm: * modules/VC9WorkspaceCreator.pm: Account for differences in the way Website projects are listed in the solution files for both vc9 and vc10. Tue Aug 24 13:57:23 UTC 2010 Adam Mitz * modules/WB26WorkspaceCreator.pm: Further refinement to the change from Fri Jul 9 21:16:23 UTC 2010 Adam Mitz the .lst (list) file will now have relative paths, because Perl's Cwd::abs_path() can't be used portably on directories that don't exist yet (which is the case with -into). Mon Aug 23 22:29:24 UTC 2010 Adam Mitz * templates/vc8csharp.mpd: Support adding a single .manifest file per project in Source_Files in C# from Visual Studio 2008 and up (vc9+). Fri Aug 20 21:40:40 UTC 2010 Adam Mitz * modules/ProjectCreator.pm: Allow template variables to use an "extended attributes" notation, which borrows syntax from what "after" already supports: variables += value:attrname1=attrval1[,attrname2=attrval2]... The "value" part is referenced in the template as <%variable->_default%> and the "attrval" parts are referenced as <%variable->attrname1%>. * modules/TemplateParser.pm: * modules/VC7ProjectCreator.pm: Changed the GUID generation algorithm for <%guid%> and <%new_guid%> to not use the absoulte path to the workspace. This allows stable GUID generation among different developers and/or moving the workspace to a different filesystem location. * modules/VC8WorkspaceCreator.pm: Use Windows slashes for relative paths in project references. * templates/vc10.mpd: Support TargetExt when setting a non-standard {lib,dll,exe}_ext. OutputFile should not add a \ after $(OutDir) since it already ends in a \. The double-\ confuses .NET project references. Added comreferences as a template variable to generate the XML element in the vcxproj. This uses the extended attributes support in ProjectCreator. * templates/vc8csharp.mpd: RootNamespace is set to the project name. TargetFrameworkProfile supported as a template variable. Added comreference support (similar to vc10.mpd). Thu Aug 19 21:51:35 UTC 2010 Adam Mitz * modules/VC10WorkspaceCreator.pm: * modules/VC8WorkspaceCreator.pm: Factored-out the C++ project references from vc8 into a separate method that's overriden in vc10 to get the new syntax. * templates/vc10.mpd: * templates/vc10filters.mpd: Support for .def, .idl, and .odl files as Source_Files. "CLRSupport" removed as a template variable, instead use "managed" which is an MPC keyword and gets special treatment from MPC. Added an "EmbedManifest" template variable, if it's not set and there is a "keyfile", default it to false because signed assemblies can't have manifest embedded without invalidating the signature. Added project references (filled-in by the WorkspaceCreator). Cleaned up the Source_Files section a bit, it was using the grouped_source_file outside of any groups. Wed Aug 18 21:39:36 UTC 2010 Adam Mitz * config/mfc.mpb: The "subsystem" template variable is a string for vc10 (not an int). * templates/vc10.mpd: The pch_header can't be listed separately from the other headers because unlike earlier versions the same file can't appear twice. Added the midl_flags template variable to work like vc8/vc9. Wed Aug 18 16:10:32 UTC 2010 Adam Mitz * modules/ProjectCreator.pm (need_to_write_project): Refining the change from Monday Mon Aug 16 19:45:17 UTC 2010 Adam Mitz so that the exclusion of resource files from the list of files to check only applies to implicitly-created projects. Tue Aug 17 21:59:04 UTC 2010 Adam Mitz * templates/vc10.mpd: * templates/vc10filters.mpd: Updated with general cleanup and to better match the settings that VS2010 generates when creating a C++ project from the GUI. * templates/vc10dll.mpt: * templates/vc10exe.mpt: * templates/vc10lib.mpt: * templates/vc10libexe.mpt: * templates/vc10platforms.mpt: Use EnableIntrinsicFucntions and WholeProgramOptimization for Release configurations. Also, don't disable GenerateDebugInformation as this is still used in Release configurations. Mon Aug 16 19:45:17 UTC 2010 Adam Mitz * modules/ProjectCreator.pm (need_to_write_project): Do not consider a resource file alone enough to create a project, it must have a source or custom-input file. vc10 requires this because it creates resouce files in the intermediate directories, which would subsequently be found in an -implicit project search. Tue Aug 10 21:40:07 UTC 2010 Adam Mitz * docs/templates/vc10.txt: Added the "managed" variable. * modules/VC8WorkspaceCreator.pm: Projects references were picking up the .filters file for vc10 instead of the normal output file (.vcxproj). For now this is just a work-around to remove ".filters" from the relative path to the referenced project. * templates/vc10.mpd: Allow the use of "managed" as a backwards-compatibility synonym for "CLRSupport". Re-order the nested <%foreach%> loops so that 'platforms' appears before 'configurations' (as it does in vc8.mpd). DebugInformationFormat is not supported with CLR/managed. FixedBaseAddress is not supported with CLR/managed. The list of resource files may contain files that are not actually passed to the resource compiler (like icons: .ico). Exclude those from but they will still be listed in the project. Fri Aug 6 14:12:30 UTC 2010 Adam Mitz * docs/html/WB26.html: Added documentation for -type wb26, this was contributed by Johnny Willemsen . * templates/wb30dll.mpt: * templates/wb30exe.mpt: Added dollar-Id-dollar in comments. Fri Aug 6 00:06:41 UTC 2010 Chad Elliott * modules/CDT6ProjectCreator.pm: Fixed a bug where the template name, in project_file_name, would default to an invalid name if the template name was not defined. * templates/make.mpd: Modified to use the C compiler to compile assembler files (instead of the C++ compiler). Thu Aug 5 19:57:19 UTC 2010 Adam Mitz * templates/make.mpd: * templates/makedll.mpt: If pchsupport is disabled, don't generate the pch_postrule. Also added some Windows native (non-cygwin, non-msys) compatibility with -value_template platforms=mingw. Thu Aug 5 17:00:23 UTC 2010 Adam Mitz * docs/html/MakeProjectCreator.html: * docs/html/WB30.html: * docs/templates/wb26.txt: * docs/templates/wb26wrmakefile.txt: * docs/templates/wb26wrproject.txt: * modules/CDT6WorkspaceCreator.pm: * modules/TemplateParser.pm: * modules/WB26WorkspaceCreator.pm: * modules/WB30ProjectCreator.pm: * modules/WB30WorkspaceCreator.pm: * templates/wb26.mpd: * templates/wb26dll.mpt: * templates/wb26wrmakefile.mpd: * templates/wb26wrproject.mpd: * templates/wb30cproject.mpd: * templates/wb30dll.mpt: * templates/wb30exe.mpt: Merged (reintegrated) the "wb30" branch, which adds -type wb30 for Wind River Workbench 3.0. See WB30.html for details. This also effectively reverts the commit in Fri Jul 9 21:16:23 UTC 2010 Adam Mitz because that change was incorrect (-into shouldn't affect the file's contents). Thu Aug 5 03:49:19 UTC 2010 Chad Elliott * config/glib.mpb: * config/splice_ts_defaults.mpb: * config/splicelib.mpb: * config/xerces.mpb: * docs/html/CDT6.html: * history/ChangeLog-3_7: * modules/Creator.pm: * modules/MakeProjectBase.pm: * modules/MakeProjectCreator.pm: * modules/ProjectCreator.pm: * modules/VC8WorkspaceCreator.pm: * templates/cdt6cproject.mpd: * templates/cdt6platforms.mpt: * templates/wix.mpd: Removed trailing whitespace. * docs/html/MakeProjectCreator.html: Better explained the TemplateParser 'eval' function and documented the new TemplateParser 'set' and 'translate_vars' functions. * docs/templates/vc10.txt: Started the vc10 template variable documentation. * modules/CDT6WorkspaceCreator.pm: Use the WorkspaceCreator::create_command_line_string() function instead of printing the "$0 @ARGV" string. * modules/TemplateParser.pm: Replaced the use of die with setting the 'error_in_handle' data member to bring errors to the users attention and added the 'set' template function. * templates/vc10.mpd: The OpenMP template variable is interchangable with the OpenMPSupport template variable. Older versions of Visual Studio used OpenMP. Wed Aug 4 20:32:14 UTC 2010 Chris Cleeland Merged out changes from the Eclipse CDT branch to support side-by-side builds from different platforms and configurations and to more fully support cross-platform builds. * templates/cdt6cproject.mpd: Changed postbuild "installation" scripts so that they put libraries into platform-config specific subdirectories in order to support multiple builds concurrently. Added platform-specific lib directory to library paths. Omit generation of build information for platforms when a project inherits from crosscompile.mpb. * modules/CDT6ProjectCreator.pm: Propagated "nocross" template variable into CDT6 projects via fill_value. * modules/CDT6WorkspaceCreator.pm: Minor changes. * modules/TemplateParser.pm: Added new keyword/function "vars_equal", to compare the values of two template variables for equality. Wed Aug 4 15:03:50 UTC 2010 Adam Mitz * templates/vc10.mpd: * templates/vc10dll.mpt: * templates/vc10exe.mpt: * templates/vc10lib.mpt: * templates/vc10libexe.mpt: Default GenerateDebugInformation to "true", Release configurations will override it to "false". Use the value of the GenerateDebugInformation variable in the template. Mon Aug 2 15:24:10 UTC 2010 Adam Mitz * templates/vc10.mpd: * templates/vc10filters.mpd: Use instead of for custom actions that apply to individual input files (as opposed to the custom actions that apply to the project). Tue Jul 27 15:40:16 UTC 2010 Chris Cleeland * templates/cdt6cproject.mpd: Added missing space between thread flags and pic flags. Wed Jul 21 20:34:03 UTC 2010 Chris Cleeland Merge out the following changes from the eclipse branch: * templates/cdt6cproject.mpd: * templates/cdt6dll.mpt: * templates/cdt6platforms.mpt: Initial work for supporting a cross-compile platform. Fix for RT 14228 related to the lack of -fPIC option. * templates/cdt6cproject.mpd, templates/cdt6platforms.mpt: Fixed issue where linker exe names could not be overridden. * docs/html/CDT6.html: Update documentation. Wed Jul 14 05:00:11 UTC 2010 James H. Hill * config/wix.mpb: Added a prebuild command to delete the old installer before building the new installer. Tue Jul 13 16:38:44 UTC 2010 Chad Elliott * modules/TemplateParser.pm: Removed tabs. * modules/VC10ProjectCreator.pm: Fixed a bug relating to the get_template() implementation that arose when the language is not C++. Tue Jul 13 14:37:32 UTC 2010 Johnny Willemsen * modules/TemplateParser.pm: Added more support for msvc10 by adding new_guid, thanks to Max Zhou Tue Jul 13 14:14:47 UTC 2010 Johnny Willemsen * modules/VC10ProjectCreator.pm: * templates/vc10dll.mpt: * templates/vc10exe.mpt: * templates/vc10lib.mpt: * templates/vc10libexe.mpt: * templates/vc10platforms.mpt: Added more support for msvc10, thanks to Max Zhou Tue Jul 13 11:33:37 UTC 2010 Johnny Willemsen * modules/VC10ProjectCreator.pm: Updated for msvc10, thanks to Max Zhou Tue Jul 13 11:20:59 UTC 2010 Johnny Willemsen * templates/vc10.mpd: * templates/vc10filters.mpd: New files for vc10 Fri Jul 9 21:16:23 UTC 2010 Adam Mitz * modules/CDT6WorkspaceCreator.pm: * modules/WB26WorkspaceCreator.pm: Account for the -into directory when listing the full path to the project file inside the workspace file. Tue Jun 29 18:18:56 UTC 2010 Chris Cleeland * modules/TemplateParser.pm: split_parameters() was returning an empty parameter. This should fix errant extra whitespace generated in bmake test output. Tue Jun 29 14:45:21 UTC 2010 Chris Cleeland * templates/cdt6platforms.mpt: * templates/cdt6dll.mpt: * templates/cdt6lib.mpt: * templates/cdt6exe.mpt: Added missing dollar-Id-dollar to correct fuzz errors. Tue Jun 29 13:41:39 UTC 2010 Chad Elliott * devtools/document_template.pl: Fixed the usage message. Mon Jun 28 20:16:54 UTC 2010 Chris Cleeland * modules/CDT6ProjectCreator.pm: * modules/CDT6WorkspaceCreator.pm: * templates/cdt6platforms.mpt: * templates/cdt6cproject.mpd: * templates/cdt6dll.mpt: * templates/cdt6lib.mpt: * templates/cdt6exe.mpt: * templates/cdt6project.mpd: Merged in initial EXPERIMENTAL release of CDT6 project type generation from the "eclipse" branch. * docs/html/CDT6.html: * docs/templates/cdt6project.txt: * docs/templates/cdt6cproject.txt: Draft documentation on the project type. * config/global.mpb: Modification to allow specification of threads. * devtools/document_template.pl: Modified to allow use for generating a stubbed out template variable document. * modules/TemplateParser.pm: Added functions create_aux_file/end_aux_file, translate_vars, and convert_slashes. Mon Jun 28 18:01:08 UTC 2010 James H. Hill * modules/WorkspaceCreator.pm: Reverted change below. Mon Jun 28 16:26:00 UTC 2010 James H. Hill * modules/WorkspaceCreator.pm: Bug fix where the negated types in excludes () were not handled correctly. Mon Jun 28 05:55:54 UTC 2010 James H. Hill * templates/wix.mpd: The Id attribute for the exename/sharedname was not normalized. Mon Jun 28 05:42:48 UTC 2010 James H. Hill * templates/wix.mpd: Bug fix where the generated Id for the File element contained invalid characters. Mon Jun 28 04:46:49 UTC 2010 James H. Hill * templates/wix.mpd: Bug fix where the File element used the auto-generated Id attribute, which resulted in duplicate keys in the installer when different project had files with the same name. Fri Jun 25 21:56:03 UTC 2010 Adam Mitz * modules/AutomakeWorkspaceCreator.pm: When parsing the .am file, a line with a : is not an explicit target if it's a continuation of the previous line (ending with \). Wed Jun 23 18:08:17 UTC 2010 Johnny Willemsen * config/ndds_ts_defaults.mpb: Upgraded TAO version in preparation of the upcoming release Thu Jun 17 03:32:07 UTC 2010 James H. Hill * config/wix.mpb: Reverted change below. Thu Jun 17 03:27:06 UTC 2010 James H. Hill * config/wix.mpb: Moved the quote tags to a different location. Mon Jun 14 23:52:33 UTC 2010 James H. Hill * templates/wix.mpd: Bug fix where invalid Id is generated if the binary's name contained a dash. Added support for installing GME decorators. Mon Jun 14 22:06:56 UTC 2010 Chad Elliott * modules/ProjectCreator.pm: Only replace psuedo variables on actual keywords during variable modification. User defined keywords must not have the parameters replaced in order for them to get the correct replacement values later on. Wed Jun 9 07:35:19 UTC 2010 Johnny Willemsen * templates/vc8.mpd: Added OptimizeReferences and EnableCOMDATFolding to be setting without setting optimize as global flag Tue Jun 8 16:06:10 UTC 2010 Adam Mitz * MPC version 3.8.0 released. Local Variables: mode: change-log add-log-time-format: (lambda () (progn (setq tz (getenv "TZ")) (set-time-zone-rule "UTC") (setq time (format-time-string "%a %b %e %H:%M:%S %Z %Y" (current-time))) (set-time-zone-rule tz) time)) indent-tabs-mode: nil End: ace-6.4.5+dfsg.orig/MPC/history/ChangeLog-3_10000644000175000017500000022474213154167361016554 0ustar tggtggTue Dec 21 06:27:20 2004 Chad Elliott * modules/ProjectCreator.pm: Reverted my change to add more resource file extensions. It would take template changes to the gnuace, make and nmake project types to do it right and I don't have the time at this point. Mon Dec 20 13:49:42 2004 Chad Elliott * config/mfc.mpb: Fixed the AFX macro. It was _AFX_DLL and should have been _AFXDLL. * modules/ProjectCreator.pm: Added more resource file extensions. Mon Dec 13 10:27:04 2004 Chad Elliott * modules/ProjectCreator.pm: Added a warning when an mpc file is processed, but no output project file will be created. If it is an implicit project, the message is only informational. * templates/automake.mpd: Made the -stamp file go to the output directory of the generated files. Also rearranged the libs, lit_libs and pure_libs to be consistent with other project types. * templates/make.mpd: * templates/makedll.mpt: Modifications to add a 'targetoutdir' template variable which determines the output location of object files, exes and libraries. By default, this template variable is not set and does not affect anything. Also rearranged the libs, lit_libs and pure_libs to be consistent with other project types. * templates/bmake.mpd: * templates/em3vcp.mpd: * templates/nmake.mpd: * templates/sle.mpd: * templates/va4icc.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: Rearranged the libs, lit_libs and pure_libs to be consistent with other project types. The order in which they are added to the project is now libs, lit_libs and then pure_libs. Mon Dec 6 09:39:01 2004 Chad Elliott * config/bison.mpb: * config/flex.mpb: * config/lex.mpb: * config/yacc.mpb: Added more possible output extensions. * README: * modules/ProjectCreator.pm: Added the ability to get the output file by specific type without an extension. See the README for more detail. * modules/WorkspaceCreator.pm: Fixed a bug where exclude blocks always excluded the listing even if project types were listed and did not match the current project type. As a result, the exclude block works just as any other scope if the project type does not match the excluded project types. Wed Dec 1 19:28:19 2004 Marek Brudka * USAGE (Module): * modules/WorkspaceCreator.pm (Module): * modules/ProjectCreator.pm (Module): * modules/Options.pm (Module): * modules/FeatureParser.pm (Module): * modules/Driver.pm (Module): * modules/Creator.pm (Module): Added command line option '-features'. Thanks for Kacper Reutt for the patch. Mon Nov 29 11:24:05 2004 Chad Elliott * templates/automake.mpd: Added top, macros and local markers. It already had a bottom marker. Thu Nov 25 06:55:36 2004 Chad Elliott * modules/MakeWorkspaceCreator.pm: * modules/NMakeWorkspaceCreator.pm: * modules/WorkspaceCreator.pm: Provide target translation to avoid collisions between directory names and target names. Incidentally Borland Make does not have this problem, it is able to distinguish between directories and targets. Thanks to Steve Huston for bringing this to my attention. * templates/vc7.mpd: Ensure that static libraries and import libraries got to 'libout' regardless of whether 'dllout' is set or not. Thanks to Marek Brudka for reporting this. Wed Nov 24 08:17:01 2004 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug where the directory portion would not contain a trailing slash when using gendir. This would cause some non-existent file to be added automatically. * templates/automake.mpd: * templates/bmake.mpd: * templates/em3vcp.mpd: * templates/ghs.mpd: * templates/make.mpd: * templates/nmake.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: * templates/vc7csharp.mpd: * templates/vc7vb.mpd: When gendir is used, attempt to automatically make the specified directory. Tue Nov 23 07:52:03 2004 Chad Elliott * config/boost_base.mpb: * config/boost_date_time.mpb: * config/boost_filesystem.mpb: * config/boost_prg_exec_monitor.mpb: * config/boost_regex.mpb: * config/boost_signals.mpb: * config/boost_test_exec_monitor.mpb: * config/boost_thread.mpb: * config/boost_unit_test_framework.mpb: Added initial support for boost. * modules/AutomakeProjectCreator.pm: * modules/AutomakeWorkspaceCreator.pm: * modules/WorkspaceHelper.pm: * templates/automake.mpd: Fixed a bug dealing with the output_option of a custom build definition. Added support for library versioning and adding the includedir setting. Fri Nov 19 07:06:11 2004 Chad Elliott * modules/BMakeProjectCreator.pm: Added '.' to the directories for cppdir and rcdir. At least one directory is always necessary due to the way that the template is set up. * templates/bmake.mpd: Reverted Johnny's previous change as the CPPDIR and RESDIR settings always need to be there since they are used by the automatic targets in the template (regardless of whether there are cpp and rc files or not). Also, added a dummy all target if there is no exe or lib. Fri Nov 19 10:05:12 UTC 2004 Johnny Willemsen * templates/bmake.mpd: Only generate CPPDIR when cppdir is defined, also only generate RESDIR when rcdir is defined Thu Nov 18 11:56:57 2004 Chad Elliott * README: Document the change to 'dependent'. It now represents the command upon which generated files are dependent. * templates/em3vcp.mpd: * templates/make.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: Changed to use the new form of 'dependent'. * templates/makedll.mpt: Added initial support for the NCC compiler. Fri Nov 12 18:17:20 2004 Steve Huston * templates/automake.mpd: Added a 'bottom' marker. Thu Nov 11 10:17:43 2004 Chad Elliott * README: * modules/ProjectCreator.pm: Added a new construct (similar to specific) which can only be used with component lists (Source_Files, Header_Files, etc.). The construct is called 'conditional' and can be used to conditionally add or exclude files based on project type. See the README for more detail. Tue Nov 9 12:19:43 2004 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug where generated files that are defaulted may become "invisible" because of automatic grouping of other non-generated files of the same type (inline, header, etc.). Fri Nov 5 13:42:11 2004 Chad Elliott * templates/bmake.mpd: Added a template variable called debug_macros. The contents of this variable is included into the compile flags for a debug build only. Also, fixed the realclean target to check for a value in GENERATED_DIRTY before attempting to delete it. Tue Nov 2 09:43:38 2004 Chad Elliott * USAGE: Added a section to document MPC related environment variables. * modules/Options.pm: If the argument to -include is a relative path, prepend the current working directory to the path. Also, removed the deprecated -static_only option. Sun Oct 31 15:40:12 UTC 2004 Johnny Willemsen * templates/cbx.mpd: Just exclude the complete Template_Files folder instead of all files individually Fri Oct 29 11:15:12 UTC 2004 Johnny Willemsen * templates/cbx.mpd: Set the page size to 4096 by default in a debug build Fri Oct 29 09:17:12 UTC 2004 Johnny Willemsen * templates/cbx.mpd: Exclude template files from build in MinGW and GCC Thu Oct 28 06:23:12 UTC 2004 Johnny Willemsen * templates/cbx.mpd: Added needed compiler options and generate the needed include paths in the bcc32 part, removed generate of $(BCB) includes, these are not needed. Mon Oct 25 12:18:27 2004 Chad Elliott * modules/BMakeWorkspaceCreator.pm: * modules/NMakeWorkspaceCreator.pm: Added the 'generated' target. This target, which exists in the other make based projects, will generate all generated source files. * templates/automake.mpd: Removed unnecessary uses of <%foreach%>. * templates/bmake.mpd: Corrected the precompiled header support, fixed the pch_postrule code and added the 'generated' target. * templates/ghs.mpd: Changed 'cat' and 'mv -f' to be template variables to better support ghs on Windows. * templates/make.mpd: Force object files to be built in the same directory as the source files. This corresponds to the way dependencies are generated by makedepend and depgen.pl. * templates/nmake.mpd: Moved many targets and variable assignments outside of the platform and configurations <%foreach%> sections to avoid repetition within the generated makefile. Also added the 'generated' target. * templates/nmakedll.mpt: Added a missing slash to the W3 option under the "Static Release" section. Fri Oct 22 08:55:56 2004 Chad Elliott * README: * modules/Creator.pm: * modules/ProjectCreator.pm: Added the ability to specify an "else" clause to a "specific" section. * config/openssl.mpb: * config/qt.mpb: * config/zlib.mpb: Utilize the new "else" clause. * config/xerces.mpb: Added a base project for xerces. Mon Oct 18 18:03:28 2004 Steve Huston * modules/AutomakeWorkspaceCreator.pm: When collecting the list of subdirectories, maintain dependency order so a subdirectory required before the current directory's projects gets built in the correct order. Mon Oct 18 11:42:28 2004 Steve Huston * config/openssl.mpb: Added automake to the set of targets that get lit_libs and includes adjusted. Mon Oct 18 08:09:59 2004 Chad Elliott * modules/ProjectCreator.pm: Changed the defaulting behavior for Template_Files. If a template file resulted from generation, it used to always be added (like source files). Now, it will only be added if Template_Files is not supplied (defaulted). Thu Oct 7 16:44:29 2004 Steve Huston * modules/AutomakeWorkspaceCreator.pm: Changed the library relocator adjustment so it doesn't add the $top_builddir relativity to libraries being built in the same directory. This allows the automake/make dependencies to work correctly and have things built in the right order. Thu Oct 7 13:06:54 2004 Chad Elliott * modules/EM3ProjectCreator.pm: * modules/NMakeProjectCreator.pm: * modules/VC6ProjectCreator.pm: * modules/VC7ProjectCreator.pm: * modules/WinVersionTranslator.pm: * templates/em3vcp.mpd: * templates/nmake.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: Added a windows version translator to deal with versions that contain letters and multiple decimal points. See the comment in WinVersionTranslator for more details. Thu Oct 7 13:03:28 2004 Steve Huston * modules/AutomakeWorkspaceCreator.pm: Fixed the library location adjuster to adjust more than one library on a line. Wed Oct 6 11:35:48 2004 Chad Elliott * clone_build_tree.pl: Added a description of what this script does to the usage. * modules/GHSProjectCreator.pm: * modules/GHSWorkspaceCreator.pm: * templates/ghs.mpd: * templates/ghscommon.mpt: * templates/ghsdll.mpt: * templates/ghsdllexe.mpt: * templates/ghslib.mpt: * templates/ghslibexe.mpt: Increased the support for Green Hills Builder. It still isn't complete as I have only tested it for Integrity. I will need to test it for different platforms such as Solaris and Windows. Due to the way that the builder works, the -hierarchy option does not work and will never work with the ghs project type. Tue Oct 5 10:21:20 2004 Chad Elliott * modules/VC71ProjectCreator.pm: * modules/VC7ProjectCreator.pm: * modules/VC8ProjectCreator.pm: * templates/vc7.mpd: For vc7 and vc71, set the ForceConformanceInForLoopScope to TRUE. For vc8, that setting is deprecated so we do not set it at all. Tue Oct 5 08:53:10 2004 Chad Elliott * config/rpc.mpb: Modified to use source_pre_extension instead of just source_outputext. * modules/ProjectCreator.pm: Fixed a bug where a generated file (on Windows only) would not be recognized as already added to the list of files. * README: * modules/TemplateParser.pm: * templates/automake.mpd: * templates/bmake.mpd: * templates/em3vcp.mpd: * templates/make.mpd: * templates/nmake.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: * templates/vc7csharp.mpd: * templates/vc7vb.mpd: Added the ability to add to 'postcommand' within the scope of a custom section (such as IDL_Files, RPC_Files, etc.) In the process of doing this, I fixed a couple of bugs in TemplateParser.pm: 1) If flag_overrides was used in an <%if()%> and the closing parenthesis were left off, it would not be recognized as an error but wouldn't give the expected output. 2) If pseudo variables were used in a scoped add to commandflags, they wouldn't get converted. 3) If a line contained only a tab and then a <%...%> variable, a new line wouldn't be added to the end. Thu Sep 30 11:19:57 2004 Chad Elliott * modules/Driver.pm: Use the diagnostic() method instead of print so that when the MPC_SILENT environment variable is set, the messages do not get printed. * modules/Version.pm: Do not print a warning if we are unable to find the beta version, just set the beta version to ??. * modules/BMakeWorkspaceCreator.pm: * modules/NMakeWorkspaceCreator.pm: * modules/WorkspaceCreator.pm: Warn users when options that are used are unnecessary or have no effect. Thu Sep 30 01:26:41 2004 Ossama Othman * modules/AutomakeWorkspaceCreator.pm: Updated list of files to be cleaned in generated clean-local target to match current list used by the MPC generated GNUmakefiles. * templates/automake.mpd: Removed line continuation generation code. A line continuation character was not generated after processing the "libs" list despite the fact that "pure_libs" or "lit_libs" may be defined as well. This fix causes all libraries to be listed on one line rather than be split up across multiple lines. Wed Sep 29 06:53:40 2004 Chad Elliott * modules/AutomakeWorkspaceCreator.pm: Removed a portion of two regular expessions that were causing perl warnings. Also, switched to use the warning() method instead of the perl builtin warn function. Wed Sep 29 06:40:50 2004 Chad Elliott * modules/WorkspaceCreator.pm: Allow callers of the get_modified_workspace_name() method to get a workspace name that does not have the workspace name attached. Tue Sep 28 18:33:22 2004 Steve Huston * templates/automake.mpd: Removed the dllout/libout path additions from Mon Sep 27 15:53:18 2004 Steve Huston . Build all libraries into the same relative path in the build tree as the sources exist in the source tree. This change just inserts the project's desired library references. The below changes adjust the references to contain the relative paths in the build tree. * modules/ProjectCreator.pm: * modules/WorkspaceCreator.pm: Changes graciously supplied by Chad Elliott to add a get_lib_locations() method. It returns a hash reference where the key is a library name (ACE, TAO, TAO_PortableServer, etc) and the value will be a relative directory from where mwc.pl starts. * modules/AutomakeWorkspaceCreator.pm: When collecting the projects' Makefile..am files together, find all the *_LDADD and *_LIBADD tokens that look like lib*.la and insert the path to the library starting with $(top_builddir). This effectively ignores any dllout/libout directives applied to the libraries being referenced (for automake targets). Everything builds into the build tree at the same relative location as its sources in the source tree. Tue Sep 28 09:13:57 2004 Chad Elliott * modules/BMakeWorkspaceCreator.pm: Borland Make has a maximum line length of roughly 32767. The 'all' target could exceed that length given a large amount of projects within a single workspace. In that case, we have to create an 'all' target that specifically lists the target commands and thereby creating a larger workspace makefile, but working around the Borland Make limitation. Mon Sep 27 19:32:42 2004 J.T. Conklin * templates/automake.mpd: Removed code that added -I${top_srcdir} and -I${top_builddir} to CPPFLAGS. These should be added by project files if they are needed. Mon Sep 27 19:13:31 2004 J.T. Conklin * templates/automake.mpd: Changed to omit executable/library building rules if exename, sharedname, or staticname is not defined. This is useful for projects that only contain scripts, manpages, IDL files, etc. Mon Sep 27 19:02:51 2004 J.T. Conklin * templates/automake.mpd: Define man_MANS or bin_SCRIPTS if man_files or script_files are set. Mon Sep 27 15:53:18 2004 Steve Huston * modules/TemplateParser.pm (handle_normalize): Add / $ ( ) to the characters translated to _ to properly handle full-path names that may include variables. * templates/automake.mpd: Use the dllout/libout settings for placing libraries. The linker input use of lib names always assumes libout/lib - this may be too limiting, but not sure how to handle it otherwise. Mon Sep 27 11:56:20 2004 Chad Elliott * README: Document the addition of the <%input_ext%> and <%output_ext%> pseudo variables that are available to postcommand. * config/bison.mpb: Added .yy as a possible input extension. * config/flex.mpb: * config/lex.mpb: Added .ll as a possible input extension. * config/global.features: By default disable the zzip feature. * config/yacc.mpb: Added a yacc base project. Previously it was not possible to support yacc, but with the postcommand it is now possible. * config/zzip.mpb: Added a macro (USE_ZZIP) that will be added only if the zzip feature is enabled. * modules/ProjectCreator.pm: Multiple bug fixes: 1) Support #if 0 and c style comments when looking for an entry point to determine if the project is an exe or not. 2) When creating generated file names, we need to remove escape sequences on the pre_extension and pre_filename portion. 3) When removing custom input file extensions, we need to loop through all of the possible extensions to ensure that we get the right one. 4) When adding generated files, we need to take into account the possibility of a pre_filename. 5) When adding default generated files, we need to look at all of the valid components (except header and inline) to ensure that everything that a command generates gets added. Wed Sep 22 16:27:39 2004 Steve Huston * modules/AutomakeWorkspaceCreator.pm: When combining the project Makefile..am files, detect usage of automake conditionals bracketing automake targets and emit blank assignments for those (i.e. bin_PROGRAMS, lib_LTLIBRARIES, etc.) to have things work correctly regardless of the condition test at build time. Mon Sep 20 11:15:13 2004 Chad Elliott * README: Added documentation about excluding directories and mpc files within workspaces. * templates/nmake.mpd: Added support to the template for generation of nmakefiles that contain both Win32 and Win64 targets. Previously, only one or the other could be generated. Thu Sep 16 09:32:09 2004 Chad Elliott * README: * modules/ProjectCreator.pm: If an asterisk is used in the exename, sharedname or staticname setting, then it (the asterisk) will be replaced with the project name. Thanks to Martin Corino for suggesting this. Thu Sep 16 07:45:11 2004 Chad Elliott * modules/BMakeWorkspaceCreator.pm: * modules/MakeWorkspaceCreator.pm: * modules/NMakeWorkspaceCreator.pm: Added a CUSTOM_TARGETS macro that will allow users to access custom targets that can be generated with the use of the 'verbatim' clause in mpc files. * templates/nmake.mpd: Added markers to allow for the use of 'verbatim' with nmake. Wed Sep 15 11:32:57 2004 Chad Elliott * templates/bmake.mpd: * templates/nmake.mpd: Modified these templates to work correctly if no exe name, shared or static name is specified by the mpc file. Mon Sep 13 12:52:22 2004 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug where if a custom file is in a directory other than '.' and the 'gendir' setting is used to specify that the generated output will be in a particular directory, it would be ignored when determining if generated files were listed. * modules/Creator.pm: * modules/WorkspaceCreator.pm: When converting slashes to back slashes (on Windows), only convert values when the parameter name does not contain 'flags'. Some custom build executables on Windows require the use of / as command switches. Tue Sep 7 07:08:26 2004 Chad Elliott * USAGE: * modules/Creator.pm: * modules/Driver.pm: * modules/Options.pm: * modules/ProjectCreator.pm: * modules/TemplateParser.pm: * modules/WorkspaceCreator.pm: Added an option, -expand_env, to replace all $() variables referenced in MPC with the environment variable equivalent. * templates/vc7.mpd: Converted all slashes to back-slashes to more closely match the Windows style. Fri Sep 3 09:14:21 2004 Chad Elliott * templates/em3vcp.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: Only set up custom groups (in the IDE view) if there are input files that correspond to the custom type. Thu Sep 2 09:11:44 2004 Chad Elliott * templates/bmake.mpd: * templates/bmakedll.mpt: * templates/bmakedllexe.mpt: * templates/bmakelibexe.mpt: Modified the template and template input files to correctly build libraries and applications. Also, added more support for Unicode builds. Wed Sep 1 12:54:06 2004 Chad Elliott * modules/WorkspaceCreator.pm: Fixed a bug where the toplevel workspace would be created twice in the event that the -hierarchy option was used or the subclassed workspace creator defined the workspace_per_project method to return 1. * modules/WorkspaceHelper.pm: Added the base class and factory for all WorkspaceHelpers. It will dynamically locate, load and allocate the helper based on the workspace creator type. * modules/AutomakeWorkspaceCreator.pm: Uncommented the unlink() and split the ACE specific portion into a helper under ACE_wrappers/bin/MakeProjectCreator/modules. Tue Aug 31 08:00:20 2004 Chad Elliott * modules/TemplateParser.pm: Fixed a bug where setting a scoped assignment would not apply to a directory specified within that scope. For example: project { Source_Files { some_feature = value src } } The some_feature setting would not get applied to the files found in the src directory. * USAGE: * modules/Creator.pm: * modules/Driver.pm: * modules/Options.pm: * modules/ProjectCreator.pm: * modules/VC6ProjectCreator.pm: * modules/VC7ProjectCreator.pm: * modules/VC7WorkspaceCreator.pm: * modules/WorkspaceCreator.pm: * templates/make.mpd: * templates/makedll.mpt: * templates/vc7csharp.mpd: * templates/vc7csharp.mpt: * templates/vc7vb.mpd: * templates/vc7vb.mpt: Added multi-language support to MPC. The default language is C++, but it now supports C#, Java and Visual Basic. An additional bug was fixed in ProjectCreator.pm. If, in a Define_Custom, the automatic keyword was not set or set to zero MPC would still automatically add custom files to the project. Mon Aug 30 08:07:51 2004 Chad Elliott * README: * modules/ProjectCreator.pm: Added the ability to get the input and output file names without an extension. * config/qt_uic.mpb: Added support for generating uic interface declarations and implementations. Mon Aug 30 06:45:25 2004 Chad Elliott * modules/ProjectCreator.pm: Fixed another problem with the -apply_project option. When determining the library name, it is possible to use the project name. In that case, we need to keep a copy of the non-modified project name so we can determine the correct library name. Fri Aug 27 09:03:12 2004 Chad Elliott * templates/vc7.mpd: Changed the wchar_t setting to FALSE which is the default for new projects created in Visual C++ 7. It can be changed to TRUE by passing "-value_template wchar_t=TRUE" to MPC. Fri Aug 27 08:35:39 2004 Chad Elliott * modules/WorkspaceCreator.pm: Fixed a problem with the circular project dependency detection algorithm. Previously, it could take days to detect a circular dependency if there were a large number of projects. Thu Aug 26 17:38:41 2004 J.T. Conklin * modules/AutomakeWorkspaceCreator.pm: Fix typos, forgot a leading $. Thu Aug 26 09:14:57 2004 Chad Elliott * modules/AutomakeProjectCreator.pm: * modules/AutomakeWorkspaceCreator.pm: Give proper credit to the authors of these files. * modules/ProjectCreator.pm: * modules/VC6ProjectCreator.pm: * modules/VC7ProjectCreator.pm: Corrected a bug where dependencies would not be placed in the workspace when the -apply_project option was used (in conjunction with -name_modifier). * modules/WorkspaceCreator.pm: Fixed a problem with the group circular dependency detection algorithm. Previously, it could take days to detect a circular dependency if there were a large number of directories. Wed Aug 18 23:08:35 2004 J.T. Conklin * modules/AutomakeWorkspaceCreator.pm: Changed to scan the generated project files for the use of $(ACE_ROOT), $(TAO_ROOT), etc. and provide the appropriate definition if they are found. While this behavior is ACE/TAO specific, there isn't much that can be done without something like a workspace template. Wed Aug 18 08:56:01 2004 J.T. Conklin * templates/automake.mpd: Changed to use am_includes, rev_avoids, and rev_requires. * modules/AutomakeProjectCreator.pm: Changed fill_value to understand am_includes, rev_avoids, and rev_requires. am_includes prepends $(srcdir) to any relative include paths; rev_avoids and and rev_requires reverses the order of the avoids and requires lists. This is useful for the trailing comments after the "endif" in conditionals. Fri Aug 13 18:31:01 2004 J.T. Conklin * templates/automake.mpd: Use INSTALL_THIS_TARGET to determine whether to use the noinst_ prefix. * template/automakedll.mpt: Define INSTALL_THIS_TARGET for use by automake.mpd. Fri Aug 13 10:53:57 2004 J.T. Conklin * templates/automake.mpd: Tweak conditionals so that generated files don't have spurious blank lines. Fri Aug 13 10:25:31 2004 J.T. Conklin * modules/AutomakeProjectCreator.pm: Changed sort_files to return 1. While this is not required by automake, it makes the resulting Makefile.am's easier to read. This is important now that we're still hand-editing the MPC generated files. * templates/automake.mpd: Add pidl_files to headers so they'll be installed. Thu Aug 12 09:42:55 2004 Chad Elliott * clone_build_tree.pl: Modified the usage. * modules/NMakeProjectCreator.pm: * modules/ProjectCreator.pm: * modules/VC6ProjectCreator.pm: * modules/VC7ProjectCreator.pm: Removed code that converted $(...) to %...%. During testing, it didn't seem necessary and was broken in some instances. I don't even remember why it was added in the first place. Thu Aug 12 03:33:45 UTC 2004 Don Hinton * templates/vc6dsp.mpd: * templates/vc6dspdll.mpt: * templates/vc6dspdllexe.mpt: * templates/vc6dsplib.mpt: * templates/vc6dsplibexe.mpt: * templates/vccommon.mpt: New file. Added support for midl. It uses midl_includes, midl_defines, and midl_flags. To use, just add an idl file to your source files section and define the midl_* variables in the vc6/7 section. Thanks to Chad Elliott and Krishnakumar B for help with this. Wed Aug 11 19:15:10 2004 J.T. Conklin * modules/AutomakeWorkspaceCreator.pm: * templates/automake.mpd: Changed header macro from nobase_pkginclude_HEADERS to nobase_include_HEADERS. Changed installed library headers to include idl_files. Added support for EXTRA_DIST with list of resource_files. Wed Aug 11 07:45:11 2004 Chad Elliott * modules/AutomakeProjectCreator.pm: * modules/AutomakeWorkspaceCreator.pm: * modules/BMakeProjectCreator.pm: * modules/BMakeWorkspaceCreator.pm: * modules/CBXProjectCreator.pm: * modules/Creator.pm: * modules/DirectoryManager.pm: * modules/Driver.pm: * modules/GHSWorkspaceCreator.pm: * modules/HTMLProjectCreator.pm: * modules/MakeWorkspaceCreator.pm: * modules/NMakeWorkspaceCreator.pm: * modules/ProjectCreator.pm: * modules/SLEProjectCreator.pm: * modules/TemplateParser.pm: * modules/WorkspaceCreator.pm: Encapsulated the VMS changes related to dirname into a single method (mpc_dirname) that gets called instead dirname. Thanks to Martin Corino for verifying my changes. Wed Aug 11 10:08:12 UTC 2004 Johnny Willemsen * templates/bmake.mpd: Corrected handling of resource files so that we can handle the resource files in the TAO libraries Tue Aug 10 17:10:38 2004 J.T. Conklin * templates/automake.mpd: Add initial support for automake conditionals with <%requires%> and <%avoids%>. Remove extra spaces before backslashes in _CPPFLAGS. Tue Aug 10 09:10:36 2004 Chad Elliott * modules/MakeWorkspaceCreator.pm: * templates/make.mpd: Modifications to ensure that generated files get built before anything else. Mon Aug 9 07:50:47 2004 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug in the code that determines which generated files get added automatically. The array that can exist in the components list could be undefined and in that case nothing got added automatically. * templates/automakedll.mpt: Added a missing conditional include of the common mpt file. Mon Aug 9 07:04:12 UTC 2004 Johnny Willemsen * templates/bmakecommon.mpt: Use cw32mti.lib instead of cw32mt.lib Sat Aug 7 23:19:33 2004 J.T. Conklin * templates/automake.mpd: Introduce an intermediate dependency between custom input and output files so that only one instance of the command is spawned per input file with parallel make. Thu Aug 5 14:57:19 2004 J.T. Conklin * templates/automake.mpd: Use $(srcdir)/<%custom_type->input_file%> instead of $< so resulting makefile will work on systems where make doesn't support VPATH. Thu Aug 5 11:14:12 2004 J.T. Conklin * templates/automake.mpd: Check "libout", not "install" to determine whether a library is to be installed. Thu Aug 5 09:14:12 UTC 2004 Johnny Willemsen The following changes are from Martin Corino * modules/Creator.pm: * modules/Driver.pm: * modules/ProjectCreator.pm: * modules/WorkspaceCreator.pm: Added various changes to support autobuild MPC generation on OpenVMS. Wed Aug 4 11:47:06 2004 J.T. Conklin * templates/automake.mpd: Use technique pioneered in the last checkin to remove the $(DUMMY_VALUE...) hack from _CPPFLAGS definitions. Wed Aug 4 11:23:04 2004 J.T. Conklin * templates/automake.mpd: The automake documentation recommends that header files for programs and convienence libraries be listed in _SOURCES and not _HEADERS. This has been done for programs (as we don't yet have a way to reliably distinguish between convienence libraries from installed libraries). I've done this with rather ugly template macros to avoid having to do the $(DUMMY_VALUE...) hack. This results in more readable Makefile.am's. Wed Aug 4 09:23:03 2004 J.T. Conklin * modules/AutomakeWorkspaceCreator: * templates/automake.mpd: Changed to set nobase_pkginstall_HEADERS instead of HEADER_FILES, INLINE_FILES, and TEMPLATE_FILES in Makefile..am files. Extending this will enable us to control installing headers on a per library basis (all we need is some way to control the prefix used for _HEADERS). Mon Aug 2 09:29:31 2004 Steve Huston * templates/automake.mpd: For non-installed libraries, generate noinst_LTLIBRARIES instead of lib_LTLIBRARIES. For libraries, assume that "libs" are libtool-created libraries and "lit_libs" are not. Mon Aug 2 08:04:27 2004 Chad Elliott * templates/bmake.mpd: * templates/bmakecommon.mpt: Removed ACE specific portions of the bmake template. They will need to be supplied on the command line using the -value_template and -value_project options. Sun Aug 1 08:31:49 2004 J.T. Conklin * templates/automake.mpd: Fix typo, use <%dynamicflag%> instead of <%dynamicflags%> within foreach loop. Sun Aug 1 15:13:12 UTC 2004 Johnny Willemsen * templates/bmake.mpd: Use the new ccflags, common_flags and warnflags. Tried to add some support for unicode builds, this is not complete yet, added "" around the objfiles, to handle ++ in directory/file names. Added setting of define ACE_LD_DECORATOR_STR, which is used in ACE to determine the filename extension of DLL's. Removed the removal of files with postlinkrmext extenion (is .tds) files after the link, instead do this with realclean. * templates/bmakecommon.mpt: Updated dllflags, common_defines, added ccflags, common_flags, and warnflags which have to be passed to the compiler * templates/bmakedll.mpt: * templates/bmakedllexe.mpt: * templates/bmakelibexe.mpt: Set postlinkrmext to .tds in all these files, we should rework this a little bit more, tds files are needed for the debugger and we shouldn't remove them after the link. The bmake target is not complete yet, things that have to be improved are startup objects (gperf just cores now), unicode support, codeguard support, install target, clean target. Wed Jul 28 20:01:36 2004 J.T. Conklin * templates/automake.mpd: Emit a _LDFLAGS definition if linkflags is defined. Wed Jul 28 09:15:02 2004 Chad Elliott * clone_build_tree.pl: Remove backup files before trying to create them and added information to some error messages. * modules/AutomakeWorkspaceCreator.pm: Cleaned up the code a bit. * templates/automakedll.mpt: * templates/automakeexe.mpt: The automakedll.mpt defines linkflags for use within automake.mpd. automakeexe.mpt just includes automakedll.mpt. Fri Jul 23 14:32:54 2004 J.T. Conklin * modules/AutomakeWorkspaceCreator.pm: Parse generated Makefile..am files as their contents are being inserted into the workspace Makefile.am, converting the first instance where a macro is appended to (+=) into a simple assignment (=). This results in a Makefile.am that is closer to what would be written by hand, and automake will often generate smaller Makefile.in files since it won't be tricked into pulling in boilerplate for macros that were defined and not used. Thu Jul 22 17:39:41 2004 Steve Huston * modules/AutomakeWorkspaceCreator.pm: When writing configure.ac.Makefiles, insert entries for project-less directories between project-containing directories. Allows the bootstrap procedure to find and make the needed Makefiles to traverse the entire build tree. * templates/automake.mpd: Changed _LIBADD to _LDADD for programs. Thu Jul 22 12:52:39 2004 Steve Huston * modules/AutomakeWorkspaceCreator.pm: If there's no local project info for the current Makefile.am, don't put the initial bin_PROGRAMS, lib_LTLIBRARIES, etc. If there are local projects, add "." to the SUBDIRS. * templates/automake.mpd: Add _LIBADD settings to pick up needed libraries. Wed Jul 21 19:34:46 2004 J.T. Conklin * modules/AutomakeProjectCreator.pm: Override expand_variables_from_template_values. * modules/AutomakeWorkspaceCreator.pm: Don't emit SUBDIRS definition if there aren't any subdirectories. * templates/automake.mpd: Simplify so that _CPPFLAGS, etc. settings are not duplicated for programs and libraries, grouped and non-grouped source files, etc. Wed Jul 21 18:02:31 2004 Steve Huston * templates/automake.mpd: Added the _CPPFLAGS setting to the non-grouped library section. Wed Jul 21 17:04:39 2004 Steve Huston * modules/AutomakeWorkspaceCreator.pm: In write_comps(), combine all of the current directory level's Makefile..am files into the directory's Makefile.am file and delete the individual files. Write only the Makefile.am file paths into the configure.ac.Makefiles list. This is because the previous loop-through-current-Makefile scheme sent make into an infinite loop, consuming all process slots very quickly. The generated Makefiles always like to start again at the top Makefile to check its updatedness, even if a specific Makefile. file was specified to make. Moved the general cleanup text from automake.mpd to here. * templates/automake.mpd: For non-project-specific info (bin, lib, etc.) use += rather than = to allow multiple per-project files to be combined into one file later. Removed the general cleanup directives and put them in the workspace generator, above. J.T. Conklin also supplied changes for the following: - Append list of custom_type outfiles to BUILT_SOURCES - Append list of custom_type outfiles to CLEANFILES - Emit explicit rules for building custom type outfiles. Note that unlike some of the other makefile templates, I've used $< instead of <%custom_type->input_file%> so that the file will be found via vpath. - Removed global setting of INCLUDES. Include paths are now handled by per library/program _CPPFLAGS. Fri Jul 16 12:24:36 2004 Chad Elliott * modules/WorkspaceCreator.pm: Added a method to get the current output file name. Thu Jul 15 14:02:04 2004 Chad Elliott * clone_build_tree.pl: Cleaned up the code a bit. * modules/AutomakeWorkspaceCreator.pm: Used a parameter passed into write_comps to determine if we are writing the top level workspace. * modules/ProjectCreator.pm: Ignore project names that are set in a base project. It doesn't make sense and I can't think of a practical use of this. * modules/WorkspaceCreator.pm: Fixed a bug where an excluded name could be partially matched and possibly exclude something that wasn't meant to be. Thu Jul 8 14:09:49 2004 Chad Elliott * README: * modules/ProjectCreator.pm: Added a new wild card syntax ('^') similar to the '!' that works best for excluding generated files from component lists. See the README for more details. Thu Jul 8 09:16:21 2004 Chad Elliott * README: Added documentation about the wild card support in MPC. * modules/ProjectCreator.pm: If grouping is used in source files, put automatically added files in corresponding groups. * templates/vc7.mpd: Use <%ucw()%> for the custom_type which looks better in the graphical interface. Tue Jul 6 11:29:07 2004 Chad Elliott * README: Added documentation for new pseudo template variables for use within the command, commandflags, postcommand and output_option settings. * modules/ProjectCreator.pm: Fixed a bug where mixing grouped and non-grouped files would cause the non-grouped files to be ignored. Added new pseudo template variables for the null device, >, <, && and ||. * modules/VC7ProjectCreator.pm: Override defaults for the >, < and && values to correctly support these within the XML projects. * templates/em3vcp.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: Added support for grouping header, inline, template, resource and documentation files. Fri Jul 2 10:27:03 2004 Chad Elliott * templates/vc7.mpd: Default the machine setting to X86. Fri Jul 2 08:17:48 2004 Chad Elliott * modules/Creator.pm: Return the same kind of crlf on OS/2 as we do on Windows. Just in case someone tries to use MPC on OS/2. * modules/ProjectCreator.pm: When returning the list of grouped source files, convert the slashes if it is necessary. * templates/vc7.mpd: The above change allows us to use file grouping for vc7. Previously, files would have a forward slash in the name (if they were in sub-directories) which confused vc7 and would cause link errors. Thu Jul 1 09:35:27 2004 Chad Elliott * modules/MakeWorkspaceCreator.pm: Added a .PHONY: target for sub targets. This only has an effect when using GNU make, but does not have an adverse effect when using other versions of make. * README: * modules/ProjectCreator.pm: * modules/TemplateParser.pm: * templates/bmake.mpd: * templates/em3vcp.mpd: * templates/make.mpd: * templates/nmake.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: Added support for a new custom build keyword 'postcommand'. The postcommand can be used to run arbitrary commands after the main custom command is run. See the README for more details. Thu Jul 1 10:16:38 2004 Steve Huston * modules/AutomakeWorkspaceCreator.pm (write_comps): Write a configure.ac.Makefiles entry for the top-level workspace as well, else there's no starting point in the configured tree. * modules/TemplateParser.pm: Added new template <%normalize%> that takes a exename as a parameter. Converts '-' to '_' to make the name palatable prepended to a special automake name such as _SOURCES. * templates/automake.mpd: Applied a patch from Chad that makes grouped sources work better. Also, added <%normalize%> to exename_SOURCES generation so exe names with '-' in them get changed to '_' for their SOURCES. This is the same normalization Automake will do when trying to find the SOURCES for a bin_ target. Removed the support for being able to select library subsets to build at configure time. It didn't work right, and the subset selection capability is not in the MPC-generated GNUmakefiles either. It can be (re)attempted later if needed, but the longer-term goal in ACE land seems to be to find other ways to reduce footprint. Also changed the _PROGRAMS generation to switch between bin_ and noinst_ depending on presence of an 'install' directive. Tue Jun 22 20:53:12 2004 Ossama Othman * modules/AutomakeWorkspaceCreator.pm (AUTOMAKE_OPTIONS): Removed generation of this make variable. All Automake options should generally be set via the AM_INIT_AUTOMAKE autoconf macro in the application's `configure.ac' file. Tue Jun 22 20:35:36 2004 Ossama Othman * templates/automake.mpd (AUTOMAKE_OPTIONS): Removed this make variable. All Automake options should generally be set via the AM_INIT_AUTOMAKE autoconf macro in the application's `configure.ac' file. (pkginclude_HEADERS): Corrected make variable for template files. "$(INLINE_FILES)" -> "$(TEMPLATE_FILES)". Tue Jun 15 07:02:12 2004 Chad Elliott * USAGE: * modules/Options.pm: Updated the usage information to provide more details on using the -base option. * modules/ProjectCreator.pm: We need to ensure that macros only get expanded to environment variables when converting source file, header file, etc. related macros. Thanks to Phil Mesnier for reporting this. Thu Jun 10 08:33:08 2004 Chad Elliott * modules/Driver.pm: * modules/Options.pm: Moved the usage out of the Driver and into the Options module. * modules/ProjectCreator.pm: * modules/VC6ProjectCreator.pm: Added support for replacing $(...) with an environment variable. This is not necessary for 'make' based project types and is not supported by Visual C++ 7 or higher. So, it is used by the em3 and vc6 types. Tue Jun 8 17:14:29 2004 Steve Huston * modules/AutomakeWorkspaceCreator.pm: Fixed string writing to write a tab to the generated file where desired, not a '\t'. Tue Jun 8 12:29:19 2004 Steve Huston * modules/AutomakeWorkspaceCreator.pm (write_comps): Get automake trees to generate. It now relies on this scheme: * Each project goes in its own Makefile..am file (this is not a change from previous versions). * Each Makefile.am has a list of local project Makefiles added to it and has all-local, clean-local, and distclean-local targets added that cycle through all the local projects and do sub-makes. * At autoconf/automake (bootstrap) time, all of the Makefile[.].am files get processed into Makefile[.].in files. This list is directed by the configure.ac.Makefiles list that should be included into configure.ac. * At configure time, all of the .in files get processed into Makefiles. All the local targets that MPC put in the Makefile.am files should go through to the Makefiles at each level, and direct the build. Made these changes: - Only generate a configure.ac.Makefiles at the starting directory level; not at each level. When adding entries, don't keep the ".am" suffix; this was a mistake. - The configure.ac.Makefile also needs an entry for the Makefile at each directory level with a project. - The top-level Makefile.am has the "ACLOCAL = @ACLOCAL@" and "AC_LOCAL_AMFLAGS = -I m4" lines added to the end to pass the flags along properly when running autoconf. Tue Jun 8 11:30:15 2004 Chad Elliott * templates/vc7.mpd: Added the ability to add additional compiler options through the use of the compile_flags template value. Fri May 28 14:03:13 2004 Chad Elliott * LICENSE: Added a license file with the content from the MPC section of http://theaceorb.com/product/license.html. * config/openssl.mpb: * templates/automake.mpd: * templates/bmake.mpd: * templates/makedll.mpt: Removed trailing white space. Fri May 28 13:06:01 2004 Chad Elliott * templates/em3vcplib.mpt: * templates/em3vcplibexe.mpt: * templates/vc7lib.mpt: * templates/vc7libexe.mpt: Consistently name static project configurations across all Windows based project types (excluding NMake since it has both dynamic and static in a single makefile). Wed May 26 17:17:29 2004 Steve Huston * modules/AutomakeWorkspaceCreator.pm: In write_comps(), when writing the SUBDIRS list, only list next-level directories - SUBDIRS is only allowed to list them, and not anything below. Mon May 24 13:44:13 2004 Chad Elliott * modules/WorkspaceCreator.pm: Print out the projects involved when warning about circular dependencies. Mon May 24 07:35:39 2004 Chad Elliott * config/zzip.mpb: Added a base project to support the zzip library. * modules/BMakeWorkspaceCreator.pm: * modules/NMakeWorkspaceCreator.pm: Removed unused variables. * modules/AutomakeWorkspaceCreator.pm: * modules/CBXWorkspaceCreator.pm: * modules/GHSWorkspaceCreator.pm: * modules/SLEWorkspaceCreator.pm: * modules/VA4WorkspaceCreator.pm: Removed an extra unused parameter to the sort_dependencies method. * modules/Version.pm: Modified the code to only read the ChangeLog if we are going to display the version number. * USAGE: * modules/Creator.pm: * modules/DirectoryManager.pm: * modules/Driver.pm: * modules/Options.pm: * modules/Parser.pm: * modules/ProjectCreator.pm: * modules/WorkspaceCreator.pm: Added support for generating the workspace and project files into an alternate directory tree. This can not be used to build code outside of the source tree, only to generate the workspace and project files to make it easier to package up these files for distribution. Sat May 22 17:28:31 2004 Steve Huston * modules/AutomakeWorkspaceCreator.pm: Changed AUTOMAKE_OPTIONS to "1.7 foreign" to match what's used at the project level. Tue May 18 19:48:33 2004 Chad Elliott * modules/ProjectCreator.pm: Remove escape sequences from extensions while generating the list of possible file names from custom inputs instead of doing it after the fact and possibly removing back slashes from parts of the generated file path. Tue May 18 09:37:29 2004 Chad Elliott * modules/Version.pm: Added code to automatically determine the beta version number at run-time. This number is determined by the manipulating the total number of ChangeLog entries. * mpc.pl: * mwc.pl: Provide a getBasePath() function to allow MPC to determine the location of the ChangeLog. Tue May 18 07:22:53 2004 Chad Elliott * modules/ProjectCreator.pm: When parsing the component list, convert any $(...) to relative paths if possible. Fri May 14 06:45:14 2004 Chad Elliott * MPC version 3.1 released. Wed May 12 08:14:00 2004 Chad Elliott * modules/BMakeProjectCreator.pm: Sort the directories when forming the cppdir value. We need to ensure that '.' comes first. Borland make attempts to generate source files in each CPPDIR directory until it is successful which explains multiple invocations of custom build tools. Tue May 11 11:36:00 2004 Chad Elliott * templates/em3vcp.mpd: * templates/em3vcpdll.mpt: * templates/em3vcpdllexe.mpt: * templates/em3vcplib.mpt: * templates/em3vcplibexe.mpt: Added support for ARM v4. Thanks to Jonathan Pollack for providing the patches. Also, I fixed a bug where the precompiled header output was going to the wrong directory. Tue May 11 10:53:11 2004 Chad Elliott * USAGE: * modules/Driver.pm: * modules/Options.pm: Added a -version option to print the MPC version and exit. * modules/ProjectCreator.pm: Added libraries and executables to the install script generation. * prj_install.pl: Added support for installation of libraries and executables. Fri May 7 07:41:55 2004 Chad Elliott * templates/bmakelib.mpt: * templates/bmakelibexe.mpt: * templates/em3vcplib.mpt: * templates/em3vcplibexe.mpt: * templates/vc6dsplib.mpt: * templates/vc6dsplibexe.mpt: Consistently name the intermediate and output directories across all Windows based templates. Thu May 6 10:50:53 2004 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug dealing with generated files that used the 'gendir' setting. If the generated files were listed, but did not match up exactly with what was expected, they would be listed twice in the generated project. Thu May 6 09:21:59 2004 Chad Elliott * templates/em3vcp.mpd: * templates/nmake.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: Added a template name, link_options, to allow users to inject MS linker options into the generated projects. Wed May 5 12:34:51 2004 Chad Elliott * modules/Creator.pm: * modules/ProjectCreator.pm: Changed the way that duplication additions for libpaths, includes and libs are handled. We now silently ignore duplicate additions and maintain original assignment order. This fixes problems with static linking on UNIX. Tue May 4 07:40:02 2004 Chad Elliott * README: Updated information about the use of 'gendir' without 'output_option' set in a custom file definition. Mon May 3 23:12:37 2004 Ossama Othman * config/openssl.mpb: Some Linux OpenSSL installations compile in Kerberos support. Add the Kerberos include path to preprocessor include path. Mon May 3 12:17:10 2004 Chad Elliott * modules/ProjectCreator.pm: By default, refer to the dll based template input files for static template input. If the template supports generating static projects, then the project creator module will have overridden the methods to return the correct template input files. * templates/bmake.mpd: * templates/em3vcp.mpd: * templates/nmake.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: These template files have been changed in a similar fashion to Justin Michel's changes from Sat May 1 15:20:00 2004. Mon May 3 10:49:28 2004 Chad Elliott * modules/ProjectCreator.pm: Fixed yet another bug in the relative replacement code section. If a portion of the current path was found in the replacement value, it would assume that the whole thing was to be replaced. This is obviously wrong and has been corrected. Sat May 1 15:20:00 2004 Justin Michel * templates/vc7.mpd: * templates/vc7dll.mpt: * templates/vc7lib.mpt: Resource Files are only for exe or dll binaries, not for static libs. Added a check for type_is_static, so that the resource files section is not created. type_is_* should be defined outside of the individual configurations. This change allows checking type_is_static from outside of a particular configuration. Thu Apr 30 14:50:00 2004 Justin Michel * templates/nmake.mpd: Added a new DEPENDCHECK target that either prints the "Using x.dep" or "Warning : cannot find x.dep". This way, the warning is not displayed when generating dependencies. Fri Apr 30 11:47:48 2004 Chad Elliott * README: Fixed spelling errors. * config/mfc.mpb: Added a non-ACE specific version of the mfc base project. * modules/Creator.pm: * modules/Driver.pm: * modules/Options.pm: * modules/ProjectCreator.pm: Made modifications to avoid Perl warnings when working with version 5.005 or earlier. * prj_install.pl: Added additional information to the usage that describes the default set of install tags. * templates/cbx.mpd: Removed ACE specific lines. Thu Apr 29 14:50:00 2004 Justin Michel * templates/nmake.mpd: The custom build output should be the first thing listed for the ALL target, to ensure that any generated files are available for the rest of the commands. Mon Apr 26 09:55:25 2004 Chad Elliott * templates/em3vcplibexe.mpt: * templates/vc6dsplib.mpt: * templates/vc6dsplibexe.mpt: Switched to using MFC as a shared dll even in static libraries and executables. There is no need to statically link in the MFC libraries. Fri Apr 23 11:06:10 2004 Chad Elliott * README: * modules/ProjectCreator.pm: Added additional functionality to fix RT #3816 and RT #3847. Both issues dealt with custom generated files not being cleaned up properly. The real issue was that there was no way to represent, in MPC, what was being generated by the custom command. Additional custom definition keywords have been added that allow users to represent what the custom command actually generates. * modules/Version.pm: Increment the minor version number. * templates/vc7.mpd: This change fixes RT #3856. The vc7 template (which is being used by the vc8 project type) did not work quite correctly in Visual C++ 8. Multi-lined custom commands were changed to be compatible with vc7, vc71 and vc8. Thu Apr 22 08:32:20 2004 Chad Elliott * config/openssl.mpb: * config/qt.mpb: * config/zlib.mpb: Added the vc8 type to the 'specific' sections that have vc71 in them. Wed Apr 21 08:50:01 2004 Chad Elliott * modules/VC8ProjectCreator.pm: Corrected some bugs in this module. * modules/VC8WorkspaceCreator.pm: Removed some redundant methods that are inherited from the VC71WorkspaceCreator. Wed Apr 21 13:27:43 UTC 2004 Johnny Willemsen * USAGE: Added vc8. Wed Apr 21 13:06:44 UTC 2004 Johnny Willemsen * modules/VC8ProjectCreator.pm: * modules/VC8WorkspaceCreator.pm: * modules/MWC.pm: * modules/MPC.pm: Added Visual C++ 8 MPC template. This is for the Microsoft Visual Studio 8 Whidbey March 2004 Preview. Mon Apr 19 13:44:16 2004 Chad Elliott * modules/Creator.pm: * modules/ProjectCreator.pm: When subtracting values from mapped keywords, we must expand template values in order to ensure that the values that are being subtracted are actually removed. This has a side effect of expanding template values during subtraction even if the project creator type does not normally expand template values. Fri Apr 16 08:05:19 2004 Chad Elliott * prj_install.pl: This script reads .ins files generated by MPC and installs portions of a project into a user specified location. Thu Apr 15 13:16:03 2004 Chad Elliott * modules/WorkspaceCreator.pm: Fixed a bug where generating the hierarchical workspace would have the wrong build ordering. It was a subtle bug that had to do with the way projects were sorted. Wed Apr 14 07:41:58 2004 Chad Elliott * modules/ProjectCreator.pm: Modified the file exclusion behavior to work correctly with grouped files within components. Tue Apr 13 13:46:14 2004 Chad Elliott * README: * USAGE: Removed ACE specific references and documentation. * modules/ProjectCreator.pm: Added wildcard support (*?[]) for component lists and the ability to exclude files from the component lists by preceding the name with '!'. ex. project { Source_Files { // Get every source file, except foo.cpp !foo.cpp } } project { Source_Files { // Get every cpp file that starts with RT RT*.cpp } } * modules/Parser.pm: * modules/TemplateParser.pm: Added the ability for the TemplateParser to cache the contents of a template to avoid opening and reading the project template over and over again. Mon Apr 12 11:38:29 2004 Chad Elliott * clone_build_tree.pl: Added more file types to exclude during cloning. * modules/Creator.pm: We still need to maintain the real set of files added for generation of the workspace. * modules/WorkspaceCreator.pm: Added more information to the error message when duplicate projects are found within a workspace. Mon Apr 12 10:00:56 2004 Chad Elliott * modules/Creator.pm: Switched the files_written structure to a hash array instead of an array to make searches within that structure faster. * modules/WorkspaceCreator.pm: When generating workspaces, only write out the workspace if it is the main workspace that corresponds to an mwc file or it hasn't been written out yet. * templates/vc7.mpd: * templates/vc7dll.mpt: * templates/vc7exe.mpt: * templates/vc7lib.mpt: * templates/vc7libexe.mpt: Removed the 'debug' template keyword. It was unnecessary and conflicted with the Debug configuration now that these are case-insensitive. Fri Apr 9 21:19:34 2004 Chad Elliott * README: * modules/Creator.pm: * modules/ProjectCreator.pm: Added a new keyword, 'recurse', that causes MPC to recurse into directories listed under componets such as Source_Files, Header_Files, etc. Fri Apr 9 13:51:47 2004 Chad Elliott * clone_build_tree.pl: Added a script that works similarly to create_ace_build.pl except that it does not restrict the location of the cloned build tree and works with any tree structure, not just ACE_wrappers. Fri Apr 9 12:38:15 2004 Chad Elliott * modules/ProjectCreator.pm: When replacing $() with template variables, we need to ensure that if what it is replaced with also contains a $() construct, then that too will be replaced with relative definitions. Thu Apr 8 09:51:28 2004 Chad Elliott * templates/make.mpd: Corrected a problem with the pch_postrule commands. I forgot that $$ was interpreted by make, so what I really wanted was $$$$ to get $$ passed out to the shell. Thu Apr 8 07:02:25 2004 Chad Elliott * USAGE: * modules/Driver.pm: Removed the documentation stating that new name value template pairs could not be added using -value_template. This is no longer the case. * modules/Options.pm: * modules/ProjectCreator.pm: * modules/TemplateInputReader.pm: * modules/TemplateParser.pm: Support replacing $() constructs with template values of the same name. By default all project creators will do this. Overriding the expand_variables_from_template_values method is the way to modify this behavior. Wed Apr 7 06:49:16 2004 Chad Elliott * templates/bmake.mpd: * templates/em3vcp.mpd: * templates/make.mpd: * templates/nmake.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: Finished support for the 'pch_postrule' of the Define_Custom which post edits generated source files and places the #include for the precompiled header at the top of the file. Mon Apr 5 10:43:03 2004 Chad Elliott * README: * USAGE: * mpc.pl: * mwc.pl: * config/bison.mpb: * config/default.rel: * config/flex.mpb: * config/global.features: * config/global.mpb: * config/lex.mpb: * config/openssl.mpb: * config/qt.mpb: * config/qt_moc.mpb: * config/rpc.mpb: * config/zlib.mpb: * modules/AutomakeProjectCreator.pm: * modules/AutomakeWorkspaceCreator.pm: * modules/BMakeProjectCreator.pm: * modules/BMakeWorkspaceCreator.pm: * modules/CBXProjectCreator.pm: * modules/CBXWorkspaceCreator.pm: * modules/Creator.pm: * modules/Driver.pm: * modules/EM3ProjectCreator.pm: * modules/EM3WorkspaceCreator.pm: * modules/FeatureParser.pm: * modules/GHSProjectCreator.pm: * modules/GHSWorkspaceCreator.pm: * modules/GUID.pm: * modules/HTMLProjectCreator.pm: * modules/HTMLWorkspaceCreator.pm: * modules/MPC.pm: * modules/MWC.pm: * modules/MakeProjectCreator.pm: * modules/MakeWorkspaceCreator.pm: * modules/NMakeProjectCreator.pm: * modules/NMakeWorkspaceCreator.pm: * modules/Options.pm: * modules/OutputMessage.pm: * modules/Parser.pm: * modules/ProjectCreator.pm: * modules/SLEProjectCreator.pm: * modules/SLEWorkspaceCreator.pm: * modules/StringProcessor.pm: * modules/TemplateInputReader.pm: * modules/TemplateParser.pm: * modules/VA4ProjectCreator.pm: * modules/VA4WorkspaceCreator.pm: * modules/VC6ProjectCreator.pm: * modules/VC6WorkspaceCreator.pm: * modules/VC71ProjectCreator.pm: * modules/VC71WorkspaceCreator.pm: * modules/VC7ProjectCreator.pm: * modules/VC7WorkspaceCreator.pm: * modules/Version.pm: * modules/WorkspaceCreator.pm: * templates/automake.mpd: * templates/bmake.mpd: * templates/bmakecommon.mpt: * templates/bmakedll.mpt: * templates/bmakedllexe.mpt: * templates/bmakelib.mpt: * templates/bmakelibexe.mpt: * templates/cbx.mpd: * templates/cbxdll.mpt: * templates/cbxexe.mpt: * templates/common.mpt: * templates/em3vcp.mpd: * templates/em3vcpdll.mpt: * templates/em3vcpdllexe.mpt: * templates/em3vcplib.mpt: * templates/em3vcplibexe.mpt: * templates/ghs.mpd: * templates/html.mpd: * templates/make.mpd: * templates/makedll.mpt: * templates/makeexe.mpt: * templates/nmake.mpd: * templates/nmakedll.mpt: * templates/nmakeexe.mpt: * templates/sle.mpd: * templates/sledll.mpt: * templates/sleexe.mpt: * templates/va4icc.mpd: * templates/va4iccdll.mpt: * templates/va4iccdllexe.mpt: * templates/va4icclib.mpt: * templates/va4icclibexe.mpt: * templates/vc6dsp.mpd: * templates/vc6dspdll.mpt: * templates/vc6dspdllexe.mpt: * templates/vc6dsplib.mpt: * templates/vc6dsplibexe.mpt: * templates/vc7.mpd: * templates/vc7dll.mpt: * templates/vc7exe.mpt: * templates/vc7lib.mpt: * templates/vc7libexe.mpt: Created a new repository for MPC. Local Variables: add-log-time-format: current-time-string End: ace-6.4.5+dfsg.orig/MPC/history/ChangeLog-3_50000644000175000017500000014141113154167361016547 0ustar tggtggFri May 30 15:48:49 UTC 2008 Chad Elliott * docs/templates/vc8.txt: Document the template variables used by the vc8 (and vc9) template. * templates/vc8.mpd: Modified the 'ImportLibrary' template variable to override the setting of the ImportLibrary instead of duplicating the ImportLibrary setting which is controled by the 'type_is_dynamic' template variable and the 'sharedname' project setting. Wed May 21 11:43:19 UTC 2008 Chad Elliott * clone_build_tree.pl: Removed cloned directories that had files previously, but have now become empty. * prj_install.pl: Added support for installing MinGW libraries. Mon May 19 18:53:21 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Added dependencies so that the executable gets relinked when one of the libraries change Mon May 19 14:29:21 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Build subdirs before subprojects Wed May 14 18:32:10 UTC 2008 Johnny Willemsen * templates/wb26.mpd: * templates/wb26wrproject.mpd: Limit the cases subprojects are used Tue May 13 18:32:10 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Removed SUB_OBJECTS again, it only works when the libs are specified with a full path * templates/wb26wrmakefile.mpd: Generate DEPLIBS, should be added to the dependencies of the partialImage but we have to figure out where to plug this into the workbench Tue May 13 16:47:10 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Improved clean speed Tue May 13 14:28:10 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: When generating with standard_build set SUB_OBJECTS to PARTIAL_LIBS this way an executable is dependent on its libs, when the libs change the executable gets relinked. Also moved some settings to the global settings instead of storing them per build spec Sun May 11 19:38:10 UTC 2008 Johnny Willemsen * docs/templates/wb26.txt: * templates/wb26.mpd: * templates/wb26wrproject.mpd: Added enable_subprojects which has to be set as value_template to turn on the generation of subprojects because subprojects can cause long compile/clean times when using standard build support Wed May 7 13:30:37 UTC 2008 Chad Elliott * modules/WB26WorkspaceCreator.pm: Removed unnecessary and repeated code. Wed May 7 08:01:10 UTC 2008 Johnny Willemsen * modules/WB26WorkspaceCreator.pm: Improved getting the location of the .project/.wrproject file at the moment environment variables are used Tue May 6 18:05:10 UTC 2008 Johnny Willemsen * modules/WB26WorkspaceCreator.pm: When we find MPC ADD DIRECTIVES set write to 1 so that when a project has no dependencies we remove this MPC ADD DIRECTIVES from the generated files * templates/wb26.mpd: Use tabs instead of space Tue May 6 13:40:10 UTC 2008 Johnny Willemsen * modules/WB26WorkspaceCreator.pm * templates/wb26.mpd: Also generate the referenced projects in the .project file Tue May 6 12:26:09 UTC 2008 Chad Elliott * modules/WB26WorkspaceCreator.pm: Updated the code to work with the .wrproject. * templates/wb26wrproject.mpd: Added the lines to allow MPC to add dependencies after the workspace has been created. Tue May 6 07:12:10 UTC 2008 Johnny Willemsen * modules/WB26WorkspaceCreator.pm: Added helper to create subprojects Mon May 5 15:45:04 UTC 2008 Chad Elliott * config/mpich.mpb: Use MPI_ROOT instead of MPICH_ROOT. This is in keeping with the generic-ness of the environment variables to allow drop-in replacements for different implementations. * config/openmpi.mpb: Added "requires += mpi". * modules/ProjectCreator.pm: Fixed a bug where files added through a directory would not be removed as duplicate if the generated files had the 'gendir' value set on them with one or more slash. This only affected Windows project types. * registry.pl: Fixed the registry value remove option. Mon May 5 07:40:10 UTC 2008 Johnny Willemsen * clone_build_tree.pl: Don't clone wb26/vxtest generated files, .d files and Makefiles in subdirectories Fri May 2 11:57:32 UTC 2008 Johnny Willemsen * templates/wb26dll.mpt: Added PPC85XXgnu buildspec Thu May 1 14:32:09 UTC 2008 Chad Elliott * modules/ProjectCreator.pm: Added a template method to allow project creators to disable the "no useful targets" warning. Wed Apr 30 18:59:45 UTC 2008 Chad Elliott * config/openmpi.mpb: Added a very simple base project for Open MPI. * templates/make.mpd: Add the .NOTPARALLEL target if there is multiple files generated by a custom command. Wed Apr 30 11:36:17 UTC 2008 Chad Elliott * modules/ProjectCreator.pm: Fixed two different bugs: 1) Using ^ with a wildcard did not function properly if the generated files were not already there. Now, the wildcard expansion (prefixed by ^) is not done until the end and performed on the list of added files instead of the file system. 2) Flag overrides, such as recurse, gendir, etc., specified for directories were not propagated to the files located within that directory. Now, they are copied over to files found within the traversed directory. Sun Apr 27 18:49:45 UTC 2008 Abdullah Sowayan * templates/wb26wrproject.mpd: Minor change to the following commit: Sun Apr 27 18:15:32 UTC 2008 Johnny Willemsen Make sure the quote is closed after it is opened. Workbench complains otherwise. Sun Apr 27 18:15:32 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Set correct tool with standard build Fri Apr 25 19:05:59 UTC 2008 Chad Elliott * clone_build_tree.pl: Added a -s option that allows the user to specify a starting directory instead of using the current directory. Thanks to Hubert Talbot for providing the idea and original implementation. * docs/USAGE: Document the default logging settings. Fri Apr 25 09:12:00 UTC 2008 Simon Massey * config/global.features: * config/unicode.mpb: Feature name "uses_wchar" already used within ACE/TAO. Replaces the "unicode" feature name. Template / project name within MPC still named unicode. Thu Apr 24 09:55:00 UTC 2008 Simon Massey * config/unicode.mpb: Dose not depend upon MFC. Use together if needed for Unicode MFC apps. Thu Apr 24 07:06:32 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: With a custom only project set the PROJECT_TARGET value so that the custom rules are triggered Wed Apr 23 14:36:32 UTC 2008 Johnny Willemsen * templates/wb26.mpd: * templates/wb26wrproject.mpd: Added support for source_dirs Wed Apr 23 14:31:32 UTC 2008 Johnny Willemsen Merging in the changes from the wb26 branch * docs/templates/common.txt: Document the new make_coexistence * docs/templates/wb26.txt: * docs/templates/wb26wrproject.txt: Renamed wb26wrproject to wb26 * modules/ProjectCreator.pm: Changed from Chad Elliott to make the make_coexistence commandline flag available in the template * modules/WB26ProjectCreator.pm: Use make_coexistence and added template input files * modules/WB26WorkspaceCreator.pm: Supports make_coexistence * templates/nmakedll.mpt: * templates/nmakeexe.mpt Removed _M_AMD64, this is a define that is set by the compiler * templates/vc8platforms.mpt: Removed _M_IX86_, this is set by the msvc compiler, we shouldn't set this. This fixes bugzilla 3293, thanks to David Highley for reporting this * templates/wb26.mpd: * templates/wb26dll.mpt: * templates/wb26exe.mpt: * templates/wb26wrmakefile.mpd: * templates/wb26wrproject.mpd: By default we now generate the project files in the same directory as the mpc file, this means you can only have one project in a directory. If you don't want this, use -make_coexistence on the commandline. Also support -value_template standard_build=1 to support a standard build, but this support is not ready yet. Mon Mar 7 08:24:46 UTC 2008 Johnny Willemsen * docs/templates/wb26wrproject.txt: Added linkflags Fri Apr 4 17:42:43 UTC 2008 Chad Elliott * docs/templates/vc7.txt: * docs/templates/vc8.txt: Added documentation for the IgnoreAllDefaultLibraries template variable. * templates/vc7.mpd: Added a template variable, IgnoreAllDefaultLibraries, as is provided in the vc8 template to set this property in the project. Thanks to Terry Cordes . Fri Apr 4 11:26:34 UTC 2008 Chad Elliott * config/boost_unit_test_framework.mpb: Committing this on behalf of Kevin Heifner . Starting with Boost 1.34 unit_test has had auto linking on Windows. Starting with Boost 1.35 having the explicit along with the auto linking caused crashing on exit of compiled applications. This change removes the explict lib for most Window compilers. vc6 and vc7 will still use explicit linking on the grounds that they will likely be using a pre-1.34 version of Boost. * modules/WorkspaceCreator.pm: When printing the MPC options into the workspace, enclose the parameter in double quotes if it contains a '*' charater too. Thu Mar 3 07:02:46 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Don't add -ansi to the cflags Wed Apr 2 14:48:51 UTC 2008 James H. Hill * config/xsc_base.mpb: * config/xsc_cxx.mpb: * config/xsc_idl.mpb: * config/xscrt.mpb: * config/xscrt_utils.mpb: Moved these files to XSC distribution. Wed Mar 2 18:58:46 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Added support for linkflags Mon Mar 31 13:46:46 UTC 2008 Chad Elliott * modules/Creator.pm: Modified expand_variables() to convert back slashes to forward slashes if the the 'convert_slashes' or the 'requires_forward_slashes' data members are set to true. This is the case for the wb26 project type. Mon Mar 31 12:36:58 UTC 2008 Chad Elliott * docs/templates/wb26wrproject.txt: Added documentation for the template variables for the wb26wrproject template. Fri Mar 28 15:30:00 UTC 2008 Simon Massey * config/unicode.mpb: * config/global.features: Allow for the already built-in unicode feature support to be recognised. Tue Mar 25 14:35:19 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Added support for link_group Tue Mar 25 11:43:40 UTC 2008 Chad Elliott * docs/README: Documented the new third and optional parameter to verbatim which allows the addition of verbatim sections instead of overwriting. * modules/ProjectCreator.pm: Require a parameter to verbatim to enable the verbatim addition feature. Some existing ACE and TAO MPC files rely on the overwriting behavior of verbatim. Mon Mar 24 17:10:23 UTC 2008 Chad Elliott * modules/ProjectCreator.pm: Changed 'verbatim' to add to existing verbatim settings instead of overwritting them. Mon Mar 24 15:18:28 UTC 2008 Chad Elliott * docs/USAGE: Document the 'main_functions' configuration file setting. * modules/Driver.pm: * modules/ProjectCreator.pm: Support the ability to specify additional "main" functions to work with automatic executable project recognition. Fri Mar 21 16:06:00 UTC 2008 Chad Elliott * modules/MakeWorkspaceBase.pm: Fixed the post_workspace() parameters. The file handle (which is unused in the method) was not shifted. * modules/WorkspaceCreator.pm: Provide a mechanism for creating multiple output files per workspace. * modules/WB26WorkspaceCreator.pm: Use the above mechanism for the wb26projects.lst file. Thu Mar 20 15:23:06 UTC 2008 Chad Elliott * docs/README: * modules/ProjectCreator.pm: A project will now be marked custom_only if it contains no source or resource files, but does contain custom input files. Thu Mar 20 13:29:19 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: No need to use full_path for the includes. Within the workbench we can define the environment variables Thu Mar 20 13:26:19 UTC 2008 Chad Elliott * modules/ProjectCreator.pm: Convert slashes on values provided to back_to_variable() to ensure that they match the relative values supplied implicitly through environment variables or explicitly through the -relative option. Thu Mar 20 12:46:46 UTC 2008 Chad Elliott * modules/Creator.pm: * modules/ProjectCreator.pm: Moved the recursive_includes and recursive_libpaths functionality out of Creator and into ProjectCreator. In the process, I fixed the following bugs: 1) Setting and subtracting from recursive_* would cause the value to be added instead of the performing desired function. 2) When values are added in the form of $(VAR)/dir, they are expanded, recursed and then the recursed values are turned back into the form of $(VAR)/... * modules/DirectoryManager.pm: Changed function parameter code from shifting off of the default array to assigning from the default array. * modules/TemplateParser.pm: Modified to use the DirectoryManager::path_is_relative() function instead of rolling my own regular expression to check for relative paths. Wed Mar 19 14:19:14 UTC 2008 Chad Elliott * modules/AutomakeWorkspaceCreator.pm: Fixed a bug where filenames or paths were used directly within a regular expression. Thanks to Thomas Girard for reporting it and providing a patch. Wed Mar 19 13:47:47 UTC 2008 Chad Elliott * docs/README: * modules/ProjectCreator.pm: Added the ability to use <%gendir%> in custom sections. This variable will contain the 'gendir' setting if provided and '.' if it is not. * modules/TemplateParser.pm: Fixed a bug where the 'full_path' function would use the current directory if the value passed to it was a Windows style path. * templates/wb26wrproject.mpd: Added the 'full_path' usage back now that the function has been fixed. Wed Mar 19 12:27:53 UTC 2008 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug where multiple projects within a single MPC file and a project type with multiple templates would cause problems due to project information being updated for each template. The fix is to only update project info for the visible template. * modules/TemplateParser.pm: Modified the 'full_path' template function to allow relative paths to be converted to full paths even if they don't exist. Relative paths are assumed to be relative from the current working directory (which is the directory of the MPC file). * modules/WorkspaceCreator.pm: Added a comment about the progress indicator. Tue Mar 18 18:56:35 UTC 2008 Chad Elliott * modules/ProjectCreator.pm: Modified to write out N files per MPC project. Now, a file will be written out per template file associated with the project type. However, the workspace can only "know" about one project file (which is determined by the sub-classed project creator). * modules/WB26ProjectCreator.pm: * modules/WB26WorkspaceCreator.pm: Combined all of the functionality from WB26WR* into these modules. The project creator causes 3 files per project to be written and 2 files per workspace. * modules/WB26WRMAKEFILEProjectCreator.pm: * modules/WB26WRMAKEFILEWorkspaceCreator.pm: * modules/WB26WRPROJECTProjectCreator.pm: * modules/WB26WRPROJECTWorkspaceCreator.pm: Removed these files. Fri Mar 14 16:43:24 UTC 2008 Chad Elliott * docs/README: Update documentation on which options can not be used with 'cmdline'. * modules/Driver.pm: * modules/Options.pm: Renamed the option data member from 'coexistence' to 'make_coexistence' to be consistent with the option name. * modules/WorkspaceCreator.pm: Fixed a bug where -into passed to the 'cmdline' setting could cause serious problems for the resulting generated project files. Also, simplified the code used for warning about ignored options provided to 'cmdline'. Thu Mar 13 14:49:45 UTC 2008 Chad Elliott * modules/Creator.pm: Fixed an incorrect comment. * modules/Driver.pm: Changed to add command line options to the front of the argument array so that options provided at the end by the user that require a parameter (but are not given one) do not gobble up the added options. Thu Mar 13 02:07:59 UTC 2008 Chad Elliott * config/global.features: Disable the java feature. * config/xsc_base.mpb: Removed the empty source_outputext setting. * modules/ProjectCreator.pm: Allow the setting of *_outputext to empty to have output files that are similar to the input name, but without an extension. Also, changed function parameter code from shifting off of the default array to assigning from the default array. Sun Mar 9 19:31:25 UTC 2008 Johnny Willemsen * modules/ProjectCreator.pm: Also _t.* files are template files, needed for the VMS build Sun Mar 9 07:54:25 UTC 2008 Johnny Willemsen * modules/WB26WRPROJECTWorkspaceCreator.pm: Make sure we always generate a full path for the project files Sat Mar 8 06:59:25 UTC 2008 Johnny Willemsen * modules/WorkspaceCreator.pm: Reverted the changes to make the workspace creator case insensitive, it doesn't work for all case, probably because part of the lookup is done on hashed values. I am going to explicitly list a project name in the files that cause the problems on VMS Fri Mar 7 20:27:25 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Don't use fullpath for includes * modules/WB26WRPROJECTWorkspaceCreator.pm: Generate a wb26projects.lst that lists the projects that are generated Fri Mar 7 18:17:25 UTC 2008 Johnny Willemsen * modules/WorkspaceCreator.pm: When we give a warning, make sure we present the user the mixed case name, thanks to Adam Mitz for noticing this Fri Mar 7 14:51:25 UTC 2008 Johnny Willemsen * modules/WorkspaceCreator.pm: Only retrieve the onVMS value only once. Made the handling of the after keyword case insensitive. If you have a project idl and after += IDL this will work now. This is needed because on OpenVMS all filenames are returned lower case by perl and the after specified by the user is mixed case which resulted in the fact that the after just didn't work on OpenVMS. Thanks to Chad Elliott for reviewing the patches and point out the possible performance problems of my original changes Thu Mar 6 15:16:25 UTC 2008 Johnny Willemsen * modules/WorkspaceCreator.pm: Use method from base class to check whether we run on VMS or not Wed Mar 5 14:40:20 UTC 2008 James H. Hill * config/xsc_base.mpb: * config/xsc_cxx.mpb: * config/xsc_idl.mpb: * config/xscrt.mpb: * config/xscrt_utils.mpb: Base projects for using XSC. Mon Mar 3 14:19:25 UTC 2008 Johnny Willemsen * config/log4cplus.mpb: Added base project for log4cplus Sat Feb 29 11:51:25 UTC 2008 Johnny Willemsen * modules/Creator.pm: Strip out ^ from filenames on OpenVMS. Fri Feb 28 13:36:25 UTC 2008 Johnny Willemsen * modules/WorkspaceCreator.pm: Strip out ^ from directory names on OpenVMS. Fixes bugzilla 3237. Wed Feb 27 14:09:25 UTC 2008 Johnny Willemsen * modules/Driver.pm: On OpenVMS all filenames are returned lower case. The dynamic loading of creators then fails. Addressed this by opening the creator file and read the first line, it normally starts with package and after that the package name. Thanks to Chad Elliott for this idea and reviewing the proposed change. Fri Feb 22 14:49:25 UTC 2008 Adam Mitz * modules/TemplateParser.pm: Added a new template function, <%full_path()%>, which will expand environment variables and resolve relative paths to absolute paths. Template authors should only use this when the target build system requires it, since it limits the MPC user's flexibility in deciding when and how env vars are expanded, and removes "portability" of generated project files (by which I mean the ability to move them around in a filesystem, or even move them to different machines). * templates/wb26.mpd: * templates/wb26wrproject.mpd: Made use of the new <%full_path()%> function. Thanks to Johnny and Chad for testing and reviewing this work. This resolves the enhancement request documented in bugzilla bug# 3218. Mon Feb 11 15:21:12 UTC 2008 Johnny Willemsen * docs/README: * docs/USAGE: * modules/Driver.pm: * modules/Options.pm: * modules/ProjectCreator.pm: * modules/WorkspaceCreator.pm: Extend MPC with a -relative_file commandline argument. By default the default.rel file is loaded which specific which environment variables are expanded. With -relative_file the user can specify that a differnt file has to be loaded. This fixes bugzilla 3224 Mon Feb 11 06:23:12 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Make sure libs are installed correctly Sun Feb 10 19:44:12 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Don't depend on windriver make variables for the postbuild and clean step, just generate our own Fri Feb 8 19:50:12 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Corrected clean of installed executables and libraries Fri Feb 8 09:35:12 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Generate custom clean commands. Now IDL generated files will be removed as part of the clean step Thu Feb 7 19:02:12 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Also generate the post build and clean steps when we generate a static project Thu Feb 7 18:49:12 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Generate a clean step which removes an installed library of executable Sun Feb 3 19:10:12 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Replaced some spaces with a tab to fix GNU make errors Fri Feb 1 14:39:12 UTC 2008 Johnny Willemsen * configs/build_files.mpb: Also add mwc files to the build files section. Fri Feb 1 09:37:12 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Corrected copying of the library/executable to their location Wed Jan 30 19:28:12 UTC 2008 Johnny Willemsen * configs/build_files.mpb: New base project to add mpc/mpb files to a project as build files. Sat Jan 26 07:10:12 UTC 2008 Johnny Willemsen * modules/WB26WRMAKEFILEProjectCreator.pm: * modules/WB26WRPROJECTProjectCreator.pm: Cleanup Thu Jan 24 20:36:12 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Further improvements for partial image support Thu Jan 24 19:51:12 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Added a second build target when building an executable. We first build a partial image which we then link with all the other libraries. This matches more the way we build using the GNU makefiles. At the end we want to get rid of the libraries as project contents but that still seems to be needed. Thu Jan 24 19:07:12 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: When building an executable also add the libraries used to the project contents. Only at that moment they are also added to the list of files that need to be munched. The other option would be to use the ADDED_OBJECTS in the .wrmakefile file but to nmppc we have to pass the full path of all the libraries and we don't have that information. Thu Jan 24 16:11:12 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Fixed contents generation because the project name got changed Thu Jan 24 16:01:12 UTC 2008 Johnny Willemsen * modules/WB26ProjectCreator.pm: * modules/WorkspaceCreator.pm: Committed fix of Chad Elliott so that the generation of the build order for the wb26 project type does work. * modules/WB26WorkspaceCreator.pm: Fixed comment about location of the file Thu Jan 24 13:46:12 UTC 2008 Johnny Willemsen * modules/WB26WorkspaceCreator.pm: The build order is stored in an eclipse file, generate this file so that we can control the build order easily. By placing this file in the following workspace directory .metadata\.plugins\org.eclipse.core.runtime\.settings Thu Jan 24 12:49:12 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Corrected order of the generated libs Wed Jan 23 14:58:12 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Added support for custom only projects Wed Jan 23 14:15:12 UTC 2008 Johnny Willemsen * templates/wb26.mpd: Use project_name, that is also set for projects that only generate IDL files Wed Jan 23 08:45:12 UTC 2008 Johnny Willemsen * modules/WB26WRMAKEFILEProjectCreator.pm: Also the wrmakefile requires paths to use forward slashes * templates/wb26wrmakefile.mpd: Go to the real directory where the commands should be started. The workbench sets a subdirectory as current directory Tue Jan 22 20:26:12 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Generate custom build commands which are for example used for triggering the IDL compiler Tue Jan 22 19:47:12 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Generate a post build command that copies the libraries and executables to the location specified through the mpc file Tue Jan 22 19:34:12 UTC 2008 Johnny Willemsen * templates/wb26.mpd: Also generate inline, header, and template files into the project Tue Jan 22 08:48:12 UTC 2008 Johnny Willemsen * modules/Creator.pm: * modules/ProjectCreator.pm: * modules/WB26WRPROJECTProjectCreator.pm: * modules/WB26WRPROJECTWorkspaceCreator.pm: * modules/WinWorkspaceBase.pm: * modules/WorkspaceCreator.pm: The WindRiver workbench requires all paths to have forward slashes, also on Windows. Added a requires_forward_slashes method so that the project creator can indicate that forward slashes has to be used. Thanks to Chad Elliott for helping with this, this fixes bugzilla 3201 Tue Jan 22 08:27:12 UTC 2008 Johnny Willemsen * modules/Creator.pm: Fixed recursive_includes and recursive_libs Mon Jan 21 15:36:12 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Add -mlongcall to CC_ARCH_SPEC Mon Jan 21 14:51:12 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Added missing -mlongcall flags Mon Jan 21 14:45:12 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Give libraries a lib prefix Mon Jan 21 14:30:12 UTC 2008 Johnny Willemsen * modules/WB26WorkspaceCreator.pm: * modules/WB26WRMAKEFILEWorkspaceCreator.pm: * modules/WB26WRPROJECTWorkspaceCreator.pm: Use different base * templates/wb26wrproject.mpd: Improved support for building libraries and executables Mon Jan 21 06:25:12 UTC 2008 Johnny Willemsen * modules/WB26WorkspaceCreator.pm: No workspace can be generated for the wb26 at this moment * modules/WB26WRMAKEFILEProjectCreator.pm: * modules/WB26WRMAKEFILEWorkspaceCreator.pm: * modules/WB26WRPROJECTProjectCreator.pm: * modules/WB26WRPROJECTWorkspaceCreator.pm: For the wb26 type we need to have multiple files generated but MPC can only generate one file for a type at this moment. Added two generators so that we just can generate the files for the wb26 with 3 generations. When MPC has been extended these files will go away. Sun Jan 13 18:34:12 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Use a different workbench project type when building a shared or static library Wed Jan 9 20:05:12 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Use the Librarian tool when building a library Wed Jan 9 19:53:12 UTC 2008 Johnny Willemsen * modules/WB26ProjectCreator.pm: The workbench needs unix style paths Wed Jan 9 19:34:12 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Generate include paths, do note that for the moment you must use -expand_vars when generating the project files, the full path must be generated Wed Jan 9 19:23:12 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Generate information for the linker Wed Jan 9 19:12:12 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Template for the .wrmakefile needed for the VxWorks Workbench Wed Jan 9 10:31:12 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: Added generation of libpaths and libs Wed Jan 9 09:10:12 UTC 2008 Johnny Willemsen * templates/wb26wrproject.mpd: New file, first version of the generator of the .wrproject file needed for the WindRiver workbench * modules/WB26ProjectCreator.pm: Overruled get_template so that we easily can enable the wb26wrproject file Mon Jan 7 15:16:12 UTC 2008 Johnny Willemsen * modules/WB26ProjectCreator.pm: * modules/WB26WorkspaceCreator.pm: * templates/wb26.mpd: First initial commit for a new generator for VxWorks 6.4/Workbench 2.6. A lot of more work has to be done on this generator before it is complete, but this is the first starting point. Because the Workbench has the restriction that the project file always has to be named .project for each project in a directory we create a subdirectory and in this directory we place the .project file. Then for each source file we use the linked file feature of the workbench. This has the current restriction that it must be a full path, no relative paths are supported. * docs/MPC.sgml: * docs/USAGE: Added missing vc9 and new wb26 Mon Jan 7 14:59:12 UTC 2008 Johnny Willemsen * config/.cvsignore: Removed, we are not using cvs anymore Mon Jan 7 14:57:12 UTC 2008 Johnny Willemsen * registry.pl: Added vc9 Tue Dec 18 20:21:28 UTC 2007 James H. Hill * config/mpich.mpb: Added a requires statement to the base project. Thu Dec 13 16:48:51 UTC 2007 James H. Hill * config/mpich.mpb: The import libraries on Windows are different than the libraries on non-Windows systems. Wed Dec 12 02:03:59 UTC 2007 James H. Hill * config/mpich.mpb: Base project that will set the necessary project settings for using MPICH, a freely available implementation of the Message Passing Interface (MPI). Tue Dec 11 21:36:44 UTC 2007 James H. Hill * config/odbc.mpb: Base project that will set the necessary project settings for using ODBC. On non-Windows systems, the base project supports UnixODBC and iODBC. Tue Dec 11 17:56:47 UTC 2007 James H. Hill * config/gacutil.mpb: Base project that will register .NET binaries, i.e., executables and shared libraries, with the Global Assembly Cache (GAC) after creation. This is very useful if you need to creating stand-alone assemblies that reference each other, but have no way of adding their dependency, such as a web application. Thu Nov 29 00:13:52 UTC 2007 Chad Elliott * modules/ProjectCreator.pm: Modified the 'optional' syntax to allow assignments in addition to additon assignments. This is mainly useful in Modify_Custom's. Tue Nov 27 13:12:55 UTC 2007 Chad Elliott * modules/VC9ProjectCreator.pm: * modules/VC9WorkspaceCreator.pm: Removed duplicated code. It will be inherited from VC8ProjectCreator and VC8WorkspaceCreator respectively. Tue Nov 27 12:23:48 UTC 2007 Chad Elliott * modules/WorkspaceCreator.pm: Fixed a bug in number_target_deps() where project types with dependency names are not the same as file names would not be numbered. Thu Nov 22 19:25:54 UTC 2007 Johnny Willemsen * Modules/VC9WorkspaceCreator.pm: Corrected generation Thu Nov 22 15:48:54 UTC 2007 Johnny Willemsen * Modules/VC9WorkspaceCreator.pm: Corrected generation Thu Nov 22 13:35:54 UTC 2007 Johnny Willemsen * config/boost_date_time.mpb: * config/boost_filesystem.mpb: * config/boost_iostreams.mpb: * config/boost_prg_exec_monitor.mpb: * config/boost_program_options.mpb: * config/boost_regex.mpb: * config/boost_serialization.mpb: * config/boost_signals.mpb: * config/boost_test_exec_monitor.mpb: * config/boost_thread.mpb: * config/boost_wave.mpb: * config/openssl.mpb: * config/swig_perl.mpb: * config/xerces.mpb: * docs/README: * modules/VC9ProjectCreator.pm: * modules/VC9WorkspaceCreator.pm: Added support for vc9 Thu Nov 15 13:18:35 UTC 2007 Chad Elliott * docs/templates/vc7csharp.txt: * docs/templates/vc7java.txt: * docs/templates/vc8csharp.txt: * docs/templates/vc8java.txt: Documented the AllowUnsafeBlocks template variable. * templates/vc7csharp.mpd: * templates/vc7java.mpd: * templates/vc8csharp.mpd: * templates/vc8java.mpd: Added the ability to set the AllowUnsafeBlocks attribute for csharp and java projects through the 'AllowUnsafeBlocks' template variable. Tue Nov 6 13:01:54 UTC 2007 Johnny Willemsen * modules/Creator.pm: * modules/ProjectCreator.pm: * docs/README: Added support for recursive_libpaths and recursive_includes. These can be used like libpaths and includes, but they recursively add also all subdirectories to libpaths/includes. Thanks to Chad Elliott for assisting with the implementation of these features. Mon Oct 22 12:11:13 UTC 2007 Chad Elliott * docs/README: Documented variable scopes. * modules/ProjectCreator.pm: Fixed a bug where any type of error in a base feature project would be reported as if the end of the feature project was not found. Also, fixed a bug where a scoped template variable addition would be evaluated multiple times resulting in a repeition of the added value. Thu Oct 11 17:42:54 UTC 2007 Chad Elliott * templates/vc8csharp.mpd: Fixed a problem where too many .resx files were being grouped to a "matching" 'Form' source file. Thu Oct 11 15:34:23 UTC 2007 Chad Elliott * docs/README: Document a requirement of a <%foreach%> that uses a function call with commas. In this case a variable name and base count is necessary. * docs/templates/make.txt: Documented missing template variables. * modules/TemplateParser.pm: Modified the 'remove_from' template function to work in a foreach and to allow better string manipulation. * templates/vc8csharp.mpd: Use the 'remove_from' function to group .resx files that fully or partially match a 'Form' source file. Tue Sep 25 16:03:41 UTC 2007 Chad Elliott * docs/README: * templates/vc8csharp.mpd: Changed the way generates_source works. See the README for more details. Thu Sep 13 18:02:23 UTC 2007 Chad Elliott * create_base.pl: Added a script to create base projects based on MPC library projects. * modules/ProjectCreator.pm: Changed an informational message to provide more data. Wed Sep 12 18:55:35 UTC 2007 Chad Elliott * config/qwt.mpb: Added a base project for Qwt. * modules/WorkspaceCreator.pm: Fixed a bug where a perl undefined value warning could occur when duplicate project names are encountered. Wed Sep 12 13:13:52 UTC 2007 Chad Elliott * config/mysql.mpb: * config/mysqlpp.mpb: Added base projects for MySQL and MySQL++. Fri Sep 7 13:41:43 UTC 2007 Chad Elliott * modules/ProjectCreator.pm: * modules/TemplateParser.pm: Fixed a bug where using two different custom types in the same project, both with 'commandflags' mapped to a new keyword, would cause scoped settings from one project type to be applied to the other project type. Tue Aug 21 15:27:52 UTC 2007 James H. Hill * templates/vc8.mpd: * templates/vc8platforms.mpt: Added support for the Windows Mobile 6 platform. This platform is targeted specifying the "Windows Mobile 6 Standard SDK (ARMV4I)" platform. Thu Aug 16 12:01:28 UTC 2007 Chad Elliott * prj_install.pl: Fixed a bug where copying an executable didn't set the execute permissions on the new file. Also, unnecessary intermediate directories are no longer made during installation. Fri Aug 10 18:15:22 UTC 2007 Chad Elliott * docs/USAGE: * modules/Options.pm: Fixed the misspelling of Graphviz. * modules/AutomakeWorkspaceCreator.pm: Fixed a couple of issues: 1) Makefile.am is no longer overwritten if the only difference is in a comment. 2) The existing configure.ac is edited to contain all of the new Makefiles. If configure.ac doesn't exist, it is created and the Makefile list is written out to configure.ac.Makefiles. 3) @NAME@ substitutions now only happen in the top-level workspace. * modules/ConfigParser.pm: Only warn the user once about each undefined environment variable. * modules/Creator.pm: * modules/ProjectCreator.pm: * modules/WorkspaceCreator.pm: Factored the file comparison out into a single method on the Creator base class. Wed Aug 8 15:18:04 UTC 2007 Chad Elliott * modules/AutomakeWorkspaceCreator.pm: Set the required automake version back to 1.9. * modules/Creator.pm: When subtracting, split the subtracted value into elements so that they can be removed in any order. Wed Aug 8 12:29:46 UTC 2007 Chad Elliott * modules/AutomakeWorkspaceCreator.pm: Added a code to handle a special associate key to support conditional substitutions in the SUBDIRS setting. Fri Aug 3 13:49:08 UTC 2007 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug where adding to a mapped keyword as a scoped template variable would wipe out the original setting instead of adding to it. Fri Aug 3 11:53:48 UTC 2007 Chad Elliott * config/global.mpb: * config/mpb.mpb: Removed the MPB Define_Custom out of global and into it's own base project. Users can have their base projects inherit from mpb if they want to use it. Tue Jul 31 13:57:54 UTC 2007 Adam Mitz * docs/README: Fixed a few instances where mpd was mistakenly used in place of mpt. Mon Jul 30 13:47:13 UTC 2007 Chad Elliott * config/global.mpb: Added a define custom to allow users to explicitly list .mpb files in their projects. * prj_install.pl: By default, install all .mpb files. Mon Jul 30 11:33:43 UTC 2007 Chad Elliott * modules/ProjectCreator.pm: Support setting a mapped custom defined keyword as a scoped template variable. Wed Jul 11 14:52:02 UTC 2007 Adam Mitz * templates/nmake.mpd: * templates/nmakedll.mpt: * templates/nmakeexe.mpt: Moved the default libraries advapi32.lib and user32.lib out of the template and into the template-input files using the variable name systemlibs. This allows -value_template systemlibs+=FOO to work. Fri Jun 29 18:24:22 UTC 2007 Adam Mitz * modules/Depgen/Driver.pm: Removed assigment of () to %types since it was sometimes clobbering the value already there (from the BEGIN block). * modules/Depgen/NMakeObjectGenerator.pm: * depgen.pl: Generate dependencies targeting object files instead of cpp files. This matches how it's done for GNU make. * modules/NMakeWorkspaceCreator.pm: Provide output regarding which projects are being built. * templates/nmake.mpd: Changed how intermediate and ouptut directories are handled, to match the change to make.mpd in: Wed Jan 24 19:04:58 UTC 2007 Chad Elliott Wed Jun 27 11:28:50 UTC 2007 Chad Elliott * config/boost_base.mpb: Use a new environment variable, BOOST_ROOT_LIB, to determine the location of boost libraries. If this isn't set, it will be expanded to $(BOOST_ROOT)/lib which is the default location. * docs/README: * modules/WorkspaceCreator.pm: Added a new workspace feature, associate, that associates a name with one or more directories. It does not add directories to the workspace, it only makes an association. * modules/AutomakeWorkspaceCreator.pm: Utilize the associate feature to allow conditional building of groups of directories. * docs/USAGE: * modules/Options.pm: Document the fact that the directory parameter for the -into option should be a full path. * modules/ProjectCreator.pm: Removed duplicate code from the add_explicit_output() method. Wed Jun 27 06:27:11 UTC 2007 Johnny Willemsen * docs/USAGE: * modules/BCB2007ProjectCreator.pm: * modules/BCB2007WorkspaceCreator.pm: * templates/bcb2007.mpd: * templates/bcb2007dll.mpt: * templates/bcb2007exe.mpt: New template for C++Builder 2007 Fri May 18 11:17:11 UTC 2007 Chad Elliott * MPC version 3.5.0 released. Local Variables: mode: change-log add-log-time-format: (lambda () (progn (setq tz (getenv TZ)) (set-time-zone-rule UTC) (setq time (format-time-string %a %b %e %H:%M:%S %Z %Y (current-time))) (set-time-zone-rule tz) time)) indent-tabs-mode: nil End: ace-6.4.5+dfsg.orig/MPC/history/ChangeLog-3_30000644000175000017500000021245013154167361016547 0ustar tggtggThu Jul 20 14:49:21 UTC 2006 Chad Elliott * modules/WorkspaceCreator.pm: Fixed a bug where an invalid project name would be used during the generation of implicit project dependencies. Tue Jul 18 19:07:02 UTC 2006 Chad Elliott * modules/Creator.pm: Do not perform slash conversion on the 'prebuild' and 'postbuild' settings. * templates/vc8csharp.mpd: Keep the 'prebuild' and 'postbuild' settings on the same line as vc8 does. Tue Jul 18 14:38:01 UTC 2006 Chad Elliott * modules/AutomakeWorkspaceCreator.pm: Modified the library location code to accept libraries that happen to be built in the very top-most directory. Tue Jul 18 13:49:01 UTC 2006 Chad Elliott * modules/ProjectCreator.pm: Corrected a logic error in the processing of the 'optional' section. The '||' was not being handled properly. Fri Jul 14 17:25:16 UTC 2006 Chad Elliott * modules/ProjectCreator.pm: When expanding variables, through the 'expand' mechanism, escape back slashes when generating a project for a project type that requires slash conversion. Fri Jul 14 01:10:35 UTC 2006 Chad Elliott * config/qt.mpb: Split the UIC into UIC and UIC_Impl. The header is generated by the UIC custom definition and the source file generated by the UIC_Impl custom definition. * config/qt4_core.mpb: * config/qt4_designer.mpb: * config/qt4_designercomponents.mpb: * config/qt4_gui.mpb: * config/qt4_network.mpb: * config/qt4_opengl.mpb: * config/qt4_sql.mpb: * config/qt4_svg.mpb: * config/qt4_test.mpb: * config/qt4_xml.mpb: Added support for Qt4. * config/qt_moc.mpb: * config/qt_uic.mpb: Removed these files. They have been deprecated long enough. Thu Jul 13 16:29:33 UTC 2006 Chad Elliott * templates/bmake.mpd: * templates/bmakedllexe.mpt: * templates/bmakelibexe.mpt: * templates/em3.mpd: * templates/em3vcpdllexe.mpt: * templates/nmake.mpd: * templates/nmakeexe.mpt: * templates/vc6.mpd: * templates/vc6dspdllexe.mpt: * templates/vc7.mpd: * templates/vc7csharp.mpd: * templates/vc7exe.mpt: * templates/vc7vb.mpd: * templates/vc8.mpd: * templates/vc8csharp.mpd: * templates/vc8exe.mpt: Added a template variable named 'windows_style' that controls the location of Debug executables and all installed executables. If 'windows_style' not set, which is the default, a Debug executable is placed in the same directory as the project (default setting for 'output_dir'). If it is set, the Debug executable is placed in the Debug directory. Similarly, if 'windows_style' is not set, installed executables are placed in the directory determined by the 'install' project variable. If it is set, it is placed in the directory determined by the 'install' project variable plus the 'output_dir' template variable. This only applies to the following project types: bmake, em3, vc6, vc7, vc71 and vc8. Tue Jul 11 14:23:41 UTC 2006 Chad Elliott * USAGE: * modules/VC8ProjectCreator.pm: It has been determined that when building static projects with vc8, the inter-project dependencies between static libraries are handled correctly. The dependee is not included in the dependent as is done in em3, vc6, vc7 and vc71. Tue Jul 11 11:42:25 UTC 2006 Chad Elliott * USAGE: * config/.cvsignore: * modules/ConfigParser.pm: * modules/Creator.pm: * modules/Driver.pm: * modules/OutputMessage.pm: * modules/Parser.pm: * modules/WorkspaceCreator.pm: Added the ability for MPC to be configured via two configuration files. The first configuration file, codebase.cfg, controls where MPC looks for the second configuration file, MPC.cfg. By default it will look in $MPC_ROOT/config/MPC.cfg. This configuration file will replace all (but one) environment variables and allow for more things to be controlled. Use of the deprecated environment variables will result in messages be printed to that effect. * modules/AutomakeWorkspaceCreator.pm: * templates/automake.mpd: Added the 'libpaths' setting to the automake template. This also required a code change due to the strictness of automake. If the libpath does not exist, the make will fail so I added the libpaths as dependencies and we attempt to make the directories if they don't exist. * modules/TemplateParser.pm: * templates/em3.mpd: * templates/ghs.mpd: * templates/vc6.mpd: * templates/vc7.mpd: * templates/vc8.mpd: Fixed additional dependencies specified by the custom definition 'dependent' setting. Previously, if a dependent did not end in .pl or .pm a .exe was appended. Now, if the dependent does not have an extension a .exe is appended. Also, for vc*.mpd, if multiple commands make up a custom command (through postcommand or pch_postrule) they are chained together with && to ensure that all commands are run. * templates/vc7csharp.mpd: * templates/vc7vb.mpd: * templates/vc8csharp.mpd: Added or modified the custom section such that custom defintions without commands are still added to the project. Tue Jul 11 00:48:01 UTC 2006 Johnny Willemsen * templates/vc7.mpd: Added support for ModuleDefinitionFile Thu Jul 6 14:54:01 UTC 2006 Chad Elliott * modules/ProjectCreator.pm: A problem could arise when generating the default component lists. It all depended upon the order of a 'keys' call for the valid component types. I first noticed this in 2004, but with Perl 5.8, the keys always came out such that everything just worked. However, with Perl 5.6.1 the keys do not come out as required. This requirement is that user defined component types must be processed before built-in types, most importantly Source_Files. I now sort the keys such that the user defined component types are processed before built-in types. Wed Jul 5 17:11:28 UTC 2006 Chad Elliott * modules/ProjectCreator.pm: There was a difference in the way that MPC dealt with a defaulted Source_Files section and a Source_Files section that was just a list of directories. Generated files were treated differently in the defaulted case. This change corrects that problem. Additionally, files listed with >> and << did not receive slash conversion when being output to a generated project when the project type required it. This has also been corrected. Fri Jun 30 15:32:12 UTC 2006 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug re-introduced by my change from Tue Jun 27 17:33:59 UTC 2006. If gendir = . is used in a custom build rule, the generated files would not have the needed ./ prepended to the file name. * modules/VC8WebWorkspaceCreator.pm: Removed invalid configurations for the web workspace. Thu Jun 29 16:33:13 UTC 2006 Chad Elliott * README: * modules/ProjectCreator.pm: * modules/XMLProjectBase.pm: Fixed a bug where a backslash was added to the front of a double quote when the <%quote%> pseudo variable is used. If an escaped double quote is required, use <%equote%> (as described in the README). Tue Jun 27 17:33:59 UTC 2006 Chad Elliott * PROBLEM-REPORT-FORM: Added a spot for the operating system and shell. * modules/ProjectCreator.pm: When creating the list of generated files, retain the original file extension. If the original input file extension does not match the first extension listed in the custom definition inputext setting, the extension will be lost and file specific settings will not be applied correctly. * modules/WorkspaceCreator.pm: When adding implicit project dependencies, for the gnuace project type only, keep track of the indirect dependencies that have been followed to avoid infinite recursion. Thu Jun 22 12:24:51 UTC 2006 Chad Elliott * modules/VC7WorkspaceCreator.pm: Modified the mixed language output so that VC8 does not want to save after the first load of the generated solution. Wed Jun 21 14:16:22 UTC 2006 Chad Elliott * modules/VC7WorkspaceCreator.pm: Yet another bug fix for mixed language workspaces. When a C++ project is dependent upon another C++ project and a C# project, the dependee C++ project would be skipped. Now, non-C++ projects will be built when the platform is changed to anything other than 'Any CPU' or .NET. Tue Jun 20 13:53:05 2006 J.T. Conklin * templates/automake.mpd: Tweak "code" that emits -stamp dependency to work with stamp files in subdirectories. Tue Jun 20 18:31:35 UTC 2006 Chad Elliott * templates/vc8csharp.mpd: Added the ability to set the RegisterForComInterop setting as a template variable. Tue Jun 20 17:06:50 UTC 2006 Chad Elliott * modules/ProjectCreator.pm: * modules/TemplateParser.pm: Fixed a bug where mixing C++ and C# projects in a single workspace would result in invalid projects due to the fact that a project creator would have only one TemplateInputReader which would read the template input file for the first projects language and all other projects would receive the same template input. Additionally, the configuration/platform combination would only be updated if the platform is a non-empty string. And finally, the ability to nest template functions (like reverse, sort, etc.) not in the context of a foreach has been added to the template parser. Tue Jun 20 12:45:30 UTC 2006 James H. Hill * modules/VC8WebWorkspaceCreator.pm: Changed the location of the web project from the cwd to '.'. Tue Jun 20 12:41:49 UTC 2006 James H. Hill * templates/vc8csharp.mpd: Removed the aspx_files variable since web projects assume all files located in the directory of the solution is part of the project. Fri Jun 16 00:37:06 UTC 2006 James H. Hill * modules/VC7WorkspaceCreator.pm: Added the web project guid to the rest of the GUIDs. This allows use to resue the the default VC workspace generator to generate web projects. * modules/MPC.pm: * modules/MWC.pm: * modules/VC8WebProjectCreator.pm: * modules/VC8WebWorkspaceCreator.pm: Created a new module for generating web projects for VC8. In VC8, web projects are based on the directory that contains. the solutions. This means a web project does not have a "project" file like C++, C# and VB projects. Therefore, a new module was needed to automatically create a web project in a solution since we can't specify this using a MWC file. To create a web project, just run MWC as follows: mwc.pl -type vc8web The following are the language -> scripting mappings: cpluplus -> C# csharp -> C# java -> J# vb -> Visual Basic Fri Jun 09 14:49:25 2006 Steve Huston * modules/AutomakeProjectCreator.pm (fill_value): Reverted: Tue May 23 16:49:22 2006 Steve Huston since it's not always correct to prefix to $srcdir. Sometimes it needs to be relative to the build directory. This restores the behavior put in place by: Thu Dec 22 13:56:14 2005 J.T. Conklin Thanks to J.T. for pointing this out. Fri Jun 9 07:00:13 2006 J.T. Conklin * templates/automake.mpd: Tweak so that _LDFLAGS isn't defined if am_version is defined, but library is not intended to be installed. Wed Jun 7 12:56:17 UTC 2006 Chad Elliott * templates/vc8.mpd: Modified this template to use 'libout' again such that .lib files do not go into the location specified by 'dllout' (if it was specified). Thanks to Kitty B. for recognizing this situation and bringing it to my attention. Tue May 30 12:21:54 UTC 2006 Chad Elliott * modules/Driver.pm: Removed the run-time check for the minimum perl version. * mpc.pl: * mwc.pl: Added a load-time check for the minimum perl version (5.6). Tue May 23 16:49:22 2006 Steve Huston * modules/AutomakeProjectCreator.pm (fill_value): If an include path begins with ".." (a relative path), prefix it with $(srcdir) to make it work properly when the build dir is not the same as the source dir. Thu May 11 11:46:45 2006 Steve Huston * templates/automake.mpd: Allow an am_release variable to set a installable library's -release option. This allows users to choose whether to use libtool's -version-info option (with the am_version variable) or the -release option (with am_release). Fri May 5 12:00:12 UTC 2006 Johnny Willemsen * modules/BDSWorkspaceCreator.pm: Generate missing Wed May 3 01:43:46 UTC 2006 Chad Elliott * USAGE: Documented the -gendot option which generates input files for Graphvis. * modules/BMakeProjectCreator.pm: * modules/Creator.pm: * modules/DirectoryManager.pm: * modules/Driver.pm: * modules/FeatureParser.pm: * modules/GUID.pm: * modules/Options.pm: * modules/ProjectCreator.pm: * modules/TemplateParser.pm: * modules/VC7ProjectCreator.pm: * modules/WorkspaceCreator.pm: Adding various performance improvements. * templates/makedll.mpt: Changing the order of the rt and pthread libraries to avoid possible linking problems when statically linking. Tue Apr 25 13:18:06 UTC 2006 Chad Elliott * clone_build_tree.pl: Print error messages in the event that an error actually occurs. * prj_install.pl: Added a missing option from the usage. * templates/nmake.mpd: * templates/nmakedll.mpt: * templates/nmakeexe.mpt: By default, pass the /Zc:wchar_t option to the compiler. If you plan on using nmake with Visual C++ 6.0, you must unset the 'TreatWChar_tAsBuiltInType' template variable to avoid compiler warnings about unknown options. * templates/vc7.mpd: Allow the user to modify the inline expansion through the 'InlineFunctionExpansion' template variable. * templates/vc7csharp.mpd: * templates/vc8csharp.mpd: Support the 'prebuild' setting. Thu Apr 20 13:29:13 UTC 2006 Chad Elliott * templates/em3.mpd: * templates/em3vcpdll.mpt: * templates/em3vcpdllexe.mpt: * templates/em3vcplib.mpt: * templates/em3vcplibexe.mpt: Fixed a bug where /debug was being added to the link flags even though it was a Release configuration. Thanks to Wallace Zhang for finding this. Fri Mar 31 13:25:32 UTC 2006 Chad Elliott * modules/WorkspaceCreator.pm: Fixed a bug in the group dependency sorter. The circular dependencies are checked but as a group moves in order, it was assumed that the dependencies were already checked for the group when in reality it hadn't. This could cause an infinite loop. Also, $() type variables can be used in workspaces. Mon Mar 27 17:00:31 UTC 2006 James H. Hill * modules/ProjectCreator.pm: Added support of ASP.NET project files (.aspx files) to both Visual Basic and C# project. * templates/vc7vb.mpd: - Changed default extension for resx files from .cs to .vb - Added template code to correctly handle .aspx files * templates/vc7csharp.mpd: * templates/vc8csharp.mpd: - Added template code to correctly handle .aspx files Thu Mar 23 14:56:12 UTC 2006 Johnny Willemsen * templates/bds.mpd: If linkflags contains -aa then generate option.aa.enabled as 1. Thu Mar 23 14:51:12 UTC 2006 Chad Elliott * templates/vc7.mpd: * templates/vc8.mpd: Added the missing UNICODE and _UNICODE macros to the resource file compile line if the 'unicode' template variable is set. Thu Mar 23 14:30:00 UTC 2006 Chad Elliott * modules/Driver.pm: Convert all back slashes to slashes before calling mpc_basename(). * templates/makedll.mpt: Added -ldl to the vxworks_rtp platform section. * templates/vc7.mpd: Moved the ProgramDataBaseFileName down after the precompiled header section to more closely match the way visual studio produces project files. Thu Mar 23 12:11:12 UTC 2006 Johnny Willemsen * templates/bmake.mpd: If linkflags are available, generate them into the project file Thu Mar 16 17:58:37 UTC 2006 Chad Elliott * modules/VC8ProjectCreator.pm: Fixed a bug where the SUPER version of the translate_value() wasn't called at the end of the local translate_value() method. This was causing problems when the -name_modifier and -apply_project options were used together. * templates/makedll.mpt: Fixed support for VxWorks. Wed Mar 15 18:44:03 UTC 2006 Chad Elliott * generate_export_header.pl: Print an error if the script is unable to write to the output file. * modules/MakeProjectCreator.pm: * templates/makedll.mpt: Moved the default 'compilers' setting from the mpt to the perl module to allow the default compiler to change based on the language setting. Currently, the default is 'java' if the language is set to java otherwise it is set to 'gcc' as it was previously. * README: * modules/AutomakeWorkspaceCreator.pm: * modules/ProjectCreator.pm: * modules/TemplateParser.pm: * templates/automake.mpd: * templates/bmake.mpd: * templates/em3.mpd: * templates/ghs.mpd: * templates/make.mpd: * templates/nmake.mpd: * templates/vc6.mpd: * templates/vc7.mpd: * templates/vc8.mpd: Implemented a new project keyword that can only be used within the scope of Source_Files. The 'buildflags' setting can be used to specify additional build flags as source files are being compiled. This can be used to build a particular subset of source files with different compiler options. Tue Mar 14 14:19:03 2006 Steve Huston * templates/vc8platforms.mpt: For WinCE 4-based platforms, add EnableFunctionLevelLinking="true". This works around a link-time warning LNK1166 for ARM processors. This prevented ACEd.dll (and some other examples/test programs) from creating the resultant binary dll/exe file. Mon Mar 13 17:53:45 UTC 2006 Chad Elliott * modules/Driver.pm: If global.features, default.features, global.mpb or default.rel are not found in the path relative to the location of mwc.pl (or mpc.pl), look for them in the config directory found underneath MPC. This only matters when working in conjunction with ACE. Fri Mar 10 18:59:34 UTC 2006 Chad Elliott * modules/BMakeWorkspaceCreator.pm: * modules/Creator.pm: * modules/DirectoryManager.pm: * modules/Driver.pm: * modules/FeatureParser.pm: * modules/HTMLProjectCreator.pm: * modules/MakeWorkspaceCreator.pm: * modules/NMakeWorkspaceCreator.pm: * modules/WorkspaceCreator.pm: Implemented a new function, mpc_basename, that is more efficient than the one provided by File::Basename. * modules/ProjectCreator.pm: Moved code outside of add_corresponding_component_files that was executed twice. The result could not possibly change, so it is executed once and the result is passed into add_corresponding_component_files. * modules/TemplateParser.pm: Optimized code to avoid using substr() in parse_line(). Thu Mar 9 16:20:24 UTC 2006 Chad Elliott * modules/CBXProjectCreator.pm: * modules/CBXWorkspaceCreator.pm: * templates/cbx.mpd: * templates/cbxdll.mpt: * templates/cbxexe.mpt: Removed these files. * USAGE: * config/boost_date_time.mpb: * config/boost_filesystem.mpb: * config/boost_iostreams.mpb: * config/boost_prg_exec_monitor.mpb: * config/boost_program_options.mpb: * config/boost_regex.mpb: * config/boost_serialization.mpb: * config/boost_signals.mpb: * config/boost_test_exec_monitor.mpb: * config/boost_thread.mpb: * config/boost_wave.mpb: * config/xerces.mpb: * modules/MPC.pm: * modules/MWC.pm: Removed the cbx project type. The format is dead and has been replaced by the bds format. * README: * templates/bmake.mpd: * templates/html.mpd: * templates/make.mpd: * templates/nmake.mpd: * templates/vc7.mpd: * templates/vc8.mpd: * modules/ProjectCreator.pm: Added partial support for prebuild. Some project types can't or can't easily support this concept. * modules/DirectoryManager.pm: * modules/WinProjectBase.pm: Moved a portion of the code to remove the current working directory from WinProjectBase's version of translate_directory() into DirectoryManager's version. Mon Mar 6 18:09:36 UTC 2006 Chad Elliott * config/qt.mpb: The qt library can have a variety of suffixes (depending on platform and version). This base project was changed such that there is no 'specific' section for for the qt library name. It is added to 'lit_libs' as qt-mt$(QT_VERSION). * generate_export_header.pl: This is a new script that will generate an export header file that can be used (not in conjunction with ACE) to support symbol visibility using a variety of compilers. * modules/BMakeProjectCreator.pm: * modules/BMakeWorkspaceCreator.pm: * modules/Creator.pm: * modules/DirectoryManager.pm: * modules/Driver.pm: * modules/HTMLProjectCreator.pm: * modules/NMakeWorkspaceCreator.pm: * modules/Options.pm: * modules/ProjectCreator.pm: * modules/TemplateParser.pm: * modules/VC7WorkspaceCreator.pm: * modules/WinProjectBase.pm: * modules/WorkspaceCreator.pm: The majority of the changes to these files are performance related. However, two bug fixes are included (one pertaining to file grouping and the other pertaining to directory translation of a directory only containing ".."). * templates/make.mpd: Three modifications: 1) Only set PICFLAGS if the dll_ext template variable is defined. 2) Allow the user to override the 'chmod' template variable. 3) Removed the .<%slash%> in front of the call to "specialscript" * templates/makedll.mpt: Added -mthreads -mminimal-toc compiler flags for LynxOS. * templates/vc7.mpd: * templates/vc8.mpd: Fixed whitespace for default grouped files. Mon Feb 27 17:35:55 UTC 2006 Chad Elliott * config/zlib.mpb: Changed the Windows section of the zlib library to use libs instead of lit_libs. It is necessary to match up debug to debug and release to release when linking an application with this library. Fri Feb 24 00:23:57 UTC 2006 Chad Elliott * modules/ProjectCreator.pm: Removed calls to escape_regex_special() before calling generated_filenames(). This was breaking when files with regular expression special characters (like .) were listed. Thu Feb 23 10:33:25 2006 J.T. Conklin * templates/automake.mpd: Added "compile_flags" to conditional which caused a needed backslash not to be emitted in somewhat rare circumstances. Thu Feb 23 14:10:30 UTC 2006 Chad Elliott * README: Added a paragraph explaining that MPC expects *all* file names that contain a directory portion to use forward slashes regardless of what the platform natively uses. * modules/ProjectCreator.pm: Corrected two bugs pertaining to automatic file addition. The first happens when two different custom file sections have the same group name; the second group would overwrite the first. The second bug would only happen on Windows based project types if the 'gendir' setting contained a slash, MPC wouldn't be able to match up the generated files (this was introduced with my change from Mon Feb 13 11:15:04 2006). Wed Feb 22 23:58:03 2006 J.T. Conklin * templates/automake.mpd: Fix typo which caused compile_flags to be emitted for each individual compile_flag. Wed Feb 22 20:06:00 UTC 2006 Chad Elliott * combine_dsw.pl: Support combining .vcw files too. They are almost identical to .dsw files. * modules/ProjectCreator.pm: Removed the $rmesc parameter from the generated_filenames() and generated_filename_arrys() methods. We will always remove the escape sequences from the generated file names. In the one place where the escapes are needed, we use escape_regex_special() to ensure that the whole file name (including the path) is escaped. * modules/VC6WorkspaceCreator.pm: Sort the projects so that the generated workspace will be deterministic. * modules/WinProjectBase.pm: Modified translate_directory() to remove the current working directory from the directory passed in and then limit the length of that to avoid issues with maximum directory/file length on NTFS. * templates/bmake.mpd: * templates/bmakecommon.mpt: * templates/bmakedll.mpt: * templates/bmakedllexe.mpt: * templates/bmakelibexe.mpt: Support building with VCL. Also, add the custom_type libpath setting to the PATH variable. * templates/make.mpd: * templates/makedll.mpt: Added support for visibility attributes. They are off by default, so set the 'visibility' template variable to 1 to then them on. Also, when generating the clean target, clean the extra directories relative to the output location of the makefile target. Tue Feb 21 18:14:21 2006 Steve Huston * templates/vc8.mpd: Put .lib files with .dll files in $(OutDir). When emitting AdditionalLibraryDirectories and there is a specified output_subdir, append output_subdir to each libpath, then the plain libpath. This picks up output_subdir specs and hopefully won't hurt anything for libpaths that don't have the subdirs. Thu Feb 16 21:36:37 UTC 2006 Wallace Zhang * highlight_template.pl: Added a newline at the end of the file which is required by fuzz.pl. Thu Feb 16 19:53:13 UTC 2006 Chad Elliott * highlight_template.pl: Added a tool which can be helpful in debugging MPC template code. This utility will color highlight an MPC template and output html. * modules/Driver.pm: Perl 5.8.8 has a "feature" where basename('') returns './' instead of '' as all other versions do. In the case where we may call basename() with an empty string, avoid calling basename() and just use '' instead. Thanks to Johnny Willemsen for helping me debug this one. * modules/HTMLWorkspaceCreator.pm: Output the projects in build order instead of alphabetical order. * templates/make.mpd: Greatly simplified this template by removing many little foreach's and enclose most of the template in two big foreach's. Wed Feb 15 19:41:59 2006 J.T. Conklin * templates/automake.mpd: Process header_files, inline_files, template_files, idl_files, and pidl_files even if we're not building a executable or lib. This ensures the files will be listed in the Makefile.am (for "make distcheck" and/or for "make install"). Wed Feb 15 17:56:02 2006 Steve Huston * templates/nmakedll.mpt: * templates/nmakeexe.mpt: Changed WinX86_64 platform name to x64 to be consistent with vc8platforms.mpt. Also set _M_AMD64 in cpu_defines, not _M_AXP64 to be consistent with what Microsoft headers are expecting; also added _AMD64_ to ensure it gets set - windows.h sets it, but if including winnt.h first, it doesn't get set. Thanks to Johnny Willemsen for motivating this change. Wed Feb 15 18:42:30 UTC 2006 Chad Elliott * README: * modules/ProjectCreator.pm: Added two new pseudo variables 'cmp' for a platform non-specific way to compare files and 'os' which provides the type of operating system the project is suited for (win32 or unix). * registry.pl: Register .mpb files just as .mpc files are registered. Wed Feb 15 16:03:06 UTC 2006 Chad Elliott * config/boost_base.mpb: Added an include path for $(BOOST_ROOT). * config/bzip2.mpb: * config/global.features: Added a bzip2 feature project and set the bzip2 feature to zero by default. * config/zlib.mpb: Switch from libs to lit_libs so that no decorator is added to the library name. * modules/ProjectCreator.pm: Accept .ipp as inline files. * templates/make.mpd: * templates/makedll.mpt: Provide library versioning on platforms that support it. Added initial support for the intel compiler on Linux. * templates/vc7.mpd: Allow switching off exception handling. Tue Feb 14 17:06:40 2006 Steve Huston * templates/vc8platforms.mpt: Changed the WinX86_64 platform to be x64 to match what VC8 generates itself and expects. Also added x64 to the platforms generated by default. Mon Feb 13 11:15:04 2006 Chad Elliott * config/global.features: Set the swig_perl, swig_java and python features to zero. * config/python.mpb: Added a base project for building against the python library. * config/swig_java.mpb: Added a requires += swig_java. * config/swig_perl.mpb: Added a requires += swig_perl. * modules/ProjectCreator.pm: Fixed a problem where if a file is automatically generated and gendir is set to '.', the file name may be added twice to a project. When automatically adding files specified by >>, take into account the gendir setting. Added a post project creation hook so that sub-classes of ProjectCreator can perform an action after a project file is created. * modules/TemplateParser.pm: Renamed the basename() function to tp_basename(). * modules/VC8ProjectCreator.pm: Use the post file creation hook to remove the .user files created by VC8. The .user file will only be removed if the project file is different than what was created by prior runs of MPC. * README: * modules/WorkspaceCreator.pm: Allow the user of -genins within a workspace. * templates/bmake.mpd: Put double quotes around gendir related files just in case gendir has a directory with spaces in the name. Also, prefix all del and rmdir commands with - to continue on if there is an error. * templates/make.mpd: * templates/makedll.mpt: Changed the way that the 'configurations' template variable is used. The existing use has been renamed to 'compilers' and the 'configurations' template variable is now used as it is in many of the other project types, as Debug or Release. Fri Feb 10 06:36:59 2006 Chad Elliott * modules/Options.pm: Fixed a bug where a -exclude argument with a comma in it would not be split. * modules/ProjectCreator.pm: Reverted a change that affected the way files were listed in templates when gendir = . was used. * templates/ghs.mpd: * templates/ghscommon.mpt: Changed libdecorator to lib_modifier to be consistent with all of the other templates. Fri Feb 10 11:26:12 UTC 2006 Johnny Willemsen * templates/vc8platforms.mpt: For x86_64 specify an explicit link option * templates/nmake.mpd: Added platform_defines to the list of defines being generated, this is as with the normal vc templates * templates/nmakedll.mpt: * templates/nmakeexe.mpt: Added platform_defines and updated cpu_define to the same value used as with the normal vc templates for WinX86_64 Thu Feb 9 12:50:52 2006 Chad Elliott * config/boost_iostreams.mpb: * config/boost_program_options.mpb: * config/boost_python.mpb: * config/boost_serialization.mpb: * config/boost_wave.mpb: Added support for other boost libraries. * modules/DirectoryManager.pm: * modules/Options.pm: Added support for wildcards when using the -exclude option. * modules/ProjectCreator.pm: When the Define_Custom has the automatic flag set to 1, automatically add the files generated that are specified by the >> operator. Fixed a bug where <% %> variables used within a 'specific' section were not translated. * modules/TemplateParser.pm: Fixed a bug where errors within a <%foreach%> would be silently ignored. * modules/WorkspaceCreator.pm: Added support for wildcards. * templates/bmake.mpd: * templates/bmakedll.mpt: * templates/bmakedllexe.mpt: * templates/bmakelib.mpt: * templates/bmakelibexe.mpt: Fixed a bug where debug_flags was being placed in all configurations, not just debug. And modified these, so that debug flags are only emitted in a debug configuration (when optimze is overriden to be zero). * templates/em3.mpd: * templates/em3vcpdll.mpt: * templates/em3vcpdllexe.mpt: * templates/em3vcplibexe.mpt: EVC 4.0 doesn't support "utility" projects, so when custom_only is set to 1, just create a DLL project that has no target. Also, fixed link issues for the emulator and x86 targets. And, sort the grouped files so that a project can be reproduced consistently. * templates/vc6.mpd: * templates/vc7.mpd: * templates/vc8.mpd: Sort the grouped files so that a project can be reproduced consistently. Thu Feb 2 07:02:19 2006 Chad Elliott * clone_build_tree.pl: Do not clone the .svn directory. It's administrative just like the CVS directory. * modules/ProjectCreator.pm: There was a bug where file with a path specified using the '>>' operator would not be processed correctly on Windows based project types. Thanks to Thomas Rothfuss for reporting this. Mon Jan 30 12:07:35 2006 Chad Elliott * PROBLEM-REPORT-FORM: Added a section to provide the Perl version. * README: Updated the valid command line options for workspaces with the -language option. * USAGE: Documented the -value_template option and provided an example where spaces needed to be retained. * modules/XMLProjectBase.pm: * modules/BDSProjectCreator.pm: * modules/CBXProjectCreator.pm: * modules/HTMLProjectCreator.pm: * modules/SLEProjectCreator.pm: * modules/VC7ProjectCreator.pm: Created a new project base for XML based project creators. The trend in projects seem to be going toward XML so we can minimize the amount of repeated code by using the XMLProjectBase. * modules/BDSWorkspaceCreator.pm: * modules/CBXWorkspaceCreator.pm: * modules/GHSWorkspaceCreator.pm: * modules/SLEWorkspaceCreator.pm: Tell the sort_dependencies() method that we do not want sorting by directory groups. * modules/BMakeProjectCreator.pm: Removed an unnecessary check of convert_slashes(). * modules/ProjectCreator.pm: Provided support for use of <% %> variables within all of MPC project keywords. The list of valid variables only includes the pseudo variables listed under 'postbuild' in the README. * templates/bmake.mpd: Utilize the 'transdir' template function to fully support files with .. in the path name. * templates/vc7.mpd: * templates/vc7dll.mpt: * templates/vc7exe.mpt: * templates/vc7lib.mpt: * templates/vc7libexe.mpt: * templates/vc8.mpd: * templates/vc8dll.mpt: * templates/vc8exe.mpt: * templates/vc8lib.mpt: * templates/vc8libexe.mpt: Added two new configurations (not generated by default) called 'Memcheck Debug' and 'Memcheck Release'. These configurations provide settings that are amenable to external memory checking tools. Wed Jan 25 11:40:37 2006 Chad Elliott * modules/WorkspaceCreator.pm: Return an array reference from the get_validated_ordering() method instead of a string. In every place get_validated_ordering() was called, the return value was immediately converted to an array. * modules/VC6WorkspaceCreator.pm: * modules/VC71WorkspaceCreator.pm: * modules/VC7WorkspaceCreator.pm: Use the returned array instead of converting the string into an array. Wed Jan 25 09:02:34 2006 Chad Elliott * modules/DirectoryManager.pm: * modules/TemplateParser.pm: * modules/WinProjectBase.pm: Added a new template function called transdir which will translate a directory portion of a filename into a "usable" object file directory. It entails changing .. into the word 'dotdot' and for windows based projects it will also change drive letters and $() variables. * templates/nmake.mpd: Use the new transdir function to deal with relative directories and other problematic directory names. Mon Jan 23 13:05:12 2006 Chad Elliott * templates/nmake.mpd: Added a rule back in that was removed by my change on Mon Jan 9 08:30:14 2006. Mon Jan 23 12:08:25 2006 Chad Elliott * modules/BMakeWorkspaceCreator.pm: * modules/MakeWorkspaceCreator.pm: * modules/NMakeWorkspaceCreator.pm: Tell the number_target_deps() method that we do not want sorting by directory groups. * modules/VC6WorkspaceCreator.pm: * modules/VC71WorkspaceCreator.pm: * modules/VC7WorkspaceCreator.pm: No need to check for circular dependencies here, it is now done when validating the dependencies. * modules/WorkspaceCreator.pm: Re-wrote the circular directory dependency detection code in order to detect multi-directory (3 or more) dependencies. This slowed things down a bit, so I had to find performance in other locations throughout the workspace creator. Thu Jan 19 12:59:55 2006 Chad Elliott * USAGE: * modules/Driver.pm: * modules/Options.pm: Added a new option, -gfeature_file, to specify the global feature file. Thu Jan 19 12:30:18 2006 Chad Elliott * modules/VC71ProjectCreator.pm: * modules/VC7ProjectCreator.pm: Moved a static hash table out of a method and into the local namespace (for performace reasons). * modules/VC7WorkspaceCreator.pm: * templates/vc7csharp.mpd: * templates/vc7vb.mpd: Removed the code that added references for csharp or vb. This was not necessary and in fact broke the projects. * modules/VC8ProjectCreator.pm: * templates/vc8csharp.mpd: * templates/vc8csharp.mpt: Added support for the vc8 style projects for csharp. Previously, the vc7 version for csharp was used and required conversion within vc8. Wed Jan 18 15:12:40 2006 Chad Elliott * templates/nmake.mpd: Modified the clean rule to just use del /s/f/q instead of listing out each object file. Thanks to Johnny Willemsen for debugging this. Wed Jan 18 13:04:27 2006 Chad Elliott * modules/NMakeWorkspaceCreator.pm: * modules/TemplateParser.pm: * modules/VC7ProjectCreator.pm: * modules/VC7WorkspaceCreator.pm: We need to keep track of the language for each project processed. This allows the VC7, VC71 and VC8 WorkspaceCreator's to put the right GUID in for the individual projects. Tue Jan 17 07:25:29 2006 Chad Elliott * modules/FeatureParser.pm: The previous change included a change to make features case-insensitive. This change was not complete and has been corrected. Mon Jan 16 11:17:45 2006 Chad Elliott * MPC.ico: Modified the MPC project icon to have the (P) on the left side instead of the right so that it looks better with Tortoise. * modules/Creator.pm: * modules/WorkspaceCreator.pm: Added support for using -language within a workspace. Previously, this was disallowed but there was no real reason for that. * modules/FeatureParser.pm: * modules/ProjectCreator.pm: * modules/TemplateParser.pm: Added support for accessing MPC features and their values. * templates/html.mpd: Added all of the MPC project keywords. * templates/nmake.mpd: Added the -i parameter to the depgen.pl script. * templates/vc6dspdll.mpt: Added the _WINDLL and _AFXDLL macros for the MFC configurations. * templates/vc7.mpd: Added the ability to set the GenerateMapFile setting. Thanks to David Hauck for providing the modification. * templates/vc7csharp.mpd: * templates/vc7vb.mpd: Added the ReferencePath setting so that libraries can be located (if referenced) and ensured that the 'install' setting worked as it does in all other templates. Thanks to Dan Troesser for providing the ReferencePath setting and pointing out the 'install' discrepancy. Tue Jan 10 16:30:32 2006 Ossama Othman From Russell Mora * templates/nmake.mpd: Add to manifest files, if `.manifest' file exists. Mon Jan 9 08:30:14 2006 Chad Elliott * templates/nmake.mpd: Corrected a bug reported by Johnny Willemsen where object files were not getting cleaned up if they contained a relative path with ".." in the name. In the process, I cleaned up the template a bit which should allow this type to be generated slightly faster. Thu Jan 5 09:45:54 2006 Chad Elliott * modules/Creator.pm: * modules/DirectoryManager.pm: * modules/ProjectCreator.pm: Made MPC more tolerant of file systems that are case insensitive. This will help with the relative path replacement on Windows and others that have this problematic type of file system. Wed Jan 4 08:09:20 2006 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug where adding a grouped set of source files that are generated using a wildcard would cause a duplicate of the default group if files were added to a different after the generated group. Tue Jan 3 08:26:34 2006 Chad Elliott * USAGE: * modules/Options.pm: Added the possible language settings to the help message. * templates/make.mpd: * templates/makedll.mpt: Allow control of the 'genflags' setting with the 'optimize' template variable. This changes the default 'genflags' setting from -g to -O. * templates/vc7.mpd: * templates/vc7dll.mpt: * templates/vc7exe.mpt: * templates/vc7lib.mpt: * templates/vc7libexe.mpt: * templates/vc8.mpd: * templates/vc8dll.mpt: * templates/vc8exe.mpt: * templates/vc8lib.mpt: * templates/vc8libexe.mpt: Introduced a new template variable, 'debug_prj', which helps control which run-time library is used during linking. Previously, this was controled by the 'optimize' template variable, but building a "Release" configuration with 'optimize' turned off did not work where inline functions were used in other libraries (being linked in) where 'optimize' was left on. Mon Dec 26 21:02:36 2005 Chad Elliott * templates/vc7.mpd: * templates/vc8.mpd: Set the run-time library to a static version if either template variables type_is_static or need_staticflags are set. Thu Dec 22 13:56:14 2005 J.T. Conklin * modules/AutomakeProjectCreator.pm: Disable code that prefixed include paths with "$(srcdir)/". In some cases an include path should be relative to the source dir, in others it should be relative to the build dir, and sometimes it should be relative to both. Since it is impossible to guess which is the correct choice, require the *.mpc file to specify it correctly. Thu Dec 22 15:17:30 2005 Chad Elliott * templates/vc7csharp.mpd: Added a missing <%endif%>. Thu Dec 22 08:30:56 2005 Chad Elliott * USAGE: Update the usage to contain the 'bds' type. * modules/Creator.pm: Fixed a feature where $() variables were automatically expanded during a subtraction. Now, we only expand the $() variable if we could not find the subtraction value in the name value. * templates/bds.mpd: Modified the includes foreach to set the forcount base. * templates/bdsdll.mpt: * templates/bdsexe.mpt: Include the user_bds* file instead of the user_cbx* file. Wed Dec 21 19:17:12 UTC 2005 Johnny Willemsen * templates/vc8platforms.mpt: Set the TargetMachine when building for EM64T Wed Dec 21 18:55:12 UTC 2005 Johnny Willemsen * templates/bds.mpd: * templates/bdsdll.mpt: * templates/bdsexe.mpt: * modules/BDSProjectCreator.pm: * modules/BDSWorkspaceCreator.pm: Initial version of Borland Developer Studio template. Work is being done for the C++ personality. All files, compiler flags and libs are generated but some more work has to be done to use these for a full build. Now they are already useful for debugging apps that are build from the command line. * modules/MPC.pm: * modules/MWC.pm: Added BDS files Wed Dec 21 06:28:04 2005 Chad Elliott * MPC.ico: * registry.pl: Added the ability to register the .mpc and .mwc file types as well as create context menus within the Windows explorer. * PROBLEM-REPORT-FORM: Fixed the URL for the MPC FAQ. * README: * modules/TemplateParser.pm: Added the ability to set the base for the <%forcount%> variable. See the README for details as to how to use this. Also, added code to only check for mixed values (scalars and hash maps) if the foreach value is not the name of an MPC project keyword. * config/swig_java.mpb: Added support for using SWIG with Java. * modules/AutomakeProjectCreator.pm: * modules/Driver.pm: * modules/GHSProjectCreator.pm: * modules/HTMLProjectCreator.pm: * modules/MakeProjectCreator.pm: Removed the convert_slashes() method. And use the default from DirectoryManager.pm. * modules/Creator.pm: Use File::Spec to determine file system capabilities to give the right warning message. Also added the ability to determine if any files were excluded when generating the default file list. * modules/DirectoryManager.pm: Corrected problems with using Cwd::getcwd() on VMS as it always leaves a trailing slash on the end which no other implementation does. Also, switched the convert_slashes() method to return zero as the default (which will require slightly less code overall in MPC). * modules/HTMLWorkspaceCreator.pm: * templates/html.mpd: Make the HTML acceptable by WC3 standards. * modules/MakeWorkspaceCreator.pm: Added a .PHONY: target for each named target. This will only work with GNU Make and won't hurt with other versions of make. * modules/ProjectCreator.pm: 1) Check for case insensitivity (from a new method) when checking whether we should use upper or lower case in the expand_variables() method. 2) Added an is_keyword() method to allow the TemplateParser to determine if a variable is an MPC project keyword or not. 3) When adding the built-in OS compatibility methods, check the base class to see if it's a WinProjectBase to determine if the project type will be used on Windows or not. * modules/WinProjectBase.pm: For Windows based project types, define the convert_slashes() and case_insensitive() methods. * modules/WorkspaceCreator.pm: Fixed a bug where file exclusions given on the command line wouldn't work because somewhere down the line MPC would change directory and nothing would match up. Also, fixed a related bug where if all of the .mpc files normally contained within a workspace were excluded a default workspace would then be used possibly adding unwanted .mpc files. * mpc.pl: * mwc.pl: Finally corrected support for VMS. FindBin doesn't work on VMS if you use a relative directory, so we just use rel2abs() on the dirname of $0 in this situation. * templates/bmake.mpd: * templates/bmakedll.mpt: * templates/bmakedllexe.mpt: * templates/bmakelibexe.mpt: Modified these to move the binary compile flags into the template such that correct makefiles would be created if the user set the staticname to a valid name and set sharedname to empty. * templates/ghs.mpd: * templates/ghsdll.mpt: * templates/ghsdllexe.mpt: * templates/ghslib.mpt: Modified these to move the library extensions into the template such that correct build files would be created if the user set the staticname to a valid name and set sharedname to empty. * templates/make.mpd: Moved the output file to the last part of the link command line. Made "all" the default target for libraries. Parameterized the pch extension. Added better support for precompiled headers. * templates/makedll.mpt: Set the default pch extension to .gch. Renamed the cxx configuration to cxx_tru64. Added precompiled header support for SunCC (which was there as of SunCC 5.5). For SunCC 5.4 and below, use -value_template pchsupport= to turn off precompiled header support. * templates/vc7.mpd: * templates/vc7dll.mpt: * templates/vc7exe.mpt: * templates/vc7lib.mpt: * templates/vc7libexe.mpt: * templates/vc8.mpd: * templates/vc8dll.mpt: * templates/vc8exe.mpt: * templates/vc8lib.mpt: * templates/vc8libexe.mpt: Modified the RuntimeLibrary setting to choose the right value for static/dynamic configurations. Tue Dec 6 06:36:27 2005 Chad Elliott * modules/WorkspaceCreator.pm: Fixed a bug where MPC would go into an infinite loop (while generating an intermediate workspace) if there were duplicate project names within a single workspace. The sort_by_groups() method is being called prior to the method that checks for duplicate projects. Mon Dec 5 14:17:35 2005 William Otte * config/boost_unit_test_framework.mpb Automatic linking is not supported for the unit test framework, see http://boost.org/more/getting_started.html#auto-link. Tue Nov 29 10:11:14 2005 William Otte * config/boost_date_time.mpb: * config/boost_filesystem.mpb: * config/boost_prg_exec_monitor.mpb: * config/boost_regex.mpb: * config/boost_signals.mpb: * config/boost_test_exec_monitor.mpb: * config/boost_thread.mpb: * config/boost_unit_test_framework.mpb: Corrected a problem with my previous commit that broke boost on platforms other than gnuace and windows. Thanks to Chad Elliott and Kitty B. for pointing out the problem and suggesting a fix. Mon Nov 21 15:23:40 2005 William Otte * config/boost_filesystem.mpb: * config/boost_regex.mpb: Scoped the lit_libs directive inside of a gnuace specific block to take advantage of automatic library resolution provided by the Windows version of boost. Mon Nov 21 09:26:35 2005 Chad Elliott * README: * modules/Creator.pm: * modules/ProjectCreator.pm: Added a new clause (expand) that can be used to set the expansion values of a particular variable. This lets users define to what $(VAR_NAME) gets expanded within an mpc file. See the README for more information. * mpc.pl: * mwc.pl: * modules/DirectoryManager.pm: * modules/WorkspaceCreator.pm: * templates/make.mpd: * templates/makedll.mpt: Added better support for OpenVMS. This mainly entailed dealing with the .dir extension on directories and [] within wildcard specifications (as the OpenVMS glob() function does not handle these). Wed Nov 16 08:30:51 2005 Chad Elliott * modules/Creator.pm: * modules/ProjectCreator.pm: Fixed a bug where adding or subtracting a value with spaces would not work as expected. When adding, the value would be split at each whitespace. When subtracting, the value would never be removed. Setting a variable with spaces worked correctly. Mon Nov 14 12:06:15 2005 Chad Elliott * templates/nmake.mpd: Corrected a problem in the realclean target where .dll, .lib and .exp files would not be deleted unless pdbc or pdbl template variables were defined. Mon Nov 14 09:50:38 2005 Chad Elliott * modules/WorkspaceCreator.pm: Fixed a bug where a project name that conflicts with a directory name would not get mapped in cases where the directory had multiple levels. Mon Nov 14 07:40:19 2005 Chad Elliott * modules/WorkspaceCreator.pm: Fixed a bug where sorting the projects (with a circular dependency) would run infinitely. This was identical to the problem fixed on Thu Apr 15 13:16:03 2004 just in a different scenario. Thu Nov 10 12:23:43 2005 Chad Elliott * modules/TemplateParser.pm: When checking for duplicate source files in duplicate_index(), always use lowercase (since this is currently only used on Windows). Thu Nov 10 09:01:25 2005 Chad Elliott * templates/automake.mpd: * templates/bmake.mpd: * templates/em3.mpd: * templates/ghs.mpd: * templates/html.mpd: * templates/make.mpd: * templates/nmake.mpd: * templates/sle.mpd: * templates/vc6.mpd: * templates/vc7.mpd: * templates/vc7csharp.mpd: * templates/vc7vb.mpd: * templates/vc8.mpd: Added a template variable, libname_prefix, that can be set to prefix all library names (sharedname, staticname and libs). Note that lit_libs and pure_libs are not affected. Mon Nov 7 10:15:31 2005 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug where a given custom input file does not match the custom defined input extensions and no source files are given, the generated source file name would still have the input file extension in the name (with an escaped period). Mon Nov 7 13:59:12 UTC 2005 Johnny Willemsen * config/boost_prg_exec_monitor.mpb: * config/boost_test_exec_monitor.mpb: * config/boost_unit_test_framework.mpb: Added borland Fri Oct 28 14:58:59 2005 William Otte * config/global.features: * config/xerces.mpb: Added a xerces feature to the xerces base project, similar to boost/zlib/zzip to allow disabling xerces specific projects. Fri Oct 28 11:43:52 2005 Chad Elliott * config/swig_perl.mpb: Added $(PERL5_INCLUDE) to the 'libpaths' as well as the 'includes'. * templates/vc8.mpd: Corrected two instances of subdir_output which only show up if you set the template variable 'pdbc'. Sun Oct 23 08:14:12 UTC 2005 Johnny Willemsen * templates/bmake.mpd: Generate also includes for the resource compiler Wed Oct 19 10:06:50 2005 Chad Elliott * config/boost_date_time.mpb: * config/boost_filesystem.mpb: * config/boost_prg_exec_monitor.mpb: * config/boost_regex.mpb: * config/boost_signals.mpb: * config/boost_test_exec_monitor.mpb: * config/boost_thread.mpb: * config/boost_unit_test_framework.mpb: Added a $(BOOST_STATIC_LIB_PREFIX) to the library name for all boost libraries. For some reason, they insist on prepend 'lib' to the name of all static libraries on Windows. For unit_test_framework, prg_exec_monitor and test_exec_monitor, 'lib' is always prepended on Windows since these are currently always static. Thanks to Kevin Heifner for pointing this out. Thu Oct 13 17:24:21 2005 Steve Huston * modules/VC8WorkspaceCreator.pm: Add the 3 magic bytes to the start of the .sln file that allow double-clicking on the .sln file's icon to auto-start Visual Studio. Mon Oct 10 07:02:30 2005 Chad Elliott * modules/TemplateParser.pm: Fixed a bug where mixed case template variables within a foreach context were not being evaluated case insensitively. This made it appear that these variables were not being set. * templates/vc8.mpd: Moved an endif to the correct location pertaining to precompiled headers. Too much was being included within an if which depended upon the pch_header setting. Thanks to Thomas Rothfuss for reporting both of these bugs. Fri Oct 7 13:50:49 2005 J.T. Conklin * modules/AutomakeWorkspaceCreator.pm: Change the way RCS/CVS Id is emitted so it's the same as how it is expanded in souces checked out with -kk option. This allows us to regenerate ACE and TAO's Makefile.am files and only see the "real" differences. Fri Oct 7 09:33:41 2005 J.T. Conklin * templates/automake.mpd: Add support for custom file dependents. Thu Oct 6 17:52:41 2005 Steve Huston * templates/vc8.mpd: * templates/vc8dll.mpt: * templates/vc8exe.mpt: * templates/vc8lib.mpt: * templates/vc8libexe.mpt: * templates/vc8platforms.mpt (new file): Added support for building Windows CE/Mobile from Visual Studio 2005. By default, only the regular desktop Win32 configurations will be generated, as before. The CE/mobile platform names can be specified using -value_templates platforms="....". The possible platform names are listed in vc8platforms.mpt. To avoid overwriting outputs when building multiple platforms in the same ACE_wrappers directory, a platform can supply an output_subdir setting (see vc8platforms.mpt). If specified, vc8.mpd will use this in the Intermediate/OutputDirectory entries. Tue Oct 4 06:35:13 2005 Chad Elliott * templates/vc7.mpd: * templates/vc8.mpd: Improved MIDL support by adding generated files to the generated project to ensure that these generated files get cleaned up. Fri Sep 30 07:46:54 2005 Chad Elliott * modules/BMakeWorkspaceCreator.pm: * modules/NMakeWorkspaceCreator.pm: Corrected the directory changing code to take 2 or more deep relative paths into account. Thanks to Johnny Willemsen for reporting this. * templates/automake.mpd: Optimized this template with respect to checking a variable before using foreach. The foreach already does this, so checking the variable before hand is a waste of time. Mon Sep 26 07:10:17 2005 Chad Elliott * README: * modules/ProjectCreator.pm: Added generic_pre_extension and generic_pre_filename custom build settings. * templates/vc7.mpd: * templates/vc8.mpd: Added support for the builtin Visual Studio MIDL. * templates/vccommon.mpt: Added a comment that this file is not common to Visual C++, just vc6. Thu Sep 22 12:43:43 2005 J.T. Conklin * templates/automake.mpd: Changed to output libs, lit_libs, and pure_libs on separate lines. Tue Sep 20 08:47:21 2005 Chad Elliott * config/swig_perl.mpb: Added an include for $(PERL5_INCLUDE). * modules/TemplateInputReader.pm: Allow "()." in scope names within .mpt files. * modules/WorkspaceCreator.pm: Provide the user with more information as to why workspace creation failed. * templates/makedll.mpt: Shared libraries are created on Solaris using the -G option (not -shared). Mon Sep 12 10:47:28 2005 Justin Michel * clone_build_tree.pl: Prevent cloning of .pch files, which are precompiled headers when using VC++. Thu Sep 8 08:06:18 2005 J.T. Conklin * templates/automake.mpd: Changed to output compile_flags on separate lines. Changed to sort lists of source, header, and inline files to make output more deterministic. Tue Sep 6 10:34:24 2005 Chad Elliott * config/swig_perl.mpb: Added a base project for using SWIG with perl. * templates/automake.mpd: * templates/bmake.mpd: * templates/em3.mpd: * templates/ghs.mpd: * templates/make.mpd: * templates/nmake.mpd: * templates/vc6.mpd: * templates/vc7.mpd: * templates/vc7csharp.mpd: * templates/vc7vb.mpd: * templates/vc8.mpd: Change the position of the use of custom 'output_option' setting. Ensure that the input file is the last thing on the command line. Mon Aug 29 08:52:15 2005 Chad Elliott * templates/vc7.mpd: Enabled incremental linking as the default. * templates/vc7dll.mpt: * templates/vc7exe.mpt: Disable incremental linking in release mode as was done in Justin's change on Fri Aug 26 13:46:47 2005. Mon Aug 29 12:41:12 UTC 2005 Johnny Willemsen * templates/nmakedll.mpt: * templates/nmakeexe.mpt: Added WinX86_64 as platform. This is Windows 64bit on EMT64. Mon Aug 29 11:48:12 UTC 2005 Johnny Willemsen * templates/nmake.mpd: Made it possible to overrule cc, link and rc when generating the nmake project files Fri Aug 26 14:32:48 2005 Justin Michel * clone_build_tree.pl: Updated to prevent cloning of .suo files, which are used to store solution settings for VC++ 7+. Fri Aug 26 13:46:47 2005 Justin Michel * templates/vc7libexe.mpt: * templates/vc8libexe.mpt: It is invalid to enable incremental linking on release builds, because we also enabled comdat folding and reference optimization. Mon Aug 22 11:57:03 2005 Chad Elliott * templates/vc8.mpd: Fixed a bug in the template that caused static projects to have incorrect project settings. Mon Aug 22 07:17:17 2005 Chad Elliott * MPC version 3.3.0 released. Local Variables: add-log-time-format: current-time-string indent-tabs-mode: nil End: ace-6.4.5+dfsg.orig/MPC/history/ChangeLog-3_70000644000175000017500000014033113154167361016551 0ustar tggtggWed May 26 19:43:17 UTC 2010 James H. Hill * config/gdiplus.mpb: The configuration was missing a bracket. Tue May 25 22:55:48 UTC 2010 James H. Hill * config/gdiplus.mpb: Base class for building C++ application that support GDI+. Tue May 18 20:48:12 UTC 2010 Adam Mitz * prj_install.pl: Check for the case of an empty output dir, in this case we want '.'. Tue May 18 18:44:33 UTC 2010 Chad Elliott * docs/templates/vc8csharp.txt: * modules/VC9ProjectCreator.pm: * templates/vc8csharp.mpd: Added a TargetFrameworkVersion template variable. This is set by default with vc9 and above to 3.5. Tue May 18 15:13:21 UTC 2010 Adam Mitz * modules/Options.pm: Allow multiple -feature arguments, the effects are cumulative. * modules/ConfigParser.pm: Allow an alternate syntax for optional variable references with $?. * docs/USAGE: * docs/html/MakeProjectCreator.html: Documented the above changes. * modules/ProjectCreator.pm: Split-out core functionality of write_install_file() into a new function, get_install_info() which can be called by the individual type's project creator module. Also included 'gendir' settings in the ins file. * prj_install.pl: New switches: -d specifies a lib/bin subdirectory -i to read standard input instead of an ins file -x to enable certain tags to use 'gendir' from the mpc file in order to specify an alternate relative install path New functionality: - Create symlinks in the installed tree if there are two source files such that one is a symlink to the other - Allow entire directories to be installed (recursive) Mon May 17 06:43:59 UTC 2010 James H. Hill * modules/WixWorkspaceCreator.pm: * templates/wix.mpd: * templates/wix.mpt: Updated Wix workspace/project generator to support installation of the following: . files in subdirectories . gme paradigms Sat Apr 24 23:40:57 UTC 2010 Chad Elliott * config/bison.mpb: * config/erlang.mpb: * config/flex.mpb: * config/iiopnet.mpb: * config/lex.mpb: * config/mpb.mpb: * config/ndds_ts_defaults.mpb: * config/qt.mpb: * config/qt4_gui.mpb: * config/splice_ts_defaults.mpb: * config/swig_java.mpb: * config/swig_perl.mpb: * config/swig_php.mpb: * config/swig_python.mpb: * config/swig_ruby.mpb: * config/swig_tcl.mpb: * config/udm.mpb: * config/wix.mpb: * config/yacc.mpb: Removed use of automatic. If it was set to 1, I removed it completely since automatic_in and automatic_out defaults to 1. If it was set to 0, I replaced it with automatic_in and automatic_out. * modules/ProjectCreator.pm: Fixed a bug where files generated via a user defined custom rule would be added as input to another user generated custom rule even if it has automatic_in set to 0. Sat Apr 10 19:37:34 UTC 2010 Chad Elliott * config/opalorb.mpb: Added a base project for opalORB idl. * modules/NMakeProjectCreator.pm: Fixed a bug that only arose when the user used mpc.pl and the 'nmake' project type. The VCPropertyBase "use" was missing. * templates/vc7.mpd: Only generate debug information for "debug" configurations. Also, allow the OptimizeReferences setting to be set by the 'optref' template variable. * templates/vc8.mpd: * templates/vc8dll.mpt: * templates/vc8exe.mpt: * templates/vc8lib.mpt: * templates/vc8libexe.mpt: Only generate debug information for "debug" configurations. Also, allow the OptimizeReferences setting to be set by the 'OptimizeReferences' template variable. * vs_postclean.pl: Added a description of what this script does to the usage message. Tue Mar 23 13:44:29 UTC 2010 Chad Elliott * docs/README: Fixed a typo. * docs/html/MakeProjectCreator.html: Updated to reflect the Workspace 'exclude' change. * modules/WixWorkspaceCreator.pm: Changed to inherit from WinWorkspaceBase. * docs/templates/vc7.txt: * docs/templates/vc8.txt: * templates/vc7.mpd: * templates/vc8.mpd: Added a new template keyword, lib_options, that can be used to pass arbitrary options to the VCLibrarianTool. Tue Mar 23 12:16:11 UTC 2010 James H. Hill * docs/README: * modules/WorkspaceCreator.pm: Added support for properties in the exclude section of a workspace definition. Also, updated the README to reflect the changes. Mon Mar 22 00:47:56 UTC 2010 Chad Elliott * modules/AutomakeWorkspaceCreator.pm: * modules/BCB2007ProjectCreator.pm: * modules/BCB2007WorkspaceCreator.pm: * modules/BDS4ProjectCreator.pm: * modules/BDS4WorkspaceCreator.pm: * modules/BMakeProjectCreator.pm: * modules/BMakeWorkspaceCreator.pm: * modules/BorlandPropertyBase.pm: * modules/BorlandProjectBase.pm: * modules/Creator.pm: * modules/GHSProjectCreator.pm: * modules/GHSPropertyBase.pm: * modules/GHSWorkspaceCreator.pm: * modules/MakeProjectBase.pm: * modules/MakePropertyBase.pm: * modules/MakeWorkspaceBase.pm: * modules/NMakeProjectCreator.pm: * modules/NMakeWorkspaceCreator.pm: * modules/ProjectCreator.pm: * modules/VC6WorkspaceCreator.pm: * modules/VC7WorkspaceCreator.pm: * modules/VCProjectBase.pm: * modules/VCPropertyBase.pm: * modules/WinProjectBase.pm: * modules/WinPropertyBase.pm: * modules/WinWorkspaceBase.pm: * modules/WixWorkspaceCreator.pm: Modified properties to extend to workspaces instead of just projects to allow use of properties within exclude() statements in workspaces. * templates/wix.mpd: * templates/wix.mpt: Removed improper defaulting within an if statement and moved it into the template input file. Wed Mar 17 11:55:26 UTC 2010 Chad Elliott * modules/Creator.pm: Fixed a bug where subtraction of a string with a path separator in it would not work if the resulting project uses the backslash as the path separator. Thanks to Hubert Talbot for reporting this and supplying a patch. Tue Mar 16 23:05:44 UTC 2010 Steven Stallion * config/erlang.mpb: Updates to erlang support. Mon Mar 15 19:50:23 UTC 2010 Adam Mitz * modules/WorkspaceCreator.pm: Fixed a bug, reported by Johnny Willemsen, where aggregated workspaces that were referenced by environment variables ended up with the wrong relative paths (only occurred with multiple levels of aggregation). Mon Mar 15 12:53:26 UTC 2010 Chad Elliott * docs/templates/common.txt: Corrected the documentation for the 'type_is_static' template variable. * mpc.pl: * mwc.pl: Brought over Adam Mitz's change to deal with an undefined $FindBin::RealBin. Tue Mar 9 11:23:55 UTC 2010 Johnny Willemsen * modules/ProjectCreator.pm: Fixed a bug where if the user associated an attribute to a dependency, the dependency would be removed. If no attribute was associated, then the dependency was not adversely affected. Sun Feb 28 15:50:03 UTC 2010 Chad Elliott * templates/make.mpd: Added $(CFLAGS) to the $(COMPILE.c) variable. Sun Feb 28 15:08:56 UTC 2010 Chad Elliott * docs/README: * docs/html/MakeProjectCreator.html: * modules/ProjectCreator.pm: * modules/VC8WorkspaceCreator.pm: Added an extended syntax for associating name-value pairs with project dependencies (i.e., values added to the 'after' keyword). See the documentation for more details. Tue Feb 23 15:08:32 UTC 2010 Chad Elliott * config/wireshark.mpb: Switched from using windows project types to the windows property. * devtools/document_template.pl: Account for arrow operator usage. * modules/MakeProjectBase.pm: * modules/ProjectCreator.pm: * templates/make.mpd: Added a very limited ability to modify builtin component types (e.g., Source_Files, Header_Files, etc.). Currently, only the postcommand is useful and only for the 'make' project type. Fri Feb 19 15:25:47 UTC 2010 Adam Mitz * docs/README: * docs/html/MakeProjectCreator.html: * modules/Creator.pm: * modules/ProjectCreator.pm: Added the ability for Define_Custom types to singly-inherit. Thu Feb 18 18:31:55 UTC 2010 Chad Elliott * modules/ProjectCreator.pm: Check a string for definition before comparing. Some versions of perl report a warning coming from the update_template_variable method. Tue Feb 16 04:36:04 UTC 2010 Steven Stallion * config/wireshark.mpb: Fixed whitespace problems introduced in previous commit. Tue Feb 16 00:56:18 UTC 2010 Chad Elliott * templates/make.mpd: Fixed a bug in the template where the 'dld' template variable was not honored. * templates/makedll.mpt: Added a 'macosx' platform similar to the 'macos' platform except that the linker is g++ and there are no additional libraries linked in. Mon Feb 15 19:23:45 UTC 2010 Steven Stallion * config/wireshark.mpb: Final round of updates for Wireshark support on Windows. Mon Feb 15 04:59:26 UTC 2010 Steven Stallion * config/wireshark.mpb: Updated supported environment variables; Windows installations do not honor the traditional lib subdirectory. Thu Feb 11 22:25:16 UTC 2010 Abdul Sowayan * config/ndds_ts_defaults.mpb: Minor changes to address the limitation described in Bug 3811. Changes need to be reverted once Bug 3811 is fixed. Thanks to Trent Nadeau for contributing this change and testing it. Thu Feb 11 21:07:11 UTC 2010 Steven Stallion * config/glib.mpb: * config/wireshark.mpb: Added initial support for glib. Thu Feb 11 20:19:38 UTC 2010 Steven Stallion * config/global.features: * config/wireshark.mpb: Added initial support for wireshark. Tue Feb 9 14:05:11 UTC 2010 Chad Elliott * templates/vc8vb.mpd: Corrected VB support for vc9 and vc10 by adding the ToolVersion setting. Wed Jan 27 11:11:14 UTC 2010 Johnny Willemsen * config/ndds_ts_defaults.mpb: Removed -enableEscapeChar as default argument, it is not supported with the 4.4 release we have on emulab Tue Jan 26 12:00:14 UTC 2010 Johnny Willemsen * config/ndds_ts_defaults.mpb: Added -enableEscapeChar as default argument Mon Jan 25 18:55:14 UTC 2010 Johnny Willemsen * config/ndds_ts_defaults.mpb: Use the new <%bat%>, on windows this is a batch file, not an executable Mon Jan 25 18:46:30 UTC 2010 Chad Elliott * docs/README: * docs/USAGE: * docs/html/MakeProjectCreator.html: * modules/ProjectCreator.pm: Added additional psuedo template variables (bat, cmd and exe) and an optional environment variable to force Windows compatible commands to be used in psuedo template variables. See the documentation for more on this. * templates/make.mpd: * templates/makedll.mpt: Modified this template and template input file to use a C compiler on files that have a .c extension instead of always using the C++ compiler. Sat Jan 23 18:32:14 UTC 2010 Johnny Willemsen * config/ndds_ts_defaults.mpb: Commented out the dependent setting, with the vc and nmake project types, MPC adds .exe as default extension, but this script is a .bat file on windows. See bugzilla 3816 for some more details. Thu Jan 21 12:52:48 UTC 2010 Chad Elliott * modules/Depgen/MakeDependencyWriter.pm: Move checks to the file level status. * modules/TemplateParser.pm: Fixed bugs with using a scope inside of a foreach. Also, fixed bugs where 'flag_overrides' would sometimes end up as an array and would be printed to the project as if it were a string. Finally, a filename ending in a '.' will be considered to have an extension of '.'. * templates/automake.mpd: Modified to best handle dependencies with a space or $(...) in them. Dependencies with spaces in them will be handled at the template level and $(...) dependencies will be dropped. * templates/make.mpd: Modified to best handle dependencies with a space or $(...) in them. If the 'gnumake' template variable is set, a GNU make substitute function will be used. Otherwise, it will be done at the template level for spaces and $(...) dependencies will be dropped. Mon Jan 18 09:24:14 UTC 2010 Johnny Willemsen * config/ndds_ts_defaults.mpb: Add TAO_ROOT and TAO_ROOT/tao to the default include paths to get the same behaviour as with TAO_IDL Sun Jan 17 19:31:14 UTC 2010 Johnny Willemsen * config/loki.mpb: Added base project for loki Thu Jan 14 17:23:14 UTC 2010 Chad Elliott * docs/templates/common.txt: Documented the language template variable. * modules/Depgen/MakeDependencyWriter.pm: Correctly deal with whitespace in file paths. Also, convert : to a cygwin path on Windows (even if the user isn't using cygwin). Otherwise, make will fail. * docs/templates/make.txt: * templates/make.mpd: Use DEPLIBS to cause an executable to be relinked when a static library on which the executable depends is updated. This will only be used if the 'gnumake' template variable is set. * templates/makedll.mpt: Set the 'gnumake' template variable for the linux, nucleus and cygwin platforms. Wed Jan 13 13:07:57 UTC 2010 Abdul Sowayan * config/ndds_ts_defaults.mpb: Use the CORBA Compatability Kit (CCK) by default. Thu Jan 7 16:29:06 UTC 2010 Chad Elliott * modules/Creator.pm: Fixed a bug where template variable modifications made one project would accidentally be retained for future projects. * modules/WorkspaceCreator.pm: Added a work-around in the create_command_line_string() method for dollar signs in the command line arguments. On non-Windows platforms, the argument with dollar signs will be wrapped in single quotes. Tue Jan 5 14:33:11 UTC 2010 Chad Elliott * config/libpng.mpb: * config/zlib.mpb: Put double quotes around settings that contain $(...) so that when it is filled in with something that contains spaces, the value is retained correctly. There are probably other base projects that could benefit from this, but I only need these at the moment. Mon Jan 4 15:48:32 UTC 2010 James H. Hill * config/iodbc.mpb: * config/odbc.mpb: * config/unixodbc.mpb: Rewrote the odbc.mpb project in terms of feature specifications for UnixODBC and iODBC. Mon Jan 4 15:25:54 UTC 2010 Chad Elliott * config/qt.mpb: Added an include path for non-Windows project types. * modules/Creator.pm: Added a method to replace environment variables within a string. This isn't new code, it's just removal of duplicated code. * modules/Depgen/DependencyEditor.pm: Don't process directories as if they were files. * modules/ProjectCreator.pm: Use environment variable replacement method from Creator. * modules/WorkspaceCreator.pm: Replace environment variables in non-scoped assignments as they are encountered. This avoids errors in 'cmdline' assignments within aggregated workspaces. Sat Jan 2 16:37:15 UTC 2010 James H. Hill * config/odbc.mpb: Fixed comment in iODBC section. Mon Dec 21 18:55:57 UTC 2009 Chad Elliott * modules/AutomakeWorkspaceCreator.pm: Fixed a bug where the conditional 'associate' tag (--) would be used as an AM_CONDITIONAL in the generated configure.ac. * templates/makedll.mpt: The system directory variable for arm_elf_gcc should have been $(SYSTEMDIR) not $(SYSTEM). Thu Dec 17 20:45:21 UTC 2009 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug where adding a string containing $(...) would not have double quotes which, when used with -expand_vars, could cause invalid values if the variable value had a space in it. * templates/makedll.mpt: Changed the hard-coded /usr/local to use $(SYSTEM) in the arm_elf_gcc compiler configuration. Tue Dec 1 15:05:46 UTC 2009 Chad Elliott * docs/templates/common.txt: * templates/vc7csharp.mpd: * templates/vc7java.mpd: * templates/vc7vb.mpd: * templates/vc8csharp.mpd: * templates/vc8java.mpd: * templates/vc8vb.mpd: Allow the setting of the "DelaySign" value through a template variable. Mon Nov 30 17:17:30 UTC 2009 Chad Elliott * modules/Depgen/NMakeObjectGenerator.pm: Moved a comment. * templates/make.mpd: If the 'targetoutdir' or 'obj_dir' template variables are set, we need to set the VDIR environment variable when calling depgen.pl so that the generated dependencies have the right directory. Thu Nov 26 08:57:00 UTC 2009 Simon Massey * modules/ProjectCreator.pm: Reverted allowing double-quote characters to be treated in a project specific way for the. If quotes are to be preserved within "idlflags" inside project mpc files, then explicit <%quote%> must be used. Swapping natual quotes broke other parts of MPC parsing. Tue Nov 17 15:05:06 UTC 2009 Chad Elliott * modules/ProjectCreator.pm: Fixed a problem with my last change. In some cases, a perl variable wasn't set causing strange template variable results. Mon Nov 16 02:52:53 UTC 2009 Chad Elliott * config/msgfmt.mpb: Added a base project to utilize the msgfmt executable. * modules/ProjectCreator.pm: Fixed a bug where adding to a scoped template variable nullified the setting of the non-scoped template variable. Fri Nov 13 15:30:00 UTC 2009 Simon Massey * modules/ProjectCreator.pm: update_template_variable() now processes values through replace_parameters() and treats double-quote characters in a project specific way. This allows the "tao_idlflags" template variable to contain quoted roots, to allow for spaces within the directory names. Also convert_command_parameters() now also treats double-quote characters in a project specific way for the same reason, to allow " to be used within "idlflags" inside project mpc files. Wed Nov 11 07:00:20 UTC 2009 Johnny Willemsen * config/ndds_ts_defaults.mpb: Don't use visibility with ndds Mon Nov 9 15:22:20 UTC 2009 Mike Martinez * config/qt4_core.mpb: Added QT4_INCDIR to allow user to specify include directory which is not relative to QTDIR (such as distributions that place qt in /usr/include/qt4). * config/qt4_gui.mpb: Added QRC resource compiler command handling. Added 'ui_' prefix to output filename of UI compiler to match the behavior of 'qmake'. Fri Nov 6 03:39:51 UTC 2009 Chad Elliott * config/mpich.mpb: Added an include path and remove an unnecessary library (for non-windows project types). Thu Nov 5 19:39:35 UTC 2009 Chad Elliott * modules/ProjectCreator.pm: * modules/XMLProjectBase.pm: Fixed the 'equote' pseudo template variable. It wasn't actually escaped before. Now it is. Mon Nov 2 13:35:00 UTC 2009 Chad Elliott * modules/WorkspaceCreator.pm: Fixed a bug where an MPC file used in more than one aggregated workspace wouldn't be ignored. Thu Oct 29 22:55:05 UTC 2009 Chad Elliott * docs/README: * docs/html/MakeProjectCreator.html: * modules/ProjectCreator.pm: Added the current language as a property. So, prop:cplusplus, for example, can be used within a 'specific' scope. * docs/USAGE: * modules/Options.pm: Minor change. Separated languages using commas in usage. Wed Oct 28 16:00:03 UTC 2009 Chad Elliott * templates/make.mpd: If a custom 'dependent' setting contains a double quote, then we must make a fake rule that corresponds to it. Otherwise, make doesn't know how to deal with it. Fri Oct 23 09:49:30 UTC 2009 Johnny Willemsen * config/ndds_ts_defaults.mpb: Wrap the command with quotes because NDDSHOME could contain spaces Wed Oct 21 19:29:58 UTC 2009 Chad Elliott * docs/templates/make.txt: * templates/make.mpd: Modified to allow the user to override the 'touch' command via -value_template. For example, if you're using GNU make on Windows you may want to replace 'touch' with 'copy nul' (e.g, mwc.pl -value_template "touch=copy nul"). * templates/vc8.mpd: Replaced spaces with tabs so that the generated project is more like ones created by Visual Studio. Tue Oct 20 06:31:30 UTC 2009 Johnny Willemsen * config/ndds_ts_defaults.mpb: Don't wrap the command with quotes, that breaks on linux Mon Oct 19 12:05:30 UTC 2009 Johnny Willemsen * config/ndds_ts_defaults.mpb: Wrap the command with quotes Fri Oct 16 17:42:30 UTC 2009 Steven Stallion * templates/vc7.mpd: * templates/vc8.mpd: Reverted changes (r1646): Mon Oct 5 11:38:03 UTC 2009 Johnny Willemsen Commit broke OpenDDS builds on Windows platforms. Custom commands should not be wrapped in double quotes; some custom commands use compound commands (i.e. dcps_ts.pl). * config/udm.mpb: * config/wix.mpb: Reverted changes (r1649): Tue Oct 13 13:38:48 UTC 2009 Sumant Tambe No longer neccessary. Fri Oct 16 02:25:30 UTC 2009 Chad Elliott * modules/ProjectCreator.pm: Reverted my change from Tue Sep 1 12:58:30 UTC 2009 and modified the get_custom_value() method to not add >> files when gendir is set to something other than '.'. Thanks to Steve Stallion for tracking this down. Tue Oct 13 13:38:48 UTC 2009 Sumant Tambe * config/udm.mpb: * config/wix.mpb: . Removed quotes because they are no longer necessary. Quotes are generated automatically as per Johnny's changes on Oct 5th. Tue Oct 6 09:04:03 UTC 2009 Johnny Willemsen * config/ndds_ts_defaults.mpb: This base project requires ndds Mon Oct 5 11:38:03 UTC 2009 Johnny Willemsen * templates/vc7.mpd: * templates/vc8.mpd: Generate quotes around a custom command, the tool we execute could be in a path with a space in it Fri Oct 2 20:31:03 UTC 2009 Steven Stallion * config/global.features: Updated support for erlang. Mon Sep 28 15:18:36 UTC 2009 Chad Elliott * config/global.features: * config/libpng.mpb: Added support for libpng. * templates/makedll.mpt: Added support for gcc on Nucleus OS. Thu Sep 24 12:38:20 UTC 2009 Johnny Willemsen * templates/vc8platforms.mpt: Added Beckhoff_HMI_600 (x86) Tue Sep 22 21:12:20 UTC 2009 Sumant Tambe * config/udm.mpb: Added paths for GME 7 and GME 9. Thu Sep 17 13:52:10 UTC 2009 Chad Elliott * config/pcre.mpb: Only add the $(PCRE_VERSION) variable to the library name when not using Microsoft products. Since the windows version of pcre doesn't have a version number, the variable is always empty and Visual Studio complains. Wed Sep 9 21:48:19 UTC 2009 Chad Elliott * docs/README: * docs/html/MakeProjectCreator.html: * modules/ProjectCreator.pm: Added a new psuedo variable, 'prj_type', which holds the project type as specified by the -type command line option. * config/wix.mpb: Modified to use the new 'prj_type' pseudo variable. * modules/WorkspaceCreator.pm: Changed the duplicate project through workspace aggregation from a warning to information. Tue Sep 8 04:16:19 UTC 2009 Sumant Tambe * config/udm.mpb: * config/wix.mpb: Added support for VC9 and UDM version 3.2.1. Tue Sep 8 00:48:45 UTC 2009 Chad Elliott * modules/Driver.pm: When the -gfeature_file option is used, turn the file path into a full path if it is relative. This is necessary for when the -recurse option is used and a full path isn't provided to the feature file. * modules/ProjectCreator.pm: When setting up the 'input_ext' and 'output_ext' pseudo template variables, set them to an empty string if the input and output files do not contain an extension. Thu Sep 3 19:15:49 UTC 2009 Chad Elliott * docs/html/MakeProjectCreator.html: Corrected the documentation for the 'remove_from' template function. * modules/FeatureParser.pm: Sort the feature names as they come out for reproducibility. * modules/Options.pm: Fixed a bug where an ending /. would not be removed from a relative path on Windows. * modules/TemplateParser.pm: Added missing 'lc' related functions to have a symmetry with 'uc'. Thu Sep 3 12:57:41 UTC 2009 Chad Elliott * config/default.rel: Added a comment about comma separating the columns. * docs/html/MakeProjectCreator.html: Added more info about the 'scope' template function. * modules/Options.pm: Fixed a bug where the valid languages wouldn't be printed in the usage. * modules/TemplateParser.pm: Added a comment about what we're checking and why after successfully parsing the template. * modules/ProjectCreator.pm: * modules/WorkspaceCreator.pm: Changed to pass an array reference to the source listing callback instead of passing an array. * templates/make.mpd: Added slightly better support for multiple platforms. It's still not fully functional though. Tue Sep 1 12:58:30 UTC 2009 Chad Elliott * modules/ProjectCreator.pm: Removed code that added output files (added via the '>>' construct) when accessing output files from the template. The code was redundant and when gendir was something other than '.', it would cause duplicate files to be added when the template was generating the output file. Mon Aug 31 16:41:00 UTC 2009 Chad Elliott * PROBLEM-REPORT-FORM: Updated URLs. * modules/BCB2007ProjectCreator.pm: * modules/BCB2007WorkspaceCreator.pm: * modules/ConfigParser.pm: Corrected comments. * modules/ProjectCreator.pm: Alphabetized the keywords (which makes it easier when updating documentation). Updated comments and added a minor performance enhancment. * modules/TemplateParser.pm: Fixed a bug where 'features' used in a template would get confused with template scopes. * modules/WB26ProjectCreator.pm: If the user overrides the template, still provide a valid project file name in the project_file_name() method. * modules/WorkspaceCreator.pm: Fixed a bug where duplicate mpc files added by aggregated workspaces would not be correctly ignored. Tue Aug 25 12:22:59 UTC 2009 Chad Elliott * config/qt4_core.mpb: * config/qt4_designer.mpb: * config/qt4_designercomponents.mpb: * config/qt4_gui.mpb: * config/qt4_network.mpb: * config/qt4_opengl.mpb: * config/qt4_qt3support.mpb: * config/qt4_sql.mpb: * config/qt4_svg.mpb: * config/qt4_test.mpb: * config/qt4_xml.mpb: Committing changes from Ciju John. Removed the hard-coded 4 in the library names and switch from using $(QTDEBUG) to $(QT_CFG). Mon Aug 24 13:10:16 UTC 2009 Chad Elliott * docs/USAGE: * modules/Options.pm: Changed VAR to VAL. * docs/html/MakeProjectCreator.html: Added missing 's. * modules/AutomakeWorkspaceCreator.pm: Added associated names to the list of AM_CONDITIONAL. * modules/Creator.pm: Fixed a bug where $(...) used in an exclude block would cause ./ to be prepended to the value. Also, only remove unmatched $(...) variables after attempting with the secondary relative values. * modules/WorkspaceCreator.pm: Fixed a bug where $PWD used in a 'cmdline' setting within an exclude block would not be evaluated correctly. Wed Aug 19 14:28:52 UTC 2009 Chad Elliott * docs/README: * docs/html/MakeProjectCreator.html: * modules/ProjectCreator.pm: Added a 'static' property that can be used within the 'specifc' and 'conditional' clauses. The 'static' property will only be set if the -static option was used on the command line. Wed Aug 19 13:49:34 UTC 2009 Chad Elliott * modules/VC8WorkspaceCreator.pm: We should also avoid adding references to 'custom_only' projects. These also cause warnings in Visual Studio. Wed Aug 19 02:11:03 UTC 2009 Chad Elliott * create_base.pl: Added a description of what the script does to the usage. * modules/Driver.pm: Use DirectoryManager::onVMS() instead of comparing $^O to 'VMS'. * modules/Options.pm: Removed a redundant exit() call. * modules/ProjectCreator.pm: Added comments to the get_special_value method. * modules/NMakeWorkspaceCreator.pm: * modules/TemplateParser.pm: * modules/VC7WorkspaceCreator.pm: Added the 'managed' setting to the saved project info structure. * modules/VC8WorkspaceCreator.pm: Used the new 'managed' setting in the saved project info structure to avoid adding a reference to a non-managed c++ library. * templates/vc8.mpd: Removed the use of <%language%> in the MPC ADD DEPENDENCIES comment. It was not necessary since we have that information available from the saved project info structure. * modules/WorkspaceCreator.pm: Removed the redundant setting of the 'info' data member. * registry.pl: Added vc10 and wix types. * vs_postclean.pl: Changed spaces in a regular expression to \s*. Fri Aug 14 18:46:11 UTC 2009 Chad Elliott * config/pcre.mpb: * config/pcreposix.mpb: Added the ability to specify a version for the pcre libraries. * config/udm.mpb: Fixed a typo. * devtools/document_template.pl: Fixed a bug where mixed case template variables used in a foreach would not be handled correctly. * docs/templates/vc7.txt: Documented the DisableSpecificWarnings template variable. * rpm/MPC.spec: * rpm/buildrpm.sh: Made packager dynamic based on who's actually creating the RPM. Fri Aug 14 12:43:22 UTC 2009 Johnny Willemsen * config/udm.mpb Use DisableSpecificWarnings Fri Aug 14 12:17:36 UTC 2009 Chad Elliott * templates/em3.mpd: * templates/nmake.mpd: * templates/vc6.mpd: * templates/vc7.mpd: Support the DisableSpecificWarnings template variable as it is in vc8 and higher. Since support isn't built directly into the project format, we use the /wd command line option for each warning number supplied. Fri Aug 14 02:20:11 UTC 2009 Chad Elliott * rpm: * rpm/MPC.spec: * rpm/buildrpm.sh: Added the ability to create an RPM file out of the MPC source. Wed Aug 12 22:29:21 UTC 2009 Chad Elliott * modules/BMakeWorkspaceCreator.pm: * modules/WixWorkspaceCreator.pm: Cleaned up code. * modules/ProjectCreator.pm: Reverted one of the performance enhancements from yesterday. It made a faulty assumption that caused issue with the DDS builds. * modules/WB26WorkspaceCreator.pm: * modules/WorkspaceCreator.pm: Added a 'requires_make_coexistence' method to always use -make_coexistence without having to pass the option on the command line. Wed Aug 12 17:56:20 UTC 2009 Johnny Willemsen * config/gacutil.mpb: Use prop:microsoft Wed Aug 12 12:48:20 UTC 2009 Johnny Willemsen * docs/html/MakeProjectCreator.html: Fixed broken link Tue Aug 11 16:08:20 UTC 2009 Chad Elliott * docs/html/MakeProjectCreator.html: Added an Id tag. * modules/ProjectCreator.pm: Made minor performance enhancements. * modules/WB26WorkspaceCreator.pm: Added code to only put top-level dependencies in the project files. This build tool doesn't handle indirectly duplicated project dependencies very well. Mon Aug 10 21:40:58 UTC 2009 Chad Elliott * modules/ProjectCreator.pm: Return immediately from generate_default_target_names() if the project has custom_only set to 1. We need not waste time setting the sharedname, staticname or exename. * modules/WinVersionTranslator.pm: Cleaned up and commented the code. Mon Aug 10 17:55:53 UTC 2009 Chad Elliott * config/global.features: Added disabled features that were missing. * devtools/document_template.pl: Updated the usage and added automatic language selection for java. * docs/README: * docs/USAGE: Updated to reflect the current state of MPC. * docs/html: * docs/html/MakeProjectCreator.css: * docs/html/MakeProjectCreator.html: Converted the Frame Maker source into HTML and updated to reflect the current state of MPC. * docs/templates/wix.txt: Added incomplete documentation for the WIX template variables. * modules/GHSProjectCreator.pm: Corrected poorly written code. * modules/Options.pm: Fixed a bug in the -relative_file portion of the usage output. * modules/ProjectCreator.pm: Added the ability to use the 'temporary' pseudo template variable outside of a custom_type context. It will contain a different value than 'temporary' referenced from within the custom_type context. * modules/WixProjectCreator.pm: Changed to use 'exeout' instead of the deprecated 'install' project variable name. * docs/MakeProjectCreator.pdf: * docs/fm: * docs/fm/MakeProjectCreator.fm: * docs/fm/images: * docs/fm/images/OCILOGO_bw_book.eps: * docs/fm/images/mpc.fig: * docs/fm/images/mpc.gif: * docs/fm/images/mpc_mtiff.eps: * docs/fm/images/mwc.fig: * docs/fm/images/mwc.gif: * docs/fm/images/mwc_mtiff.eps: * docs/html/MakeProjectCreator.fm: Removed these files. Fri Aug 7 09:23:58 UTC 2009 Johnny Willemsen * templates/vc8platforms.mpt: Removed release_link_options for the SuperSonic SDK, the options are not ok Thu Aug 6 15:11:07 UTC 2009 Chad Elliott * devtools/document_template.pl: * modules/CCProjectCreator.pm: * modules/Creator.pm: * modules/MakeProjectCreator.pm: * modules/MakeWorkspaceCreator.pm: * modules/Options.pm: * modules/ProjectCreator.pm: * modules/VC6ProjectCreator.pm: * modules/VC7ProjectCreator.pm: * modules/VC7WorkspaceCreator.pm: * modules/VC8ProjectCreator.pm: * modules/VC8WorkspaceCreator.pm: * modules/WB26ProjectCreator.pm: Replaced all language related strings with constants stored in the Creator base class. Also, fixed a bug where a project that contained source files or resource files for a language not supported by the project type would be created. Now, the project will be skipped if the project type does not support the language setting. Wed Aug 5 18:41:55 UTC 2009 Chad Elliott * MPC.ico: Updated to use the new MPC logo. * docs/README: * modules/ProjectCreator.pm: Modified 'conditional' to use properties like 'specific'. * modules/WixProjectCreator.pm: Inherit from XMLProjectBase and WinProjectBase. The output is xml and this is a Windows specific project creator. * docs/templates/make.net.txt * templates/make.net.mpd: * templates/make.net.mpt: Updated to support icon files and resx files, the trace template variable and to set the DESIGN and DEBUG constants in debug mode. Wed Aug 5 06:21:58 UTC 2009 Johnny Willemsen * templates/vc8.mpd: Added release_link_options. This fixes bugzilla 3527, thank to Chad Elliot for providing the patch * templates/vc8platforms.mpt: Use release_link_options for the SuperSonic SDK * templates/vc8platforms.mpt: No need to set charset anymore * docs/templates/vc8.txt: Document new release_link_options Tue Aug 4 18:11:58 UTC 2009 Chad Elliott * modules/ProjectCreator.pm: * modules/TemplateParser.pm: Added a new template function, 'extensions', that can be used to get a list of valid extensions based on the component name (e.g, source_files, header_files, inline_files, etc.) * templates/em3.mpd: * templates/vc6.mpd: * templates/vc7.mpd: * templates/vc8.mpd: * templates/wb26wrproject.mpd: Use the 'extensions' function instead of hard-coded strings. Tue Aug 4 16:29:11 UTC 2009 Chad Elliott * modules/Creator.pm: Default the language to 'cplusplus' if it isn't provided during construction. This ensures that language is always set and we don't have to check it to make sure it's defined elsewhere. * modules/ProjectCreator.pm: Modified the behavior of dealing with resource files. The behavior specific to C++ was being applied to all languages. * modules/TemplateParser.pm: Added implementations of various template functions. Some were required for the bmake template change below. * modules/WixProjectCreator.pm: Removed unused code. * modules/WixWorkspaceCreator.pm: Fixed a the case of the WixProjectCreator name. * templates/bmake.mpd: * templates/bmakedll.mpt: * templates/bmakedllexe.mpt: Added the ability to build static projects without providing the -static option to MPC. The static-only projects can still be created with the -static option, but it is no longer necessary. Tue Aug 4 10:31:40 UTC 2009 Johnny Willemsen * config/unicode.mpb: Changed this to a feature Mon Aug 3 16:43:18 UTC 2009 Chad Elliott * modules/Driver.pm: * mpc.pl: * mwc.pl: Added a pair of constants that will be used in determining which type of creators to use (either workspace or project). * modules/ProjectCreator.pm: Removed the use of a hard-coded string and simplified some code. Fri Jul 24 09:29:31 UTC 2009 Johnny Willemsen * config/nddslib.mpb: Added requires += ndds. If you want to use RTI DDS you have to add ndds=1 to your default.features file. This way we can add dds4ccm support to CIAO without requiring all users to install RTI DDS Fri Jul 3 03:25:31 UTC 2009 James H. Hill * templates/wix.mpd: Added support for setting the install location of a set of files for a project using 'install_location'. This takes a comma separated list of directories that represent the location for installing the files. The following is a simple example: specific (wix) { install_location = etc models } The example above will install files for the given project in etc/models directory under the root install directory. Thu Jul 2 06:37:36 UTC 2009 James H. Hill * templates/wix.mpd: Fixed bugs GME section of generated Wix files for vc8. Sun Jun 28 08:05:20 UTC 2009 James H. Hill * templates/wix.mpd: Added support for installing GME components using Wix. In order to include GME components in the installer, you must define the following properties in a *wix* scope: gme_install = [0 | 1]; default is 0 gme_register = [HKLM | HKCU]; default is HKLM gme_progid = gme_uuid = gme_paradigms = gme_has_icon = [0 | 1] gme_description = gme_tooltip = The values for each of these properties can be found in ComponentConfig.h Thu Jun 25 06:25:12 UTC 2009 James H. Hill * modules/WixProjectCreator.pm: * templates/wix.mpd: Added support to creating a directory if there is no output file specified in the project. Disabled skipping projects if there are no useful targets defined. Added markers to the top and bottom of the component. The name of the markers are: component_top and component_bottom. Thu Jun 25 00:39:12 UTC 2009 James H. Hill * modules/WixProjectCreator.pm: * modules/WixWorkspaceCreator.pm: Forgot to change the case on the pacakge names. Wed Jun 24 21:19:36 UTC 2009 James H. Hill * config/wix.mpb: * config/wix_ui.mpb: * config/wix_xml.mpb: Base projects for building Wix files. Wed Jun 24 21:14:20 UTC 2009 James H. Hill * modules/WixProjectCreator.pm: * modules/WixWorkspaceCreator.pm: * templates/wix.mpd: * templates/wix.mpt: . First version of the Wix module that is used in conjuction with the Wix toolset that creates .msi files. This project type will generate the include files (.wxi) that can be included in a .wxs configuration file. Right now, the installer only can generate files for shared libraries. The next update will include support for executables. Wed Jun 17 18:37:31 UTC 2009 Johnny Willemsen * templates/vc8platforms.mpt: Explicitly set charset to get CharacterSet set when using multiple platforms Tue May 26 19:01:53 UTC 2009 Adam Mitz * modules/ProjectCreator.pm: Changed hard-coded 'resource_files' to a call to get_resource_tag, which is a new method on ProjectCreator. get_resource_tag determines the name of 'resource_files' for the current language based on the %language hash (for C# and VB this is 'resx_files'). Mon May 25 11:03:31 UTC 2009 Johnny Willemsen * templates/vc8platforms.mpt: Added a new target and corrected some wince versions Sun May 24 18:46:31 UTC 2009 Chad Elliott * MPC version 3.7.0 released. Local Variables: mode: change-log add-log-time-format: (lambda () (progn (setq tz (getenv TZ)) (set-time-zone-rule UTC) (setq time (format-time-string %a %b %e %H:%M:%S %Z %Y (current-time))) (set-time-zone-rule tz) time)) indent-tabs-mode: nil End: ace-6.4.5+dfsg.orig/MPC/history/ChangeLog-3_60000644000175000017500000012226713154167361016560 0ustar tggtggSun May 24 18:43:56 UTC 2009 Chad Elliott * devtools/document_template.pl: Added code to convert less than and greater than signs into html friendly codes. Fri May 22 07:51:05 UTC 2009 Johnny Willemsen * templates/vc8platforms.mpt: Added some more WinCE SDKs Wed May 13 18:03:05 UTC 2009 Adam Mitz * modules/VC9ProjectCreator.pm: * templates/vc8csharp.mpd: * docs/templates/vc8csharp.txt: Added support for Visual C# with -type vc9 (Visual Studio 2008). Thu May 7 21:12:17 UTC 2009 Adam Mitz * modules/Driver.pm: Removed a debugging print statement. Thu May 7 19:18:24 UTC 2009 Chad Elliott * modules/ConfigParser.pm: * modules/Driver.pm: Modified the locate_dynamic_directories code to only warn the user if the path doesn't contain environment variables or the environment variables that it does contain are set. * modules/ProjectCreator.pm: Fixed a perl warning about an uninitialized variable. Thu May 7 15:39:17 UTC 2009 Chad Elliott * docs/README: * modules/BCB2007ProjectCreator.pm: * modules/BDS4ProjectCreator.pm: * modules/BMakeProjectCreator.pm: * modules/BorlandProjectBase.pm: * modules/GHSProjectCreator.pm: * modules/MakeProjectBase.pm: * modules/NMakeProjectCreator.pm: * modules/ProjectCreator.pm: * modules/VCProjectBase.pm: * modules/WinProjectBase.pm: Modified the 'specific' clause to accept "properties" in addition to project types. Maintaining project type lists within the base projects was getting out of hand. A simpler approach is to apply properties to groups of project types, such as project types that are only used on Windows. These properties are referenced within the 'specific' clause instead of project types. See the README for more details. * config/boost_date_time.mpb: * config/boost_filesystem.mpb: * config/boost_iostreams.mpb: * config/boost_prg_exec_monitor.mpb: * config/boost_program_options.mpb: * config/boost_regex.mpb: * config/boost_serialization.mpb: * config/boost_signals.mpb: * config/boost_system.mpb: * config/boost_test_exec_monitor.mpb: * config/boost_thread.mpb: * config/boost_unit_test_framework.mpb: * config/boost_wave.mpb: * config/bzip2.mpb: * config/lzo1.mpb: * config/mpich.mpb: * config/nddslib.mpb: * config/odbc.mpb: * config/openssl.mpb: * config/splicelib.mpb: * config/sqlite3.mpb: * config/swig_perl.mpb: * config/udm.mpb: * config/xerces.mpb: * config/zlib.mpb: * config/zzip.mpb: Modified all of these base projects to use properties instead of project types within the 'specific' clauses. * modules/VC10ProjectCreator.pm: * modules/VC10WorkspaceCreator.pm: * modules/VC9WorkspaceCreator.pm: Removed duplicated code. Tue May 5 17:37:29 UTC 2009 Jeff Parsons * config/splicelib.mpb: Added verbatim line for gnuace that turns off visibility discrimination. OpenSpliceDDS doesn't yet support versions of g++ that handle hidden visibility. Fri May 1 14:09:49 UTC 2009 Adam Mitz * clone_build_tree.pl: Don't skip directories ending in .d since ACE now contains rc.d and init.d directories. Wed Apr 29 11:39:32 UTC 2009 Johnny Willemsen * templates/vc8platforms.mpt: Add eBox 2300 and 4300 Windows CE 6 Fri Apr 24 20:37:40 UTC 2009 James H. Hill * config/udm.mpb: Changed 'automatic' to 1. Fri Apr 17 15:20:32 UTC 2009 Johnny Willemsen * docs/fm/*: Added FrameMaker 8 files for the MPC pdf file. When making changes make sure track changes is enabled. This documentation is based on original work contributed by Object Computing, Inc. (OCI), St. Louis, MO, USA, http://www.ociweb.com. Thu Apr 9 21:37:52 UTC 2009 Phil Mesnier * config/udm.mpb: Fuzz fix. Thu Apr 9 16:57:57 UTC 2009 James H. Hill * config/udm.mpb: Mapped 'commandflags' -> 'udmflags' Thu Apr 9 16:48:31 UTC 2009 James H. Hill * config/udm.mpb: Bug fix in the project specification. Thu Apr 9 16:42:43 UTC 2009 James H. Hill * config/udm.mpb: UDM base project. Tue Apr 7 09:33:22 UTC 2009 Johnny Willemsen * config/qt4_core.mpb: * config/qt4_designer.mpb: * config/qt4_designercomponents.mpb: * config/qt4_gui.mpb: * config/qt4_network.mpb: * config/qt4_opengl.mpb: * config/qt4_qt3support.mpb: * config/qt4_sql.mpb: * config/qt4_svg.mpb: * config/qt4_test.mpb: * config/qt4_xml.mpb: All Qt4libs are appended with 4 Wed Apr 1 16:10:22 UTC 2009 Ciju John * config/qt4_core.mpb: Wrong include path got checked in. This fixes it. Wed Apr 1 15:56:35 UTC 2009 Ciju John * config/qt4_core.mpb: * config/qt4_gui.mpb: Qt4 libs are appended with '4'. Thu Mar 26 12:48:22 UTC 2009 Johnny Willemsen * docs/MakeProjectCreator.pdf: First updates applied Mon Mar 16 21:33:14 UTC 2009 Steven Stallion * config/erlang.mpb: Updated erlang base project to default to typical gnuace behavior for generated artifacts. Sun Mar 15 19:36:54 UTC 2009 Johnny Willemsen * config/lzo1.mpb: Fixed lib names Wed Mar 11 13:51:08 UTC 2009 Johnny Willemsen * docs/MakeProjectCreator.pdf: This work is based on the TAO 1.4a TAO Developers Guide chapter on MPC published by OCI. The goal is to improve this document with time to serve as the authoritative reference/documentation for MPC users. Thanks to OCI for making this chapter publicly available and allowing us to modify it. Wed Mar 11 09:15:08 UTC 2009 Johnny Willemsen * config/bzip2.mpb: * config/lzo1.mpb: Fixed these base projects so that they also work with gnuace Tue Mar 10 13:34:36 UTC 2009 Adam Mitz * modules/GUID.pm: Fixed a bug where 64-bit implementations of Perl would generate duplicate GUID values. (Bugzilla #3614) Mon Mar 9 07:04:08 UTC 2009 Johnny Willemsen * config/bzip2.mpb: * config/lzo1.mpb: * config/lzo2.mpb: * config/zlib.mpb: On windows we need some different library names Sat Mar 7 18:55:08 UTC 2009 Johnny Willemsen * config/lzo1.mpb: Added lzo1 base project Sat Feb 28 03:46:19 UTC 2009 James H. Hill * config/pcre.mpb: * config/pcreposix.mpb: Base projects for using PCRE. Tue Feb 24 04:23:34 UTC 2009 William R. Otte * config/xerces.mpb: Added !xerces2, !xerces3 feature to disable xerces dependent builds if neither feature is present. Mon Feb 23 16:03:15 UTC 2009 Johnny Willemsen * config/qt4_qt3support.mpb: Added base project for qt4_qt3support Tue Feb 17 13:17:28 UTC 2009 William R. Otte * config/xerces3.mpb: Removed this file. Wed Feb 11 16:21:48 UTC 2009 William R. Otte * config/global.features: * config/xerces.mpb: Disabled xerces{2,3} by default and removed the requires lines from the xerces features. Thanks to Adam Mitz for pointing this out. Tue Feb 10 20:36:47 UTC 2009 William R. Otte * config/xerces.mpb: Split this base project into two features - xerces2 and xerces3 to allow support for both versions. Mon Jan 19 22:30:47 UTC 2009 James H. Hill * config/iiopnet.mpb: Base project for using IIOP.NET. Mon Jan 12 11:10:09 UTC 2009 Johnny Willemsen * config/nddslib.mpb: Added vc10 Sun Jan 11 17:26:09 UTC 2009 Abdullah Sowayan * config/nddslib.mpb: Minor enhancement. Sun Jan 11 17:21:17 UTC 2009 Abdullah Sowayan * config/nddslib.mpb: Added Visual Studio 2010 (vc10) support Sun Jan 11 17:09:44 UTC 2009 Abdullah Sowayan * config/ndds_ts_defaults.mpb: * config/nddsexe.mpb: * config/nddsexe_with_idl.mpb: * config/nddslib.mpb: * config/nddslib_with_idl.mpb: New files, base projects for using RTI's NDDS C++ DDS implementation. Sat Jan 3 22:02:02 UTC 2009 Steven Stallion * config/erlang.mpb: Updated base project type for erlang projects. Wed Dec 31 23:01:33 UTC 2008 Steven Stallion * config/erlang_otp.mpb: Dropped default -I include from erlang_otp projects. Tue Dec 30 23:23:03 UTC 2008 Steven Stallion * config/erlang.mpb: * config/erlang_otp.mpb: Updated Erlang support. Output is now propertly cleaned when the clean target is called on gnuace platforms. Wed Dec 24 22:20:40 UTC 2008 Steven Stallion * config/erlang.mpb: * config/erlang_otp.mpb: Added support for Erlang. Two new projects are available: erlang, and erlang_otp. erlang provides basic Erlang support, and erlang_otp provides support for projects which use the otp layout. Thu Dec 18 21:39:03 UTC 2008 Chad Elliott * modules/MakeWorkspaceCreator.pm: Fixed a bug with my change yesterday relating to the "bundle" target. * templates/make.net.mpd: Added a strip command to the bundle commands. Thu Dec 18 09:29:36 UTC 2008 James H. Hill * config/xerces3.mpb: Base project for Xerces-C 3.x Tue Dec 16 02:54:55 UTC 2008 Chad Elliott * docs/MPC.sgml: * docs/README: * docs/USAGE: Updated documentation. * modules/Options.pm: Sort project types keeping like types in numerical order. * modules/MakeWorkspaceCreator.pm: * templates/make.net.mpd: * templates/make.net.mpt: Added a bundle target for C# to bundle an executable into a native application. Fri Nov 28 10:55:00 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Don't copy the lib/exe when we need to install them in the current directory Mon Nov 17 10:50:00 UTC 2008 Johnny Willemsen * templates/nmake.mpd: * templates/vc7.mpd: * templates/vc8.mpd: Added escape charachter to MPC_LIB_MODIFIER value Mon Nov 17 08:33:00 UTC 2008 Johnny Willemsen * docs/templates/common.txt: * templates/nmake.mpd: * templates/vc7.mpd: * templates/vc8.mpd: Add macro_for_lib_modifier. Whis template variable is set the vc7/vc8/vc9/vc10/nmake templatess add MPC_LIB_MODIFIER to the compiler flags with the current lib_modifier as value Tue Nov 11 10:40:00 UTC 2008 Johnny Willemsen * config/boost_base.mpd: Use $(BOOST_ROOT)/. again Mon Nov 10 10:45:00 UTC 2008 Johnny Willemsen * config/boost_date_time.mpb: * config/boost_filesystem.mpb: * config/boost_iostreams.mpb: * config/boost_prg_exec_monitor.mpb: * config/boost_program_options.mpb: * config/boost_regex.mpb: * config/boost_serialization.mpb: * config/boost_signals.mpb: * config/boost_system.mpb: * config/boost_test_exec_monitor.mpb: * config/boost_thread.mpb: * config/boost_unit_test_framework.mpb: * config/boost_wave.mpb: * config/gacutil.mpb: * config/mpich.mpb: * config/odbc.mpb: * config/openssl.mpb: * config/splicelib.mpb: * config/sqlite3.mpb: * config/swig_perl.mpb: * config/xerces.mpb: * docs/README: * docs/USAGE: * modules/VC10ProjectCreator.pm: * modules/VC10WorkspaceCreator.pm: Added Visual Studio 2010 (vc10) support Fri Nov 7 18:39:00 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: * templates/wb26wrproject.mpd: Improved standard build support Fri Nov 7 13:00:00 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: The OBJECTS variable is dependent on the project name Thu Nov 6 18:41:58 UTC 2008 Abdullah Sowayan * templates/wb26wrmakefile.mpd: Fixed pre_build rule by using SUB_OBJECTS instead of OBJECTS_example. Thanks to Laszlo Morocz * config/splice_ts_defaults.mpb: * config/spliceexe.mpb: * config/spliceexe_with_idl.mpb: * config/splicelib.mpb: * config/splicelib_with_idl.mpb: New files, base projects for using PrismTech's OpenSplice C++ DDS implementation. Currently, the files are specialized for using OpenSplice integrated with a CORBA implementation, and assume that OpenSplice's custom library for this purpose (in $OSPL_HOME/custom_lib/ccpp) has been compiled after installation. Thu Nov 6 10:54:00 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: * templates/wb26wrproject.mpd: Put all object names in a file and pass these to the Librarian to prevent a long command when a lot of objects are linked together Tue Nov 4 10:01:00 UTC 2008 Johnny Willemsen * templates/bmake.mpd: Reverted change of yesterday, breaks other things * config/boost_base.mpd: Use $(BOOST_ROOT) instead of $(BOOST_ROOT)/., it confused CodeGear C++ Mon Nov 3 21:50:41 UTC 2008 James H. Hill * config/sqlite3.mpb: Added a 'requires' statement to the base project. Mon Nov 3 19:51:00 UTC 2008 Johnny Willemsen * templates/bmake.mpd: Use '' around include paths so that we can handle directories with spaces in the name Sun Oct 26 17:09:42 UTC 2008 James H. Hill * config/sqlite3.mpb: Base project for using SQLite. For Windows-based projects, you will need to use LIB to generate the import library for the .dll. Thu Oct 23 13:01:00 UTC 2008 Johnny Willemsen * templates/bmake.mpd: Don't print all clean commands on the console Fri Oct 17 19:07:00 UTC 2008 Johnny Willemsen * modules/BCB2009ProjectCreator.pm * modules/BCB2009WorkspaceCreator.pm * templates/bcb2009.mpd * templates/bcb2009dll.mpt * templates/bcb2009exe.mpt New generator for C++ Builder 2009 * templates/bcb2007.mpd Fixed bug in resource_file generation Wed Oct 15 15:03:00 UTC 2008 Johnny Willemsen * templates/vc8platforms.mpt: SuperSonic also uses unicode * config/openssl.mpb: * config/xerces.mpb: Removed reference to borland template which has been removed * config/qt3.mpb: Added this file. Just derived on qt but makes it easier to explicitly derive from qt3 or qt4 Tue Oct 14 11:47:00 UTC 2008 Johnny Willemsen * templates/vc8platforms.mpt: Updated SuperSonic SDK settings Fri Oct 10 08:58:00 UTC 2008 Johnny Willemsen * templates/vc8platforms.mpt: Add iphlpapi to WinCE6 Thu Oct 9 15:14:00 UTC 2008 Johnny Willemsen * templates/vc8platforms.mpt: Define UNDER_CE as $(CEVER) with WinCE6 Thu Oct 9 09:28:00 UTC 2008 Johnny Willemsen * templates/vc8platforms.mpt: Added Windows Mobile 6 Professional SDK (ARMV4I) Tue Oct 7 14:08:00 UTC 2008 Johnny Willemsen Revert change below, doesn't work as expected Tue Oct 7 13:55:00 UTC 2008 Johnny Willemsen * templates/nmakedll.mpt: * templates/nmakeexe.mpt: Include vc8platforms so that we can easily generate nmake projects for WinCE platforms Tue Oct 7 13:55:00 UTC 2008 Johnny Willemsen * templates/nmakedll.mpt: * templates/nmakeexe.mpt: Include vc8platforms so that we can easily generate nmake projects for WinCE platforms * templates/vc8platforms.mpt: Added new WinCE mobile platform Sat Oct 4 20:52:22 UTC 2008 Chad Elliott * config/qt.mpb: Added support for building 64-bit. * modules/ProjectCreator.pm: Fixed a bug where Source_File scoped specific variable setting was broken for any language but C++. * templates/make.net.mpd: Added macro settings for cat, cp, mv and /dev/null. Mon Sep 29 13:34:00 UTC 2008 Johnny Willemsen * templates/bmake.mpd: * templates/bmakecommon.mpt: Added a unicode modifier so that the libs do get a u in the name when we build with unicode Wed Sep 17 02:40:00 UTC 2008 Chad Elliott * docs/README: Fixed a spelling error. * modules/MakeProjectCreator.pm: * templates/make.net.mpd: * templates/make.net.mpt: Changed the default csharp compiler to gmcs and added support for the libs keyword and the packages template variable. * modules/ProjectCreator.pm: Always write the project if the user has provided a verbatim within the project. Tue Sep 16 21:18:01 UTC 2008 Phil Mesnier * modules/NMakeWorkspaceCreator.pm: * modules/TemplateParser.pm: * modules/VC7WorkspaceCreator.pm: * templates/vc8.mpd: These changes all improve support for building cross-compiled WinCE projects using Visual Studio. This specifically allows for the exclusion of native-only apps, such as TAO_IDL from building and deployment on cross compile targets. Also improves the establishment of the correct WinCE 5 or WinCE 6 entry point and sets the character set flag correctly. Tue Sep 16 08:35:19 UTC 2008 Johnny Willemsen * config/ruby.mpb: New base project for Ruby. * modules/BMakeWorkspaceCreator.pm: Make sure we get unique names when we generate bmake with other project types in one tree * templates/bmakedll.mpt: * templates/bmakedllexe.mpt: * templates/bmakelib.mpt: * templates/bmakelibexe.mpt: Changed extensions to get unique names with the bmake so that we don't try to load a msvc dll when it also exists Mon Sep 15 20:50:19 UTC 2008 Adam Mitz * modules/Driver.pm: Added quotes around 'dynamic_types' in the diagnostic message. Sat Sep 13 15:50:22 UTC 2008 Adam Mitz * modules/Driver.pm: Change a warning to a non-warning diagnostic when a dynamic_types path (from MPC.cfg) can't be found. This is a normal condition when the dynamic_types path is based on an environment variable that may not be set. Fri Sep 12 12:56:15 UTC 2008 Johnny Willemsen Reverted change below, brakes VMS support Tue Sep 9 18:46:15 UTC 2008 Johnny Willemsen * mwc.pl: * mpc.pl: Use FindBin::RealScript to get the real script name, that also works when we have a symbolic link with a different name to one of these scripts. This fixes bugzilla 3407 Tue Sep 9 18:46:15 UTC 2008 Johnny Willemsen * mwc.pl: * mpc.pl: Use FindBin::RealScript to get the real script name, that also works when we have a symbolic link with a different name to one of these scripts. This fixes bugzilla 3407 Fri Aug 22 07:04:17 UTC 2008 Johnny Willemsen * mwc.pl: * mpc.pl: Use RealBin to get the location of this script, that gives the real location also in case we use a symbolic link to these scripts. Wed Aug 20 19:19:17 UTC 2008 Johnny Willemsen * devtools/document_template.pl: * devtools/highlight_template.pl: Added missing shebang lines to fix rpm packaging warnings Wed Aug 20 08:33:17 UTC 2008 Johnny Willemsen * clone_build_tree.pl: * combine_dsw.pl: * create_base.pl: * depgen.pl: * generate_export_header.pl: * mpc.pl: * mwc.pl: * prj_install.pl: * registry.pl: * vs_postclean.pl: Added missing shebang lines to fix rpm packaging warnings Wed Aug 13 19:31:17 UTC 2008 James H. Hill * config/gacutil.mpb: Bug fix where the path of the assembly to register, i.e., the sharedname, was incorrect. This was resolved by using the absolute pathname for the assembly instead of the relative pathname. Wed Jul 30 14:52:28 UTC 2008 Johnny Willemsen * config/lzo2.mbp: Base project for lzo2 compression library Wed Jul 30 14:43:28 UTC 2008 Johnny Willemsen * templates/wb26wrmakefile.mpd: Convert a few environment variables to use / instead of \ Wed Jul 23 10:19:28 UTC 2008 Johnny Willemsen * config/gsl.mpb: Added base project for GNU Scientific Library Fri Jul 18 19:09:10 UTC 2008 Chad Elliott * modules/Driver.pm: * modules/FeatureParser.pm: * modules/ProjectCreator.pm: * modules/VC8ProjectCreator.pm: * modules/WorkspaceCreator.pm: More non-functional code cleanup changes. Fri Jul 18 18:22:41 UTC 2008 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug with the 'output_basename' template variable. For Windows based project types, the input file used back-slashes and taking basename() of that sort of text on UNIX will not result in the expected value. We must ensure that the text passed to basename() always has forward slashes. Fri Jul 18 17:58:58 UTC 2008 Chad Elliott * templates/make.net.mpd: Fixed a bug where TARGETDIR was not set if there was no exeout set and the project was an executable. * templates/automake.mpd: * templates/bmake.mpd: * templates/cccommon.mpt: * templates/nmake.mpd: * templates/vc7.mpd: * templates/vc8vb.mpd: * templates/wb26wrmakefile.mpd: Removed trailing white-space. Fri Jul 18 17:22:56 UTC 2008 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug with the 'output_dirname' template variable. For Windows based project types, the input file used back-slashes and taking dirname() of that sort of text on UNIX will not result in the expected value. We must ensure that the text passed to dirname() always has forward slashes. Fri Jul 18 16:03:52 UTC 2008 Chad Elliott * clone_build_tree.pl: * combine_dsw.pl: * create_base.pl: * prj_install.pl: * registry.pl: * vs_postclean.pl: * devtools/document_template.pl: * devtools/highlight_template.pl: * generate_export_header.pl: * modules/AutomakeProjectCreator.pm: * modules/AutomakeWorkspaceCreator.pm: * modules/BCB2007ProjectCreator.pm: * modules/BCB2007WorkspaceCreator.pm: * modules/BDS4ProjectCreator.pm: * modules/BDS4WorkspaceCreator.pm: * modules/BMakeProjectCreator.pm: * modules/BMakeWorkspaceCreator.pm: * modules/CCProjectCreator.pm: * modules/CCWorkspaceCreator.pm: * modules/ConfigParser.pm: * modules/Creator.pm: * modules/DirectoryManager.pm: * modules/Driver.pm: * modules/EM3ProjectCreator.pm: * modules/EM3WorkspaceCreator.pm: * modules/FeatureParser.pm: * modules/GHSProjectCreator.pm: * modules/GHSWorkspaceCreator.pm: * modules/HTMLProjectCreator.pm: * modules/HTMLWorkspaceCreator.pm: * modules/MPC.pm: * modules/MWC.pm: * modules/MakeProjectBase.pm: * modules/MakeProjectCreator.pm: * modules/MakeWorkspaceBase.pm: * modules/MakeWorkspaceCreator.pm: * modules/NMakeProjectCreator.pm: * modules/NMakeWorkspaceCreator.pm: * modules/Options.pm: * modules/OutputMessage.pm: * modules/Parser.pm: * modules/ProjectCreator.pm: * modules/SLEProjectCreator.pm: * modules/SLEWorkspaceCreator.pm: * modules/StringProcessor.pm: * modules/TemplateInputReader.pm: * modules/TemplateParser.pm: * modules/VC6ProjectCreator.pm: * modules/VC6WorkspaceCreator.pm: * modules/VC71ProjectCreator.pm: * modules/VC71WorkspaceCreator.pm: * modules/VC7ProjectCreator.pm: * modules/VC7WorkspaceCreator.pm: * modules/VC8ProjectCreator.pm: * modules/VC8WorkspaceCreator.pm: * modules/VCProjectBase.pm: * modules/WB26ProjectCreator.pm: * modules/WB26WorkspaceCreator.pm: * modules/WinProjectBase.pm: * modules/WinWorkspaceBase.pm: * modules/WorkspaceCreator.pm: * modules/WorkspaceHelper.pm: * modules/XMLProjectBase.pm: Cleaned up the code and added comments. There were no functional changes made. Thu Jul 17 15:10:48 UTC 2008 Chad Elliott * modules/ProjectCreator.pm: We need to pass the 'commandflags' setting to the command helper, not the hash map containing all of the type settings. Thu Jul 17 13:50:33 UTC 2008 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug where a command helper returns output files for a particular component type and file, but they were not taken into account within the project. Also, fixed another bug relating to the group determiniation of automatically added files. In doing so, the components for other component types were being defined but set to an empty set which was causing problems with automatically adding file to these components. Wed Jul 16 16:11:33 UTC 2008 Chad Elliott * modules/CommandHelper.pm: Fixed a comment. * modules/ProjectCreator.pm: Delay replacing <%...%> that contain project keywords until they are used by the template. Doing this allows the values to be used regardless of the order in which keywords are processed within the project. Tue Jul 15 16:08:40 UTC 2008 Chad Elliott * modules/CommandHelper.pm: Extended the interface to allow the helper to provide "tied" custom files. * modules/ProjectCreator.pm: Made the following changes: 1) Added an optimization to generated_source_listed() to avoid attempting to add custom generated files if they couldn't possibly be generated. 2) Added the ability for a command helper to "tie" files together so that they are processed closely together. 3) Fixed a bug where an output file could end up being listed more than once in the custom output files value. Fri Jul 11 18:13:36 UTC 2008 Adam Mitz * vs_postclean.pl: " becomes ", not '. Fri Jul 11 15:18:27 UTC 2008 Adam Mitz * docs/README: Cleaned up some typos (stray semicolons) * vs_postclean.pl: Restore current directory after changing it. Translate &, etc. Added support for solutions, all referenced projects will be cleaned. Fri Jul 11 14:56:44 UTC 2008 Chad Elliott * docs/README: * modules/ProjectCreator.pm: Added a pseudo template variable, rmdir, which will be defined depending upon the project type. It will be 'rmdir /s/q' on Windows and 'rm -rf' on UNIX. * modules/AutomakeWorkspaceCreator.pm: Fixed a bug where the configure.ac.Makefiles did not contain the correct names if the -name_modifier option was used. * modules/WorkspaceCreator.pm: Reduced op code count. Fri Jul 11 14:30:53 UTC 2008 Chad Elliott * docs/README: * modules/ProjectCreator.pm: Added a pseudo template variable, slash, which will be defined depending upon the project type. * templates/make.net.mpt: * templates/makedll.mpt: Rely on the slash psuedo template variable instead of defining one in these template input files. Fri Jul 11 11:10:00 UTC 2008 Simon Massey * templates/make.net.mpt: Added dollar-Id-dollar to appease a non-MPC related script that, for some reason, insists on applying it's influence on MPC. Thu Jul 10 22:34:12 UTC 2008 Chad Elliott * vs_postclean.pl: Added a script to perform the postclean step for Visual Studio projects. Thu Jul 10 19:03:14 UTC 2008 Chad Elliott * modules/Depgen/DependencyEditor.pm: * modules/Depgen/DependencyGenerator.pm: * modules/Depgen/DependencyWriter.pm: * modules/Depgen/DependencyWriterFactory.pm: * modules/Depgen/Driver.pm: * modules/Depgen/MakeDependencyWriter.pm: * modules/Depgen/MakeObjectGenerator.pm: * modules/Depgen/NMakeDependencyWriter.pm: * modules/Depgen/NMakeObjectGenerator.pm: * modules/Depgen/ObjectGenerator.pm: * modules/Depgen/ObjectGeneratorFactory.pm: * modules/Depgen/Preprocessor.pm: Cleaned up the code and reduced op code count. * templates/vc7.mpd: * templates/vc8.mpd: Added a VCPostCleanEventTool, which doesn't exist in Visual Studio, to hold the 'postclean' settings. This is mainly here to enable another script to come along and perform the postclean function. Thu Jul 10 18:28:33 UTC 2008 Chad Elliott * docs/README: * modules/ProjectCreator.pm: Added a new feature, pre_dirname, which is similar to pre_filename except that the value is prepended to the output directory for generated files. If a separate directory is desired, the pre_dirname setting should end in a slash. Thu Jul 10 15:28:50 UTC 2008 Chad Elliott * devtools/document_template.pl: Fixed a bug where template variables used within template functions were ignored. * docs/README: * modules/ProjectCreator.pm: Added the ability to utilize project settings within the Define_Custom command, commandflags, dependent, output_option, and postcommand settings. Thu Jul 10 14:29:44 UTC 2008 Chad Elliott * modules/MakeProjectCreator.pm: * templates/make.net.mpd: * templates/make.net.mpt: * docs/templates/make.net.txt: Added support for compiling C# code using Mono. * modules/Creator.pm: * modules/ProjectCreator.pm: * modules/StringProcessor.pm: * modules/TemplateParser.pm: * modules/VC9ProjectCreator.pm: * modules/VC9WorkspaceCreator.pm: Decreased op code count. Wed Jul 9 13:46:02 UTC 2008 Chad Elliott * modules/AutomakeProjectCreator.pm: * modules/MakeProjectBase.pm: * modules/Parser.pm: Reduce op code count. * modules/CommandHelper.pm: Added a debug message to assist users in figuring out why their helper isn't being picked up. * modules/Creator.pm: Modified recursive_directory_list() to skip .svn and CVS directories. * modules/ProjectCreator.pm: Fixed a very old and incorrect assumption that output file names generated as part of a custom definition had to be longer than the length of the input file name. Tue Jul 8 15:35:29 UTC 2008 Steve Huston * templates/vc8.mpd: Allow a project to be a "make output" type using the VCNMakeTool section instead of the usual compile, link, etc. sections. This allows one to drive nmake-type projects from a VC project. Also, enable setting the DebugInformationFormat even when doing an optimize/Release build. Thanks to Kelly Hickel for contributing these. Tue Jul 8 13:09:22 UTC 2008 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug in my change from Thu Jul 3 11:46:23 UTC 2008. Files were not being automatically added when they didn't exist on the file system. Mon Jul 7 17:00:33 UTC 2008 Chad Elliott * docs/README: * modules/ProjectCreator.pm: MPC had always assumed that output files went into the same directory as the input file (unless specified otherwise through gendir). Now, in the Define_Custom for the command, this assumption can be modified. If 'output_follows_input' is set to 0, it will assume that output files go into the same directory as the project (unless specified otherwise through gendir). Mon Jul 7 13:10:46 UTC 2008 Chad Elliott * modules/ProjectCreator.pm: Modified the behavior of adding to prebuild, postbuild, and postclean. Values that are added are now separated via the command separator for the project type. This will assure that multiple commands are executed separately (and unconditionally). Thu Jul 3 16:36:30 UTC 2008 Chad Elliott * docs/README: * modules/Creator.pm: * modules/ProjectCreator.pm: Added a new keyword, postclean, which is similar to postbuild except that it is executed during the realclean target. * templates/bmake.mpd: * templates/html.mpd: * templates/make.mpd: * templates/nmake.mpd: Added the use of postclean. Thu Jul 3 14:49:52 UTC 2008 Chad Elliott * modules/ProjectCreator.pm: For the previous change to generate_default_components(), we only need to do this if the list of component tags was not provided to the method. Thu Jul 3 11:46:23 UTC 2008 Chad Elliott * modules/ProjectCreator.pm: Fixed an issue where a chain of three or more Custom_Define's would not have the right default input/output. Wed Jul 2 16:35:22 UTC 2008 Chad Elliott * modules/CommandHelper.pm: * modules/ProjectCreator.pm: Modified the helper to be keyed off of the define custom name instead of the define custom command name. Wed Jul 2 14:04:39 UTC 2008 Chad Elliott * modules/CommandHelper.pm: * modules/ProjectCreator.pm: Added a command helper that can be dynamically loaded to assist the project creator in determining which files will be generated by a command. This is useful when the output of a file can not be represented by the usual Define_Custom syntax. Mon Jun 30 14:55:51 UTC 2008 Chad Elliott * modules/StringProcessor.pm: Added a simple fgrep function that will find a string in an array reference. * modules/ProjectCreator.pm: Fixed a bug where custom defines that generate output that can be used as automatic input to other custom defines did not work properly. Now, they are automatically added when possible. Fri Jun 27 12:59:39 UTC 2008 Chad Elliott * config/ixml.mpb: * config/upnp.mpb: Added base projects for use with the open source project Linux SDK for UPnP Devices. * docs/README: * modules/ProjectCreator.pm: Split the functionality of the 'automatic' keyword into to two. 'automatic_in' now specifies that input files are automatically added and 'automatic_out' specifies that generated output files are automatically added to the project. These both default to true as 'automatic' did. 'automatic' is still accepted, but deprecated. Wed Jun 25 21:38:16 UTC 2008 Adam Mitz * docs/README: Documented the following changes. * modules/ProjectCreator.pm: * modules/VC7ProjectCreator.pm: * modules/WinProjectBase.pm: Added the <%cmdsep%> pseudovariable that can be used in prebuild, postbuild, and postcommand. It works like <%and%> and <%or%> but it unconditionally runs the right-hand side command. For postcommand, added <%input_dirname%> and <%output_dirname%> which work like their <%*_basename%> counterparts but return the directory portion of the file name. Thu Jun 19 01:27:55 UTC 2008 James H. Hill * config/boost_system.mpb: Base project for using the Boost system library. Tue Jun 17 17:16:07 UTC 2008 Chad Elliott * docs/templates/make.txt: Document the 'depgen_flags' template variable. * combine_dsw.pl: * create_base.pl: * depgen.pl: * generate_export_header.pl: * mpc.pl: * mwc.pl: * prj_install.pl: * registry.pl: * modules/ConfigParser.pm: * modules/Creator.pm: * modules/DirectoryManager.pm: * modules/Driver.pm: * modules/FeatureParser.pm: * modules/GUID.pm: * modules/MakeWorkspaceBase.pm: * modules/Options.pm: * modules/OutputMessage.pm: * modules/Parser.pm: * modules/ProjectCreator.pm: * modules/StringProcessor.pm: * modules/TemplateInputReader.pm: * modules/TemplateParser.pm: * modules/VCProjectBase.pm: * modules/Version.pm: * modules/WinProjectBase.pm: * modules/WinWorkspaceBase.pm: * modules/WorkspaceCreator.pm: * modules/WorkspaceHelper.pm: Removed unnecessary parenthesis around variable declarations. This provides a very minor performance increase due to reduced perl op codes. Tue Jun 10 14:45:18 UTC 2008 Adam Mitz * templates/make.mpd: * templates/makedll.mpt: Enhanced support for MinGW with "-type make". Fri May 30 15:54:22 UTC 2008 Chad Elliott * MPC version 3.6.0 released. Local Variables: mode: change-log add-log-time-format: (lambda () (progn (setq tz (getenv TZ)) (set-time-zone-rule UTC) (setq time (format-time-string %a %b %e %H:%M:%S %Z %Y (current-time))) (set-time-zone-rule tz) time)) indent-tabs-mode: nil End: ace-6.4.5+dfsg.orig/MPC/history/ChangeLog-3_20000644000175000017500000020614713154167361016554 0ustar tggtggMon Aug 22 07:11:37 2005 Chad Elliott * prj_install.pl: Added options to override the installation location for a particular tag. * templates/make.mpd: * templates/makedll.mpt: Added support for the GHS Integrity OS. Fri Aug 12 12:30:19 2005 Chad Elliott * README: * modules/FeatureParser.pm: * modules/ProjectCreator.pm: Added a new type of feature file that is specific to the project type. If a file of the form .features is located in the config directory, it is read after global.features but before the file specified by -feature_file (if any). See the README for more details. Fri Aug 12 11:44:23 2005 Chad Elliott * templates/make.mpd: * templates/makedll.mpt: Reworked the way that 64 and 32 bit builds are specified. 64 bit is still the default, however to build 32 bit requires that the user set the template variable build64bit to empty. Thu Aug 11 13:30:07 2005 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug where a directory used as input for a custom file type would not result in any input files when automatic is set to zero. Thu Aug 11 06:42:33 2005 Chad Elliott * README: Updated the Defaulting Behavior section. * USAGE: * modules/Options.pm: Fixed poorly worded portions of the usage. * clone_build_tree.pl: Added an option to link build related files (Makefile, .dsw, .etc). * combine_dsw.pl: Fixed a spelling error. * modules/AutomakeWorkspaceCreator.pm: Added calls for modifying the library path with the WorkspaceHelper. * modules/Creator.pm: Fixed a bug where using * in the 'after' setting wouldn't always be expanded. * modules/Driver.pm: The minimum version of perl needs to be 5.6 since File::Spec::canonpath is used in Options.pm. * modules/ProjectCreator.pm: * modules/WorkspaceCreator.pm: Only call fill_type_name if the name has a * in it. * modules/WorkspaceHelper.pm: Added the hooks for modifying the library path. * templates/automake.mpd: Cosmetic change for spacing. Mon Jul 18 10:26:15 2005 Chad Elliott * modules/ProjectCreator.pm: Ignore whitespace when excluding files. Also, fixed an issue with setting sharedname to empty and not setting staticname. It should have defaulted the staticname and leave sharedname emtpy. * modules/WorkspaceCreator.pm: Ignore whitespace when negating project types. * templates/nmake.mpd: Fixed a bug in this template where the OUTDIR was not correctly set to 'libout' in static projects. Mon Jul 11 13:26:52 2005 Chad Elliott * templates/nmakedll.mpt: * templates/nmakeexe.mpt: Switch from /GX to /EHs (which is supported by vc6) to avoid build warnings using the Visual Studio 8 compiler with nmake. * templates/vc8.mpd: Changed the default character set to 0 instead of 1. This is now the same as the vc7 template. Fri Jul 8 11:47:37 2005 Chad Elliott * modules/ProjectCreator.pm: Modified code using a hash reference within a hash reference to work correctly with Perl 5.6.1. Thu Jul 7 14:05:44 2005 Chad Elliott * modules/MakeProjectBase.pm: * modules/ProjectCreator.pm: Factor code out of MakeProjectBase into ProjectCreator which will allow for less code in future Make based modules. * templates/make.mpd: Modified to generate Makefiles that do not have lines that end in spaces. Wed Jul 6 13:00:22 2005 Chad Elliott * modules/Options.pm: Support - or -- as option specifiers. * templates/automake.mpd: Removed grouped file support as it can not work correctly with this project type. Since all of the project files for a single directory are combined into one, the same group names could be used (in different projects) and cause conflicts once they are combined. Wed Jul 6 10:33:21 2005 Chad Elliott * modules/ProjectCreator.pm: Corrected negated wildcard matching where the pattern contained a directory name. The negated wildcard was always being applied to the files in the current directory. Wed Jul 6 08:25:25 2005 Chad Elliott * README: Corrected some minor documentation mistakes. * modules/ProjectCreator.pm: Added support for automatic grouping of generated files based on the group name of the custom input file. * templates/bmake.mpd: Added Codeguard support. Tue Jul 5 10:25:18 2005 Chad Elliott * templates/automake.mpd: Added macros and compile_flags to outter if check to allow these to be part of the CPPFLAGS (if none of the other variables in the if are not defined). Tue Jul 5 07:23:07 2005 Chad Elliott * templates/vc7.mpd: * templates/vc8.mpd: Correctly support the 'custom_only' keyword by utilizing the "Utility" project type. This project type does not perform anything but custom build rules which is exactly what we needed. Sat Jul 2 10:57:13 2005 Chad Elliott * modules/GHSProjectCreator.pm: Corrected a problem with determining the reltop value. * modules/ProjectCreator.pm: Fixed specific and conditional where multiple negated project types are used. It would only look at the first type and decide that the current project type wasn't negated. When '!' was combined with a wildcard, MPC wasn't adding the files that didn't match if the user had specified at least one file (in addition to the negated wildcard). * templates/bmake.mpd: * templates/make.mpd: Moved the local marker to a location after the all target. * templates/ghs.mpd: Fixed custom build support. * templates/nmake.mpd: Correctly support the use of dllout. Fri Jul 1 10:03:12 UTC 2005 Johnny Willemsen * templates/bmake.mpd: Added support for StackReserveSize and StackCommitSize template variables. Wed Jun 29 12:15:46 2005 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug where mapped keywords within the scope of a 'specific' section would not be processed. * templates/ghs.mpd: Fixed the dependency and pch_postrule sections. Wed Jun 29 06:55:10 2005 Chad Elliott * README: Modified the documentation for 'specific' and 'conditional'. * modules/WorkspaceCreator.pm: Remove ./ from the beginning of located files and directories to ensure that workspaces that change directory back to the original go back to the correct directory. * templates/make.mpd: Only create the $(LTARGETDIR) rule if the project is not an exe. Tue Jun 28 11:33:07 2005 J.T. Conklin * templates/automake.mpd: Sort custom type's output files so output is easier to inspect when hand-tweaking MPC output. Add Pkgconfig_Files output to CLEANFILES. Tue Jun 28 07:39:34 2005 Ming Xiong * config/ziparchive.mpb Added a .mpb file to support ziparchive feature which is needed by DAnCE/ComponentPackager. Tue Jun 28 07:20:08 2005 Chad Elliott * README: * modules/ProjectCreator.pm: Added the functionality to negate the project type in 'specific' and 'conditional' clauses. Tue Jun 28 06:31:26 2005 Chad Elliott * config/zlib.mpb: * config/zzip.mpb: Changed to use 'libs' instead of lit_libs for some project types. Mon Jun 27 07:25:08 2005 Chad Elliott * modules/ProjectCreator.pm: My previous checkin uncovered a serious bug in MPC dealing with features that weren't enabled and used the specific/else construct. Mon Jun 27 06:28:54 2005 Chad Elliott * config/zzip.mpb: Developers insist on naming libraries differently for Windows. So, for UNIX related projects we use zzip and for all others we use zziplib. Fri Jun 24 12:47:06 2005 Chad Elliott * PROBLEM-REPORT-FORM: Adding a problem report form with requirements for submitting a support request. * modules/EM3ProjectCreator.pm: * modules/VC6ProjectCreator.pm: Removing the implementation of the get_template method since I have renamed the templates for these project types. * modules/MakeWorkspaceCreator.pm: Removed the setting of PWD since it isn't used in the project makefiles anymore. * templates/make.mpd: Fixed a problem where the output directory wouldn't be created for exe or library targets if it didn't exist. * templates/em3.mpd: * templates/vc6.mpd: * templates/em3vcp.mpd: * templates/vc6dsp.mpd: Renamed vc6dsp.mpd to vc6.mpd and em3vcp.mpd to em3.mpd. Fri Jun 24 08:39:56 2005 Chad Elliott * templates/em3vcp.mpd: * templates/em3vcpdll.mpt: * templates/em3vcpdllexe.mpt: * templates/em3vcplib.mpt: * templates/em3vcplibexe.mpt: * templates/nmake.mpd: * templates/vc6dsp.mpd: Added support for setting the stack size. Use StackReserveSize and StackCommitSize template variables to set this. * templates/make.mpd: Continue processing the 'depend' target even if one depend fails. Thu Jun 23 16:24:16 2005 Justin Michel * templates/vc7.mpd: Added support for setting the stack size. This was already in vc8.mpd. Thu Jun 23 13:44:58 2005 Chad Elliott * templates/make.mpd: * templates/makedll.mpt: Simplified the generic make template and corrected support for IRIX, MinGW, and Mac OS X. Wed Jun 22 12:43:34 2005 Chad Elliott * modules/AutomakeProjectCreator.pm: * modules/BMakeProjectCreator.pm: * modules/CBXProjectCreator.pm: * modules/GHSProjectCreator.pm: * modules/HTMLProjectCreator.pm: * modules/MakeProjectCreator.pm: * modules/NMakeProjectCreator.pm: * modules/ProjectCreator.pm: * modules/SLEProjectCreator.pm: Implement the get_template method in ProjectCreator to return the type name. This allows me to remove the get_template method from many of the sub classes of ProjectCreator (but not all). * templates/em3vcp.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: * templates/vc8.mpd: Fixed a bug where a custom command that generates multiple output files and defines the output_option would not have the right build rules. Wed Jun 22 10:04:44 2005 Chad Elliott * modules/Options.pm: Convert back slashes to slashes after calling canonpath(). On Windows, it converts slashes to backslashes which fouls up generation of non-Windows based project types. * modules/ProjectCreator.pm: Remove extra spaces when processing '<<' and '>>'. Wed Jun 22 07:43:33 2005 Chad Elliott * modules/ProjectCreator.pm: When adding generated files (and no generated file is listed), only add those that match the default extension. * modules/TemplateParser.pm: When generating static projects, override the template settings for the type_is_static, need_staticflags, type_is_dynamic, type_is_binary variables. * templates/nmake.mpd: Fixed a bug where a custom command that generates multiple output files and defines the output_option would not have the right build rules. * templates/ghs.mpd: * templates/vc8.mpd: Support the compile_flags template variable. Tue Jun 21 11:55:38 2005 Chad Elliott * modules/BMakeProjectCreator.pm: Double ampersand, &&, means something special to Borland Make. So, we override the get_and_symbol method to return a string that Borland Make can handle. * modules/BMakeWorkspaceCreator.pm: Added -$(MAKEFLAGS) to each sub-make call so that options passed to the original make are propagated down. Thanks to Johnny for informing me about this. * modules/MakeProjectBase.pm: Added an environment variable *for testing purposes only* that forces Make based projects to be sorted. * modules/ProjectCreator.pm: If we are to sort files, the output files (used with custom_types in templates) need to be sorted. * modules/TemplateParser.pm: Attempt to preserve the original order of template variables when the values of the template variables refer to scoped template variables. This isn't always possible, but in most cases it is. * prj_install.pl: Added pidl_files to the list of default installed files. * templates/bmake.mpd: * templates/bmakecommon.mpt: Support multiple compilers (cbx and bcc) from within a single makefile. * templates/em3vcpdll.mpt: * templates/em3vcpdllexe.mpt: * templates/em3vcplib.mpt: * templates/em3vcplibexe.mpt: * templates/nmakedll.mpt: * templates/nmakeexe.mpt: * templates/vc6dspdll.mpt: * templates/vc6dspdllexe.mpt: * templates/vc6dsplib.mpt: * templates/vc6dsplibexe.mpt: * templates/vc7csharp.mpt: * templates/vc7dll.mpt: * templates/vc7exe.mpt: * templates/vc7lib.mpt: * templates/vc7libexe.mpt: * templates/vc7vb.mpt: * templates/vc8dll.mpt: * templates/vc8exe.mpt: * templates/vc8lib.mpt: * templates/vc8libexe.mpt: Alphabetically sort 'configurations' and 'platforms'. Mon Jun 20 20:53:50 2005 Chad Elliott * modules/ProjectCreator.pm: Provide better error messages for certain situations. Fixed a bug where setting sharedname to empty did not convert the project to a static library (when staticname was set). Always do a case insensitive search for resource files. Fixed a bug where generated files wouldn't be added correctly if some source files existed in the directory. Fixed a bug where the 'postcommand' wouldn't be applied if there was more than one output file per input file. * templates/automake.mpd: Fixed a bug where gendir wasn't applied correctly to output files. * modules/TemplateParser.pm: * templates/bmake.mpd: * templates/em3vcp.mpd: * templates/ghs.mpd: * templates/make.mpd: * templates/nmake.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: * templates/vc7csharp.mpd: * templates/vc7vb.mpd: * templates/vc8.mpd: Fixed a bug where the 'postcommand' wouldn't be applied if there was more than one output file per input file. Also, correctly support static projects that come from setting sharedname to empty. Thu Jun 16 10:21:09 2005 Chad Elliott * templates/bmake.mpd: * templates/em3vcp.mpd: * templates/nmake.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: * templates/vc8.mpd: Upon Johnny Willemsen's suggestion, I have reversed the order of libraries for Windows based project types. This helps ACE and TAO with static initialization issues. Wed Jun 15 07:33:24 2005 Chad Elliott * modules/ProjectCreator.pm (remove_duplicate_addition): In order to ensure that duplicates are correctly removed, we need to make sure that addition values have the "right" slashes. Thanks to Johnny Willemsen for bringing this to my attention. Tue Jun 14 14:21:16 2005 Justin Michel * modules/TemplateParser.pm: Chad added a new function to make it easier to compare strings for equality. * templates/vc7.mpd: * templates/vc8.mpd: Updated to put default_group files into the top level group. For example, any source_files that aren't part of a specified group will now be placed directly under source_files in the ide. Tue Jun 14 12:30:16 2005 Chad Elliott * modules/WorkspaceCreator.pm: Fixed a bug where excluding based on type caused those that weren't excluded to be added to the workspace (which is not the function of exclude). Tue Jun 14 07:15:09 2005 Chad Elliott * config/global.mpb: Set libpaths to '.' since libout is set to '.' as well. * modules/Creator.pm: * modules/WorkspaceCreator.pm: Corrected support for scoping and exclusion from within an aggregated workspace. Fri Jun 10 06:36:02 2005 Chad Elliott * USAGE: * modules/OutputMessage.pm: * modules/Parser.pm: Added a 'details' logging message and switched the "Skipping" message to it. * modules/ProjectCreator.pm: Fixed a bug with the '<<' and '>>' operators and Windows based projects that have custom input files within subdirectories. Also, fixed a bug where exe's and lib's that have spaces in the names were not escaped even if a project type implemented the escape_spaces() method. * templates/make.mpd: Fixed support for spaces in file names. * templates/makedll.mpt: Changed the ln setting for mingw32 to 'move /y' instead of 'mv'. Tue May 31 15:45:44 2005 Chad Elliott * modules/TemplateParser.pm: Support using flag_overrides() within the context of a foreach. * templates/em3vcp.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: * templates/vc8.mpd: Interpret flag_overrides of the custom_types->dependent setting as an array instead of a string. This makes things consistent with non-overridden values of dependent. Tue May 31 09:46:49 2005 Chad Elliott * templates/vc7.mpd: * templates/vc8.mpd: Exclude all documentation files from the build. Certain extensions are automatically excluded, but that isn't good enough to cover all possible documentation extensions. Fri May 27 10:24:25 2005 Chad Elliott * templates/em3vcp.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: * templates/vc8.mpd: Interpret custom_types->dependent as an array instead of a string. This is completely backward compatible since a string is just a one element array in the template language. Fri May 27 07:56:11 2005 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug where explicitly specified output files would get mixed with implicit output files if an input file were shared by two different custom types. * modules/TemplateParser.pm: Fixed a bug where flag_overrides() functions that were parameters to functions within an if would not be processed correctly. * templates/em3vcp.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: * templates/vc8.mpd: When setting up additional dependencies through the dependent setting of custom types, don't append .exe if the command is a perl script. This is not a generic solution, but most of the time commands are either an exe or a perl script. Tue May 24 13:57:42 2005 Chad Elliott * modules/AutomakeProjectCreator.pm: Removed unnecessary sort method. It implemented the default. * modules/GHSProjectCreator.pm: Call escape_regex_special() before using the starting directory as a regular expression. * templates/bmake.mpd: * templates/bmakedll.mpt: * templates/bmakedllexe.mpt: * templates/bmakelibexe.mpt: Support Unicode builds by checking the UNICODE make/environment variable. Tue May 17 13:54:12 2005 Justin Michel * templates/vc7.mpd: Default to enabling wchar_t as a native type. This should now work correctly given my recent changes to ACE. * templates/vc8.mpd: Remove an extra "/>" that was inadvertently left in the template. Strangely this did not cause an error when opening the solution in the IDE, but only showed up in the nightly builds. Tue May 17 12:40:35 2005 Chad Elliott * modules/WinProjectBase.pm: Check for paths with drive letters during dirname validation. * templates/em3vcp.mpd: * templates/vc6dsp.mpd: Brought over the duplicate_index changes from vc7.mpd. Tue May 17 11:47:45 2005 Chad Elliott * modules/ProjectCreator.pm: * modules/TemplateParser.pm: Fixed a bug where a template variable default would not be used if the user set the template variable to empty. Tue May 17 08:46:33 2005 Chad Elliott * clone_build_tree.pl: Avoid linking patch reject files. * templates/vc8.mpd: 1) Added vcprojecttype default similar to vc7.mpd. 2) Changed all occurrances of Optimization to optimize. 3) Added the 'dependencies' settings as was done for vc7.mpd. * templates/vc8dll.mpt: Changed all occurrances of Optimization to optimize. Tue May 17 06:48:59 2005 Chad Elliott * modules/VC7ProjectCreator.pm: * templates/vc7.mpd: After suggesting a simplification to Johnny for the previous change, I relized that it could be simplified even more by setting the default in the mpd and not modifying any code. * templates/make.mpd: Added support for source files with spaces in the name. * templates/nmake.mpd: Added support for 'install' settings with spaces in the name. Mon May 16 18:47:12 UTC 2005 Johnny Willemsen * templates/vc7.mpd: * modules/VC7ProjectCreator.pm: For Visual C++ the project type is Visual C++, but the Intel compiler can also be integrated into Visual Studio and then uses the same template but just a different project type. Made it possible to generate a different project type with an Intel C++ geneator we are working on. Mon May 16 11:36:29 2005 Chad Elliott * modules/Driver.pm: Modified the time printout to just print the amount of time taken at the end of each file or project type and then the total time at the end. * modules/ProjectCreator.pm: Do not attempt to use the language setting if it hasn't been set. This only happens when the -recurse option is used with mpc.pl. * modules/TemplateParser.pm: * modules/VC71WorkspaceCreator.pm: * modules/VC7ProjectCreator.pm: * modules/VC7WorkspaceCreator.pm: * modules/VC8ProjectCreator.pm: * modules/VC8WorkspaceCreator.pm: * templates/vc7.mpd: * templates/vc8.mpd: * templates/vc8dll.mpt: * templates/vc8exe.mpt: * templates/vc8lib.mpt: * templates/vc8libexe.mpt: Committing Justin Michel's changes for better support for Visual Studio 8 and streamlining changes for the Visual Studio 7 project files. Mon May 16 06:47:57 2005 Chad Elliott * USAGE: * modules/Parser.pm: Removed the MPC_INFORMATION environment variable and added MPC_LOGGING which can be used to control all aspects of logging (informational, warning and diagnostic). * README: * modules/ProjectCreator.pm: * templates/automake.mpd: * templates/bmake.mpd: * templates/em3vcp.mpd: * templates/ghs.mpd: * templates/make.mpd: * templates/nmake.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: Added a new operator, '<<', to allow user to specify additional dependencies for only custom input files. See the README for more details. Tue Apr 26 11:29:57 2005 Chad Elliott * modules/ProjectCreator.pm: Fixed a bug where when excluded files were listed in Source_Files those that didn't match were no longer being added. Mon Apr 25 10:31:48 2005 Chad Elliott * config/xerces.mpb: Set Debug::xerceslib in addition to xerceslib to ensure that the debug version of xerces is linked into Debug configurations for Visual C++. Linking the optimized version into debug applications has been reported to cause run-time issues. * modules/ProjectCreator.pm: * modules/TemplateParser.pm: Fixed a bug where the scope name of a template variable being expanded from $(...) was not taken into account. Mon Apr 18 13:16:52 2005 Chad Elliott * templates/em3vcp.mpd: Fixed a bug in the implib location. It should have contained the <%machine%> setting in the path. Mon Apr 18 06:56:20 2005 Chad Elliott * templates/nmake.mpd: Updated to work with multiple resource files. Mon Apr 18 10:19:12 UTC 2005 Johnny Willemsen * templates/bmakecommon.mpt: Removed -D_MT, it is ACE specific and not needed anymore in ACE Thu Apr 14 09:07:41 2005 Chad Elliott * modules/ProjectCreator.pm: Changed the option evaluation code to match the option exactly instead of a portion of it. Thu Apr 14 07:27:11 2005 Chad Elliott * modules/AutomakeProjectCreator.pm: Changed the default back to using relative definitions. You must now use -noreldefs if you do not want automatic relative definitions. * modules/ProjectCreator.pm: Support && and || within the 'optional' clause of a Define_Custom. * modules/Creator.pm: * modules/TemplateParser.pm: Support scoped variables which will allow users to modify project and template variables based on foreach values. For example, if you wanted to set 'lit_libs' for only Debug builds with vc6 you could do this: project { specific(vc6) { Debug::lit_libs += foolib } } * templates/nmake.mpd: Use forward slashes in the DEPGEN setting to work with both Active State Perl and Cygwin Perl. Wed Apr 13 07:18:59 2005 Chad Elliott * modules/TemplateParser.pm: Rewrote the tp_dirname() method to use the builtin rindex function instead of character iteration. * templates/nmake.mpd: Simplified this template to use dirname() instead of multiple contains(). Mon Apr 11 08:46:56 2005 Chad Elliott * templates/nmake.mpd: Corrected a bug dealing with source files containing ..\ where the explicit rules did not have the correct path. Fri Apr 8 12:14:02 2005 Chad Elliott * modules/WinProjectBase.pm: Since a directory with ..\ in it will cause the object files to be created outside of the intermediate directory, no Windows based project can have ..\ in the intermediate directory name. * templates/automake.mpd: * templates/automakedll.mpt: Added support for the 'postbuild' setting. Wed Apr 6 06:43:51 2005 Chad Elliott * modules/TemplateParser.pm: Added new template functions, 'ends_with' and 'contains', which work similarly to 'starts_with'. The function names are self explanatory. Mon Apr 4 13:02:59 2005 Chad Elliott * config/xerces.mpb: Change libs to lit_libs to ensure that there are no library decorator issues (especially with static builds). Mon Apr 4 12:27:14 2005 Chad Elliott * modules/TemplateParser.pm: Added a new template function, 'starts_with', that takes two parameters. The first parameter is a template variable and the second is a literal string. If the value of the template variable starts with the literal string, then starts_with evaluates to true. Fri Apr 1 12:39:12 2005 Chad Elliott * templates/em3vcp.mpd: * templates/vc6dsp.mpd: Specify the /implib option to be consistent with the nmake and vc7 templates. This allows the user to control where it goes with the 'libout;' setting. Fri Apr 1 07:30:50 2005 Chad Elliott * README: * modules/ProjectCreator.pm: * modules/TemplateParser.pm: For some project keywords, the project value will be appended to the template input variable of the same name (if there is one). See the "Project Variable and Template Input Variable Interaction" section of the README for more details. * templates/vc7.mpd: Only use 'link_options' if it's set. Thu Mar 31 10:23:39 2005 Chad Elliott * modules/ProjectCreator.pm: If -global is used and the file does not contain a path, we will search the include path for it. Thu Mar 31 06:53:14 2005 Chad Elliott * combine_dsw.pl: Added a new script to combine multiple dsw's into one. * modules/CBXProjectCreator.pm: Inherit from WinProjectBase to pick up the validated_directory method. * modules/VC6ProjectCreator.pm: * modules/WinProjectBase.pm: Moved the validated_directory method out of VC6ProjectCreator and into WinProjectBase. Since $(...) could contain a drive letter, no Windows based project can have $(...) in the intermediate directory name. Tue Mar 29 07:56:08 2005 Chad Elliott * modules/Creator.pm: Fixed a bug in the subtraction code that would remove a portion of an entry if only part of the existing value matched the string being subtracted. * README: * modules/ProjectCreator.pm: * modules/TemplateParser.pm: * templates/bmake.mpd: * templates/em3vcp.mpd: * templates/html.mpd: * templates/make.mpd: * templates/nmake.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: Added support for the new postbuild keyword. * templates/cbxdll.mpt: * templates/cbxexe.mpt: * templates/em3vcpdll.mpt: * templates/em3vcpdllexe.mpt: * templates/em3vcplib.mpt: * templates/em3vcplibexe.mpt: * templates/ghs.mpd: * templates/ghscommon.mpt: * templates/ghsdll.mpt: * templates/ghslib.mpt: * templates/makedll.mpt: * templates/nmakedll.mpt: * templates/nmakeexe.mpt: * templates/sle.mpd: * templates/sledll.mpt: * templates/sleexe.mpt: * templates/unixcommon.mpt: * templates/vc6dspdll.mpt: * templates/vc6dspdllexe.mpt: * templates/vc6dsplib.mpt: * templates/vc6dsplibexe.mpt: * templates/vc7csharp.mpd: * templates/vc7csharp.mpt: * templates/vc7dll.mpt: * templates/vc7exe.mpt: * templates/vc7lib.mpt: * templates/vc7libexe.mpt: * templates/vc7vb.mpt: * templates/windowscommon.mpt: Consistently use the template variables found in unixcommon.mpt and windowscommon.mpt for library prefix and extensions and executable extensions. Tue Mar 29 06:23:03 2005 Chad Elliott * config/xerces.mpb: Account for the many different names that the xerces library can have by using a template variable that can be overridden by the user if necessary. Fri Mar 25 18:37:52 2005 J.T. Conklin * modules/AutomakeWorkspaceCreator.pm: *_HEADERS processing was broken when I added regular expression to match all automake primaries. Fri Mar 25 10:59:10 2005 Chad Elliott * config/xerces.mpb: Changed libs to lit_libs to avoid putting the library decorator on the xerces-c library under windows. Thu Mar 24 08:38:59 2005 Chad Elliott * modules/AutomakeProjectCreator.pm: * modules/MakeProjectCreator.pm: * modules/ProjectCreator.pm: * modules/StringProcessor.pm: * modules/TemplateParser.pm: * templates/automake.mpd: * templates/make.mpd: * templates/nmake.mpd: Added better support for building projects with files that have spaces in the names. Thu Mar 17 08:03:31 2005 Chad Elliott * config/openssl.mpb: Added support for Shining Light Productions prepackaged OpenSSL. * modules/AutomakeProjectCreator.pm: * modules/ProjectCreator.pm: Made it so the automake project type does not perform relative replacement. So, -noreldefs is not necessary for that type anymore. * modules/Creator.pm: * modules/Parser.pm: * modules/TemplateParser.pm: Speed improvements which improve generation times by ~15%. Also, in the template parser, I fixed a bug that allowed an if statement to have multiple else's and removed two deprecated sections of code. Wed Mar 16 22:04:35 2005 J.T. Conklin * modules/AutomakeWorkspaceCreator.pm: Only emit empty primary definition if the first instance seen in the project Makefile.am's is not unconditional. Wed Mar 16 14:44:51 2005 J.T. Conklin * modules/AutomakeWorkspaceCreator.pm: Fix stray assignment that was marking all primaries as "seen". Wed Mar 16 13:59:13 2005 J.T. Conklin * modules/AutomakeWorkspaceCreator.pm: Only emit empty primary definition if it is found in more than one conditional or if it is found in both conditional and unconditional contexts. Fixes unexpected consequences of earlier change to use += instead of = for _MANS, _SCRIPTS, and _HEADERS. Wed Mar 16 12:53:13 2005 J.T. Conklin * templates/automake.mpd: Don't add libraries to _LIBADD for convenience libraries. Wed Mar 16 12:31:52 2005 J.T. Conklin * templates/automake.mpd: Don't add -version-number to LDFLAGS for convenience libraries. Wed Mar 16 10:42:45 2005 J.T. Conklin * templates/automake.mpd: Use += instead of = for _MANS, _SCRIPTS, and _HEADERS. Fri Mar 11 07:56:49 2005 Chad Elliott * templates/nmakeexe.mpt: Debug and Release xecutable were getting the 'staticflags' due to a side effect of the way scoping works in the TemplateParser. The solution is to set 'need_staticflags' to empty in the Release and Debug sections. Fri Mar 11 07:03:04 2005 Chad Elliott * templates/nmake.mpd: Fixed a bug in the intermediate directory for the precompiled header object file. Also, move some targets around such that 'all' is the first target in the generated makefile. Thu Mar 10 21:08:24 2005 J.T. Conklin * modules/AutomakeWorkspaceCreator.pm: Emit the RCS/CVS Id in the boilerplate at the beginning of the workspace Makefile.am in three separate substrings so that it's not expanded each time this file is changed. Thu Mar 10 20:13:58 2005 J.T. Conklin * modules/AutomakeWorkspaceCreator.pm: Scan project Makefile.am's for pkgconfig_DATA, if it is present emit "pkgconfigdir = @libdir@/pkgconfig" at the begining of the workspace Makefile.am. This will help avoid typos like the ACE pkgconfigdir definition in 5.4.4. Wed Mar 9 08:53:39 2005 Chad Elliott * modules/ProjectCreator.pm: Remove duplicate 'macros' when adding or subtracting. * templates/nmake.mpd: * templates/vc6dsp.mpd: Set the defaults for 'optimize_flags' and 'debug_flags' to /O2 and /Ob0 respectively. They can be overridden with 'specific' or the -value_template option. Tue Mar 8 12:57:52 2005 Chad Elliott * templates/em3vcp.mpd: * templates/vc6dsp.mpd: Fixed a bug introduced Fri Mar 4 12:03:48 2005. A different /Fo option is needed for each different configuration. Tue Mar 8 07:21:11 2005 Chad Elliott * modules/ProjectCreator.pm: * modules/TemplateParser.pm: * modules/VC6ProjectCreator.pm: vc6 and em3 do not deal with $(...) correctly when compiling source into an alternate intermediate directory (it doesn't expand $(...) inside the /Fo option). Mon Mar 7 10:01:34 2005 Chad Elliott * README: Documented both changes below. * modules/ProjectCreator.pm: Added a new operator, '>>', to allow user to specify multiple unrelated (file name wise) output files based on a custom input file. * templates/em3vcp.mpd: * templates/ghs.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: If a custom defintion does not have an output extension specified, you can list custom input files, but they will not be compiled or processed. In the above graphical tools they will be listed/displayed and excluded from the build. Fri Mar 4 12:03:48 2005 Chad Elliott * config/boost_regex.mpb: Turn off Windows automatic linking. * config/global.features: * modules/FeatureParser.pm: Fixed the comment about the -features option. * modules/TemplateParser.pm: Added the ability to use 'dirname' in an if statement and 'noextension' and 'normalize' in a foreach statement. * templates/bmake.mpd: * templates/em3vcp.mpd: * templates/nmake.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: Added the ability to have multiple cpp files with the same name (in different directories) in a project. Now, if an input source file has a directory, the object file is placed in a similar directory structure underneath the intermediate file directory. * templates/makedll.mpt: Changed the default for SunCC, aCC, xlC_r and SGICC to 64-bit. Provided a 32-bit version of each of these. Thu Mar 3 12:14:12 UTC 2005 Johnny Willemsen * templates/bmake.mpd: Only use mkdir to create a directory when it not exist yet. Fri Feb 25 08:13:09 2005 Chad Elliott * templates/bmake.mpd: Reworked the realclean target to avoid the long command lines and situations where "del" was invoked with no file name arguments. Thu Feb 24 06:44:30 2005 Chad Elliott * templates/automakedll.mpt: Removed the setting of 'am_version' for two reasons. One, it's not necessary to set the template variable in order to use it in a template anymore. And two, it causes the 'version' conversion in AutomakeProjectCreator.pm never to be used if a user sets 'version' but does not set the 'am_version' template variable. Wed Feb 23 20:36:31 2005 J.T. Conklin * templates/automake.mpd: Remove trailing whitespace after version number if no linkflags were specified. Rename pkgconfigdata_DATA to pkgconfig_DATA. Wed Feb 23 20:34:58 2005 J.T. Conklin * modules/AutomakeWorkspaceCreator.pm: Remove trailing whitespace after project Makefile.am name. Wed Feb 23 19:43:10 2005 J.T. Conklin * modules/AutomakeWorkspaceCreator.pm: Emit extra crlf after null variable definitions. Wed Feb 23 14:05:23 2005 J.T. Conklin * templates/automake.mpd: Revert last change. Multi-line output is more ugly than I thought it would be. Wed Feb 23 13:56:42 2005 J.T. Conklin * templates/automake.mpd: Rework linkflags handling so output is more like what a human might write. * templates/automakedll.mpt: Added am_version definition. Wed Feb 23 15:34:12 2005 Chad Elliott * templates/bmake.mpd: Changed the realclean target to delete files with /q instead of checking for generated files and then deleting them if they exist. In situations where a large number of files are generated, it could have failed because the command was too long. * modules/AutomakeWorkspaceCreator.pm: Generate a configure.ac if one doesn't already exist. * modules/WorkspaceCreator.pm: Remove whitespace only if the dependency is defined and not an empty string. * modules/TemplateParser.pm: * templates/automake.mpd: * templates/bmakelib.mpt: * templates/bmakelibexe.mpt: * templates/cbxdll.mpt: * templates/cbxexe.mpt: * templates/em3vcpdll.mpt: * templates/em3vcpdllexe.mpt: * templates/em3vcplib.mpt: * templates/em3vcplibexe.mpt: * templates/ghs.mpd: * templates/ghsdll.mpt: * templates/ghslib.mpt: * templates/ghslibexe.mpt: * templates/make.mpd: * templates/nmake.mpd: * templates/nmakedll.mpt: * templates/nmakeexe.mpt: * templates/sledll.mpt: * templates/sleexe.mpt: * templates/vc6dspdll.mpt: * templates/vc6dspdllexe.mpt: * templates/vc6dsplib.mpt: * templates/vc6dsplibexe.mpt: * templates/vc7dll.mpt: * templates/vc7exe.mpt: * templates/vc7lib.mpt: * templates/vc7libexe.mpt: Standardized the type_is_static, type_is_dynamic, type_is_binary and need_staticflags template variables and set them from within the TemplateParser so that each mpt does not have to set them. Fri Feb 18 09:43:08 2005 Chad Elliott * README: * modules/ProjectCreator.pm: Added pseudo variables: mkdir, input_basename and output_basename. Thu Feb 17 11:36:22 2005 Chad Elliott * modules/TemplateInputReader.pm: * modules/TemplateParser.pm: In order to avoid conflicts between template hash names and template variable values, template hash names now need to match case-sensitively. Thanks to Thomas Rothfuss for reporting this. Thu Feb 17 10:09:21 2005 Chad Elliott * LICENSE: Corrected a spelling error. * templates/automake.mpd: * templates/make.mpd: * templates/makedll.mpt: * templates/sle.mpd: Added the 'compile_flags' template variable. This variable already exists in other templates. Tue Feb 15 08:29:47 2005 Chad Elliott * templates/bmake.mpd: * templates/bmakedll.mpt: * templates/bmakedllexe.mpt: * templates/bmakelib.mpt: * templates/bmakelibexe.mpt: * templates/em3vcp.mpd: * templates/em3vcpdll.mpt: * templates/em3vcpdllexe.mpt: * templates/em3vcplib.mpt: * templates/em3vcplibexe.mpt: * templates/nmake.mpd: * templates/nmakedll.mpt: * templates/nmakeexe.mpt: * templates/sle.mpd: * templates/sledll.mpt: * templates/sleexe.mpt: * templates/vc6dsp.mpd: * templates/vc6dspdll.mpt: * templates/vc6dspdllexe.mpt: * templates/vc6dsplib.mpt: * templates/vc6dsplibexe.mpt: * templates/vc7.mpd: * templates/vc7dll.mpt: * templates/vc7exe.mpt: * templates/vc7lib.mpt: * templates/vc7libexe.mpt: Renamed the 'use_modifier' template variable to 'use_exe_modifier' which determines if the 'lib_modifier' is added to the end of the executable name. Added the 'use_lib_modifier' template variable which determines is the 'lib_modifier' is added to the end of the library output name. Note that 'lib_modifier' is always added to the input libraries specified in the MPC project keyword 'libs'. Mon Feb 14 16:10:32 2005 Chad Elliott * modules/AutomakeProjectCreator.pm: Removed the implementation of expand_variables_from_template_values to get the default implementation which returns 1. * templates/em3vcp.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: Support spaces in custom input files. Not all project types can support spaces in file names, so use them at your own risk. Sat Feb 12 10:48:29 2005 Chad Elliott * README: * modules/ProjectCreator.pm: Changed attributes of 'dependent' to allow users to use <%...%> pseudo variables. Also fixed a bug where 'gendir' would not be recognized when $(...) variables were converted into windows style paths. Fri Feb 11 13:25:02 2005 Chad Elliott * README: * modules/ProjectCreator.pm: * modules/VC7ProjectCreator.pm: Added a new pseudo variable, 'quote', that will provide a project specific representation of a double quote character. RT #5125 * clone_build_tree.pl: Aesthetic change to print only Updating if updating a build and Creating if creating a build. Fri Feb 11 06:58:04 2005 Chad Elliott * config/mfc.mpb: * templates/em3vcp.mpd: * templates/em3vcpdll.mpt: * templates/em3vcpdllexe.mpt: * templates/em3vcplib.mpt: * templates/em3vcplibexe.mpt: * templates/nmake.mpd: * templates/nmakeexe.mpt: * templates/vc6dsp.mpd: * templates/vc6dspdllexe.mpt: * templates/vc6dsplibexe.mpt: * templates/vc7.mpd: * templates/vc7exe.mpt: * templates/vc7libexe.mpt: Provided a new template variable, unicode, which when set will change the entry point for any MFC related executable to wWinMainCRTStartup and set the UNICODE and _UNICODE preprocessor macros. RT #5106 Mon Feb 7 09:51:10 2005 Chad Elliott * templates/em3vcp.mpd: * templates/vc6dsp.mpd: If pdbl is not set, then specify /pdb:none. This option is no longer supported in later versions of MS LINK, so it is not used in then nmake or vc7 templates. Thu Feb 3 12:53:37 2005 Chad Elliott * templates/em3vcp.mpd: * templates/em3vcpdll.mpt: * templates/em3vcpdllexe.mpt: * templates/em3vcplib.mpt: * templates/em3vcplibexe.mpt: * templates/nmake.mpd: * templates/nmakedll.mpt: * templates/nmakeexe.mpt: * templates/vc6dsp.mpd: * templates/vc6dspdll.mpt: * templates/vc6dspdllexe.mpt: * templates/vc6dsplib.mpt: * templates/vc6dsplibexe.mpt: * templates/vc7.mpd: * templates/vc7dll.mpt: * templates/vc7exe.mpt: * templates/vc7lib.mpt: * templates/vc7libexe.mpt: Make the use of pdb related options consistent across all vc related project types. Thanks to Thomas Rothfuss for suggesting this. Tue Feb 1 10:31:00 2005 Chad Elliott * modules/ProjectCreator.pm: Fixed the following bugs: 1) Not supplying a location to verbatim would not result in an error. 2) Adding non-grouped files after adding grouped files would result in an error. 3) Characters trailing closing curly braces would not be recognized as an error. 4) Some generated files could be added more than once depending on the similarity of other generated files. For example, Source.idl and SourceControl.idl would cause SourceControlC.cpp to be added more than once. Thanks to Thomas Rothfuss for reporting #4. * modules/TemplateInputReader.pm: Simplified an if/else clause. * modules/TemplateParser.pm: Fixed a bug where mixed (HASH and SCALAR) foreach SCALAR values would not be removed. It was originally dependent upon the order. Again, thanks to Thomas Rothfuss for reporting this. * modules/WorkspaceCreator.pm: Fixed a bug where characters trailing closing curly braces would not be recognized as an error. * templates/em3vcp.mpd: * templates/nmake.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: Do not default the version value. Only provide version information if the user specifically provided it. Thu Jan 27 12:40:12 2005 Chad Elliott * config/boost_base.mpb: * config/global.features: Added requires += boost to the boost_base project and defaulted boost to zero in the global features file. * modules/MakeWorkspaceCreator.pm: Fixed a bug where a project that was dependent upon a project that had a translated name, would have the untranslated name as the dependency. * templates/make.mpd: Removed an unnecessary foreach loop under the clean target. Wed Jan 26 13:52:36 2005 Chad Elliott * README: * modules/WorkspaceCreator.pm: Allow the user to negate project types in 'exclude' clauses within mwc files. * templates/make.mpd: * templates/makedll.mpt: Provide precompiled header support for gcc. Tue Jan 25 12:38:57 2005 Chad Elliott * templates/em3vcpdll.mpt: * templates/em3vcpdllexe.mpt: * templates/em3vcplib.mpt: * templates/em3vcplibexe.mpt: Replaced some compiler options that had been removed ~2 years ago (including /GR to enable RTTI). Tue Jan 25 10:44:07 2005 Chad Elliott * clone_build_tree.pl: Added .cvsignore to the list of files to exclude. * templates/em3vcpdll.mpt: * templates/vc6dspdll.mpt: Explicitly set the type_description and type_code instead of getting a default in the template file. * templates/nmake.mpd: Don't run the $(DEPGEN) command if there are no source files. * README: * modules/ProjectCreator.pm: * templates/bmake.mpd: * templates/em3vcp.mpd: * templates/make.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: * templates/vc7csharp.mpd: * templates/vc7vb.mpd: Added support for a new keyword called 'custom_only'. If it is set in an mpc file, the generated project will only contain custom generation targets. It will not contain source files, header files, etc. Mon Jan 24 16:45:31 2005 J.T. Conklin * templates/automake.mpd: Fixed pkgconfigdata definition: config.status is found in ${top_builddir}, not ${top_srcdir}. Also fixed a tab that had been converted to spaces by mistake. Sun Jan 23 00:15:31 2005 J.T. Conklin * modules/AutomakeWorkspaceCreator.pm: Restore CLEANFILES and EXTRA_DIST to conditionals since these two macros don't match the general form of automake primaries. Sat Jan 22 23:59:00 2005 Marek Brudka * config/qt_uic.mpb (Module): * config/qt_moc.mpb (Module): * config/qt.mpb (Module): * config/global.features: Merged REACTOR_SEPARATION branch with the main trunk. Below is the list of more detailed changes. Thu Dec 9 20:00:39 2004 Marek Brudka * config/qt_uic.mpb (Module): * config/qt_moc.mpb (Module): These files are empty now. * config/qt.mpb (Module): Qt became project which provides MOC and UIC rules. Sat Dec 4 14:29:51 2004 Marek Brudka * config/global.features: Added comment about -features option. Fri Dec 3 23:56:20 2004 Marek Brudka * config/qt.mpb (Module): qt based projects requires now qt features to be set. Sat Jan 22 23:20:57 2005 J.T. Conklin * templates/automake.mpd: Use new "sort" feature to sort list of header, inline, template, etc. files for _HEADERS primary. Sat Jan 22 23:12:53 2005 J.T. Conklin * templates/automake.mpd: Changed to touch "stamp" file only if custom file type generates multiple files. Fri Jan 21 17:16:04 2005 J.T. Conklin * modules/AutomakeWorkspaceCreator.pm: Changed conditionals which matched a set of specific automake primaries to use a single regular expression that matches the general form of all automake primaries. We shouldn't have to change this any more when adding support for additional auto- make features. Fri Jan 21 11:07:56 2005 Chad Elliott * modules/BMakeWorkspaceCreator.pm: Cosmetic changes. * modules/TemplateParser.pm: Provide new functionality for modifying lists within the context of 'foreach' and 'if' statments. Four functions are provided: 'multiple', 'reverse', 'sort', 'uniq'. 'multiple' returns true if the parameter give has more than one element when evaluated in a list context. 'reverse' returns the list in reverse order. 'sort' returns the list in sorted order. 'uniq' return the list in sorted order with duplicates removed. * modules/AutomakeProjectCreator.pm: Removed 'rev_requires' and 'rev_avoids' and used the new 'reverse' modifier. * templates/automake.mpd: Use the new modifiers provide by the TemplateParser. Thu Jan 20 07:13:43 2005 J.T. Conklin * templates/automake.mpd: Changed to append <%pkgconfig_files%> to EXTRA_FILES. Changed to append to pkgconfigdata_DATA. Wed Jan 19 11:20:42 2005 Chad Elliott * USAGE: * modules/Creator.pm: * modules/Driver.pm: * modules/Options.pm: * modules/ProjectCreator.pm: * modules/WorkspaceCreator.pm: Split the functionality of -expand_env into two options, -use_env and -expand_vars. If the -use_env option is supplied to mwc.pl or mpc.pl, then MPC will use environment variable to replace $() instances instead of the values provided by -relative. If the -expand_vars option is used, then MPC will expand $() variables to the exact value as found in the environment or the -relative settings (depending on the use of the -use_env option). Also, the -relative option can now accept relative paths. Tue Jan 18 09:29:09 2005 Chad Elliott * README: * modules/ProjectCreator.pm: * templates/automake.mpd: * templates/bmake.mpd: * templates/em3vcp.mpd: * templates/ghs.mpd: * templates/make.mpd: * templates/nmake.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: * templates/vc7csharp.mpd: * templates/vc7vb.mpd: Added the ability to modify 'command' and 'dependent' within the scope of a custom section (such as IDL_Files, RPC_Files, etc.) Tue Jan 18 07:34:32 2005 Chad Elliott * modules/Creator.pm: * modules/ProjectCreator.pm: * modules/WorkspaceCreator.pm: Factored code common to the Project and Workspace creator dealing with the -into option into a method on the Creator for use in other modules. * modules/AutomakeWorkspaceCreator.pm: * modules/GHSWorkspaceCreator.pm: * modules/VC7WorkspaceCreator.pm: Honor the -into option by prefixing each open and unlink with the correct output directory determined by the new method on the Creator. Mon Jan 17 07:54:36 2005 Chad Elliott * modules/Options.pm: * modules/ProjectCreator.pm: Allow multiple modifications of the same template variable. Also, fixed a bug where not having an inputext would cause generated files not to be added. * modules/TemplateInputReader.pm: Allow redefintion of template input variables. * templates/automakedll.mpt: * templates/automakeexe.mpt: * templates/bmakedll.mpt: * templates/bmakedllexe.mpt: * templates/bmakelib.mpt: * templates/bmakelibexe.mpt: * templates/cbxdll.mpt: * templates/cbxexe.mpt: * templates/em3vcpdll.mpt: * templates/em3vcpdllexe.mpt: * templates/em3vcplib.mpt: * templates/em3vcplibexe.mpt: * templates/ghsdll.mpt: * templates/ghsdllexe.mpt: * templates/ghslib.mpt: * templates/ghslibexe.mpt: * templates/makedll.mpt: * templates/makeexe.mpt: * templates/nmakedll.mpt: * templates/nmakeexe.mpt: * templates/sledll.mpt: * templates/sleexe.mpt: * templates/vc6dspdll.mpt: * templates/vc6dspdllexe.mpt: * templates/vc6dsplib.mpt: * templates/vc6dsplibexe.mpt: * templates/vc7csharp.mpt: * templates/vc7dll.mpt: * templates/vc7exe.mpt: * templates/vc7lib.mpt: * templates/vc7libexe.mpt: * templates/vc7vb.mpt: Added a conditional include to each mpt file in of the following form: conditional_include "user_XXXXXX" where XXXXXX is the name of the current mpt file (without the extension). This will allow a user to place custom configurations in an mpt file that will automatically be included during project generation, assuming that the file is located through the -include specification. Mon Jan 10 13:58:37 2005 Chad Elliott * modules/ProjectCreator.pm: If 'inputext' is not used in a Define_Custom, still create the custom type but provide no extensions. This will not cause a warning when used when "automatic = 1", but nothing will be automatically added since no input extension was provide. Also, fixed a bug where if gendir is set for a particular file type in one scope, it would be applied to all files even in different scopes. * templates/make.mpd: Fixed a bug where the template repository directory wouldn't get created when necessary. Mon Jan 10 10:55:51 2005 J.T. Conklin * templates/automake.mpd: Added support for pkgconfig_files. * modules/AutomakeWorkspaceCreator.pm: Added pkgconfigdata_DATA to list of automake primaries we detect for converting = to +=. Mon Jan 10 06:27:33 2005 Chad Elliott * modules/AutomakeWorkspaceCreator.pm: Before using the project name as a regular expression, we must escape all of the regular expression specific characters. Fri Jan 7 13:59:31 2005 Chad Elliott * modules/Creator.pm: * modules/StringProcessor.pm: Moved the crlf and windows_crlf method into StringProcessor and finally fixed the problem with cygwin. Now cygwin perl can be used with MPC. * modules/ProjectCreator.pm: Cache the contents of the template input files to avoid reading them multiple times. Also, search for resource files that differ only in case from the project name. * modules/FeatureParser.pm: Cache the contents of the feature file to avoid reading it multiple times. * modules/Parser.pm: * modules/TemplateParser.pm: Took the file caching code out of TemplateParser and moved it into Parser so that more classes can use cached file reads than just the TemplateParser. Wed Jan 5 11:24:36 2005 Chad Elliott * templates/nmake.mpd: Fixed precompiled header problems where the pch source isn't in the current directory. Also, changed the location of the intermediate files to use the project name instead of the project file without the extension. Wed Jan 5 07:08:57 2005 Chad Elliott * modules/AutomakeProjectCreator.pm: * modules/BMakeProjectCreator.pm: * modules/CBXProjectCreator.pm: * modules/EM3ProjectCreator.pm: * modules/GHSProjectCreator.pm: * modules/HTMLProjectCreator.pm: * modules/MakeProjectBase.pm: * modules/MakeProjectCreator.pm: * modules/NMakeProjectCreator.pm: * modules/ProjectCreator.pm: * modules/SLEProjectCreator.pm: * modules/TemplateParser.pm: * modules/VC6ProjectCreator.pm: * modules/VC7ProjectCreator.pm: * modules/VCProjectBase.pm: * modules/WinProjectBase.pm: * templates/em3vcp.mpd: * templates/vc6dsp.mpd: Refactored much repeated code into 3 distinct base modules. There is now a MakeProjectBase, WinProjectBase and VCProjectBase. Each contain methods that are common to Make base projects, Windows based projects and Visual C++ project types, respectively. Also, the 'win_version' template variable was factored out of the ProjectCreator subclasses and into the TemplateParser. * templates/automake.mpd: Only emit the library or exe setting if source files are provided. Thanks to Stephen Torri for suggesting this. Tue Jan 4 09:52:13 2005 Chad Elliott * modules/WinVersionTranslator.pm: Truncate minor version numbers to 65535 or under as Visual C++ 6.0 can't handle anything larger. Tue Jan 4 07:48:20 2005 Chad Elliott * modules/AutomakeWorkspaceCreator.pm: Added code to support the use of nobase_include_HEADERS and nobase_pkginclude_HEADERS in the case where 'includedir' isn't set. Mon Jan 3 13:12:23 2005 Chad Elliott * modules/AutomakeWorkspaceCreator.pm: * templates/automake.mpd: * templates/automakedll.mpt: Added support for an 'includedir' template variable that can be used to override the default includedir setting determined by AutomakeWorkspaceCreator. In order for header files for a particular project to be "installed", the 'install_headers' template variable needs to be set to 1. Thanks to Stephen Torri for providing this functionality. Mon Jan 3 11:11:35 2005 Chad Elliott * USAGE: * modules/MPC.pm: * modules/MWC.pm: Removed support for Visual Age 4. It was incomplete, out-of-date and most likely didn't work at all. * modules/VA4ProjectCreator.pm: * modules/VA4WorkspaceCreator.pm: * templates/va4icc.mpd: * templates/va4iccdll.mpt: * templates/va4iccdllexe.mpt: * templates/va4icclib.mpt: * templates/va4icclibexe.mpt: Removed these files. Mon Jan 3 09:18:13 2005 Chad Elliott * modules/ProjectCreator.pm: * templates/em3vcp.mpd: * templates/make.mpd: * templates/nmake.mpd: * templates/vc6dsp.mpd: * templates/vc7.mpd: Added the ability to generate projects that only contain resource files. Wed Dec 22 12:47:02 2004 Chad Elliott * MPC version 3.2.0 released. Local Variables: add-log-time-format: current-time-string End: ace-6.4.5+dfsg.orig/MPC/history/ChangeLog-3_90000644000175000017500000005701313154167361016557 0ustar tggtggMon Jun 24 18:55:51 UTC 2013 Adam Mitz * templates/make.mpd: Extend the DEPLIBS handling of static libraries to workspaces that don't use -static and have a mix of static and shared. With this change, shared libs and executables will be re-linked when the static libs they use are changed. Also, make sure postbuild doesn't run in parallel with the normal build steps and use "-include" to suppress warnings (gnu make only). Thu Nov 22 09:19:24 UTC 2012 Johnny Willemsen * prj_install.pl: Extended shared library installation for debian packaging Tue Nov 20 18:27:27 UTC 2012 Johnny Willemsen * config/lzo1.mpb: * config/lzo2.mpb: Fixed expand parts Fri Jul 6 16:46:47 UTC 2012 Chad Elliott * modules/Creator.pm: * modules/TemplateParser.pm: * modules/WorkspaceCreator.pm: Fixed "Useless use of hash element in void context" and "Use of uninitialized value $_ in concatenation" warnings. Fri Jun 22 14:31:02 UTC 2012 Chad Elliott * templates/vc10.mpd: Modified to allow setting 'BasicRuntimeChecks' regardless of the 'optimize' setting. Wed Jun 6 13:09:54 UTC 2012 Johnny Willemsen * modules/ProjectCreator.pm: Handle tpp files as template files * docs/README Mention vc11 Fri Apr 27 13:31:52 UTC 2012 Johnny Willemsen * templates/vc8platforms.mpt: * templates/vc10platforms.mpt: Updated WinCE platforms Fri Mar 30 13:45:44 UTC 2012 Adam Mitz * modules/WorkspaceCreator.pm: In topname(), recognize Windows drive-letter paths as absolute. Thu Mar 8 22:41:34 UTC 2012 Adam Mitz * modules/Depgen/Preprocessor.pm: Cached results of full path to #included files need to be kept separately for each directory of input files. Thu Mar 8 06:50:28 UTC 2011 Martin Corino * modules/TemplateParser.pm: Fix to solve problems with IDL projects using the combination of setting 'gendir' and defining custom output files (in separate directory/ies *not* equal to 'gendir'). Wed Mar 7 19:24:02 UTC 2012 Brian Johnson * clone_build_tree.pl: Adding flag to allow linking files normally avoided, but not part of -l flag operations. Mon Feb 27 21:33:06 UTC 2012 Adam Mitz * docs/html/MakeProjectCreator.css: * docs/html/MakeProjectCreator.html: HTML documentation update from Kevin Stanley of OCI. Tue Feb 21 20:13:24 UTC 2012 Adam Mitz * templates/vc10.mpd: Support multiple source files with the same name (in different directories) in a single project. Tue Jan 24 19:01:18 UTC 2012 Chip Jones * ChangeLog: Added changelog entry for -workers options. Tue Jan 24 18:26:46 UTC 2012 Chip Jones * docs/MPC.sgml: * docs/USAGE: * docs/html/MakeProjectCreator.html: Added documentation for -workers options. Mon Jan 16 22:01:41 UTC 2012 Chip Jones * modules/Creator.pm: Modifications to support multiprocess MPC. * modules/Depgen/DependencyEditor.pm: * modules/Depgen/Driver.pm: Modified dependency generator to support appending to existing files and generating dependencies for IDL files. * modules/Driver.pm: * modules/Options.pm: * modules/Parser.pm: * modules/ProjectCreator.pm: * modules/TemplateParser.pm: * modules/WorkspaceCreator.pm: Modified MPC to generate projects in separate processes. This experimental feature is enabled with the command-line option '-workers.' It's behavior can be modified with the '-workers_dir' and '-workers_port' directives. This is a merge of work done in the 'mpc_performance' branch. Tue Dec 20 11:42:28 UTC 2011 Johnny Willemsen * modules/VC11ProjectCreator.pm: * modules/VC11WorkspaceCreator.pm: * templates/vc11dll.mpt: * templates/vc11exe.mpt: * templates/vc11lib.mpt: * templates/vc11libexe.mpt: * templates/vc11platforms.mpt: Extended support for vc11 * modules/VC7ProjectCreator.pm: Fixed typo Mon Dec 19 14:55:30 UTC 2011 James H. Hill * config/udm.mpb: Added support for Debug/Release configurations. Sat Dec 17 21:40:53 UTC 2011 James H. Hill * templates/wix.mpd: Added support for using the use_lib_modifier setting for the non-extended template. Sat Dec 17 21:11:08 UTC 2011 James H. Hill * config/udm.mpb: Changes libs declaration to lit_libs since there is no differentiation between debug and release import libraries. Fri Dec 16 17:06:05 UTC 2011 James H. Hill * config/portico.mpb: Base project for Portico implementation of HLA. Thu Dec 15 04:21:11 UTC 2011 Adam Mitz * templates/makedll.mpt: Cygwin doesn't use -fPIC, GCC warns if it's present. Tue Dec 13 21:04:44 UTC 20111 Trevor Fields * rpm/buildrpm.sh: Removed potential of running the check-buildroot script. Mon Dec 12 19:03:08 UTC 2011 Johnny Willemsen * modules/Options.pm: * modules/VC11ProjectCreator.pm: * modules/VC11WorkspaceCreator.pm: Added vc11 type, looks like the project format is still the same as with vc10, but this way we can use -type vc11 in some experimental builds Wed Dec 7 23:47:24 UTC 2011 Trevor Fields * rpm/buildrpm.sh: Fixes to build on systems where rpmbuild uses buildroot. Mon Dec 5 15:32:37 UTC 2011 Adam Mitz * docs/USAGE: Removed obsolete note about a default -type. Mon Dec 5 15:17:04 UTC 2011 Chad Elliott * modules/Creator.pm: * modules/TemplateParser.pm: Fixed a bug where the inner-most template scope was usable at any given point within a template. Thanks to Adam Mitz for helping me debug this and to Holger Schönstedt for bringing this to my attention. * docs/templates/make.txt: * templates/make.mpd: * templates/makedll.mpt: Added a 'ccflags' template variable to allow users to specify C++ compiler options and a 'notparallel' template variable to allow users to control whether or not a .NOTPARALLEL is added to the makefile. * templates/wix.mpd: Fixed whitespace. Wed Nov 30 21:33:46 UTC 2011 Trevor Fields * rpm/buildrpm.sh: Fixes to correctly gather packager information. Changes so rpm can be built by non root user. Mon Nov 7 15:37:29 UTC 2011 Adam Mitz * docs/README: Typo fix. Thu Nov 3 12:00:45 UTC 2011 Chad Elliott * docs/html/MakeProjectCreator.html: Corrected the list of options ignored by the workspace 'cmdline' setting. Wed Nov 2 21:06:18 UTC 2011 James H. Hill * templates/wix.mpd: Added support for processing projects with custom_only set. Wed Oct 19 19:11:50 UTC 2011 William R. Otte * config/openmp.mpb: Base project for openmp. Mon Oct 17 18:33:05 UTC 2011 Chad Elliott * templates/make.mpd: * docs/templates/make.txt: Define CFLAGS, but only if the 'cflags' template variable has been defined. Thu Oct 6 12:40:46 UTC 2011 Marcel Smit * docs/README: * docs/templates/automake.txt: * docs/templates/bmake.txt: * docs/templates/cc.txt: * docs/templates/cdt6cproject.txt: * docs/templates/cdt6project.txt: * docs/templates/common.txt: * docs/templates/ghs.txt: * docs/templates/make.net.txt: * docs/templates/make.txt: * docs/templates/rpmspec.txt: * docs/templates/vc10.txt: * docs/templates/vc7.txt: * docs/templates/vc7csharp.txt: * docs/templates/vc7java.txt: * docs/templates/vc7vb.txt: * docs/templates/vc8.txt: * docs/templates/vc8csharp.txt: * docs/templates/vc8java.txt: * docs/templates/vc8vb.txt: * docs/templates/wb26.txt: * docs/templates/wb26wrmakefile.txt: * docs/templates/wb26wrproject.txt: * docs/templates/wix.txt: Fuzz: added missing $Id $ string. Thu Oct 6 12:27:57 UTC 2011 Marcel Smit * modules/AutomakeProjectCreator.pm: * modules/AutomakeWorkspaceCreator.pm: * modules/BCB2007ProjectCreator.pm: * modules/BCB2007WorkspaceCreator.pm: * modules/BCB2009ProjectCreator.pm: * modules/BCB2009WorkspaceCreator.pm: * modules/BDS4ProjectCreator.pm: * modules/BDS4WorkspaceCreator.pm: * modules/BMakeProjectCreator.pm: * modules/BMakeWorkspaceCreator.pm: * modules/BorlandProjectBase.pm: * modules/BorlandPropertyBase.pm: * modules/CCProjectCreator.pm: * modules/CCWorkspaceCreator.pm: * modules/CDT6ProjectCreator.pm: * modules/CDT6WorkspaceCreator.pm: * modules/CDT7ProjectCreator.pm: * modules/CDT7WorkspaceCreator.pm: * modules/CommandHelper.pm: * modules/ConfigParser.pm: * modules/Creator.pm: * modules/DirectoryManager.pm: * modules/Driver.pm: * modules/EM3ProjectCreator.pm: * modules/EM3WorkspaceCreator.pm: * modules/FeatureParser.pm: * modules/GHSProjectCreator.pm: * modules/GHSPropertyBase.pm: * modules/GHSWorkspaceCreator.pm: * modules/GUID.pm: * modules/HTMLProjectCreator.pm: * modules/HTMLWorkspaceCreator.pm: * modules/MPC.pm: * modules/MWC.pm: * modules/MakeProjectBase.pm: * modules/MakeProjectCreator.pm: * modules/MakePropertyBase.pm: * modules/MakeWorkspaceBase.pm: * modules/MakeWorkspaceCreator.pm: * modules/NMakeProjectCreator.pm: * modules/NMakeWorkspaceCreator.pm: * modules/Options.pm: * modules/OutputMessage.pm: * modules/Parser.pm: * modules/ProjectCreator.pm: * modules/RpmSpecProjectCreator.pm: * modules/RpmSpecWorkspaceCreator.pm: * modules/SLEProjectCreator.pm: * modules/SLEWorkspaceCreator.pm: * modules/StringProcessor.pm: * modules/TemplateInputReader.pm: * modules/TemplateParser.pm: * modules/VC10ProjectCreator.pm: * modules/VC10WorkspaceCreator.pm: * modules/VC6ProjectCreator.pm: * modules/VC6WorkspaceCreator.pm: * modules/VC71ProjectCreator.pm: * modules/VC71WorkspaceCreator.pm: * modules/VC7ProjectCreator.pm: * modules/VC7WorkspaceCreator.pm: * modules/VC8ProjectCreator.pm: * modules/VC8WorkspaceCreator.pm: * modules/VC9ProjectCreator.pm: * modules/VC9WorkspaceCreator.pm: * modules/VCProjectBase.pm: * modules/VCPropertyBase.pm: * modules/Version.pm: * modules/WB26ProjectCreator.pm: * modules/WB26WorkspaceCreator.pm: * modules/WB30ProjectCreator.pm: * modules/WB30WorkspaceCreator.pm: * modules/WinProjectBase.pm: * modules/WinPropertyBase.pm: * modules/WinVersionTranslator.pm: * modules/WinWorkspaceBase.pm: * modules/WixProjectCreator.pm: * modules/WixWorkspaceCreator.pm: * modules/WorkspaceCreator.pm: * modules/WorkspaceHelper.pm: * modules/XMLProjectBase.pm: * modules/mpc_debug.pm: Fuzz: added missing $Id $ string. Wed Sep 21 18:51:02 UTC 2011 Johnny Willemsen * rpm/MPC.templ: * rpm/buildrpm.sh: * rpm/MPC.spec: Renamed the MPC spec file template to .templ and update the script to read the template and create MPC.spec. Within a source package we can only have one spec file and MPC is also included in the A/T/C/D source package which will result in two spec files Tue Sep 20 13:34:11 UTC 2011 James H. Hill * config/tena_middleware.mpb: Fixed error in base project to support non-Windows environments. Wed Aug 10 02:32:49 UTC 2011 James H. Hill * config/pintools_32bit.mpb: Fixed errors in the specification. Mon Aug 1 18:16:21 UTC 2011 James H. Hill * config/pintools_32bit.mpb: New base project for building a Pintool. This base project only supports 32-bit Linux and Windows operating systems. Thu Jun 30 06:58:25 UTC 2011 Johnny Willemsen * config/ndds_example_ts_defaults.mpb: New base project for ndds to generate example code Thu Jun 16 20:16:29 UTC 2011 Adam Mitz * templates/vc10.mpd: When creating static libs, don't provide dependent libs as the AdditionalDependencies for the lib tool. This change makes static libs in vc10 work like vc9 (and -type make for that matter). Before this, a library that depended on another would end up including all of the dependent lib's object files. Fri Jun 10 14:51:32 UTC 2011 Adam Mitz * modules/Options.pm: Modification to previous commit: also handle duplicate slashes and other path cleanup operations. * templates/vc10.mpd: Unlike previous versions, vc10 runs all custom build steps for the project in the same cmd shell. Use setlocal/endlocal when adding to the PATH to avoid redundant additions to PATH. Tue May 24 14:42:55 UTC 2011 Adam Mitz * modules/Options.pm: Trim any trailing slashes from input files (really directories) provided on the command line. Leaving the trailing slash can result in the wrong number of ".." components in relative path expansions. Thu May 19 15:29:01 UTC 2011 Adam Mitz * config/glib.mpb: Allow customization of the include search path for GLib since at least some 64-bit Linux distros use "lib64" in place of "lib". Tue May 17 15:32:48 UTC 2011 Chad Elliott * modules/Driver.pm: * modules/Options.pm: * modules/OutputMessage.pm: Added debug information about the possible base projects that are available. * modules/ProjectCreator.pm: Fixed a bug where subtracting values that contain psuedo variables failed because they were not evaluated before subtracting. Wed May 11 14:18:13 UTC 2011 Adam Mitz * templates/vc10.mpd: Generate the msbuild LinkKeyFile element from the MPC template variable keyfile. Thanks to Charles Calkins for the patch. Wed Apr 27 14:31:56 UTC 2011 Adam Mitz * modules/MakeWorkspaceCreator.pm: Due to the change below, the workspace makefile no longer needs to explicitly invoke the "generated" target in the projects. Wed Apr 27 14:07:44 UTC 2011 Adam Mitz * templates/make.mpd: In the custom-only case, make sure that "all" is the first target listed, and also have the "generated" target invoke prebuild. Wed Apr 27 13:25:32 UTC 2011 Johnny Willemsen * prj_install.pl: Added fix for OSX, thanks to Paul Fitzpatrick for reporting this Thu Apr 14 11:53:22 UTC 2011 Johnny Willemsen * config/coredx_ts_defaults.mpb: Extended this file Mon Apr 11 12:25:37 UTC 2011 Johnny Willemsen * config/ndds_cck_ts_defaults.mpb: Added -enableEscapeChar Mon Apr 11 01:57:43 UTC 2011 James H. Hill * config/tena_base.mpb: The base project for all TENA base projects. It defines common properties and sets the 'tena' feature. * config/tena_middleware.mpb: Base project for linking against the TENA middleware library. Sun Apr 10 17:39:57 UTC 2011 Johnny Willemsen * config/nddsexe_with_idl.mpb: * config/nddslib_with_idl.mpb: Removed these files, use nddslib/nddsexe with the needed ts_defaults base project Sun Apr 10 12:07:15 UTC 2011 Johnny Willemsen * config/ndds_ts_defaults.mpb: Removed CCK related options, this way someone can use NDDS without requiring him to use the CCK, if you need the cck support, use ndds_cck_ts_defaults as new base Sat Apr 9 11:47:11 UTC 2011 Johnny Willemsen * config/ndds_cck_ts_defaults.mpb: New base project, ndds_ts_defaults will be changed soon for just RTI DDS without the CCK support. If you want to use the CCK, derive from this base project * config/nddsmonitor.mpb: Layout change Fri Apr 8 14:35:18 UTC 2011 Adam Mitz * templates/vc8csharp.mpd: Added "UserControl" as a valid subtype setting for C#. Wed Apr 6 12:02:50 UTC 2011 Johnny Willemsen * config/coredx_ts_defaults.mpb: * config/coredxlib.mpb: Starter files for CoreDX * config/ndds_ts_defaults.mpb: Layout change Tue Apr 5 19:25:02 UTC 2011 Phil Mesnier * modules/Creator.pm: * modules/WorkspaceCreator.pm: Fuzz fix. Tue Apr 5 18:47:09 UTC 2011 Don Hudson * modules/WorkspaceCreator.pm: Added default_verbose_ordering() that returns false and used it to set verbose_ordering. This allows derived workspace creators to override the default verbose ordering. Fixed typo in comment. Corrected Perl warning by replacing == with eq in an if statement. Modified the verbose ordering warning message to include the name of the project being processed. * modules/Driver.pm: Changed to set verbose ordering on the creator only if it's defined in the config file. * modules/RpmSpecWorkspaceCreator.pm: Added default_verbose_ordering() that returns true so that a warning is logged if there are missing dependencies when generating an rpm spec file. Tue Apr 5 12:57:22 UTC 2011 Don Hudson * docs/html/MakeProjectCreator.html: Added bracketed (multiline) assigments to documentation, i.e., assignment of form: keyword [optional flags] { This is a multiline assignment. } Optional flags are \s to retain leading white space and \n to retain new lines. These flags are be combined. * docs/templates/rpmspec.txt: Added rpm_pre_cmd keyword for %pre section of the RPM spec file and rpm_url for the URL tag in the RPM spec file. * modules/AutomakeWorkspaceCreator.pm: Changed to default to cacheok of false as some intermediate project files are deleted must be regenerated if a project is regenerated. This was causing an error, but the error was only being logged. Changed to return an error code and message when workspace generation fails in some cases where an error message was only logged. * modules/Creator.pm: Added parse_assignment() that pre-parses bracketed assigments (see comment on docs/html/MakeProjectCreator.html) before calling SUPER::parse_assignment(). This method takes an optional file handle that must be used for bracketed assignment support. * modules/DirectoryManager.pm: Corrected typo in comment. * modules/Parser.pm: Added strip_comments(), strip_lt_whitespace(), and is_blank_line(). * modules/ProjectCreator.pm: Added file handle parse_assignment and related method calls for bracketed assignment support. See comment on modules/Creator.pm. Added case sensitivity logic to already_added() similar to other places in code. * modules/RpmSpecWorkspaceCreator.pm: Changed write_and_compare_file() to return 1 instead of undef as method must now return status. Added %pre section and URL tag to RPM spec file generation. * modules/StringProcessor.pm: Changed parse_assignment() to not strip ending new line as later parsing may need it. * modules/WorkspaceCreator.pm: Added file handle parse_assignment and related method calls for bracketed assignment support. See comment on modules/Creator.pm. Changed to return an error code and message when workspace generation fails in some cases where an error message was only logged. Added default_cacheok() which returns true and is used to set 'cacheok' so this method can be overridden when 'cacheok' needs to be false. Fri Mar 18 15:07:53 UTC 2011 Adam Mitz * docs/templates/vc8csharp.txt: * templates/vc8csharp.mpd: Added the "PlatformTarget" template variable for C#. Tue Mar 15 14:54:48 UTC 2011 Adam Mitz * templates/vc10.mpd: * docs/templates/vc10.txt: Added the "PlatformToolset" template variable. * modules/ProjectCreator.pm: * docs/README: Allow the "*" replacement for assignments to the libs keyword. Wed Mar 9 13:51:00 UTC 2011 William R. Otte * config/ndds_ts_defaults.mpb: Added PLATFORM_NDDS_ARGS at the suggestion of Johnny Willemsen. Thu Mar 3 18:51:23 UTC 2011 Chad Elliott * docs/html/RpmSpec.html: Fixed html errors and warnings. * modules/WorkspaceCreator.pm: Fixed a bug where a project added by an aggregated workspace containing a relative path would not be recognized as a duplicate if the same project were added by another workspace without a relative path. Tue Feb 15 16:02:17 UTC 2011 Adam Mitz * MPC version 3.9.0 released. Local Variables: mode: change-log add-log-time-format: (lambda () (progn (setq tz (getenv TZ)) (set-time-zone-rule UTC) (setq time (format-time-string %a %b %e %H:%M:%S %Z %Y (current-time))) (set-time-zone-rule tz) time)) indent-tabs-mode: nil End: ace-6.4.5+dfsg.orig/MPC/config/0000775000175000017500000000000013157240624014152 5ustar tggtggace-6.4.5+dfsg.orig/MPC/config/ixml.mpb0000644000175000017500000000014113154167361015620 0ustar tggtggproject { includes += $(UPNP_ROOT)/include libpaths += $(UPNP_ROOT)/lib lit_libs += ixml } ace-6.4.5+dfsg.orig/MPC/config/udm.mpb0000644000175000017500000000244313154167361015443 0ustar tggtgg// -*- MPC -*- project : xerces { includes += . \ $(GME_ROOT)/SDK/BON/Common \ $(UDM_PATH)/include \ $(GME_ROOT)/SDK/BON \ $(GME_ROOT)/Interfaces libpaths += $(UDM_PATH)/lib specific { midl_flags += /server none /client none midl_includes += $(GME_ROOT) $(GME_ROOT)/Interfaces . Release::lit_libs += UdmDll Debug::lit_libs += UdmDllD } specific(prop:microsoft) { DisableSpecificWarnings += 4251 } specific(vc10) { // Link against vc10 specific libraries instead of the generic ones Release::lit_libs -= UdmDll Debug::lit_libs -= UdmDllD Release::lit_libs += UdmDll_VS10 Debug::lit_libs += UdmDll_VS10D } specific(vc11) { // Link against vc11 specific libraries instead of the generic ones Release::lit_libs -= UdmDll Debug::lit_libs -= UdmDllD Release::lit_libs += UdmDll_v110_Win32 Debug::lit_libs += UdmDll_v110_Win32D } Define_Custom(UDM) { dependent = $(UDM_PATH)/bin/Udm command = <%quote%>$(UDM_PATH)<%quote%>/bin/Udm inputext = .xml header_outputext = .h source_outputext = .cpp generic_outputext = .xsd keyword udmflags = commandflags } } feature (zlib) { libpaths += $(UDM_3RDPARTY_PATH)/zlib } ace-6.4.5+dfsg.orig/MPC/config/boost_python.mpb0000644000175000017500000000015013154167361017376 0ustar tggtgg// -*- MPC -*- project: boost_base { lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_python$(BOOST_CFG) } ace-6.4.5+dfsg.orig/MPC/config/ndds_cck_ts_defaults.mpb0000644000175000017500000000023513154167361021020 0ustar tggtgg// -*- MPC -*- project : ndds_ts_defaults { ndds_ts_flags += -corba <%input_noext%>C.h -orb ACE_TAO2.0 -enableEscapeChar -I$(TAO_ROOT) -I$(TAO_ROOT)/tao } ace-6.4.5+dfsg.orig/MPC/config/wxribbon.mpb0000644000175000017500000000050113154167361016501 0ustar tggtggproject: wxadvanced, wxhtml, wxxml { specific(prop:windows) { Debug::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)d_ribbon Release::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)_ribbon } else { lit_libs += wx_$(WX_PORT)$(WX_UNICODE)_ribbon$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/boost_base.mpb0000644000175000017500000000055613154167361017001 0ustar tggtgg// -*- MPC -*- project { requires += boost includes += $(BOOST_ROOT)/include/$(BOOST_VERSION) $(BOOST_ROOT)/. // If the libraries for boost are not installed in a location relative to // the include files, set the BOOST_ROOT_LIB environment variable expand(BOOST_ROOT_LIB) { $BOOST_ROOT_LIB $(BOOST_ROOT)/lib } libpaths += $(BOOST_ROOT_LIB) } ace-6.4.5+dfsg.orig/MPC/config/qt4_designercomponents.mpb0000644000175000017500000000012513154167361021347 0ustar tggtgg// -*- MPC -*- project: qt4_designer { lit_libs += QtDesignerComponents$(QT_CFG) } ace-6.4.5+dfsg.orig/MPC/config/ndds_example_ts_defaults.mpb0000644000175000017500000000013513154167361021712 0ustar tggtgg// -*- MPC -*- project : ndds_ts_defaults { ndds_ts_flags += -example $(NDDSARCHITECTURE) }ace-6.4.5+dfsg.orig/MPC/config/msgfmt.mpb0000644000175000017500000000022713154167361016151 0ustar tggtggproject { Define_Custom(PO) { command = msgfmt commandflags = -c output_option = -o inputext = .po generic_outputext = .mo } } ace-6.4.5+dfsg.orig/MPC/config/odbc.mpb0000644000175000017500000000102513154167361015560 0ustar tggtggproject { specific(prop:windows) { // Out of the box, Windows supports ODBC since ODBC originated // on Windows. We, however, need to ensure that UnixODBC and // iODBC are not enabled. We may be able to drop the 'avoids' // statement. avoids += unixodbc iodbc lit_libs += odbc32 odbcbcp odbcCP32 } } //============================================================================= // Non-Windows support feature(unixodbc) : unixodbc { avoids += iodbc } feature(iodbc) : iodbc { avoids += unixodbc } ace-6.4.5+dfsg.orig/MPC/config/boost_date_time.mpb0000644000175000017500000000021513154167361020012 0ustar tggtgg// -*- MPC -*- project: boost_base { specific(!prop:windows) { lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_date_time$(BOOST_CFG) } } ace-6.4.5+dfsg.orig/MPC/config/qt4_gui.mpb0000644000175000017500000000202413154167361016225 0ustar tggtgg// -*- MPC -*- project: qt4_core { lit_libs += QtGui$(QT_CFG) // On some linux systems with both Qt3 and Qt4 installed, the uic and moc // executables for Qt4 need to be run as "uic-qt4" (doesn't apply to rcc). // Expand the variable here to avoid the "undefined" warning from msvc. expand(QT4_SUFFIX) { $QT4_SUFFIX "" } Define_Custom(UIC) { command = $(QTDIR)/bin/uic$(QT4_SUFFIX) output_option = -o inputext = .ui pre_filename = ui_ header_outputext = .h } Define_Custom(MOC) { automatic_in = 0 automatic_out = 0 command = $(QTDIR)/bin/moc$(QT4_SUFFIX) output_option = -o pch_postrule = 1 inputext = .h pre_extension = _moc source_outputext = .cpp } Define_Custom(QRC) { command = $(QTDIR)/bin/rcc output_option = -o commandflags = -name <%input_noext%> pch_postrule = 1 inputext = .qrc pre_extension = _qrc source_outputext = .cpp } } ace-6.4.5+dfsg.orig/MPC/config/wxodbc.mpb0000644000175000017500000000041613154167361016142 0ustar tggtggproject: wxbase { specific(prop:windows) { Debug::lit_libs += wx$(WX_VERSION)$(WX_UNICODE)d_odbc Release::lit_libs += wx$(WX_VERSION)$(WX_UNICODE)_odbc } else { lit_libs += wx_base$(WX_UNICODE)_odbc$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/wxgl.mpb0000644000175000017500000000044213154167361015634 0ustar tggtggproject: wxcore { specific(prop:windows) { Debug::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)d_gl Release::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)_gl } else { lit_libs += wx_$(WX_PORT)$(WX_UNICODE)_gl$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/flex.mpb0000644000175000017500000000036113154167361015611 0ustar tggtggproject { requires += flex Define_Custom(FLEX) { command = flex commandflags = -t output_option = > pch_postrule = 1 inputext = .ll, .l source_outputext = .c, .cpp, .cxx, .cc, .C } } ace-6.4.5+dfsg.orig/MPC/config/boost_system.mpb0000644000175000017500000000021213154167361017400 0ustar tggtgg// -*- MPC -*- project: boost_base { specific(!prop:windows) { lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_system$(BOOST_CFG) } } ace-6.4.5+dfsg.orig/MPC/config/wxnet.mpb0000644000175000017500000000041313154167361016016 0ustar tggtggproject: wxbase { specific(prop:windows) { Debug::lit_libs += wx$(WX_VERSION)$(WX_UNICODE)d_net Release::lit_libs += wx$(WX_VERSION)$(WX_UNICODE)_net } else { lit_libs += wx_base$(WX_UNICODE)_net$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/iiopnet.mpb0000644000175000017500000000073413154167361016326 0ustar tggtggproject { custom_only = 1 specific { IIOPNET_BIN = $(IIOPNET_ROOT)/bin/IDLToCLSCompiler IIOPNET_DEP = $(IIOPNET_ROOT)/bin/IDLToCLSCompiler } Define_Custom (IDL) { automatic_in = 0 automatic_out = 0 command = <%quote%>$(IIOPNET_BIN)<%quote%> dependent = <%quote%>$(IIOPNET_DEP)<%quote%> inputext = .idl generic_outputext = .dll keyword iiopnetflags = commandflags } } ace-6.4.5+dfsg.orig/MPC/config/qt4_designer.mpb0000644000175000017500000000010613154167361017240 0ustar tggtgg// -*- MPC -*- project: qt4_xml { lit_libs += QtDesigner$(QT_CFG) } ace-6.4.5+dfsg.orig/MPC/config/coredxlib.mpb0000644000175000017500000000024113154167361016623 0ustar tggtgg// -*- MPC -*- project { lit_libs += dds_cpp dds libpaths += $(COREDX_TOP)/target/$(COREDX_TARGET)/lib includes += $(COREDX_TOP)/target/include } ace-6.4.5+dfsg.orig/MPC/config/tena_middleware.mpb0000644000175000017500000000036213154167361020000 0ustar tggtggproject : tena_base { macros += TENA_PLATFORM=$(TENA_PLATFORM) specific (prop:windows) { lit_libs += libTENA_Middleware-$(TENA_PLATFORM)-v$(TENA_VERSION) } else { libs += TENA_Middleware-$(TENA_PLATFORM)-v$(TENA_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/qt4_network.mpb0000644000175000017500000000010613154167361017131 0ustar tggtgg// -*- MPC -*- project: qt4_core { lit_libs += QtNetwork$(QT_CFG) } ace-6.4.5+dfsg.orig/MPC/config/qwt.mpb0000644000175000017500000000042213154167361015464 0ustar tggtgg// -*- MPC -*- // This project also requires Qt, however it will work with both // Qt 3.3.x and Qt 4.x so we will leave it up to the user to pull // in the right Qt base projects. project { includes += $(QWT_ROOT)/include libpaths += $(QWT_ROOT)/lib lit_libs += qwt } ace-6.4.5+dfsg.orig/MPC/config/splicelib.mpb0000644000175000017500000000101513154167361016616 0ustar tggtgg// -*- MPC -*- project { libs += dcpsccpp lit_libs += dcpsgapi ddsdatabase ddsos libpaths += $(OSPL_HOME)/lib includes += $(OSPL_HOME)/include \ $(OSPL_HOME)/include/sys \ $(OSPL_HOME)/include/dcps/C++/CCPP \ $(OSPL_HOME)/include/dcps/C++/CCPP/$(SPLICE_ORB) \ $(OSPL_HOME)/custom_lib/ccpp specific(prop:microsoft) { DisableSpecificWarnings += 4101 } verbatim(gnuace, macros) { override no_hidden_visibility = 1 } } ace-6.4.5+dfsg.orig/MPC/config/coredx_ts_defaults.mpb0000644000175000017500000000101113154167361020525 0ustar tggtgg// -*- MPC -*- project { Define_Custom(CoreDXTypeSupport) { command = $(COREDX_TOP)/host/$(COREDX_HOST)/bin/coredx_ddl commandflags = -l cpp -f dependent = $(COREDX_TOP)/host/$(COREDX_HOST)/bin/coredx_ddl source_pre_extension = , TypeSupport, DataReader, DataWriter source_outputext = .cc header_pre_extension = , TypeSupport, DataReader, DataWriter header_outputext = .hh keyword coredx_ts_flags = commandflags } requires += coredx } ace-6.4.5+dfsg.orig/MPC/config/wxxrc.mpb0000644000175000017500000000042613154167361016030 0ustar tggtggproject: wxadvanced, wxhtml, wxxml { specific(prop:windows) { Debug::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)d_xrc Release::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)_xrc } else { lit_libs += wx_$(WX_PORT)$(WX_UNICODE)_xrc$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/wxhtml.mpb0000644000175000017500000000045013154167361016175 0ustar tggtggproject: wxcore { specific(prop:windows) { Debug::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)d_html Release::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)_html } else { lit_libs += wx_$(WX_PORT)$(WX_UNICODE)_html$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/unixodbc.mpb0000644000175000017500000000035113154167361016465 0ustar tggtggproject { // Support for UnixODBC (http://www.unixodbc.org). This is one // variant of porting ODBC to non-Windows systems. libpaths += $(UNIXODBC_ROOT)/lib includes += $(UNIXODBC_ROOT)/include lit_libs += odbc odbcinst } ace-6.4.5+dfsg.orig/MPC/config/mpb.mpb0000644000175000017500000000043113154167361015427 0ustar tggtgg// -*- MPC -*- project { // Allow users to specify .mpb files in their project. This gives the // opportunity to see them in IDE's and to install them using // prj_install.pl. Define_Custom(MPB) { automatic_in = 0 automatic_out = 0 inputext = .mpb } } ace-6.4.5+dfsg.orig/MPC/config/wxbase.mpb0000644000175000017500000000271213154167361016146 0ustar tggtggproject { // wxWindows specific variables used by this and other wxWindows related // base projects. You must always set WXWINDOWS_ROOT to the full path of // the installation of wxWindows. // // If you have a project that inherits from this project, you can do one // of two things to get the following variable settings: // 1) You can set them as environment variables before you begin building. // 2) You can have your project also inherit from one of the base projects // to automatically set them. Use 'wxmake' for use with the 'make' // project type. Or use 'wxmsvs' for use with Visual Studio related // project types (e.g., vc71, vc8, vc9, vc10, etc.). You may need to // edit wxmsvs.mpb to correspond to the values of your version of // wxWindows. // // WX_PORT - e.g., gtk2, msw // WX_PORT_MACRO - e.g., __WXGTK__ // WX_VERSION - e.g., -2.9, 29 // WX_UNICODE - e.g., u // WX_BUILD_CONFIG - e.g., gtk2-unicode requires += wxwindows includes += $(WXWINDOWS_ROOT)/include/wx$(WX_VERSION) \ $(WXWINDOWS_ROOT)/lib/wx/include/$(WX_BUILD_CONFIG)$(WX_VERSION) macros += WXUSINGDLL $(WX_PORT_MACRO) libpaths += $(WXWINDOWS_ROOT)/lib specific(prop:windows) { Debug::lit_libs += wxbase$(WX_VERSION)$(WX_UNICODE)d Release::lit_libs += wxbase$(WX_VERSION)$(WX_UNICODE) } else { lit_libs += wx_base$(WX_UNICODE)$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/pin_base.mpb0000644000175000017500000000503113154167361016432 0ustar tggtggproject { requires += pin includes += $(PIN_ROOT)/source/include \ $(PIN_ROOT)/source/include/pin \ $(PIN_ROOT)/source/include/pin/gen \ $(PIN_ROOT)/extras/components/include macros += BIGARRAY_MULTIPLIER=1 USING_XED specific (vc9) { runtime_library = 0 compile_flags += /Oy } specific (vc10, vc11, vc12, vc14, vs2017) { runtime_library = MultiThreaded ImageHasSafeExceptionHandlers = false macros += _ITERATOR_DEBUG_LEVEL=0 } specific (prop:windows) { macros += TARGET_WINDOWS _SECURE_SCL=0 configurations -= Debug DisableSpecificWarning += 4530 IgnoreAllDefaultLibraries = true // We need to remove the _DEBUG macro so that Visual Studio does not // try to link against the debug C++ libraries. Otherwise, the program // will not compile, and will have link errors. Debug::macros -= _DEBUG } specific (gnuace, make) { compile_flags += -O3 -fomit-frame-pointer -fno-strict-aliasing -Wno-unknown-pragmas -fno-stack-protector -fPIC compile_flags -= -Wunused-parameter libs += xed } verbatim (make, macros) { ifeq ($(shell uname -s), Darwin) CPPFLAGS += -DTARGET_MAC else CPPFLAGS += -DTARGET_LINUX endif // We have to disable hidden symbols since we are not manually exporting // the main() function. no_hidden_visibility = 1 } verbatim (gnuace, macros) { ifeq ($(shell uname -s), Darwin) CPPFLAGS += -DTARGET_MAC else CPPFLAGS += -DTARGET_LINUX -Wl,--hash-style=sysv endif } } feature(ia32) { includes += $(PIN_ROOT)/extras/xed-ia32/include libpaths += $(PIN_ROOT)/ia32/lib \ $(PIN_ROOT)/ia32/lib-ext \ $(PIN_ROOT)/extras/xed-ia32/lib \ $(PIN_ROOT)/extras/components/lib/ia32 macros += TARGET_IA32 HOST_IA32 avoids += intel64 specific (prop:windows) { libpaths += $(PIN_ROOT)/ia32/lib \ $(PIN_ROOT)/ia32/lib-ext // DO NOT CHANGE ORDER lit_libs += libcpmt libcmt pinvm pin libxed ntdll-32 } specific (make, gnuace) { compile_flags += -m32 } } feature(intel64) { includes += $(PIN_ROOT)/extras/xed-intel64/include libpaths += $(PIN_ROOT)/intel64/lib \ $(PIN_ROOT)/intel64/lib-ext \ $(PIN_ROOT)/extras/xed-intel64/lib \ $(PIN_ROOT)/extras/components/lib/intel64 macros += TARGET_IA32E HOST_IA32E avoids += ia32 specific (prop:windows) { // DO NOT CHANGE ORDER lit_libs += libcpmt libcmt pinvm pin libxed ntdll-64 } } ace-6.4.5+dfsg.orig/MPC/config/boost_wave.mpb0000644000175000017500000000021013154167361017014 0ustar tggtgg// -*- MPC -*- project: boost_base { specific(!prop:windows) { lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_wave$(BOOST_CFG) } } ace-6.4.5+dfsg.orig/MPC/config/unicode.mpb0000644000175000017500000000011113154167361016272 0ustar tggtgg// -*- MPC -*- feature (uses_wchar) { specific { unicode = 1 } } ace-6.4.5+dfsg.orig/MPC/config/wxadvanced.mpb0000644000175000017500000000040313154167361016774 0ustar tggtggproject: wxcore { specific(prop:windows) { Debug::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)d_adv Release::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)_adv } else { lit_libs += wx_$(WX_PORT)$(WX_UNICODE)_adv$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/pcre.mpb0000644000175000017500000000073513154167361015611 0ustar tggtggproject { requires += pcre includes += $(PCRE_ROOT)/include libpaths += $(PCRE_ROOT)/lib // At this point in time (9/17/2009) the windows version of pcre does not // have a version number. And since Visual Studio complains about empty // environment variables, we're not adding the version variable to the // library. This may have to change in the future. specific(prop:microsoft) { lit_libs += pcre } else { lit_libs += pcre$(PCRE_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/build_files.mpb0000644000175000017500000000011213154167361017126 0ustar tggtggproject { Define_Custom(Build) { inputext = .mpc, .mpb, .mwc } } ace-6.4.5+dfsg.orig/MPC/config/xalanc.mpb0000644000175000017500000000023313154167361016117 0ustar tggtgg// -*- MPC -*- project: xerces { requires += xalanc includes += $(XALANCROOT)/include libpaths += $(XALANCROOT)/lib lit_libs += xalan-c xalanMsg } ace-6.4.5+dfsg.orig/MPC/config/mysql.mpb0000644000175000017500000000020513154167361016015 0ustar tggtgg// -*- MPC -*- project { includes += $(MYSQL_ROOT)/include/mysql libpaths += $(MYSQL_ROOT)/lib/mysql lit_libs += mysqlclient } ace-6.4.5+dfsg.orig/MPC/config/pintool_static.mpb0000644000175000017500000000155313154167361017712 0ustar tggtggproject : pin_static { verbatim (make, top) { no_hidden_visibility = 1 } verbatim (gnuace, top) { no_hidden_visibility = 1 } verbatim (make, macros) { ifeq ($(shell uname -s), Darwin) CPPFLAGS += -DTARGET_MAC LDFLAGS += -lpindwarf -lpinpthread LDFLAGS -= -lpthread else CPPFLAGS += -DTARGET_LINUX LDFLAGS += -Wl,--hash-style=sysv -Wl,-Bsymbolic LDFLAGS -= -ldl -lpthread LDLIBS += -lpindwarf -ldl endif } verbatim (gnuace, macros) { ifeq ($(shell uname -s), Darwin) CPPFLAGS += -DTARGET_MAC LDFLAGS += -lpindwarf -lpinpthread LDFLAGS -= -lpthread else # TODO Add support for linking against gcc libraries included with Pin CPPFLAGS += -DTARGET_LINUX LIBS += -lpindwarf LDFLAGS += -Wl,--hash-style=sysv -Wl,-Bsymbolic endif } } ace-6.4.5+dfsg.orig/MPC/config/boost_program_options.mpb0000644000175000017500000000022313154167361021300 0ustar tggtgg// -*- MPC -*- project: boost_base { specific(!prop:windows) { lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_program_options$(BOOST_CFG) } } ace-6.4.5+dfsg.orig/MPC/config/wix.mpb0000644000175000017500000000115713154167361015466 0ustar tggtggproject { custom_only = 1 Define_Custom (WXS) { command = <%quote%>$(WIX_ROOT)/bin/candle.exe<%quote%> inputext = .wxs output_option = -out commandflags = -nologo generic_outputext = .wixobj keyword wix_flags = commandflags } Define_Custom (WXI) { inputext = .wxi } specific { wix_flags += -dtype=<%prj_type%> prebuild += <%rm%> <%project_name%>.msi postbuild += \ <%quote%>$(WIX_ROOT)/bin/light.exe<%quote%> -out <%project_name%>.msi \ <%light_flags%> <%foreach(wxs_files)%><%noextension(wxs_file)%>.wixobj <%endfor%> } } ace-6.4.5+dfsg.orig/MPC/config/wxxml.mpb0000644000175000017500000000035113154167361016031 0ustar tggtggproject: wxbase { specific(prop:windows) { Debug::lit_libs += wx$(WX_VERSION)$(WX_UNICODE)d_xml Release::lit_libs += wx$(WX_VERSION)$(WX_UNICODE)_xml } else { lit_libs += wx_base$(WX_UNICODE)_xml$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/boost_prg_exec_monitor.mpb0000644000175000017500000000022413154167361021422 0ustar tggtgg// -*- MPC -*- project: boost_base { specific(!prop:windows) { lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_prg_exec_monitor$(BOOST_CFG) } } ace-6.4.5+dfsg.orig/MPC/config/python.mpb0000644000175000017500000000016313154167361016174 0ustar tggtgg// -*- MPC -*- project { requires += python includes += $(PYTHON_INCLUDE)/. libpaths += $(PYTHON_LIBDIR)/. } ace-6.4.5+dfsg.orig/MPC/config/mysqlpp.mpb0000644000175000017500000000021413154167361016355 0ustar tggtgg// -*- MPC -*- project: mysql { includes += $(MYSQLPLUS_ROOT)/include/mysql++ libpaths += $(MYSQLPLUS_ROOT)/lib lit_libs += mysqlpp } ace-6.4.5+dfsg.orig/MPC/config/wxmedia.mpb0000644000175000017500000000045213154167361016312 0ustar tggtggproject: wxcore { specific(prop:windows) { Debug::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)d_media Release::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)_media } else { lit_libs += wx_$(WX_PORT)$(WX_UNICODE)media$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/qt.mpb0000644000175000017500000000232413154167361015300 0ustar tggtgg// -*- MPC -*- project { requires += qt includes += $(QTDIR)/include libpaths += $(QTDIR)/lib $(QTDIR)/lib64 macros += QT_THREAD_SUPPORT lit_libs += qt-mt$(QT_VERSION) // Some Linux installations have the includes here. specific(!prop:windows) { includes += /usr/include/qt3 } Define_Custom(UIC) { command = $(QTDIR)/bin/uic output_option = -o inputext = .ui header_outputext = .h } Define_Custom(UIC_Impl) { command = $(QTDIR)/bin/uic commandflags = -impl <%quote%><%output_noext%>.h<%quote%> dependent = <%output_noext%>.h output_option = -o pch_postrule = 1 inputext = .ui source_outputext = .cpp } Define_Custom(MOC) { automatic_in = 0 automatic_out = 0 command = $(QTDIR)/bin/moc output_option = -o pch_postrule = 1 inputext = .h pre_extension = _moc source_outputext = .cpp } Define_Custom(QRC) { command = $(QTDIR)/bin/rcc output_option = -o commandflags = -name <%input_noext%> pch_postrule = 1 inputext = .qrc pre_extension = _qrc source_outputext = .cpp } } ace-6.4.5+dfsg.orig/MPC/config/qt4_opengl.mpb0000644000175000017500000000010413154167361016722 0ustar tggtgg// -*- MPC -*- project: qt4_gui { lit_libs += QtOpenGL$(QT_CFG) } ace-6.4.5+dfsg.orig/MPC/config/boost_regex.mpb0000644000175000017500000000021113154167361017165 0ustar tggtgg// -*- MPC -*- project: boost_base { specific(!prop:windows) { lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_regex$(BOOST_CFG) } } ace-6.4.5+dfsg.orig/MPC/config/global.features0000644000175000017500000000231013154167361017147 0ustar tggtgg// The global features file contains the default feature settings. // By default, if a feature isn't listed here then it is enabled. // If it is listed, then the value assigned to the feature is interpreted // as a boolean value. You really shouldn't have to edit this file except // to change the defaults. If you want to override these values you can do // one of two things. // // 1) Create a default.features in this directory with the features you // want enabled or disabled. // 2) Create a feature file anywhere you like with the features you want and // use the -feature_file option to specify where it is located. // // Feature definitions from this file are always overridden by the -features // option. // // By default we disable these. boost = 0 bzip2 = 0 erlang = 0 java = 0 mfc = 0 libpng = 0 openssl11 = 0 python = 0 qt = 0 rpc = 0 swig_java = 0 swig_perl = 0 swig_php = 0 swig_python = 0 swig_ruby = 0 swig_tcl = 0 uses_wchar = 0 // i.e., unicode wireshark = 0 xalanc = 0 xerces = 0 xerces2 = 0 xerces3 = 0 ziparchive = 0 zlib = 0 zzip = 0 ace-6.4.5+dfsg.orig/MPC/config/spliceexe.mpb0000644000175000017500000000004713154167361016635 0ustar tggtgg// -*- MPC -*- project : splicelib { } ace-6.4.5+dfsg.orig/MPC/config/swig_perl.mpb0000644000175000017500000000056313154167361016652 0ustar tggtgg// -*- MPC -*- project { Define_Custom(SWIG) { command = swig commandflags = -perl -c++ inputext = .swg, .swig, .i source_outputext = _wrap.cxx generic_outputext = .pm } requires += swig_perl includes += $(PERL5_INCLUDE)/. libpaths += $(PERL5_INCLUDE)/. specific(prop:windows) { lit_libs += $(PERL5_LIB) } } ace-6.4.5+dfsg.orig/MPC/config/portico.mpb0000644000175000017500000000042213154167361016330 0ustar tggtggproject { requires += portico includes += $(RTI_HOME)/include/ng6 libpaths += $(RTI_HOME)/lib macros += RTI_USES_STD_FSTREAM specific (prop:windows) { lit_libs += libRTI-NG libFedTime DisableSpecificWarnings += 4996 } else { libs += RTI-NG } } ace-6.4.5+dfsg.orig/MPC/config/lzo2.mpb0000644000175000017500000000050613154167361015542 0ustar tggtgg// -*- MPC -*- feature(lzo2) { // If the include files for lzo2 are not relative to the root (for // example, /usr/include/lzo), set the LZO2_INCDIR environment variable. expand(LZO2_INCDIR) { $LZO2_INCDIR $(LZO2_ROOT)/include } includes += $(LZO2_INCDIR) libpaths += $(LZO2_ROOT)/lib lit_libs += lzo2 } ace-6.4.5+dfsg.orig/MPC/config/qt3.mpb0000644000175000017500000000003713154167361015362 0ustar tggtgg// -*- MPC -*- project: qt { } ace-6.4.5+dfsg.orig/MPC/config/swig_python.mpb0000644000175000017500000000054013154167361017224 0ustar tggtgg// -*- MPC -*- project { Define_Custom(SWIG) { command = swig commandflags = -python -c++ inputext = .swg, .swig, .i source_outputext = _wrap.cxx generic_outputext = .py } requires += swig_python includes += $(PYTHON_INCLUDE)/. libpaths += $(PYTHON_LIBPATH)/. specific { lib_prefix = } } ace-6.4.5+dfsg.orig/MPC/config/swig_tcl.mpb0000644000175000017500000000042113154167361016463 0ustar tggtgg// -*- MPC -*- project { Define_Custom(SWIG) { command = swig commandflags = -tcl -c++ inputext = .swg, .swig, .i source_outputext = _wrap.cxx } requires += swig_tcl includes += $(TCL_INCLUDE)/. libpaths += $(TCL_LIBPATH)/. } ace-6.4.5+dfsg.orig/MPC/config/zzip.mpb0000644000175000017500000000055213154167361015651 0ustar tggtgg// -*- MPC -*- feature(zzip): zlib { requires += zlib includes += $(ZZIP_ROOT)/include macros += USE_ZZIP libpaths += $(ZZIP_ROOT)/lib // @@ Notice: If you are building with Cygwin, you may need to manually // change the following library to zziplib. specific(prop:windows) { libs += zziplib } else { lit_libs += zzip } } ace-6.4.5+dfsg.orig/MPC/config/nddsmonitor.mpb0000644000175000017500000000011413154167361017207 0ustar tggtgg// -*- MPC -*- feature (nddsmonitor) : nddslib { libs += rtimonitoring } ace-6.4.5+dfsg.orig/MPC/config/gsl.mpb0000644000175000017500000000006213154167361015436 0ustar tggtgg// -*- MPC -*- feature(gsl) { lit_libs += gsl } ace-6.4.5+dfsg.orig/MPC/config/log4cplus.mpb0000644000175000017500000000017713154167361016574 0ustar tggtgg// -*- MPC -*- project { includes += $(LOG4CPLUS_ROOT)/include libpaths += $(LOG4CPLUS_ROOT)/lib libs += log4cplus } ace-6.4.5+dfsg.orig/MPC/config/splice_ts_defaults.mpb0000644000175000017500000000125513154167361020532 0ustar tggtgg// -*- MPC -*- project : taoidldefaults { Define_Custom(SpliceTypeSupport) { command = $(OSPL_HOME)/bin/idlpp dependent = $(OSPL_HOME)/bin/idlpp source_pre_extension = SplDcps, Dcps_impl source_outputext = .cpp header_pre_extension = , SplDcps, Dcps_impl header_pre_filename = ccpp_ header_outputext = .h generic_pre_extension = Dcps generic_outputext = .idl keyword splice_ts_flags = commandflags } splice_ts_flags += \ -I $(OSPL_HOME)/include/dcps/C++/CCPP/$(SPLICE_ORB) \ -C -l cpp -b CCPP/$(SPLICE_ORB) idlflags += -I $(OSPL_HOME)/custom_lib/ccpp \ -I $(OSPL_HOME)/etc/idl } ace-6.4.5+dfsg.orig/MPC/config/boost_iostreams.mpb0000644000175000017500000000021513154167361020065 0ustar tggtgg// -*- MPC -*- project: boost_base { specific(!prop:windows) { lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_iostreams$(BOOST_CFG) } } ace-6.4.5+dfsg.orig/MPC/config/qt4_test.mpb0000644000175000017500000000010313154167361016414 0ustar tggtgg// -*- MPC -*- project: qt4_core { lit_libs += QtTest$(QT_CFG) } ace-6.4.5+dfsg.orig/MPC/config/iodbc.mpb0000644000175000017500000000036513154167361015737 0ustar tggtggproject { // Support for iODBC (http://www.iodbc.org). This is one // variant of porting ODBC to non-Windows systems. avoids += unixodbc libpaths += $(IODBC_ROOT)/lib includes += $(IODBC_ROOT)/include lit_libs += iodbc iodbcinst } ace-6.4.5+dfsg.orig/MPC/config/bzip2.mpb0000644000175000017500000000032313154167361015677 0ustar tggtgg// -*- MPC -*- feature(bzip2) { includes += $(BZIP2_ROOT)/include libpaths += $(BZIP2_ROOT)/lib macros += USE_BZIP2 specific(prop:windows) { lit_libs += bzip2 } else { lit_libs += bz2 } } ace-6.4.5+dfsg.orig/MPC/config/boost_unit_test_framework.mpb0000644000175000017500000000054113154167361022154 0ustar tggtgg// -*- MPC -*- project: boost_base { // Starting with boost 1.34 auto linking is enabled. // vc6 and vc7 are added to this list because it is likely that // any vc6 or vc7 users are using an older pre-auto-linking version. specific(!prop:windows, vc6, vc7) { lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_unit_test_framework$(BOOST_CFG) } } ace-6.4.5+dfsg.orig/MPC/config/boost_filesystem.mpb0000644000175000017500000000021613154167361020244 0ustar tggtgg// -*- MPC -*- project: boost_base { specific(!prop:windows) { lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_filesystem$(BOOST_CFG) } } ace-6.4.5+dfsg.orig/MPC/config/nddsexe.mpb0000644000175000017500000000004513154167361016304 0ustar tggtgg// -*- MPC -*- project : nddslib { } ace-6.4.5+dfsg.orig/MPC/config/splicelib_with_idl.mpb0000644000175000017500000000007313154167361020504 0ustar tggtgg// -*- MPC -*- project : splicelib, splice_ts_defaults { } ace-6.4.5+dfsg.orig/MPC/config/ndds_ts_defaults.mpb0000644000175000017500000000175313154167361020206 0ustar tggtgg// -*- MPC -*- project { Define_Custom(NDDSTypeSupport) { command = <%quote%>$(NDDSSCRIPTDIR)/rtiddsgen<%quote%> commandflags = -language C++ -replace -namespace $(PLATFORM_NDDS_FLAGS) dependent = $(NDDSSCRIPTDIR)/rtiddsgen<%bat%> source_pre_extension = , Support, Plugin source_outputext = .cxx header_pre_extension = , Support, Plugin header_outputext = .h keyword ndds_ts_flags = commandflags } requires += ndds verbatim(gnuace, macros, 1) { override no_hidden_visibility = 1 override no_strict_aliasing = 1 ifdef NDDSHOME ifndef NDDSSCRIPTDIR # At the moment NDDSHOME has been set but not NDDSSCRIPTDIR we see if # the scripts directory exists, if so we use that, if not we use bin ifneq ($(wildcard $(NDDSHOME)/scripts),) NDDSSCRIPTDIR = $(NDDSHOME)/scripts else NDDSSCRIPTDIR = $(NDDSHOME)/bin endif endif endif } } ace-6.4.5+dfsg.orig/MPC/config/openmpi.mpb0000644000175000017500000000017713154167361016327 0ustar tggtgg// -*- MPC -*- project { includes += $(MPI_ROOT)/include libpaths += $(MPI_ROOT)/lib lit_libs += mpi requires += mpi } ace-6.4.5+dfsg.orig/MPC/config/lzo1.mpb0000644000175000017500000000061313154167361015540 0ustar tggtgg// -*- MPC -*- feature(lzo1) { // If the include files for lzo1 are not relative to the root (for // example, /usr/include/lzo), set the LZO1_INCDIR environment variable. expand(LZO1_INCDIR) { $LZO1_INCDIR $(LZO1_ROOT)/include } includes += $(LZO1_INCDIR) libpaths += $(LZO1_ROOT)/lib specific (prop:microsoft) { lit_libs += liblzo } else { lit_libs += lzo } } ace-6.4.5+dfsg.orig/MPC/config/xerces.mpb0000644000175000017500000000275613154167361016156 0ustar tggtgg// -*- MPC -*- feature(!xerces2, !xerces3) { requires += xerces } feature(xerces2) { includes += $(XERCESCROOT)/include libpaths += $(XERCESCROOT)/lib specific(prop:microsoft) { xerceslib = xerces-c_2 // Linking the optimized version of xerces-c_2 into a debug application // has been known to cause run-time issues (as of 4/25/2005), so we // will link in the debug version for the "Debug" configuration. Debug::xerceslib = xerces-c_2D } specific(prop:borland) { xerceslib = XercesLib } specific(!prop:windows) { macros += XML_USE_PTHREADS xerceslib = xerces-c } // We have to use lit_libs here as the library decorator // does not necessarily match what MPC uses (particularly for // static builds). lit_libs += $(XERCESLIB) } feature(xerces3) { includes += $(XERCESCROOT)/include libpaths += $(XERCESCROOT)/lib specific(prop:microsoft) { xerceslib = xerces-c_3 // Linking the optimized version of xerces-c_2 into a debug application // has been known to cause run-time issues (as of 4/25/2005), so we // will link in the debug version for the "Debug" configuration. Debug::xerceslib = xerces-c_3D } specific(prop:borland) { xerceslib = XercesLib } specific(!prop:windows) { macros += XML_USE_PTHREADS xerceslib = xerces-c } // We have to use lit_libs here as the library decorator // does not necessarily match what MPC uses (particularly for // static builds). lit_libs += $(XERCESLIB) } ace-6.4.5+dfsg.orig/MPC/config/wxqa.mpb0000644000175000017500000000045113154167361015633 0ustar tggtggproject: wxcore, wxxml { specific(prop:windows) { Debug::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)d_qa Release::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)_qa } else { lit_libs += wx_$(WX_PORT)$(WX_UNICODE)_qa$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/pintool.mpb0000644000175000017500000000272413154167361016344 0ustar tggtggproject : pin { specific (prop:windows) { link_options += /EXPORT:main } verbatim (make, top) { no_hidden_visibility = 1 } verbatim (gnuace, top) { no_hidden_visibility = 1 } verbatim (make, macros) { ifeq ($(shell uname -s), Darwin) CPPFLAGS += -DTARGET_MAC LDFLAGS += -lpindwarf -lpinpthread -Wl,-exported_symbols_list -Wl,$(PIN_ROOT)/source/include/pin/pintool.exp LDFLAGS -= -lpthread else CPPFLAGS += -DTARGET_LINUX -Wl,--hash-style=sysv LDLIBS += -lpindwarf LDFLAGS += -Wl,-Bsymbolic -Wl,--version-script=$(PIN_ROOT)/source/include/pin/pintool.ver endif } verbatim (gnuace, macros) { ifeq ($(shell uname -s), Darwin) CPPFLAGS += -DTARGET_MAC LDFLAGS += -lpindwarf -lpinpthread -Wl,-exported_symbols_list -Wl,$(PIN_ROOT)/source/include/pin/pintool.exp LDFLAGS -= -lpthread else CPPFLAGS += -DTARGET_LINUX -Wl,--hash-style=sysv LIBS += -lpindwarf LDFLAGS += -Wl,-Bsymbolic -Wl,--version-script=$(PIN_ROOT)/source/include/pin/pintool.ver endif } } feature (ia32) { specific (vc9) { link_options += /ENTRY:Ptrace_DllMainCRTStartup@12 } specific (vc10, vc11, vc12, vc14, vs2017) { EntryPointSymbol = Ptrace_DllMainCRTStartup@12 } } feature (intel64) { specific (vc9) { link_options += /ENTRY:Ptrace_DllMainCRTStartup } specific (vc10, vc11, vc12, vc14, vs2017) { EntryPointSymbol = Ptrace_DllMainCRTStartup } } ace-6.4.5+dfsg.orig/MPC/config/lex.mpb0000644000175000017500000000035613154167361015447 0ustar tggtggproject { requires += lex Define_Custom(LEX) { command = lex commandflags = -t output_option = > pch_postrule = 1 inputext = .ll, .l source_outputext = .c, .cpp, .cxx, .cc, .C } } ace-6.4.5+dfsg.orig/MPC/config/boost_serialization.mpb0000644000175000017500000000022113154167361020731 0ustar tggtgg// -*- MPC -*- project: boost_base { specific(!prop:windows) { lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_serialization$(BOOST_CFG) } } ace-6.4.5+dfsg.orig/MPC/config/openssl.mpb0000644000175000017500000000202313154167361016333 0ustar tggtgg// -*- MPC -*- // openssl is a completely different feature than ssl. // Currently ssl uses openssl, and openssl is enabled by // default. If we ever add a new ssl library, then you // would likely enable only one ssl library feature. feature(openssl) { includes += $(SSL_ROOT)/include libpaths += $(SSL_ROOT)/lib specific(prop:windows) { lit_libs += libeay32 ssleay32 includes += $(SSL_ROOT)/inc32 libpaths += $(SSL_ROOT)/out32dll $(SSL_ROOT)/out32 } else { lit_libs += ssl crypto // Some Linux OpenSSL installations compile in Kerberos support. Add // the Kerberos include path to preprocessor include path. includes += /usr/kerberos/include } // Some prepackaged installations of OpenSSL have libraries in different // locations. specific(prop:borland) { libpaths += $(SSL_ROOT)/lib/Builder5 } specific(prop:microsoft) { libpaths += $(SSL_ROOT)/lib/VC } } feature(openssl11) { specific(prop:windows) { lit_libs -= libeay32 ssleay32 lit_libs += libssl libcrypto } } ace-6.4.5+dfsg.orig/MPC/config/openmp.mpb0000644000175000017500000000010113154167361016141 0ustar tggtggfeature(openmp) { verbatim(gnuace, top) { openmp ?= 1 } }ace-6.4.5+dfsg.orig/MPC/config/cppunit.mpb0000644000175000017500000000017113154167361016334 0ustar tggtgg// -*- MPC -*- project { includes += $(CPPUNIT_ROOT)/include libpaths += $(CPPUNIT_ROOT)/lib lit_libs += cppunit } ace-6.4.5+dfsg.orig/MPC/config/xscdefaults.mpb0000644000175000017500000000107313154167361017201 0ustar tggtgg// -*- MPC -*- project { specific { xsc_bin = $(XSC_ROOT)/bin/xsc xsc_dep = $(XSC_ROOT)/bin/xsc xsc_flags = --backend cxx --cxx-char-type ACE_TCHAR --cxx-generate-writer-types } Define_Custom(XSC) { automatic = 0 dependent = $(XSC_DEP) command = $(XSC_BIN) commandflags = $(XSC_FLAGS) inputext = .xsd source_outputext = .cpp header_outputext = .hpp keyword xscflags = commandflags } } ace-6.4.5+dfsg.orig/MPC/config/boost_thread.mpb0000644000175000017500000000021213154167361017323 0ustar tggtgg// -*- MPC -*- project: boost_base { specific(!prop:windows) { lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_thread$(BOOST_CFG) } } ace-6.4.5+dfsg.orig/MPC/config/zlib.mpb0000644000175000017500000000054713154167361015621 0ustar tggtgg// -*- MPC -*- feature(zlib) { includes += "$(ZLIB_ROOT)/include" libpaths += "$(ZLIB_ROOT)/lib" macros += ZLIB // @@ Notice: If you are building with Cygwin, you may need to manually // change the following library to zlib. specific(prop:windows) { zlibname = zlib lit_libs += $(ZLIBNAME) } else { lit_libs += z } } ace-6.4.5+dfsg.orig/MPC/config/wxstc.mpb0000644000175000017500000000044513154167361016026 0ustar tggtggproject: wxcore { specific(prop:windows) { Debug::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)d_stc Release::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)_stc } else { lit_libs += wx_$(WX_PORT)$(WX_UNICODE)_stc$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/opalorb.mpb0000644000175000017500000000022013154167361016303 0ustar tggtgg// -*- MPC -*- project { Define_Custom(Perl_IDL) { command = perl <%quote%>$(OPALORB_ROOT)/idl/idl.pl<%quote%> inputext = .idl } } ace-6.4.5+dfsg.orig/MPC/config/sqlapi.mpb0000644000175000017500000000014713154167361016146 0ustar tggtggproject { includes += $(SQLAPI_ROOT)/include libpaths += $(SQLAPI_ROOT)/lib lit_libs += sqlapi } ace-6.4.5+dfsg.orig/MPC/config/libpng.mpb0000644000175000017500000000025313154167361016126 0ustar tggtgg// -*- MPC -*- feature(libpng): zlib { requires += zlib includes += "$(PNG_ROOT)/include/libpng" libpaths += "$(PNG_ROOT)/lib" lit_libs += png macros += PNG } ace-6.4.5+dfsg.orig/MPC/config/gdiplus.mpb0000644000175000017500000000012313154167361016316 0ustar tggtgg// -*- MPC -*- project { specific (prop:windows) { lit_libs += gdiplus } } ace-6.4.5+dfsg.orig/MPC/config/global.mpb0000644000175000017500000000044113154167361016112 0ustar tggtgg// -*- MPC -*- project { // By default send all libraries to the same directory as the project libout = . // Automake doesn't need the project directory in the libpaths specific(!automake) { libpaths = . } } feature(threads) { specific(cdt6) { use_threads = 1 } } ace-6.4.5+dfsg.orig/MPC/config/wix_ui.mpb0000644000175000017500000000016313154167361016157 0ustar tggtggproject : wix { specific { wix_flags += -ext WixUIExtension light_flags += '-ext WixUIExtension' } } ace-6.4.5+dfsg.orig/MPC/config/mfc.mpb0000644000175000017500000000023013154167361015413 0ustar tggtgg// -*- MPC -*- project: winapp { requires += mfc macros += _AFXDLL specific { use_mfc = 2 unicode_mfc_entry = wWinMainCRTStartup } } ace-6.4.5+dfsg.orig/MPC/config/qt4_qt3support.mpb0000644000175000017500000000013613154167361017607 0ustar tggtgg// -*- MPC -*- project: qt4_gui { lit_libs += Qt3Support$(QT_CFG) macros += QT3_SUPPORT } ace-6.4.5+dfsg.orig/MPC/config/glib.mpb0000644000175000017500000000057613154167361015600 0ustar tggtggproject { // Support alternate versions of glib: expand(GLIB_VERSION) { $GLIB_VERSION 2.0 } expand(GLIB_LIB_DIR) { $GLIB_LIB_DIR lib } includes += $(GLIB_ROOT)/include/glib-$(GLIB_VERSION) \ $(GLIB_ROOT)/$(GLIB_LIB_DIR)/glib-$(GLIB_VERSION)/include libpaths += $(GLIB_ROOT)/lib lit_libs += glib-$(GLIB_VERSION) } ace-6.4.5+dfsg.orig/MPC/config/wxaui.mpb0000644000175000017500000000047013154167361016011 0ustar tggtggproject: wxadvanced, wxhtml, wxxml { specific(prop:windows) { Debug::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)d_aui Release::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)_aui } else { lit_libs += wx_$(WX_PORT)$(WX_UNICODE)_aui$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/winapp.mpb0000644000175000017500000000027313154167361016153 0ustar tggtgg// -*- MPC -*- project { specific(em3, nmake, vc6) { subsystem = windows } else { subsystem = 2 } specific(vc10, vc11, vc12, vc14, vs2017) { subsystem = Windows } } ace-6.4.5+dfsg.orig/MPC/config/mpich.mpb0000644000175000017500000000031313154167361015750 0ustar tggtggproject { includes += $(MPI_ROOT)/include $(MPI_ROOT)/include/mpi libpaths += $(MPI_ROOT)/lib requires += mpi specific(prop:windows) { lit_libs += mpi } else { lit_libs += mpich } } ace-6.4.5+dfsg.orig/MPC/config/spliceexe_with_idl.mpb0000644000175000017500000000007313154167361020517 0ustar tggtgg// -*- MPC -*- project : spliceexe, splice_ts_defaults { } ace-6.4.5+dfsg.orig/MPC/config/wxpropertygrid.mpb0000644000175000017500000000047013154167361017765 0ustar tggtggproject: wxadvanced { specific(prop:windows) { Debug::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)d_propgrid Release::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)_propgrid } else { lit_libs += wx_$(WX_PORT)$(WX_UNICODE)_propgrid$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/wxmsvs.mpb0000644000175000017500000000061513154167361016224 0ustar tggtggproject { // These settings are specific to wxWindows 2.9.X on Visual Studio. // If you are using a different version of wxWindows, feel free to change // the version number to match your version. expand(WX_PORT) { msw } expand(WX_PORT_MACRO) { __WXMSW__ } expand(WX_VERSION) { 29 } expand(WX_UNICODE) { u } expand(WX_BUILD_CONFIG) { msw-unicode } } ace-6.4.5+dfsg.orig/MPC/config/wxmake.mpb0000644000175000017500000000107213154167361016147 0ustar tggtggproject { verbatim(make, macros) { WX_PORT = $(shell $(WXWINDOWS_ROOT)/bin/wx-config --query-toolkit) WX_PORT_MACRO = $(shell $(WXWINDOWS_ROOT)/bin/wx-config --cflags | sed 's/.*\-D__/__/; s/__ .*/__/') WX_VERSION = -$(shell $(WXWINDOWS_ROOT)/bin/wx-config --version | sed 's/^\\([0-9]*\\)\\.\\([0-9]*\\)\\.[0-9]*/\\1.\\2/') WX_CHARTYPE = $(shell $(WXWINDOWS_ROOT)/bin/wx-config --query-chartype) WX_UNICODE = $(shell echo $(WX_CHARTYPE) | sed 's!unicode!u!;s!ansi!!') WX_BUILD_CONFIG = $(WX_PORT)-$(WX_CHARTYPE) } } ace-6.4.5+dfsg.orig/MPC/config/yacc.mpb0000644000175000017500000000057413154167361015600 0ustar tggtggproject { requires += yacc Define_Custom(YACC) { command = yacc commandflags = -d postcommand = <%mv%> y.tab.c <%source_file%> <%and%> <%mv%> y.tab.h <%header_file%> pch_postrule = 1 inputext = .yy, .y pre_extension = .tab source_outputext = .c, .cpp, .cxx, .cc, .C header_outputext = .h, .hpp, .hxx, .hh } } ace-6.4.5+dfsg.orig/MPC/config/qt4_xml.mpb0000644000175000017500000000010213154167361016234 0ustar tggtgg// -*- MPC -*- project: qt4_core { lit_libs += QtXml$(QT_CFG) } ace-6.4.5+dfsg.orig/MPC/config/tena_base.mpb0000644000175000017500000000016213154167361016573 0ustar tggtggproject { requires += tena includes += $(TENA_HOME)/$(TENA_VERSION)/include libpaths += $(TENA_HOME)/lib } ace-6.4.5+dfsg.orig/MPC/config/wireshark.mpb0000644000175000017500000000206713154167361016657 0ustar tggtggproject : glib { requires += wireshark // Unfortunately Wireshark does not install headers for plugin // development; instead we rely on the source distribution: includes += $(WIRESHARK_SRC) specific(vc71) { macros += MSC_VER_REQUIRED=1310 } specific(vc8) { macros += MSC_VER_REQUIRED=1400 } specific(vc9) { macros += MSC_VER_REQUIRED=1500 } specific(vc10) { macros += MSC_VER_REQUIRED=1600 } specific(vc11) { macros += MSC_VER_REQUIRED=1700 } specific(vc12) { macros += MSC_VER_REQUIRED=1800 } specific(vc14) { macros += MSC_VER_REQUIRED=1900 } specific(vs2017) { macros += MSC_VER_REQUIRED=1910 } verbatim(nmake, top) { include $(WIRESHARK_SRC)/config.nmake } specific(prop:windows) { libpaths += $(WIRESHARK_SRC)/wiretap $(WIRESHARK_SRC)/epan lit_libs += wiretap-$(WIRETAP_VERSION) libwireshark } else { libpaths += $(WIRESHARK_SRC)/wiretap/.libs $(WIRESHARK_SRC)/epan/.libs lit_libs += wiretap wireshark } } ace-6.4.5+dfsg.orig/MPC/config/loki.mpb0000644000175000017500000000016013154167361015606 0ustar tggtgg// -*- MPC -*- project { includes += $(LOKI_ROOT)/include libpaths += $(LOKI_ROOT)/lib lit_libs += loki } ace-6.4.5+dfsg.orig/MPC/config/nddslib.mpb0000644000175000017500000000124313154167361016272 0ustar tggtgg// -*- MPC -*- project { requires += ndds libs += nddscpp nddsc nddscore libpaths += $(NDDSHOME)/lib/$(NDDSARCHITECTURE) includes += $(NDDSHOME)/include $(NDDSHOME)/include/ndds specific(prop:windows) { macros += RTI_WIN32 NDDS_DLL_VARIABLE } verbatim(gnuace, circuit) { ifeq ($(buildbits),64) FLAGS_C_CC += -DRTI_64BIT endif ifeq ($(ACE_PLATFORM_CONFIG),config-linux.h) FLAGS_C_CC += -DRTI_LINUX endif ifeq ($(ACE_PLATFORM_CONFIG),config-android.h) FLAGS_C_CC += -DRTI_LINUX endif ifeq ($(ACE_PLATFORM_CONFIG),config-win32.h) FLAGS_C_CC += -DRTI_WIN32 else FLAGS_C_CC += -DRTI_UNIX endif } } ace-6.4.5+dfsg.orig/MPC/config/qt4_sql.mpb0000644000175000017500000000010213154167361016233 0ustar tggtgg// -*- MPC -*- project: qt4_core { lit_libs += QtSql$(QT_CFG) } ace-6.4.5+dfsg.orig/MPC/config/boost_signals.mpb0000644000175000017500000000021313154167361017515 0ustar tggtgg// -*- MPC -*- project: boost_base { specific(!prop:windows) { lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_signals$(BOOST_CFG) } } ace-6.4.5+dfsg.orig/MPC/config/pin_static.mpb0000644000175000017500000000012513154167361017006 0ustar tggtggproject : pin { specific (!prop:windows) { libs += sapin libs -= pin } } ace-6.4.5+dfsg.orig/MPC/config/bison.mpb0000644000175000017500000000044213154167361015765 0ustar tggtggproject { requires += bison Define_Custom(BISON) { command = bison commandflags = -d pch_postrule = 1 inputext = .yy, .y pre_extension = .tab source_outputext = .c, .cpp, .cxx, .cc, .C header_outputext = .h, .hpp, .hxx, .hh } } ace-6.4.5+dfsg.orig/MPC/config/erlang.mpb0000644000175000017500000000050413154167361016122 0ustar tggtggproject { requires += erlang Define_Custom(Erlang) { automatic_in = 1 automatic_out = 1 command = erlc inputext = .erl, .yrl, .mib, .bin, .rel, .asn1, .idl generic_outputext = .beam, .jam, .erl, .hrl, .bin, .rel, .boot, .asn1db keyword erlcflags = commandflags } } ace-6.4.5+dfsg.orig/MPC/config/upnp.mpb0000644000175000017500000000006013154167361015631 0ustar tggtggproject: ixml { lit_libs += threadutil upnp } ace-6.4.5+dfsg.orig/MPC/config/qt4_core.mpb0000644000175000017500000000052013154167361016370 0ustar tggtgg// -*- MPC -*- project { // If the include files for QT are not relative to the root (for // example, /usr/include/qt4), set the QT4_INCDIR environment variable. expand(QT4_INCDIR) { $QT4_INCDIR $(QTDIR)/include } requires += qt4 includes += $(QT4_INCDIR) libpaths += $(QTDIR)/lib lit_libs += QtCore$(QT_CFG) } ace-6.4.5+dfsg.orig/MPC/config/swig_php.mpb0000644000175000017500000000070413154167361016474 0ustar tggtgg// -*- MPC -*- project { Define_Custom(SWIG) { command = swig commandflags = -php -c++ inputext = .swg, .swig, .i source_outputext = _wrap.cpp header_pre_filename = php_ header_outputext = .h generic_outputext = .php } requires += swig_php includes += $(PHP_INCLUDE)/. $(PHP_INCLUDE)/main $(PHP_INCLUDE)/Zend \ $(PHP_INCLUDE)/TSRM libpaths += $(PHP_LIBPATH)/. } ace-6.4.5+dfsg.orig/MPC/config/erlang_otp.mpb0000644000175000017500000000023013154167361017000 0ustar tggtggproject : erlang { erlcflags += -o ebin Modify_Custom(Erlang) { generic_pre_dirname = ebin/ output_follows_input = 0 } } ace-6.4.5+dfsg.orig/MPC/config/wxrichtext.mpb0000644000175000017500000000050713154167361017066 0ustar tggtggproject: wxadvanced, wxhtml, wxxml { specific(prop:windows) { Debug::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)d_richtext Release::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)_richtext } else { lit_libs += wx_$(WX_PORT)$(WX_UNICODE)_richtext$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/ruby.mpb0000644000175000017500000000006413154167361015634 0ustar tggtgg// -*- MPC -*- feature(ruby) { lit_libs += ruby } ace-6.4.5+dfsg.orig/MPC/config/pin.mpb0000644000175000017500000000011013154167361015431 0ustar tggtggproject : pin_base { specific (!prop:windows) { libs += pin } } ace-6.4.5+dfsg.orig/MPC/config/default.rel0000644000175000017500000000045413154167361016306 0ustar tggtgg// This is the default relative definitions. Wildcards are acceptable. // // The first column is the name for which we create a relative definition. // The second (optional) column, which must be comma separated, is the value // to build up if it isn't defined as an environmenment variable. *_ROOT ace-6.4.5+dfsg.orig/MPC/config/boost_test_exec_monitor.mpb0000644000175000017500000000022513154167361021612 0ustar tggtgg// -*- MPC -*- project: boost_base { specific(!prop:windows) { lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_test_exec_monitor$(BOOST_CFG) } } ace-6.4.5+dfsg.orig/MPC/config/boost_chrono.mpb0000644000175000017500000000021213154167361017344 0ustar tggtgg// -*- MPC -*- project: boost_base { specific(!prop:windows) { lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_chrono$(BOOST_CFG) } } ace-6.4.5+dfsg.orig/MPC/config/ziparchive.mpb0000644000175000017500000000020213154167361017011 0ustar tggtgg// -*- MPC -*- feature(ziparchive) { includes += $(ZIPARCHIVEROOT)/. libpaths += $(ZIPARCHIVEROOT)/lib lit_libs += ziparch }ace-6.4.5+dfsg.orig/MPC/config/gacutil.mpb0000644000175000017500000000031413154167361016301 0ustar tggtggproject { specific(prop:microsoft) { postbuild += \ gacutil -nologo -i <%cwd%>\<%dllout%>\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%> -f } } ace-6.4.5+dfsg.orig/MPC/config/swig_java.mpb0000644000175000017500000000056613154167361016634 0ustar tggtgg// -*- MPC -*- project { Define_Custom(SWIG) { command = swig commandflags = -java -c++ inputext = .swg, .swig, .i source_outputext = _wrap.cxx generic_pre_extension = , JNI generic_outputext = .java } requires += swig_java includes += $(JAVA_ROOT)/include $(JAVA_ROOT)/include/$(JAVA_PLATFORM) } ace-6.4.5+dfsg.orig/MPC/config/pcreposix.mpb0000644000175000017500000000007113154167361016665 0ustar tggtggproject: pcre { lit_libs += pcreposix$(PCRE_VERSION) } ace-6.4.5+dfsg.orig/MPC/config/wix_xml.mpb0000644000175000017500000000016713154167361016346 0ustar tggtggproject : wix { specific { wix_flags += -ext WixUtilExtension light_flags += '-ext WixUtilExtension' } } ace-6.4.5+dfsg.orig/MPC/config/rpc.mpb0000644000175000017500000000045113154167361015437 0ustar tggtgg// -*- MPC -*- project { requires += rpc Define_Custom(rpcgen) { command = rpcgen commandflags = -C pch_postrule = 1 inputext = .x source_pre_extension = _svc, _clnt source_outputext = .c header_outputext = .h } } ace-6.4.5+dfsg.orig/MPC/config/qt4_svg.mpb0000644000175000017500000000010113154167361016232 0ustar tggtgg// -*- MPC -*- project: qt4_xml { lit_libs += QtSvg$(QT_CFG) } ace-6.4.5+dfsg.orig/MPC/config/swig_ruby.mpb0000644000175000017500000000047013154167361016666 0ustar tggtgg// -*- MPC -*- project { Define_Custom(SWIG) { command = swig commandflags = -ruby -c++ inputext = .swg, .swig, .i source_outputext = _wrap.cxx } requires += swig_ruby includes += $(RUBY_INCLUDE)/. libpaths += $(RUBY_LIBPATH)/. specific { lib_prefix = } } ace-6.4.5+dfsg.orig/MPC/config/sqlite3.mpb0000644000175000017500000000017613154167361016243 0ustar tggtggproject { requires += sqlite3 includes += $(SQLITE_ROOT)/include libpaths += $(SQLITE_ROOT)/lib lit_libs += sqlite3 } ace-6.4.5+dfsg.orig/MPC/config/wxdbgrid.mpb0000644000175000017500000000047213154167361016470 0ustar tggtggproject: wxodbc, wxadvanced { specific(prop:windows) { Debug::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)d_dbgrid Release::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)_dbgrid } else { lit_libs += wx_$(WX_PORT)$(WX_UNICODE)_dbgrid$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/config/wxcore.mpb0000644000175000017500000000046013154167361016162 0ustar tggtggproject: wxbase, winapp { specific(prop:windows) { Debug::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)d_core Release::lit_libs += wx$(WX_PORT)$(WX_VERSION)$(WX_UNICODE)_core } else { lit_libs += wx_$(WX_PORT)$(WX_UNICODE)_core$(WX_VERSION) } } ace-6.4.5+dfsg.orig/MPC/generate_export_header.pl0000755000175000017500000000604113154167361017752 0ustar tggtgg#! /usr/bin/perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # ****************************************************************** # Author: Chad Elliott # Date: 3/1/2006 # Description: Generate an export header file for use with various compilers # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** use strict; use FileHandle; use File::Basename; # ****************************************************************** # Data Section # ****************************************************************** my $version = '1.2'; # ****************************************************************** # Subroutine Section # ****************************************************************** sub generate_export_header { my($name, $output) = @_; my $fh = new FileHandle(); my $status = 0; if (open($fh, ">$output")) { $name = uc($name); print $fh <= 0x550) # if defined(${name}_BUILD_DLL) # define ${name}_Export __symbolic # else # define ${name}_Export __global # endif # elif defined(WIN32) || defined(UNDER_CE) || defined(__CYGWIN__) # if defined(${name}_BUILD_DLL) # define ${name}_Export __declspec(dllexport) # else # define ${name}_Export __declspec(dllimport) # endif # elif (defined(__GNUC__) && (__GNUC__ >= 4)) # if defined(${name}_BUILD_DLL) # define ${name}_Export __attribute__((visibility("default"))) # else # define ${name}_Export # endif # else # define ${name}_Export # endif #else # define ${name}_Export #endif #endif EOM ; close($fh); print "Output written to $output\n"; } else { print STDERR "ERROR: Unable to write to $output\n"; ++$status; } return $status; } sub usageAndExit { my $str = shift; print STDERR "$str\n" if (defined $str); print STDERR "Generate Export Header v$version\n", "Usage: ", basename($0), " [output file]\n"; exit(0); } # ****************************************************************** # Main Section # ****************************************************************** my $name = shift; my $output = shift; if (!defined $name) { usageAndExit(); } elsif (index($name, '-') == 0) { usageAndExit(); } if (!defined $output) { $output = $name . '_' . ($name =~ /^[A-Z]/ ? 'E' : 'e') . 'xport.h'; } if ($name =~ s/^\d+//) { print "WARNING: Removing beginning numbers from export name.\n"; } if ($name =~ s/-\s/_/g) { print "WARNING: Converting dashes and ", "whitespace to underscores in export name.\n"; } exit(generate_export_header($name, $output)); ace-6.4.5+dfsg.orig/MPC/modules/0000775000175000017500000000000013157240624014355 5ustar tggtggace-6.4.5+dfsg.orig/MPC/modules/GHSPropertyBase.pm0000644000175000017500000000210613154167361017674 0ustar tggtggpackage GHSPropertyBase; # ************************************************************ # Description : A GHS property base module. # Author : Chad Elliott # Create Date : 3/9/2010 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; # ************************************************************ # Data Section # ************************************************************ our $ghsunix = 'MPC_GHS_UNIX'; # ************************************************************ # Subroutine Section # ************************************************************ sub get_properties { my $self = shift; ## Get the base class properties and add the properties that we ## support. my $props = $self->Creator::get_properties(); ## This project creator can work for UNIX and Windows. Set the ## property based on the environment variable. $$props{'windows'} = 1 if (!defined $ENV{$ghsunix}); return $props; } 1; ace-6.4.5+dfsg.orig/MPC/modules/TemplateParser.pm0000644000175000017500000017252313154167361017656 0ustar tggtggpackage TemplateParser; # ************************************************************ # Description : Parses the template and fills in missing values # Author : Chad Elliott # Create Date : 5/17/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use File::Path; use Parser; use WinVersionTranslator; use vars qw(@ISA); @ISA = qw(Parser); # ************************************************************ # Data Section # ************************************************************ # Valid keywords for use in template files. Each has a handle_ # method available, but some have other methods too. # Bit Meaning # 0 means there is a get_ method available (used by if and nested functions) # 1 means there is a perform_ method available (used by foreach and nested) # 2 means there is a doif_ method available (used by if) # 3 means that parameters to perform_ should not be evaluated # 4 means there is a post_ method available (called after the results of # calling perform_ for a nested function are written to the output) # 5 means that the get_ method performs the get_ and doif_ functionality # # Perl Function Parameter Type Return Type # get_ string string or array # perform_ array reference array # doif_ array reference boolean # my $get_type = 1 << 0; my $perform_type = 1 << 1; my $doif_type = 1 << 2; my $perform_no_eval_type = 1 << 3; my $post_type = 1 << 4; my $get_combined_type = 1 << 5; my %keywords = ('if' => 0, 'else' => 0, 'endif' => 0, 'noextension' => $get_type|$perform_type, 'dirname' => $get_type|$perform_type|$doif_type, 'basename' => $get_type|$perform_type|$doif_type, 'basenoextension' => 0, 'foreach' => 0, 'forfirst' => 0, 'fornotfirst' => 0, 'fornotlast' => 0, 'forlast' => 0, 'endfor' => 0, 'eval' => 0, 'comment' => 0, 'marker' => 0, 'uc' => $get_type|$perform_type, 'lc' => $get_type|$perform_type, 'ucw' => 0, 'normalize' => $get_type|$perform_type, 'flag_overrides' => $get_type, 'reverse' => $get_type|$perform_type, 'sort' => $get_type|$perform_type, 'uniq' => $get_type|$perform_type, 'multiple' => $get_type|$doif_type|$get_combined_type, 'starts_with' => $get_type|$doif_type|$get_combined_type, 'ends_with' => $get_type|$doif_type|$get_combined_type, 'contains' => $get_type|$doif_type|$get_combined_type, 'subst' => $get_type|$doif_type|$get_combined_type, 'remove_from' => $get_type|$perform_type|$doif_type|$perform_no_eval_type|$get_combined_type, 'compares' => $get_type|$doif_type|$get_combined_type, 'vars_equal' => $get_type|$perform_type, 'duplicate_index' => $get_type|$doif_type|$get_combined_type, 'transdir' => $get_type|$doif_type, 'has_extension' => $get_type|$doif_type|$get_combined_type, 'keyname_used' => 0, 'scope' => 0, 'full_path' => $get_type|$perform_type, 'extensions' => $perform_type|$perform_no_eval_type, 'create_aux_file' => $perform_type|$post_type, 'end_aux_file' => 0, 'translate_vars' => $get_type|$perform_type, 'convert_slashes' => $perform_type, 'new_guid' => 0, 'deref' => 0, 'set' => 0, ); my %target_type_vars = ('type_is_static' => 1, 'need_staticflags' => 1, 'type_is_dynamic' => 1, 'type_is_binary' => 1, ); my %arrow_op_ref = ('custom_type' => 'custom types', 'grouped_.*_file' => 'grouped files', 'feature' => 'features', ); # optmized regex my $parse_line_re1 = qr/^[ ]*<%(\w+)(?:\((?:(?:\w+\s*,\s*)*[!]?\w+\(.+\)|[^\)]+)\))?%>$/; my $process_name_re1 = qr/([^%\(]+)(\(([^%]+)\))?%>/; # ************************************************************ # Subroutine Section # ************************************************************ sub new { my($class, $prjc) = @_; my $self = $class->SUPER::new(); $self->{'prjc'} = $prjc; $self->{'ti'} = $prjc->get_template_input(); $self->{'cslashes'} = $prjc->convert_slashes(); $self->{'crlf'} = $prjc->crlf(); $self->{'cmds'} = $prjc->get_command_subs(); $self->{'vnames'} = $prjc->get_valid_names(); $self->{'values'} = {}; $self->{'defaults'} = {}; $self->{'lines'} = []; $self->{'built'} = ''; $self->{'sstack'} = []; $self->{'lstack'} = []; $self->{'if_skip'} = 0; $self->{'eval'} = 0; $self->{'eval_str'} = ''; $self->{'dupfiles'} = {}; $self->{'override_target_type'} = undef; $self->{'keyname_used'} = {}; $self->{'scopes'} = {}; $self->{'aux_file'} = undef; $self->{'foreach'} = {}; $self->{'foreach'}->{'count'} = -1; $self->{'foreach'}->{'nested'} = 0; $self->{'foreach'}->{'name'} = []; $self->{'foreach'}->{'vars'} = []; $self->{'foreach'}->{'text'} = []; $self->{'foreach'}->{'scope'} = []; $self->{'foreach'}->{'scope_name'} = []; $self->{'foreach'}->{'temp_scope'} = []; $self->{'foreach'}->{'processing'} = 0; return $self; } sub tp_basename { my($self, $file) = @_; if ($self->{'cslashes'}) { $file =~ s/.*[\/\\]//; } else { $file =~ s/.*\///; } return $file; } sub validated_dirname { my($self, $file) = @_; my $index = rindex($file, ($self->{'cslashes'} ? '\\' : '/')); if ($index >= 0) { return $self->{'prjc'}->validated_directory(substr($file, 0, $index)); } else { return '.'; } } sub tp_dirname { my($self, $file) = @_; my $index = rindex($file, ($self->{'cslashes'} ? '\\' : '/')); if ($index >= 0) { return substr($file, 0, $index); } else { return '.'; } } sub strip_line { #my $self = shift; #my $line = shift; ## Override strip_line() from Parser. ## We need to preserve leading space and ## there is no comment string in templates. ++$_[0]->{'line_number'}; $_[1] =~ s/\s+$//; return $_[1]; } ## Append the current value to the line that is being ## built. This line may be a foreach line or a general ## line without a foreach. sub append_current { my $value = $_[1]; my $scope = $_[0]->{'scopes'}; while(defined $$scope{'scope'}) { $scope = $$scope{'scope'}; if (defined $$scope{'escape'}) { if ($$scope{'escape'}->[1] < 0 && $_[0]->{'foreach'}->{'count'} >= 0) { ## This scope was created outside of a foreach. If we are ## processing a foreach, we need to skip this at this point as it ## will be handled once the foreach has been completed and is ## appended to the main project body. last; } else { my $key = $$scope{'escape'}->[0]; if ($key eq '\\') { $value =~ s/\\/\\\\/g; } else { $value =~ s/($key)/\\$1/g; } } } else { foreach my $key (keys %$scope) { $_[0]->warning("Unrecognized scope function: $key."); } } } my $foreach_count = $_[0]->{'foreach'}->{'count'}; if ($_[0]->{'aux_file'} && $foreach_count == $_[0]->{'aux_file'}->{'foreach_baseline'}) { $_[0]->{'aux_file'}->{'text'} .= $value; } elsif ($foreach_count >= 0) { $_[0]->{'foreach'}->{'text'}->[$foreach_count] .= $value; } elsif ($_[0]->{'eval'}) { $_[0]->{'eval_str'} .= $value; } else { $_[0]->{'built'} .= $value; } } sub split_parameters { my($self, $str) = @_; my @params; while($str =~ /^(\w+\([^\)]+\))(.*)/ || $str =~ /^([^,]+)(.*)/) { push(@params, $1); $str = $2; $str =~ s/^\s*,\s*//; } ## Return the parameters (which includes whatever is left in the ## string). Just return it instead of pushing it onto @params. return $str eq '' ? @params : (@params, $str); } sub set_current_values { my($self, $name) = @_; my $set = 0; ## If any value within a foreach matches the name ## of a hash table within the template input we will ## set the values of that hash table in the current scope if (defined $self->{'ti'}) { my $counter = $self->{'foreach'}->{'count'}; if ($counter >= 0) { ## Variable names are case-insensitive in MPC, however this can ## cause problems when dealing with template variable values that ## happen to match HASH names only by case-insensitivity. So, we ## now make HASH names match with case-sensitivity. my $value = $self->{'ti'}->get_value($name); if (defined $value && UNIVERSAL::isa($value, 'HASH') && $self->{'ti'}->get_realname($name) eq $name) { $self->{'foreach'}->{'scope_name'}->[$counter] = $name; my %copy; foreach my $key (keys %$value) { $copy{$key} = $self->{'prjc'}->adjust_value( [$name . '::' . $key, $name], $$value{$key}, $self); } $self->{'foreach'}->{'temp_scope'}->[$counter] = \%copy; $set = 1; } else { ## Since we're not creating a temporary scope for this level, we ## need to empty out the scope that may have been held here from ## a previous foreach. $self->{'foreach'}->{'temp_scope'}->[$counter] = {}; } } } return $set; } sub get_value { my($self, $name) = @_; my $value; my $counter = $self->{'foreach'}->{'count'}; my $fromprj; my @scopes; my @snames; my $adjust = 1; ## $name should always be all lower-case $name = lc($name); ## First, check the temporary scope (set inside a foreach) if ($counter >= 0) { ## Create a list of possible scoped names @scopes = reverse @{$self->{'foreach'}->{'scope_name'}}; @snames = map { (defined $_ ? $_ : '') . '::' . $name } @scopes; push(@snames, $name); while(!defined $value && $counter >= 0) { $value = $self->{'foreach'}->{'temp_scope'}->[$counter]->{$name}; --$counter; } $counter = $self->{'foreach'}->{'count'}; if ($self->{'override_target_type'} && defined $value && defined $target_type_vars{$name}) { $value = $self->{'values'}->{$name}; } } else { @snames = ($name); } if (!defined $value) { if ($name =~ /^flag_overrides\((.*)\)$/) { $value = $self->get_flag_overrides($1); } if (!defined $value) { ## Next, check for a template value if (defined $self->{'ti'}) { $value = $self->{'ti'}->get_value($name); } if (!defined $value) { ## Calling adjust_value here allows us to pick up template ## overrides before getting values elsewhere. my $uvalue = $self->{'prjc'}->adjust_value(\@snames, [], $self); if (defined $$uvalue[0]) { $value = $uvalue; $adjust = 0; $fromprj = 1; } if (!defined $value) { ## Next, check the inner to outer foreach ## scopes for overriding values while(!defined $value && $counter >= 0) { $value = $self->{'foreach'}->{'scope'}->[$counter]->{$name}; --$counter; } ## Then get the value from the project creator if (!defined $value) { $fromprj = 1; $value = $self->{'prjc'}->get_assignment($name); ## Then get it from our known values if (!defined $value) { $value = $self->{'values'}->{$name}; if (!defined $value) { ## Call back onto the project creator to allow ## it to fill in the value before defaulting to undef. $value = $self->{'prjc'}->fill_value($name); if (!defined $value && $name =~ /^(.*)\->(\w+)/) { my $pre = $1; my $post = $2; my $base = $self->get_value($pre); if (defined $base) { $value = $self->{'prjc'}->get_special_value( $pre, $post, $base, ($self->{'prjc'}->requires_parameters($post) ? $self->prepare_parameters($pre) : undef)); } } } } } } } } } ## Adjust the value even if we haven't obtained one from an outside ## source. if ($adjust && defined $value) { $value = $self->{'prjc'}->adjust_value(\@snames, $value, $self); } ## If the value did not come from the project creator, we ## check the variable name. If it is a project keyword we then ## check to see if we need to add the project value to the template ## variable value. If so, we make a copy of the value array and ## push the project value onto that (to avoid modifying the original). if (!$fromprj && defined $self->{'vnames'}->{$name} && $self->{'prjc'}->add_to_template_input_value($name)) { my $pjval = $self->{'prjc'}->get_assignment($name); if (defined $pjval) { my @copy = @$value; if (!UNIVERSAL::isa($pjval, 'ARRAY')) { $pjval = $self->create_array($pjval); } push(@copy, @$pjval); $value = \@copy; } } return (defined $value ? $self->{'prjc'}->relative($value, undef, \@scopes) : undef); } sub get_value_with_default { my $self = shift; my $name = lc(shift); my $value = $self->get_value($name); if (!defined $value) { $value = $self->{'defaults'}->{$name}; if (defined $value) { my $counter = $self->{'foreach'}->{'count'}; my $sname; if ($counter >= 0) { ## Find the outer most scope for our variable name for(my $index = $counter; $index >= 0; --$index) { if (defined $self->{'foreach'}->{'scope_name'}->[$index]) { $sname = $self->{'foreach'}->{'scope_name'}->[$index] . '::' . $name; last; } } } $value = $self->{'prjc'}->relative( $self->{'prjc'}->adjust_value( [$sname, $name], $value, $self)); ## If the user set the variable to empty, we will go ahead and use ## the default value (since we know we have one at this point). $value = $self->{'defaults'}->{$name} if (!defined $value); } else { #$self->warning("$name defaulting to empty string."); $value = ''; } } return (UNIVERSAL::isa($value, 'ARRAY') ? "@$value" : $value); } sub process_foreach { my $self = shift; my $index = $self->{'foreach'}->{'count'}; my $text = $self->{'foreach'}->{'text'}->[$index]; my @values; my $name = $self->{'foreach'}->{'name'}->[$index]; my @cmds; my $val = $self->{'foreach'}->{'vars'}->[$index]; my $check_for_mixed; if ($val =~ /^((\w+),\s*)?flag_overrides\((.*)\)$/) { ## If the user did not provide a name we have to pick one otherwise ## there would be no way to access the foreach values. $name = (defined $2 ? $2 : '__unnamed__'); ## Now check to see if there were overrides for this value. If there ## were, convert them into an array (if necessary) and continue ## processing. $val = $self->get_flag_overrides($3); if (defined $val) { $val = $self->create_array($val) if (!UNIVERSAL::isa($val, 'ARRAY')); @values = @$val; } } else { ## Pull out modifying commands first while($val =~ /(\w+)\((.+)\)/) { my $cmd = $1; $val = $2; if (($keywords{$cmd} & $perform_type) != 0) { push(@cmds, 'perform_' . $cmd); if (($keywords{$cmd} & $perform_no_eval_type) != 0) { my @params = $self->split_parameters($val); $val = \@params; last; } } else { $self->warning("Unable to use $cmd in foreach (no perform_ method)."); } } ## Get the values for all of the variable names ## contained within the foreach if (UNIVERSAL::isa($val, 'ARRAY')) { @values = @$val; } else { my $names = $self->create_array($val); foreach my $n (@$names) { my $vals = $self->get_value($n); if (defined $vals && $vals ne '') { if (!UNIVERSAL::isa($vals, 'ARRAY')) { $vals = $self->create_array($vals); } push(@values, @$vals); } if (!defined $name) { $name = $n; $name =~ s/s$//; } ## We only want to check for the mixing of scalar and hash ## variables if the variable name is not a keyword (or the ## special 'features' template variable). if (!$check_for_mixed && !$self->{'prjc'}->is_keyword($n) && $n ne 'features') { $check_for_mixed = 1; } } } } ## Perform the commands on the built up @values foreach my $cmd (reverse @cmds) { @values = $self->$cmd(\@values); } ## Reset the text (it will be regenerated by calling parse_line $self->{'foreach'}->{'text'}->[$index] = ''; if (defined $values[0]) { my $scope = $self->{'foreach'}->{'scope'}->[$index]; my $base = $self->{'foreach'}->{'base'}->[$index]; $$scope{'forlast'} = ''; $$scope{'fornotlast'} = 1; $$scope{'forfirst'} = 1; $$scope{'fornotfirst'} = ''; ## If the foreach values are mixed (HASH and SCALAR), then ## remove the SCALAR values. if ($check_for_mixed) { my %mixed; my $mixed = 0; foreach my $mval (@values) { $mixed{$mval} = $self->set_current_values($mval); $mixed |= $mixed{$mval}; } if ($mixed) { my @nvalues; foreach my $key (sort keys %mixed) { push(@nvalues, $key) if ($mixed{$key}); } ## Set the new values only if they are different ## from the original (except for order). my @sorted = sort(@values); @values = @nvalues if (@sorted != @nvalues); } } for(my $i = 0; $i <= $#values; ++$i) { my $value = $values[$i]; ## Set the corresponding values in the temporary scope $self->set_current_values($value); ## Set the special values that only exist ## within a foreach if ($i != 0) { $$scope{'forfirst'} = ''; $$scope{'fornotfirst'} = 1; } if ($i == $#values) { $$scope{'forlast'} = 1; $$scope{'fornotlast'} = ''; } $$scope{'forcount'} = $i + $base; ## We don't use adjust_value here because these names ## are generated from a foreach and should not be adjusted. $$scope{$name} = $value; ## A tiny hack for VC7 if ($name eq 'configuration' && $self->get_value_with_default('platform') ne '') { $self->{'prjc'}->update_project_info($self, 1, ['configuration', 'platform'], '|'); } ## Now parse the line of text, each time ## with different values ++$self->{'foreach'}->{'processing'}; my($status, $error) = $self->parse_line(undef, $text); --$self->{'foreach'}->{'processing'}; return $error if (defined $error); } } return undef; } sub generic_handle { my($self, $func, $str) = @_; if (defined $str) { my $val = $self->$func([$str]); if (defined $val) { $self->append_current($val); } else { $self->append_current(0); } } } sub handle_endif { my($self, $name) = @_; my $end = pop(@{$self->{'sstack'}}); pop(@{$self->{'lstack'}}); if (!defined $end) { return "Unmatched $name"; } else { my $in = index($end, $name); if ($in == 0) { $self->{'if_skip'} = 0; } elsif ($in == -1) { return "Unmatched $name"; } } return undef; } sub handle_endfor { my($self, $name) = @_; my $end = pop(@{$self->{'sstack'}}); pop(@{$self->{'lstack'}}); if (!defined $end) { return "Unmatched $name"; } else { my $in = index($end, $name); if ($in == 0) { my $index = $self->{'foreach'}->{'count'}; my $error = $self->process_foreach(); if (!defined $error) { --$self->{'foreach'}->{'count'}; $self->append_current($self->{'foreach'}->{'text'}->[$index]); } return $error; } elsif ($in == -1) { return "Unmatched $name"; } } return undef; } sub get_flag_overrides { my($self, $name) = @_; my $type; ## Split the name and type parameters ($name, $type) = split(/,\s*/, $name); my $file = $self->get_value($name); if (defined $file) { ## Save the name prefix (if there is one) for ## command parameter conversion at the end my $pre; if ($name =~ /^(\w+)->/) { $pre = $1; ## Replace the custom_type key with the actual custom type if ($pre eq 'custom_type') { my $ct = $self->get_value($pre); $name = $ct if (defined $ct); } elsif ($pre =~ /^grouped_(.*_file)$/) { $name = $1; } } my $fo = $self->{'prjc'}->{'flag_overrides'}; my $key = (defined $$fo{$name . 's'} ? $name . 's' : (defined $$fo{$name} ? $name : undef)); if (defined $key) { ## Convert the file name into a unix style file name my $ustyle = $file; $ustyle =~ s/\\/\//g if ($self->{'cslashes'}); ## Save the directory portion for checking in the foreach my $dir = $self->mpc_dirname($ustyle); my $of = (defined $$fo{$key}->{$ustyle} ? $ustyle : (defined $$fo{$key}->{$dir} ? $dir : undef)); if (defined $of) { my $prjc = $self->{'prjc'}; foreach my $aname (@{$prjc->{'matching_assignments'}->{$key}}) { if ($aname eq $type && defined $$fo{$key}->{$of}->{$aname}) { my $value = $$fo{$key}->{$of}->{$aname}; ## If the name that we're overriding has a value and ## requires parameters, then we will convert all of the ## pseudo variables and provide parameters. if (defined $pre && $prjc->requires_parameters($type)) { $value = $prjc->convert_command_parameters( $key, $value, $self->prepare_parameters($pre)); } return $prjc->relative($value); } } } } } return undef; } sub get_multiple { my($self, $name) = @_; return $self->doif_multiple( $self->create_array($self->get_value_with_default($name))); } sub doif_multiple { my($self, $value) = @_; return defined $value ? (scalar(@$value) > 1) : undef; } sub handle_multiple { my($self, $name) = @_; my $val = $self->get_value_with_default($name); if (defined $val) { my $array = $self->create_array($val); $self->append_current(scalar(@$array)); } else { $self->append_current(0); } } sub get_starts_with { my($self, $str) = @_; return $self->doif_starts_with([$str]); } sub doif_starts_with { my($self, $val) = @_; if (defined $val) { my($name, $pattern) = $self->split_parameters("@$val"); if (defined $name && defined $pattern) { return ($self->get_value_with_default($name) =~ /^$pattern/); } } return undef; } sub handle_starts_with { my($self, $str) = @_; $self->generic_handle('doif_starts_with', $str); } sub get_ends_with { my($self, $str) = @_; return $self->doif_ends_with([$str]); } sub doif_ends_with { my($self, $val) = @_; if (defined $val) { my($name, $pattern) = $self->split_parameters("@$val"); if (defined $name && defined $pattern) { return ($self->get_value_with_default($name) =~ /$pattern$/); } } return undef; } sub handle_ends_with { my($self, $str) = @_; $self->generic_handle('doif_ends_with', $str); } sub handle_keyname_used { my($self, $str) = @_; if (defined $str) { my($name, $key) = $self->split_parameters($str); my $file = $self->get_value_with_default($name); if (defined $self->{'keyname_used'}->{$file}->{$key}) { $self->append_current($self->{'keyname_used'}->{$file}->{$key}++); } else { $self->{'keyname_used'}->{$file}->{$key} = 1; } } } sub handle_scope { my($self, $str) = @_; if (defined $str) { my($state, $func, $param) = $self->split_parameters($str); if (defined $state) { my $pscope; my $scope = $self->{'scopes'}; while(defined $$scope{'scope'}) { $pscope = $scope; $scope = $$scope{'scope'}; } if ($state eq 'enter') { if (defined $func) { $param = '' if (!defined $param); $$scope{'scope'}->{$func} = [$self->process_special($param), $_[0]->{'foreach'}->{'count'}]; } else { $self->warning("The enter scope function requires a parameter."); } } elsif ($state eq 'leave') { if (defined $pscope) { delete $$pscope{'scope'}; } else { $self->warning("leave scope function encountered without an enter."); } } else { $self->warning("Unrecognized scope function parameter: $state."); } } else { $self->warning("The scope function requires 1 to 3 parameters."); } } } sub get_has_extension { my($self, $str) = @_; return $self->doif_has_extension([$str]); } sub doif_has_extension { my($self, $val) = @_; if (defined $val) { return ($self->tp_basename( $self->get_value_with_default("@$val")) =~ /\.[^\.]*$/); } return undef; } sub handle_has_extension { my($self, $str) = @_; $self->generic_handle('doif_has_extension', $str); } sub get_contains { my($self, $str) = @_; return $self->doif_contains([$str]); } sub doif_contains { my($self, $val) = @_; if (defined $val) { my($name, $pattern) = $self->split_parameters("@$val"); if (defined $name && defined $pattern) { return ($self->get_value_with_default($name) =~ /$pattern/); } } return undef; } sub handle_contains { my($self, $str) = @_; $self->generic_handle('doif_contains', $str); } sub get_subst { my($self, $str) = @_; return $self->doif_subst([$str]); } sub doif_subst { my($self, $val) = @_; if (defined $val) { my($name, $pattern, $replacement) = $self->split_parameters("@$val"); if (defined $name && defined $pattern && defined $replacement) { my $result = $self->get_value_with_default($name); $result =~ s/$pattern/$replacement/g; return $result; } } return undef; } sub handle_subst { my($self, $str) = @_; $self->generic_handle('doif_subst', $str); } sub get_remove_from { my($self, $str) = @_; return $self->doif_remove_from($str); } sub doif_remove_from { my($self, $str) = @_; my @params = $self->split_parameters($str); my @removed = $self->perform_remove_from(\@params); return (defined $removed[0] ? 1 : undef); } sub perform_remove_from { my($self, $val) = @_; my($source, $pattern, $target, $tremove) = @$val; ## $source should be a component name (e.g., source_files, ## header_files, etc.) $target is a variable name ## $pattern and $tremove are optional; $pattern is a partial regular ## expression to match the end of the files found from $source. The ## beginning of the regular expression is made from $target by removing ## $tremove from the end of it. if (defined $source && defined $target && defined $self->{'values'}->{$source}) { my $tval = $self->get_value_with_default($target); if (defined $tval) { $tval =~ s/$tremove$// if (defined $tremove); $tval = $self->escape_regex_special($tval); my @removed; my $max = scalar(@{$self->{'values'}->{$source}}); for(my $i = 0; $i < $max;) { if ($self->{'values'}->{$source}->[$i] =~ /^$tval$pattern$/) { push(@removed, splice(@{$self->{'values'}->{$source}}, $i, 1)); $max--; } else { $i++; } } return @removed; } } return (); } sub handle_remove_from { my($self, $str) = @_; if (defined $str) { my @params = $self->split_parameters($str); my $val = $self->perform_remove_from(\@params); $self->append_current("@$val") if (defined $val); } } sub get_compares { my($self, $str) = @_; return $self->doif_compares([$str]); } sub doif_compares { my($self, $val) = @_; if (defined $val) { my($name, $pattern) = $self->split_parameters("@$val"); if (defined $name && defined $pattern) { return ($self->get_value_with_default($name) eq $pattern); } } return undef; } sub handle_compares { my($self, $str) = @_; $self->generic_handle('doif_compares', $str); } sub get_vars_equal { my($self, $str) = @_; return $self->doif_vars_equal([$str]); } sub doif_vars_equal { my($self, $val) = @_; if (defined $val) { my($var1, $var2) = $self->split_parameters("@$val"); if (defined $var1 && defined $var2) { return ($self->get_value_with_default($var1) eq $self->get_value_with_default($var2)); } } return undef; } sub handle_vars_equal { my($self, $str) = @_; $self->generic_handle('doif_vars_equal', $str); } sub get_reverse { my($self, $name) = @_; my $value = $self->get_value_with_default($name); if (defined $value) { my @array = $self->perform_reverse($self->create_array($value)); return \@array; } return undef; } sub perform_reverse { my($self, $value) = @_; return reverse(@$value); } sub handle_reverse { my($self, $name) = @_; my $val = $self->get_value_with_default($name); if (defined $val) { my @array = $self->perform_reverse($self->create_array($val)); $self->append_current("@array"); } } sub get_sort { my($self, $name) = @_; my $value = $self->get_value_with_default($name); if (defined $value) { my @array = $self->perform_sort($self->create_array($value)); return \@array; } return undef; } sub perform_sort { my($self, $value) = @_; return sort(@$value); } sub handle_sort { my($self, $name) = @_; my $val = $self->get_value_with_default($name); if (defined $val) { my @array = $self->perform_sort($self->create_array($val)); $self->append_current("@array"); } } sub get_uniq { my($self, $name) = @_; my $value = $self->get_value_with_default($name); if (defined $value) { my @array = $self->perform_uniq($self->create_array($value)); return \@array; } return undef; } sub perform_uniq { my($self, $value) = @_; my %value; @value{@$value} = (); return sort(keys %value); } sub handle_uniq { my($self, $name) = @_; my $val = $self->get_value_with_default($name); if (defined $val) { my @array = $self->perform_uniq($self->create_array($val)); $self->append_current("@array"); } } sub process_compound_if { my($self, $str) = @_; if (index($str, '||') >= 0) { my $ret = 0; foreach my $v (split(/\s*\|\|\s*/, $str)) { $ret |= $self->process_compound_if($v); return 1 if ($ret != 0); } return 0; } elsif (index($str, '&&') >= 0) { my $ret = 1; foreach my $v (split(/\s*\&\&\s*/, $str)) { $ret &&= $self->process_compound_if($v); return 0 if ($ret == 0); } return 1; } else { ## See if we need to reverse the return value my $not = 0; if ($str =~ /^!+(.*)/) { $not = 1; $str = $1; } ## Get the value based on the string my @cmds; my $val; while($str =~ /(\w+)\((.+)\)(.*)/) { if ($3 eq '') { push(@cmds, $1); $str = $2; } else { ## If there is something trailing the closing parenthesis then ## the whole thing is considered a parameter to the first ## function. last; } } if (defined $cmds[0]) { ## Start out calling get_xxx on the string my $type = $get_type; my $prefix = 'get_'; $val = $str; ## If there is only one command, we have to add it to the list ## again so that we can get the variable value and then use ## the doif_ version to test it, unless the get_ function ## also performs the doif_ functionality. if ($#cmds == 0 && defined $keywords{$cmds[0]} && ($keywords{$cmds[0]} & $doif_type) != 0 && ($keywords{$cmds[0]} & $get_combined_type) == 0) { push(@cmds, $cmds[0]); } foreach my $cmd (reverse @cmds) { if (defined $keywords{$cmd} && ($keywords{$cmd} & $type) != 0) { my $func = "$prefix$cmd"; $val = $self->$func($val); ## Now that we have a value, we need to switch over ## to calling doif_xxx $type = $doif_type; $prefix = 'doif_'; } else { $self->warning("Unable to use $cmd in if (no $prefix method)."); } } } else { $val = $self->get_value($str); } ## See if any portion of the value is defined and not empty my $ret = 0; if (defined $val) { if (UNIVERSAL::isa($val, 'ARRAY')) { foreach my $v (@$val) { if ($v ne '') { $ret = 1; last; } } } elsif ($val ne '') { $ret = 1; } } return ($not ? !$ret : $ret); } } sub handle_if { my($self, $val) = @_; my $name = 'endif'; push(@{$self->{'lstack'}}, "<%if($val)%> (" . $self->get_line_number() . '?)'); if ($self->{'if_skip'}) { push(@{$self->{'sstack'}}, "*$name"); } else { ## Determine if we are skipping the portion of this if statement ## $val will always be defined since we won't get into this method ## without properly parsing the if statement. $self->{'if_skip'} = !$self->process_compound_if($val); push(@{$self->{'sstack'}}, $name); } } sub handle_else { my $self = shift; my @scopy = @{$self->{'sstack'}}; my $index = index($scopy[$#scopy], 'endif'); if ($index >= 0) { if ($index == 0) { $self->{'if_skip'} ^= 1; } $self->{'sstack'}->[$#scopy] .= ':'; } return 'Unmatched else' if (($self->{'sstack'}->[$#scopy] =~ tr/:/:/) > 1); return undef; } sub handle_foreach { my $self = shift; my $val = lc(shift); my $name = 'endfor'; my $errorString; push(@{$self->{'lstack'}}, $self->get_line_number()); if (!$self->{'if_skip'}) { my $base = 1; my $vname; if ($val =~ /flag_overrides\([^\)]+\)/) { } elsif ($val =~ /([^,]*),(.*)/) { $vname = $1; $val = $2; $vname =~ s/^\s+//; $vname =~ s/\s+$//; $val =~ s/^\s+//; $val =~ s/\s+$//; if ($vname eq '') { $errorString = 'The foreach variable name is not valid'; } if ($val =~ /([^,]*),(.*)/) { $base = $1; $val = $2; $base =~ s/^\s+//; $base =~ s/\s+$//; $val =~ s/^\s+//; $val =~ s/\s+$//; if ($base !~ /^\d+$/) { $errorString = 'The forcount specified is not a valid number'; } } elsif ($vname =~ /^\d+$/) { $base = $vname; $vname = undef; } ## Due to the way flag_overrides works, we can't allow ## the user to name the foreach variable when dealing ## with variables that can be used with the -> operator if (defined $vname) { foreach my $ref (keys %arrow_op_ref) { my $name_re = $ref . 's'; if ($val =~ /^$ref\->/ || $val =~ /^$name_re$/) { $errorString = 'The foreach variable can not be ' . 'named when dealing with ' . $arrow_op_ref{$ref}; } } } } push(@{$self->{'sstack'}}, $name); my $index = ++$self->{'foreach'}->{'count'}; $self->{'foreach'}->{'base'}->[$index] = $base; $self->{'foreach'}->{'name'}->[$index] = $vname; $self->{'foreach'}->{'vars'}->[$index] = $val; $self->{'foreach'}->{'text'}->[$index] = ''; $self->{'foreach'}->{'scope'}->[$index] = {}; $self->{'foreach'}->{'scope_name'}->[$index] = undef; } else { push(@{$self->{'sstack'}}, "*$name"); } return $errorString; } sub handle_special { my($self, $name, $val) = @_; ## If $name (fornotlast, forfirst, etc.) is set to 1 ## Then we append the $val onto the current string that's ## being built. $self->append_current($val) if ($self->get_value($name)); } sub get_uc { my($self, $name) = @_; return uc($self->get_value_with_default($name)); } sub handle_uc { my($self, $name) = @_; $self->append_current($self->get_uc($name)); } sub perform_uc { my($self, $value) = @_; my @val; foreach my $val (@$value) { push(@val, uc($val)); } return @val; } sub get_lc { my($self, $name) = @_; return lc($self->get_value_with_default($name)); } sub handle_lc { my($self, $name) = @_; $self->append_current($self->get_lc($name)); } sub perform_lc { my($self, $value) = @_; my @val; foreach my $val (@$value) { push(@val, lc($val)); } return @val; } sub handle_ucw { my($self, $name) = @_; my $val = $self->get_value_with_default($name); substr($val, 0, 1) = uc(substr($val, 0, 1)); while($val =~ /[_\s]([a-z])/) { my $uc = uc($1); $val =~ s/[_\s][a-z]/ $uc/; } $self->append_current($val); } sub actual_normalize { $_[1] =~ tr/ \t\/\\\-$()./_/; return $_[1]; } sub perform_normalize { my($self, $value) = @_; my @val; foreach my $val (@$value) { push(@val, $self->actual_normalize($val)); } return @val; } sub get_normalize { my($self, $name) = @_; return $self->actual_normalize($self->get_value_with_default($name)); } sub handle_normalize { my($self, $name) = @_; $self->append_current($self->get_normalize($name)); } sub actual_noextension { $_[1] =~ s/\.[^\.]*$//; return $_[1]; } sub perform_noextension { my($self, $value) = @_; my @val; foreach my $val (@$value) { push(@val, $self->actual_noextension($val)); } return @val; } sub get_noextension { my($self, $name) = @_; return $self->actual_noextension($self->get_value_with_default($name)); } sub handle_noextension { my($self, $name) = @_; $self->append_current($self->get_noextension($name)); } sub perform_full_path { my($self, $value) = @_; my @val; foreach my $val (@$value) { push(@val, $self->actual_full_path($val)); } return @val; } sub get_full_path { my($self, $name) = @_; return $self->actual_full_path($self->get_value_with_default($name)); } sub actual_full_path { my($self, $value) = @_; ## Expand all defined env vars $value =~ s/\$\((\w+)\)/$ENV{$1} || '$(' . $1 . ')'/ge; ## If we expanded all env vars, get absolute path if ($value =~ /\$\(\w+\)/) { $self->{'error_in_handle'} = "<%full_path%> couldn't expand " . "environment variables in $value"; return $value; } ## Always convert the slashes since they may be in the OS native ## format and we need them in UNIX format. $value =~ s/\\/\//g; my $dir = $self->mpc_dirname($value); if (-e $dir) { $dir = Cwd::abs_path($dir); } elsif ($self->{'prjc'}->path_is_relative($dir)) { ## If the directory is is not already an absolute path, then we will ## assume that the directory is relative to the current directory ## (which will be the location of the MPC file). $dir = $self->getcwd() . '/' . $dir; } ## Create the full path value and convert the slashes if necessary. $value = $dir . '/' . $self->mpc_basename($value); $value =~ s/\//\\/g if ($self->{'cslashes'}); return $value; } sub handle_full_path { my($self, $name) = @_; my $val = $self->get_value_with_default($name); $self->append_current($self->actual_full_path($val)); } sub perform_extensions { my($self, $value) = @_; my @val; foreach my $val (@$value) { push(@val, $self->{'prjc'}->get_component_extensions($val)); } return @val; } sub handle_extensions { my($self, $name) = @_; my @val = $self->perform_extensions([$name]); $self->append_current("@val"); } sub evaluate_nested_functions { my($self, $funcname, $args) = @_; my @params = $self->split_parameters($args); my @results; foreach my $param (@params) { my @cmds; my $val = $param; while($val =~ /(\w+)\((.+)\)/) { push(@cmds, $1); $val = $2; } if (scalar @cmds == 0) { push @results, $val; next; } my $type = $get_type; my $prefix = 'get_'; foreach my $cmd (reverse @cmds) { if (defined $keywords{$cmd} && ($keywords{$cmd} & $type) != 0) { my $func = "$prefix$cmd"; if ($type == $get_type) { $val = $self->$func($val); $val = [ $val ] if (!UNIVERSAL::isa($val, 'ARRAY')); ## Now that we have a value, we need to switch over ## to calling perform_xxx $type = $perform_type; $prefix = 'perform_'; } else { my @array = $self->$func($val); $val = \@array; } } else { $self->warning("Unable to use $cmd in nested " . "functions (no $prefix method)."); } } push @results, "@$val"; } if (defined $keywords{$funcname} && ($keywords{$funcname} & $perform_type)) { my $func = 'perform_' . $funcname; my @array = $self->$func(\@results); $self->append_current("@array"); if ($keywords{$funcname} & $post_type) { $func = 'post_' . $funcname; $self->$func(); } } else { $self->warning("Unable to use $funcname in nested " . "functions (no perform_ method)."); } } sub perform_dirname { my($self, $value) = @_; my @val; foreach my $val (@$value) { push(@val, $self->tp_dirname($val)); } return @val; } sub get_dirname { my($self, $name) = @_; return $self->tp_dirname($self->get_value_with_default($name)); } sub doif_dirname { my($self, $value) = @_; if (defined $value) { $value = $self->tp_dirname($value); return ($value ne '.'); } return undef; } sub handle_dirname { my($self, $name) = @_; $self->append_current( $self->tp_dirname($self->get_value_with_default($name))); } sub perform_basename { my($self, $value) = @_; my @val; foreach my $val (@$value) { push(@val, $self->tp_basename($val)); } return @val; } sub get_basename { my($self, $name) = @_; return $self->tp_basename($self->get_value_with_default($name)); } sub doif_basename { my($self, $value) = @_; if (defined $value) { $value = $self->tp_basename($value); return ($value ne '.'); } return undef; } sub handle_basename { my($self, $name) = @_; $self->append_current( $self->tp_basename($self->get_value_with_default($name))); } sub handle_basenoextension { my($self, $name) = @_; my $val = $self->tp_basename($self->get_value_with_default($name)); $val =~ s/\.[^\.]*$//; $self->append_current($val); } sub handle_flag_overrides { my($self, $name) = @_; my $value = $self->get_flag_overrides($name); $self->append_current(UNIVERSAL::isa($value, 'ARRAY') ? "@$value" : $value) if (defined $value); } sub handle_marker { my($self, $name) = @_; my $val = $self->{'prjc'}->get_verbatim($name); $self->append_current($val) if (defined $val); } sub handle_eval { my($self, $name) = @_; my $val = $self->get_value_with_default($name); if (defined $val) { if (index($val, "<%eval($name)%>") >= 0) { $self->warning("Infinite recursion detected in '$name'."); } else { ## Enter the eval state ++$self->{'eval'}; ## Parse the eval line my($status, $error) = $self->parse_line(undef, $val); if ($status) { $self->{'built'} .= $self->{'eval_str'}; } else { $self->warning($error); } ## Leave the eval state --$self->{'eval'}; $self->{'eval_str'} = ''; } } } sub handle_pseudo { my($self, $name) = @_; $self->append_current($self->{'cmds'}->{$name}); } sub get_duplicate_index { my($self, $name) = @_; return $self->doif_duplicate_index($self->get_value_with_default($name)); } sub doif_duplicate_index { my($self, $value) = @_; if (defined $value) { my $base = lc($self->tp_basename($value)); my $path = $self->validated_dirname($value); if (!defined $self->{'dupfiles'}->{$base}) { $self->{'dupfiles'}->{$base} = [$path]; } else { my $index = 1; foreach my $file (@{$self->{'dupfiles'}->{$base}}) { return $index if ($file eq $path); ++$index; } push(@{$self->{'dupfiles'}->{$base}}, $path); return 1; } } return undef; } sub handle_duplicate_index { my($self, $name) = @_; my $value = $self->doif_duplicate_index( $self->get_value_with_default($name)); $self->append_current($value) if (defined $value); } sub actual_transdir { my($self, $value) = @_; if ($value =~ /([\/\\])/) { return $self->{'prjc'}->translate_directory( $self->tp_dirname($value)) . $1; } return undef; } sub get_transdir { my($self, $name) = @_; return $self->actual_transdir($self->get_value_with_default($name)); } sub doif_transdir { my($self, $value) = @_; return (defined $value ? $self->actual_transdir($value) : undef); } sub handle_transdir { my($self, $name) = @_; my $value = $self->actual_transdir($self->get_value_with_default($name)); $self->append_current($value) if (defined $value); } sub handle_create_aux_file { my $self = shift; my @fname = $self->perform_create_aux_file([$self->split_parameters(shift)]); $self->append_current($fname[0]); $self->post_create_aux_file(); } sub post_create_aux_file { my $self = shift; $self->{'aux_file'} = $self->{'aux_temp'}; $self->{'aux_temp'} = undef; } sub perform_create_aux_file { my($self, $argsref) = @_; if (defined $self->{'aux_file'}) { $self->{'error_in_handle'} = "Can't nest create_aux_file commands."; return undef; } my $fname = ''; foreach my $arg (@$argsref) { my $val = $self->get_value($arg); $fname .= defined $val ? (UNIVERSAL::isa($val, 'ARRAY') ? join('_', @$val) : $val) : $arg; } my $dir = $self->mpc_dirname($self->{'prjc'}->get_outdir() . '/' . $self->{'prjc'}->{'assign'}->{'project_file'}); $dir .= '/' . $self->mpc_dirname($fname) if ($fname =~ /[\/\\]/); $self->{'aux_temp'} = {'dir' => $dir, 'filename' => $self->mpc_basename($fname), 'foreach_baseline' => $self->{'foreach'}->{'count'}}; return $fname; } sub handle_end_aux_file { my $self = shift; if (!defined $self->{'aux_file'}) { $self->{'error_in_handle'} = 'end_aux_file seen before create_aux_file'; } else { my $af = $self->{'aux_file'}; mkpath($af->{'dir'}, 0, 0777) if ($af->{'dir'} ne '.'); my $fh = new FileHandle('> ' . $af->{'dir'} . '/' . $af->{'filename'}); if (defined $fh) { print $fh $af->{'text'}; close($fh); } else { $self->{'error_in_handle'} = "Couldn't open: " . $af->{'dir'} . '/' . $af->{'filename'}; } $self->{'aux_file'} = undef; } } sub handle_translate_vars { my($self, $arg) = @_; my @params = $self->split_parameters($arg); $self->append_current($self->perform_translate_vars([@params])); } sub get_translate_vars { my ($self, $str) = @_; my @params = $self->split_parameters($str); return $self->perform_translate_vars([@params]); } sub perform_translate_vars { my($self, $arg) = @_; ## If the first parameter is a template variable with a value, use it. ## Otherwise, use the parameter as the value. my $val = $self->get_value($arg->[0]); $val = $arg->[0] unless defined $val; ## If the second optional parameter is provided, use it. Otherwise, ## use the operating system found in the command substitution map. my $os = (defined $arg->[1] && $arg->[1] ne '') ? $arg->[1] : $self->{'prjc'}->{'command_subs'}->{'os'}; ## Get the variable reference characters based on the operating system ## for which we are generating this project. my ($pre, $post) = ($os eq 'win32') ? ('%', '%') : ('${', '}'); ## Replace $() with the environment variable reference characters. $val =~ s{\$\(([^)]+)\)([^\s\$]*)}{my ($var, $rest) = ($1, $2); $rest =~ s!/!\\!g if $os eq 'win32'; "$pre$var$post$rest"}ge; return $val; } sub handle_convert_slashes { my($self, $arg) = @_; my @params = $self->split_parameters($arg); $self->append_current($self->perform_convert_slashes([@params])); } sub perform_convert_slashes { my($self, $arg) = @_; ## If the first parameter is a template variable with a value, use it. ## Otherwise, use the parameter as the value. my $val = $self->get_value($arg->[0]); $val = $arg->[0] unless defined $val; ## If the second optional parameter is provided, use it. Otherwise, ## use the operating system found in the command substitution map. my $os = (defined $arg->[1] && $arg->[1] ne '') ? $arg->[1] : $self->{'prjc'}->{'command_subs'}->{'os'}; ## Replace forward slashes with backslashes if we're generating this ## project specific to Windows. $val =~ s!/!\\!g if $os eq 'win32'; return $val; } sub handle_new_guid { my($self, $name) = @_; my $val = $self->get_value_with_default($name); my $prjc = $self->{'prjc'}; my $guid = GUID::generate($val ? $val : $name, $prjc->{'current_input'}, File::Spec->abs2rel($prjc->getcwd(), $prjc->getstartdir())); $self->append_current($guid); } sub handle_deref { my($self, $name) = @_; my $val = $self->get_value_with_default($self->get_value_with_default($name)); $self->append_current($val); } sub handle_set { my($self, $val) = @_; my @params = $self->split_parameters($val); if ($#params == 1) { $self->{'values'}->{lc($params[0])} = $params[1]; } else { $self->{'error_in_handle'} = 'set() requires a name and a value'; } } sub prepare_parameters { my($self, $prefix) = @_; my $input = $self->get_value($prefix . '->input_file'); my $output; my $indir; my $outdir; if (defined $input) { $input =~ s/\//\\/g if ($self->{'cslashes'}); $indir = $self->tp_dirname($input); $output = $self->get_value($prefix . '->input_file->output_files'); if (defined $output) { my $size = scalar(@$output); for(my $i = 0; $i < $size; ++$i) { my $fo = $self->get_flag_overrides($prefix . '->input_file, gendir'); if (defined $fo) { $outdir = $self->tp_dirname($$output[$i]); if (!($outdir ne '' && $indir ne $outdir && $fo ne $outdir)) { $$output[$i] = ($fo eq '.' ? '' : $fo . '/') . $self->tp_basename($$output[$i]); } } $$output[$i] =~ s/\//\\/g if ($self->{'cslashes'}); } } } ## Set the parameters array with the determined input and output files return $input, $output; } sub process_name { my($self, $line) = @_; my $length = 0; my $errorString; ## Split the line into a name and value if ($line =~ /$process_name_re1/) { my $name = lc($1); my $val = $3; $length += length($name); if (defined $val) { ## Check for the parenthesis if (($val =~ tr/(//) != ($val =~ tr/)//)) { return 'Missing the closing parenthesis', $length; } ## Add the length of the value plus 2 for the surrounding () $length += length($val) + 2; } if (defined $keywords{$name}) { if ($name eq 'if') { $self->handle_if($val); } elsif ($name eq 'endif') { $errorString = $self->handle_endif($name); } elsif ($name eq 'else') { $errorString = $self->handle_else(); } elsif ($name eq 'endfor') { $errorString = $self->handle_endfor($name); } elsif ($name eq 'foreach') { $errorString = $self->handle_foreach($val); } elsif ($name eq 'fornotlast' || $name eq 'forlast' || $name eq 'fornotfirst' || $name eq 'forfirst') { if (!$self->{'if_skip'}) { $self->handle_special($name, $self->process_special($val)); } } elsif ($name eq 'comment') { ## Ignore the contents of the comment } else { if (!$self->{'if_skip'}) { if (index($val, '(') >= 0) { $self->evaluate_nested_functions($name, $val); } else { my $func = 'handle_' . $name; $self->$func($val); if ($self->{'error_in_handle'}) { $errorString = $self->{'error_in_handle'}; } } } } } elsif (defined $self->{'cmds'}->{$name}) { $self->handle_pseudo($name) if (!$self->{'if_skip'}); } else { if (!$self->{'if_skip'}) { if (defined $val && !defined $self->{'defaults'}->{$name}) { $self->{'defaults'}->{$name} = $self->process_special($val); } $self->append_current($self->get_value_with_default($name)); } } } else { my $error = $line; my $length = length($line); for(my $i = 0; $i < $length; ++$i) { my $part = substr($line, $i, 2); if ($part eq '%>') { $error = substr($line, 0, $i + 2); last; } } $errorString = "Unable to parse line starting at '$error'"; } return $errorString, $length; } sub collect_data { my $self = shift; my $prjc = $self->{'prjc'}; my $cwd = $self->getcwd(); ## Set the current working directory $cwd =~ s/\//\\/g if ($self->{'cslashes'}); $self->{'values'}->{'cwd'} = $cwd; ## Collect the components into {'values'} somehow foreach my $key (keys %{$prjc->{'valid_components'}}) { my @list = $prjc->get_component_list($key); $self->{'values'}->{$key} = \@list if (defined $list[0]); } ## If there is a staticname and no sharedname then this project ## 'type_is_static'. If we are generating static projects, let ## all of the templates know that we 'need_staticflags'. ## If there is a sharedname then this project 'type_is_dynamic'. my $sharedname = $prjc->get_assignment('sharedname'); my $staticname = $prjc->get_assignment('staticname'); if (!defined $sharedname && defined $staticname) { $self->{'override_target_type'} = 1; $self->{'values'}->{'type_is_static'} = 1; $self->{'values'}->{'need_staticflags'} = 1; } elsif ($prjc->get_static() == 1) { $self->{'values'}->{'need_staticflags'} = 1; } elsif (defined $sharedname) { $self->{'values'}->{'type_is_dynamic'} = 1; } ## If there is a sharedname or exename then this project ## 'type_is_binary'. if (defined $sharedname || defined $prjc->get_assignment('exename')) { $self->{'values'}->{'type_is_binary'} = 1; } ## A tiny hack (mainly for VC6 projects) ## for the workspace creator. It needs to know the ## target names to match up with the project name. $prjc->update_project_info($self, 0, ['project_name']); ## This is for all projects $prjc->update_project_info($self, 1, ['after']); ## VC7 Projects need to know the GUID. ## We need to save this value in our known values ## since each guid generated will be different. We need ## this to correspond to the same guid used in the workspace. my $guid = $prjc->update_project_info($self, 1, ['guid']); $self->{'values'}->{'guid'} = $guid; ## In order for VC7 to mix languages, we need to keep track ## of the language associated with each project. $prjc->update_project_info($self, 1, ['language']); ## For VC7+ to properly work with wince, which is cross compiled, ## a new platform-specific token is added, nocross, which is used ## to determine if a project is even to be built for non-native ## targets. Additionally, custom-only projects are built but not ## deployed, thus these are added to the project_info mix $prjc->update_project_info($self, 1, ['custom_only']); $prjc->update_project_info($self, 1, ['nocross']); ## For VC8 to be able to add references to managed DLL's to the current ## managed DLL project (if it is one), we need to keep track of whether ## the project is 'managed' or not. $prjc->update_project_info($self, 1, ['managed']); ## For WiX, only generate top-level groups for projects marked with "make_group" $prjc->update_project_info($self, 1, ['make_group']); ## Some Windows based projects can't deal with certain version ## values. So, for those we provide a translated version. my $version = $prjc->get_assignment('version'); if (defined $version) { $self->{'values'}->{'win_version'} = WinVersionTranslator::translate($version); } } sub parse_line { my($self, $ih, $line) = @_; my $errorString; my $startempty = ($line eq ''); ## If processing a foreach or the line only ## contains a keyword, then we do ## not need to add a newline to the end. if ($self->{'foreach'}->{'processing'} == 0 && !$self->{'eval'} && ($line !~ /$parse_line_re1/ || !defined $keywords{$1})) { $line .= $self->{'crlf'}; } if ($self->{'foreach'}->{'count'} < 0 && !$self->{'eval'}) { $self->{'built'} = ''; } my $start = index($line, '<%'); if ($start >= 0) { my $append_name; if ($start > 0) { if (!$self->{'if_skip'}) { $self->append_current(substr($line, 0, $start)); } $line = substr($line, $start); } my $nlen = 0; foreach my $item (split('<%', $line)) { my $name = 1; my $length = length($item); my $endi = index($item, '%>'); for(my $i = 0; $i < $length; ++$i) { if ($i == $endi) { ++$i; $endi = index($item, '%>', $i); $name = undef; if ($append_name) { $append_name = undef; if (!$self->{'if_skip'}) { $self->append_current('%>'); } } if ($length != $i + 1) { if (!$self->{'if_skip'}) { $self->append_current(substr($item, $i + 1)); } last; } } elsif ($name) { my $efcheck = (index($item, 'endfor%>') == 0); my $focheck = ($efcheck ? 0 : (index($item, 'foreach(') == 0)); if ($focheck && $self->{'foreach'}->{'count'} >= 0) { ++$self->{'foreach'}->{'nested'}; } if ($self->{'foreach'}->{'count'} < 0 || $self->{'foreach'}->{'processing'} > $self->{'foreach'}->{'nested'} || (($efcheck || $focheck) && $self->{'foreach'}->{'nested'} == $self->{'foreach'}->{'processing'})) { ($errorString, $nlen) = $self->process_name($item); if (defined $errorString) { return 0, $errorString; } elsif ($nlen == 0) { return 0, "Could not parse this line at column $i"; } $i += ($nlen - 1); } else { $name = undef; $nlen = ($i < $endi ? $endi : $length) - $i; if (!$self->{'if_skip'}) { $self->append_current('<%' . substr($item, $i, $nlen)); $append_name = 1; } $i += ($nlen - 1); } if ($efcheck && $self->{'foreach'}->{'nested'} > 0) { --$self->{'foreach'}->{'nested'}; } } else { $nlen = ($i < $endi ? $endi : $length) - $i; if (!$self->{'if_skip'}) { $self->append_current(substr($item, $i, $nlen)); } $i += ($nlen - 1); } } } } else { $self->append_current($line) if (!$self->{'if_skip'}); } if ($self->{'foreach'}->{'count'} < 0 && !$self->{'eval'} && ## If the line started out empty and we're not ## skipping from the start or the built up line is not empty ($startempty || ($self->{'built'} ne $self->{'crlf'} && $self->{'built'} ne ''))) { push(@{$self->{'lines'}}, $self->{'built'}); } return !defined $errorString, $errorString; } sub parse_file { my($self, $input) = @_; $self->collect_data(); my($status, $errorString) = $self->cached_file_read($input); ## If there was no error, check the stack to make sure that we aren't ## missing an <%endif%> or an <%endfor%>. if ($status && defined $self->{'sstack'}->[0]) { $status = 0; $errorString = "Missing an '$self->{'sstack'}->[0]' starting at " . $self->{'lstack'}->[0]; } ## Add in the line number if there is an error $errorString = "$input: line " . $self->get_line_number() . ":\n$errorString" if (!$status); return $status, $errorString; } sub get_lines { return $_[0]->{'lines'}; } # ************************************************************ # Accessors used by support scripts # ************************************************************ sub getKeywords { return \%keywords; } sub getArrowOp { return \%arrow_op_ref; } 1; ace-6.4.5+dfsg.orig/MPC/modules/UVISWorkspaceCreator.pm0000644000175000017500000000355713154167361020713 0ustar tggtggpackage UVISWorkspaceCreator; # ************************************************************ # Description : The Keil uVision Workspace Creator # Author : Chad Elliott # Create Date : 11/1/2016 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use UVISProjectCreator; use WinWorkspaceBase; use WorkspaceCreator; use vars qw(@ISA); @ISA = qw(WinWorkspaceBase WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub compare_output { #my $self = shift; return 1; } sub workspace_file_extension { #my $self = shift; return '.uvmpw'; } sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); print $fh "$crlf", "$crlf$crlf", " 1.0$crlf$crlf", "
### uVision Project, (C) Keil Software
$crlf$crlf"; } sub write_comps { my($self, $fh) = @_; my $crlf = $self->crlf(); print $fh ' ', $self->get_workspace_name(), ' - ', $self->create_command_line_string($0, @ARGV), '', $crlf, $crlf; foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) { print $fh " $crlf", " ", $self->slash_to_backslash($project), "$crlf", " $crlf$crlf"; } } sub post_workspace { my($self, $fh) = @_; print $fh '
' . $self->crlf(); } 1; ace-6.4.5+dfsg.orig/MPC/modules/BCB2009WorkspaceCreator.pm0000644000175000017500000000173613154167361021023 0ustar tggtggpackage BCB2009WorkspaceCreator; # ************************************************************ # Description : A BCB2009 Workspace Creator # Author : Johnny Willemsen # Create Date : 17/10/2008 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use BCB2007WorkspaceCreator; use BCB2009ProjectCreator; use vars qw(@ISA); @ISA = qw(BCB2007WorkspaceCreator); sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); ## This identifies it as a Borland C++Builder 2009 file print $fh '', $crlf; ## Optionally print the workspace comment # $self->print_workspace_comment($fh, # '', $crlf, # '', # $crlf); } 1; ace-6.4.5+dfsg.orig/MPC/modules/CDT7WorkspaceCreator.pm0000644000175000017500000000134313154167361020615 0ustar tggtggpackage CDT7WorkspaceCreator; # ************************************************************ # Description : A CDT7 Workspace Creator (Eclipse 3.6) # Author : Adam Mitz, Object Computing, Inc. # Create Date : 10/04/2010 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use CDT7ProjectCreator; use CDT6WorkspaceCreator; use vars qw(@ISA); @ISA = qw(CDT6WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub get_cdt_version { return '7'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC9ProjectCreator.pm0000644000175000017500000000163713154167361020173 0ustar tggtggpackage VC9ProjectCreator; # ************************************************************ # Description : A VC9 Project Creator # Author : Johnny Willemsen # Create Date : 11/22/2007 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC8ProjectCreator; use vars qw(@ISA); @ISA = qw(VC8ProjectCreator); my %config = ('vcversion' => '9.00', 'prversion' => '9.0.30729', 'toolsversion' => '3.5', 'targetframeworkversion' => '3.5', 'xmlheader' => 1, ); # ************************************************************ # Subroutine Section # ************************************************************ sub get_configurable { my($self, $name) = @_; return $config{$name}; } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC11ProjectCreator.pm0000644000175000017500000000260513154167361020240 0ustar tggtggpackage VC11ProjectCreator; # ************************************************************ # Description : A VC11 Project Creator # Author : Johnny Willemsen # Create Date : 12/12/2011 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC10ProjectCreator; use vars qw(@ISA); @ISA = qw(VC10ProjectCreator); ## NOTE: We call the constant as a function to support Perl 5.6. my %info = (Creator::cplusplus() => {'ext' => '.vcxproj', 'dllexe' => 'vc11exe', 'libexe' => 'vc11libexe', 'dll' => 'vc11dll', 'lib' => 'vc11lib', 'template' => [ 'vc10', 'vc10filters' ], }, ); # ************************************************************ # Subroutine Section # ************************************************************ sub get_info_hash { my($self, $key) = @_; ## If we have the setting in our information map, the use it. return $info{$key} if (defined $info{$key}); ## Otherwise, see if our parent type can take care of it. return $self->SUPER::get_info_hash($key); } 1; ace-6.4.5+dfsg.orig/MPC/modules/WB26ProjectCreator.pm0000644000175000017500000000375313154167361020253 0ustar tggtggpackage WB26ProjectCreator; # ************************************************************ # Description : Workbench 2.6 / VxWorks 6.4 generator # Author : Johnny Willemsen # Create Date : 07/01/2008 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ProjectCreator; use vars qw(@ISA); @ISA = qw(ProjectCreator); # ************************************************************ # Data Section # ************************************************************ my %templates = ('wb26' => '.project', 'wb26wrproject' => '.wrproject', 'wb26wrmakefile' => '.wrmakefile'); my @tkeys = sort keys %templates; # ************************************************************ # Subroutine Section # ************************************************************ sub crlf { #my $self = shift; return "\n"; } sub project_file_name { my($self, $name, $template) = @_; ## Fill in the name and template if they weren't provided $name = $self->project_name() if (!defined $name); $template = 'wb26' if (!defined $template || !defined $templates{$template}); if ($self->{'make_coexistence'}) { return $self->get_modified_project_file_name($name, '/' . $templates{$template}); } else { return $templates{$template}; } } sub get_template { #my $self = shift; return @tkeys; } sub dependency_is_filename { #my $self = shift; return 0; } sub requires_forward_slashes { return 1; } sub file_visible { ## We only want the project file visible to the workspace creator. ## There can only be one and this is it. #my($self, $template) = @_; return $_[1] eq 'wb26'; } sub get_dll_exe_template_input_file { #my $self = shift; return 'wb26exe'; } sub get_dll_template_input_file { #my $self = shift; return 'wb26dll'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC9WorkspaceCreator.pm0000644000175000017500000000260213154167361020514 0ustar tggtggpackage VC9WorkspaceCreator; # ************************************************************ # Description : A VC9 Workspace Creator # Author : Johnny Willemsen # Create Date : 11/22/2007 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC9ProjectCreator; use VC8WorkspaceCreator; use vars qw(@ISA); @ISA = qw(VC8WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); print $fh '', $crlf, 'Microsoft Visual Studio Solution File, Format Version 10.00', $crlf; $self->print_workspace_comment($fh, '# Visual Studio 2008', $crlf, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, '#', $crlf, '# MPC Command:', $crlf, '# ', $self->create_command_line_string($0, @ARGV), $crlf); } sub website_trailing_slash { return 0; } sub website_extra_props { my($self, $fh) = @_; print $fh "\t\t" . 'TargetFramework = "3.5"' . $self->crlf(); } 1; ace-6.4.5+dfsg.orig/MPC/modules/MakeWorkspaceBase.pm0000644000175000017500000002757013154167361020256 0ustar tggtggpackage MakeWorkspaceBase; # ************************************************************ # Description : A Make Workspace base module # Author : Chad Elliott # Create Date : 11/21/2006 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use MakePropertyBase; use vars qw(@ISA); @ISA = qw(MakePropertyBase); # ************************************************************ # Subroutine Section # ************************************************************ sub targets { return $_[0]->{'make_targets'}; } sub workspace_file_prefix { #my $self = shift; return 'Makefile'; } sub workspace_file_extension { #my $self = shift; return ''; } sub supports_make_coexistence { return ($_[0]->workspace_file_extension() ne ''); } sub workspace_file_name { my $self = shift; return $self->get_modified_workspace_name( $self->workspace_file_prefix(), $self->make_coexistence() ? $self->workspace_file_extension() : ''); } sub workspace_per_project { #my $self = shift; return 1; } sub workspace_preamble { my($self, $fh, $crlf, $name, $id) = @_; ## Optionally print the workspace comment $self->print_workspace_comment($fh, '#----------------------------------------------------------------------------', $crlf, '# ', $name, $crlf, '#', $crlf, '# ', $id, $crlf, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, '#', $crlf, '# MPC Command:', $crlf, '# ', $self->create_command_line_string($0, @ARGV), $crlf, '#', $crlf, '#----------------------------------------------------------------------------', $crlf, $crlf); } sub write_top_level_rule { my($self, $fh, $crlf, $list, $remain, $trans, $maxline, $target, $suffix) = @_; if (defined $maxline) { my $line = $target . ':'; foreach my $project (@$list) { $line .= " $$trans{$project}$suffix"; } if (length($line) < $maxline) { print $fh $crlf, $line; } elsif (length($suffix) > 0) { $$remain .= ' ' . $target; } else { $$remain = $target . ' ' . $$remain; } } else { print $fh $crlf . $target . ':'; foreach my $project (@$list) { print $fh " $$trans{$project}$suffix"; } } } sub write_named_targets { my($self, $fh, $crlf, $targnum, $list, $remain, $targpre, $allpre, $trans, $phony, $andsym, $maxline) = @_; ## Save the targets for later $self->{'make_targets'} = $remain; ## Print out the "all" target $self->write_top_level_rule($fh, $crlf, $list, \$remain, $trans, $maxline, 'all', ''); print $fh $crlf; ## Print out the "depend" target $self->write_top_level_rule($fh, $crlf, $list, \$remain, $trans, $maxline, 'depend', '-depend'); ## Print out all other targets here print $fh "$crlf$crlf$remain:$crlf"; $self->write_project_targets($fh, $crlf, $targpre . '$(@)', $list, $andsym); ## Print out each target separately foreach my $project (@$list) { print $fh ($phony ? "$crlf.PHONY: $$trans{$project}" : ''), $crlf, $$trans{$project}, ':'; if (defined $$targnum{$project}) { foreach my $number (@{$$targnum{$project}}) { print $fh " $$trans{$$list[$number]}"; } } print $fh $crlf; $self->write_project_targets($fh, $crlf, $targpre . $allpre . 'all', [ $project ], $andsym); print $fh ($phony ? "$crlf.PHONY: $$trans{$project}-depend" : ''), $crlf, $$trans{$project}, '-depend:', $crlf; $self->write_project_targets($fh, $crlf, $targpre . $allpre . 'depend', [ $project ], $andsym); } ## Print out the project_name_list target print $fh $crlf, "project_name_list:$crlf"; foreach my $project (sort @$list) { print $fh "\t\@echo $$trans{$project}$crlf"; } } sub post_workspace { my($self, $wsfh, $creator, $toplevel) = @_; if ($toplevel && $self->{'for_eclipse'}) { my $crlf = $self->crlf(); my $outdir = $self->get_outdir(); my $fh = new FileHandle(); my $outfile = "$outdir/.cdtproject"; my $pjt = $self->get_eclipse_cdtproject(); if (open($fh, ">$outfile")) { ## We want to set the make command to nmake for the nmake project ## type. As far as stopping on an error, I don't remember why this ## is true only for Borland make. my $cmd = ("$self" =~ /^nmake/i ? 'nmake' : 'make'); my $stop = ("$self" =~ /^bmake/i ? 'true' : 'false'); print $fh $$pjt[0]; foreach my $target ('all', grep(/^[\w\-]+$/, split(/\s+/, $self->targets()))) { print $fh ' ', $crlf, ' ', $cmd, '', $crlf, ' ', $crlf, ' ', $target, ' ', $crlf, ' ', $stop, '', $crlf, ' false', $crlf, ' ', $crlf; } print $fh $$pjt[1]; close($fh); } else { $self->warning("Unable to create $outfile"); } ## Create the eclipse project which is unchanging except for the name ## of the starting makefile. $pjt = $self->get_eclipse_project(); $outfile = "$outdir/.project"; if (open($fh, ">$outfile")) { print $fh $$pjt[0], $self->get_workspace_name(), $$pjt[1]; close($fh); } else { $self->warning("Unable to create $outfile"); } } } sub get_eclipse_cdtproject { my $self = shift; if (!defined $self->{'eclipse_cdtproject'}) { $self->{'eclipse_cdtproject'} = [ ' ', ' ']; } return $self->{'eclipse_cdtproject'}; } sub get_eclipse_project { my $self = shift; if (!defined $self->{'eclipse_project'}) { $self->{'eclipse_project'} = [ ' ', ' org.eclipse.cdt.make.core.makeBuilder clean,full,incremental, org.eclipse.cdt.make.core.build.arguments org.eclipse.cdt.core.errorOutputParser org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser; org.eclipse.cdt.make.core.enableAutoBuild false org.eclipse.cdt.make.core.environment org.eclipse.cdt.make.core.enableFullBuild true org.eclipse.cdt.make.core.build.target.inc all org.eclipse.cdt.make.core.enabledIncrementalBuild true org.eclipse.cdt.make.core.build.target.clean clean org.eclipse.cdt.make.core.build.command make org.eclipse.cdt.make.core.enableCleanBuild true org.eclipse.cdt.make.core.append_environment true org.eclipse.cdt.make.core.build.target.full clean all org.eclipse.cdt.make.core.useDefaultBuildCmd true org.eclipse.cdt.make.core.build.target.auto all org.eclipse.cdt.make.core.stopOnError false org.eclipse.cdt.make.core.ScannerConfigBuilder org.eclipse.cdt.core.cnature org.eclipse.cdt.make.core.makeNature org.eclipse.cdt.make.core.ScannerConfigNature org.eclipse.cdt.core.ccnature ']; } return $self->{'eclipse_project'}; } 1; ace-6.4.5+dfsg.orig/MPC/modules/CDT6WorkspaceCreator.pm0000644000175000017500000001114013154167361020610 0ustar tggtggpackage CDT6WorkspaceCreator; # ************************************************************ # Description : Eclipse CDT 6 generator # Author : Chris Cleeland, Object Computing, Inc. # Create Date : 23-Apr-2010 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use CDT6ProjectCreator; use WorkspaceCreator; use vars qw(@ISA); @ISA = qw(WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub requires_make_coexistence { #my $self = shift; return 1; } sub supports_make_coexistence { #my $self = shift; return 1; } sub workspace_file_name { my $self = shift; my $wsn = $self->get_workspace_name(); return $self->get_modified_workspace_name("cdt_workspace_$wsn", '.txt'); } sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); ## Optionally print the workspace comment $self->print_workspace_comment($fh, '#----------------------------------------------------------------------------', $crlf, '# Eclipse CDT ', $self->get_cdt_version(), ' generator', $crlf, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, '# Listed below are the Eclipse projects created for this MPC workspace.', $crlf, '# These should be imported into an existing Eclipse workspace.', $crlf, '# Each project is listed on a line consisting of the project name and the full', $crlf, '# path to its .project file (space-separated).', $crlf, '# The projects are listed in dependency order.', $crlf, '#', $crlf, '# MPC Command:', $crlf, '# ', $self->create_command_line_string($0, @ARGV), $crlf, '#----------------------------------------------------------------------------', $crlf); } sub get_cdt_version { return '6'; } sub write_comps { my($self, $fh, $creator) = @_; my $info = $self->get_project_info(); my $crlf = $self->crlf(); $self->{'seen_deps'} = {}; foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) { print $fh $$info{$project}->[ProjectCreator::PROJECT_NAME], ' ', Cwd::abs_path($self->mpc_dirname($project)), '/.project', $crlf; $self->add_dependencies($creator, $project); } } sub add_dependencies { my($self, $creator, $proj) = @_; my $outdir = $self->mpc_dirname($proj); my $into = $self->get_outdir(); $outdir = "$into/$outdir" if $into ne '.'; my $pre = ' '; my $post = ''; my $outfile = $outdir . '/.project'; my $fh = new FileHandle(); if (open($fh, $outfile)) { ## Get the dependencies and store them based on the directory of ## the project file. We will check them later. my $deps = $self->get_validated_ordering($proj); my $key = $self->mpc_basename($self->mpc_dirname($proj)); $self->{'seen_deps'}->{$key} = {}; foreach my $dep (@$deps) { $self->{'seen_deps'}->{$key}->{$dep} = 1; } my @read = (); my $cwd = $self->getcwd(); while(<$fh>) { ## This is a comment found in cdt6project.mpd. if (/MPC\s+ADD\s+DEPENDENCIES/) { my $crlf = $self->crlf(); my %seen = (); my @lines; foreach my $dep (reverse @$deps) { ## If we've seen this dependency, we don't need to add it ## again. The build tool will handle it correctly. if (!$seen{$dep}) { my $relative = $self->get_relative_dep_file($creator, "$cwd/$proj", $dep); ## Since we're looking at the dependencies in reverse order ## now, we need to unshift them into another array to keep ## the correct order. unshift(@lines, "$pre$dep$post$crlf") if (defined $relative); ## We've now seen this dependency and all of the ## projects upon which this one depends. $seen{$dep} = 1; foreach my $key (keys %{$self->{'seen_deps'}->{$dep}}) { $seen{$key} = 1; } } } ## Add the dependency lines to the project file push(@read, @lines); } else { push(@read, $_); } } close($fh); ## We will always rewrite the project file (with or without dependencies) if (open($fh, ">$outfile")) { foreach my $line (@read) { print $fh $line; } close($fh); } } } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC11WorkspaceCreator.pm0000644000175000017500000000235013154167361020565 0ustar tggtggpackage VC11WorkspaceCreator; # ************************************************************ # Description : A VC11 Workspace Creator # Author : Johnny Willemsen # Create Date : 12/12/2011 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC11ProjectCreator; use VC10WorkspaceCreator; use vars qw(@ISA); @ISA = qw(VC10WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); print $fh '', $crlf, 'Microsoft Visual Studio Solution File, Format Version 11.00', $crlf; $self->print_workspace_comment($fh, '# Visual Studio 2012', $crlf, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, '#', $crlf, '# MPC Command:', $crlf, '# ', $self->create_command_line_string($0, @ARGV), $crlf); } 1; ace-6.4.5+dfsg.orig/MPC/modules/BDS4ProjectCreator.pm0000644000175000017500000000177613154167361020272 0ustar tggtggpackage BDS4ProjectCreator; # ************************************************************ # Description : The Borland Developer Studio 4 Project Creator # Author : Johnny Willemsen # Create Date : 14/12/2005 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ProjectCreator; use BorlandPropertyBase; use XMLProjectBase; use vars qw(@ISA); @ISA = qw(XMLProjectBase BorlandPropertyBase ProjectCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub crlf { #my $self = shift; return "\n"; } sub project_file_extension { #my $self = shift; return '.bdsproj'; } sub get_dll_exe_template_input_file { #my $self = shift; return 'bds4exe'; } sub get_dll_template_input_file { #my $self = shift; return 'bds4dll'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/SLEProjectCreator.pm0000644000175000017500000000157713154167361020220 0ustar tggtggpackage SLEProjectCreator; # ************************************************************ # Description : The SLE Project Creator # Author : Johnny Willemsen # Create Date : 3/23/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ProjectCreator; use XMLProjectBase; use vars qw(@ISA); @ISA = qw(XMLProjectBase ProjectCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub project_file_extension { #my $self = shift; return '.vpj'; } sub get_dll_exe_template_input_file { #my $self = shift; return 'sleexe'; } sub get_dll_template_input_file { #my $self = shift; return 'sledll'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/Parser.pm0000644000175000017500000001121713154167361016152 0ustar tggtggpackage Parser; # ************************************************************ # Description : A basic parser that requires a parse_line override # Author : Chad Elliott # Create Date : 5/16/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use FileHandle; use mpc_debug; use OutputMessage; use StringProcessor; use DirectoryManager; use vars qw(@ISA); @ISA = qw(OutputMessage StringProcessor DirectoryManager); # ************************************************************ # Data Section # ************************************************************ my %filecache; # ************************************************************ # Subroutine Section # ************************************************************ sub new { my($class, $inc) = @_; my $self = $class->SUPER::new(); ## Set up the internal data members. $self->{'line_number'} = 0; $self->{'include'} = $inc; return $self; } sub strip_comments { my($self, $line) = @_; $line =~ s/\/\/.*//; return $line; } sub strip_lt_whitespace { my($self, $line, $keep_leading_whitespace) = @_; $line =~ s/^\s+// if !$keep_leading_whitespace; $line =~ s/\s+$//; return $line; } sub is_blank_line { my($self, $line) = @_; return m/^\s+$/; } sub strip_line { my($self, $line) = @_; ## Keep track of our line number ++$self->{'line_number'}; $line = $self->strip_comments($line); $line = $self->strip_lt_whitespace($line); return $line; } sub preprocess_line { #my $self = shift; #my $fh = shift; #my $line = shift; return $_[0]->strip_line($_[2]); } sub read_file { my($self, $input, $cache) = @_; my $ih = new FileHandle(); my $status = 1; my $errorString; mpc_debug::chkpnt_pre_read_file($input, $cache); $self->{'line_number'} = 0; if (open($ih, $input)) { $self->debug("Open $input"); if ($cache) { ## If we don't have an array for this file, then start one $filecache{$input} = [] if (!defined $filecache{$input}); while(<$ih>) { ## Preprocess the line my $line = $self->preprocess_line($ih, $_); ## Push the line onto the array for this file push(@{$filecache{$input}}, $line); ## Parse the line ($status, $errorString) = $self->parse_line($ih, $line); ## Stop reading the file if we've encountered an error last if (!$status); } } else { ## We're not caching, so we just preprocess and parse in one call. while(<$ih>) { ($status, $errorString) = $self->parse_line( $ih, $self->preprocess_line($ih, $_)); ## Stop reading the file if we've encountered an error last if (!$status); } } $self->debug("Close $input"); close($ih); } else { $errorString = "Unable to open \"$input\" for reading"; $status = 0; } mpc_debug::chkpnt_post_read_file($input, $cache, $status, $errorString); return $status, $errorString; } sub cached_file_read { my($self, $input) = @_; my $lines = $filecache{$input}; if (defined $lines) { my $status = 1; my $error; $self->{'line_number'} = 0; foreach my $line (@$lines) { ++$self->{'line_number'}; ## Since we're "reading" a cached file, we must pass undef as the ## file handle to parse_line(). ($status, $error) = $self->parse_line(undef, $line); ## Stop "reading" the file if we've encountered an error last if (!$status); } return $status, $error; } ## We haven't cached this file yet, read it and cache it. return $self->read_file($input, 1); } sub get_line_number { return $_[0]->{'line_number'}; } sub set_line_number { my($self, $number) = @_; $self->{'line_number'} = $number; } sub slash_to_backslash { ## This method is here solely for convenience. It's used to make the ## calling code look cleaner. my($self, $file) = @_; $file =~ s/\//\\/g; return $file; } sub get_include_path { return $_[0]->{'include'}; } sub search_include_path { my($self, $file) = @_; foreach my $include ('.', @{$self->{'include'}}) { return "$include/$file" if (-r "$include/$file"); } return undef; } sub escape_regex_special { my($self, $name) = @_; $name =~ s/([\+\-\\\$\[\]\(\)\.])/\\$1/g; return $name; } # ************************************************************ # Virtual Methods To Be Overridden # ************************************************************ sub parse_line { #my $self = shift; #my $ih = shift; #my $line = shift; } 1; ace-6.4.5+dfsg.orig/MPC/modules/Creator.pm0000644000175000017500000010712313154167361016317 0ustar tggtggpackage Creator; # ************************************************************ # Description : Base class for workspace and project creators # Author : Chad Elliott # Create Date : 5/13/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use FileHandle; use File::Compare; use Parser; use vars qw(@ISA); @ISA = qw(Parser); # ************************************************************ # Data Section # ************************************************************ ## Constants for use throughout the project use constant cplusplus => 'cplusplus'; use constant csharp => 'csharp'; use constant java => 'java'; use constant vb => 'vb'; use constant website => 'website'; ## The default language for MPC my $deflang = 'cplusplus'; ## A map of all of the allowed languages. The 'website' value ## is not here because it isn't really a language. It is used ## as a language internally by some project types though. ## NOTE: We call the constant as a function to support Perl 5.6. my %languages = (cplusplus() => 1, csharp() => 1, java() => 1, vb() => 1, ); my $assign_key = 'assign'; my $gassign_key = 'global_assign'; my %non_convert = ('prebuild' => 1, 'postbuild' => 1, 'postclean' => 1, ); my @statekeys = ('global', 'include', 'template', 'ti', 'dynamic', 'static', 'relative', 'addtemp', 'addproj', 'progress', 'toplevel', 'baseprojs', 'features', 'feature_file', 'hierarchy', 'name_modifier', 'apply_project', 'into', 'use_env', 'expand_vars', 'language', ); my %all_written; my $onVMS = DirectoryManager::onVMS(); # ************************************************************ # Subroutine Section # ************************************************************ sub new { my($class, $global, $inc, $template, $ti, $dynamic, $static, $relative, $addtemp, $addproj, $progress, $toplevel, $baseprojs, $feature, $features, $hierarchy, $nmodifier, $applypj, $into, $language, $use_env, $expandvars, $type) = @_; my $self = Parser::new($class, $inc); $self->{'relative'} = $relative; $self->{'template'} = $template; $self->{'ti'} = $ti; $self->{'global'} = $global; $self->{'grammar_type'} = $type; $self->{'type_check'} = $type . '_defined'; $self->{'global_read'} = 0; $self->{'current_input'} = ''; $self->{'progress'} = $progress; $self->{'addtemp'} = $addtemp; $self->{'addproj'} = $addproj; $self->{'toplevel'} = $toplevel; $self->{'files_written'} = {}; $self->{'real_fwritten'} = []; $self->{'reading_global'} = 0; $self->{$gassign_key} = {}; $self->{$assign_key} = {}; $self->{'baseprojs'} = $baseprojs; $self->{'dynamic'} = $dynamic; $self->{'static'} = $static; $self->{'feature_file'} = $feature; $self->{'features'} = $features; $self->{'hierarchy'} = $hierarchy; $self->{'name_modifier'} = $nmodifier; $self->{'apply_project'} = $applypj; $self->{'into'} = $into; $self->{'language'} = defined $language ? $language : $deflang; $self->{'use_env'} = $use_env; $self->{'expand_vars'} = $expandvars; $self->{'convert_slashes'} = $self->convert_slashes(); $self->{'requires_forward_slashes'} = $self->requires_forward_slashes(); $self->{'case_tolerant'} = $self->case_insensitive(); return $self; } sub preprocess_line { my($self, $fh, $line) = @_; $line = $self->strip_line($line); while ($line =~ /\\$/) { $line =~ s/\s*\\$/ /; my $next = $fh->getline(); $line .= $self->strip_line($next) if (defined $next); } return $line; } sub generate_default_input { my $self = shift; my($status, $error) = $self->parse_line(undef, "$self->{'grammar_type'} {"); ## Parse the finish line if there was no error ($status, $error) = $self->parse_line(undef, '}') if ($status); ## Display the error if there was one $self->error($error) if (!$status); return $status; } sub parse_file { my($self, $input) = @_; ## Save the last line number so we can put it back later my $oline = $self->get_line_number(); ## Read the input file my($status, $errorString) = $self->read_file($input); if (!$status) { $self->error($errorString, "$input: line " . $self->get_line_number() . ':'); } elsif ($self->{$self->{'type_check'}}) { ## If we are at the end of the file and the type we are looking at ## is still defined, then we have an error $self->error("Did not " . "find the end of the $self->{'grammar_type'}", "$input: line " . $self->get_line_number() . ':'); $status = 0; } $self->set_line_number($oline); return $status; } sub generate { my($self, $input) = @_; my $status = 1; ## Reset the files_written hash array between processing each file $self->{'files_written'} = {}; $self->{'real_fwritten'} = []; ## Allow subclasses to reset values before ## each call to generate(). $self->reset_values(); ## Read the global configuration file if (!$self->{'global_read'}) { $status = $self->read_global_configuration(); $self->{'global_read'} = 1; } if ($status) { $self->{'current_input'} = $input; ## An empty input file name says that we ## should generate a default input file and use that if ($input eq '') { $status = $self->generate_default_input(); } else { $status = $self->parse_file($input); } } return $status; } # split an inheritance list like ": a,b, c" into components sub parse_parents { my($parents, $errorStringRef, $statusRef) = @_; if (defined $parents) { $parents =~ s/^:\s*//; $parents =~ s/\s+$//; my @parents = split(/\s*,\s*/, $parents); if (!defined $parents[0]) { ## The : was used, but no parents followed. This ## is an error. $$errorStringRef = 'No parents listed'; $$statusRef = 0; } return \@parents; } return undef; } sub parse_known { my($self, $line, $fh) = @_; my $status = 1; my $errorString; my $type = $self->{'grammar_type'}; my @values; ## ## Each regexp that looks for the '{' looks for it at the ## end of the line. It is purposely this way to decrease ## the amount of extra lines in each file. This ## allows for the most compact file as human readably ## possible. ## if ($line eq '') { } elsif ($line =~ /^$type\s*(\([^\)]+\))?\s*(:.*)?\s*{$/) { my $name = $1; my $parents = $2; if ($self->{$self->{'type_check'}}) { $errorString = "Did not find the end of the $type"; $status = 0; } else { $parents = parse_parents($parents, \$errorString, \$status); push(@values, $type, $name, $parents); } } elsif ($line =~ /^}$/) { if ($self->{$self->{'type_check'}}) { push(@values, $type, $line); } else { $errorString = "Did not find the beginning of the $type"; $status = 0; } } elsif ($line =~ /^(feature)\s*\(([^\)]+)\)\s*(:.*)?\s*{$/) { my $type = $1; my $name = $2; my $parents = $3; my @names = split(/\s*,\s*/, $name); $parents = parse_parents($parents, \$errorString, \$status); push(@values, $type, \@names, $parents); } elsif (!$self->{$self->{'type_check'}}) { $errorString = "No $type was defined"; $status = 0; } elsif ($self->parse_assignment($line, \@values, $fh)) { ## If this returns true, then we've found an assignment } elsif ($line =~ /^(\w+)\s*(\([^\)]+\))?\s*(:.*)?\s*{$/) { my $comp = lc($1); my $name = $2; my $parents = $3; if (defined $name) { $name =~ s/^\(\s*//; $name =~ s/\s*\)$//; } else { $name = $self->get_default_component_name(); } $parents = parse_parents($parents, \$errorString, \$status); push(@values, 'component', $comp, $name, $parents); } else { $errorString = "Unrecognized line: $line"; $status = -1; } return $status, $errorString, @values; } ## Parse an assignment that is bracketed by curly braces so it can span multiple lines. ## This method parses the bracketed assignment into a regular assignment ## and then calls SUPER::parse_assigment. ## ## A bracketed assigment has the form of: ## ## keyword [optional flags] { ## This spans ## multiple lines ## } ## ## Optional flags are \s to retain leading white space and ## \n to retain new lines. These flags are be combined. sub parse_assignment { my($self, $line, $values, $fh) = @_; if ($line =~ /^(\w+)\s*([\-+]?=)\s*(\\[sn]{1,2})?\s*{$/) { my $comp = lc($1); my $op = $2; my $keep_leading_whitespace = ($3 eq "\\s" || $3 eq "\\ns" || $3 eq "\\sn"); my $keep_new_lines = ($3 eq "\\n" || $3 eq "\\ns" || $3 eq "\\sn"); my $bracketed_assignment; while(<$fh>) { ## This is not an error, ## this is the end of the bracketed assignment. last if ($_ =~ /^\s*}\s*$/); ## Strip comments. my $current_line = $self->strip_comments($_); ## Skip blank lines unless we're keeping new lines. next if (!$keep_new_lines && $self->is_blank_line($current_line)); $bracketed_assignment .= "\n" if defined $bracketed_assignment && $keep_new_lines; $bracketed_assignment .= $self->strip_lt_whitespace($current_line, $keep_leading_whitespace); } if (defined $bracketed_assignment) { $line = $comp . $op . $bracketed_assignment; } } return $self->SUPER::parse_assignment($line, \@$values); } sub parse_scope { my($self, $fh, $name, $type, $validNames, $flags, $elseflags) = @_; my $status = 0; my $errorString = "Unable to process $name"; ## Make sure $flags has a hash map reference $flags = {} if (!defined $flags); while(<$fh>) { my $line = $self->preprocess_line($fh, $_); if ($line eq '') { } elsif ($line =~ /^}$/) { ($status, $errorString) = $self->handle_scoped_end($type, $flags); last; } elsif ($line =~ /^}\s*else\s*{$/) { if (defined $elseflags) { ## From here on out anything after this goes into the $elseflags $flags = $elseflags; $elseflags = undef; ## We need to adjust the type also. If there was a type ## then the first part of the clause was used. If there was ## no type, then the first part was ignored and the second ## part will be used. if (defined $type) { $type = undef; } else { $type = $self->get_default_component_name(); } } else { $status = 0; $errorString = 'An else is not allowed in this context'; last; } } else { my @values; if (defined $validNames && $self->parse_assignment($line, \@values, $fh)) { if (defined $$validNames{$values[1]}) { ## If $type is not defined, we don't even need to bother with ## processing the assignment as we will be throwing the value ## away anyway. if (defined $type) { $self->process_any_assignment($flags, @values); } } else { ($status, $errorString) = $self->handle_unknown_assignment($type, @values); last if (!$status); } } else { ($status, $errorString) = $self->handle_scoped_unknown($fh, $type, $flags, $line); last if (!$status); } } } return $status, $errorString; } sub process_any_assignment { my($self, $flags, @values) = @_; if ($values[0] == 0) { $self->process_assignment($values[1], $values[2], $flags); } elsif ($values[0] == 1) { $self->process_assignment_add($values[1], $values[2], $flags); } elsif ($values[0] == -1) { $self->process_assignment_sub($values[1], $values[2], $flags); } } sub base_directory { my $self = shift; return $self->mpc_basename($self->getcwd()); } sub generate_default_file_list { my($self, $dir, $exclude, $fileexc, $recurse) = @_; my $dh = new FileHandle(); my @files; if (opendir($dh, $dir)) { my $prefix = ($dir ne '.' ? "$dir/" : ''); my $have_exc = (defined $$exclude[0]); my $skip = 0; foreach my $file (grep(!/^\.\.?$/, ($onVMS ? map {$_ =~ s/\.dir$//; $_} readdir($dh) : readdir($dh)))) { ## Prefix each file name with the directory only if it's not '.' my $full = $prefix . $file; if ($have_exc) { foreach my $exc (@$exclude) { if ($full eq $exc) { $skip = 1; last; } } } if ($skip) { $skip = 0; $$fileexc = 1 if (defined $fileexc); } else { if ($recurse && -d $full) { push(@files, $self->generate_default_file_list($full, $exclude, $fileexc, $recurse)); } else { # Strip out ^ symbols $full =~ s/\^//g if ($onVMS); push(@files, $full); } } } if ($self->sort_files()) { @files = sort { $self->file_sorter($a, $b) } @files; } closedir($dh); } return @files; } sub transform_file_name { my($self, $name) = @_; $name =~ s/[\s\-]/_/g; return $name; } sub file_written { my($self, $file) = @_; return (defined $all_written{$self->getcwd() . '/' . $file}); } sub add_file_written { my($self, $file) = @_; my $key = lc($file); if (defined $self->{'files_written'}->{$key}) { $self->warning("$self->{'grammar_type'} $file " . ($self->{'case_tolerant'} ? "has been overwritten." : "of differing case has been processed.")); } else { $self->{'files_written'}->{$key} = $file; push(@{$self->{'real_fwritten'}}, $file); } $all_written{$self->getcwd() . '/' . $file} = 1; } sub extension_recursive_input_list { my($self, $dir, $exclude, $ext) = @_; my $fh = new FileHandle(); my @files; if (opendir($fh, $dir)) { my $prefix = ($dir ne '.' ? "$dir/" : ''); my $skip = 0; foreach my $file (grep(!/^\.\.?$/, ($onVMS ? map {$_ =~ s/\.dir$//; $_} readdir($fh) : readdir($fh)))) { my $full = $prefix . $file; ## Check for command line exclusions if (defined $$exclude[0]) { foreach my $exc (@$exclude) { if ($full eq $exc) { $skip = 1; last; } } } ## If we are not skipping this directory or file, then check it out if ($skip) { $skip = 0; } else { if (-d $full) { push(@files, $self->extension_recursive_input_list($full, $exclude, $ext)); } elsif ($full =~ /$ext$/) { push(@files, $full); } } } closedir($fh); } return @files; } sub recursive_directory_list { my($self, $dir, $exclude) = @_; my $directories = ''; my $fh = new FileHandle(); if (opendir($fh, $dir)) { my $prefix = ($dir ne '.' ? "$dir/" : ''); my $skip = 0; if (defined $$exclude[0]) { foreach my $exc (@$exclude) { if ($dir eq $exc) { $skip = 1; last; } } } if ($skip) { $skip = 0; } else { $directories .= ' ' . $dir; } foreach my $file (grep(!/^\.\.?$/, ($onVMS ? map {$_ =~ s/\.dir$//; $_} readdir($fh) : readdir($fh)))) { my $full = $prefix . $file; if ($file eq '.svn' || $file eq 'CVS') { $skip = 1; } else { ## Check for command line exclusions if (defined $$exclude[0]) { foreach my $exc (@$exclude) { if ($full eq $exc) { $skip = 1; last; } } } } ## If we are not skipping this directory or file, then check it out if ($skip) { $skip = 0; } else { if (-d $full) { $directories .= $self->recursive_directory_list($full, $exclude); } } } closedir($fh); } return $directories; } sub modify_assignment_value { my($self, $name, $value) = @_; if ($self->{'convert_slashes'} && index($name, 'flags') == -1 && !defined $non_convert{$name}) { $value =~ s/\//\\/g; } return $value; } sub get_assignment_hash { ## NOTE: If anything in this block changes, then you must make the ## same change in process_assignment. my $self = shift; return $self->{$self->{'reading_global'} ? $gassign_key : $assign_key}; } sub process_assignment { my($self, $name, $value, $assign) = @_; ## If no hash table was passed in if (!defined $assign) { ## NOTE: If anything in this block changes, then you must make the ## same change in get_assignment_hash. $assign = $self->{$self->{'reading_global'} ? $gassign_key : $assign_key}; } if (defined $value) { $value =~ s/^\s+//; $value =~ s/\s+$//; ## Modify the assignment value before saving it $$assign{$name} = $self->modify_assignment_value($name, $value); } else { $$assign{$name} = undef; } } sub addition_core { my($self, $name, $value, $nval, $assign) = @_; if (defined $nval) { if ($self->preserve_assignment_order($name)) { $nval .= " $value"; } else { $nval = "$value $nval"; } } else { $nval = $value; } $self->process_assignment($name, $nval, $assign, 1); } sub process_assignment_add { my($self, $name, $value, $assign) = @_; my $nval = $self->get_assignment_for_modification($name, $assign); ## Remove all duplicate parts from the value to be added. ## Whether anything gets removed or not is up to the implementation ## of the sub classes. $value = $self->remove_duplicate_addition($name, $value, $nval); ## If there is anything to add, then do so $self->addition_core($name, $value, $nval, $assign) if ($value ne ''); } sub subtraction_core { my($self, $name, $value, $nval, $assign) = @_; if (defined $nval) { my $last = 1; my $found; ## Escape any regular expression special characters $value = $self->escape_regex_special($value); ## If necessary, split the value into an array my $elements = ($value =~ /\s/ ? $self->create_array($value) : [$value]); for(my $i = 0; $i <= $last; $i++) { if ($i == $last) { ## If we did not find the string to subtract in the original ## value, try again after expanding template variables for ## subtraction. $nval = $self->get_assignment_for_modification($name, $assign, 1); } for(my $j = 0; $j <= $last; $j++) { ## Try to remove each individual element and then set the new ## value if any of the elements were found in the original value foreach my $elem (@$elements) { ## First try with quotes, then try again without them my $re = ($j == 0 ? '"' . $elem . '"' : $elem); if ($nval =~ s/\s+$re\s+/ / || $nval =~ s/\s+$re$// || $nval =~ s/^$re\s+// || $nval =~ s/^$re$//) { $found = 1; } } if ($found) { $self->process_assignment($name, $nval, $assign, -1); last; } } last if ($found); } } } sub process_assignment_sub { my($self, $name, $value, $assign) = @_; my $nval = $self->get_assignment_for_modification($name, $assign); ## Remove double quotes if there are any $value =~ s/^\"(.*)\"$/$1/; ## Call to the core function to perform the subtraction. We must also ## pass the value through the assignment modifier to ensure that ## slashes are in the project native format. $self->subtraction_core($name, $self->modify_assignment_value($name, $value), $nval, $assign); } sub fill_type_name { my($self, $names, $def) = @_; my $array = ($names =~ /\s/ ? $self->create_array($names) : [$names]); $names = ''; foreach my $name (@$array) { if ($name =~ /\*/) { my $pre = $def . '_'; my $mid = '_' . $def . '_'; my $post = '_' . $def; ## Replace the beginning and end first then the middle $name =~ s/^\*/$pre/; $name =~ s/\*$/$post/; $name =~ s/\*/$mid/g; ## Remove any trailing underscore or any underscore that is followed ## by a space. This value could be a space separated list. $name =~ s/_$//; $name =~ s/_\s/ /g; $name =~ s/\s_/ /g; ## If any one word is capitalized then capitalize each word if ($name =~ /[A-Z][0-9a-z_]+/) { ## Do the first word if ($name =~ /^([a-z])([^_]+)/) { my $first = uc($1); my $rest = $2; $name =~ s/^[a-z][^_]+/$first$rest/; } ## Do subsequent words while($name =~ /(_[a-z])([^_]+)/) { my $first = uc($1); my $rest = $2; $name =~ s/_[a-z][^_]+/$first$rest/; } } } $names .= $name . ' '; } $names =~ s/\s+$//; return $names; } sub clone { my($self, $obj) = @_; ## Check for various types of data. Those that are not found to be ## types that we need to deep copy are just assigned to new values. ## All others are copied by recursively calling this method. if (UNIVERSAL::isa($obj, 'HASH')) { my $new = {}; foreach my $key (keys %$obj) { $$new{$key} = $self->clone($$obj{$key}); } return $new; } elsif (UNIVERSAL::isa($obj, 'ARRAY')) { my $new = []; foreach my $o (@$obj) { push(@$new, $self->clone($o)); } return $new; } return $obj; } sub save_state { my($self, $selected) = @_; my %state; ## Make a deep copy of each state value. That way our array ## references and hash references do not get accidentally modified. foreach my $skey (defined $selected ? $selected : @statekeys) { if (defined $self->{$skey}) { ## It is necessary to clone each value so that nested complex data ## types do not get unknowingly modified. $state{$skey} = $self->clone($self->{$skey}); } } return %state; } sub restore_state { my($self, $state, $selected) = @_; ## Make a deep copy of each state value. That way our array ## references and hash references do not get accidentally modified. ## It's not necessary to do a recursive deep copy (i.e., use the ## clone() method) because the value coming in will now be owned by ## this object and will not be modified unknowingly. foreach my $skey (defined $selected ? $selected : @statekeys) { my $old = $self->{$skey}; if (defined $state->{$skey} && UNIVERSAL::isa($state->{$skey}, 'ARRAY')) { my @arr = @{$state->{$skey}}; $self->{$skey} = \@arr; } elsif (defined $state->{$skey} && UNIVERSAL::isa($state->{$skey}, 'HASH')) { my %hash = %{$state->{$skey}}; $self->{$skey} = \%hash; } else { $self->{$skey} = $state->{$skey}; } $self->restore_state_helper($skey, $old, $self->{$skey}); } } sub get_global_cfg { return $_[0]->{'global'}; } sub get_template_override { return $_[0]->{'template'}; } sub get_ti_override { return $_[0]->{'ti'}; } sub get_relative { return $_[0]->{'relative'}; } sub get_progress_callback { return $_[0]->{'progress'}; } sub get_addtemp { return $_[0]->{'addtemp'}; } sub get_addproj { return $_[0]->{'addproj'}; } sub get_toplevel { return $_[0]->{'toplevel'}; } sub get_into { return $_[0]->{'into'}; } sub get_use_env { return $_[0]->{'use_env'}; } sub get_expand_vars { return $_[0]->{'expand_vars'}; } sub get_files_written { return $_[0]->{'real_fwritten'}; } sub get_assignment { my $self = shift; my $name = $self->resolve_alias(shift); my $assign = shift; ## If no hash table was passed in if (!defined $assign) { $assign = $self->{$self->{'reading_global'} ? $gassign_key : $assign_key}; } return $$assign{$name}; } sub get_assignment_for_modification { my($self, $name, $assign, $subtraction) = @_; return $self->get_assignment($name, $assign); } sub get_baseprojs { return $_[0]->{'baseprojs'}; } sub get_dynamic { return $_[0]->{'dynamic'}; } sub get_static { return $_[0]->{'static'}; } sub get_default_component_name { #my $self = shift; return 'default'; } sub get_features { return $_[0]->{'features'}; } sub get_hierarchy { return $_[0]->{'hierarchy'}; } sub get_name_modifier { return $_[0]->{'name_modifier'}; } sub get_apply_project { return $_[0]->{'apply_project'}; } sub get_language { return $_[0]->{'language'}; } sub get_outdir { my $self = shift; if (defined $self->{'into'}) { ## First, try to remove our starting directory from the current ## working directory. my $outdir = $self->getcwd(); my $re = $self->escape_regex_special($self->getstartdir()); if ($outdir !~ s/^$re//) { ## If that fails and we're running on an OS that supports drive ## letters, we need to try to remove the drive letter. We also ## warn the user that it's not likely to work properly. my $orig = $outdir; if ((($^O eq 'MSWin32' || $^O eq 'cygwin') && $outdir =~ s/^[a-z]://i) || $outdir =~ m!^/!) { $self->warning("Unable to use $orig with the -into option"); } } return $self->{'into'} . $outdir; } else { return '.'; } } sub expand_variables { my($self, $value, $rel, $expand_template, $scopes, $expand, $warn) = @_; my $cwd = $self->getcwd(); my $start = 0; my $forward_slashes = $self->{'convert_slashes'} || $self->{'requires_forward_slashes'}; ## Fix up the value for Windows switch the \\'s to / $cwd =~ s/\\/\//g if ($forward_slashes); while(substr($value, $start) =~ /(\$\(([^)]+)\))/) { my $whole = $1; my $name = $2; if (defined $$rel{$name}) { my $val = $$rel{$name}; if ($expand) { $val =~ s/\//\\/g if ($forward_slashes); substr($value, $start) =~ s/\$\([^)]+\)/$val/; $whole = $val; } else { ## Fix up the value for Windows switch the \\'s to / $val =~ s/\\/\//g if ($forward_slashes); my $icwd = ($self->{'case_tolerant'} ? lc($cwd) : $cwd); my $ival = ($self->{'case_tolerant'} ? lc($val) : $val); my $iclen = length($icwd); my $ivlen = length($ival); ## If the relative value contains the current working ## directory plus additional subdirectories, we must pull ## off the additional directories into a temporary where ## it can be put back after the relative replacement is done. my $append; if (index($ival, $icwd) == 0 && $iclen != $ivlen && substr($ival, $iclen, 1) eq '/') { my $diff = $ivlen - $iclen; $append = substr($ival, $iclen); substr($ival, $iclen, $diff) = ''; $ivlen -= $diff; } if (index($icwd, $ival) == 0 && ($iclen == $ivlen || substr($icwd, $ivlen, 1) eq '/')) { my $current = $icwd; substr($current, 0, $ivlen) = ''; my $dircount = ($current =~ tr/\///); if ($dircount == 0) { $ival = '.'; } else { $ival = '../' x $dircount; $ival =~ s/\/$//; } $ival .= $append if (defined $append); ## We have to remove the leading ./ if there is one. ## Otherwise, if this value is used as an exclude value it will ## not match up correctly. $ival =~ s!^\./!!; ## Convert the slashes if necessary $ival =~ s/\//\\/g if ($self->{'convert_slashes'}); substr($value, $start) =~ s/\$\([^)]+\)/$ival/; $whole = $ival; } elsif ($self->convert_all_variables() && $warn) { ## The user did not choose to expand $() variables directly, ## but we could not convert it into a relative path. So, ## instead of leaving it we will expand it. But, we will only ## get into this section if this is the secondary attempt to ## replace the variable (indicated by the $warn boolean). $val =~ s/\//\\/g if ($self->{'convert_slashes'}); substr($value, $start) =~ s/\$\([^)]+\)/$val/; $whole = $val; } else { my $loc = index(substr($value, $start), $whole); $start += $loc if ($loc > 0); } } } elsif ($expand_template || $self->expand_variables_from_template_values()) { my $ti = $self->get_template_input(); my $val = (defined $ti ? $ti->get_value($name) : undef); my @snames; if (defined $scopes) { @snames = map { (defined $_ ? $_ : '') . '::' . $name } @$scopes; } push(@snames, $name); my $arr = $self->adjust_value(\@snames, (defined $val ? $val : [])); if (UNIVERSAL::isa($arr, 'HASH')) { $self->warning("$name conflicts with a template variable scope"); } elsif (UNIVERSAL::isa($arr, 'ARRAY') && defined $$arr[0]) { $val = $self->modify_assignment_value(lc($name), "@$arr"); substr($value, $start) =~ s/\$\([^)]+\)/$val/; ## We have replaced the template value, but that template ## value may contain a $() construct that may need to get ## replaced too. However, if the name of the template variable ## is the same as the original $() variable name, we need to ## leave it alone to avoid looping infinitely. $whole = '' if ($whole ne $val); } else { $self->warning("Unable to expand $name.") if ($expand && $warn); my $loc = index(substr($value, $start), $whole); $start += $loc if ($loc > 0); } } elsif ($self->convert_all_variables() && $warn) { ## We could not find a value to correspond to the variable name. ## Instead of leaving it we will expand it. But, we will only ## get into this section if this is the secondary attempt to ## replace the variable (indicated by the $warn boolean). substr($value, $start) =~ s/\$\([^)]+\)//; $whole = ''; } else { my $loc = index(substr($value, $start), $whole); $start += $loc if ($loc > 0); } $start += length($whole); } $value =~ s/\\/\//g if ($self->{'requires_forward_slashes'}); return $value; } sub replace_env_vars { my($self, $lref) = @_; my $one_empty = undef; ## Loop through the string until we find no more environment variables. while($$lref =~ /\$(\w+)/) { my $name = $1; my $val = ''; ## PWD is a special variable. It isn't set on Windows, but in MPC we ## must guarantee that it is always there. if ($name eq 'PWD') { $val = $self->getcwd(); } elsif (defined $ENV{$name}) { $val = $ENV{$name}; } else { ## Keep track of an environment variable not being set. $one_empty = 1; } $$lref =~ s/\$\w+/$val/; } return $one_empty; } sub relative { my($self, $value, $expand_template, $scopes) = @_; if (defined $value) { if (UNIVERSAL::isa($value, 'ARRAY')) { my @built; foreach my $val (@$value) { my $rel = $self->relative($val, $expand_template, $scopes); if (UNIVERSAL::isa($rel, 'ARRAY')) { push(@built, @$rel); } else { push(@built, $rel); } } return \@built; } elsif (index($value, '$') >= 0) { ## A form of this code lives in ## ProjectCreator::create_recursive_settings. If you are changing ## something in this area, please look at the method in ## ProjectCreator.pm to see if it needs changing too. my $ovalue = $value; my($rel, $how) = $self->get_initial_relative_values(); $value = $self->expand_variables($value, $rel, $expand_template, $scopes, $how, 0); if ($ovalue eq $value || index($value, '$') >= 0) { ($rel, $how) = $self->get_secondary_relative_values(); $value = $self->expand_variables($value, $rel, $expand_template, $scopes, $how, 1); } } } ## Values that have two or more strings enclosed in double quotes are ## to be interpreted as elements of an array if (defined $value && $value =~ /^"[^"]+"(\s+"[^"]+")+$/) { $value = $self->create_array($value); } return $value; } ## Static function. Returns the default language for MPC. sub defaultLanguage { return $deflang; } ## Static function. Returns an array of valid languages. sub validLanguages { return keys %languages; } ## Static function. The one and only argument is the language ## string to check for validity. sub isValidLanguage { return defined $languages{$_[0]}; } sub languageIs { #my($self, $language) = @_; return $_[0]->{'language'} eq $_[1]; } # ************************************************************ # Virtual Methods To Be Overridden # ************************************************************ sub restore_state_helper { #my $self = shift; #my $skey = shift; #my $old = shift; #my $new = shift; } sub get_initial_relative_values { #my $self = shift; return {}, 0; } sub get_secondary_relative_values { my $self = shift; return ($self->{'use_env'} ? \%ENV : $self->{'relative'}), $self->{'expand_vars'}; } sub convert_all_variables { #my $self = shift; return 0; } sub expand_variables_from_template_values { #my $self = shift; return 0; } sub preserve_assignment_order { #my $self = shift; #my $name = shift; return 1; } sub compare_output { #my $self = shift; return 0; } sub files_are_different { my($self, $old, $new) = @_; return !(-r $old && -s $new == -s $old && compare($new, $old) == 0); } sub handle_scoped_end { #my $self = shift; #my $type = shift; #my $flags = shift; return 1, undef; } sub handle_unknown_assignment { my $self = shift; my $type = shift; my @values = @_; return 0, "Invalid assignment name: '$values[1]'"; } sub handle_scoped_unknown { my($self, $fh, $type, $flags, $line) = @_; return 0, "Unrecognized line: $line"; } sub remove_duplicate_addition { my($self, $name, $value, $current) = @_; return $value; } sub generate_recursive_input_list { #my $self = shift; #my $dir = shift; #my $exclude = shift; return (); } sub reset_values { #my $self = shift; } sub sort_files { #my $self = shift; return 1; } sub file_sorter { #my $self = shift; #my $left = shift; #my $right = shift; return $_[1] cmp $_[2]; } sub read_global_configuration { #my $self = shift; #my $input = shift; return 1; } sub set_verbose_ordering { #my $self = shift; #my $value = shift; } sub get_properties { my $self = shift; ## Create the property hash map with the language property my %props = ($self->get_language() => 1); ## Set the 'static' property only if the project is static $props{'static'} = 1 if ($self->get_static()); return \%props; } 1; ace-6.4.5+dfsg.orig/MPC/modules/ProjectCreator.pm0000644000175000017500000060232213154167361017647 0ustar tggtggpackage ProjectCreator; # ************************************************************ # Description : Base class for all project creators # Author : Chad Elliott # Create Date : 3/13/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use FileHandle; use File::Path; use mpc_debug; use Creator; use TemplateInputReader; use TemplateParser; use FeatureParser; use CommandHelper; use Data::Dumper; #use Tie::IxHash; use vars qw(@ISA); @ISA = qw(Creator); # ************************************************************ # Data Section # ************************************************************ ## The basic extensions known to a project creator my $BaseClassExtension = 'mpb'; my $ProjectCreatorExtension = 'mpc'; my $TemplateExtension = 'mpd'; my $TemplateInputExtension = 'mpt'; ## This feature is enabled or disabled depending on whether ## or not the -static option is used. my $static_libs_feature = 'static_libs_only'; ## Valid names for assignments within a project ## Bit Meaning ## 0 Preserve the order for additions (1) or invert it (0) ## 1 Add this value to template input value (if there is one) ## 2 Preserve <% %> settings for evaluation within the template my %validNames = ('after' => 1, 'avoids' => 3, 'custom_only' => 1, 'dllout' => 1, 'dynamicflags' => 3, 'exename' => 1, 'exeout' => 1, 'includes' => 3, 'libout' => 1, 'libpaths' => 3, 'libs' => 2, 'lit_libs' => 2, 'macros' => 3, 'managed' => 1, 'pch_header' => 1, 'pch_source' => 1, 'postbuild' => 5, 'postclean' => 5, 'prebuild' => 5, 'pure_libs' => 2, 'recurse' => 1, 'recursive_includes' => 3, 'recursive_libpaths' => 3, 'requires' => 3, 'sharedname' => 1, 'staticflags' => 3, 'staticname' => 1, 'tagchecks' => 1, 'tagname' => 1, 'version' => 1, 'webapp' => 1, ); ## Custom definitions only ## Bit Meaning ## 0 Value is always an array ## 1 Value is an array and name gets 'outputext' converted to 'files' ## 2 Value is always scalar ## 3 Name can also be used in an 'optional' clause ## 4 Needs <%...%> conversion my %customDefined = ('automatic_in' => 0x04, 'automatic_out' => 0x04, 'command' => 0x14, 'commandflags' => 0x14, 'dependent' => 0x14, 'dependent_libs' => 0x14, 'precommand' => 0x14, 'postcommand' => 0x14, 'inputext' => 0x01, 'libpath' => 0x04, 'output_follows_input' => 0x04, 'output_option' => 0x14, 'pch_postrule' => 0x04, 'pre_extension' => 0x08, 'source_pre_extension' => 0x08, 'template_pre_extension' => 0x08, 'header_pre_extension' => 0x08, 'inline_pre_extension' => 0x08, 'documentation_pre_extension' => 0x08, 'resource_pre_extension' => 0x08, 'generic_pre_extension' => 0x08, 'pre_filename' => 0x08, 'source_pre_filename' => 0x08, 'template_pre_filename' => 0x08, 'header_pre_filename' => 0x08, 'inline_pre_filename' => 0x08, 'documentation_pre_filename' => 0x08, 'resource_pre_filename' => 0x08, 'generic_pre_filename' => 0x08, 'pre_dirname' => 0x08, 'source_pre_dirname' => 0x08, 'template_pre_dirname' => 0x08, 'header_pre_dirname' => 0x08, 'inline_pre_dirname' => 0x08, 'documentation_pre_dirname' => 0x08, 'resource_pre_dirname' => 0x08, 'generic_pre_dirname' => 0x08, 'source_outputext' => 0x0a, 'template_outputext' => 0x0a, 'header_outputext' => 0x0a, 'inline_outputext' => 0x0a, 'documentation_outputext' => 0x0a, 'resource_outputext' => 0x0a, 'generic_outputext' => 0x0a, ); ## Custom sections as well as definitions ## Value Meaning ## 0 No modifications ## 1 Needs <%...%> conversion my %custom = ('command' => 1, 'commandflags' => 1, 'dependent' => 1, 'dependent_libs'=> 1, 'gendir' => 0, 'precommand' => 1, 'postcommand' => 1, ); ## All matching assignment arrays will get these keywords my @default_matching_assignments = ('recurse', ); ## Deal with these components in a special way my %specialComponents = ('header_files' => 1, 'inline_files' => 1, 'template_files' => 1, ); my %sourceComponents = ('source_files' => 1, 'template_files' => 1, ); my $defgroup = 'default_group'; my $grouped_key = 'grouped_'; my $tikey = '/ti/'; ## Matches with generic_outputext my $generic_key = 'generic_files'; ## These constants are used with the "project info" and ## must match the order that is defined by the call order ## of ProjectCreator::update_project_info(). This called ## order is determined by the TemplateParser. ## ## NOTE: If you are going to add a new constant, you must make it the ## numeric value of the CONFIGURATIONS constant and increment ## the existing CONFIGURATIONS value. use constant PROJECT_NAME => 0; use constant DEPENDENCIES => 1; use constant PROJECT_GUID => 2; use constant LANGUAGE => 3; use constant CUSTOM_ONLY => 4; use constant NO_CROSS_COMPILE => 5; use constant MANAGED_PROJECT => 6; use constant MAKE_GROUP => 7; use constant CONFIGURATIONS => 8; # ************************************************************ # C++ Specific Component Settings # ************************************************************ ## Resource files tag for C++ my $cppresource = 'resource_files'; ## Valid component names within a project along with the valid file extensions my %cppvc = ('source_files' => [ "\\.cpp", "\\.cxx", "\\.cc", "\\.c", "\\.C", ], 'template_files' => [ "_T\\.cpp", "_T\\.cxx", "_T\\.cc", "_T\\.c", "_T\\.C", "_t\\.cpp", "_t\\.cxx", "_t\\.cc", "_t\\.c", "_t\\.C", "\\.tpp" ], 'header_files' => [ "\\.h", "\\.hpp", "\\.hxx", "\\.hh", ], 'inline_files' => [ "\\.i", "\\.ipp", "\\.inl", ], 'documentation_files' => [ "README", "readme", "\\.doc", "\\.txt", "\\.html" ], $cppresource => [ "\\.rc", ], ); ## Exclude these extensions when auto generating the component values my %cppec = ('source_files' => $cppvc{'template_files'}, ); ## These matching assignment arrays will get added, but only to the ## specific project component types. my %cppma = ('source_files' => ['buildflags', 'managed', 'no_pch', ], 'header_files' => [ 'dependent_upon', ], ); # ************************************************************ # C# Specific Component Settings # ************************************************************ ## Resource files tag for C# my $csresource = 'resx_files'; ## Valid component names within a project along with the valid file extensions my %csvc = ('source_files' => [ "\\.cs" ], 'config_files' => [ "\\.config" ], $csresource => [ "\\.resx", "\\.resources" ], 'aspx_files' => [ "\\.aspx" ], 'ico_files' => [ "\\.ico" ], 'documentation_files' => [ "README", "readme", "\\.doc", "\\.txt", "\\.html" ], 'embedded_resource_files' => [], 'resource_files' => [], 'page_files' => [], 'appdef_files' => [], 'splash_files' => [], ); my %csma = ('source_files' => [ 'dependent_upon', 'subtype', ], $csresource => [ 'dependent_upon', 'generates_source', 'subtype', ], ); # ************************************************************ # Java Specific Component Settings # ************************************************************ ## Valid component names within a project along with the valid file extensions my %jvc = ('source_files' => [ "\\.java" ], 'documentation_files' => [ "README", "readme", "\\.doc", "\\.txt", "\\.html" ], ); # ************************************************************ # Visual Basic Specific Component Settings # ************************************************************ ## Resource files tag for VB my $vbresource = 'resx_files'; ## Valid component names within a project along with the valid file extensions my %vbvc = ('source_files' => [ "\\.vb" ], 'config_files' => [ "\\.config" ], $vbresource => [ "\\.resx" ], 'aspx_files' => [ "\\.aspx" ], 'ico_files' => [ "\\.ico" ], 'documentation_files' => [ "README", "readme", "\\.doc", "\\.txt", "\\.html" ], ); my %vbma = ('source_files' => [ 'subtype' ], ); # ************************************************************ # Language Specific Component Settings # ************************************************************ # Index Description # ----- ----------- # 0 File types # 1 Files automatically excluded from source_files # 2 Assignments available in standard file types # 3 The entry point for executables # 4 The language uses a C preprocessor # 5 Name of the tag for 'resource_files' for this language # * This is special because it gets treated like source_files in that # a project with only these files is a library/exe not "custom only". ## NOTE: We call the constant as a function to support Perl 5.6. my %language = (Creator::cplusplus() => [ \%cppvc, \%cppec, \%cppma, 'main', 1, $cppresource ], Creator::csharp() => [ \%csvc, {}, \%csma, 'Main', 0, $csresource ], Creator::java() => [ \%jvc, {}, {}, 'main', 0 ], Creator::vb() => [ \%vbvc, {}, \%vbma, 'Main', 0, $vbresource ], ); my %mains; # ************************************************************ # Subroutine Section # ************************************************************ sub new { my($class, $global, $inc, $template, $ti, $dynamic, $static, $relative, $addtemp, $addproj, $progress, $toplevel, $baseprojs, $gfeature, $relative_f, $feature, $features, $hierarchy, $exclude, $makeco, $nmod, $applypj, $genins, $into, $language, $use_env, $expandvars, $gendot, $comments, $foreclipse, $pid) = @_; my $self = $class->SUPER::new($global, $inc, $template, $ti, $dynamic, $static, $relative, $addtemp, $addproj, $progress, $toplevel, $baseprojs, $feature, $features, $hierarchy, $nmod, $applypj, $into, $language, $use_env, $expandvars, 'project'); $self->{$self->{'type_check'}} = 0; $self->{'feature_defined'} = 0; $self->{'features_changed'} = undef; $self->{'project_info'} = []; $self->{'lib_locations'} = {}; $self->{'reading_parent'} = []; $self->{'dll_exe_template_input'}= {}; $self->{'lib_exe_template_input'}= {}; $self->{'lib_template_input'} = {}; $self->{'dll_template_input'} = {}; $self->{'flag_overrides'} = {}; $self->{'custom_special_output'} = {}; $self->{'custom_special_depend'} = {}; $self->{'special_supplied'} = {}; $self->{'pctype'} = $self->extractType("$self"); $self->{'verbatim'} = {}; $self->{'verbatim_accessed'} = {$self->{'pctype'} => {}}; $self->{'defaulted'} = {}; $self->{'custom_types'} = {}; $self->{'parents_read'} = {}; $self->{'inheritance_tree'} = {}; $self->{'remove_files'} = {}; $self->{'expanded'} = {}; $self->{'dependency_attributes'} = {}; $self->{'gfeature_file'} = $gfeature; $self->{'relative_file'} = $relative_f; $self->{'feature_parser'} = $self->create_feature_parser($features, $feature); $self->{'sort_files'} = $self->sort_files(); $self->{'source_callback'} = undef; $self->{'dollar_special'} = $self->dollar_special(); $self->{'generate_ins'} = $genins; $self->{'addtemp_state'} = undef; $self->{'command_subs'} = $self->get_command_subs(); $self->{'escape_spaces'} = $self->escape_spaces(); $self->{'current_template'} = undef; $self->{'make_coexistence'} = $makeco; $self->add_default_matching_assignments(); $self->reset_generating_types(); $self->{'pid'} = $pid; $self->{'llctr'} = 0; # counts the hash insertion order for mp-mpc return $self; } sub is_keyword { ## Is the name passed in a known keyword for a project. This includes ## keywords mapped by Define_Custom or Modify_Custom. my($self, $name) = @_; return $self->{'valid_names'}->{$name}; } sub read_global_configuration { my $self = shift; my $input = $self->get_global_cfg(); my $status = 1; if (defined $input) { ## If it doesn't contain a path, search the include path if ($input !~ /[\/\\]/) { $input = $self->search_include_path($input); $input = $self->get_global_cfg() if (!defined $input); } ## Read and parse the global project file $self->{'reading_global'} = 1; $status = $self->parse_file($input); $self->{'reading_global'} = 0; } return $status; } sub convert_to_template_assignment { my($self, $name, $value, $calledfrom) = @_; ## If the value we are going to set for $name has been used as a ## scoped template variable, we need to hijack the whole assignment ## and turn it into a template variable assignment. my $atemp = $self->get_addtemp(); foreach my $key (grep(/::$name$/, keys %$atemp)) { $self->update_template_variable(0, $calledfrom, $key, $value); } } sub create_recursive_settings { my($self, $name, $value, $assign) = @_; ## Handle both recursive_includes and recursive_libpaths in one ## search and replace. if ($name =~ s/^recursive_//) { ## This portion of code was lifted directly from Creator::relative() ## but modified to always expand the variables. We will turn the ## expanded values back into variables below and once they're passed ## off to the assignment processing code, they will be turned into ## relative values (if possible). if (index($value, '$') >= 0) { my $ovalue = $value; my($rel, $how) = $self->get_initial_relative_values(); $value = $self->expand_variables($value, $rel, 0, undef, 1); if ($ovalue eq $value || index($value, '$') >= 0) { ($rel, $how) = $self->get_secondary_relative_values(); $value = $self->expand_variables($value, $rel, 0, undef, 1, 1); } } ## Create an array out of the recursive directory list. Convert all ## of the relative or full path values back into $() values. my @dirs = (); my $elems = $self->create_array($value); foreach my $elem (@$elems) { my $dlist = $self->recursive_directory_list($elem, []); if ($dlist eq '') { ## This directory doesn't exist, just add the original value push(@dirs, $elem); } else { ## Create an array out of the directory list and add it to our ## array. my $array = $self->create_array($dlist); push(@dirs, @$array); } } ## We need to return a string, so we join it all together space ## separated. $value = join(' ', $self->back_to_variable(\@dirs)); } return $name, $value; } sub process_assignment { my($self, $name, $value, $assign, $calledfrom) = @_; $calledfrom = 0 if (!defined $calledfrom); ## See if the name is one of the special "recursive" settings. If so, ## fix up the value and change the name. ($name, $value) = $self->create_recursive_settings($name, $value, $assign); if (defined $value) { if ($name eq 'after') { mpc_debug::chkpnt_pre_after_keyword_assignment($name, $value, $assign, $calledfrom); ## Support dependency attributes. They may or may not be used by ## the project or workspace creator implementation. They are ## stored separately from the dependencies themselves. Also, note ## that a value to be added may contain more than one element to be ## added. This function will be called for each one, so we only ## need to handle one at a time. if ($value =~ s/(\s*([^:]+)):([^\s]+)/$1/) { ## The value may contain multiple projects. But, only one ## dependency attribute will be present at any time. So, once we ## get here, we need to remove any of the other projects from the ## front of the key string. my $key = $2; my $value = $3; $key =~ s/.*\s+//; $self->{'dependency_attributes'}->{$key} = $value; } ## Check the after value and warn the user in the event that it ## contains a value that can not be used within a project name. if (!$self->valid_project_name($value)) { $self->warning("after '$value' contains an invalid project name in " . $self->{'current_input'} . ' at line ' . $self->get_line_number() . '.'); } ## Support the '*' mechanism as in the project name, to allow ## the user to correctly depend on another project within the same ## directory. if (index($value, '*') >= 0) { $value = $self->fill_type_name($value, $self->get_default_project_name()); } mpc_debug::chkpnt_post_after_keyword_assignment($name, $value, $assign, $calledfrom); } ## Support the '*' mechanism for libs assignment as well. elsif ($name eq 'libs' && index($value, '*') >= 0) { $value = $self->fill_type_name($value, $self->get_default_project_name()); } ## If this particular project type does not consider the dollar sign ## special and the user has provided two dollarsigns as an escape, we ## will turn it into a single dollar sign. if (!$self->{'dollar_special'} && index($value, '$$') >= 0) { $value =~ s/\$\$/\$/g; } ## If the assignment name is valid and requires parameter (<%...%>) ## replacement, then do so. But, only do so on actual keywords. ## User defined keywords must not have the parameters replaced in ## order for them to get the correct replacement values later on. if (defined $validNames{$name} && ($validNames{$name} & 0x04) == 0 && index($value, '<%') >= 0) { $value = $self->replace_parameters($value, $self->{'command_subs'}); } } if ($calledfrom == 0) { $self->convert_to_template_assignment($name, $value, $calledfrom); } ## Call the base process_assigment() after we have modified the name and ## value. $self->SUPER::process_assignment($name, $value, $assign); ## Support keyword mapping here only at the project level scope. The ## scoped keyword mapping is done through the parse_scoped_assignment() ## method. if (!defined $assign || $assign == $self->get_assignment_hash()) { my $mapped = $self->{'valid_names'}->{$name}; if (defined $mapped && UNIVERSAL::isa($mapped, 'ARRAY')) { $self->parse_scoped_assignment($$mapped[0], 0, $$mapped[1], $value, $self->{'generated_exts'}->{$$mapped[0]}); } } } sub process_assignment_add { my($self, $name, $value, $assign) = @_; ## See if the name is one of the special "recursive" settings. If so, ## fix up the value and change the name. ($name, $value) = $self->create_recursive_settings($name, $value, $assign); return $self->SUPER::process_assignment_add($name, $value, $assign); } sub process_assignment_sub { my($self, $name, $value, $assign) = @_; ## See if the name is one of the special "recursive" settings. If so, ## fix up the value and change the name. ($name, $value) = $self->create_recursive_settings($name, $value, $assign); ## If the assignment name is valid and requires parameter (<%...%>) ## replacement, then do so. But, only do so on actual keywords. ## User defined keywords must not have the parameters replaced in ## order for them to get the correct replacement values later on. if (defined $validNames{$name} && ($validNames{$name} & 0x04) == 0 && index($value, '<%') >= 0) { $value = $self->replace_parameters($value, $self->{'command_subs'}); } return $self->SUPER::process_assignment_sub($name, $value, $assign); } sub addition_core { my($self, $name, $value, $nval, $assign) = @_; ## If there is a previous value ($nval) and the keyword is going to be ## evaled, we need to separate the values with a command separator. ## This has to be done at the MPC level because it isn't always ## possible for the user to know if a value has already been added to ## the keyword (prebuild, postbuild and postclean). if (defined $nval && defined $validNames{$name} && ($validNames{$name} & 4)) { if ($self->preserve_assignment_order($name)) { $value = '<%cmdsep%> ' . $value; } else { $value .= '<%cmdsep%>'; } } ## For an addition, we need to see if it is a project keyword being ## used within a 'specific' section. If it is, we may need to update ## scoped settings for that variable (which are in essence template ## variables). $self->convert_to_template_assignment($name, $value, 1); ## Next, we just give everything to the base class method. $self->SUPER::addition_core($name, $value, $nval, $assign); } sub subtraction_core { my($self, $name, $value, $nval, $assign) = @_; ## For a subtraction, we need to see if it is a project keyword being ## used within a 'specific' section. If it is, we may need to update ## scoped settings for that variable (which are in essence template ## variables). $self->convert_to_template_assignment($name, $value, -1); ## Next, we just give everything to the base class method. $self->SUPER::subtraction_core($name, $value, $nval, $assign); } sub get_assignment_for_modification { my($self, $name, $assign, $subtraction) = @_; ## If we weren't passed an assignment hash, then we need to ## look one up that may possibly correctly deal with keyword mappings if (!defined $assign) { my $mapped = $self->{'valid_names'}->{$name}; if (defined $mapped && UNIVERSAL::isa($mapped, 'ARRAY')) { $name = $$mapped[1]; $assign = $self->{'generated_exts'}->{$$mapped[0]}; } } ## Get the assignment value my $value = $self->get_assignment($name, $assign); ## If we are involved in a subtraction, we get back a value and ## it's a scoped or mapped assignment, then we need to possibly ## expand any template variables. Otherwise, the subtractions ## may not work correctly. if ($subtraction && defined $value && defined $assign) { $value = $self->relative($value, 1); } return $value; } sub begin_project { my($self, $parents) = @_; my $status = 1; my $error; ## Deal with the inheritance hierarchy first ## Add in the base projects from the command line if (!$self->{'reading_global'} && !defined $self->{'reading_parent'}->[0]) { my $baseprojs = $self->get_baseprojs(); if (defined $parents) { StringProcessor::merge($parents, $baseprojs); } else { $parents = $baseprojs; } } if (defined $parents) { foreach my $parent (@$parents) { ## Read in the parent onto ourself my $file = $self->search_include_path( "$parent.$BaseClassExtension"); if (!defined $file) { $file = $self->search_include_path( "$parent.$ProjectCreatorExtension"); } if (defined $file) { if (defined $self->{'reading_parent'}->[0]) { if (StringProcessor::fgrep($file, $self->{'reading_parent'})) { $status = 0; $error = 'Cyclic inheritance detected: ' . $parent; } } if ($status) { if (!defined $self->{'parents_read'}->{$file}) { $self->{'parents_read'}->{$file} = 1; ## Push the base project file onto the parent stack push(@{$self->{'reading_parent'}}, $file); ## Collect up some information about the inheritance tree my $tree = $self->{'current_input'}; if (!defined $self->{'inheritance_tree'}->{$tree}) { $self->{'inheritance_tree'}->{$tree} = {}; } my $hash = $self->{'inheritance_tree'}->{$tree}; foreach my $p (@{$self->{'reading_parent'}}) { $$hash{$p} = {} if (!defined $$hash{$p}); $hash = $$hash{$p}; } ## Begin reading the parent mpc_debug::chkpnt_pre_parse_base_project($file); $status = $self->parse_file($file); mpc_debug::chkpnt_post_parse_base_project($file, $status); ## Take the base project file off of the parent stack pop(@{$self->{'reading_parent'}}); $error = "Invalid parent: $parent" if (!$status); } else { ## The base project has already been read. So, if ## we are reading the original project (not a parent base ## project), then the current base project is redundant. if (!defined $self->{'reading_parent'}->[0]) { $file =~ s/\.[^\.]+$//; $self->information('Inheriting from \'' . $self->mpc_basename($file) . '\' in ' . $self->{'current_input'} . ' is redundant at line ' . $self->get_line_number() . '.'); } } } } else { $status = 0; $error = "Unable to locate parent: $parent"; } } } ## Copy each value from global_assign into assign if (!$self->{'reading_global'}) { foreach my $key (keys %{$self->{'global_assign'}}) { if (!defined $self->{'assign'}->{$key}) { $self->{'assign'}->{$key} = $self->{'global_assign'}->{$key}; } } } return $status, $error; } sub get_process_project_type { my($self, $types) = @_; my $type = ''; my $defcomp = $self->get_default_component_name(); foreach my $t (split(/\s*,\s*/, $types)) { my $not = ($t =~ s/^!\s*//); if ($not) { if ($t eq $self->{'pctype'}) { $type = ''; last; } else { $type = $self->{'pctype'}; } } elsif ($t eq $self->{'pctype'} || $t eq $defcomp) { $type = $t; last; } } return $type; } sub matches_specific_scope { my($self, $elements) = @_; ## First check for properties that correspond to the current project ## type. Elements that begin with "prop:" indicate a property. my $list = ''; my $props = $self->get_properties(); foreach my $prop (split(/\s*,\s*/, $elements)) { my $not = ($prop =~ s/^!\s*//); if ($prop =~/(.+):(.+)/) { if ($1 eq 'prop') { $prop = $2; if ($not) { return $self->{'pctype'} if (!$$props{$prop}); } else { return $self->{'pctype'} if ($$props{$prop}); } } else { $self->warning("$prop is not recognized."); } } else { $list .= ($not ? '!' : '') . $prop . ','; } } ## If none of the elements match a property, then check the type ## against the current project type or the default component name ## (which is what it would be set to if a specific clause is used with ## out parenthesis). my $type = $self->get_process_project_type($list); return $self->{'pctype'} if ($type eq $self->{'pctype'} || $type eq $self->get_default_component_name()); ## Nothing matched return undef; } sub parse_line { my($self, $ih, $line) = @_; my($status, $errorString, @values) = $self->parse_known($line, $ih); ## parse_known() passes back an array of values ## that make up the contents of the line parsed. ## The array can have 0 to 4 items. The first, ## if defined, is always an identifier of some ## sort. if ($status && defined $values[0]) { if ($values[0] eq $self->{'grammar_type'}) { my $name = $values[1]; my $typecheck = $self->{'type_check'}; if (defined $name && $name eq '}') { ## Project Ending if (!defined $self->{'reading_parent'}->[0] && !$self->{'reading_global'}) { ## Fill in all the default values $self->generate_defaults(); ## Perform any additions, subtractions ## or overrides for the project values. my $addproj = $self->get_addproj(); foreach my $ap (keys %$addproj) { if (defined $self->{'valid_names'}->{$ap}) { foreach my $val (@{$$addproj{$ap}}) { if ($$val[0] > 0) { $self->process_assignment_add($ap, $$val[1]); } elsif ($$val[0] < 0) { $self->process_assignment_sub($ap, $$val[1]); } else { $self->process_assignment($ap, $$val[1]); } } } else { $errorString = 'Invalid ' . "assignment modification name: $ap"; $status = 0; } } if ($status) { ## Generate default target names after all source files are added ## and after we've added in all of the options from the ## command line. If the user set exename on the command line ## and no "main" is found, sharedname will be set too and ## most templates do not handle that well. $self->generate_default_target_names(); ## End of project; Write out the file. ($status, $errorString) = $self->write_project(); ## write_project() can return 0 for error, 1 for project ## was written and 2 for project was skipped if ($status == 1) { ## Save the library name and location foreach my $name ('sharedname', 'staticname') { my $val = $self->get_assignment($name); if (defined $val) { my $cwd = $self->getcwd(); my $start = $self->getstartdir(); my $amount = 0; if ($cwd eq $start) { $amount = length($start); } elsif (index($cwd, $start) == 0) { $amount = length($start) + 1; } if ($self->{'pid'} eq 'child') { $self->{'lib_locations'}->{$val} = ++$self->{'llctr'} . '|' . substr($cwd, $amount); } else { $self->{'lib_locations'}->{$val} = substr($cwd, $amount); } last; } } ## Check for unused verbatim markers foreach my $key (keys %{$self->{'verbatim'}}) { if (defined $self->{'verbatim_accessed'}->{$key}) { foreach my $ikey (keys %{$self->{'verbatim'}->{$key}}) { if (!defined $self->{'verbatim_accessed'}->{$key}->{$ikey}) { $self->warning("Marker $ikey does not exist."); } } } } } ## Reset all of the project specific data. I am explicitly ## not resetting dependency_attributes. It is necessary that ## this information stay for the life of the ProjectCreator ## object so that the WorkspaceCreator can have access to the ## information. foreach my $key (keys %{$self->{'valid_components'}}) { delete $self->{$key}; delete $self->{'defaulted'}->{$key}; } if (defined $self->{'addtemp_state'}) { $self->restore_state($self->{'addtemp_state'}, 'addtemp'); $self->{'addtemp_state'} = undef; } $self->{'assign'} = {}; $self->{'verbatim'} = {}; $self->{'verbatim_accessed'} = {$self->{'pctype'} => {}}; $self->{'special_supplied'} = {}; $self->{'flag_overrides'} = {}; $self->{'parents_read'} = {}; $self->{'inheritance_tree'} = {}; $self->{'remove_files'} = {}; $self->{'custom_special_output'} = {}; $self->{'custom_special_depend'} = {}; $self->{'expanded'} = {}; $self->reset_generating_types(); } } $self->{$typecheck} = 0; } else { ## Project Beginning ($status, $errorString) = $self->begin_project($values[2]); ## Set up the default project name if ($status) { if (defined $name) { if ($self->valid_project_name($name)) { ## We should only set the project name if we are not ## reading in a parent project. if (!defined $self->{'reading_parent'}->[0]) { $name =~ s/^\(\s*//; $name =~ s/\s*\)$//; $name = $self->transform_file_name($name); ## Replace any *'s with the default name if (index($name, '*') >= 0) { $name = $self->fill_type_name( $name, $self->get_default_project_name()); } $self->set_project_name($name); } else { $self->warning("Ignoring project name " . "$name in a base project."); } } else { $status = 0; $errorString = 'Projects can not have the following in ' . 'the name: / \\ = ? : & " < > | # %'; } } } ## Signify that we have a valid project $self->{$typecheck} = 1 if ($status); } } elsif ($values[0] eq '0') { ## $values[1] = name; $values[2] = value if (defined $self->{'valid_names'}->{$values[1]}) { $self->process_assignment($values[1], $values[2]); } else { $errorString = "Invalid assignment name: '$values[1]'"; $status = 0; } } elsif ($values[0] eq '1') { ## $values[1] = name; $values[2] = value if (defined $self->{'valid_names'}->{$values[1]}) { $self->process_assignment_add($values[1], $values[2]); } else { $errorString = "Invalid addition name: $values[1]"; $status = 0; } } elsif ($values[0] eq '-1') { ## $values[1] = name; $values[2] = value if (defined $self->{'valid_names'}->{$values[1]}) { $self->process_assignment_sub($values[1], $values[2]); } else { $errorString = "Invalid subtraction name: $values[1]"; $status = 0; } } elsif ($values[0] eq 'component') { my $comp = $values[1]; my $name = $values[2]; my @inhr = defined $values[3] ? @{$values[3]} : (); my $vc = $self->{'valid_components'}; if ($comp ne 'define_custom' && @inhr != 0) { return 0, "$comp does not allow an inheritance list"; } if (defined $$vc{$comp}) { ($status, $errorString) = $self->parse_components($ih, $comp, $name); } else { if ($comp eq 'verbatim') { my($type, $loc, $add) = split(/\s*,\s*/, $name); ($status, $errorString) = $self->parse_verbatim($ih, $type, $loc, $add); } elsif ($comp eq 'specific') { my $type = $self->matches_specific_scope($name); if (defined $type) { ($status, $errorString) = $self->parse_scope( $ih, $comp, $type, $self->{'valid_names'}, $self->get_assignment_hash(), {}); } else { ## We still need to parse the scope, but we will be ## throwing away whatever is processed. However, it ## could still be invalid code that will cause an error. ($status, $errorString) = $self->parse_scope( $ih, $comp, undef, $self->{'valid_names'}, undef, $self->get_assignment_hash()); } } elsif ($comp eq 'define_custom') { ($status, $errorString) = $self->parse_define_custom($ih, $name, 0, \@inhr); } elsif ($comp eq 'modify_custom') { ($status, $errorString) = $self->parse_define_custom($ih, $name, 1); } elsif ($comp eq 'expand') { $self->{'parsing_expand'} = 1; ($status, $errorString) = $self->parse_scope($ih, $comp, $name, undef); $self->{'parsing_expand'} = undef; } else { $errorString = "Invalid component name: $comp"; $status = 0; } } } elsif ($values[0] eq 'feature') { $self->{'feature_defined'} = 1; ($status, $errorString) = $self->process_feature($ih, $values[1], $values[2]); if ($status && $self->{'feature_defined'}) { $errorString = "Did not find the end of the feature"; $status = 0; } } else { $errorString = "Unrecognized line: $line"; $status = 0; } } elsif ($status == -1) { $status = 0; } return $status, $errorString; } sub parse_scoped_assignment { my($self, $tag, $type, $name, $value, $flags) = @_; ## Map the assignment name on a scoped assignment my $mapped = $self->{'valid_names'}->{$name}; if (defined $mapped && UNIVERSAL::isa($mapped, 'ARRAY')) { $name = $$mapped[1]; } if (defined $self->{'matching_assignments'}->{$tag} && StringProcessor::fgrep($name, $self->{'matching_assignments'}->{$tag})) { my $over = {}; if (defined $self->{'flag_overrides'}->{$tag}) { $over = $self->{'flag_overrides'}->{$tag}; } else { $self->{'flag_overrides'}->{$tag} = $over; } if ($type == 0) { $self->process_assignment($name, $value, $flags); } elsif ($type == 1) { ## If there is no value in $$flags, then we need to get ## the outer scope value and put it in there. if (!defined $self->get_assignment($name, $flags)) { my $outer = $self->get_assignment($name); $self->process_assignment($name, $outer, $flags); } $self->process_assignment_add($name, $value, $flags); } elsif ($type == -1) { ## If there is no value in $$flags, then we need to get ## the outer scope value and put it in there. if (!defined $self->get_assignment($name, $flags)) { my $outer = $self->get_assignment($name); $self->process_assignment($name, $outer, $flags); } $self->process_assignment_sub($name, $value, $flags); } return 1; } return 0; } sub update_template_variable { my $self = shift; my $check = shift; my @values = @_; ## Save the addtemp state if we haven't done so before if (!defined $self->{'addtemp_state'}) { my %state = $self->save_state('addtemp'); $self->{'addtemp_state'} = \%state; } ## If the name that is used within a specific is a mapped keyword ## then we need to translate it into the mapped keyword as it will ## be used by the TemplateParser. my $name; if ($values[1] =~ /(.*::)(.*)/) { my $base = $1; my $mapped = $self->{'valid_names'}->{$2}; if (defined $mapped && UNIVERSAL::isa($mapped, 'ARRAY')) { $name = $values[1]; $values[1] = $base . 'custom_type->' . $$mapped[1]; } } ## Now modify the addtemp values my $atemp = $self->get_addtemp(); $self->information("'$values[1]' was used as a template modifier."); if ($check && !defined $atemp->{$values[1]}) { $name = $values[1] if (!defined $name); if ($name =~ s/.*:://) { my $value = $self->get_assignment($name); ## Regardless of whether there was and assignment value, we need to ## look at the template value of the base so that modification of a ## scoped variable includes the base values. if (defined $atemp->{$name}) { foreach my $arr (@{$atemp->{$name}}) { my @copy = @$arr; push(@{$atemp->{$values[1]}}, \@copy); } } unshift(@{$atemp->{$values[1]}}, [0, $value, undef, $name]) if (defined $value); } } ## Subsitute all pseudo variables for the project specific characters. $values[2] = $self->replace_parameters($values[2], $self->{'command_subs'}) if (index($values[2], '<%') >= 0); if (defined $atemp->{$values[1]}) { ## If there are template variable settings, then we need to add ## this new one to the end of the settings that did not come from ## the command line. That way, adjust_value() does not need to ## sort the values (and have knowledge about which came from the ## command line and which didn't). my $max = scalar(@{$atemp->{$values[1]}}); for(my $i = 0; $i < $max; $i++) { if ($atemp->{$values[1]}->[$i]->[2]) { splice(@{$atemp->{$values[1]}}, $i, 0, [$values[0], $values[2], undef, $name]); return; } } } else { $atemp->{$values[1]} = []; } ## If the variable name is not scoped, we need to look through existing ## scoped variables that match the base. If we find one, we need to ## propagate this value into the scoped settings. if (index($values[1], '::') == -1) { $name = $values[1] if (!defined $name); foreach my $key (keys %$atemp) { if ($key ne $name) { foreach my $entry (@{$atemp->{$key}}) { if (defined $$entry[3] && $$entry[3] eq $name) { push(@{$atemp->{$key}}, [$values[0], $values[2], undef, $name]); last; } } } } } ## 0: (0 set, 1 add, -1 subtract) ## 1: The text value ## 2: (true set on command line, false set in project) ## 3: The original variable name if it's scoped or mapped push(@{$atemp->{$values[1]}}, [$values[0], $values[2], undef, $name]); } sub handle_unknown_assignment { my $self = shift; my $type = shift; my @values = @_; ## Unknown assignments within a 'specific' section are handled as ## template value modifications. These are handled exactly as the ## -value_template option in Options.pm. ## If $type is not defined, then we are skipping this section $self->update_template_variable(1, @values) if (defined $type); return 1, undef; } sub handle_scoped_unknown { my($self, $fh, $type, $flags, $line) = @_; if (defined $type && $self->{'parsing_expand'}) { if ($type eq $self->get_default_component_name()) { return 0, 'Can not set expansion in this context'; } else { if (!defined $self->{'expanded'}->{$type}) { my $undef = $self->replace_env_vars(\$line); if (!$undef) { ## This is a special concession for Windows. It will not allow ## you to set an empty environment variable. If an empty ## double quoted string is found, we will assume that the user ## wanted an empty string. $line = '' if ($line eq '""'); $self->{'expanded'}->{$type} = $line; } } return 1, undef; } } ## If the type is not defined, then this is something other than an ## assignment in a 'specific' section and should be flagged as an error return 0, "Unrecognized line: $line"; } sub add_custom_depend { my($self, $tag, $key, $aref) = @_; my @deps = @$aref; if ($self->{'convert_slashes'}) { foreach my $dep (@deps) { $dep =~ s/\//\\/g; } } $self->{'custom_special_depend'}->{$tag}->{$key} = [] unless defined $self->{'custom_special_depend'}->{$tag}->{$key}; StringProcessor::merge($self->{'custom_special_depend'}->{$tag}->{$key}, \@deps); } sub process_component_line { my($self, $tag, $line, $fh, $flags, $grname, $current, $excarr, $comps, $count) = @_; my $status = 1; my $error; my %exclude; my @values; ## If this returns true, then we've found an assignment if ($self->parse_assignment($line, \@values, $fh)) { $status = $self->parse_scoped_assignment($tag, @values, $flags); if (!$status) { $error = 'Unknown keyword: ' . $values[1]; } } else { ## If we successfully remove a '!' from the front, then ## the file(s) listed are to be excluded my $rem = ($line =~ s/^\^\s*//); my $exc = $rem || ($line =~ s/^!\s*//); ## Convert any $(...) in this line before we process any ## wild card characters. If we do not, scoped assignments will ## not work nor will we get the correct wild carded file list. ## We also need to make sure that any back slashes are converted to ## slashes to ensure that later flag_overrides checks will happen ## correctly. $line = $self->relative($line); $line =~ s/\\/\//g if ($self->{'convert_slashes'}); ## Now look for specially listed files. ## Regular expressions are very slow. Searching the line twice with ## index() is 328 times faster than searching with just the regular ## expression when it doesn't match (which is likely to be the case). if ((index($line, '>>') >= 0 || index($line, '<<') >= 0) && $line =~ /(.*)\s+(>>|<<)\s+(.*)/) { $line = $1; my $oop = $2; my $iop = ($oop eq '>>' ? '<<' : '>>'); my $out = ($oop eq '>>' ? $3 : undef); my $dep = ($oop eq '<<' ? $3 : undef); $line =~ s/\s+$//; if (index($line, $iop) >= 0 && $line =~ /(.*)\s+$iop\s+(.*)/) { $line = $1; $out = $2 if ($iop eq '>>'); $dep = $2 if ($iop eq '<<'); $line =~ s/\s+$//; } ## Check for both possible error conditions if (index($line, $oop) >= 0) { $status = 0; $error = "Duplicate $oop used"; } elsif (index($line, $iop) >= 0) { $status = 0; $error = "Duplicate $iop used"; } ## Keys used internally to MPC need to be in forward slash format. my $key = $line; $key =~ s/\\/\//g if ($self->{'convert_slashes'}); if (defined $out) { if (!defined $self->{'custom_special_output'}->{$tag}) { $self->{'custom_special_output'}->{$tag} = {}; } ## We can not convert slashes here as we do for dependencies ## (below). The files specified here need to retain the forward ## slashes as they are used elsewhere. $self->{'custom_special_output'}->{$tag}->{$key} = $self->create_array($out); } if (defined $dep) { $self->add_custom_depend($tag, $key, $self->create_array($dep)); } } ## If there is a command helper, we need to add the output files ## here. It is possible that helper determined output files are ## the only files added by this component type. my $cmdHelper = $self->find_command_helper($tag); if (defined $cmdHelper) { my $key = $line; $key =~ s/\\/\//g if ($self->{'convert_slashes'}); my $cmdflags = $$flags{'commandflags'}; my($add_out, $deps) = $cmdHelper->get_output($key, $cmdflags); push(@{$self->{'custom_special_output'}->{$tag}->{$key}}, @$add_out); foreach my $depTag (keys %$deps) { foreach my $depFile (keys %{$deps->{$depTag}}) { $self->add_custom_depend($depTag, $depFile, $deps->{$depTag}->{$depFile}); } } } ## Set up the files array. If the line contains a wild card ## character use CORE::glob() to get the files specified. my @files; if ($line =~ /^"([^"]+)"$/) { push(@files, $1); } ## Don't glob the line if we're wanting to remove the file. Wait ## until later to do the wildcard expansion (in remove_excluded). elsif (!$rem && $line =~ /[\?\*\[\]]/) { @files = $self->mpc_glob($line); } else { push(@files, $line); } ## If we want to remove these files at the end too, then ## add them to our remove_files hash array. if ($rem) { if (!defined $self->{'remove_files'}->{$tag}) { $self->{'remove_files'}->{$tag} = {}; } foreach my $file (@files) { $self->{'remove_files'}->{$tag}->{$file} = 1; } } ## If we're excluding these files, then put them in the hash if ($exc) { $$grname = $current; @exclude{@files} = (@files); push(@$excarr, @files); } else { ## Set the flag overrides for each file my $over = $self->{'flag_overrides'}->{$tag}; if (defined $over) { foreach my $file (@files) { $$over{$file} = $flags; } } foreach my $file (@files) { ## Add the file if we're not excluding it push(@{$$comps{$current}}, $file) if (!defined $exclude{$file}); ## The user listed a file explicitly, whether we ## excluded it or not. ++$$count; } } } return $status, $error; } sub parse_conditional { my($self, $fh, $types, $tag, $flags, $grname, $current, $exclude, $comps, $count) = @_; my $status = 1; my $error; my $type = $self->matches_specific_scope($types); my $add = (defined $type ? 1 : 0); while(<$fh>) { my $line = $self->preprocess_line($fh, $_); if ($line eq '') { } elsif ($line =~ /^}\s*else\s*{$/) { $add ^= 1; } elsif ($line =~ /^}$/) { last; } elsif ($add) { ($status, $error) = $self->process_component_line( $tag, $line, $fh, $flags, $grname, $current, $exclude, $comps, $count); last if (!$status); } } return $status, $error; } sub parse_components { my($self, $fh, $tag, $name) = @_; my $current = $defgroup; my $status = 1; my $error; my $names = {}; my $comps = {}; my $set; my %flags; my @exclude; my $custom = defined $self->{'generated_exts'}->{$tag}; my $grtag = $grouped_key . $tag; my $grname; if ($custom) { ## For the custom scoped assignments, we want to put a copy of ## the original custom defined values in our flags associative array. foreach my $key (keys %custom) { if (defined $self->{'generated_exts'}->{$tag}->{$key}) { $flags{$key} = $self->{'generated_exts'}->{$tag}->{$key}; } } } if (defined $self->{$tag}) { $names = $self->{$tag}; } else { $self->{$tag} = $names; } if (defined $$names{$name}) { $comps = $$names{$name}; } else { $$names{$name} = $comps; } $$comps{$current} = [] if (!defined $$comps{$current}); # preserve order #tie %$names, "Tie::IxHash"; #tie %$comps, "Tie::IxHash"; my $count = 0; while(<$fh>) { my $line = $self->preprocess_line($fh, $_); if ($line eq '') { } elsif ($line =~ /^(\w+)\s*{$/) { if (!$set) { $current = $1; $set = 1; $$comps{$current} = [] if (!defined $$comps{$current}); } else { $status = 0; $error = 'Can not nest groups'; last; } } elsif ($line =~ /^conditional\s*(\(([^\)]+)\))\s*{$/) { ($status, $error) = $self->parse_conditional( $fh, $2, $tag, \%flags, \$grname, $current, \@exclude, $comps, \$count); last if (!$status); } elsif ($line =~ /^}$/) { if (!defined $$comps{$current}->[0] && !defined $exclude[0]) { ## The default components name was never used ## so we remove it from the components delete $$comps{$current}; ## For custom_only projects, an empty section is functionally ## equivalent to not defining it at all. $self->{'defaulted'}->{$tag} = 1 if (!defined $self->{'defaulted'}->{$tag} && $self->get_assignment('custom_only')); } else { ## It was used, so we need to add that name to ## the set of group names unless it's already been added. $self->process_assignment_add($grtag, $current); ## Define the defaulted section value so that if a following ## empty section of the same type is found, it will not cause the ## defaulted value to be overwritten. $self->{'defaulted'}->{$tag} = 0; } if ($set) { $current = $defgroup; $set = undef; } else { ## We are at the end of a component. If the only group ## we added was the default group, then we need to remove ## the group setting altogether. my $groups = $self->get_assignment($grtag); if (defined $groups) { my $grarray = $self->create_array($groups); if (scalar(@$grarray) == 1 && $$grarray[0] eq $defgroup) { $self->process_assignment($grtag, undef); } } ## This is not an error, ## this is the end of the components last; } } else { ($status, $error) = $self->process_component_line($tag, $line, $fh, \%flags, \$grname, $current, \@exclude, $comps, \$count); last if (!$status); } } ## If this is a "special" component, we need to see if the ## user provided all directories. If they have, then we need to ## store an array of directories that the user supplied. Otherwise, ## we just store a 1. if (defined $specialComponents{$tag}) { my @dirs; foreach my $name (keys %$names) { my $comps = $$names{$name}; foreach my $comp (keys %$comps) { foreach my $item (@{$$comps{$comp}}) { if (-d $item) { push(@dirs, $item); } else { @dirs = (); last; } } } } if (defined $dirs[0]) { $self->{'special_supplied'}->{$tag} = \@dirs; } else { $self->{'special_supplied'}->{$tag} = 1; } } ## If we didn't encounter an error, didn't have any files explicitly ## listed and we attempted to exclude files, then we need to find the ## set of files that don't match the excluded files and add them. if ($status && defined $exclude[0] && defined $grname) { my $alldir = $self->get_assignment('recurse') || $flags{'recurse'}; my %checked; my @files; foreach my $exc (@exclude) { my $dname = $self->mpc_dirname($exc); if (!defined $checked{$dname}) { $checked{$dname} = 1; push(@files, $self->generate_default_file_list($dname, \@exclude, undef, $alldir)); } } $self->sift_files(\@files, $self->{'valid_components'}->{$tag}, $self->get_assignment('pch_header'), $self->get_assignment('pch_source'), $tag, $$comps{$grname}); } return $status, $error; } sub parse_verbatim { my($self, $fh, $type, $loc, $add) = @_; if (!defined $loc) { return 0, 'You must provide a location parameter to verbatim'; } ## All types are lower case $type = lc($type); if (!defined $self->{'verbatim'}->{$type}) { $self->{'verbatim'}->{$type} = {}; } ## Instead of always creating a new array for a particular type and ## location, create a new array if there isn't one already or the user ## does not want to add to the existing verbatim settings. $self->{'verbatim'}->{$type}->{$loc} = [] if (!$add || !defined $self->{'verbatim'}->{$type}->{$loc}); my $array = $self->{'verbatim'}->{$type}->{$loc}; while(<$fh>) { my $line = $self->preprocess_line($fh, $_); ## This is not an error, ## this is the end of the verbatim last if ($line =~ /^}$/); push(@$array, $line); } return 1, undef; } sub process_feature { my($self, $fh, $names, $parents) = @_; my $status = 1; my $error; my $requires = ''; my $avoids = ''; foreach my $name (@$names) { if ($name =~ /^!\s*(.*)$/) { $avoids .= ' ' if ($avoids ne ''); $avoids .= $1; } else { $requires .= ' ' if ($requires ne ''); $requires .= $name; } } if ($self->check_features($requires, $avoids)) { ## The required features are enabled, so we say that ## a project has been defined and we allow the parser to ## find the data held within the feature. ($status, $error) = $self->begin_project($parents); if ($status) { $self->{'feature_defined'} = 0; $self->{$self->{'type_check'}} = 1; } } else { ## Otherwise, we read in all the lines until we find the ## closing brace for the feature and it appears to the parser ## that nothing was defined. my $curly = 1; while(<$fh>) { my $line = $self->preprocess_line($fh, $_); ## This is a very simplistic way of finding the end of ## the feature definition. It will work as long as no spurious ## open curly braces are counted. ++$curly if ($line =~ /{$/); --$curly if ($line =~ /^}/); if ($curly == 0) { $self->{'feature_defined'} = 0; last; } } } return $status, $error; } sub process_array_assignment { my($self, $aref, $type, $array) = @_; if (!defined $$aref || $type == 0) { if ($type != -1) { $$aref = $array; } } else { if ($type == 1) { push(@{$$aref}, @$array); } elsif ($type == -1) { my $count = scalar(@{$$aref}); for(my $i = 0; $i < $count; ++$i) { if (StringProcessor::fgrep($$aref->[$i], $array)) { splice(@{$$aref}, $i, 1); --$i; --$count; } } } } } sub parse_define_custom { my($self, $fh, $tag, $modify, $parentsRef) = @_; ## Make the tag something _files $tag = lc($tag) . '_files'; ## We can not have a custom type named "generic" return 0, "$tag is reserved" if ($tag eq $generic_key); if (defined $self->{'valid_components'}->{$tag}) { if (!$modify) { return 0, "$tag has already been defined"; } } elsif ($modify) { return 0, "$tag has not yet been defined and can not be modified"; } if (defined $parentsRef && @$parentsRef > 0) { if (@$parentsRef > 1) { return 0, "$tag: multiple inheritance is not allowed"; } my $parent = lc($$parentsRef[0]) . '_files'; if (!defined $self->{'valid_components'}->{$parent}) { return 0, "$parent is not a valid custom file type"; } for my $k ('matching_assignments', 'generated_exts', 'valid_components') { $self->{$k}->{$tag} = $self->clone($self->{$k}->{$parent}); } $self->{'define_custom_parent'}->{$tag} = $parent; } my $status = 0; my $errorString = "Unable to process $tag"; ## Update the custom_types assignment $self->process_assignment_add('custom_types', $tag) if (!$modify); if (!defined $self->{'matching_assignments'}->{$tag}) { my @keys = keys %custom; push(@keys, @default_matching_assignments); $self->{'matching_assignments'}->{$tag} = \@keys; } my $optname; my $inscope = 0; while(<$fh>) { my $line = $self->preprocess_line($fh, $_); if ($line eq '') { } elsif ($line =~ /optional\s*\(([^\)]+)\)\s*{/) { $optname = $1; $optname =~ s/^\s+//; $optname =~ s/\s+$//; if (defined $customDefined{$optname} && ($customDefined{$optname} & 0x08) != 0) { ++$inscope; if ($inscope != 1) { $status = 0; $errorString = 'Can not nest \'optional\' sections'; last; } } else { $status = 0; $errorString = "Invalid optional name: $optname"; last; } } elsif ($inscope) { if ($line =~ /^}$/) { $optname = undef; --$inscope; } else { if ($line =~ /(\w+)\s*\(([^\)]+)\)\s*(\+)?=\s*(.*)/) { my $name = lc($1); my $opt = $2; my $add = $3; my @val = split(/\s*,\s*/, $4); ## Fix $opt spacing $opt =~ s/(\&\&|\|\|)/ $1 /g; $opt =~ s/!\s+/!/g; ## Set up the 'optional' hash table if (!$add || !defined $self->{'generated_exts'}->{$tag}-> {'optional'}->{$optname}->{$name}->{$opt}) { $self->{'generated_exts'}->{$tag}-> {'optional'}->{$optname}->{$name}->{$opt} = \@val; } else { push(@{$self->{'generated_exts'}->{$tag}->{'optional'}-> {$optname}->{$name}->{$opt}}, @val); } } else { $status = 0; $errorString = "Unrecognized optional line: $line"; last; } } } elsif ($line =~ /^}$/) { $status = 1; $errorString = undef; ## Propagate the custom defined values into the mapped values foreach my $key (keys %{$self->{'valid_names'}}) { if (UNIVERSAL::isa($self->{'valid_names'}->{$key}, 'ARRAY')) { my $value = $self->{'generated_exts'}->{$tag}->{ $self->{'valid_names'}->{$key}->[1]}; ## Bypass the process_assignment() defined in this class ## to avoid unwanted keyword mapping. $self->SUPER::process_assignment($key, $value) if (defined $value); } } ## Set some defaults (if they haven't already been set) if (!defined $self->{'generated_exts'}->{$tag}->{'pre_filename'}) { $self->{'generated_exts'}->{$tag}->{'pre_filename'} = [ '' ]; } if (!defined $self->{'generated_exts'}->{$tag}->{'pre_dirname'}) { $self->{'generated_exts'}->{$tag}->{'pre_dirname'} = [ '' ]; } if (!defined $self->{'generated_exts'}->{$tag}->{'pre_extension'}) { $self->{'generated_exts'}->{$tag}->{'pre_extension'} = [ '' ]; } if (!defined $self->{'generated_exts'}->{$tag}->{'automatic_in'}) { $self->{'generated_exts'}->{$tag}->{'automatic_in'} = 1; } if (!defined $self->{'generated_exts'}->{$tag}->{'automatic_out'}) { $self->{'generated_exts'}->{$tag}->{'automatic_out'} = 1; } if (!defined $self->{'generated_exts'}->{$tag}->{'output_follows_input'}) { $self->{'generated_exts'}->{$tag}->{'output_follows_input'} = 1; } if (!defined $self->{'valid_components'}->{$tag}) { $self->{'valid_components'}->{$tag} = []; } last; } else { my @values; ## If this returns true, then we've found an assignment if ($self->parse_assignment($line, \@values, $fh)) { my($type, $name, $value) = @values; ## The 'automatic' keyword has always contained two distinct ## functions. The first is to automatically add input files of ## the specified extension. And the second is to automatically ## add generated files to the right components. It has now been ## split into separate functionality and we map the 'automatic' ## keyword to the two new ones here. my $ok = 1; my @names = $name eq 'automatic' ? ('automatic_in', 'automatic_out') : $name; foreach $name (@names) { if (defined $customDefined{$name}) { if (($customDefined{$name} & 0x01) != 0) { $value = $self->escape_regex_special($value); my @array = split(/\s*,\s*/, $value); $self->process_array_assignment( \$self->{'valid_components'}->{$tag}, $type, \@array); } else { if (!defined $self->{'generated_exts'}->{$tag}) { $self->{'generated_exts'}->{$tag} = {}; } ## Try to convert the value into a relative path $value = $self->relative($value); if (($customDefined{$name} & 0x04) != 0) { if ($type == 0) { $self->process_assignment( $name, $value, $self->{'generated_exts'}->{$tag}); } elsif ($type == 1) { $self->process_assignment_add( $name, $value, $self->{'generated_exts'}->{$tag}); } elsif ($type == -1) { $self->process_assignment_sub( $name, $value, $self->{'generated_exts'}->{$tag}); } } else { if (($customDefined{$name} & 0x02) != 0) { ## Transform the name from something outputext to ## something files. We expect this to match the ## names of valid_assignments. $name =~ s/outputext/files/g; } ## Get it ready for regular expressions $value = $self->escape_regex_special($value); ## Split the value into an array using a comma as the ## separator. If there are no elements in the array we're ## going to add an empty element to the array. This way, ## assignments of blank values are useful. my @array = split(/\s*,\s*/, $value); push(@array, '') if ($#array == -1); ## Process the array assignment after adjusting the values $self->process_array_assignment( \$self->{'generated_exts'}->{$tag}->{$name}, $type, \@array); } } } else { $ok = 0; $status = 0; $errorString = "Invalid assignment name: '$name'"; last; } } ## $status is zero until the end of the define custom block, so ## we can't use it for this check. last if (!$ok); } elsif ($line =~ /^keyword\s+(\w+)(?:\s*=\s*(\w+)?)?/) { ## Check for keyword mapping here my $newkey = $1; my $mapkey = $2; if (defined $self->{'valid_names'}->{$newkey}) { $status = 0; $errorString = "Cannot map $newkey onto an " . "existing keyword"; last; } elsif (!defined $mapkey) { $self->{'valid_names'}->{$newkey} = 1; } elsif ($newkey ne $mapkey) { if (defined $customDefined{$mapkey}) { $self->{'valid_names'}->{$newkey} = [ $tag, $mapkey ]; } else { $status = 0; $errorString = "Cannot map $newkey to an " . "undefined custom keyword: $mapkey"; last; } } else { $status = 0; $errorString = "Cannot map $newkey to $mapkey"; last; } } else { $status = 0; $errorString = "Unrecognized line: $line"; last; } } } return $status, $errorString; } sub back_to_variable { my($self, $values) = @_; my $cwd = $self->getcwd(); my $case_tolerant = $self->case_insensitive(); my @values = (); ## Get both of the relative value hash maps and put them in an array my @rels = (); my($rel, $how) = $self->get_initial_relative_values(); push(@rels, $rel); ($rel, $how) = $self->get_secondary_relative_values(); push(@rels, $rel); ## Go through each value and try to convert it to a variable setting foreach my $ovalue (@$values) { ## Fix up the value, replacing '.' with the current working ## directory. my $value = $ovalue; $value =~ s/\\/\//g; if ($value eq '.') { $value = $cwd; } else { $value =~ s/^.\//$cwd\//; } my $valuelen = length($value); ## Go through each relative value hash map and see if any of the ## values match the value that we're currently inspecting. my $found = undef; foreach my $rel (@rels) { foreach my $key (keys %$rel) { ## Get the relative replacement value and convert back-slashes my $val = $$rel{$key}; $val =~ s/\\/\//g; ## We only need to check for reverse replacement if the length ## of the value is greater than or equal to the length of our ## replacement value. my $vlen = length($val); if ($valuelen >= $vlen) { ## Cut the string down by the length of the replacement value my $lval = substr($value, 0, $vlen); ## Check for equivalence, taking into account file system ## case-insenitivity. if ($case_tolerant) { $found = (lc($lval) eq lc($val)); } else { $found = ($lval eq $val); } ## If they match, replace the value and save it in our array. if ($found) { substr($value, 0, length($val)) = "\$($key)"; push(@values, $value); last; } } } ## Once it's been found, there's no reason to continue on through ## the relative hash maps. last if ($found); } push(@values, $ovalue) if (!$found); } return @values; } sub remove_duplicate_addition { my($self, $name, $value, $nval) = @_; if (defined $nval) { ## If we are modifying the libs, libpaths, macros or includes ## assignment with either addition or subtraction, we are going to ## perform a little fix on the value to avoid multiple ## libraries and to try to insure the correct linking order if ($name eq 'macros' || $name eq 'libpaths' || $name eq 'includes' || $name =~ /libs$/ || index($name, $grouped_key) == 0) { my $allowed = ''; my %parts; ## Convert the array into keys for a hash table @parts{@{$self->create_array($nval)}} = (); ## In order to ensure that duplicates are correctly removed, we ## need to get the modified assignment value before we attempt to ## do so. $value = $self->modify_assignment_value($name, $value); foreach my $val (@{$self->create_array($value)}) { if (!exists $parts{$val}) { ## We need to supply quotes if there is a space in the value or ## a variable. The variable may contain spaces. if ($val =~ /\s/ || $val =~ /\$\(.+\)/) { ## If we're going to add quotes around this item and the ## value ends in a backslash we need to append another ## backslash so that when it's used with ## StringProcessor::create_array() the function will not think ## that the trailing quote is escaped. $val .= '\\' if ($val =~ /\\$/); $allowed .= '"' . $val . '" '; } else { $allowed .= $val . ' '; } } } $allowed =~ s/\s+$//; return $allowed; } } return $value; } sub read_template_input { my($self, $tkey) = @_; my $status = 1; my $errorString; my $file; my $tag; my $ti = $self->get_ti_override(); my $lang = $self->get_language(); my $override; if ($self->exe_target()) { if ($self->get_static() == 1) { $tag = 'lib_exe_template_input'; ## Check for the TemplateInputReader for the template key provided. if (!defined $self->{$tag}->{$lang}->{$tkey}) { if (defined $$ti{'lib_exe'}) { $file = $$ti{'lib_exe'}; $override = 1; } else { $file = $self->get_lib_exe_template_input_file($tkey); } } } else { $tag = 'dll_exe_template_input'; ## Check for the TemplateInputReader for the template key provided. if (!defined $self->{$tag}->{$lang}->{$tkey}) { if (defined $$ti{'dll_exe'}) { $file = $$ti{'dll_exe'}; $override = 1; } else { $file = $self->get_dll_exe_template_input_file($tkey); } } } } else { if ($self->get_static() == 1) { $tag = 'lib_template_input'; ## Check for the TemplateInputReader for the template key provided. if (!defined $self->{$tag}->{$lang}->{$tkey}) { if (defined $$ti{'lib'}) { $file = $$ti{'lib'}; $override = 1; } else { $file = $self->get_lib_template_input_file($tkey); } } } else { $tag = 'dll_template_input'; ## Check for the TemplateInputReader for the template key provided. if (!defined $self->{$tag}->{$lang}->{$tkey}) { if (defined $$ti{'dll'}) { $file = $$ti{'dll'}; $override = 1; } else { $file = $self->get_dll_template_input_file($tkey); } } } } if (defined $self->{$tag}->{$lang}->{$tkey}) { ## We have a TemplateInputReader for this template key, so we need ## to set the entry corresponding to $tikey to it for use in the ## get_template_input() method. $self->{$tag}->{$lang}->{$tikey} = $self->{$tag}->{$lang}->{$tkey}; } else { ## We haven't read this file yet, so we will create the template ## input reader and store it in the entry for the template key ## ($tkey) and the template input key ($tikey). my $ti = new TemplateInputReader($self->get_include_path()); $self->{$tag}->{$lang}->{$tkey} = $ti; $self->{$tag}->{$lang}->{$tikey} = $ti; ## Process the template input file if (defined $file) { my $tfile = $self->search_include_path("$file.$TemplateInputExtension"); if (defined $tfile) { ($status, $errorString) = $ti->read_file($tfile); } else { ## Not finding a template input file is only an error if the user ## specifically provided a template input file override. if ($override) { $status = 0; $errorString = "Unable to locate template input file: $file"; } } } ## Now that we've read in the template input file, set up our ## automatic template variables. if ($self->{'make_coexistence'}) { $ti->parse_line(undef, "make_coexistence = $self->{'make_coexistence'}"); } } ## We do this regardless of whether or not this parser is cached or ## not. If the features have changed (through a workspace cmdline ## setting), we need to reflect it. if ($status) { ## Put the features into the template input set my $features = $self->{'feature_parser'}->get_names(); $self->{$tag}->{$lang}->{$tikey}->parse_line(undef, "features = @$features"); } return $status, $errorString; } sub already_added { my($self, $array, $name) = @_; my $case_tolerant = $self->case_insensitive(); ## This method expects that the file name will be unix style $name =~ s/\\/\//g if ($self->{'convert_slashes'}); ## Remove the leading ./ $name =~ s/^\.\///; my $dsname = "./$name"; ## Take into account file system case-insenitivity. if ($case_tolerant) { $name = lc($name); $dsname = lc($dsname); } foreach my $file (@$array) { my $my_file = ($case_tolerant ? lc($file) : $file); return 1 if ($my_file eq $name || $my_file eq $dsname); } return 0; } sub get_applied_custom_keyword { my($self, $name, $type, $file) = @_; if (defined $self->{'flag_overrides'}->{$type} && defined $self->{'flag_overrides'}->{$type}->{$file} && defined $self->{'flag_overrides'}->{$type}->{$file}->{$name}) { return $self->relative( $self->{'flag_overrides'}->{$type}->{$file}->{$name}, 1); } return $self->relative($self->get_assignment( $name, $self->{'generated_exts'}->{$type}), 1); } sub evaluate_optional_option { my($self, $opt, $value) = @_; if ($opt =~ /^!\s*(.*)/) { return (!exists $$value{$1} ? 1 : 0); } else { return (exists $$value{$opt} ? 1 : 0); } } sub process_optional_option { my($self, $opt, $value) = @_; my $status; my @parts = grep(!/^$/, split(/\s+/, $opt)); my $pcount = scalar(@parts); for(my $i = 0; $i < $pcount; $i++) { if ($parts[$i] eq '&&' || $parts[$i] eq '||') { if (defined $status) { if (defined $parts[$i + 1]) { if ($parts[$i] eq '&&') { $status &&= $self->evaluate_optional_option($parts[$i + 1], $value); } else { ## We are coming into an '||', if status is already true ## then we can leave immediately last if ($status); $status ||= $self->evaluate_optional_option($parts[$i + 1], $value); } } else { $self->warning("Expected token in optional after $parts[$i]"); } } else { $self->warning("Unexpected token in optional: $parts[$i]"); } ++$i; } else { if (!defined $status) { $status = $self->evaluate_optional_option($parts[$i], $value); } else { $self->warning("Unexpected token in optional: $parts[$i]"); } } } return $status; } sub add_optional_filename_portion { my($self, $gentype, $tag, $file, $array) = @_; if (defined $self->{'generated_exts'}->{$gentype}->{'optional'}->{$tag}) { foreach my $name (keys %{$self->{'generated_exts'}->{$gentype}->{'optional'}->{$tag}}) { foreach my $opt (keys %{$self->{'generated_exts'}->{$gentype}->{'optional'}->{$tag}->{$name}}) { ## Get the name value my $value = $self->get_applied_custom_keyword($name, $gentype, $file); ## Convert the value into a hash map for easy lookup my %values; @values{split(/\s+/, $value)} = () if (defined $value); ## See if the option or options are contained in the value. We ## need to call this even if $value is not defined due to the ## ability to negate optional parameters. if ($self->process_optional_option($opt, \%values)) { ## Add the optional portion push(@$array, @{$self->{'generated_exts'}->{$gentype}->{'optional'}->{$tag}->{$name}->{$opt}}); } } } } } sub get_pre_keyword_array { my($self, $keyword, $gentype, $tag, $file) = @_; ## Get the general pre extension array. ## $self->{'generated_exts'}->{$gentype}->{$keyword} is guaranteed to ## be defined due to the defaulting that is done in ## parse_define_custom() and the only three calls to this method use ## valid $keyword values. my @array = @{$self->{'generated_exts'}->{$gentype}->{$keyword}}; ## Add the component specific pre extension array my @additional; $tag =~ s/files$/$keyword/; if (defined $self->{'generated_exts'}->{$gentype}->{$tag}) { push(@additional, @{$self->{'generated_exts'}->{$gentype}->{$tag}}); } ## Add in any optional portion to the array foreach my $itag ($keyword, $tag) { $self->add_optional_filename_portion($gentype, $itag, $file, \@additional); } ## If the current array only has the default, ## then we need to remove it if (defined $additional[0]) { if ($#array == 0 && $array[0] eq '') { pop(@array); } push(@array, @additional); } return @array; } sub add_explicit_output { my($self, $file, $type, $tag, $array, $arrs) = @_; if (defined $self->{'custom_special_output'}->{$type} && defined $self->{'custom_special_output'}->{$type}->{$file}) { if (defined $self->{'valid_components'}->{$tag}) { my @files; foreach my $check (@{$self->{'custom_special_output'}->{$type}->{$file}}) { foreach my $regext (@{$self->{'valid_components'}->{$tag}}) { if ($check =~ /$regext$/) { my $add = 1; if ($tag eq 'source_files') { foreach my $tregext (@{$self->{'valid_components'}->{'template_files'}}) { if ($check =~ /$tregext$/) { $add = undef; last; } } } if ($add) { ## If gendir was specified, then we need to account for that my $dir = ''; if (defined $self->{'flag_overrides'}->{$type} && defined $self->{'flag_overrides'}->{$type}->{$file} && defined $self->{'flag_overrides'}->{$type}->{$file}->{'gendir'} && $self->{'flag_overrides'}->{$type}->{$file}->{'gendir'} ne '.') { $dir = $self->{'flag_overrides'}->{$type}->{$file}->{'gendir'} . '/'; $dir =~ s/\\/\//g if ($self->{'convert_slashes'}); } push(@files, "$dir$check"); last; } } } } if (defined $files[0]) { if ($arrs) { push(@$array, \@files); } else { push(@$array, @files); } } } } } sub generated_filenames { my($self, $part, $type, $tag, $file, $noext, $arrs) = @_; ## A custom type is not allowed to generate it's own input files return () if ($type eq $tag); ## See if the type for which we are generating ($tag) is also a custom ## file type. If it is, we need to do some massaging. my $otag = $tag; if (defined $self->{'generated_exts'}->{$tag}) { ## If the custom type ($type) doesn't specify that it generates ## generic files, we need to see if there is a command helper for ## this type and see what sort of output it knows about. my $inputexts = $self->{'generated_exts'}->{$type}->{$generic_key}; if (!defined $inputexts) { my $cmdHelper = $self->find_command_helper($type); $inputexts = $cmdHelper->get_outputexts() if (defined $cmdHelper); } ## We will need to use 'generic_files' instead of $tag if $tag is ## defined in 'generated_exts', but only for the type that will ## actually generate the right type of generic file. my $good; if (defined $inputexts) { foreach my $inputext (@$inputexts) { my $ext = $inputext; $ext =~ s/\\//g; foreach my $extreg (@{$self->{'valid_components'}->{$tag}}) { if ($ext =~ /$extreg$/) { $tag = $generic_key; $good = 1; last; } } last if ($good); } } ## If we were not able to find the right file type, then we can get ## out early. However, if the type for which we are generating ## ($tag) is a built-in type, we need to continue on as there is a ## possibility that the input type ($type) will generate files for ## the generating type. return () if (!$good && !defined $language{$self->get_language()}->[0]->{$tag}); } my @pearr = $self->get_pre_keyword_array('pre_extension', $type, $tag, $file); my @pfarr = $self->get_pre_keyword_array('pre_filename', $type, $tag, $file); my @pdarr = $self->get_pre_keyword_array('pre_dirname', $type, $tag, $file); my @exts = (defined $self->{'generated_exts'}->{$type}->{$tag} ? @{$self->{'generated_exts'}->{$type}->{$tag}} : ()); if (!defined $exts[0]) { my $backtag = $tag; if ($backtag =~ s/files$/outputext/) { $self->add_optional_filename_portion($type, $backtag, $file, \@exts); } } my @array; if (!defined $exts[0] && $#pearr == 0 && $#pfarr == 0 && $#pdarr == 0 && $pearr[0] eq '' && $pfarr[0] eq '' && $pdarr[0] eq '') { ## If both arrays are defined to be the defaults, then there ## is nothing for us to do. } else { my $dir = ''; my $base; ## Correctly deal with pre filename and directories if ($part =~ /(.*[\/\\])([^\/\\]+)$/) { ## Split the directory and base name of the file. Only set the ## directory if the output follows the input directory. $dir = $1 if ($self->{'generated_exts'}->{$type}->{'output_follows_input'}); $base = $2; } else { $base = $part; } ## If gendir was specified, then we need to account for that if (defined $self->{'flag_overrides'}->{$type} && defined $self->{'flag_overrides'}->{$type}->{$file} && defined $self->{'flag_overrides'}->{$type}->{$file}->{'gendir'}) { if ($self->{'flag_overrides'}->{$type}->{$file}->{'gendir'} eq '.') { $dir = ''; } else { $dir = $self->{'flag_overrides'}->{$type}->{$file}->{'gendir'} . '/'; $dir =~ s/\\/\//g if ($self->{'convert_slashes'}); } } ## Loop through creating all of the possible file names foreach my $pe (@pearr) { my @genfile; $pe =~ s/\\\././g; foreach my $pf (@pfarr) { $pf =~ s/\\\././g; foreach my $pd (@pdarr) { if ($noext) { push(@genfile, "$pd$dir$pf$base$pe"); } else { foreach my $ext (@exts) { $ext =~ s/\\\././g; push(@genfile, "$pd$dir$pf$base$pe$ext"); } } } } if ($arrs) { push(@array, \@genfile); } else { push(@array, @genfile); } } } ## Now add the explicit output. We need to use the original tag value ## ($otag) so that we can find the custom output files. $self->add_explicit_output($file, $type, $otag, \@array, $arrs); return @array; } sub add_generated_files { my($self, $gentype, $tag, $group, $arr) = @_; ## This method is called by list_default_generated. It performs the ## actual file insertion and grouping. ## Get the generated filenames my @added; foreach my $file (keys %$arr) { foreach my $gen ($self->generated_filenames($$arr{$file}, $gentype, $tag, $file, 1)) { $self->list_generated_file($gentype, $tag, \@added, $gen, $$arr{$file}); } } if (defined $added[0]) { my $names = $self->{$tag}; ## Get all files in one list and save the directory ## and component group in a hashed array. my @all; my %dircomp; foreach my $name (keys %$names) { foreach my $key (keys %{$$names{$name}}) { push(@all, @{$$names{$name}->{$key}}); foreach my $file (@{$$names{$name}->{$key}}) { $dircomp{$self->mpc_dirname($file)} = $key; } } } ## Create a small array of only the files we want to add. ## We put them all together so we can keep them in order when ## we put them at the front of the main file list. my @oktoadd; foreach my $file (@added) { push(@oktoadd, $file) if (!$self->already_added(\@all, $file)); } ## If we have files to add, make sure we add them to a group ## that has the same directory location as the files we're adding. if (defined $oktoadd[0]) { my $key = (defined $group ? $group : $dircomp{$self->mpc_dirname($oktoadd[0])}); if (!defined $key) { my $check = $oktoadd[0]; foreach my $regext (@{$self->{'valid_components'}->{$tag}}) { last if ($check =~ s/$regext$//); } foreach my $vc (keys %{$self->{'valid_components'}}) { ## If this component name does not match the component name for ## which we are adding files and there are components defined ## for it, we will look to see if we can find a matching group ## name. We have to make sure that we do not use the hash map ## ($self->{$vc}) unless it's defined. Doing so will ## automatically create the map and that will cause MPC to ## think that the user provided the empty setting (when it ## wasn't). if ($vc ne $tag && defined $self->{$vc}) { foreach my $name (keys %{$self->{$vc}}) { foreach my $ckey (keys %{$self->{$vc}->{$name}}) { if ($ckey ne $defgroup) { foreach my $ofile (@{$self->{$vc}->{$name}->{$ckey}}) { my $file = $ofile; foreach my $regext (@{$self->{'valid_components'}->{$vc}}) { last if ($file =~ s/$regext$//); } if ($file eq $check) { $key = $ckey; last; } } } last if (defined $key); } } last if (defined $key); } } $key = $defgroup if (!defined $key); } foreach my $name (keys %$names) { if (!defined $$names{$name}->{$key}) { if ($key ne $defgroup && defined $$names{$name}->{$defgroup} && defined $$names{$name}->{$defgroup}->[0]) { $self->process_assignment_add($grouped_key . $tag, $defgroup); } $$names{$name}->{$key} = []; $self->process_assignment_add($grouped_key . $tag, $key); } unshift(@{$$names{$name}->{$key}}, @oktoadd); } } } } sub search_for_entry { my($self, $file, $marray, $preproc) = @_; my $name; my $fh = new FileHandle(); if (open($fh, $file)) { my $poundifed = 0; my $commented = 0; while(<$fh>) { ## Remove c++ style comments $_ =~ s/\/\/.*// if (!$commented); ## Remove one line c style comments $_ =~ s/\/\*.*\*\///g; if ($commented) { if (/\*\//) { ## Found the end of a multi-line c style comment --$commented; } } else { if (/\/\*/) { ## Found the beginning of a multi-line c style comment ++$commented; } elsif ($preproc) { ## If the current language supports a c preprocessor, we ## will perform a minimal check for #if 0 if (/#\s*if\s+0/) { ## Found the beginning of a #if 0 ++$poundifed; } elsif ($poundifed) { if (/#\s*if/) { ## We need to keep track of any other #if directives ## to be sure that when we see an #endif we don't ## count the wrong one. ++$poundifed; } elsif (/#\s*endif/) { ## Found a #endif, so decrement our count --$poundifed; } } } } ## Check for main; Make sure it's not #if 0'ed and not commented out if (!$poundifed && !$commented) { my $found = undef; foreach my $main (@$marray) { if (/\s+$main\s*\(/ || /^\s*$main\s*\(/) { ## If we've found a main, set the exename to the basename ## of the cpp file with the extension removed $name = $self->mpc_basename($file); $name =~ s/\.[^\.]+$//; $found = 1; last; } last if ($found); } } } close($fh); } return $name; } sub find_main_file { my($self, $sources) = @_; my $lang = $self->get_language(); my @main = $language{$lang}->[3]; my $preproc = $language{$lang}->[4]; ## If additional main's have been supplied by the user for this ## language type, then just push them onto the array. push(@main, @{$mains{$lang}}) if (defined $mains{$lang}); ## Now search each source file until we've found a main function. foreach my $file (@$sources) { my $exename = $self->search_for_entry($file, \@main, $preproc); return $exename if (defined $exename); } return undef; } sub generate_default_target_names { my $self = shift; ## If this is a custom_only project, we need not waste time setting the ## sharedname, staticname or exename. Searching all of the files for a ## main function is very time consuming and unnecessary. return undef if ($self->get_assignment('custom_only')); if (!$self->exe_target()) { my $sharedname = $self->get_assignment('sharedname'); my $staticname = $self->get_assignment('staticname'); my $shared_empty; if (defined $sharedname) { if ($sharedname eq '') { $shared_empty = 1; $sharedname = undef; $self->process_assignment('sharedname', $sharedname); } elsif (!defined $staticname) { $staticname = $sharedname; $self->process_assignment('staticname', $staticname); } } if (defined $staticname && !$shared_empty && !defined $sharedname) { $sharedname = $staticname; $self->process_assignment('sharedname', $sharedname); } ## If it's neither an exe or library target, we will search ## through the source files for a main() if (!$self->lib_target()) { ## Set the exename assignment my @sources = $self->get_component_list('source_files', 1); my $exename = $self->find_main_file(\@sources); $self->process_assignment('exename', $exename) if (defined $exename); ## If we still don't have a project type, then we will ## default to a library if there are source or resource files if (!defined $exename) { if (!defined $sources[0]) { @sources = $self->get_component_list($self->get_resource_tag(), 1); } if (defined $sources[0]) { if (!$shared_empty) { $self->process_assignment('sharedname', $self->{'unmodified_project_name'}); } $self->process_assignment('staticname', $self->{'unmodified_project_name'}); } } } } ## If we are generating only static projects, then we need to ## unset the sharedname, so that we can insure that projects of ## various types only generate static targets. if ($self->get_static() == 1) { my $sharedname = $self->get_assignment('sharedname'); if (defined $sharedname) { $self->process_assignment('sharedname', undef); } } ## Check for the use of an asterisk in the name foreach my $key ('exename', 'sharedname', 'staticname') { my $value = $self->get_assignment($key); if (defined $value && index($value, '*') >= 0) { $value = $self->fill_type_name($value, $self->{'unmodified_project_name'}); $self->process_assignment($key, $value); } } } sub generate_default_pch_filenames { my($self, $files) = @_; my $pchhdef = (defined $self->get_assignment('pch_header')); my $pchcdef = (defined $self->get_assignment('pch_source')); if (!$pchhdef || !$pchcdef) { my $pname = $self->get_assignment('project_name'); my $hcount = 0; my $ccount = 0; my $hmatching; my $cmatching; foreach my $file (@$files) { ## If the file doesn't even contain _pch, then there's no point ## in looping through all of the extensions if (index($file, '_pch') >= 0) { if (!$pchhdef) { foreach my $ext (@{$self->{'valid_components'}->{'header_files'}}) { if ($file =~ /(.*_pch$ext)$/) { $self->process_assignment('pch_header', $1); ++$hcount; $hmatching = $file if (index($file, $pname) >= 0); last; } } } if (!$pchcdef) { foreach my $ext (@{$self->{'valid_components'}->{'source_files'}}) { if ($file =~ /(.*_pch$ext)$/) { $self->process_assignment('pch_source', $1); ++$ccount; $cmatching = $file if (index($file, $pname) >= 0); last; } } } } } if (!$pchhdef && $hcount > 1 && defined $hmatching) { $self->process_assignment('pch_header', $hmatching); } if (!$pchcdef && $ccount > 1 && defined $cmatching) { $self->process_assignment('pch_source', $cmatching); } } } sub fix_pch_filenames { my $self = shift; ## Unset the precompiled header settings if they are set but empty foreach my $type ('pch_header', 'pch_source') { my $pch = $self->get_assignment($type); $self->process_assignment($type, undef) if (defined $pch && $pch eq ''); } } sub remove_extra_pch_listings { my $self = shift; my @pchs = ('pch_header', 'pch_source'); my @tags = ('header_files', 'source_files'); for(my $j = 0; $j < 2; ++$j) { my $pch = $self->get_assignment($pchs[$j]); if (defined $pch) { ## If we are converting slashes, then we need to ## convert the pch file back to forward slashes $pch =~ s/\\/\//g if ($self->{'convert_slashes'}); ## Find out which files are duplicated my $names = $self->{$tags[$j]}; foreach my $name (keys %$names) { my $comps = $$names{$name}; foreach my $key (keys %$comps) { my $array = $$comps{$key}; my $count = scalar(@$array); for(my $i = 0; $i < $count; ++$i) { if ($pch eq $$array[$i]) { splice(@$array, $i, 1); --$count; } } } } } } } sub sift_files { my($self, $files, $exts, $pchh, $pchc, $tag, $array, $alldir) = @_; my @saved; my $havec = (defined $self->{'exclude_components'}->{$tag}); ## The special actions taken based on $saverc only applies to ## C++ resource files. my $saverc = (!$alldir && $tag eq $self->get_resource_tag() && $self->languageIs(Creator::cplusplus)); foreach my $ext (@$exts) { foreach my $file (grep(/$ext$/, @$files)) { ## Always exclude the precompiled header and cpp if ((!defined $pchh || $file ne $pchh) && (!defined $pchc || $file ne $pchc)) { if ($havec) { my $exclude = 0; foreach my $exc (@{$self->{'exclude_components'}->{$tag}}) { if ($file =~ /$exc$/) { $exclude = 1; last; } } next if ($exclude); } elsif ($saverc) { ## Save these files for later. There may ## be more than one and we want to try and ## find the one that corresponds to this project push(@saved, $file); next; } push(@$array, $file) if (!$self->already_added($array, $file)); } } } ## Now deal with the saved files if (defined $saved[0]) { if (!defined $saved[1]) { ## Theres only one rc file, take it push(@$array, $saved[0]); } else { my $pjname = $self->escape_regex_special( $self->transform_file_name( $self->get_assignment('project_name'))); ## Use a case insensitive search. ## After all, this is a Windows specific file type. foreach my $save (@saved) { if ($save =~ /$pjname/i) { if (!$self->already_added($array, $save)) { push(@$array, $save); } } } } } } sub sift_default_file_list { my($self, $tag, $file, $built, $exts, $recurse, $pchh, $pchc) = @_; my $alldir = $recurse || (defined $self->{'flag_overrides'}->{$tag} && defined $self->{'flag_overrides'}->{$tag}->{$file} && $self->{'flag_overrides'}->{$tag}->{$file}->{'recurse'}); my @gen = $self->generate_default_file_list($file, [], undef, $alldir); $self->sift_files(\@gen, $exts, $pchh, $pchc, $tag, $built, $alldir); } sub correct_generated_files { my($self, $defcomp, $exts, $tag, $array) = @_; if (defined $sourceComponents{$tag}) { my $grtag = $grouped_key . $tag; foreach my $gentype (keys %{$self->{'generated_exts'}}) { ## If we are not automatically adding generated output, then we ## need to skip this component type. next if (!$self->{'generated_exts'}->{$gentype}->{'automatic_out'}); ## If we are auto-generating the source_files, then ## we need to make sure that any generated source ## files that are added are put at the front of the list. my $newgroup; my @input; ## If I call keys %{$self->{$gentype}} using perl 5.6.1 ## it returns nothing. I have to put it in an ## intermediate variable to ensure that I get the keys. my $names = $self->{$gentype}; foreach my $name (keys %$names) { foreach my $key (keys %{$$names{$name}}) { push(@input, @{$$names{$name}->{$key}}); $newgroup = $key if ($key ne $defgroup); } } if (defined $input[0]) { my @front; my @copy = @$array; @$array = (); foreach my $input (@input) { my $part = $self->remove_wanted_extension( $input, $self->{'valid_components'}->{$gentype}); my @files = $self->generated_filenames($part, $gentype, $tag, $input); if (defined $copy[0]) { my $found = 0; foreach my $file (@files) { for(my $i = 0; $i < scalar(@copy); $i++) { my $re = $self->escape_regex_special($copy[$i]); if ($file eq $copy[$i] || $file =~ /[\/\\]$re$/) { ## No need to check for previously added files ## here since there are none. $found = 1; push(@front, $file); splice(@copy, $i, 1); last; } } last if ($found); } if (!$found) { ## The first file listed in @files is the preferred ## extension for the custom command. Take the first ## file extension and see if it matches one in the accepted ## extensions. if (defined $files[0]) { my $ext; if ($files[0] =~ /.*(\.[^\.]+)$/) { $ext = $self->escape_regex_special($1); } if (defined $ext) { ## If it doesn't match one of the accepted extensions, ## then just use the first extension from the type for ## which we are generating. $ext = $$exts[0] if (!StringProcessor::fgrep($ext, $exts)); } ## Add all the files that match the chosen extension foreach my $file (@files) { push(@front, $file) if ($file =~ /$ext$/); } } } } else { my $ext = $$exts[0]; foreach my $file (@files) { push(@front, $file) if ($file =~ /$ext$/); } } } if (defined $copy[0]) { ## No need to check for previously added files ## here since there are none. push(@$array, @copy); if (defined $self->get_assignment($grtag)) { $self->process_assignment_add($grtag, $defgroup); } } if (defined $front[0]) { if (defined $newgroup) { if (defined $copy[0]) { $self->process_assignment_add($grtag, $defgroup); } if (!defined $self->{$tag}->{$defcomp}->{$newgroup}) { $self->{$tag}->{$defcomp}->{$newgroup} = \@front; } else { push(@{$self->{$tag}->{$defcomp}->{$newgroup}}, @front); } $self->process_assignment_add($grtag, $newgroup); } else { unshift(@$array, @front); } } } } } } sub generate_default_components { my($self, $files, $passed) = @_; my $genext = $self->{'generated_exts'}; my @gc = reverse sort { $self->sort_generated_types($a, $b) } keys %$genext; my @tags = (defined $passed ? $passed : (@gc, keys %{$language{$self->get_language()}->[0]})); my $pchh = $self->get_assignment('pch_header'); my $pchc = $self->get_assignment('pch_source'); my $recurse = $self->get_assignment('recurse'); my $defcomp = $self->get_default_component_name(); my $flo = $self->{'flag_overrides'}; my $cmdflags = 'commandflags'; ## The order of @tags does make a difference in the way that generated ## files get added. Hence the sort call on the generate_exts keys to ## ensure that user defined types come first. They are reverse sorted ## using the custom sort function to ensure that user defined types ## that rely on other user defined types for input files are processed ## first. foreach my $tag (@tags) { if (!defined $genext->{$tag} || $genext->{$tag}->{'automatic_in'}) { my $exts = $self->{'valid_components'}->{$tag}; if (defined $$exts[0]) { if (defined $self->{$tag}) { ## If the tag is defined, then process directories my $names = $self->{$tag}; foreach my $name (keys %$names) { my $comps = $$names{$name}; foreach my $comp (keys %$comps) { my $array = $$comps{$comp}; if (defined $passed) { $self->sift_files($files, $exts, $pchh, $pchc, $tag, $array); } else { my @built; my $alldirs = 1; foreach my $file (@$array) { if (-d $file) { my @portion; $self->sift_default_file_list($tag, $file, \@portion, $exts, $recurse, $pchh, $pchc); ## Since the file was actually a directory, we will ## need to propagate the flag overrides (if there are ## any) to the newly located files. if (defined $flo->{$tag} && defined $flo->{$tag}->{$file}) { foreach my $built (@portion) { $flo->{$tag}->{$built} = $flo->{$tag}->{$file}; } } ## Always push the @portion array onto the back of ## @built. push(@built, @portion); } else { $alldirs = undef; if (!$self->already_added(\@built, $file)) { push(@built, $file); } } } if ($alldirs) { $self->correct_generated_files($defcomp, $exts, $tag, \@built); } $$comps{$comp} = \@built; } } } } else { ## Generate default values for undefined tags $self->{$tag} = {}; my $comps = {}; $self->{$tag}->{$defcomp} = $comps; $$comps{$defgroup} = []; my $array = $$comps{$defgroup}; $self->{'defaulted'}->{$tag} = 1; if (!defined $specialComponents{$tag}) { $self->sift_files($files, $exts, $pchh, $pchc, $tag, $array); $self->correct_generated_files($defcomp, $exts, $tag, $array); } } ## If the type that we're generating defaults for ($tag) is a ## custom type, then we need to see if other custom types ## ($gentype) will generate files that will be used as input. It ## has to be done here so that the built-in types will have all ## of the possible input files that they can. if (defined $genext->{$tag}) { foreach my $gentype (keys %{$genext}) { if ($gentype ne $tag) { $self->list_default_generated($gentype, [$tag]); } } ## Now that we have the files for this type ($tag), we need to ## locate a command helper for the custom command and see if it ## knows about any additional output files based on the file ## name. my $cmdHelper = $self->find_command_helper($tag); if (defined $cmdHelper) { my $names = $self->{$tag}; foreach my $name (keys %$names) { my $comps = $$names{$name}; foreach my $comp (keys %$comps) { my $array = $$comps{$comp}; foreach my $file (@$array) { my $flags = defined $flo->{$tag}->{$file} ? $flo->{$tag}->{$file}->{$cmdflags} : $genext->{$tag}->{$cmdflags}; my ($add_out, $deps) = $cmdHelper->get_output($file, $flags); push(@{$self->{'custom_special_output'}->{$tag}->{$file}}, @$add_out); foreach my $depTag (keys %$deps) { foreach my $depFile (keys %{$deps->{$depTag}}) { $self->add_custom_depend($depTag, $depFile, $deps->{$depTag}->{$depFile}); } } } } } } } } } } } sub remove_duplicated_files { my($self, $dest, $source) = @_; my @slist = $self->get_component_list($source, 1); ## There's no point in going on if there's nothing in this component ## list. return undef if ($#slist == -1); ## Convert the array into keys for a hash table my %shash; @shash{@slist} = (); ## Find out which source files are listed my $names = $self->{$dest}; foreach my $name (keys %$names) { foreach my $key (keys %{$$names{$name}}) { my $array = $$names{$name}->{$key}; my $count = scalar(@$array); for(my $i = 0; $i < $count; ++$i) { ## Is the source file in the component array? if (exists $shash{$$array[$i]}) { ## Remove the element and fix the index and count splice(@$array, $i, 1); --$count; --$i; } } } } } sub generated_source_listed { my($self, $gent, $tag, $arr, $sext) = @_; my $names = $self->{$tag}; ## Find out which generated source files are listed foreach my $name (keys %$names) { my $comps = $$names{$name}; foreach my $key (keys %$comps) { foreach my $val (@{$$comps{$key}}) { foreach my $i (keys %$arr) { my @gfiles = $self->generated_filenames($$arr{$i}, $gent, $tag, $i); foreach my $re (@gfiles) { $re = $self->escape_regex_special($re); return 1 if ($val =~ /$re$/); } } } } } return 0; } sub list_default_generated { my($self, $gentype, $tags) = @_; ## This method is called when the user has custom input files and has ## provided source files. If the user defaults the component (i.e. ## source_files, resource_files, etc.) they are filled in by the ## generate_default_components method. if (defined $self->{'generated_exts'}->{$gentype} && $self->{'generated_exts'}->{$gentype}->{'automatic_out'}) { ## After all source and headers have been defaulted, see if we ## need to add the generated files if (defined $self->{$gentype}) { ## Build up the list of files my %arr; #tie %arr, "Tie::IxHash"; # preserve insertion order. my $names = $self->{$gentype}; my $group; foreach my $name (keys %$names) { foreach my $key (keys %{$$names{$name}}) { my $array = $$names{$name}->{$key}; ## Take the last group name we encounter $group = $key if ($key ne $defgroup); foreach my $val (@$array) { $arr{$val} = $self->remove_wanted_extension( $val, $self->{'valid_components'}->{$gentype}); } } } foreach my $type (@$tags) { ## Only add generated files if the following is true: ## 1) The generating type is not the same as the receiving type. ## 2) The receiving type is not "special" (unless it hasn't been ## supplied by the user). ## 3) The receiving type is not user defined or it is user ## defined and has 'automatic_in' set to true. if ($gentype ne $type && (!$specialComponents{$type} || (!$self->{'special_supplied'}->{$type} || UNIVERSAL::isa($self->{'special_supplied'}->{$type}, 'ARRAY'))) && (!defined $self->{'generated_exts'}->{$type} || $self->{'generated_exts'}->{$type}->{'automatic_in'})) { if (!$self->generated_source_listed( $gentype, $type, \%arr, $self->{'valid_components'}->{$gentype})) { $self->add_generated_files($gentype, $type, $group, \%arr); } } } } } } sub prepend_gendir { my($self, $created, $ofile, $gentype) = @_; my $key; if (defined $self->{'flag_overrides'}->{$gentype}) { foreach my $ext (@{$self->{'valid_components'}->{$gentype}}) { my $e = $ext; $e =~ s/\\//g; $key = "$ofile$e"; last if (defined $self->{'flag_overrides'}->{$gentype}->{$key}); $key = undef; } if (defined $key) { if (StringProcessor::fgrep('gendir', $self->{'matching_assignments'}->{$gentype})) { my $dir = $self->{'flag_overrides'}->{$gentype}->{$key}->{'gendir'}; if (defined $dir) { ## Convert the file to unix style for basename if ($self->{'convert_slashes'}) { $created =~ s/\\/\//g; $dir =~ s/\\/\//g; } return ($dir eq '.' ? '' : "$dir/") . $self->mpc_basename($created); } } } } return $created; } sub list_generated_file { my($self, $gentype, $tag, $array, $file, $ofile) = @_; my $count = 0; ## Go through each file listed in our original type and attempt to find ## out if it is the generated file we may need to add ($file). foreach my $gen ($self->get_component_list($gentype, 1)) { my $input = $gen; ## Take the file and see if it contains an extension that our ## generating type ($gentype) knows about. If it does, remove it and ## stop looking for the extension. foreach my $ext (@{$self->{'valid_components'}->{$gentype}}) { ## Remove the extension. ## If it works, then we can exit this loop. last if ($gen =~ s/$ext$//); } ## If the user provided file does not match any of the ## extensions specified by the custom definition, we need ## to remove the extension or else this file will not be ## added to the project. $gen =~ s/\.[^\.]+$// if ($gen eq $input); ## See if we need to add the file. We always need to check since the ## output file may have absolutely nothing in common with the input ## file. foreach my $created ($self->generated_filenames($gen, $gentype, $tag, $input)) { ## $gen is a file that has a custom definition that generates ## files of the type $tag. The $file passed in is of type ## $gentype and, as far as I can tell, $created will always be ## longer or of the same length of $file. It doesn't really ## matter if $file contains a '.' or not. if (index($created, $file) != -1) { if (defined $ofile) { $created = $self->prepend_gendir($created, $ofile, $gentype); } if (!$self->already_added($array, $created)) { push(@$array, $created); ++$count; } last; } } } return $count; } sub add_corresponding_component_files { my($self, $filecomp, $tag) = @_; my $grname = $grouped_key . $tag; ## Create a hash array keyed off of the existing files of the type ## that we plan on adding. my $fexist = 0; my %scfiles; my $names = $self->{$tag}; foreach my $name (keys %$names) { ## Check to see if files exist in the default group if (defined $$names{$name}->{$defgroup} && defined $$names{$name}->{$defgroup}->[0]) { $fexist = 1; } foreach my $comp (keys %{$$names{$name}}) { @scfiles{@{$$names{$name}->{$comp}}} = (); } } ## Create an array of extensions for the files we want to add my @exts; foreach my $ext (@{$self->{'valid_components'}->{$tag}}) { push(@exts, $ext); $exts[$#exts] =~ s/\\//g; } ## Check each file against a possible new file addition my $adddefaultgroup = 0; my $oktoadddefault = 0; foreach my $sfile (keys %$filecomp) { my $found = 0; foreach my $ext (@exts) { if (exists $scfiles{"$sfile$ext"}) { $found = 1; last; } } if (!$found) { ## Get the array of files for the selected component name my $array = []; my $comp = $$filecomp{$sfile}; foreach my $name (keys %$names) { if (defined $$names{$name}->{$comp}) { $array = $$names{$name}->{$comp}; } } ## First, see if it will be generated so that we can correctly ## deal with 'gendir' settings. foreach my $gentype (keys %{$self->{'generated_exts'}}) { $found += $self->list_generated_file($gentype, $tag, $array, $sfile); } ## Next check to see if the file exists if (!$found) { foreach my $ext (@exts) { if (-r "$sfile$ext") { my $file = "$sfile$ext"; if (!$self->already_added($array, $file)) { push(@$array, $file); ++$found; } last; } } } ## If we have any files at all in the component array, check ## to see if we need to add a new group name if (defined $$array[0]) { if ($comp eq $defgroup) { $adddefaultgroup = 1; } else { my $grval = $self->get_assignment($grname); if (!defined $grval || !StringProcessor::fgrep($comp, $self->create_array($grval))) { $self->process_assignment_add($grname, $comp); } $oktoadddefault = 1; $adddefaultgroup |= $fexist; } ## Put the array back into the component list if ($found) { foreach my $name (keys %$names) { $$names{$name}->{$comp} = $array; } } } } } ## We only need to add the default group name if we wanted to ## add the default group when adding new files and we added a group ## by some other name. Otherwise, defaulted files would always be ## in a group, which is not what we want. if ($adddefaultgroup && $oktoadddefault) { $self->process_assignment_add($grname, $defgroup); } } sub get_default_project_name { my $self = shift; my $name = $self->{'current_input'}; if ($name eq '') { $name = $self->transform_file_name($self->base_directory()); } else { ## Since files on UNIX can have back slashes, we transform them ## into underscores. $name =~ s/\\/_/g; ## Convert the name to a usable name $name = $self->transform_file_name($name); ## Take off the extension $name =~ s/\.[^\.]+$//; } return $name; } sub remove_excluded { my $self = shift; my @tags = @_; ## Process each file type and remove the excluded files foreach my $tag (@tags) { my $names = $self->{$tag}; foreach my $name (keys %$names) { foreach my $comp (keys %{$$names{$name}}) { my $count = scalar(@{$$names{$name}->{$comp}}); for(my $i = 0; $i < $count; ++$i) { my $file = $$names{$name}->{$comp}->[$i]; if (defined $self->{'remove_files'}->{$tag}->{$file}) { splice(@{$$names{$name}->{$comp}}, $i, 1); --$i; --$count; } else { ## The file does not match exactly with one of the files to ## remove. Look for wildcard specifications in the files to ## be removed and perform the removal if one of them matches ## the current file. foreach my $key (keys %{$self->{'remove_files'}->{$tag}}) { if ($key =~ /[\*\?\[\]]/) { my $regex = $key; $regex =~ s/\./\\./g; $regex =~ s/\*/\.\*/g; $regex =~ s/\?/\./g; if ($file =~ /^$regex$/) { splice(@{$$names{$name}->{$comp}}, $i, 1); --$i; --$count; last; } } } } } } } delete $self->{'remove_files'}->{$tag}; } } sub sort_generated_types { ## We need to sort the custom component types such that a custom type ## that generates input for another custom type comes first in the ## list. my($self, $left, $right, $norecurse) = @_; foreach my $key (keys %{$self->{'generated_exts'}->{$left}}) { if ($key =~ /_files$/) { foreach my $regex (@{$self->{'generated_exts'}->{$left}->{$key}}) { my $ext = $regex; $ext =~ s/\\//g; foreach my $vreg (@{$self->{'valid_components'}->{$right}}) { return -1 if ($ext =~ /$vreg$/); } } } } if (!$norecurse && $self->sort_generated_types($right, $left, 1) == -1) { return 1; } return 0; } sub generate_defaults { my $self = shift; ## Generate default project name if (!defined $self->get_assignment('project_name')) { $self->set_project_name($self->get_default_project_name()); } ## Generate the default pch file names (if needed) my @files = $self->generate_default_file_list( '.', [], undef, $self->get_assignment('recurse')); $self->generate_default_pch_filenames(\@files); ## If the pch file names are empty strings then we need to fix that $self->fix_pch_filenames(); ## Generate default components, but %specialComponents ## are skipped in the initial default components generation $self->generate_default_components(\@files); ## Remove source files that are also listed in the template files ## If we do not do this, then generated projects can be invalid. $self->remove_duplicated_files('source_files', 'template_files'); ## If pch files are listed in header_files or source_files more than ## once, we need to remove the extras $self->remove_extra_pch_listings(); ## Generate the default generated list of files only if we defaulted ## the generated file list. I want to ensure that source_files comes ## first in the list to pick up group information (since source_files ## are most likely going to be grouped than anything else). my @vc = sort { return -1 if $a eq 'source_files'; return 1 if $b eq 'source_files'; return $b cmp $a; } keys %{$self->{'valid_components'}}; my @gvc = sort { $self->sort_generated_types($a, $b) } keys %{$self->{'generated_exts'}}; foreach my $gentype (@gvc) { $self->list_default_generated($gentype, \@vc); } ## Now that all of the source files have been added ## we need to remove those that have need to be removed $self->remove_excluded('source_files'); ## Collect up all of the source files that have already been listed ## with the extension removed for use directly below. my %sourcecomp; foreach my $sourcetag (keys %sourceComponents) { my $names = $self->{$sourcetag}; foreach my $name (keys %$names) { foreach my $comp (keys %{$$names{$name}}) { foreach my $sfile (@{$$names{$name}->{$comp}}) { my $mod = $sfile; $mod =~ s/\.[^\.]+$//; $sourcecomp{$mod} = $comp; } } } } ## Add %specialComponents files based on the ## source_components (i.e. .h and .i or .inl based on .cpp) foreach my $tag (keys %specialComponents) { $self->add_corresponding_component_files(\%sourcecomp, $tag); } ## Now, if the %specialComponents are still empty ## then take any file that matches the components extension foreach my $tag (keys %specialComponents) { if (!$self->{'special_supplied'}->{$tag} || UNIVERSAL::isa($self->{'special_supplied'}->{$tag}, 'ARRAY')) { my $names = $self->{$tag}; if (defined $names) { ## We only want to generate default components if we have ## defaulted the source files or we have no files listed ## in the current special component. my $ok = $self->{'defaulted'}->{'source_files'}; if (!$ok) { my @all; foreach my $name (keys %$names) { foreach my $key (keys %{$$names{$name}}) { push(@all, @{$$names{$name}->{$key}}); } } $ok = (!defined $all[0]); } if ($ok) { ## If the "special" type was supplied and it was all ## directories, we need to use those directories to generate ## the default components instead of the current directory. my $fileref = \@files; if (defined $self->{'special_supplied'}->{$tag} && UNIVERSAL::isa($self->{'special_supplied'}->{$tag}, 'ARRAY')) { my @special; foreach my $dir (@{$self->{'special_supplied'}->{$tag}}) { push(@special, $self->generate_default_file_list( $dir, [], undef, $self->get_assignment('recurse'))); } $fileref = \@special; } $self->generate_default_components($fileref, $tag); } } } } ## The code to add template files automatically when it is left ## defaulted by the user may add source files that happen to end in _t ## (minus the extension). If we do not remove template files that are ## also listed as source files, the generated projects can be invalid. $self->remove_duplicated_files('template_files', 'source_files'); ## Now that all of the other files have been added ## we need to remove those that have need to be removed my @rmkeys = keys %{$self->{'remove_files'}}; $self->remove_excluded(@rmkeys) if (defined $rmkeys[0]); ## Tie custom files together if need be. This currently only applies ## to types with command helpers. At some point, if it is found to be ## desirous, we could extend the MPC syntax somehow to support this ## sort of thing manually. my $dep = 'dependent'; foreach my $gentype (@gvc) { my $cmdHelper = $self->find_command_helper($gentype); if (defined $cmdHelper) { ## There has to be at least two files files in order for ## something to be tied together. my @files = $self->get_component_list($gentype, 1); if ($#files >= 1) { foreach my $file (@files) { my $part = $self->remove_wanted_extension( $file, $self->{'valid_components'}->{$gentype}); my($tied, $vc) = $cmdHelper->get_tied($file, \@files); foreach my $tie (@$tied) { my @gen; if (!defined $vc) { foreach $vc (@vc) { @gen = $self->generated_filenames($part, $gentype, $vc, $file); last if ($#gen >= 0); } } ## We have a tied file, now we need to actually perform ## the tieing of the two. We will do this by saying that ## the output of the original is necessary for the ## processing of the tied file. @gen = $self->generated_filenames($part, $gentype, $vc, $file) if (!$gen[0]); ## We have found a set of files that are generated ## based on the component type of the original file ## ($gentype), so we just add the first one and ## we're done. my $first = $gen[0]; $self->{'flag_overrides'}->{$gentype}->{$tie}->{$dep} = $self->{'generated_exts'}->{$gentype}->{$dep} if (!defined $self->{'flag_overrides'}->{$gentype}->{$tie}->{$dep}); $self->{'flag_overrides'}->{$gentype}->{$tie}->{$dep} .= " $first" if (!defined $self->{'flag_overrides'}->{$gentype}->{$tie}->{$dep} || $self->{'flag_overrides'}->{$gentype}->{$tie}->{$dep} !~ /\b$first\b/); } } } } } } sub set_project_name { my($self, $name) = @_; ## Save the unmodified project name so that when we ## need to determine the default target name, we can use ## what is expected by the user. $self->{'unmodified_project_name'} = $name; ## If we are applying the name modifier to the project ## then we will modify the project name if ($self->get_apply_project()) { my $nmod = $self->get_name_modifier(); if (defined $nmod) { $nmod =~ s/\*/$name/g; $name = $nmod; } } ## Set the project_name assignment so that the TemplateParser ## can get the project name. $self->process_assignment('project_name', $name); } sub project_name { return $_[0]->get_assignment('project_name'); } sub lib_target { my $self = shift; return (defined $self->get_assignment('sharedname') || defined $self->get_assignment('staticname')); } sub exe_target { return (defined $_[0]->get_assignment('exename')); } sub get_component_list { my($self, $tag, $noconvert) = @_; my $names = $self->{$tag}; my @list; foreach my $name (keys %$names) { foreach my $key (keys %{$$names{$name}}) { push(@list, @{$$names{$name}->{$key}}); } } ## By default, if 'convert_slashes' is true, then we convert slashes ## to backslashes. There are cases where we do not want to convert ## the slashes, in that case get_component_list() was called with ## an additional parameter indicating this. if (!$noconvert && $self->{'convert_slashes'}) { foreach my $item (@list) { $item =~ s/\//\\/g; } } if ($self->{'sort_files'}) { @list = sort { $self->file_sorter($a, $b) } @list; } return @list; } sub check_custom_output { my($self, $based, $cinput, $ainput, $type, $comps) = @_; my @outputs; foreach my $array ($self->generated_filenames($cinput, $based, $type, $ainput, 0, 1)) { foreach my $built (@$array) { if (@$comps == 0) { push(@outputs, $built); last; } elsif (defined $specialComponents{$type} && (!$self->{'special_supplied'}->{$type} || UNIVERSAL::isa($self->{'special_supplied'}->{$type}, 'ARRAY'))) { push(@outputs, $built); last; } else { my $base = $built; $base =~ s/\\/\//g if ($self->{'convert_slashes'}); my $re = $self->escape_regex_special($self->mpc_basename($base)); foreach my $c (@$comps) { ## We only match if the built file name matches from ## beginning to end or from a slash to the end. if ($c =~ /^$re$/ || $c =~ /[\/\\]$re$/) { push(@outputs, $built); last; } } } } } return @outputs; } sub get_special_value { my $self = shift; my $type = shift; my $cmd = shift; my $based = shift; my @params = @_; ## These names (held in $type) are variables that contain various ## commands that will be used in templates within the context of a ## foreach (e.g., <%custom_type->input_files%> or <%feature->value%>). if ($type eq 'feature') { return $self->get_feature_value($cmd, $based); } elsif (index($type, 'custom_type') == 0) { return $self->get_custom_value($cmd, $based, @params); } elsif (index($type, $grouped_key) == 0) { return $self->get_grouped_value($type, $cmd, $based); } elsif (defined $self->get_addtemp()->{$type . 's'}) { if ($cmd eq '_default') { $based =~ /^([^:]+):/; return defined $1 ? $1 : $based; } else { if ($based =~ /:(.*)/) { my %attr = map { split('=', $_) } split(',', $1); return $attr{$cmd}; } } } else { my $language = $self->get_language(); ## If the passed in type is not a builtin type, try the type with an ## 's' on the end. $type .= 's' if (!defined $language{$language}->[0]->{$type}); ## This is a hack for dealing with the fact that built-in types ## (e.g., Source_Files, Header_Files, etc.) are not real custom ## definitions. However, we can "modify" them to some extent. return $self->get_builtin_value($type, $cmd, $based) if (defined $language{$language}->[0]->{$type}); } return undef; } sub get_feature_value { my($self, $cmd, $based) = @_; if ($cmd eq 'value') { my $val = $self->{'feature_parser'}->get_value($based); if (defined $val && $val != 0) { return 1; } } return undef; } sub get_grouped_value { my($self, $type, $cmd, $based) = @_; my $value; ## Make it all lower case $type = lc($type); ## Remove the grouped_ part $type =~ s/^$grouped_key//; ## Add the s if it isn't there $type .= 's' if ($type !~ /s$/); my $names = $self->{$type}; if ($cmd eq 'files') { foreach my $name (keys %$names) { my $comps = $$names{$name}; my @keys = keys %$comps; if (StringProcessor::fgrep($based, \@keys)) { if ($self->{'convert_slashes'}) { my @converted; foreach my $file (@{$$comps{$based}}) { push(@converted, $self->slash_to_backslash($file)); } $value = \@converted; } else { $value = $$comps{$based}; } if ($self->{'sort_files'}) { my @sorted = sort { $self->file_sorter($a, $b) } @$value; $value = \@sorted; } } } } elsif ($cmd eq 'component_name') { ## If there is more than one name, then we will need ## to deal with that at a later time. foreach my $name (keys %$names) { $value = $name; } } return $value; } sub get_builtin_value { my($self, $type, $cmd, $based) = @_; ## If the passed in type does not have a generated_exts definition, ## then try the type with an 's' on the end. $type .= 's' if (!defined $self->{'generated_exts'}->{$type}); ## If we have a builtin type that has the variable ($cmd) that we are ## looking for, process the value through command parameter conversion. if (defined $self->{'generated_exts'}->{$type} && defined $self->{'generated_exts'}->{$type}->{$cmd}) { return $self->convert_command_parameters( $type, $self->{'generated_exts'}->{$type}->{$cmd}, $based, $self->get_builtin_output($based)); } ## Otherwise, there's nothing here. return undef; } sub get_command_subs { my $self = shift; my %valid; ## Add the built-in OS compatibility commands if (UNIVERSAL::isa($self, 'WinProjectBase') || $self->use_win_compatibility_commands()) { $valid{'cat'} = 'type'; $valid{'cmp'} = 'fc /b'; $valid{'cp'} = 'copy /y'; $valid{'mkdir'} = 'mkdir'; $valid{'mv'} = 'move /y'; $valid{'os'} = 'win32'; $valid{'rm'} = 'del /f/s/q'; $valid{'rmdir'} = 'rmdir /s/q'; $valid{'nul'} = 'nul'; $valid{'slash'} = '\\'; $valid{'bat'} = '.bat'; $valid{'cmd'} = '.cmd'; $valid{'exe'} = '.exe'; $valid{'pathsep'} = ';'; } else { $valid{'cat'} = 'cat'; $valid{'cmp'} = 'cmp'; $valid{'cp'} = 'cp -f'; $valid{'mkdir'} = 'mkdir -p'; $valid{'mv'} = 'mv -f'; $valid{'os'} = 'unix'; $valid{'rm'} = 'rm -rf'; $valid{'rmdir'} = 'rm -rf'; $valid{'nul'} = '/dev/null'; $valid{'slash'} = '/'; $valid{'bat'} = ''; $valid{'cmd'} = ''; $valid{'exe'} = ''; $valid{'pathsep'} = ':'; } ## Add the project specific compatibility commands $valid{'gt'} = $self->get_gt_symbol(); $valid{'lt'} = $self->get_lt_symbol(); $valid{'and'} = $self->get_and_symbol(); $valid{'or'} = $self->get_or_symbol(); $valid{'quote'} = $self->get_quote_symbol(); $valid{'equote'} = $self->get_escaped_quote_symbol(); $valid{'crlf'} = $self->crlf(); $valid{'cmdsep'} = $self->get_cmdsep_symbol(); $valid{'temporary'} = 'temp.$$$$.' . int(rand(0xffffffff)); $valid{'prj_type'} = $self->{'pctype'}; return \%valid; } sub replace_parameters { my($self, $str, $valid, $nowarn, $input, $output, $always_clear) = @_; my %saved; my $count = 0; while ($str =~ /<%(\w+)(\(\w+\))?%>/) { my $name = $1; my $modifier = $2; if (defined $modifier) { my $tmp = $name; $name = $modifier; $name =~ s/[\(\)]//g; $modifier = $tmp; } ## Support both pseudo variables and project settings if (defined $$valid{$name} || $self->is_keyword($name)) { ## If the pseudo variable is defined or the project setting has a ## value, then we'll need to do the replacement. However, if it's ## a project keyword and it's not defined, we will need to delay ## the replacement until later (unless $always_clear is true). my $replace; my $clear = $always_clear; if (defined $$valid{$name}) { $replace = $$valid{$name}; } elsif ($self->is_keyword($name)) { $replace = $self->get_assignment($name); } ## Perform the modification and replacement here if (defined $replace) { if (defined $modifier) { if ($modifier eq 'noextension') { $replace =~ s/\.[^\.]+$//; } else { $self->warning("Unknown parameter modifier $modifier."); } } $str =~ s/<%\w+(\(\w+\))?%>/$replace/; } elsif ($clear) { ## We need to clear out this variable usage. $str =~ s/<%\w+(\(\w+\))?%>//; } else { ## Save this variable usage to be put back after we're done ## processing the string. my $key = "\1" . $count++ . "\1"; if ($str =~ s/(<%\w+(\(\w+\))?%>)/$key/) { $saved{$key} = $1; } } } else { $str =~ s/<%\w+(\(\w+\))?%>//; ## We only want to warn the user that we did not recognize the ## pseudo template parameter if there was an input and an output ## file passed to this function. If this variable was used ## without the parenthesis (as in an if statement), then we don't ## want to warn the user. if (defined $input && defined $output) { if (!defined $$nowarn{$name}) { $self->warning("<%$name%> was not recognized."); } ## If we didn't recognize the pseudo template parameter then ## we don't want to return anything back. return undef; } } } ## Replace the saved variables so that they may be replaced (or ## removed) later on. foreach my $key (keys %saved) { $str =~ s/$key/$saved{$key}/; } return $str; } sub convert_command_parameters { my($self, $ktype, $str, $input, $output) = @_; my %nowarn; my %valid = %{$self->{'command_subs'}}; ## Add in the values that change for every call to this function $valid{'temporary'} = 'temp.$$$$.' . int(rand(0xffffffff)); if (defined $input) { $valid{'input'} = $input; $valid{'input_basename'} = $self->mpc_basename($input); $valid{'input_dirname'} = $self->mpc_dirname($input); $valid{'input_noext'} = $input; ## An input file doesn't always have an extension. If there isn't ## one, then we need to set the 'input_ext' field to an empty string ## ($1 will not necessarily have a valid value). if ($valid{'input_noext'} =~ s/(\.[^\.]+)$//) { $valid{'input_ext'} = $1; } else { $valid{'input_ext'} = ''; } ## Check for the gendir setting associated with this input file. We ## have to check at so many levels so we don't inadvertantly create ## intermediate hash tables. if (defined $self->{'flag_overrides'}->{$ktype} && defined $self->{'flag_overrides'}->{$ktype}->{$input} && $self->{'flag_overrides'}->{$ktype}->{$input}->{'gendir'}) { $valid{'gendir'} = $self->{'flag_overrides'}->{$ktype}->{$input}->{'gendir'}; } } ## If there is no gendir setting, just set it to the current directory. $valid{'gendir'} = '.' if (!defined $valid{'gendir'}); if (defined $output) { my $first = 1; $valid{'output'} = "@$output"; foreach my $out (@$output) { ## An output file doesn't always have an extension. If there isn't ## one, then we need to set the 'output_ext' field to an empty ## string ($1 will not necessarily have a valid value). my $noext = $out; if ($noext =~ s/(\.[^\.]+)$//) { $valid{'output_ext'} = $1; } else { $valid{'output_ext'} = ''; } $valid{'output_noext'} .= (!$first ? ' ' : '') . $noext; ## In order to call basename or dirname, we must make sure that the ## directory separators are forward slashes. my $file = $out; $file =~ s/\\/\//g if ($self->{'convert_slashes'}); $valid{'output_basename'} .= (!$first ? ' ' : '') . $self->mpc_basename($file); $valid{'output_dirname'} .= (!$first ? ' ' : '') . $self->mpc_dirname($file); $first = 0; } } ## Add in the specific types of output files if (defined $output) { foreach my $type (keys %{$self->{'valid_components'}}) { my $key = $type; $key =~ s/s$//gi; $nowarn{$key} = 1; $nowarn{$key . '_noext'} = 1; foreach my $ext (@{$self->{'valid_components'}->{$type}}) { foreach my $out (@$output) { if ($out =~ /$ext$/) { $valid{$key} = $out; $valid{$key . '_noext'} = $out; $valid{$key . '_noext'} =~ s/$ext$//; last; } } } } } return $self->replace_parameters($str, \%valid, \%nowarn, $input, $output, 1); } sub get_custom_special_output { my $self = shift; my $tag = shift; my $input = shift; if (defined $self->{'custom_special_output'}->{$tag} && defined $self->{'custom_special_output'}->{$tag}->{$input} && (!defined $self->{'flag_overrides'}->{$tag} || !defined $self->{'flag_overrides'}->{$tag}->{$input} || !defined $self->{'flag_overrides'}->{$tag}->{$input}->{'gendir'} || $self->{'flag_overrides'}->{$tag}->{$input}->{'gendir'} eq '.')) { return $self->{'custom_special_output'}->{$tag}->{$input}; } return []; } sub get_first_custom_output { my $self = shift; my $input = shift; my $tag = shift; my %vcomps; foreach my $vc (keys %{$self->{'valid_components'}}) { my @comps = $self->get_component_list($vc); $vcomps{$vc} = \@comps; } $vcomps{$generic_key} = []; my $ainput = $input; my $cinput = $input; ## Remove the extension $cinput =~ s/\.[^\.]+$//; ## If we are converting slashes, ## change them back for this parameter $ainput =~ s/\\/\//g if ($self->{'convert_slashes'}); foreach my $vc (keys %{$self->{'valid_components'}}) { my @cout = $self->check_custom_output($tag, $cinput, $ainput, $vc, $vcomps{$vc}); return $cout[0] if @cout; } my @cout = $self->check_custom_output($tag, $cinput, $ainput, $generic_key, $vcomps{$generic_key}); return $cout[0] if @cout; my $aref = $self->get_custom_special_output($tag, $ainput); return $$aref[0] if @$aref; return ''; } sub get_custom_assign_or_override { my $self = shift; my $var = shift; # which variable? (command, commandflags, etc.) my $tag = shift; # custom_files my $input = shift; # input file name which may override my @params = @_; my $key = undef; if (defined $self->{'flag_overrides'}->{$tag}) { my $ustyle = $input; $ustyle =~ s/\\/\//g if ($self->{'convert_slashes'}); my $dir = $self->mpc_dirname($ustyle); if (defined $self->{'flag_overrides'}->{$tag}->{$ustyle}) { $key = $ustyle; } elsif (defined $self->{'flag_overrides'}->{$tag}->{$dir}) { $key = $dir; } } my $value = undef; if (defined $key) { $value = $self->{'flag_overrides'}->{$tag}->{$key}->{$var}; } if (!defined $value) { $value = $self->get_assignment($var, $self->{'generated_exts'}->{$tag}); } return undef if !defined $value; if (defined $customDefined{$var} && ($customDefined{$var} & 0x14)) { return $self->convert_command_parameters($tag, $value, $input, undef, @params); } return $value; } sub get_custom_value { my $self = shift; my $cmd = shift; my $based = shift; my @params = @_; my $value; if ($cmd eq 'input_files') { ## Get the component list for the component type my @array = $self->get_component_list($based); ## Check for directories in the component list. If the component ## type is not automatic, we may have directories here and will need ## to get the file list for that type. my $once; for(my $i = 0; $i < scalar(@array); ++$i) { if (-d $array[$i]) { if (!defined $once) { $once = {'recurse' => $self->get_assignment('recurse'), 'pchh' => $self->get_assignment('pch_header'), 'pchc' => $self->get_assignment('pch_source'), }; } my @built; $self->sift_default_file_list($based, $array[$i], \@built, $self->{'valid_components'}->{$based}, $$once{'recurse'}, $$once{'pchh'}, $$once{'pchc'}); splice(@array, $i, 1, @built); $i += $#built; } } $value = \@array; $self->{'custom_output_files'} = {}; $self->{'custom_dependency_files'} = {}; $self->{'custom_multi_cmd'} = {}; my %vcomps; foreach my $vc (keys %{$self->{'valid_components'}}) { my @comps = $self->get_component_list($vc); $vcomps{$vc} = \@comps; } $vcomps{$generic_key} = []; foreach my $input (@array) { my @outputs; my $ainput = $input; my $cinput = $input; ## Remove the extension $cinput =~ s/\.[^\.]+$//; ## If we are converting slashes, ## change them back for this parameter $ainput =~ s/\\/\//g if ($self->{'convert_slashes'}); if (defined $self->{'combined_custom'}->{$based}) { $self->{'custom_multi_cmd'}->{$input} = $self->{'combined_custom'}->{$based}; my $cdf = $self->{'custom_dependency_files'}; my $csd = $self->{'custom_special_depend'}; foreach my $tag (@{$self->{'combined_custom'}->{$based}}) { if (defined $csd->{$tag} && defined $csd->{$tag}->{$ainput}) { $cdf->{$input} = [] if (!defined $cdf->{$input}); StringProcessor::merge($cdf->{$input}, $csd->{$tag}->{$ainput}); } } } else { $self->{'custom_dependency_files'}->{$input} = $self->{'custom_special_depend'}->{$based}->{$ainput}; } ## Add all of the output files. We can not add $generic_key to the ## list here (as it used to be). It may have been handled by ## generated_filenames. foreach my $vc (keys %{$self->{'valid_components'}}) { ## The output of multiple components could be input for the ## current component type ($based). We need to avoid adding ## duplicates here. if (defined $self->{'combined_custom'}->{$based}) { foreach my $tag (@{$self->{'combined_custom'}->{$based}}) { my @cout = $self->check_custom_output($tag, $cinput, $ainput, $vc, $vcomps{$vc}); StringProcessor::merge(\@outputs, \@cout); } } else { my @cout = $self->check_custom_output($based, $cinput, $ainput, $vc, $vcomps{$vc}); StringProcessor::merge(\@outputs, \@cout); } } if (defined $self->{'combined_custom'}->{$based}) { foreach my $tag (@{$self->{'combined_custom'}->{$based}}) { my @cout = $self->check_custom_output($tag, $cinput, $ainput, $generic_key, $vcomps{$generic_key}); StringProcessor::merge(\@outputs, \@cout); } } else { my @cout = $self->check_custom_output($based, $cinput, $ainput, $generic_key, $vcomps{$generic_key}); StringProcessor::merge(\@outputs, \@cout); } ## Add specially listed files avoiding duplicates. We don't want ## to add these files if gendir is set to something besides . if (defined $self->{'combined_custom'}->{$based}) { foreach my $tag (@{$self->{'combined_custom'}->{$based}}) { StringProcessor::merge(\@outputs, $self->get_custom_special_output($tag, $ainput)); } } else { StringProcessor::merge(\@outputs, $self->get_custom_special_output($based, $ainput)); } if ($self->{'convert_slashes'}) { foreach my $output (@outputs) { $output =~ s/\//\\/g; } } if ($self->{'sort_files'}) { @outputs = sort { $self->file_sorter($a, $b) } @outputs; } $self->{'custom_output_files'}->{$input} = \@outputs; } } elsif ($cmd eq 'output_files') { # Generate output files based on $based if (defined $self->{'custom_output_files'}) { $value = $self->{'custom_output_files'}->{$based}; } } elsif ($cmd eq 'source_output_files') { # Generate source output files based on $based if (defined $self->{'custom_output_files'}) { $value = []; foreach my $file (@{$self->{'custom_output_files'}->{$based}}) { foreach my $ext (@{$self->{'valid_components'}->{'source_files'}}) { if ($file =~ /$ext$/) { ## We've found a file that matches one of the source file ## extensions. Now we have to make sure that it doesn't ## match a template file extension. my $matched = 0; foreach my $text (@{$self->{'valid_components'}->{'template_files'}}) { if ($file =~ /$text$/) { $matched = 1; last; } } push(@$value, $file) if (!$matched); last; } } } } } elsif ($cmd eq 'non_source_output_files') { # Generate non source output files based on $based if (defined $self->{'custom_output_files'}) { $value = []; foreach my $file (@{$self->{'custom_output_files'}->{$based}}) { my $source = 0; foreach my $ext (@{$self->{'valid_components'}->{'source_files'}}) { if ($file =~ /$ext$/) { $source = 1; ## We've found a file that matches one of the source file ## extensions. Now we have to make sure that it doesn't ## match a template file extension. foreach my $text (@{$self->{'valid_components'}->{'template_files'}}) { if ($file =~ /$text$/) { $source = 0; last; } } last if ($source); } } push(@$value, $file) if (!$source); } } } elsif ($cmd eq 'inputexts') { my @array = @{$self->{'valid_components'}->{$based}}; foreach my $val (@array) { $val =~ s/\\\.//g; } $value = \@array; } elsif ($cmd eq 'dependencies') { $value = $self->{'custom_dependency_files'}->{$based}; } elsif ($cmd eq 'commands') { # only used with 'combined_custom' $value = []; my %details = ('flags' => 'commandflags', 'outopt' => 'output_option', 'gdir' => 'gendir'); for my $tag (@{$self->{'custom_multi_cmd'}->{$based}}) { my $command = $self->get_custom_assign_or_override('command', $tag, $based, @params); push(@$value, $command); my $det = $self->{'custom_multi_details'}->{$command} = {}; for my $k (keys %details) { $det->{$k} = $self->get_custom_assign_or_override($details{$k}, $tag, $based, @params); } if ($det->{'outopt'} && $self->{'custom_output_files'}->{$based}) { # only 1 output file is supported with output_option $det->{'outfile'} = $self->get_first_custom_output($based, $tag); $det->{'outfile'} =~ s/\//\\/g if $self->{'convert_slashes'}; if (defined $det->{'gdir'}) { my $basename = $det->{'outfile'}; if ($self->{'convert_slashes'}) { $basename =~ s/.*[\/\\]//; } else { $basename =~ s/.*\///; } $det->{'outfile'} = $det->{'gdir'} . $self->{'command_subs'}->{'slash'} . $basename; } } } } elsif ($cmd eq 'flags' || $cmd eq 'outopt' || $cmd eq 'outfile' || $cmd eq 'gdir') { # only used with 'combined_custom' $value = $self->{'custom_multi_details'}->{$based}->{$cmd} || ''; } elsif (defined $customDefined{$cmd}) { $value = $self->get_assignment($cmd, $self->{'generated_exts'}->{$based}); if (defined $value && ($customDefined{$cmd} & 0x14) != 0) { $value = $self->convert_command_parameters($based, $value, @params); } } return $value; } sub check_features { my($self, $requires, $avoids, $info) = @_; my $status = 1; my $why; if (defined $requires) { foreach my $require (split(/\s+/, $requires)) { my $fval = $self->{'feature_parser'}->get_value($require); ## By default, if the feature is not listed, then it is enabled. if (defined $fval && !$fval) { $why = "requires $require"; $status = 0; last; } ## For automakes sake, if we're to this point the feature is ## enabled and we will set it in the feature parser explicitly if (!defined $fval) { $self->{'feature_parser'}->parse_line(undef, "$require = 1"); } } } ## If it passes the requires, then check the avoids if ($status) { if (defined $avoids) { foreach my $avoid (split(/\s+/, $avoids)) { my $fval = $self->{'feature_parser'}->get_value($avoid); ## By default, if the feature is not listed, then it is enabled. if (!defined $fval || $fval) { $why = "avoids $avoid"; $status = 0; last; } } } } if ($info && !$status) { $self->details("Skipping " . $self->get_assignment('project_name') . " ($self->{'current_input'}); it $why."); } return $status; } sub need_to_write_project { my $self = shift; my $count = 0; ## We always write a project if the user has provided a verbatim. ## We have no idea what that verbatim clause does, so we need to just ## do what the user tells us to do. return 1 if (defined $self->{'verbatim'}->{$self->{'pctype'}}); ## The order here is important, we must check for source or resource ## files first and then for custom input files. foreach my $key ('source_files', $self->get_resource_tag(), keys %{$self->{'generated_exts'}}) { ## For implicitly-discovered projects, just having a resource file without ## source or generated file is not enough to write a project. next if $self->{'current_input'} eq '' && $key eq $self->get_resource_tag(); my $names = $self->{$key}; foreach my $name (keys %$names) { foreach my $key (keys %{$names->{$name}}) { ## See if the project contains a file that corresponds to this ## component name. if (defined $names->{$name}->{$key}->[0]) { if ($count >= 2) { ## Return 2 if we have found a custom input file (and thus no ## source or resource files due to the foreach order). return 2; } ## We have either source files or resource files, we need to ## see if this project creator supports the current language. ## If it doesn't then we don't need to create the project. elsif ($self->languageSupported()) { ## Return 1 if we have found a source file or a resource file. return 1; } } } } $count++; } ## Indicate that there is no need to write the project return 0; } sub write_output_file { my($self, $webapp) = @_; my $status = 0; my $error; my $tover = $self->get_template_override(); my @templates = $self->get_template(); ## The template override will override all templates @templates = ($tover) if (defined $tover); foreach my $template (@templates) { ## Save the template name for use as a key for various function calls $self->{'current_template'} = $template; ## Create the output file name based on the project name and the ## template that we're currently using. my $name = $self->transform_file_name( $self->project_file_name(undef, $self->{'current_template'})); ## If the template files does not end in the template extension ## then we will add it on. if ($template !~ /$TemplateExtension$/) { $template .= '.' . $TemplateExtension; } ## If the template file does not contain a path, then we ## will search through the include paths for it. my $tfile; if ($template =~ /[\/\\]/i) { $tfile = $template; } else { $tfile = $self->search_include_path($template); } if (defined $tfile) { ## Read in the template values for the specific target and project ## type. The template input file we get may depend upon the ## current template that we're using. ($status, $error) = $self->read_template_input( $self->{'current_template'}); last if (!$status); my $tp = new TemplateParser($self); ## Set the project_file assignment for the template parser $self->process_assignment('project_file', $name); ($status, $error) = $tp->parse_file($tfile); last if (!$status); if (defined $self->{'source_callback'} && $self->file_visible($self->{'current_template'})) { my $cb = $self->{'source_callback'}; my $pjname = $self->get_assignment('project_name'); my @list = $self->get_component_list('source_files'); if (UNIVERSAL::isa($cb, 'ARRAY')) { my @copy = @$cb; my $s = shift(@copy); &$s(@copy, $name, $pjname, \@list); } elsif (UNIVERSAL::isa($cb, 'CODE')) { &$cb($name, $pjname, \@list); } else { $self->warning("Ignoring callback: $cb."); } } if ($self->get_toplevel()) { my $outdir = $self->get_outdir(); my $oname = $name; $name = "$outdir/$name"; my $fh = new FileHandle(); my $dir = $self->mpc_dirname($name); mkpath($dir, 0, 0777) if ($dir ne '.'); if ($webapp) { ## At this point in time, webapps do not get a project file, ## but they do appear in the workspace } elsif ($self->compare_output()) { ## First write the output to a temporary file my $tmp = "$outdir/MPC$>.$$"; my $different = 1; if (open($fh, ">$tmp")) { my $lines = $tp->get_lines(); foreach my $line (@$lines) { print $fh $line; } close($fh); $different = 0 if (!$self->files_are_different($name, $tmp)); } else { $error = "Unable to open $tmp for output."; $status = 0; last; } ## If they are different, then rename the temporary file if ($different) { unlink($name); if (rename($tmp, $name)) { $error = $self->post_file_creation($name); if (defined $error) { $status = 0; last; } } else { $error = "Unable to open $name for output."; $status = 0; last; } } else { ## We will pretend that we wrote the file unlink($tmp); } } else { if (open($fh, ">$name")) { my $lines = $tp->get_lines(); foreach my $line (@$lines) { print $fh $line; } close($fh); $error = $self->post_file_creation($name); if (defined $error) { $status = 0; last; } } else { $error = "Unable to open $name for output."; $status = 0; last; } } ## There may be more than one template associated with this ## project creator. If there is, we can only add one generated ## file and we rely on the project creator to tell us which ## template generates the file that we need to track. $self->add_file_written($oname) if ($self->file_visible($self->{'current_template'})); } } else { $error = "Unable to locate the template file: $template."; $status = 0; last; } } return $status, $error; } sub write_install_file { my $self = shift; my $fh = new FileHandle(); my $insfile = $self->transform_file_name( $self->get_assignment('project_name')) . '.ins'; my $outdir = $self->get_outdir(); $insfile = "$outdir/$insfile"; unlink($insfile); if (open($fh, ">$insfile")) { $self->get_install_info(sub {print $fh $_[0]}); close $fh; return 1, undef; } return 0, 'Unable write to ' . $insfile; } sub get_install_info { my $self = shift; my $callback = shift; foreach my $vc (keys %{$self->{'valid_components'}}) { my $names = $self->{$vc}; foreach my $name (keys %$names) { foreach my $key (keys %{$$names{$name}}) { my $array = $$names{$name}->{$key}; if (defined $$array[0]) { &$callback("$vc:\n"); foreach my $file (@$array) { if (defined $self->{'flag_overrides'}->{$vc} && defined $self->{'flag_overrides'}->{$vc}->{$file} && defined $self->{'flag_overrides'}->{$vc}->{$file}->{'gendir'}) { &$callback(join(' ', map {/ / ? "\"$_\"" : $_} ($file, $self->{'flag_overrides'}->{$vc}->{$file}->{'gendir'})) . "\n"); } else { &$callback("$file\n"); } } &$callback("\n"); } } } } if ($self->exe_target()) { my $exeout = $self->get_assignment('exeout'); &$callback("exe_output:\n"); &$callback((defined $exeout ? $self->relative($exeout) : '') . ' ' . $self->get_assignment('exename') . "\n"); } elsif ($self->lib_target()) { my $shared = $self->get_assignment('sharedname'); my $static = $self->get_assignment('staticname'); my $dllout = $self->relative($self->get_assignment('dllout')); my $libout = $self->relative($self->get_assignment('libout')); &$callback("lib_output:\n"); if (defined $shared && $shared ne '') { &$callback((defined $dllout ? $dllout : $libout) . " $shared\n"); } if ((defined $static && $static ne '') && (defined $dllout || !defined $shared || (defined $shared && $shared ne $static))) { &$callback("$libout $static\n"); } } } sub write_project { my $self = shift; my $status = 2; my $error; my $progress = $self->get_progress_callback(); &$progress() if (defined $progress); if ($self->check_features($self->get_assignment('requires'), $self->get_assignment('avoids'), 1)) { my $webapp = $self->get_assignment('webapp'); my $ntwp = $self->need_to_write_project(); if ($webapp || $ntwp) { if ($webapp && !$self->webapp_supported()) { $self->warning("Web Applications are not supported by this type."); } else { ## A return value of 2 from need_to_write_project() indicates ## that the only reason that we need to write the project is that ## there are custom input files (i.e., no source or resource ## files). $self->process_assignment('custom_only', '1') if ($ntwp == 2); if ($self->get_assignment('custom_only')) { $self->remove_non_custom_settings(); } if ($self->{'escape_spaces'}) { foreach my $name ('exename', 'sharedname', 'staticname', 'exeout', 'dllout', 'libout') { my $value = $self->get_assignment($name); if (defined $value && $value =~ s/(\s)/\\$1/g) { $self->process_assignment($name, $value); } } foreach my $key (keys %{$self->{'valid_components'}}) { my $names = $self->{$key}; foreach my $name (keys %$names) { foreach my $key (keys %{$$names{$name}}) { foreach my $file (@{$$names{$name}->{$key}}) { $file =~ s/(\s)/\\$1/g; } } } } } ## Hook for implementing type-specific behavior. ($status, $error) = $self->pre_write_output_file($webapp); if (!$status) { return $status, $error; } ## We don't need to pass a file name here. write_output_file() ## will determine the file name for itself. ($status, $error) = $self->write_output_file($webapp); ## Write the .ins file if the user requested it and we were ## successful. if ($self->{'generate_ins'} && $status) { ($status, $error) = $self->write_install_file(); } } } elsif ($self->warn_useless_project()) { my $msg = $self->transform_file_name($self->project_file_name()) . " has no useful targets."; if ($self->{'current_input'} eq '') { $self->information($msg); } else { $self->warning($msg); } } } return $status, $error; } sub get_project_info { return $_[0]->{'project_info'}; } sub get_lib_locations { if ($_[0]->{'pid'} eq 'child') { my $lib_locs; for my $k (sort { substr($a, 0 , index ($a, '|')) <=> substr ($b, 0, index ($b, '|')) } keys %{$_[0]->{'lib_locations'}}) { # if we are a worker, we need to strip leading 'number|' my $x = $_[0]->{'lib_locations'}->{$k}; $x =~ s/\d+\|//; $lib_locs->{substr ($k, index ($k, '|') + 1)} = $x; } return $lib_locs } else { return $_[0]->{'lib_locations'}; } } sub get_inheritance_tree { return $_[0]->{'inheritance_tree'}; } sub set_component_extensions { my $self = shift; my $vc = $self->{'valid_components'}; my $ec = $self->{'exclude_components'}; foreach my $key (keys %$vc) { my $ov = $self->override_valid_component_extensions($key, @{$$vc{$key}}); $$vc{$key} = $ov if (defined $ov); } foreach my $key (keys %$ec) { my $ov = $self->override_exclude_component_extensions($key, @{$$ec{$key}}); $$ec{$key} = $ov if (defined $ov); } } sub get_component_extensions { my($self, $comp) = @_; my @ext; if (defined $self->{'valid_components'}->{$comp}) { ## Build up an array of extensions. Since they are stored as regular ## expressions, we need to remove the escaped period to provide the ## minimal amount of text for each extension to provide maximum ## flexibility within the project template. foreach my $re (@{$self->{'valid_components'}->{$comp}}) { push(@ext, $re); $ext[$#ext] =~ s/\\\.//; } } return @ext; } sub set_source_listing_callback { my($self, $cb) = @_; $self->{'source_callback'} = $cb; } sub reset_values { my $self = shift; ## Only put data structures that need to be cleared ## out when the mpc file is done being read, not at the ## end of each project within the mpc file. Those go in ## the closing curly brace section of parse_line(). $self->{'project_info'} = []; $self->{'lib_locations'} = {}; $self->reset_generating_types(); } sub add_default_matching_assignments { my $self = shift; my $lang = $self->get_language(); foreach my $key (keys %{$language{$lang}->[0]}) { push(@{$language{$lang}->[2]->{$key}}, @default_matching_assignments) if (!StringProcessor::fgrep($default_matching_assignments[0], $language{$lang}->[2]->{$key})); } } sub reset_generating_types { my $self = shift; my $lang = $self->get_language(); my %reset = ('valid_components' => $language{$lang}->[0], 'custom_only_removed' => $language{$lang}->[0], 'exclude_components' => $language{$lang}->[1], 'matching_assignments' => $language{$lang}->[2], 'generated_exts' => {}, 'combined_custom' => {}, 'valid_names' => \%validNames, ); foreach my $r (keys %reset) { $self->{$r} = {}; foreach my $key (keys %{$reset{$r}}) { $self->{$r}->{$key} = $reset{$r}->{$key}; } } $self->{'custom_types'} = {}; $self->{'define_custom_parent'} = {}; ## Allow subclasses to override the default extensions $self->set_component_extensions(); } sub get_template_input { my $self = shift; my $lang = $self->get_language(); ## This follows along the same logic as read_template_input() by ## checking for exe target and then defaulting to a lib target if ($self->exe_target()) { if ($self->get_static() == 1) { return $self->{'lib_exe_template_input'}->{$lang}->{$tikey}; } else { return $self->{'dll_exe_template_input'}->{$lang}->{$tikey}; } } if ($self->get_static() == 1) { return $self->{'lib_template_input'}->{$lang}->{$tikey}; } return $self->{'dll_template_input'}->{$lang}->{$tikey}; } sub update_project_info { my($self, $tparser, $append, $names, $sep) = @_; my $value = ''; $sep = '' if (!defined $sep); ## Append the values of all names into one string my $ncount = scalar(@$names) - 1; for(my $i = 0; $i <= $ncount; $i++) { $value .= $self->translate_value( $$names[$i], $tparser->get_value_with_default($$names[$i])); $value .= $sep if ($i != $ncount); } ## There may be more than one template associated with this project ## creator. If there is, we can only add one generated file and we ## rely on the project creator to tell us which template generates the ## file that we need to track. if ($self->file_visible($self->{'current_template'})) { ## If we already have an array, take the one off the top. Otherwise, ## create a new one which will be added below. my $arr = ($append && defined $self->{'project_info'}->[0] ? pop(@{$self->{'project_info'}}) : []); ## Set up the hash table when we are starting a new project_info $self->{'project_info_hash_table'} = {} if (!$append); ## If we haven't seen this value yet, put it on the array if (!defined $self->{'project_info_hash_table'}->{"@$names $value"}) { $self->{'project_info_hash_table'}->{"@$names $value"} = 1; push(@$arr, $value); } ## Always push the array back onto the project_info push(@{$self->{'project_info'}}, $arr); } return $value; } sub access_pi_values { my $self = shift; my $pjs = shift; my $proj = shift; ## This will use the keys left in @_ as indices into the project ## info array. But, if the user wants configurations, we need to ## pop that key off and access it along with all the rest of the ## elements in the array. The CONFIGURATIONS key should always ## be last if it's included at all. If it's not, the caller will ## only receive the first configuration instead of all of them. if ($_[$#_] == CONFIGURATIONS) { my $last = scalar(@{$$pjs{$proj}}) - 1; pop(@_); return @{$$pjs{$proj}}[@_], @{$$pjs{$proj}}[CONFIGURATIONS..$last]; } return @{$$pjs{$proj}}[@_]; } sub adjust_value { my($self, $names, $value, $tp) = @_; my $atemp = $self->get_addtemp(); ## Perform any additions, subtractions ## or overrides for the template values. foreach my $name (@$names) { if (defined $name && defined $atemp->{lc($name)}) { my $lname = lc($name); my $base = $lname; $base =~ s/.*:://; ## If the template variable is a complex name, then we need to make ## sure that the mapped value belongs to the correct type based on ## the base of the complex name. The $tp (TemplateParser) variable ## will, in the majority of all calls to this method, be defined so ## it is checked second to avoid checking it if the name isn't ## complex. if ($base =~ /(.+)\->/ && defined $tp) { my $v = $tp->get_value($1); if (defined $v) { my $found = undef; foreach my $val (@{$atemp->{$lname}}) { if (defined $$val[3]) { my $mapped = $self->{'valid_names'}->{$$val[3]}; if (defined $mapped && UNIVERSAL::isa($mapped, 'ARRAY')) { $found = 1 if ($v ne $$mapped[0]); } last; } } next if ($found); } } my $replace = (defined $self->{'valid_names'}->{$base} && ($self->{'valid_names'}->{$base} & 0x04) == 0); foreach my $val (@{$atemp->{$lname}}) { if ($replace && index($$val[1], '<%') >= 0) { $$val[1] = $self->replace_parameters($$val[1], $self->{'command_subs'}); } my $arr = $self->create_array($$val[1]); if ($$val[0] > 0) { if (!defined $value) { $value = ''; } if (UNIVERSAL::isa($value, 'ARRAY')) { ## Avoid adding duplicates. If the existing array contains ## the value already, remove it from the newly created array. for(my $i = 0; $i < scalar(@$value); $i++) { if (StringProcessor::fgrep($$value[$i], $arr)) { splice(@$value, $i, 1); $i--; } } ## We need to make $value a new array reference ($arr) ## to avoid modifying the array reference pointed to by $value unshift(@$arr, @$value); $value = $arr; } else { $value .= " $$val[1]"; } } elsif ($$val[0] < 0) { if (defined $value) { my $parts; if (UNIVERSAL::isa($value, 'ARRAY')) { $parts = $value; } else { $parts = $self->create_array($value); } $value = []; foreach my $part (@$parts) { if ($part ne '') { push(@$value, $part) if (!StringProcessor::fgrep($part, $arr)); } } } } else { ## If the user set the variable to empty, then we need to ## set the value to undef $value = (defined $$arr[0] ? $arr : undef); } } last; } } return $value; } sub get_verbatim { my($self, $marker) = @_; my $str; my $thash = $self->{'verbatim'}->{$self->{'pctype'}}; if (defined $thash) { if (defined $thash->{$marker}) { my $crlf = $self->crlf(); foreach my $line (@{$thash->{$marker}}) { $str = '' if (!defined $str); $str .= $self->process_special($line) . $crlf; } if (defined $str) { $str .= $crlf; $self->{'verbatim_accessed'}->{$self->{'pctype'}}->{$marker} = 1; } } } return $str; } sub generate_recursive_input_list { my($self, $dir, $exclude) = @_; return $self->extension_recursive_input_list($dir, $exclude, $ProjectCreatorExtension); } sub get_modified_project_file_name { my($self, $name, $ext) = @_; my $nmod = $self->get_name_modifier(); ## We don't apply the name modifier to the project file ## name if we have already applied it to the project name ## since the project file name comes from the project name. if (defined $nmod && !$self->get_apply_project()) { $nmod =~ s/\*/$name/g; $name = $nmod; } return "$name$ext"; } sub get_valid_names { return $_[0]->{'valid_names'}; } sub get_feature_parser { return $_[0]->{'feature_parser'}; } sub preserve_assignment_order { my($self, $name) = @_; my $mapped = $self->{'valid_names'}->{$name}; ## Only return the value stored in the valid_names hash map if it's ## defined and it's not an array reference. The array reference is ## a keyword mapping and all mapped keywords should have preserved ## assignment order. if (defined $mapped && !UNIVERSAL::isa($mapped, 'ARRAY')) { return ($mapped & 1); } return 1; } sub add_to_template_input_value { my($self, $name) = @_; my $mapped = $self->{'valid_names'}->{$name}; ## Only return the value stored in the valid_names hash map if it's ## defined and it's not an array reference. The array reference is ## a keyword mapping and no mapped keywords should be added to ## template input variables. if (defined $mapped && !UNIVERSAL::isa($mapped, 'ARRAY')) { return ($mapped & 2); } return 0; } sub dependency_combined_static_library { #my $self = shift; return defined $ENV{MPC_DEPENDENCY_COMBINED_STATIC_LIBRARY}; } sub translate_value { my($self, $key, $val) = @_; if ($key eq 'after' && $val ne '') { my $arr = $self->create_array($val); $val = ''; if ($self->require_dependencies()) { foreach my $entry (@$arr) { if ($self->get_apply_project()) { my $nmod = $self->get_name_modifier(); if (defined $nmod) { $nmod =~ s/\*/$entry/g; $entry = $nmod; } } $val .= '"' . ($self->dependency_is_filename() ? $self->project_file_name($entry) : $entry) . '" '; } $val =~ s/\s+$//; } } return $val; } sub requires_parameters { #my $self = shift; #my $name = shift; return $custom{$_[1]}; } sub project_file_name { my($self, $name, $template) = @_; ## Fill in the name if one wasn't provided $name = $self->get_assignment('project_name') if (!defined $name); ## Apply the transformation so that any name modifiers are utilized. return $self->get_modified_project_file_name( $self->project_file_prefix() . $self->transform_file_name($name), $self->project_file_extension()); } sub remove_non_custom_settings { my $self = shift; ## Remove any files that may have automatically been added ## to this project. If they were explicitly added, then we ## will leave them in the project. foreach my $key (keys %{$self->{'custom_only_removed'}}) { if ($self->{'defaulted'}->{$key}) { $self->{$key} = {}; } } ## Unset the exename, sharedname and staticname $self->process_assignment('exename', undef); $self->process_assignment('sharedname', undef); $self->process_assignment('staticname', undef); } sub remove_wanted_extension { my($self, $name, $array) = @_; foreach my $wanted (@$array) { return $name if ($name =~ s/$wanted$//); } ## If the user provided file does not match any of the ## extensions specified by the custom definition, we need ## to remove the extension or else this file will not be ## added to the project. $name =~ s/\.[^\.]+$//; return $name; } sub resolve_alias { if (index($_[1], 'install') >= 0) { my $resolved = $_[1]; if ($resolved =~ s/(.*::)install$/$1exeout/) { } elsif ($resolved eq 'install') { $resolved = 'exeout'; } return $resolved; } return $_[1]; } sub create_feature_parser { my($self, $features, $feature) = @_; my $gfeature = $self->{'gfeature_file'}; my $typefeaturef = (defined $gfeature ? $self->mpc_dirname($gfeature) . '/' : '') . $self->{'pctype'} . '.features'; $typefeaturef = undef if (! -r $typefeaturef); if (defined $feature && $feature !~ /[\/\\]/i) { my $searched = $self->search_include_path($feature); $feature = $searched if (defined $searched); } my $fp = new FeatureParser($features, $gfeature, $typefeaturef, $feature); my $slo = $fp->get_value($static_libs_feature); if (!defined $slo) { my $sval = $self->get_static() || 0; $fp->parse_line(undef, $static_libs_feature . ' = ' . $sval); } return $fp; } sub restore_state_helper { my($self, $skey, $old, $new) = @_; if ($skey eq 'feature_file') { if ($self->{'features_changed'} || !(!defined $old && !defined $new || (defined $old && defined $new && $old eq $new))) { ## Create a new feature parser. This relies on the fact that ## 'features' is restored first in restore_state(). $self->{'feature_parser'} = $self->create_feature_parser( $self->get_features(), $new); $self->{'features_changed'} = undef; } } elsif ($skey eq 'ti') { my $lang = $self->get_language(); my @keys = keys %$old; @keys = keys %$new if (!defined $keys[0]); foreach my $key (@keys) { if (!defined $$old{$key} || !defined $$new{$key} || $$old{$key} ne $$new{$key}) { ## Clear out the template input reader that we're currently set ## to use. $self->{$key . '_template_input'}->{$lang}->{$tikey} = undef; } } } elsif ($skey eq 'features') { ## If the user has changed the 'features' setting, then we need to ## make sure that we create a new feature parser regardless of ## whether or not the feature file has changed. $self->{'features_changed'} = ("@$old" ne "@$new"); } elsif ($skey eq 'language') { if ($old ne $new) { $self->add_default_matching_assignments(); } } } sub get_initial_relative_values { return $_[0]->{'expanded'}, 1; } sub add_main_function { my $langmain = shift; ## See if a language was supplied. if ($langmain =~ /([^:]+):(.+)/) { ## If the language supplied is not one that we know about, return an ## error message. return 'Invalid language: ' . $1 if (!defined $language{$1}); ## Otherwise, add it to the list for the language. push(@{$mains{$1}}, $2); } else { ## No language was supplied, so add the main to all of the languages ## that we support. foreach my $lang (keys %language) { push(@{$mains{$lang}}, $langmain); } } ## Return no error message. return undef; } sub get_resource_tag { my $self = shift; my $lang = $self->get_language(); ## Not all entries in the %language map have a resource tag. ## For this, we will just return the tag for C++ since it probably ## doesn't really matter anyway. return defined $language{$lang}->[5] ? $language{$lang}->[5] : $cppresource; } sub find_command_helper { my($self, $tag) = @_; ## No tag results in no command helper return undef if (!defined $tag); ## See if we have a command helper for this tag my $ch = CommandHelper::get($tag); return $ch if (defined $ch); ## None for the base define custom, try again with the parent return $self->find_command_helper($self->{'define_custom_parent'}->{$tag}); } sub get_dependency_attribute { ## Return the dependency attribute specified as the first parameter to ## this method (not counting the ProjectCreator object). return $_[0]->{'dependency_attributes'}->{$_[1]}; } sub valid_project_name { #my($self, $name) = @_; return $_[1] !~ /[\/\\=\?:&"<>|#%]/; } sub append_flag_override { ## Append $value to the flag_overrides for <$tag, $input, $key> my $self = shift; my $tag = shift; my $key = shift; my $input = shift; my $value = shift; return if !defined $value || $value eq ''; my %join = ('postcommand' => ' ' . $self->{'command_subs'}->{'and'} . ' '); my $sep = ($join{$key}) ? $join{$key} : ' '; my $fo = $self->{'flag_overrides'}->{$tag}; $fo->{$input}->{$key} .= ($fo->{$input}->{$key} ? $sep : '') . $value; } # Some project types can't represent the same input file being used by # more than one custom type. This function will look for such cases and # combine them into a single invocation of a synthetic custom type that # inherits properties from both of them. # Project types needing this transformation should call this function from # their overridden pre_write_output_file() method. sub combine_custom_types { my $self = shift; my %input; # (input_file_name => [custom1_files, custom2_files], ...) my $fo = $self->{'flag_overrides'}; my %gendir; # (input_file_name => {directory => count}, ...) # Build the %input data structure as an index of how each input file is used. foreach my $tag (keys %{$self->{'generated_exts'}}) { foreach my $complist (values %{$self->{$tag}}) { foreach my $group (keys %$complist) { foreach my $in (@{$complist->{$group}}) { # only add to %input if some command would be run for this type my $ustyle = $in; $ustyle =~ s/\\/\//g if $self->{'convert_slashes'}; my $dir = $self->mpc_dirname($ustyle); my $of = (!defined $fo->{$tag} ? undef : (defined $fo->{$tag}->{$ustyle} ? $ustyle : (defined $fo->{$tag}->{$dir} ? $dir : undef))); if ($self->{'generated_exts'}->{$tag}->{'command'} || (defined $of && $fo->{$tag}->{$of}->{'command'})) { push(@{$input{$in}}, $tag); if (defined $fo->{$tag}->{$of}->{'gendir'}) { $gendir{$in}->{$fo->{$tag}->{$of}->{'gendir'}}++; } } } } } } # For each input file used in multiple custom types, move it into the new # synthetic type. foreach my $in (keys %input) { next if scalar @{$input{$in}} < 2; my $combo_tag = join('_and_', map {/(.+)_files$/; $1} @{$input{$in}}) . '_files'; if (!$self->{'combined_custom'}->{$combo_tag}) { $self->{'combined_custom'}->{$combo_tag} = $input{$in}; $self->process_assignment_add('custom_types', $combo_tag); my $ge = $self->{'generated_exts'}->{$combo_tag} = {}; my $combo_vc = $self->{'valid_components'}->{$combo_tag} = []; foreach my $tag (@{$input{$in}}) { StringProcessor::merge($combo_vc, $self->{'valid_components'}->{$tag}); if ($self->{'generated_exts'}->{$tag}->{'libpath'}) { $ge->{'libpath'} .= ($ge->{'libpath'} ? $self->{'command_subs'}->{'pathsep'} : '') . $self->{'generated_exts'}->{$tag}->{'libpath'}; } } $fo->{$combo_tag} = {}; my @keys = keys %custom; push(@keys, @default_matching_assignments); $self->{'matching_assignments'}->{$combo_tag} = \@keys; } my @gendir_keys = keys %{$gendir{$in}}; if ($#gendir_keys == 0) { $fo->{$combo_tag}->{$in}->{'gendir'} = $gendir_keys[0]; } # Add to new type -- groups aren't relevant here, so just use the default push(@{$self->{$combo_tag}->{'default'}->{'default_group'}}, $in); # Remove from existing types my $override_recurse = 0; foreach my $tag (@{$input{$in}}) { foreach my $complist (values %{$self->{$tag}}) { foreach my $group (keys %$complist) { foreach my $idx (0 .. $#{$complist->{$group}}) { if ($complist->{$group}->[$idx] eq $in) { splice(@{$complist->{$group}}, $idx, 1); } } } } if (defined $fo->{$tag} && defined $fo->{$tag}->{$in} && defined $fo->{$tag}->{$in} && $fo->{$tag}->{$in}->{'recurse'}) { ++$override_recurse; } foreach my $k ('dependent', 'dependent_libs', 'postcommand') { $self->append_flag_override($combo_tag, $k, $in, (defined $fo && defined $fo->{$k}) ? $fo->{$k} : $self->{'generated_exts'}->{$tag}->{$k}); } } # If all existing uses agree to recurse, the new type should recurse too if ($override_recurse == scalar @{$input{$in}}) { $fo->{$combo_tag}->{$in}->{'recurse'} = 1; } } return 1; } # ************************************************************ # Accessors used by support scripts # ************************************************************ sub getKeywords { return \%validNames; } sub getValidComponents { my $language = shift; return (defined $language{$language} ? $language{$language}->[0] : undef); } # ************************************************************ # Virtual Methods To Be Overridden # ************************************************************ sub get_builtin_output { #my($self, $input) = @_; return []; } sub languageSupported { #my $self = shift; return $_[0]->get_language() eq Creator::cplusplus; } sub file_visible { #my($self, $template) = @_; return 1; } sub webapp_supported { #my $self = shift; return 0; } sub use_win_compatibility_commands { #my $self = shift; return $ENV{MPC_USE_WIN_COMMANDS}; } sub post_file_creation { #my $self = shift; #my $file = shift; return undef; } sub escape_spaces { #my $self = shift; return 0; } sub validated_directory { my($self, $dir) = @_; return $dir; } sub get_quote_symbol { #my $self = shift; return '"'; } sub get_escaped_quote_symbol { #my $self = shift; return '\\\"'; } sub get_gt_symbol { #my $self = shift; return '>'; } sub get_lt_symbol { #my $self = shift; return '<'; } sub get_and_symbol { #my $self = shift; return '&&'; } sub get_or_symbol { #my $self = shift; return '||'; } sub get_cmdsep_symbol { #my $self = shift; return ';'; } sub dollar_special { #my $self = shift; return 0; } sub expand_variables_from_template_values { #my $self = shift; return 1; } sub require_dependencies { #my $self = shift; return 1; } sub dependency_is_filename { #my $self = shift; return 1; } sub fill_value { #my $self = shift; #my $name = shift; return undef; } sub project_file_prefix { #my $self = shift; return ''; } sub project_file_extension { #my $self = shift; return ''; } sub override_valid_component_extensions { #my $self = shift; #my $comp = shift; return undef; } sub override_exclude_component_extensions { #my $self = shift; #my $comp = shift; return undef; } sub get_dll_exe_template_input_file { #my($self, $tkey) = @_; return undef; } sub get_lib_exe_template_input_file { my($self, $tkey) = @_; return $self->get_dll_exe_template_input_file($tkey); } sub get_lib_template_input_file { my($self, $tkey) = @_; return $self->get_dll_template_input_file($tkey); } sub get_dll_template_input_file { #my($self, $tkey) = @_; return undef; } sub get_template { return $_[0]->{'pctype'}; } sub requires_forward_slashes { return 0; } sub warn_useless_project { return 1; } sub pre_write_output_file { return 1; } 1; ace-6.4.5+dfsg.orig/MPC/modules/MakeWorkspaceCreator.pm0000644000175000017500000000404613154167361020774 0ustar tggtggpackage MakeWorkspaceCreator; # ************************************************************ # Description : A Generic Workspace (Makefile) creator # Author : Chad Elliott # Create Date : 2/18/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use MakeProjectCreator; use MakeWorkspaceBase; use WorkspaceCreator; use vars qw(@ISA); @ISA = qw(MakeWorkspaceBase WorkspaceCreator); # ************************************************************ # Data Section # ************************************************************ my $targets = 'clean generated realclean check-syntax $(CUSTOM_TARGETS)'; # ************************************************************ # Subroutine Section # ************************************************************ sub write_project_targets { my($self, $fh, $crlf, $target, $list) = @_; ## Print out a make command for each project foreach my $project (@$list) { my $dname = $self->mpc_dirname($project); my $chdir = ($dname ne '.'); print $fh "\t\@", ($chdir ? "cd $dname && " : ''), "\$(MAKE) -f ", ($chdir ? $self->mpc_basename($project) : $project), " $target$crlf"; } } sub pre_workspace { my($self, $fh) = @_; $self->workspace_preamble($fh, $self->crlf(), 'Make Workspace', ''); } sub write_comps { my($self, $fh) = @_; my %targnum; my @list = $self->number_target_deps($self->get_projects(), $self->get_project_info(), \%targnum, 0); ## Send all the information to our base class method $self->write_named_targets($fh, $self->crlf(), \%targnum, \@list, ($self->languageIs(Creator::csharp) ? 'bundle ' : '') . $targets, '', '', $self->project_target_translation(1), 1); } 1; ace-6.4.5+dfsg.orig/MPC/modules/RpmSpecWorkspaceCreator.pm0000644000175000017500000003243613154167361021474 0ustar tggtggpackage RpmSpecWorkspaceCreator; # ************************************************************ # Description : An RPM .spec file Workspace Creator # Author : Adam Mitz (OCI) # Create Date : 11/23/2010 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use File::Path; use POSIX qw(strftime); use RpmSpecProjectCreator; use WorkspaceCreator; use vars qw(@ISA); @ISA = qw(WorkspaceCreator); # ************************************************************ # Data Section # ************************************************************ my $ext = '.spec'; # extension of files written by this WorkspaceCreator # ************************************************************ # Subroutine Section # ************************************************************ sub workspace_file_name { my $self = shift; return $self->get_modified_workspace_name($self->get_workspace_name(), $ext); } # Called by document_template.pl sub documentation_info { shift; #ignore package name my $keywords = shift; %$keywords = ('apply' => \&interpret_keyword, 'cond' => \&interpret_keyword); return '^sub get_template', '^EOT$'; } sub default_verbose_ordering { return 1; # Warn if there are missing dependencies. } # Called by document_template.pl sub interpret_keyword { my $vname = shift; $vname = (split /,/, $vname)[0]; return ($vname, $vname, $vname, undef); } # Don't actually write the .spec file for the workspace. Instead just invoke # the $func callback so that post_workspace() and other parts of the normal # workspace processing are called. We don't want a .spec file for each MPC # workspace because that is too course-grained. Instead, post_workspace() will # create one .spec for each aggregated workspace inside the primary workspace. # Using the workspace aggregation mechanism this way allows multiple .spec # files per workspace with MPC deriving their dependencies based on the # projects they contain. sub write_and_compare_file { my($self, $outdir, $oname, $func, @params) = @_; &$func($self, undef, @params); return 1; } sub rpmname { my($self, $mwc, $rpm2mwc, $check_unique) = @_; my $outfile = $mwc; $outfile =~ s/\.mwc$//i; $outfile = $self->get_modified_workspace_name($outfile, $ext, 1); my $base = $self->mpc_basename($outfile); $base =~ tr/-/_/; # - is special for RPM, we translate it to _ if ($check_unique && $rpm2mwc->{$base}) { die "ERROR: Can't create a duplicate RPM name: $base for mwc file $mwc\n" . "\tsee corresponding mwc file $rpm2mwc->{$base}\n"; } $rpm2mwc->{$base} = $mwc; return $base; } ## helper functions for the mini-template language sub mtl_cond { my($vars, $pre, $rep) = @_; my @v; return (@v = grep {$_} map {$rep->{lc $_}} split(' ', $vars)) ? "$pre@v" : ''; } sub mtl_apply { my($name, $subst, $rep) = @_; return join("\n", map {my $x = $subst; $x =~ s!\$_!$_!g; $x} split(' ', $rep->{lc $name})); } sub mtl_var { my($name, $default, $rep) = @_; return defined $rep->{lc $name} ? $rep->{lc $name} : (defined $default ? $default : ">>ERROR: no value for $name<<"); } ## end helper functions for the mini-template language sub post_workspace { my($self, $fh, $prjc) = @_; my $prjext = '\\' . # regexp escape for the dot that begins the extension $prjc->project_file_extension(); my %rpm2mwc; # rpm name (basename of spec file) => aggregated mwc w/ path my %mwc2rpm; # inverse of the above hash my %proj2rpm; # project name (output of mpc) => rpm name that it belongs to # first pass to build the hashes above foreach my $agg (keys %{$self->{'aggregated_mpc'}}) { my $rpm = $mwc2rpm{$agg} = $self->rpmname($agg, \%rpm2mwc, 1); foreach my $m (@{$self->{'aggregated_mpc'}->{$agg}}) { foreach my $p (@{$self->{'mpc_to_output'}->{$m}}) { $proj2rpm{$p} = $rpm; } } } if (0 == scalar keys %proj2rpm) { # nothing to generate (no aggregated workspaces) return; } my $outdir = $self->get_outdir(); my $now = strftime '%a %b %d %Y %H:%M:%S', localtime; my %assign = %{$self->get_assignment_hash()}; $assign{'rpm_description'} =~ s/\\n\s*/\n/g # Allow the description to span if exists $assign{'rpm_description'}; # multiple lines in the output map {$_ = $self->process_special($_)} values %assign; # determine when this addtemp processing should actually occur while (my($key, $arr) = each %{$self->get_addtemp()}) { foreach my $val (@$arr) { my $v = $val->[1]; $v =~ s/\\n\s*/\n/g if $key eq 'rpm_description'; $v = $self->process_special($v); $self->process_any_assignment(\%assign, $val->[0], $key, $v); } } foreach my $agg (keys %{$self->{'aggregated_mpc'}}) { my $name = "$outdir/$agg"; # $agg may contain directory parts my $dir = $self->mpc_dirname($name); my $base = $mwc2rpm{$agg}; my $rpm = $base; $rpm =~ s/$ext$//; $name = "$dir/$base"; mkpath($dir, 0, 0777) if ($dir ne '.'); my %rpm_requires; # keys are RPMs that this RPM depends on my @projects; foreach my $m (@{$self->{'aggregated_mpc'}->{$agg}}) { my $projdir = $self->mpc_dirname($m); foreach my $p (@{$self->{'mpc_to_output'}->{$m}}) { my $proj = $p; $proj =~ s/$prjext$//; push @projects, $proj; my $deps = $self->get_validated_ordering("$projdir/$p"); foreach my $d (@$deps) { my $rpmdep = $proj2rpm{$d}; if (defined $rpmdep && $rpmdep ne $base) { $rpm_requires{$rpmdep} = 1; } } } } # The hash %rep has replacement values for the template .spec file text, # those values come from a few different sources, starting with the # workspace-wide assignments, then let RPM-specific ones (from aggregated # workspaces) override those, and finally add the ones known by MPC. # process_special() handles quotes and escape characters. my %rep = %assign; while (my($key, $val) = each %{$self->{'aggregated_assign'}->{$agg}}) { $val =~ s/\\n\s*/\n/g if $key eq 'rpm_description'; $rep{$key} = $self->process_special($val); } $rep{'rpm_name'} = $rpm; $rep{'rpm_mpc_workspace'} = $self->mpc_basename($agg); $rep{'rpm_mpc_requires'} = join(' ', sort map {s/$ext$//; $_} keys %rpm_requires); my $fh = new FileHandle; open $fh, ">$name" or die "can't open $name"; my $t = get_template(); ## We have decided not to reuse the TemplateParser.pm, so this file has ## its own little template language which is a subset of that one. ## <%cond(var1 [var2...], prefix)%> ## Output the prefix text followed by the concatenated, space separated, ## values of the variables (var1, var2, etc) only if at least one of ## said values is non-empty. $t =~ s/<%cond\(([\w ]+), (.+)\)%>/mtl_cond($1, $2, \%rep)/ge; ## <%perl(expr)%> ## Evaluate an arbitrary perl expression, which can reference the normal ## variable replacements (see <%var%>, below) as $rep{'name'}. $t =~ s/<%perl\((.+)\)%>/join "\n", eval $1/ge; ## <%apply(listvar, text)%> ## Treat the value of variable 'listvar' as a list (splitting on spaces) ## and repeat the text for each element of the list, substituting $_ in ## the text with the current list element. $t =~ s/<%apply\((\w+), (.+)\)%>/mtl_apply($1, $2, \%rep)/ge; ## <%var(default)%> or <%var%> ## Output the value of variable 'var', either with a default value or an ## error if 'var' is unknown. If 'default' is enclosed in double-quotes, ## they are ignored (for compatibility with TemplateParser). $t =~ s/<%(\w+)(?:\("?([^)"]*)"?\))?%>/mtl_var($1, $2, \%rep)/ge; print $fh $t; # comment will go in the %changelog section of the .spec $self->print_workspace_comment($fh, map {$_ . "\n"} ( "* $now This file was generated by MPC.", ' Any changes made directly to this file will', ' be lost the next time it is generated.', ' MPC Command:', ' ' . $self->create_command_line_string($0, @ARGV))); close $fh; } # write the script to build .rpm files from .spec files my $fh = new FileHandle; my $name = $outdir . '/' . $self->{'workspace_name'} . '_rpm.sh'; open($fh, ">$name") or die "can't open $name"; print $fh "#!/bin/sh\n"; $self->print_workspace_comment($fh, map {$_ . "\n"} ( '# RPM creation script for MPC-generated .spec files.', "# $now", '# This file was generated by MPC. Any changes made directly to', '# this file will be lost the next time it is generated.', '# MPC Command:', '# ' . $self->create_command_line_string($0, @ARGV))); my $script = get_script(); my $temporary = $assign{'rpm_mpc_temp'}; $script =~ s!/tmp/mpcrpm!$temporary!g if defined $temporary; print $fh $script; my %seen; foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) { my $rpm = $proj2rpm{$self->mpc_basename($project)}; next if !defined $rpm; if (!$seen{$rpm}) { $seen{$rpm} = 1; my $dir = $self->mpc_dirname($rpm2mwc{$rpm}); $dir = ($dir eq '.' ? '' : "$dir/"); print $fh "build $dir$rpm\n"; } } close $fh; chmod 0755, $name; } sub get_template { return <<'EOT'; License: <%rpm_license("Freeware")%> Version: <%rpm_version%> Release: <%rpm_releasenumber%> Source: <%rpm_source_base("")%><%rpm_name%>.tar.gz Name: <%rpm_name%> Group: <%rpm_group%> Summary: <%rpm_summary%> <%cond(rpm_url, URL: )%> BuildRoot: %{_tmppath}/%{name}-%{version}-root Prefix: <%rpm_prefix("/usr")%> AutoReqProv: <%rpm_autorequiresprovides("no")%> <%cond(rpm_buildrequires, BuildRequires: )%> <%cond(rpm_mpc_requires rpm_requires, Requires: )%> <%cond(rpm_provides, Provides: )%> %description <%rpm_description%> %files -f %{_tmppath}/<%rpm_name%>.flist %defattr(-,root,root) %doc %config %pre <%rpm_pre_cmd()%> %post <%rpm_post_cmd()%> %preun <%rpm_preun_cmd()%> %postun <%rpm_postun_cmd()%> %prep %setup -n <%rpm_name%>-<%rpm_version%> %build <%apply(env_check, [ -z $$_ ] && echo Environment variable $_ is required. && exit 1)%> rm -rf $RPM_BUILD_ROOT <%prebuild()%> <%makefile_generator(mwc.pl -type gnuace)%> -base install -value_project libpaths+=<%rpm_mpc_temp(/tmp/mpcrpm)%>/inst/lib -value_project includes+=<%rpm_mpc_temp(/tmp/mpcrpm)%>/inst/include <%mkgen_args()%> <%rpm_mpc_workspace%> make <%makeflags()%> %install if [ "$RPM_BUILD_ROOT" = "/" ]; then echo "Build root of / is a bad idea. Bailing." exit 1 fi rm -rf $RPM_BUILD_ROOT export staging_dir=$RPM_BUILD_ROOT/install<%rpm_prefix("/usr")%> mkdir -p $staging_dir export pkg_dir=$RPM_BUILD_ROOT/<%rpm_name%>_dir mkdir -p $RPM_BUILD_ROOT/<%rpm_name%>_dir make INSTALL_PREFIX=${staging_dir} install if [ -d ${staging_dir}/share/man ]; then files=$(find ${staging_dir}/share/man -name '*.bz2') if [[ "${files}" ]]; then echo "${files}" | xargs bunzip2 -q; fi files=$(find ${staging_dir}/share/man -name '*.[0-9]') if [[ "${files}" ]]; then echo "${files}" | xargs gzip -9; fi fi cp -a $RPM_BUILD_ROOT/install/* ${pkg_dir} find ${pkg_dir} ! -type d | sed s^${pkg_dir}^^ | sed /^\s*$/d > %{_tmppath}/<%rpm_name%>.flist find ${pkg_dir} -type d | sed s^${pkg_dir}^^ | sed '\&^/usr$&d;\&^/usr/share/man&d;\&^/usr/games$&d;\&^/lib$&d;\&^/etc$&d;\&^/boot$&d;\&^/usr/bin$&d;\&^/usr/lib$&d;\&^/usr/share$&d;\&^/var$&d;\&^/var/lib$&d;\&^/var/spool$&d;\&^/var/cache$&d;\&^/var/lock$&d;\&^/tmp/apkg&d' | sed /^\s*$/d | sed 's&^&%dir &' >> %{_tmppath}/<%rpm_name%>.flist cp -a $RPM_BUILD_ROOT/*_dir/* $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT/*_dir rm -rf $RPM_BUILD_ROOT/install %clean make realclean find . -name '<%makefile_name_pattern(GNUmakefile*)%>' -o -name '.depend.*' | xargs rm -f %changelog EOT } sub get_script { return <<'EOT'; RPM_TOP=`rpmbuild --showrc | grep ': _topdir\b' | sed 's/^.*: _topdir\s*//' | perl -pe's/%{getenv:(\w+)}/$ENV{$1}/g'` START_DIR=`pwd` TMP_DIR=/tmp/mpcrpm DB_DIR=`rpmbuild --showrc | grep ': _dbpath\b' | sed 's/^.*: _dbpath\s*//' | perl -pe's/%\{(\w+)\}/$x = qx(rpmbuild --showrc | grep ": $1\\\b" | sed "s\/^.*: $1\\\s*\/\/"); chomp $x; $x/e'` RPM_ARCH=${1-`uname -m`} echo MPC RPM build script: output files will be placed in $RPM_TOP/RPMS [ -z $MPC_ROOT ] && echo ERROR: MPC_ROOT must be set && exit 1 rm -rf $TMP_DIR && mkdir $TMP_DIR && cp -a $DB_DIR $TMP_DIR/db || exit $? build () { [ ! -r $1 ] && echo ERROR: File not found $1 && exit 1 PKG_DIR=`dirname $1` PKG=`basename ${1%.spec}` cd $PKG_DIR VER=`grep ^Version: $PKG.spec | sed 's/^Version: //'` REL=`grep ^Release: $PKG.spec | sed 's/^Release: //'` echo Building source .tar.gz for $PKG version $VER release $REL rm -rf $TMP_DIR/$PKG-$VER $MPC_ROOT/clone_build_tree.pl -b $TMP_DIR $PKG-$VER > /dev/null cd $TMP_DIR tar chzf $RPM_TOP/SOURCES/$PKG.tar.gz $PKG-$VER && rm -rf $PKG-$VER cp $START_DIR/$PKG_DIR/$PKG.spec $RPM_TOP/SPECS echo Running rpmbuild on $PKG.spec for arch $RPM_ARCH, see rpm-$PKG.log for details rpmbuild -ba --target $RPM_ARCH $RPM_TOP/SPECS/$PKG.spec > $START_DIR/rpm-$PKG.log 2>&1 if [ $? != 0 ]; then echo rpmbuild of $PKG.spec failed. STOPPING. exit $? fi echo Installing $PKG to the temporary area rpm --ignorearch --dbpath $TMP_DIR/db --prefix $TMP_DIR/inst -iv $RPM_TOP/RPMS/$RPM_ARCH/$PKG-$VER-$REL.$RPM_ARCH.rpm || exit $? cd $START_DIR } EOT } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC12WorkspaceCreator.pm0000644000175000017500000000235013154167361020566 0ustar tggtggpackage VC12WorkspaceCreator; # ************************************************************ # Description : A VC12 Workspace Creator # Author : Johnny Willemsen # Create Date : 10/20/2012 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC12ProjectCreator; use VC11WorkspaceCreator; use vars qw(@ISA); @ISA = qw(VC11WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); print $fh '', $crlf, 'Microsoft Visual Studio Solution File, Format Version 12.00', $crlf; $self->print_workspace_comment($fh, '# Visual Studio 2013', $crlf, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, '#', $crlf, '# MPC Command:', $crlf, '# ', $self->create_command_line_string($0, @ARGV), $crlf); } 1; ace-6.4.5+dfsg.orig/MPC/modules/UVISProjectCreator.pm0000644000175000017500000000254213154167361020354 0ustar tggtggpackage UVISProjectCreator; # ************************************************************ # Description : The Keil uVision Project Creator # Author : Chad Elliott # Create Date : 11/1/2016 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ProjectCreator; use XMLProjectBase; use WinProjectBase; use vars qw(@ISA); @ISA = qw(XMLProjectBase WinProjectBase ProjectCreator); # ************************************************************ # Data Section # ************************************************************ my $tmpl = 'uvis'; # ************************************************************ # Subroutine Section # ************************************************************ sub compare_output { #my $self = shift; return 1; } sub dependency_is_filename { #my $self = shift; return 0; } sub project_file_extension { return '.uvprojx'; } sub get_lib_exe_template_input_file { return $tmpl; } sub get_lib_template_input_file { return $tmpl; } sub get_dll_exe_template_input_file { return $tmpl; } sub get_dll_template_input_file { return $tmpl; } sub get_template { return 'uvis.mpd'; } sub get_cmdsep_symbol { #my $self = shift; return '&'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/SLEWorkspaceCreator.pm0000644000175000017500000000260013154167361020534 0ustar tggtggpackage SLEWorkspaceCreator; # ************************************************************ # Description : The SLE Workspace Creator # Author : Johnny Willemsen # Create Date : 3/23/2004 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use SLEProjectCreator; use WorkspaceCreator; use vars qw(@ISA); @ISA = qw(WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub compare_output { #my $self = shift; return 1; } sub workspace_file_extension { #my $self = shift; return '.vpw'; } sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); print $fh "$crlf" . "$crlf"; } sub write_comps { my($self, $fh) = @_; my $crlf = $self->crlf(); print $fh "\t$crlf"; foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) { print $fh "\t\t$crlf"; } print $fh "\t$crlf"; } sub post_workspace { my($self, $fh) = @_; print $fh '' . $self->crlf(); } 1; ace-6.4.5+dfsg.orig/MPC/modules/DirectoryManager.pm0000644000175000017500000001206613154167361020160 0ustar tggtggpackage DirectoryManager; # ************************************************************ # Description : This module provides directory related methods # Author : Chad Elliott # Create Date : 5/13/2004 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use File::Spec; use File::Basename; # ************************************************************ # Data Section # ************************************************************ my $onVMS = ($^O eq 'VMS'); my $case_insensitive = File::Spec->case_tolerant(); my $cwd = Cwd::getcwd(); if ($^O eq 'cygwin' && $cwd !~ /[A-Za-z]:/) { my $cyg = `cygpath -w $cwd`; if (defined $cyg) { $cyg =~ s/\\/\//g; chop($cwd = $cyg); } $case_insensitive = 1; } elsif ($onVMS) { $cwd = VMS::Filespec::unixify($cwd); $cwd =~ s!/$!!g; } my $start = $cwd; # ************************************************************ # Subroutine Section # ************************************************************ sub cd { my($self, $dir) = @_; my $status = chdir($dir); if ($status && $dir ne '.') { ## First strip out any /./ or ./ or /. $dir =~ s/\/\.\//\//g; $dir =~ s/^\.\///; $dir =~ s/\/\.$//; ## If the new directory contains a relative directory ## then we just get the real working directory if (index($dir, '..') >= 0) { $cwd = Cwd::getcwd(); if ($^O eq 'cygwin' && $cwd !~ /[A-Za-z]:/) { ## We're using Cygwin perl, use cygpath to get the windows path ## and then fix up the slashes. my $cyg = `cygpath -w $cwd`; if (defined $cyg) { $cyg =~ s/\\/\//g; chop($cwd = $cyg); } } elsif ($onVMS) { ## On VMS, we need to get the UNIX style path and remove the ## trailing slash. $cwd = VMS::Filespec::unixify($cwd); $cwd =~ s!/$!!g; } } else { if ($dir =~ /^(\/|[a-z]:)/i) { ## It was a full path, just store it. $cwd = $dir; } else { ## This portion was relative, add it onto the current working ## directory. $cwd .= "/$dir"; } } } return $status; } sub getcwd { #my $self = shift; return $cwd; } sub getstartdir { #my $self = shift; return $start; } sub mpc_basename { #my $self = $_[0]; #my $file = $_[1]; return substr($_[1], rindex($_[1], '/') + 1); } sub mpc_dirname { my($self, $dir) = @_; ## The dirname() on VMS doesn't work as we expect it to. if ($onVMS) { ## If the directory contains multiple parts, we need to get the ## dirname in a UNIX style format and then remove the slash from the ## end. if (index($dir, '/') >= 0) { $dir = VMS::Filespec::unixify(dirname($dir)); $dir =~ s!/$!!g; return $dir; } else { ## There's no directory portion, so just return '.' return '.'; } } else { ## Get the directory portion of the original directory or file path. $dir = dirname($dir); ## If the result is just a drive specification, we need to append a ## slash to the end of the path so that cygwin perl can use this ## return value within a chdir() call. $dir .= '/' if ($dir =~ /^[a-z]:$/i); return $dir; } } sub mpc_glob { my($self, $pattern) = @_; ## glob() provided by OpenVMS does not understand [] within ## the pattern. So, we implement our own through recursive calls ## to mpc_glob(). if ($onVMS && $pattern =~ /(.*)\[([^\]]+)\](.*)/) { my @files; my($pre, $mid, $post) = ($1, $2, $3); for(my $i = 0; $i < length($mid); $i++) { StringProcessor::merge(\@files, [$self->mpc_glob($pre . substr($mid, $i, 1) . $post)]); } return @files; } ## Otherwise, we just return the globbed pattern. return glob($pattern); } sub onVMS { return $onVMS; } sub path_is_relative { ## To determine if the path is relative, we just determine if it is not ## an absolute path. #my($self, $path) = @_; return (index($_[1], '/') != 0 && $_[1] !~ /^[A-Z]:\//i); } # ************************************************************ # Virtual Methods To Be Overridden # ************************************************************ sub translate_directory { my($self, $dir) = @_; ## Remove the current working directory from $dir (if it is contained) my $cwd = $self->getcwd(); $cwd =~ s/\//\\/g if ($self->convert_slashes()); if (index($dir, $cwd) == 0) { my $cwdl = length($cwd); return '.' if (length($dir) == $cwdl); $dir = substr($dir, $cwdl + 1); } ## Translate .. to $dd if (index($dir, '..') >= 0) { my $dd = 'dotdot'; $dir =~ s/^\.\.([\/\\])/$dd$1/; $dir =~ s/([\/\\])\.\.$/$1$dd/; $dir =~ s/([\/\\])\.\.(?=[\/\\])/$1$dd$2/g; $dir =~ s/^\.\.$/$dd/; } return $dir; } sub convert_slashes { #my $self = shift; return 0; } sub case_insensitive { #my $self = shift; return $case_insensitive; } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC6ProjectCreator.pm0000644000175000017500000000316113154167361020162 0ustar tggtggpackage VC6ProjectCreator; # ************************************************************ # Description : A VC6 Project Creator # Author : Chad Elliott # Create Date : 3/14/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ProjectCreator; use VCProjectBase; use vars qw(@ISA); @ISA = qw(VCProjectBase ProjectCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub project_file_extension { #my $self = shift; return '.dsp'; } sub override_valid_component_extensions { my($self, $comp) = @_; ## Visual C++ 6.0 doesn't understand all of the extensions that MPC ## supports. if ($comp eq 'source_files' && $self->languageIs(Creator::cplusplus)) { return ["\\.cpp", "\\.cxx", "\\.c"]; } return undef; } sub override_exclude_component_extensions { my($self, $comp) = @_; ## Visual C++ 6.0 doesn't understand all of the extensions that MPC ## supports. if ($comp eq 'source_files' && $self->languageIs(Creator::cplusplus)) { return ["_T\\.cpp", "_T\\.cxx"]; } return undef; } sub get_dll_exe_template_input_file { #my $self = shift; return 'vc6dspdllexe'; } sub get_lib_exe_template_input_file { #my $self = shift; return 'vc6dsplibexe'; } sub get_lib_template_input_file { #my $self = shift; return 'vc6dsplib'; } sub get_dll_template_input_file { #my $self = shift; return 'vc6dspdll'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/WixProjectCreator.pm0000644000175000017500000001515613154167361020342 0ustar tggtggpackage WixProjectCreator; # ************************************************************ # Description : A Wix Project Creator # Author : James H. Hill / Charles Calkins # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ProjectCreator; use WinProjectBase; use XMLProjectBase; use GUID; use vars qw(@ISA); @ISA = qw(XMLProjectBase WinProjectBase ProjectCreator); # ************************************************************ # Data Section # ************************************************************ ## NOTE: We call the constant as a function to support Perl 5.6. my %info = (Creator::cplusplus() => {'ext' => '.wxi', 'dllexe' => 'wix', 'libexe' => 'wix', 'dll' => 'wix', 'lib' => 'wix', 'template' => 'wix', }, Creator::csharp() => {'ext' => '.wxi', 'dllexe' => 'wixcs', 'libexe' => 'wixcs', 'dll' => 'wixcs', 'lib' => 'wixcs', 'template' => 'wixcs', }, ); # ************************************************************ # Subroutine Section # ************************************************************ sub languageSupported { return defined $info{$_[0]->get_language()}; } sub convert_all_variables { return 1; } sub requires_forward_slashes { return 1; } sub expand_variables_from_template_values { return 1; } sub warn_useless_project { return 0; } sub convert_slashes { return 0; } sub is_culture_code { my $culture_code = shift; # from http://sharpertutorials.com/list-of-culture-codes/ my @culture_codes = ( 'af', 'hu-HU', 'af-ZA', 'is', 'sq', 'is-IS', 'sq-AL', 'id', 'ar', 'id-ID', 'ar-DZ', 'it', 'ar-BH', 'it-IT', 'ar-EG', 'it-CH', 'ar-IQ', 'ja', 'ar-JO', 'ja-JP', 'ar-KW', 'kn', 'ar-LB', 'kn-IN', 'ar-LY', 'kk', 'ar-MA', 'kk-KZ', 'ar-OM', 'kok', 'ar-QA', 'kok-IN', 'ar-SA', 'ko', 'ar-SY', 'ko-KR', 'ar-TN', 'ky', 'ar-AE', 'ky-KG', 'ar-YE', 'lv', 'hy', 'lv-LV', 'hy-AM', 'lt', 'az', 'lt-LT', 'az-AZ-Cyrl', 'mk', 'az-AZ-Latn', 'mk-MK', 'eu', 'ms', 'eu-ES', 'ms-BN', 'be', 'ms-MY', 'be-BY', 'mr', 'bg', 'mr-IN', 'bg-BG', 'mn', 'ca', 'mn-MN', 'ca-ES', 'no', 'zh-HK', 'nb-NO', 'zh-MO', 'nn-NO', 'zh-CN', 'pl', 'zh-CHS', 'pl-PL', 'zh-SG', 'pt', 'zh-TW', 'pt-BR', 'zh-CHT', 'pt-PT', 'hr', 'pa', 'hr-HR', 'pa-IN', 'cs', 'ro', 'cs-CZ', 'ro-RO', 'da', 'ru', 'da-DK', 'ru-RU', 'div', 'sa', 'div-MV', 'sa-IN', 'nl', 'sr-SP-Cyrl', 'nl-BE', 'sr-SP-Latn', 'nl-NL', 'sk', 'en', 'sk-SK', 'en-AU', 'sl', 'en-BZ', 'sl-SI', 'en-CA', 'es', 'en-CB', 'es-AR', 'en-IE', 'es-BO', 'en-JM', 'es-CL', 'en-NZ', 'es-CO', 'en-PH', 'es-CR', 'en-ZA', 'es-DO', 'en-TT', 'es-EC', 'en-GB', 'es-SV', 'en-US', 'es-GT', 'en-ZW', 'es-HN', 'et', 'es-MX', 'et-EE', 'es-NI', 'fo', 'es-PA', 'fo-FO', 'es-PY', 'fa', 'es-PE', 'fa-IR', 'es-PR', 'fi', 'es-ES', 'fi-FI', 'es-UY', 'fr', 'es-VE', 'fr-BE', 'sw', 'fr-CA', 'sw-KE', 'fr-FR', 'sv', 'fr-LU', 'sv-FI', 'fr-MC', 'sv-SE', 'fr-CH', 'syr', 'gl', 'syr-SY', 'gl-ES', 'ta', 'ka', 'ta-IN', 'ka-GE', 'tt', 'de', 'tt-RU', 'de-AT', 'te', 'de-DE', 'te-IN', 'de-LI', 'th', 'de-LU', 'th-TH', 'de-CH', 'tr', 'el', 'tr-TR', 'el-GR', 'uk', 'gu', 'uk-UA', 'gu-IN', 'ur', 'he', 'ur-PK', 'he-IL', 'uz', 'hi', 'uz-UZ-Cyrl', 'hi-IN', 'uz-UZ-Latn', 'hu', 'vi'); return 1 if (exists {map { $_ => 1 } @culture_codes}->{$culture_code}); return 0; } sub fill_value { my($self, $name) = @_; if ($name eq 'guid') { ## Return a repeatable GUID for use within the template. The values ## provided will be hashed and returned in a format expected by Wix. return GUID::generate($self->project_file_name(), $self->{'current_input'}, $self->getcwd()); } elsif ($name eq 'source_directory') { my $source; if ($self->get_assignment('sharedname')) { $source = $self->get_assignment('dllout'); if ($source eq '') { $source = $self->get_assignment('libout'); } } elsif ($self->get_assignment('staticname')) { $source = $self->get_assignment('libout'); } else { $source = $self->get_assignment('exeout'); } ## Check for a variable in the source directory. We have to make ## sure we transform this correctly for WIX by adding the correct ## prefix. Otherwise, WIX will complain. if (defined $source && $source =~ /.*?\$\((.+?)\).*/) { my $prefix; my $varname = $1; if ($ENV{$varname}) { $prefix = "env"; } else { $prefix = "var"; } ## Add the correct prefix to the variable. $source =~ s/$varname/$prefix.$varname/g; } return $source; } elsif ($name eq 'cultures') { my $crlf = $self->crlf(); # iterate over resx_files, make list of culture abbreviations my @resx_files = $self->get_component_list('resx_files'); my %cultures = (); foreach my $resx_file (@resx_files) { my @parts = split('\.', $resx_file); if ($parts[-1] eq 'resx') { # if the file is a .resx file if (is_culture_code($parts[-2])) { # if a culture is specified $cultures{$parts[-2]} = 1; # remember that culture } else { $cultures{'_neutral_'} = 1; # have a neutral culture } } } # flatten into a string my $found_cultures = ''; foreach my $culture (keys %cultures) { $found_cultures = $found_cultures . $culture . ' '; } return $found_cultures; } return undef; } sub get_info_hash { my($self, $key) = @_; ## If we have the setting in our information map, the use it. return $info{$key} if (defined $info{$key}); } sub project_file_extension { return $_[0]->get_info_hash($_[0]->get_language())->{'ext'}; } sub get_dll_exe_template_input_file { return $_[0]->get_info_hash($_[0]->get_language())->{'dllexe'}; } sub get_lib_exe_template_input_file { return $_[0]->get_info_hash($_[0]->get_language())->{'libexe'}; } sub get_dll_template_input_file { return $_[0]->get_info_hash($_[0]->get_language())->{'dll'}; } sub get_lib_template_input_file { return $_[0]->get_info_hash($_[0]->get_language())->{'lib'}; } sub get_template { return $_[0]->get_info_hash($_[0]->get_language())->{'template'}; } 1; ace-6.4.5+dfsg.orig/MPC/modules/StringProcessor.pm0000644000175000017500000000705013154167361020064 0ustar tggtggpackage StringProcessor; # ************************************************************ # Description : Perform various algorithms on strings # Author : Chad Elliott # Create Date : 3/07/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; # ************************************************************ # Subroutine Section # ************************************************************ sub parse_assignment { my($self, $line, $values) = @_; ## In MPC, a scope can have spaces in it. However, it can not end ## in a space. ## Line may have embedded new lines, so using 's' modifier. if ($line =~ /^((\w+[-\s\w]+\w::)*\w+)\s*([\-+]?=)\s*(.*)?/s) { my $op = ($3 eq '+=' ? 1 : $3 eq '-=' ? -1 : 0); push(@$values, $op, $self->resolve_alias(lc($1)), $4); return 1; } return 0; } sub extractType { my($self, $name) = @_; my $type = $name; if ($name =~ /(.*)(Project|Workspace)Creator/) { $type = $1; } return lc($type); } sub process_special { my($self, $line) = @_; ## Replace all escaped double quotes and escaped backslashes ## with special characters my $escaped = ($line =~ s/\\\\/\01/g); $escaped |= ($line =~ s/\\"/\02/g); ## Un-escape all other characters $line =~ s/\\(.)/$1/g; ## Remove any non-escaped double quotes $line =~ s/"//g; ## Put the escaped double quotes and backslashes back in if ($escaped) { $line =~ s/\02/"/g; $line =~ s/\01/\\/g; } return $line; } sub create_array { my($self, $line) = @_; my @array; ## Replace all escaped double and single quotes with special ## characters. We need to distinguish between doubly escaped quotes ## (<%equote%>) and escaped quotes (\"). We also need to retain the ## escaped escape characters. my $escaped = ($line =~ s/\\\\\"/\01/g); $escaped |= ($line =~ s/\\\'/\02/g); $escaped |= ($line =~ s/\\ /\03/g); $escaped |= ($line =~ s/\\\t/\04/g); $escaped |= ($line =~ s/\\\"/\05/g); $escaped |= ($line =~ s/\\\\/\06/g); foreach my $part (grep(!/^\s*$/, split(/(\"[^\"]+\"|\'[^\']+\'|\s+)/, $line))) { ## Remove enclosing double and single quotes $part =~ s/^"(.*)"$/$1/; $part =~ s/^'(.*)'$/$1/; ## Put any escaped escaped characters back into the string, but ## processed to take out one of the escape sequences. if ($escaped) { $part =~ s/\01/\\"/g; $part =~ s/\02/\'/g; $part =~ s/\03/ /g; $part =~ s/\04/\t/g; $part =~ s/\05/\"/g; $part =~ s/\06/\\/g; } ## Push it onto the array push(@array, $part); } return \@array; } sub crlf { #my $self = shift; return "\n"; } sub windows_crlf { ## Windows and cygwin require a carriage return and line feed. ## However, at some point cygwin changed the way it does output and can ## be controled through an environment variable. return ($^O eq 'MSWin32' || ($^O eq 'cygwin' && ($] < 5.008 || (defined $ENV{PERLIO} && $ENV{PERLIO} eq 'crlf'))) ? "\n" : "\r\n"); } sub resolve_alias { #my $self = shift; #my $name = shift; return $_[1]; } sub fgrep { my($str, $array) = @_; foreach my $target (@$array) { return 1 if ($str eq $target); } return undef; } sub merge { # Push each element of @$list on to @$into, unless it's already in @$into. my($into, $list) = @_; foreach my $in (@$list) { push(@$into, $in) if (!fgrep($in, $into)); } } 1; ace-6.4.5+dfsg.orig/MPC/modules/BorlandPropertyBase.pm0000644000175000017500000000163313154167361020640 0ustar tggtggpackage BorlandPropertyBase; # ************************************************************ # Description : A Borland base module for properties. # Author : Chad Elliott # Create Date : 5/5/2009 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use WinPropertyBase; our @ISA = qw(WinPropertyBase); # ************************************************************ # Subroutine Section # ************************************************************ sub get_properties { my $self = shift; ## Get the base class properties and add the properties that we ## support. my $props = $self->WinPropertyBase::get_properties(); ## All projects that use this base class are for Borland compilers. $$props{'borland'} = 1; return $props; } 1; ace-6.4.5+dfsg.orig/MPC/modules/CDT7ProjectCreator.pm0000644000175000017500000000244113154167361020265 0ustar tggtggpackage CDT7ProjectCreator; # ************************************************************ # Description : A CDT7 Project Creator (Eclipse 3.6) # Author : Adam Mitz, Object Computing, Inc. # Create Date : 10/04/2010 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use CDT6ProjectCreator; use vars qw(@ISA); @ISA = qw(CDT6ProjectCreator); # ************************************************************ # Data Section # ************************************************************ my %config = ('scanner_config_builder_triggers' => 'full,incremental,', 'additional_storage_modules' => 'org.eclipse.cdt.core.language.mapping ' . 'org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings', 'additional_error_parsers' => 'org.eclipse.cdt.core.GmakeErrorParser ' . 'org.eclipse.cdt.core.CWDLocator' ); # ************************************************************ # Subroutine Section # ************************************************************ sub get_configurable { my($self, $name) = @_; return $config{$name}; } 1; ace-6.4.5+dfsg.orig/MPC/modules/NMakeWorkspaceCreator.pm0000644000175000017500000000735313154167361021116 0ustar tggtggpackage NMakeWorkspaceCreator; # ************************************************************ # Description : A NMake Workspace (Makefile) creator # Author : Chad Elliott # Create Date : 6/10/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use NMakeProjectCreator; use MakeWorkspaceBase; use WinWorkspaceBase; use WorkspaceCreator; use VCPropertyBase; use vars qw(@ISA); @ISA = qw(MakeWorkspaceBase WinWorkspaceBase WorkspaceCreator VCPropertyBase); # ************************************************************ # Data Section # ************************************************************ my $targets = 'clean generated realclean $(CUSTOM_TARGETS)'; # ************************************************************ # Subroutine Section # ************************************************************ sub workspace_file_extension { #my $self = shift; return '.mak'; } sub pre_workspace { my($self, $fh) = @_; $self->workspace_preamble($fh, $self->crlf(), 'NMAKE Workspace', ''); } sub write_project_targets { my($self, $fh, $crlf, $target, $list) = @_; my $cwd = $self->getcwd(); ## Print out a make command for each project foreach my $project (@$list) { my $dir = $self->mpc_dirname($project); my $chdir = ($dir ne '.'); print $fh ($chdir ? "\t\@cd $dir$crlf\t\@echo Directory: $dir$crlf" : ''), "\t\@echo Project: ", $self->mpc_basename($project), $crlf, "\t\$(MAKE) /\$(MAKEFLAGS) /f ", $self->mpc_basename($project), " $target$crlf", ($chdir ? "\t\@cd \$(MAKEDIR)$crlf" : ''); } } sub write_comps { my($self, $fh, $gen) = @_; my %targnum; my $pjs = $self->get_project_info(); my @list = $self->number_target_deps($self->get_projects(), $pjs, \%targnum, 0); my $crlf = $self->crlf(); my $default = 'Win32 Debug'; ## Determine the default configuration. We want to get the Debug ## configuration (if available). It just so happens that Debug comes ## before Release so sorting the configurations works in our favor. foreach my $project (keys %$pjs) { my @cfgs = sort $gen->access_pi_values($pjs, $project, ProjectCreator::CONFIGURATIONS); if (defined $cfgs[0]) { $default = $cfgs[0]; ## The configuration comes out in the form that is usable to Visual ## Studio. We need it to be in the form that was chosen for the ## nmake configuration. So, we just swap the parts and remove the ## '|' character. $default =~ s/(.*)\|(.*)/$2 $1/; last; } } ## Print out the content print $fh '!IF "$(CFG)" == ""', $crlf, 'CFG=', $default, $crlf, '!MESSAGE No configuration specified. ', 'Defaulting to ', $default, '.', $crlf, '!ENDIF', $crlf, $crlf, '!IF "$(CUSTOM_TARGETS)" == ""', $crlf, 'CUSTOM_TARGETS=_EMPTY_TARGET_', $crlf, '!ENDIF', $crlf; ## Send all the information to our base class method $self->write_named_targets($fh, $crlf, \%targnum, \@list, $targets, 'CFG="$(CFG)" ', '', $self->project_target_translation()); } sub get_properties { my $self = shift; ## Create the map of properties that we support. my $props = {}; ## Merge in properties from all base projects foreach my $base (@ISA) { my $func = $base . '::get_properties'; my $p = $self->$func(); foreach my $key (keys %$p) { $$props{$key} = $$p{$key}; } } return $props; } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC14ProjectCreator.pm0000644000175000017500000000341313154167361020241 0ustar tggtggpackage VC14ProjectCreator; # ************************************************************ # Description : A vc14 (Visual Studio 2015) Project Creator # Author : Johnny Willemsen # Create Date : 6/04/2014 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC12ProjectCreator; use vars qw(@ISA); @ISA = qw(VC12ProjectCreator); ## NOTE: We call the constant as a function to support Perl 5.6. my %info = (Creator::cplusplus() => {'ext' => '.vcxproj', 'dllexe' => 'vc14exe', 'libexe' => 'vc14libexe', 'dll' => 'vc14dll', 'lib' => 'vc14lib', 'template' => [ 'vc10', 'vc10filters' ], }, ); my %config = ('vcversion' => '14.00', 'toolsversion' => '14.0', ); # ************************************************************ # Subroutine Section # ************************************************************ sub get_info_hash { my($self, $key) = @_; ## If we have the setting in our information map, then use it. return $info{$key} if (defined $info{$key}); ## Otherwise, see if our parent type can take care of it. return $self->SUPER::get_info_hash($key); } sub get_configurable { my($self, $name) = @_; ## If we have the setting in our config map, then use it. return $config{$name} if (defined $config{$name}); ## Otherwise, see if our parent type can take care of it. return $self->SUPER::get_configurable($name); } 1; ace-6.4.5+dfsg.orig/MPC/modules/MakeProjectBase.pm0000644000175000017500000000162313154167361017715 0ustar tggtggpackage MakeProjectBase; # ************************************************************ # Description : A Make Project base module # Author : Chad Elliott # Create Date : 1/4/2005 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use MakePropertyBase; use vars qw(@ISA); @ISA = qw(MakePropertyBase); # ************************************************************ # Subroutine Section # ************************************************************ sub get_builtin_output { #my($self, $input) = @_; return ['$@']; } sub dollar_special { #my $self = shift; return 1; } sub sort_files { #my $self = shift; return (defined $ENV{MPC_ALWAYS_SORT}); } sub project_file_prefix { #my $self = shift; return 'Makefile.'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC14WorkspaceCreator.pm0000644000175000017500000000237513154167361020577 0ustar tggtggpackage VC14WorkspaceCreator; # ************************************************************ # Description : A vc14 (Visual Studio 2015) Workspace Creator # Author : Johnny Willemsen # Create Date : 06/04/2014 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC14ProjectCreator; use VC12WorkspaceCreator; use vars qw(@ISA); @ISA = qw(VC12WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); print $fh '', $crlf, 'Microsoft Visual Studio Solution File, Format Version 12.00', $crlf; $self->print_workspace_comment($fh, '# Visual Studio 2015', $crlf, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, '#', $crlf, '# MPC Command:', $crlf, '# ', $self->create_command_line_string($0, @ARGV), $crlf); } 1; ace-6.4.5+dfsg.orig/MPC/modules/MakeProjectCreator.pm0000644000175000017500000000615213154167361020444 0ustar tggtggpackage MakeProjectCreator; # ************************************************************ # Description : A Generic Make Project Creator # Author : Chad Elliott # Create Date : 2/18/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use MakeProjectBase; use ProjectCreator; use vars qw(@ISA); @ISA = qw(MakeProjectBase ProjectCreator); # ************************************************************ # Data Section # ************************************************************ ## NOTE: We call the constant as a function to support Perl 5.6. my %info = (Creator::cplusplus() => {'dllexe' => 'makeexe', 'dll' => 'makedll', 'template' => 'make', }, Creator::csharp() => {'dllexe' => 'make.net', 'dll' => 'make.net', 'template' => 'make.net', }, Creator::java() => {'dllexe' => 'makeexe', 'dll' => 'makedll', 'template' => 'make', }, Creator::vb() => {'dllexe' => 'make.net', 'dll' => 'make.net', 'template' => 'make.net', }, ); # ************************************************************ # Subroutine Section # ************************************************************ sub languageSupported { return defined $info{$_[0]->get_language()}; } sub escape_spaces { #my $self = shift; return 1; } sub get_dll_exe_template_input_file { return $info{$_[0]->get_language()}->{'dllexe'}; } sub get_dll_template_input_file { return $info{$_[0]->get_language()}->{'dll'}; } sub get_template { return $info{$_[0]->get_language()}->{'template'}; } sub fill_value { my($self, $name) = @_; if ($name eq 'compilers') { ## The default compilers template variable value is determined by the ## language and directly corresponds to a group of settings in the ## .mpt file (make.net.mpt for csharp and makedll.mpt for all ## others). my $language = $self->get_language(); if ($language eq Creator::java) { return 'java'; } elsif ($language eq Creator::csharp) { return 'gmcs'; } else { return 'gcc'; } } elsif ($name eq 'language') { ## Allow the language to be available to the template. Certain ## things are not used in make.mpd when the language is java. return $self->get_language(); } elsif ($name eq 'main') { ## The main is needed when generating the makefiles for use with gcj. my @sources = $self->get_component_list('source_files', 1); my $exename = $self->find_main_file(\@sources); return $exename if (defined $exename); } return undef; } 1; ace-6.4.5+dfsg.orig/MPC/modules/OutputMessage.pm0000644000175000017500000000447313154167361017531 0ustar tggtggpackage OutputMessage; # ************************************************************ # Description : Prints information, warnings and errors. # Author : Chad Elliott # Create Date : 2/02/2004 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; # ************************************************************ # Data Section # ************************************************************ my $debugtag = 'DEBUG: '; my $infotag = 'INFORMATION: '; my $warntag = 'WARNING: '; my $errortag = 'ERROR: '; my $debug = 0; my $information = 0; my $warnings = 1; my $diagnostic = 1; my $details = 1; # ************************************************************ # Subroutine Section # ************************************************************ sub new { my $class = shift; return bless {}, $class; } sub set_levels { my $str = shift; if (defined $str) { $debug = ($str =~ /debug\s*=\s*(\d+)/i ? $1 : 0); $details = ($str =~ /detail(s)?\s*=\s*(\d+)/i ? $2 : 0); $diagnostic = ($str =~ /diag(nostic)?\s*=\s*(\d+)/i ? $2 : 0); $information = ($str =~ /info(rmation)?\s*=\s*(\d+)/i ? $2 : 0); $warnings = ($str =~ /warn(ing)?\s*=\s*(\d+)/i ? $2 : 0); } } ## Accessor for the debug setting. No parameters are necesary. sub get_debug_level { return $debug; } sub split_message { my($self, $msg, $spc) = @_; $msg =~ s/\n+/\n$spc/g; $msg =~ s/\.\s+/.\n$spc/g; return $msg . "\n"; } sub details { if ($details) { #my($self, $msg) = @_; print "$_[1]\n"; } } sub diagnostic { if ($diagnostic) { #my($self, $msg) = @_; print "$_[1]\n"; } } sub debug { if ($debug) { #my($self, $msg) = @_; print "$debugtag$_[1]\n"; } } sub information { if ($information) { #my($self, $msg) = @_; print $infotag, $_[0]->split_message($_[1], ' ' x length($infotag)); } } sub warning { if ($warnings) { #my($self, $msg) = @_; print $warntag, $_[0]->split_message($_[1], ' ' x length($warntag)); } } sub error { my($self, $msg, $pre) = @_; print STDERR '', (defined $pre ? "$pre\n" : ''), $errortag, $self->split_message($msg, ' ' x length($errortag)); } 1; ace-6.4.5+dfsg.orig/MPC/modules/NMakeProjectCreator.pm0000644000175000017500000000245713154167361020566 0ustar tggtggpackage NMakeProjectCreator; # ************************************************************ # Description : An NMake Project Creator # Author : Chad Elliott # Create Date : 5/31/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ProjectCreator; use WinProjectBase; use MakeProjectBase; use VCPropertyBase; use vars qw(@ISA); @ISA = qw(MakeProjectBase WinProjectBase ProjectCreator VCPropertyBase); # ************************************************************ # Subroutine Section # ************************************************************ sub project_file_extension { #my $self = shift; return '.mak'; } sub get_dll_exe_template_input_file { #my $self = shift; return 'nmakeexe'; } sub get_dll_template_input_file { #my $self = shift; return 'nmakedll'; } sub get_properties { my $self = shift; ## Create the map of properties that we support. my $props = {}; ## Merge in properties from all base projects foreach my $base (@ISA) { my $func = $base . '::get_properties'; my $p = $self->$func(); foreach my $key (keys %$p) { $$props{$key} = $$p{$key}; } } return $props; } 1; ace-6.4.5+dfsg.orig/MPC/modules/CDT6ProjectCreator.pm0000644000175000017500000000615713154167361020274 0ustar tggtggpackage CDT6ProjectCreator; # ************************************************************ # Description : Eclipse CDT 6 generator # Author : Chris Cleeland, Object Computing, Inc. # Create Date : 23-Apr-2010 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ProjectCreator; use vars qw(@ISA); @ISA = qw(ProjectCreator); # ************************************************************ # Data Section # ************************************************************ my %templates = ('cdt6project' => '.project', 'cdt6cproject' => '.cproject' ); my @tkeys = sort keys %templates; # ************************************************************ # Subroutine Section # ************************************************************ sub crlf { #my $self = shift; return "\n"; } sub project_file_name { my($self, $name, $template) = @_; ## Fill in the name and template if they weren't provided $name = $self->project_name() if (!defined $name); $template = 'cdt6project' if (!defined $template || !defined $templates{$template}); if ($self->{'make_coexistence'}) { return $self->get_modified_project_file_name("cdt_$name", '/' . $templates{$template}); } else { return $templates{$template}; } } sub fill_value { my($self, $name) = @_; if ($name eq 'platforms') { if (defined $ENV{'MPC_CDT_PLATFORMS'}) { return $ENV{'MPC_CDT_PLATFORMS'}; } elsif ($^O eq 'darwin') { return 'macosx'; } elsif ($^O eq 'MSWin32') { return 'win32'; } else { return $^O; # cygwin, solaris, linux match what we expect } } elsif ($name eq 'nocross') { # return the value of the 'nocross' element from the project_info array return $self->get_project_info()->[ProjectCreator::NO_CROSS_COMPILE]; } return $self->get_configurable($name); } sub get_configurable { #my($self, $name) = @_; return undef; } sub get_template { #my $self = shift; return @tkeys; } sub dependency_is_filename { #my $self = shift; return 0; } sub requires_forward_slashes { return 1; } sub file_visible { ## We only want the project file visible to the workspace creator. ## There can only be one and this is it. #my($self, $template) = @_; return $_[1] eq 'cdt6project'; } sub get_dll_exe_template_input_file { #my $self = shift; return 'cdt6exe'; } sub get_dll_template_input_file { #my $self = shift; #print "in get_dll_template_input_file\n"; return 'cdt6dll'; } sub get_lib_template_input_file { #my $self = shift; #print "in get_lib_template_input_file\n"; return 'cdt6lib'; } sub use_win_compatibility_commands { return (defined $ENV{'MPC_CDT_HOST_WIN32'}) ? $ENV{'MPC_CDT_HOST_WIN32'} : ($^O eq 'MSWin32' || $^O eq 'cygwin'); } sub pre_write_output_file { my $self = shift; if ($self->{'assign'}->{'custom_only'}) { return 1; } return $self->combine_custom_types(); } 1; ace-6.4.5+dfsg.orig/MPC/modules/WinVersionTranslator.pm0000644000175000017500000000376013154167361021077 0ustar tggtggpackage WinVersionTranslator; # ************************************************************ # Description : Translate the version value for Windows. # Windows can not handle letters in the version # and truncates anything after \d+\.\d+. We # will convert letters to numbers, retain # trailing numbers and everything else will be # converted to a zero. # # ex. 1.4.3 => 1.403 # 1.4a.5 => 1.4005 # 1.4b.4 => 1.4104 # # Author : Chad Elliott # Create Date : 10/7/2004 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; # ************************************************************ # Subroutine Section # ************************************************************ sub translate { my $version = shift; ## See if the version contains something other than numbers followed by ## a decimal point and numbers. if ($version =~ /^(\d+\.\d+)([^\d].*)$/) { $version = $1; my $post = $2; my $length = length($post); ## Convert the non-conforming value to all numbers for(my $i = 0; $i < $length; ++$i) { my $ch = substr($post, $i, 1); if ($ch =~ /[a-z]/i) { my $digit = ord(lc($ch)) - ord('a'); $version .= $digit; } elsif ($ch =~ /\d/) { $version .= $ch; } else { $version .= '0'; } } ## If we have a good version number we need to make sure that the ## minor version number does not exceed the value of a short unsigned ## integer. if ($version =~ /(\d+)\.(\d+)/) { my($major, $minor) = ($1, $2); $minor =~ s/^\d+\.//; while($minor > 65535) { $minor = substr($minor, 0, length($minor) - 1); } $version = $major . '.' . $minor; } } return $version; } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC8WorkspaceCreator.pm0000644000175000017500000002515113154167361020517 0ustar tggtggpackage VC8WorkspaceCreator; # ************************************************************ # Description : A VC8 Workspace Creator # Author : Johnny Willemsen # Create Date : 4/21/2004 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC8ProjectCreator; use VC71WorkspaceCreator; use vars qw(@ISA); @ISA = qw(VC71WorkspaceCreator); # ************************************************************ # Data Section # ************************************************************ ## NOTE: We call the constant as a function to support Perl 5.6. my %lang_map = (Creator::cplusplus() => 'Visual C#', Creator::csharp() => 'Visual C#', Creator::vb() => 'Visual Basic', Creator::java() => 'Visual J#'); # ************************************************************ # Subroutine Section # ************************************************************ sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); ## This identifies it as a Visual Studio 2005 file print $fh '', $crlf, 'Microsoft Visual Studio Solution File, Format Version 9.00', $crlf; ## Optionally print the workspace comment $self->print_workspace_comment($fh, '# Visual Studio 2005', $crlf, '# ', $crlf, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, '#', $crlf, '# MPC Command:', $crlf, '# ', $self->create_command_line_string($0, @ARGV), $crlf); } sub post_workspace { my($self, $fh, $creator) = @_; my $pjs = $self->get_project_info(); my @projects = $self->sort_dependencies($self->get_projects(), 0); my %gmap; ## Store a map of the project name to project guid and whether or not ## it is suitable to be referenced. Adding a reference to a ## non-managed c++ library or a "utility" project causes a warning in ## Visual Studio 2008 and higher. foreach my $project (@projects) { my($name, $guid, $lang, $custom_only, $managed) = $creator->access_pi_values($pjs, $project, ProjectCreator::PROJECT_NAME, ProjectCreator::PROJECT_GUID, ProjectCreator::LANGUAGE, ProjectCreator::CUSTOM_ONLY, ProjectCreator::MANAGED_PROJECT); $gmap{$name} = [$guid, !$custom_only && ($managed || $lang ne Creator::cplusplus)]; } ## Now go through the projects and check for the need to add external ## references. foreach my $project (@projects) { my $ph = new FileHandle(); my $outdir = $self->get_outdir(); my $cwd = $self->getcwd(); $outdir = $cwd if ($outdir eq '.'); my $full = $self->path_is_relative($project) ? "$outdir/$project" : $project; if (open($ph, $full)) { my $write; my @read; my $crlf = $self->crlf(); my $lang = $$pjs{$project}->[ProjectCreator::LANGUAGE]; my $managed = $$pjs{$project}->[ProjectCreator::MANAGED_PROJECT]; while(<$ph>) { ## This is a comment found in vc8.mpd if the project contains the ## 'after' keyword setting and the 'add_references' template ## variable setting. if (/^(\s*)get_validated_ordering($project); foreach my $dep (@$deps) { my $relative = $self->get_relative_dep_file($creator, $full, $dep); if (defined $relative) { $relative =~ s!/!\\!g; if ($lang eq Creator::cplusplus) { ## If the current project is not managed, then we will ## add references (although I doubt that will be useful). ## If the current project is managed, then the reference ## project must be managed or a non-c++ project. if (!$managed || ($managed && $gmap{$dep}->[1])) { ## See if the dependency has an associated attribute. ## If it does, split it into name value pairs for use in ## the resulting generated XML. my %attr; my $attr = $creator->get_dependency_attribute($dep); if (defined $attr) { foreach my $a (split(',', $attr)) { my @nvp = split('=', $a); $attr{lc($nvp[0])} = $nvp[1] if (defined $nvp[0] && defined $nvp[1]); } } push(@read, $self->cpp_proj_ref($spc, $gmap{$dep}->[0], \%attr, $relative)); } } ## This is a non-c++ language. So, it should not reference ## unmanaged c++ libraries. If it's a managed project or ## it's not a c++ project, it's ok to add a reference. elsif ($gmap{$dep}->[1]) { ## There are situations where, in C#, we want a dependency ## between projects but not want them linked together (via a ## ProjectReference). There is a build dependency, i.e., ## this project needs to be built if some other project is ## built. But, that's where the dependency ends. Setting ## the ProjectReference attribute to false allows us to do ## that. my $attr = $creator->get_dependency_attribute($dep); if (!defined $attr || $attr !~ /ProjectReference=false/i) { push(@read, $spc . '' . $crlf, $spc . ' {' . $gmap{$dep}->[0] . '}' . $crlf, $spc . ' ' . $dep . '' . $crlf, $spc . '' . $crlf); } } ## Indicate that we need to re-write the file $write = 1; } } last if (!$write); } else { push(@read, $_); } } close($ph); ## If we need to re-write the file, then do so if ($write && open($ph, ">$full")) { foreach my $line (@read) { print $ph $line; } close($ph); } } } } sub cpp_proj_ref { my ($self, $spc, $refguid, $attr, $relative) = @_; my $crlf = $self->crlf(); return $spc . '' . $crlf; } sub adjust_names { my($self, $name, $proj, $lang) = @_; ## For websites, the project needs to be the directory of the actual ## project file with a trailing slash. The name needs a trailing slash ## too. if ($lang eq Creator::website) { $proj = $self->mpc_dirname($proj); $proj .= '\\'; $name .= '\\' if $self->website_trailing_slash(); } ## This always needs to be a path with the Windows style directory ## separator. $proj =~ s/\//\\/g; return $name, $proj; } sub website_trailing_slash { return 1; } sub website_extra_props { } sub get_short_config_name { #my($self, $cfg) = @_; return $_[1]; } sub get_solution_config_section_name { #my $self = shift; return 'SolutionConfigurationPlatforms'; } sub get_project_config_section_name { #my $self = shift; return 'ProjectConfigurationPlatforms'; } sub print_additional_sections { my($self, $fh) = @_; my $crlf = $self->crlf(); print $fh "\tGlobalSection(SolutionProperties) = preSolution$crlf", "\t\tHideSolutionNode = FALSE$crlf", "\tEndGlobalSection$crlf"; } sub allow_empty_dependencies { #my $self = shift; return 0; } sub print_inner_project { my($self, $fh, $gen, $currguid, $deps, $name, $name_to_guid_map, $proj_language, $cfgs) = @_; ## We need to perform a lot of work, but only for websites. if ($proj_language eq Creator::website) { my $crlf = $self->crlf(); my $directory = ($name eq '.\\' ? $self->get_workspace_name() . '\\' : $name); ## We need the directory name with no trailing back-slash for use ## below. my $notrail = $directory; $notrail =~ s/\\$//; # Print the website project. print $fh "\tProjectSection(WebsiteProperties) = preProject", $crlf; $self->website_extra_props($fh); ## Print out the references my $references; foreach my $dep (@$deps) { if (defined $$name_to_guid_map{$dep}) { $references = "\t\t" . 'ProjectReferences = "' if (!defined $references); $references .= "{$$name_to_guid_map{$dep}}|$dep;"; } } print $fh $references, '"', $crlf if (defined $references); ## And now the configurations my %cfg_seen; foreach my $config (@$cfgs) { $config =~ s/\|.*//; if (!$cfg_seen{$config}) { print $fh "\t\t$config.AspNetCompiler.VirtualPath = \"/$notrail\"", $crlf, "\t\t$config.AspNetCompiler.PhysicalPath = \"$directory\"", $crlf, "\t\t$config.AspNetCompiler.TargetPath = \"PrecompiledWeb\\$directory\"", $crlf, "\t\t$config.AspNetCompiler.Updateable = \"true\"", $crlf, "\t\t$config.AspNetCompiler.ForceOverwrite = \"true\"", $crlf, "\t\t$config.AspNetCompiler.FixedNames = \"true\"", $crlf, "\t\t$config.AspNetCompiler.Debug = \"", ($config =~ /debug/i ? 'True' : 'False'), "\"", $crlf; $cfg_seen{$config} = 1; } } print $fh "\t\tVWDPort = \"1573\"", $crlf, "\t\tDefaultWebSiteLanguage = \"", $lang_map{$self->get_language()}, "\"", $crlf, "\tEndProjectSection", $crlf; } else { # We can ignore this project and pass it to the # SUPER since it's not a website. $self->SUPER::print_inner_project($fh, $gen, $currguid, $deps, $name, $name_to_guid_map); } } 1; ace-6.4.5+dfsg.orig/MPC/modules/HTMLWorkspaceCreator.pm0000644000175000017500000000526513154167361020667 0ustar tggtggpackage HTMLWorkspaceCreator; # ************************************************************ # Description : An html workspace creator # Author : Justin Michel # Create Date : 8/25/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use HTMLProjectCreator; use WorkspaceCreator; use vars qw(@ISA); @ISA = qw(WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub workspace_file_extension { #my $self = shift; return '_workspace.html'; } sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); ## Print the header print $fh '', $crlf, '', $crlf; ## Next, goes the workspace comment $self->print_workspace_comment($fh, '', $crlf, '', $crlf); ## Then, comes the title and the CSS settings. print $fh '', $crlf, '', $self->get_workspace_name(), '', $crlf, ' ', $crlf, '', $crlf, '', $crlf; } sub write_comps { my($self, $fh, $creator) = @_; my $crlf = $self->crlf(); ## Start the table for all of the projects print $fh "$crlf", "$crlf", "$crlf", "$crlf", "$crlf", "$crlf"; ## Sort the projects in build order instead of alphabetical order my $project_info = $self->get_project_info(); foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) { print $fh "$crlf"; } ## End the table print $fh "
Projects In Build Order
", $$project_info{$project}->[ProjectCreator::PROJECT_NAME], "
"; } sub post_workspace { my($self, $fh) = @_; print $fh "" . $self->crlf(); } 1; ace-6.4.5+dfsg.orig/MPC/modules/CCWorkspaceCreator.pm0000644000175000017500000000624013154167361020402 0ustar tggtggpackage CCWorkspaceCreator; # ************************************************************ # Description : A Code Composer Workspace creator # Author : Chad Elliott # Create Date : 9/18/2006 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use CCProjectCreator; use WinWorkspaceBase; use WorkspaceCreator; use vars qw(@ISA); @ISA = qw(WinWorkspaceBase WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub compare_output { #my $self = shift; return 1; } sub workspace_file_extension { #my $self = shift; return '.code_composer'; } sub write_comps { my($self, $fh, $creator) = @_; my $crlf = $self->crlf(); ## Workspace only consists of the name of the project. Really, Code ## Composer doesn't use a workspace. Each project contains the ## dependencies. foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) { print $fh "$project$crlf"; $self->add_dependencies($creator, $project); } } sub add_dependencies { my($self, $creator, $proj) = @_; my $fh = new FileHandle(); my $outdir = $self->get_outdir(); $outdir = $self->getcwd() if ($outdir eq '.'); if (open($fh, "$outdir/$proj")) { my @read; my $write; my $cwd = $self->getcwd(); while(<$fh>) { ## This is a comment found in cc.mpd if the project contains the ## 'after' keyword setting. if (/MPC\s+ADD\s+DEPENDENCIES/) { my @projs; my $crlf = $self->crlf(); my $deps = $self->get_validated_ordering($proj); foreach my $dep (@$deps) { my $relative = $self->get_relative_dep_file($creator, "$cwd/$proj", $dep); if (defined $relative) { if (!$write) { ## Indicate that we need to re-write the file and add in ## the start of the project dependencies section $write = 1; push(@read, "[Project Dependencies]$crlf"); } ## Add in the dependency and save the project name for later. push(@read, "Source=\"$relative\"$crlf"); push(@projs, $relative); } } if ($write) { ## Finish off the dependency information for the current ## project. push(@read, $crlf); foreach my $proj (@projs) { push(@read, "[\"$proj\" Settings]$crlf", "MatchConfigName=true$crlf", $crlf); } } else { ## We don't need to re-write the file, so we can stop reading ## it. last; } } else { ## Save the line to possibly be written out at the end. push(@read, $_); } } close($fh); ## If we need to re-write the file, then do so if ($write && open($fh, ">$outdir/$proj")) { foreach my $line (@read) { print $fh $line; } close($fh); } } } 1; ace-6.4.5+dfsg.orig/MPC/modules/ConfigParser.pm0000644000175000017500000000635113154167361017303 0ustar tggtggpackage ConfigParser; # ************************************************************ # Description : Reads a generic config file and store the values # Author : Chad Elliott # Create Date : 6/12/2006 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use Parser; use vars qw(@ISA); @ISA = qw(Parser); # ************************************************************ # Subroutine Section # ************************************************************ sub new { my($class, $valid) = @_; my $self = $class->SUPER::new(); ## Set up the internal data members $self->{'values'} = {}; $self->{'clean'} = {}; $self->{'valid'} = $valid; $self->{'warned'} = {}; return $self; } sub parse_line { my($self, $if, $line) = @_; my $error; if ($line eq '') { } elsif ($line =~ /^([^=]+)\s*=\s*(.*)$/) { ## Save the name, removing any trailing white space, and the value ## too. my $name = $1; my $clean = $2; ## Pre-process the name and value my $value = $self->preprocess($clean); $name = $self->preprocess($name); $name =~ s/\\/\//g; ## Store the name value pair if (!defined $self->{'valid'}) { ## There are no valid names, so all names are valid, except an ## empty name. if ($name ne '') { $self->{'values'}->{$name} = $value; $self->{'clean'}->{$name} = $clean; } } elsif (defined $self->{'valid'}->{lc($name)}) { ## This is a valid value, so we can store it. $self->{'values'}->{lc($name)} = $value; $self->{'clean'}->{lc($name)} = $clean; } else { $error = "Invalid keyword: $name"; } } else { $error = "Unrecognized line: $line"; } return (defined $error ? 0 : 1), $error; } sub get_names { my @names = keys %{$_[0]->{'values'}}; return \@names; } sub get_value { ## Try the tag first and if that doesn't work make it all lower-case. my($self, $tag) = @_; return $self->{'values'}->{$tag} || $self->{'values'}->{lc($tag)}; } sub get_unprocessed { ## Try the tag first and if that doesn't work make it all lower-case. my($self, $tag) = @_; return $self->{'clean'}->{$tag} || $self->{'clean'}->{lc($tag)}; } sub preprocess { my($self, $str) = @_; ## We need to replace $(...) with the equivalent environment variable ## value. while ($str =~ /\$(\?)?([\(\w\)]+)/) { my $optional = $1; my $name = $2; $name =~ s/[\(\)]//g; my $val = $ENV{$name}; if (!defined $val) { if (defined $optional) { $str =~ s/\$\?\S+//; next; } ## If the environment variable is not set, we will end up removing ## the reference, but we need to warn the user that we're doing so. $val = ''; if (!defined $self->{'warned'}->{$name}) { $self->diagnostic("$name was used in the configuration file, " . "but was not defined."); $self->{'warned'}->{$name} = 1; } } ## Do the replacement $str =~ s/\$\??([\(\w\)]+)/$val/; } ## Remove leading and trailing spaces $str =~ s/^\s+//; $str =~ s/\s+$//; return $str; } 1; ace-6.4.5+dfsg.orig/MPC/modules/WB30ProjectCreator.pm0000644000175000017500000000450713154167361020244 0ustar tggtggpackage WB30ProjectCreator; # ************************************************************ # Description : Wind River Workbench 3.0 generator # Author : Adam Mitz (Object Computing, Inc.) # Create Date : 07/21/2010 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use WB26ProjectCreator; use XMLProjectBase; use vars qw(@ISA); @ISA = qw(XMLProjectBase WB26ProjectCreator); # ************************************************************ # Data Section # ************************************************************ my %templates = ('wb26' => '.project', 'wb26wrproject' => '.wrproject', 'wb26wrmakefile' => '.wrmakefile', 'wb30cproject' => '.cproject'); my @tkeys = sort keys %templates; # ************************************************************ # Subroutine Section # ************************************************************ sub project_file_name { my($self, $name, $template) = @_; ## Fill in the name and template if they weren't provided $name = $self->project_name() if (!defined $name); $template = 'wb26' if (!defined $template || !defined $templates{$template}); if ($self->{'make_coexistence'}) { return $self->get_modified_project_file_name("wb_$name", '/' . $templates{$template}); } else { return $templates{$template}; } } sub post_file_creation { my($self, $file) = @_; if ($file =~ /$templates{'wb26wrmakefile'}$/) { my @lines; if (open(IN, $file)) { while() { s/\\"/\\"/g; s/"/"/g; s/>/>/g; s/</$file")) { print OUT @lines; close(OUT); } else { return "Can't open $file for post-processing output."; } } return undef; } sub get_template { #my $self = shift; return @tkeys; } sub get_dll_exe_template_input_file { #my $self = shift; return 'wb30exe'; } sub get_dll_template_input_file { #my $self = shift; return 'wb30dll'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/CCProjectCreator.pm0000644000175000017500000000224213154167361020050 0ustar tggtggpackage CCProjectCreator; # ************************************************************ # Description : A Code Composer Project Creator # Author : Chad Elliott # Create Date : 9/18/2006 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ProjectCreator; use WinProjectBase; use vars qw(@ISA); @ISA = qw(WinProjectBase ProjectCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub compare_output { #my $self = shift; return 1; } sub override_valid_component_extensions { my $self = shift; my $comp = shift; my @array = @_; if ($comp eq 'source_files' && $self->languageIs(Creator::cplusplus)) { push(@array, "\\.cdb"); } return \@array; } sub project_file_extension { #my $self = shift; return '.pjt'; } sub get_dll_exe_template_input_file { #my $self = shift; return 'ccexe'; } sub get_dll_template_input_file { #my $self = shift; return 'cclib'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/MWC.pm0000644000175000017500000000172613154167361015350 0ustar tggtggpackage MWC; # ****************************************************************** # Description : Instantiate a Driver and run it. This is here to # maintain backward compatibility. # Author : Chad Elliott # Create Date : 1/30/2004 # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** use strict; use Driver; # ************************************************************ # Subroutine Section # ************************************************************ sub new { my $class = shift; my $self = bless {'creators' => [], }, $class; return $self; } sub getCreatorList { return $_[0]->{'creators'}; } sub execute { my($self, $base, $name, $args) = @_; my $driver = new Driver($base, $name, @{$self->{'creators'}}); return $driver->run(@$args); } 1; ace-6.4.5+dfsg.orig/MPC/modules/Depgen/0000775000175000017500000000000013157240624015557 5ustar tggtggace-6.4.5+dfsg.orig/MPC/modules/Depgen/DependencyGenerator.pm0000644000175000017500000000411013154167361022037 0ustar tggtggpackage DependencyGenerator; # ************************************************************ # Description : Runs the correct dependency generator on the file. # Author : Chad Elliott # Create Date : 2/10/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use Preprocessor; use DependencyWriterFactory; use ObjectGeneratorFactory; # ************************************************************ # Subroutine Section # ************************************************************ sub new { my($class, $macros, $ipaths, $replace, $type, $noinline, $exclude) = @_; my $self = bless {'pre' => new Preprocessor($macros, $ipaths, $exclude), 'replace' => $replace, 'dwrite' => DependencyWriterFactory::create($type), 'objgen' => ObjectGeneratorFactory::create($type), 'noinline' => $noinline, }, $class; ## Set the current working directory, but ## escape regular expression special characters $self->{'cwd'} = Cwd::getcwd() . '/'; $self->{'cwd'} =~ s/([\+\-\\\$\[\]\(\)\.])/\\$1/g; ## Sort the replace keys to get the longest key first. This way ## when we are replacing portions of the file path, we replace the ## most we can. my @repkeys = sort { length($b) <=> length($a) } keys %$replace; $self->{'repkeys'} = \@repkeys; return $self; } sub process { my($self, $file) = @_; ## Generate the dependency string my $depstr = $self->{'dwrite'}->process( $self->{'objgen'}->process($file), $self->{'pre'}->process($file, $self->{'noinline'})); ## Perform the replacements on the dependency string $depstr =~ s/$self->{'cwd'}//go; my $replace = $self->{'replace'}; foreach my $rep (@{$self->{'repkeys'}}) { $depstr =~ s/$rep/$$replace{$rep}/g; } return $depstr; } 1; ace-6.4.5+dfsg.orig/MPC/modules/Depgen/MakeDependencyWriter.pm0000644000175000017500000000302313154167361022165 0ustar tggtggpackage MakeDependencyWriter; # ************************************************************ # Description : Generates generic Makefile dependencies. # Author : Chad Elliott # Create Date : 2/10/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use DependencyWriter; use vars qw(@ISA); @ISA = qw(DependencyWriter); # ************************************************************ # Subroutine Section # ************************************************************ sub new { my $self = DependencyWriter::new(@_); $self->{'cygwin'} = (defined $ENV{OS} && $ENV{OS} =~ /windows/i); if ($ENV{MPC_DEPGEN_EXCLUDE}) { $self->{exclude} = [split(' ', $ENV{MPC_DEPGEN_EXCLUDE})]; } return $self; } sub process { my($self, $target, $deps) = @_; if (exists $self->{exclude}) { for my $excl (@{$self->{exclude}}) { @$deps = grep {$_ !~ /$excl/} @$deps; } } ## Replace whitespace with escaped whitespace. map(s/(\s)/\\$1/g, @{$deps}); ## Replace : with /cygdrive/. The user may ## or may not be using Cygwin, but leaving the colon in there will ## cause make to fail catastrophically on the next invocation. map(s/([A-Z]):/\/cygdrive\/$1/gi, @{$deps}) if ($self->{'cygwin'}); ## Sort the dependencies to make them reproducible. return "@{$target}: \\\n " . join(" \\\n ", sort @{$deps}) . "\n"; } 1; ace-6.4.5+dfsg.orig/MPC/modules/Depgen/Preprocessor.pm0000644000175000017500000001040713154167361020606 0ustar tggtggpackage Preprocessor; # ************************************************************ # Description : Preprocesses the supplied file. # Author : Chad Elliott # Create Date : 2/10/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use FileHandle; use File::Basename; # ************************************************************ # Subroutine Section # ************************************************************ sub new { my($class, $macros, $ipaths, $exclude) = @_; return bless {'macros' => $macros, 'ipaths' => $ipaths, 'exclude' => $exclude, 'files' => {}, 'ifound' => {}, 'recurse' => 0, }, $class; } sub process { my($self, $file, $noinline, $noincs) = @_; my $fh = new FileHandle(); ## Open the file, but if we can't we'll just silently ignore it. if (open($fh, $file)) { my @zero; my $ifcount = 0; my $files = $self->{'files'}; my $dir = dirname($file); ## We only need to keep track of recursion inside this block my $recurse = ++$self->{'recurse'}; $$files{$file} = []; while(<$fh>) { ## As an optimization, use a very simple regular expression on the ## outside that all of the inner regular expressions have in ## common. That way we go down the path of if elsif only if it is ## even possible due to the outside regular expression. ## index() is faster than a regular expression, so use index first. next if (index($_, '#') == -1 || not /^\s*#/); ## Remove same line c comments (no need to worry about c++ ## comments due to the regular expressions) inside this if statement. ## This saves about 5% off of processing the ace directory ## and we only need to strip comments if we are actually ## going to look at the string. $_ =~ s/\/\*.*\*\///o; if (/^\s*#\s*endif/) { --$ifcount; if (defined $zero[0] && $ifcount == $zero[$#zero]) { pop(@zero); } } elsif (/^\s*#\s*if\s+0/) { push(@zero, $ifcount); ++$ifcount; } elsif (/^\s*#\s*if/) { ++$ifcount; } elsif (!defined $zero[0] && /^\s*#\s*include\s+[<"]([^">]+)[">]/o) { ## Locate the include file my $inc; if (exists $self->{'ifound'}->{$dir} && exists $self->{'ifound'}->{$dir}->{$1}) { $inc = $self->{'ifound'}->{$dir}->{$1}; } else { foreach my $dirp (@{$self->{'ipaths'}}) { if (-r "$dirp/$1") { $inc = "$dirp/$1"; last; } } if (!defined $inc) { ## If the file we're currently looking at contains a ## directory name then, we need to look for include ## files in that directory. if (-r "$dir/$1") { $inc = "$dir/$1"; } } $self->{'ifound'}->{$dir}->{$1} = $inc; } ## If we've found the include file, then process it too. next if (not defined $inc); $inc =~ s/\\/\//go; if (!$noinline || ($recurse == 1 || $inc !~ /\.i(nl)?$/o)) { push(@{$$files{$file}}, $inc); if (!defined $$files{$inc}) { ## Process this file, but do not return the include files if (!defined $self->{'exclude'}->{substr($inc, rindex($inc, '/') + 1)}) { $self->process($inc, $noinline, 1); } } } } } close($fh); ## We only need to keep track of recursion inside this block --$self->{'recurse'}; } ## This has to be outside the if (open(... ## If the last file to be processed isn't accessable then ## we still need to return the array reference of includes. if (!$noincs) { my @files = ($file); my %ifiles; foreach my $processed (@files) { foreach my $inc (@{$self->{'files'}->{$processed}}) { if (!defined $ifiles{$inc}) { $ifiles{$inc} = 1; push(@files, $inc); } } } shift(@files); return \@files; } } 1; ace-6.4.5+dfsg.orig/MPC/modules/Depgen/ObjectGenerator.pm0000644000175000017500000000123213154167361021171 0ustar tggtggpackage ObjectGenerator; # ************************************************************ # Description : Base class for all Object Generators. # Author : Chad Elliott # Create Date : 5/23/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; # ************************************************************ # Subroutine Section # ************************************************************ sub new { return bless {}, $_[0]; } sub process { #my($self, $file) = @_; return []; } 1; ace-6.4.5+dfsg.orig/MPC/modules/Depgen/DependencyWriterFactory.pm0000644000175000017500000000172113154167361022722 0ustar tggtggpackage DependencyWriterFactory; # ************************************************************ # Description : Create DependencyWriter objects. # Author : Chad Elliott # Create Date : 5/23/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use DependencyWriter; # ************************************************************ # Data Section # ************************************************************ my $writers = {}; # ************************************************************ # Subroutine Section # ************************************************************ sub register { $writers = shift; } sub create { return $$writers{$_[0]}->new() if (defined $$writers{$_[0]}); print STDERR "WARNING: Invalid dependency writer type: $_[0]\n"; return new DependencyWriter(); } 1; ace-6.4.5+dfsg.orig/MPC/modules/Depgen/DependencyEditor.pm0000644000175000017500000000706213154167361021350 0ustar tggtggpackage DependencyEditor; # ************************************************************ # Description : Edits existing dependencies. # Author : Chad Elliott # Create Date : 2/10/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use FileHandle; use DependencyGenerator; # ************************************************************ # Subroutine Section # ************************************************************ sub new { return bless {}, $_[0]; } sub process { my($self, $output, $type, $noinline, $macros, $ipaths, $replace, $exclude, $files, $append) = @_; ## Back up the original file and receive the contents my $contents; if (-s $output) { $contents = []; if (!$self->backup($output, $contents, $append)) { print STDERR "ERROR: Unable to backup $output\n"; return 1; } } ## Write out the contents of the file my $fh = new FileHandle(); if (open($fh, ">$output")) { if (defined $contents) { foreach my $line (@$contents) { print $fh $line; } } if (!$append) { ## Write out the new dependency marker print $fh "# DO NOT DELETE THIS LINE -- depgen.pl uses it.\n", "# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.\n\n"; } else { ## Write start append comment print $fh "# DO NOT DELETE THIS LINE -- depgen.pl appended ", "the following.\n", "# APPENDED DEPENDENCY RULES " , "by depgen.pl.\n\n"; } ## Generate the new dependencies and write them to the file my $dep = new DependencyGenerator($macros, $ipaths, $replace, $type, $noinline, $exclude); ## Sort the files so the dependencies are reproducible foreach my $file (sort @$files) { ## In some situations we may be passed a directory as part of an ## option. If it is an unknown option, we may think the directory ## needs to be part of the dependencies when it should not. print $fh $dep->process($file), "\n" if (!-d $file); } ## Write out the end of the block warning print $fh "# IF YOU PUT ANYTHING HERE IT WILL GO AWAY\n"; close($fh); } else { print STDERR "ERROR: Unable to open $output for output\n"; return 1; } return 0; } sub backup { my($self, $source, $contents, $append) = @_; my $status; my $fh = new FileHandle(); my $backup = "$source.bak"; ## Back up the file. While doing so, keep track of the contents of the ## file and keep everything except the old dependencies or keep ## everything if appending. my $search_string; if (!$append) { $search_string = 'DO NOT DELETE'; } else { $search_string = 'IF YOU PUT ANYTHING HERE IT WILL GO AWAY'; } if (open($fh, $source)) { my $oh = new FileHandle(); if (open($oh, ">$backup")) { my $record = 1; $status = 1; while(<$fh>) { print $oh $_; if ($record) { if (index($_, $search_string) >= 0) { $record = undef; } else { push(@$contents, $_); } } } close($oh); ## Set file permission so that the backup has the same permissions ## as the original file. my @buf = stat($source); if (defined $buf[8] && defined $buf[9]) { utime($buf[8], $buf[9], $backup); } } close($fh); } return $status; } 1; ace-6.4.5+dfsg.orig/MPC/modules/Depgen/DependencyWriter.pm0000644000175000017500000000124713154167361021375 0ustar tggtggpackage DependencyWriter; # ************************************************************ # Description : Base class for all Dependency Writers. # Author : Chad Elliott # Create Date : 2/10/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; # ************************************************************ # Subroutine Section # ************************************************************ sub new { return bless {}, $_[0]; } sub process { #my($self, $objects, $files) = @_; return ''; } 1; ace-6.4.5+dfsg.orig/MPC/modules/Depgen/Driver.pm0000644000175000017500000001637213154167361017362 0ustar tggtggpackage Driver; # ************************************************************ # Description : Generate dependencies for Make and NMake. # Author : Chad Elliott # Create Date : 3/21/2007 # ************************************************************ # ************************************************************ # Pragma Section # ************************************************************ use strict; use File::Basename; use DependencyEditor; # ************************************************************ # Data Section # ************************************************************ my $version = '1.2'; my $os = ($^O eq 'MSWin32' ? 'Windows' : 'UNIX'); my %types; my %defaults = ('UNIX' => 'make', 'Windows' => 'nmake', ); # ************************************************************ # Subroutine Section # ************************************************************ sub BEGIN { my $fh = new FileHandle(); my(%writers, %generators); ## Find all the dependency writers and object generators foreach my $dir (@INC) { if (opendir($fh, $dir)) { foreach my $module (readdir($fh)) { if ($module =~ /(.+)DependencyWriter\.pm$/) { my $type = lc($1); my $class = $module; $class =~ s/\.pm$//; require $module; $writers{$type} = $class; $types{$type} = 1; } elsif ($module =~ /(.+)ObjectGenerator\.pm$/) { my $type = lc($1); my $class = $module; $class =~ s/\.pm$//; require $module; $generators{$type} = $class; } } closedir($fh); } } ## Register them with the right factory DependencyWriterFactory::register(\%writers); ObjectGeneratorFactory::register(\%generators); } sub new { my $class = shift; my $self = bless {'automatic' => [], }, $class; foreach my $add (@_) { if ($add =~ /(UNIX|Windows)=(.*)/) { $defaults{$1} = $2; } elsif ($add =~ /automatic=(.*)/) { my @auto = split(/,/, $1); $self->{'automatic'} = \@auto; } else { print "WARNING: Unknown parameter: $add\n"; } } return $self; } sub usageAndExit { my($self, $opt) = @_; my $base = basename($0); if (defined $opt) { print "$opt.\n"; } print "$base v$version\n" . "Usage: $base [-D[=VALUE]] [-I] ", (defined $self->{'automatic'}->[0] ? "[-A] " : ''), "[-R ]\n" . " " . (" " x length($base)) . " [-e ] [-f ] [-g] [-i] [-t ] [-n]\n" . " " . (" " x length($base)) . " \n" . "\n"; if (defined $self->{'automatic'}->[0]) { print "-A Replace paths equal to the following variables with ", "the corresponding \$()\n value: ", join(', ', @{$self->{'automatic'}}), ".\n"; } print "-D This option sets a macro to an optional value.\n" . "-I The -I option adds an include directory.\n" . "-R Replace \$VARNAME paths with \$(VARNAME).\n" . "-a Append to existing dependencies." . (exists $types{'gnuidl'} ? ' Useful with -t gnuidl.' : '') . "\n" . "-e Exclude dependencies generated by , but not " . "itself.\n" . "-f Specifies the output file. This file will be edited if it " . "already\n exists.\n" . "-g Do not create Cygwin paths when on Windows.\n" . "-i Do not print an error if no source files are provided.\n" . "-n Do not include inline files (ending in .i or .inl) in the " . "dependencies.\n" . "-t Use specified type ("; my @keys = sort keys %types; for(my $i = 0; $i <= $#keys; ++$i) { print "$keys[$i]" . ($i != $#keys ? $i == $#keys - 1 ? ' or ' : ', ' : '');; } print ") instead of the default.\n" . " The default is "; @keys = sort keys %defaults; for(my $i = 0; $i <= $#keys; ++$i) { my $def = $keys[$i]; print $defaults{$def} . " on $def" . ($i != $#keys ? $i == $#keys - 1 ? ' and ' : ', ' : ''); } print ".\n"; exit(0); } sub setReplace { my($self, $replace, $name, $value) = @_; if (defined $name) { ## The key will be used in a regular expression. ## So, we need to escape some special characters. $name = File::Spec->canonpath($name); $name =~ s/([\+\-\\\$\[\]\(\)\.])/\\$1/g; $$replace{$name} = $value; } } sub run { my($self, $args) = @_; my $argc = scalar(@$args); my $type = $defaults{$os}; my $output = '-'; my $needsrc = 1; my($noinline, @files, %macros, @ipaths, %replace, %exclude, $append); for(my $i = 0; $i < $argc; ++$i) { my $arg = $$args[$i]; if ($arg =~ /^\-D(\w+)(=(.*))?/) { $macros{$1} = $3; } elsif ($arg =~ /^\-(I|isystem)(.*)/) { # support '-Idir' and '-I dir' my $opt = $1; if ('' ne $2) { push(@ipaths, File::Spec->canonpath($2)); } else { # get next arg if (++$i < $argc) { $arg = $$args[$i]; if ($arg =~ /^\-/) { $self->usageAndExit('Invalid use of -' . $opt); } push(@ipaths, File::Spec->canonpath($arg)); } else { $self->usageAndExit('Invalid use of -' . $opt); } } } elsif ($arg eq '-A') { foreach my $auto (@{$self->{'automatic'}}) { $self->setReplace(\%replace, $ENV{$auto}, '$(' . $auto . ')'); } } elsif ($arg eq '-R') { ++$i; $arg = $$args[$i]; if (defined $arg) { my $val = $ENV{$arg}; if (defined $val) { $self->setReplace(\%replace, $val, "\$($arg)"); } } else { $self->usageAndExit('Invalid use of -R'); } } elsif ($arg eq '-e') { ++$i; $arg = $$args[$i]; if (defined $arg) { $exclude{$arg} = 1; } else { $self->usageAndExit('Invalid use of -e'); } } elsif ($arg eq '-f') { ++$i; $arg = $$args[$i]; if (defined $arg) { $output = $arg; } else { $self->usageAndExit('Invalid use of -f'); } } elsif ($arg eq '-g') { ## By default, on Windows, we assume Cygwin and create paths with ## /cygdrive. Some users have a non-Cygwin make and need paths with ## drive letters. delete $ENV{OS}; } elsif ($arg eq '-a') { $append = 1; } elsif ($arg eq '-i') { $needsrc = undef; } elsif ($arg eq '-n') { $noinline = 1; } elsif ($arg eq '-h') { $self->usageAndExit(); } elsif ($arg eq '-t') { ++$i; $arg = $$args[$i]; if (defined $arg && defined $types{$arg}) { $type = $arg; } else { $self->usageAndExit('Invalid use of -t'); } } elsif ($arg =~ /^[\-+]/) { ## We will ignore unknown options ## Some options for aCC start with + } else { push(@files, $arg); } } if (!defined $files[0]) { if ($needsrc) { $self->usageAndExit('No files specified'); } } my $editor = new DependencyEditor(); return $editor->process($output, $type, $noinline, \%macros, \@ipaths, \%replace, \%exclude, \@files, $append); } ace-6.4.5+dfsg.orig/MPC/modules/Depgen/NMakeObjectGenerator.pm0000644000175000017500000000216513154167361022113 0ustar tggtgg# ************************************************************ # Description : Generates object files for NMake Makefiles. # Author : Chad Elliott # Create Date : 5/23/2003 # ************************************************************ package WinProjectBaseEx; use WinProjectBase; use DirectoryManager; use vars qw(@ISA); @ISA = qw(WinProjectBase DirectoryManager); sub new { return bless {}, $_[0]; } 1; package NMakeObjectGenerator; # ************************************************************ # Pragmas # ************************************************************ use strict; use ObjectGenerator; use vars qw(@ISA); @ISA = qw(ObjectGenerator); # ************************************************************ # Data Section # ************************************************************ my $wpb = new WinProjectBaseEx(); # ************************************************************ # Subroutine Section # ************************************************************ sub process { my $noext = $wpb->translate_directory($_[1]); $noext =~ s/\.[^\.]+$//o; return [ "\"\$(INTDIR)\\$noext.obj\"" ]; } 1; ace-6.4.5+dfsg.orig/MPC/modules/Depgen/ObjectGeneratorFactory.pm0000644000175000017500000000173013154167361022524 0ustar tggtggpackage ObjectGeneratorFactory; # ************************************************************ # Description : Create ObjectGenerator objects. # Author : Chad Elliott # Create Date : 5/23/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ObjectGenerator; # ************************************************************ # Data Section # ************************************************************ my $generators = {}; # ************************************************************ # Subroutine Section # ************************************************************ sub register { $generators = shift; } sub create { return $$generators{$_[0]}->new() if (defined $$generators{$_[0]}); print STDERR "WARNING: Invalid object generator type: $_[0]\n"; return new ObjectGenerator(); } 1; ace-6.4.5+dfsg.orig/MPC/modules/Depgen/MakeObjectGenerator.pm0000644000175000017500000000216113154167361021771 0ustar tggtggpackage MakeObjectGenerator; # ************************************************************ # Description : Generates object files for generic Makefiles. # Author : Chad Elliott # Create Date : 5/23/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ObjectGenerator; use DirectoryManager; use vars qw(@ISA); @ISA = qw(ObjectGenerator); my $dm = bless {}, 'DirectoryManager'; # ************************************************************ # Subroutine Section # ************************************************************ sub process { my $noext = $dm->translate_directory($_[1]); my @exts = ('o'); my @dirs = (defined $ENV{VDIR} ? $ENV{VDIR} : ''); $noext =~ s/\.[^\.]+$//o; push(@exts, $ENV{SOEXT}) if (defined $ENV{SOEXT}); push(@dirs, $ENV{VSHDIR}) if (defined $ENV{VSHDIR}); my @objects; foreach my $dirs (@dirs) { foreach my $ext (@exts) { push(@objects, "$dirs$noext.$ext"); } } return \@objects; } 1; ace-6.4.5+dfsg.orig/MPC/modules/Depgen/NMakeDependencyWriter.pm0000644000175000017500000000216213154167361022306 0ustar tggtggpackage NMakeDependencyWriter; # ************************************************************ # Description : Generates NMake dependencies. # Author : Chad Elliott # Create Date : 2/10/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use DependencyWriter; use vars qw(@ISA); @ISA = qw(DependencyWriter); # ************************************************************ # Subroutine Section # ************************************************************ sub process { my $sources = $_[1]; my $files = $_[2]; my $total = 0; $$sources[0] =~ s/\//\\/g; $$sources[0] =~ s/\\\\/\\/g; my $dep = "$$sources[0] :\\\n"; ## Sort the dependencies to make them reproducible foreach my $file (sort @$files) { $file =~ s/\//\\/g; $file =~ s/\\\\/\\/g; if ($file ne $$sources[0]) { $dep .= "\t\"$file\"\\\n"; ++$total; } } if ($total == 0) { $dep = ''; } else { $dep .= "\n\n"; } return $dep; } 1; ace-6.4.5+dfsg.orig/MPC/modules/GHSProjectCreator.pm0000644000175000017500000000734413154167361020214 0ustar tggtggpackage GHSProjectCreator; # ************************************************************ # Description : A GHS project creator for version 4.x. # By default, this module assumes Multi will # be used on Windows. If it is not, you must # set the MPC_GHS_UNIX environment variable. # Author : Chad Elliott # Create Date : 4/19/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ProjectCreator; use GHSPropertyBase; use vars qw(@ISA); @ISA = qw(GHSPropertyBase ProjectCreator); # ************************************************************ # Data Section # ************************************************************ my $startre; # ************************************************************ # Subroutine Section # ************************************************************ sub convert_slashes { return (defined $ENV{$GHSPropertyBase::ghsunix} ? 0 : 1); } sub case_insensitive { return (defined $ENV{$GHSPropertyBase::ghsunix} ? 0 : 1); } sub use_win_compatibility_commands { return (defined $ENV{$GHSPropertyBase::ghsunix} ? 0 : 1); } sub post_file_creation { my $self = shift; ## These special files are only used if it is a custom only project or ## there are no source files in the project. if ((defined $self->get_assignment('custom_only') || !defined $self->get_assignment('source_files')) && defined $self->get_assignment('custom_types')) { my $fh = new FileHandle(); if (open($fh, '>.custom_build_rule')) { print $fh ".empty_html_file\n"; close($fh); } if (open($fh, '>.empty_html_file')) { close($fh); } } return undef; } sub compare_output { #my $self = shift; return 1; } sub project_file_extension { #my $self = shift; return '.gpj'; } sub fill_value { my($self, $name) = @_; my $value; if (!defined $startre) { $startre = $self->escape_regex_special($self->getstartdir()); } ## The Green Hills project format is strange and needs all paths ## relative to the top directory, no matter where the source files ## reside. The template uses reltop_ in front of the real project ## settings, so we get the value of the real keyword and then do some ## adjusting to get it relative to the top directory. if ($name =~ /^reltop_(\w+)/) { $value = $self->relative($self->get_assignment($1)); if (defined $value) { my $part = $self->getcwd(); $part =~ s/^$startre[\/]?//; if ($part ne '') { if ($value eq '.') { $value = $part; } else { $value = $part . '/' . $value; } } } } elsif ($name eq 'reltop') { $value = $self->getcwd(); $value =~ s/^$startre[\/]?//; $value = '.' if ($value eq ''); } elsif ($name eq 'slash') { ## We need to override the slash value so that we can give the right ## value for Windows or UNIX. $value = (defined $ENV{$GHSPropertyBase::ghsunix} ? '/' : '\\'); } elsif ($name eq 'postmkdir') { ## If we're on Windows, we need an "or" command that will reset the ## errorlevel so that a mkdir on a directory that already exists ## doesn't cause the build to cease. $value = ' || type nul' if (!defined $ENV{$GHSPropertyBase::ghsunix}); } return $value; } sub get_dll_exe_template_input_file { #my $self = shift; return 'ghsdllexe'; } sub get_lib_exe_template_input_file { #my $self = shift; return 'ghslibexe'; } sub get_lib_template_input_file { #my $self = shift; return 'ghslib'; } sub get_dll_template_input_file { #my $self = shift; return 'ghsdll'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/WB26WorkspaceCreator.pm0000644000175000017500000001542413154167361020601 0ustar tggtggpackage WB26WorkspaceCreator; # ************************************************************ # Description : Workbench 2.6 / VxWorks 6.4 generator # Author : Johnny Willemsen # Create Date : 07/01/2008 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use WB26ProjectCreator; use WorkspaceCreator; use vars qw(@ISA); @ISA = qw(WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub requires_make_coexistence { #my $self = shift; return 1; } sub supports_make_coexistence { #my $self = shift; return 1; } sub workspace_file_name { #my $self = shift; return 'org.eclipse.core.resources.prefs'; } sub get_project_prefix { return ''; } sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); ## Optionally print the workspace comment $self->print_workspace_comment($fh, '#----------------------------------------------------------------------------', $crlf, '# WindRiver Workbench generator', $crlf, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, '# This file should be placed in the .metadata/.plugins/org.eclipse.core.runtime/.settings directory', $crlf, '#', $crlf, '# MPC Command:', $crlf, "# ", $self->create_command_line_string($0, @ARGV), $crlf, '#----------------------------------------------------------------------------', $crlf); ## Unchanging initial settings print $fh 'version=1', $crlf, 'eclipse.preferences.version=1', $crlf, 'description.defaultbuildorder=false', $crlf; } sub write_comps { my($self, $fh) = @_; my $pjs = $self->get_project_info(); my @list = $self->sort_dependencies($self->get_projects(), 0); my $pre = $self->get_project_prefix(); ## Print out the target print $fh 'description.buildorder='; foreach my $project (@list) { print $fh $pre, $$pjs{$project}->[ProjectCreator::PROJECT_NAME], '/'; } print $fh $self->crlf(); } sub post_workspace { my($self, $fh, $creator) = @_; my $crlf = $self->crlf(); ## Clear out the seen dependency hash for use within the ## add_dependencies method. $self->{'seen_deps'} = {}; ## Print out the project dependencies foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) { print $fh "$project$crlf"; $self->add_dependencies($creator, $project); } } sub get_additional_output { ## Create the accompanying list file. It always goes in the same ## directory as the first workspace output file. See ## WorkspaceCreator.pm for a description of the array elements. return [[undef, 'wb26projects.lst', \&list_file_body]]; } sub list_file_body { my($self, $fh) = @_; my $crlf = $self->crlf(); ## Optionally print the workspace comment $self->print_workspace_comment($fh, '#----------------------------------------------------------------------------', $crlf, '# WindRiver Workbench generator', $crlf, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, '# MPC Command:', $crlf, "# ", $self->create_command_line_string($0, @ARGV), $crlf, '#----------------------------------------------------------------------------', $crlf); ## Print out each target separately foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) { print $fh $self->mpc_dirname($project), '/.project', $crlf; } } sub add_dependencies { my($self, $creator, $proj) = @_; my $outdir = $self->mpc_dirname($proj); my $into = $self->get_outdir(); $outdir = "$into/$outdir" if $into ne '.'; my $proj_pre = $self->get_project_prefix(); ## These values will be changed after the first time through the for ## loop below. my $pre = "\t\t" . ''; my $post = ''; my $outfile = $outdir . '/.project'; ## Go through twice to edit both the .project and .wrproject files for(my $i = 0; $i < 2; $i++) { my $fh = new FileHandle(); if (open($fh, $outfile)) { ## Get the dependencies and store them based on the directory of ## the project file. We will check them later. my $deps = $self->get_validated_ordering($proj); my $key = $self->mpc_basename($self->mpc_dirname($proj)); $self->{'seen_deps'}->{$key} = {}; foreach my $dep (@$deps) { $self->{'seen_deps'}->{$key}->{$dep} = 1; } my @read = (); my $cwd = $self->getcwd(); while(<$fh>) { ## This is a comment found in wb26.mpd and wb26wrproject.mpd if ## the project is an executable, contains the 'after' keyword ## setting, and the 'enable_subprojects' template variable. if (/MPC\s+ADD\s+DEPENDENCIES/) { my $crlf = $self->crlf(); my %seen = (); my @lines; foreach my $dep (reverse @$deps) { ## If we've seen this dependency, we don't need to add it ## again. The build tool will handle it correctly. if (!$seen{$dep}) { my $relative = $self->get_relative_dep_file($creator, "$cwd/$proj", $dep); ## Since we're looking at the dependencies in reverse order ## now, we need to unshift them into another array to keep ## the correct order. if (defined $relative) { unshift(@lines, "$pre$proj_pre$dep$post$crlf"); } ## We've now seen this dependency and all of the ## projects upon which this one depends. $seen{$dep} = 1; foreach my $key (keys %{$self->{'seen_deps'}->{$dep}}) { $seen{$key} = 1; } } } ## Add the dependency lines to the project file push(@read, @lines); } else { push(@read, $_); } } close($fh); ## We will always rewrite the project file (with or without ## dependencies). if (open($fh, ">$outfile")) { foreach my $line (@read) { print $fh $line; } close($fh); } } ## The dependencies need to go into the .wrproject too, so transform ## the name and the pre and post values. $outfile = $outdir . '/.wrproject'; $pre = ' '; } } 1; ace-6.4.5+dfsg.orig/MPC/modules/WinProjectBase.pm0000644000175000017500000000465113154167361017601 0ustar tggtggpackage WinProjectBase; # ************************************************************ # Description : A Windows base module for Project Creators # Author : Chad Elliott # Create Date : 1/4/2005 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use WinPropertyBase; use vars qw(@ISA); @ISA = qw(WinPropertyBase); # ************************************************************ # Data Section # ************************************************************ my $max_win_env = 'MPC_MAX_WIN_FILE_LENGTH'; # ************************************************************ # Subroutine Section # ************************************************************ sub convert_slashes { #my $self = shift; return 1; } sub case_insensitive { #my $self = shift; return 1; } sub translate_directory { my($self, $dir) = @_; ## Call the base class version $dir = $self->DirectoryManager::translate_directory($dir); ## Change drive letters and $() macros $dir =~ s/^([A-Z]):/$1/i; $dir =~ s/\$\(([^\)]+)\)/$1/g; ## We need to make sure that we do not exceed the maximum file name ## limitation (including the cwd (- c:\) and object file name). So, we ## check the total length against a predetermined "acceptable" value. ## This acceptable value is modifiable through the environment. my $maxenv = $ENV{$max_win_env}; my $maxlen = (defined $maxenv && $maxenv =~ /^\d+$/ ? $maxenv : 128) + 3; my $dirlen = length($dir); my $diff = (length($self->getcwd()) + $dirlen + 1) - $maxlen; if ($diff > 0) { if ($diff > $dirlen) { $dir = substr($dir, $dirlen - 1); } else { $dir = substr($dir, $diff); } while($dir =~ s/^\\//) { } } return $dir; } sub validated_directory { my($self, $dir) = @_; ## $(...) could contain a drive letter and Windows can not ## make a directory that resembles a drive letter. So, we have ## to exclude those directories with $(...). if ($dir =~ /\$\([^\)]+\)/ || $dir =~ /\.\.\\/ || $dir =~ /^[A-Z]:/i) { return '.'; } else { return $dir; } } sub crlf { return $_[0]->windows_crlf(); } sub get_cmdsep_symbol { #my $self = shift; return '&'; } sub file_sorter { #my $self = shift; #my $left = shift; #my $right = shift; return lc($_[1]) cmp lc($_[2]); } 1; ace-6.4.5+dfsg.orig/MPC/modules/WorkspaceCreator.pm0000644000175000017500000031155013154167361020177 0ustar tggtggpackage WorkspaceCreator; # ************************************************************ # Description : Base class for all workspace creators # Author : Chad Elliott # Create Date : 5/13/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use FileHandle; use File::Path; use Creator; use Options; use WorkspaceHelper; use IO::Socket; use Data::Dumper; use vars qw(@ISA); @ISA = qw(Creator Options); # ************************************************************ # Data Section # ************************************************************ ## process stuff our $num_workers = 0; # single-process our $wdir; # tmp directory our $wport; my $wsext = 'mwc'; my $wsbase = 'mwb'; ## Valid names for assignments within a workspace my %validNames = ('cmdline' => 1, 'implicit' => 1, ); ## Singleton hash maps of project information my %allprinfo; my %allprojects; my %allliblocs; ## Global previous workspace names my %previous_workspace_name; ## Constant aggregated workspace type name my $aggregated = 'aggregated_workspace'; my $onVMS = DirectoryManager::onVMS(); # ************************************************************ # Subroutine Section # ************************************************************ sub new { my($class, $global, $inc, $template, $ti, $dynamic, $static, $relative, $addtemp, $addproj, $progress, $toplevel, $baseprojs, $gfeature, $relative_f, $feature, $features, $hierarchy, $exclude, $makeco, $nmod, $applypj, $genins, $into, $language, $use_env, $expandvars, $gendot, $comments, $foreclipse, $workers, $workers_dir, $workers_port) = @_; my $self = Creator::new($class, $global, $inc, $template, $ti, $dynamic, $static, $relative, $addtemp, $addproj, $progress, $toplevel, $baseprojs, $feature, $features, $hierarchy, $nmod, $applypj, $into, $language, $use_env, $expandvars, 'workspace'); $self->{'pid'} = 'parent'; # implicit dependency order counter. this is # incremented in the children. $self->{'imp_dep_ctr'} = 0; ## These need to be reset at the end of each ## workspace processed within a .mwc file $self->{'workspace_name'} = undef; $self->{'projects'} = []; $self->{'project_info'} = {}; $self->{'project_files'} = []; $self->{'modified_count'} = 0; $self->{'exclude'} = {}; $self->{'associated'} = {}; $self->{'scoped_assign'} = {}; $self->{'aggregated_mpc'} = {}; $self->{'aggregated_assign'} = {}; $self->{'mpc_to_output'} = {}; ## These are maintained/modified throughout processing $self->{$self->{'type_check'}} = 0; $self->{'cacheok'} = $self->default_cacheok(); $self->{'lib_locations'} = {}; $self->{'reading_parent'} = []; $self->{'global_feature_file'} = $gfeature; $self->{'relative_file'} = $relative_f; $self->{'project_file_list'} = {}; $self->{'ordering_cache'} = {}; $self->{'handled_scopes'} = {}; $self->{'scoped_basedir'} = undef; $self->{'current_aggregated'} = undef; ## These are static throughout processing $self->{'coexistence'} = $self->requires_make_coexistence() ? 1 : $makeco; $self->{'for_eclipse'} = $foreclipse; $self->{'workers'} = $workers; $self->{'generate_dot'} = $gendot; $self->{'generate_ins'} = $genins; $self->{'verbose_ordering'} = $self->default_verbose_ordering(); $self->{'wctype'} = $self->extractType("$self"); $self->{'workspace_comments'} = $comments; if (defined $$exclude[0]) { my $type = $self->{'wctype'}; if (!defined $self->{'exclude'}->{$type}) { $self->{'exclude'}->{$type} = []; } push(@{$self->{'exclude'}->{$type}}, @$exclude); $self->{'orig_exclude'} = $self->{'exclude'}; } else { $self->{'orig_exclude'} = {}; } ## Add a hash reference for our workspace type if (!defined $previous_workspace_name{$self->{'wctype'}}) { $previous_workspace_name{$self->{'wctype'}} = {}; } ## Warn users about unnecessary options if ($self->get_hierarchy() && $self->workspace_per_project()) { $self->warning("The -hierarchy option is unnecessary " . "for the " . $self->{'wctype'} . " type."); } if ($self->{'coexistence'} && !$self->supports_make_coexistence()) { $self->warning("Using the -make_coexistence option has " . "no effect on the " . $self->{'wctype'} . " type."); } ## multi-process config $num_workers = $workers if $workers > $num_workers; $wdir = $workers_dir; $wport = $workers_port; return $self; } sub default_cacheok { return 1; } sub set_verbose_ordering { my($self, $value) = @_; $self->{'verbose_ordering'} = $value; } sub modify_assignment_value { ## Workspace assignments do not need modification. return $_[2]; } sub parse_line { my($self, $ih, $line, $flags) = @_; my($status, $error, @values) = $self->parse_known($line, $ih); ## Was the line recognized? if ($status && defined $values[0]) { if ($values[0] eq $self->{'grammar_type'}) { my $name = $values[1]; if (defined $name && $name eq '}') { if (!defined $self->{'reading_parent'}->[0]) { ## Fill in all the default values $self->generate_defaults(); ## End of workspace; Have subclass write out the file ## Generate the project files my($gstat, $creator, $err); if ($num_workers > 0) { if (!defined ($wport)) { ## use temp files for multiprocess mpc ## Lock the temp directory before generating project files. my $lock = 'mpc-worker.lock'; ## check for valid temp directory if (!$wdir) { if ($^O eq 'MSWin32') { $wdir = $ENV{TEMP}; } else { $wdir = '/tmp/mpc'; } } ## shouldn't happen if (!$wdir) { die "Error: No temporary directory found. Supply one with \"-worker_dir\" option.\n"; } $self->diagnostic("Multiprocess MPC using \"$wdir\" for temporary files."); unless (-d $wdir) { mkdir $wdir || die "Error: Can't find or create directory $wdir\n" } ## lock the directory if (-e "$wdir/$lock") { die "Error: Another instance of MPC is using $wdir, or a previous session failed to remove the lock file $lock\n"; } else { open (FDL, ">$wdir/$lock") || die "Error reating lock file $lock in $wdir\n"; print FDL "File generated by MPC process ", $$, " on ", scalar (localtime(time())), "\n"; close FDL; $self->diagnostic("Multiprocess MPC created lock file $wdir/$lock"); } ## generate the project files ($gstat, $creator, $err) = $self->generate_project_files_fork(); ## Release temp directory lock; if (!unlink("$wdir/$lock")) { $self->error("Multiprocess MPC unable to remove lock file $wdir/$lock"); } else { $self->diagnostic("Multiprocess MPC removed $wdir/$lock"); } } else { ## Socket-based Multiprocess MPC ($gstat, $creator, $err) = $self->generate_project_files_fork_socket(); } } else { ($gstat, $creator, $err) = $self->generate_project_files(); } if ($gstat) { #exit(1); ($status, $error) = $self->write_workspace($creator, 1); $self->{'assign'} = {}; } else { $error = $err; $status = 0; } $self->{'modified_count'} = 0; $self->{'workspace_name'} = undef; $self->{'projects'} = []; $self->{'project_info'} = {}; $self->{'project_files'} = []; $self->{'exclude'} = $self->{'orig_exclude'}; $self->{'associated'} = {}; $self->{'scoped_assign'} = {}; $self->{'aggregated_mpc'} = {}; $self->{'aggregated_assign'} = {}; $self->{'mpc_to_output'} = {}; } $self->{$self->{'type_check'}} = 0; } else { ## Workspace Beginning ## Deal with the inheritance hierarchy first if (defined $values[2]) { foreach my $parent (@{$values[2]}) { ## Read in the parent onto ourself my $file = $self->search_include_path("$parent.$wsbase"); if (!defined $file) { $file = $self->search_include_path("$parent.$wsext"); } if (defined $file) { push(@{$self->{'reading_parent'}}, 1); $status = $self->parse_file($file); pop(@{$self->{'reading_parent'}}); $error = "Invalid parent: $parent" if (!$status); } else { $status = 0; $error = "Unable to locate parent: $parent"; } } } ## Set up some initial values if (defined $name) { if ($name =~ /[\/\\]/) { $status = 0; $error = 'Workspaces can not have a slash ' . 'or a back slash in the name'; } else { $name =~ s/^\(\s*//; $name =~ s/\s*\)$//; ## Replace any *'s with the default name if (index($name, '*') >= 0) { $name = $self->fill_type_name( $name, $self->get_default_workspace_name()); } $self->{'workspace_name'} = $name; } } $self->{$self->{'type_check'}} = 1; } } elsif ($values[0] eq '0') { if (defined $validNames{$values[1]}) { $self->process_assignment($values[1], $values[2], $flags); } else { $error = "Invalid assignment name: '$values[1]'"; $status = 0; } } elsif ($values[0] eq '1') { if (defined $validNames{$values[1]}) { ## This code only runs when there is a non-scoped assignment. As ## such, we can safely replace all environment variables here so ## that they are not incorrectly handled in aggregated ## workspaces. $self->replace_env_vars(\$values[2]) if ($values[2] =~ /\$/); $self->process_assignment_add($values[1], $values[2], $flags); } else { $error = "Invalid addition name: $values[1]"; $status = 0; } } elsif ($values[0] eq '-1') { if (defined $validNames{$values[1]}) { $self->process_assignment_sub($values[1], $values[2], $flags); } else { $error = "Invalid subtraction name: $values[1]"; $status = 0; } } elsif ($values[0] eq 'component') { my %copy = %{defined $flags ? $flags : $self->get_assignment_hash()}; ($status, $error) = $self->parse_scope($ih, $values[1], $values[2], \%validNames, \%copy); } else { $error = "Unrecognized line: $line"; $status = 0; } } elsif ($status == -1) { ## If the line contains a variable, try to replace it with an actual ## value. $line = $self->relative($line) if (index($line, '$') >= 0); foreach my $expfile ($line =~ /[\?\*\[\]]/ ? $self->mpc_glob($line) : $line) { if ($expfile =~ /\.$wsext$/) { my %copy = %{defined $flags ? $flags : $self->get_assignment_hash()}; ($status, $error) = $self->aggregated_workspace($expfile, \%copy); last if (!$status); } else { push(@{$self->{'project_files'}}, $expfile); $status = 1; } } } return $status, $error; } sub aggregated_workspace { my($self, $file, $flags) = @_; my $fh = new FileHandle(); if (open($fh, $file)) { my $oline = $self->get_line_number(); my $tc = $self->{$self->{'type_check'}}; my $ag = $self->{'handled_scopes'}->{$aggregated}; my $pca = $self->{'current_aggregated'}; my $psbd = $self->{'scoped_basedir'}; my $prev_assign = $self->clone($self->get_assignment_hash()); my($status, $error, @values) = (0, 'No recognizable lines'); $self->{'handled_scopes'}->{$aggregated} = undef; $self->set_line_number(0); $self->{$self->{'type_check'}} = 0; $self->{'current_aggregated'} = $file; $self->{'scoped_basedir'} = $self->mpc_dirname($file); ## If the directory name for the file is the current directory, we ## need to empty it out. If we don't, it will cause the file name to ## not match up with itself later on where scoped_basedir is used. $self->{'scoped_basedir'} = undef if ($self->{'scoped_basedir'} eq '.'); while (<$fh>) { my $line = $self->preprocess_line($fh, $_); ($status, $error, @values) = $self->parse_known($line, $fh); ## Was the line recognized? if ($status) { if (defined $values[0]) { if ($values[0] eq $self->{'grammar_type'}) { if (defined $values[2]) { my $name = $self->mpc_basename($file); $name =~ s/\.[^\.]+$//; $status = 0; $error = 'Aggregated workspace (' . $name . ') can not inherit from another workspace'; } else { ($status, $error) = $self->parse_scope($fh, '', $aggregated, \%validNames, $flags); } } else { $status = 0; $error = 'Unable to aggregate ' . $file; } last; } } else { last; } } close($fh); if ($status) { $self->{'aggregated_assign'}->{$file} = $self->clone($self->get_assignment_hash()); $self->{'assign'} = $prev_assign; } $self->{'scoped_basedir'} = $psbd; $self->{'current_aggregated'} = $pca; $self->{'handled_scopes'}->{$aggregated} = $ag; $self->{$self->{'type_check'}} = $tc; $self->set_line_number($oline); return $status, $error; } return 0, 'Unable to open ' . $file; } sub parse_scope { my($self, $fh, $name, $type, $validNames, $flags, $elseflags) = @_; if ($type eq $self->get_default_component_name()) { $type = $self->{'wctype'}; } if ($name eq 'exclude') { return $self->parse_exclude($fh, $type, $flags); } elsif ($name eq 'associate') { return $self->parse_associate($fh, $type); } elsif ($name eq 'specific') { return $self->parse_specific($fh, $type, $validNames, $flags, $elseflags); } else { return $self->SUPER::parse_scope($fh, $name, $type, $validNames, $flags, $elseflags); } } sub process_types { my($self, $typestr) = @_; my $wcprops = $self->get_properties(); my %types; my %props; @types{split(/\s*,\s*/, $typestr)} = (); ## If there is a property in the typestr, i.e., prop:, then ## we need to extract it into its own collection while removing ## it from the types collection. if (index($typestr, 'prop:') >= 0) { foreach my $key (keys %types) { if ($key =~ /^prop:\s*(\w+)/) { ## Add the property to the prop hash. $props{$1} = 1; ## Remove the original property from the types. delete $types{$key}; } elsif ($key =~ /^!prop:\s*(\w+)/) { ## Negate the property. $props{$1} = 0; ## Remove the original property from the types. delete $types{$key}; } } } ## Now, process the properties and determine if this project ## type should be excluded. This will be the case if the property ## is valid and there exists a match between the listed properties ## and the workspace properties. while (my ($key, $val) = each %props) { if (exists $$wcprops{$key}) { if ($$wcprops{$key} == 1 and $$wcprops{$key} == $val) { $types{$self->{wctype}} = 1; } else { delete $types{$self->{wctype}}; } } elsif ($val == 0) { $types{$self->{wctype}} = 1; } } ## Remove all negated types from the collection. foreach my $key (keys %types) { if ($key =~ /^!\s*(\w+)/) { if ($1 eq $self->{wctype}) { ## Remove the negated key delete $types{$key}; ## Then delete the key that was negated in the exclusion delete $types{$1}; } } } return \%types; } sub parse_exclude { my($self, $fh, $typestr, $flags) = @_; my $status = 0; my $errorString = 'Unable to process exclude'; my $negated = (index($typestr, '!') >= 0); my $types = $self->process_types($typestr); my $count = 1; my @exclude; if (exists $$types{$self->{wctype}}) { while (<$fh>) { my $line = $self->preprocess_line($fh, $_); if ($line eq '') { } elsif ($line =~ /^}(.*)$/) { --$count; if (defined $1 && $1 ne '') { $status = 0; $errorString = "Trailing characters found: '$1'"; } else { $status = 1; $errorString = undef; } last if ($count == 0); } else { if ($line =~ /^(\w+)\s*(\([^\)]+\))?\s*{$/) { ++$count; } elsif ($self->parse_assignment($line, [], $fh)) { ## Ignore all assignments } else { if ($line =~ /^"([^"]+)"$/) { $line = $1; } ## If the line contains a variable, try to replace it with an ## actual value. $line = $self->relative($line) if (index($line, '$') >= 0); if (defined $self->{'scoped_basedir'} && $self->path_is_relative($line)) { $line = $self->{'scoped_basedir'} . '/' . $line; } if ($line =~ /[\?\*\[\]]/) { push(@exclude, $self->mpc_glob($line)); } else { push(@exclude, $line); } } } } foreach my $type (keys %$types) { if (!defined $self->{'exclude'}->{$type}) { $self->{'exclude'}->{$type} = []; } push(@{$self->{'exclude'}->{$type}}, @exclude); } } else { if ($negated) { ($status, $errorString) = $self->SUPER::parse_scope($fh, 'exclude', $typestr, \%validNames, $flags); } else { ## If this exclude block didn't match the current type and the ## exclude wasn't negated, we need to eat the exclude block so that ## these lines don't get included into the workspace. while (<$fh>) { my $line = $self->preprocess_line($fh, $_); if ($line =~ /^(\w+)\s*(\([^\)]+\))?\s*{$/) { ++$count; } elsif ($line =~ /^}(.*)$/) { --$count; if (defined $1 && $1 ne '') { $status = 0; $errorString = "Trailing characters found: '$1'"; } else { $status = 1; $errorString = undef; } last if ($count == 0); } } } } return $status, $errorString; } sub parse_associate { my($self, $fh, $assoc_key) = @_; my $status = 0; my $errorString = 'Unable to process associate'; my $count = 1; my @projects; if (!defined $self->{'associated'}->{$assoc_key}) { $self->{'associated'}->{$assoc_key} = {}; } while (<$fh>) { my $line = $self->preprocess_line($fh, $_); if ($line eq '') { } elsif ($line =~ /^}(.*)$/) { --$count; if (defined $1 && $1 ne '') { $errorString = "Trailing characters found: '$1'"; last; } else { $status = 1; $errorString = undef; } last if ($count == 0); } else { if ($line =~ /^(\w+)\s*(\([^\)]+\))?\s*{$/) { ++$count; } elsif ($self->parse_assignment($line, [], $fh)) { $errorString = 'Assignments are not ' . 'allowed within an associate scope'; last; } else { if ($line =~ /^"([^"]+)"$/) { $line = $1; } ## If the line contains a variable, try to replace it with an ## actual value. $line = $self->relative($line) if (index($line, '$') >= 0); if (defined $self->{'scoped_basedir'} && $self->path_is_relative($line)) { $line = $self->{'scoped_basedir'} . '/' . $line; } if ($line =~ /[\?\*\[\]]/) { foreach my $file ($self->mpc_glob($line)) { $self->{'associated'}->{$assoc_key}->{$file} = 1; } } else { $self->{'associated'}->{$assoc_key}->{$line} = 1; } } } } return $status, $errorString; } sub parse_specific { my($self, $fh, $typestr, $validNames, $flags, $elseflags) = @_; my $types = $self->process_types($typestr); my $wctype = $self->{'wctype'}; my $matches = exists $types->{$wctype}; # $elseflags needs to be defined for Creator::parse_scope to allow "} else {" $elseflags = {} unless defined $elseflags; # Assignments within 'specific' always go to the workspace-level assignment # hash table instead of the $flags bound to the scope. my $assign = $self->get_assignment_hash(); return $self->SUPER::parse_scope($fh, 'specific', $matches ? $wctype : undef, $validNames, $matches ? ($assign, $elseflags) : (undef, $assign)); } sub handle_unknown_assignment { my $self = shift; my $type = shift; my @values = @_; if (defined $type) { $self->process_any_assignment(undef, @values); } return 1, undef; } sub excluded { my($self, $file) = @_; foreach my $excluded (@{$self->{'exclude'}->{$self->{'wctype'}}}) { return 1 if ($excluded eq $file || index($file, "$excluded/") == 0); } return 0; } sub handle_scoped_end { my($self, $type, $flags) = @_; my $status = 1; my $error; ## Replace instances of $PWD with the current directory plus the ## scoped_basedir. We have to do it now otherwise, $PWD will be the ## wrong directory if it's done later. if (defined $$flags{'cmdline'} && defined $self->{'scoped_basedir'} && index($$flags{'cmdline'}, '$PWD') >= 0) { my $dir = $self->getcwd() . '/' . $self->{'scoped_basedir'}; $$flags{'cmdline'} =~ s/\$PWD(\W)/$dir$1/g; $$flags{'cmdline'} =~ s/\$PWD$/$dir/; } if ($type eq $aggregated && !defined $self->{'handled_scopes'}->{$type}) { ## Go back to the previous directory and add the directory contents ($status, $error) = $self->handle_scoped_unknown(undef, $type, $flags, '.'); } $self->{'handled_scopes'}->{$type} = undef; return $status, $error; } sub handle_scoped_unknown { my($self, $fh, $type, $flags, $line) = @_; my $status = 1; my $error; my $dupchk; ## If $type is undef, we are in a skipped part of a specific block return 1 unless defined $type; if ($line =~ /^\w+.*{/) { if (defined $fh) { my @values; my $tc = $self->{$self->{'type_check'}}; $self->{$self->{'type_check'}} = 1; ($status, $error, @values) = $self->parse_line($fh, $line, $flags); $self->{$self->{'type_check'}} = $tc; } else { $status = 0; $error = 'Unhandled line: ' . $line; } return $status, $error; } ## If the line contains a variable, try to replace it with an actual ## value. if (index($line, '$') >= 0) { $line = $self->relative($line); } elsif (defined $self->{'scoped_basedir'}) { if ($self->path_is_relative($line)) { if ($line eq '.') { $line = $self->{'scoped_basedir'}; } else { ## This is a relative path and the project may have been added ## previously without a relative path. We need to convert the ## relative path into an absolute path and, if possible, remove ## the current working directory from the front. This will get ## it down to a path that's relative to the current directory and ## likely to match up with the addition of this file or directory ## from an upper workspace. my $cwd = $self->getcwd(); $line = Cwd::abs_path($self->{'scoped_basedir'} . "/$line"); if (index($line, $cwd) == 0) { $line = substr($line, length($cwd) + 1); } } } } ## We must build up the list of project files and use them as the ## keys in the duplicate hash check. We need to call ## search_for_files() because the user may have just listed ## directories in the workspace and we need to deal with mpc files. my @files; $self->search_for_files($self->{'project_files'}, \@files); my %dup; @dup{@files} = (); $dupchk = \%dup; ## If the aggregated workspace contains a scope (other than exclude) ## it will be processed in the block above and we will eventually get ## here, but by that time $type will no longer be $aggregated. So, ## we just need to set it here to ensure that we don't add everything ## in the scoped_basedir directory in handle_scoped_end() $self->{'handled_scopes'}->{$aggregated} = 1; if (-d $line) { my @files; $self->search_for_files([ $line ], \@files, $$flags{'implicit'}); ## If we are generating implicit projects within a scope, then ## we need to remove directories and the parent directories for which ## there is an mpc file. Otherwise, the projects will be added ## twice. if ($$flags{'implicit'}) { my %remove; foreach my $file (@files) { if ($file =~ /\.mpc$/) { my $exc = $file; do { $exc = $self->mpc_dirname($exc); $remove{$exc} = 1; } while ($exc ne '.' && $exc !~ /[a-z]:[\/\\]/i); } } my @acceptable; foreach my $file (@files) { push(@acceptable, $file) if (!defined $remove{$file}); } @files = @acceptable; } foreach my $file (@files) { $self->add_aggregated_mpc($file, $dupchk, $flags); } } else { foreach my $expfile ($line =~ /[\?\*\[\]]/ ? $self->mpc_glob($line) : $line) { if ($expfile =~ /\.$wsext$/) { ## An aggregated workspace within an aggregated workspace or scope. ($status, $error) = $self->aggregated_workspace($expfile, $flags); last if (!$status); } else { $self->add_aggregated_mpc($expfile, $dupchk, $flags); } } } $self->{'handled_scopes'}->{$type} = 1; return $status, $error; } sub add_aggregated_mpc { my($self, $file, $dupchk, $flags) = @_; if (!$self->excluded($file)) { if (defined $dupchk && exists $$dupchk{$file}) { $self->information("Duplicate mpc file ($file) added by an " . 'aggregate workspace. It will be ignored.'); } else { $self->{'scoped_assign'}->{$file} = $flags; push(@{$self->{'project_files'}}, $file); push(@{$self->{'aggregated_mpc'}->{$self->{'current_aggregated'}}}, $file) if defined $self->{'current_aggregated'}; } } } sub search_for_files { my($self, $files, $array, $impl) = @_; my $excluded = 0; foreach my $file (@$files) { if (-d $file) { my @f = $self->generate_default_file_list( $file, $self->{'exclude'}->{$self->{'wctype'}}, \$excluded); $self->search_for_files(\@f, $array, $impl); if ($impl) { $file =~ s/^\.\///; # Strip out ^ symbols $file =~ s/\^//g if ($onVMS); unshift(@$array, $file); } } elsif ($file =~ /\.mpc$/) { $file =~ s/^\.\///; # Strip out ^ symbols $file =~ s/\^//g if ($onVMS); unshift(@$array, $file); } } return $excluded; } sub remove_duplicate_projects { my($self, $list) = @_; my $count = scalar(@$list); for (my $i = 0; $i < $count; ++$i) { my $file = $$list[$i]; foreach my $inner (@$list) { if ($file ne $inner && $file eq $self->mpc_dirname($inner) && ! -d $inner) { splice(@$list, $i, 1); --$count; --$i; last; } } } } sub generate_default_components { my($self, $files, $impl, $excluded) = @_; my $pjf = $self->{'project_files'}; if (defined $$pjf[0]) { ## If we have files, then process directories my @built; foreach my $file (@$pjf) { if (!$self->excluded($file)) { if (-d $file) { my @found; my @gen = $self->generate_default_file_list( $file, $self->{'exclude'}->{$self->{'wctype'}}); $self->search_for_files(\@gen, \@found, $impl); push(@built, @found); if ($impl || $self->{'scoped_assign'}->{$file}->{'implicit'}) { push(@built, $file); } } else { push(@built, $file); } } } ## If the workspace is set to implicit remove duplicates from this ## list. $self->remove_duplicate_projects(\@built) if ($impl); ## Set the project files $self->{'project_files'} = \@built; } else { ## Add all of the wanted files in this directory ## and in the subdirectories. $excluded |= $self->search_for_files($files, $pjf, $impl); ## If the workspace is set to implicit remove duplicates from this ## list. $self->remove_duplicate_projects($pjf) if ($impl); ## If no files were found, then we push the empty ## string, so the Project Creator will generate ## the default project file. push(@$pjf, '') if (!defined $$pjf[0] && !$excluded); } } sub get_default_workspace_name { my $self = shift; my $name = $self->{'current_input'}; if ($name eq '') { $name = $self->base_directory(); } else { ## Since files on UNIX can have back slashes, we transform them ## into underscores. $name =~ s/\\/_/g; ## Take off the extension $name =~ s/\.[^\.]+$//; } return $name; } sub generate_defaults { my $self = shift; ## Generate default workspace name if (!defined $self->{'workspace_name'}) { $self->{'workspace_name'} = $self->get_default_workspace_name(); } ## Modify the exclude list if we have changed directory from the original ## starting directory. Just take off the difference from the front. my @original; my $top = $self->getcwd() . '/'; my $start = $self->getstartdir() . '/'; if ($start ne $top && $top =~ s/^$start//) { foreach my $exclude (@{$self->{'exclude'}->{$self->{'wctype'}}}) { push(@original, $exclude); $exclude =~ s/^$top//; } } my $excluded = 0; my @files = $self->generate_default_file_list( '.', $self->{'exclude'}->{$self->{'wctype'}}, \$excluded); ## Generate default components $self->generate_default_components(\@files, $self->get_assignment('implicit'), $excluded); ## Return the actual exclude list of we modified it if (defined $original[0]) { $self->{'exclude'}->{$self->{'wctype'}} = \@original; } } sub get_workspace_name { return $_[0]->{'workspace_name'}; } sub get_current_output_name { return $_[0]->{'current_output'}; } sub write_and_compare_file { my($self, $outdir, $oname, $func, @params) = @_; my $fh = new FileHandle(); my $status = 1; my $errorString = undef; ## Set the output directory if one wasn't provided $outdir = $self->get_outdir() if (!defined $outdir); ## Create the full name and pull off the directory. The directory ## portion may not be the same as $outdir, since $name could possibly ## contain a directory portion too. my $name = "$outdir/$oname"; my $dir = $self->mpc_dirname($name); ## Make the full path if necessary mkpath($dir, 0, 0777) if ($dir ne '.'); ## Set the current output data member to our file's full name $self->{'current_output'} = $name; if ($self->compare_output()) { ## First write the output to a temporary file my $tmp = "$outdir/MWC$>.$$"; my $different = 1; if (open($fh, ">$tmp")) { ($status, $errorString) = &$func($self, $fh, @params); close($fh); $different = 0 if ($status && !$self->files_are_different($name, $tmp)); } else { $status = 0; $errorString = "Unable to open $tmp for output."; } if ($status) { if ($different) { unlink($name); if (!rename($tmp, $name)) { $status = 0; $errorString = "Unable to open $name for output"; } } else { ## There is no need to rename, so remove our temp file. unlink($tmp); } } } else { if (open($fh, ">$name")) { &$func($self, $fh, @params); close($fh); } else { $status = 0; $errorString = "Unable to open $name for output."; } } return $status, $errorString; } sub write_workspace { my($self, $creator, $addfile) = @_; my $status = 1; my $errorString; my $duplicates = 0; if ($self->get_toplevel()) { ## There is usually a progress indicator callback provided, but if ## the output is being redirected, there will be no progress ## indicator. my $progress = $self->get_progress_callback(); &$progress() if (defined $progress); if ($addfile) { ## To be consistent across multiple project types, we disallow ## duplicate project names for all types, not just VC6. ## Note that these name are handled case-insensitive by VC6 my %names; foreach my $project (@{$self->{'projects'}}) { my $name = lc($self->{'project_info'}->{$project}->[ProjectCreator::PROJECT_NAME]); if (defined $names{$name}) { ++$duplicates; $self->error("Duplicate case-insensitive project '$name'. " . "Look in " . $self->mpc_dirname($project) . " and " . $self->mpc_dirname($names{$name}) . " for project name conflicts."); } else { $names{$name} = $project; } } } else { $self->{'per_project_workspace_name'} = 1; } my $name = $self->transform_file_name($self->workspace_file_name()); my $abort_creation = 0; if ($duplicates > 0) { $abort_creation = 1; $errorString = "Duplicate case-insensitive project names are " . "not allowed within a workspace."; $status = 0; } else { if (!defined $self->{'projects'}->[0]) { $self->information('No projects were created.'); $abort_creation = 1; } } if (!$abort_creation) { ## Verify and possibly modify the dependencies if ($addfile) { $self->verify_build_ordering(); } if ($addfile || !$self->file_written($name)) { ($status, $errorString) = $self->write_and_compare_file( undef, $name, sub { my($self, $fh) = @_; $self->pre_workspace($fh, $creator, $addfile); my($status, $errorString) = $self->write_comps($fh, $creator, $addfile); ## If write_comps() does't return a status, set status to true. $status = 1 if (!defined $status || $status eq ""); if ($status) { my $wsHelper = WorkspaceHelper::get($self); $wsHelper->perform_custom_processing($fh, $creator, $addfile); $self->post_workspace($fh, $creator, $addfile); } return $status, $errorString; }); $self->add_file_written($name) if ($status && $addfile); } my $additional = $self->get_additional_output(); foreach my $entry (@$additional) { ($status, $errorString) = $self->write_and_compare_file(@$entry); if (!$status) { last; } } if ($addfile && $self->{'generate_dot'}) { my $dh = new FileHandle(); my $wsname = $self->get_workspace_name(); if (open($dh, ">$wsname.dot")) { my %targnum; my @list = $self->number_target_deps($self->{'projects'}, $self->{'project_info'}, \%targnum, 0); ## If the workspace name contains a dot, we will replace it ## with two underscores. Graphviz does not accept names with ## dots. $wsname =~ s/\./__/g; print $dh "digraph $wsname {\n"; foreach my $project (@{$self->{'projects'}}) { if (defined $targnum{$project}) { ## If the project name contains a dot, we will replace it ## with two underscores. Graphviz does not accept names ## with dots. my $pname = $self->{'project_info'}->{$project}->[ProjectCreator::PROJECT_NAME]; $pname =~ s/\./__/g; foreach my $number (@{$targnum{$project}}) { my $depr = $self->{'project_info'}->{$list[$number]}->[ProjectCreator::PROJECT_NAME]; $depr =~ s/\./__/g; print $dh " $pname -> ", $depr, ";\n"; } } } print $dh "}\n"; close($dh); } else { $self->warning("Unable to write to $wsname.dot."); } } } $self->{'per_project_workspace_name'} = undef if (!$addfile); } return $status, $errorString; } sub save_project_info { my($self, $gen, $gpi, $gll, $dir, $projects, $pi, $ll) = @_; my $c = 0; ## For each file written foreach my $pj (@$gen) { ## Save the full path to the project file in the array my $full = ($dir ne '.' ? "$dir/" : '') . $pj; push(@$projects, $full); ## Get the corresponding generated project info and save it ## in the hash map keyed on the full project file name $$pi{$full} = $$gpi[$c]; $c++; } foreach my $key (keys %$gll) { $$ll{$key} = $$gll{$key}; } } sub topname { my($self, $file) = @_; my $dir = '.'; my $rest = $file; if ($file =~ /^([^\/\\]+)[\/\\](.*)/ && $1 !~ /^[a-z]:$/i) { $dir = $1; $rest = $2; } return $dir, $rest; } sub generate_hierarchy { my($self, $creator, $origproj, $originfo) = @_; my $current; my @saved; my %sinfo; my $cwd = $self->getcwd(); my $status = 1; my $errorString; ## Make a copy of these. We will be modifying them. ## It is necessary to sort the projects to get the correct ordering. ## Projects in the current directory must come before projects in ## other directories. my @projects = sort { return $self->sort_projects_by_directory($a, $b) + 0; } @{$origproj}; my %projinfo = %{$originfo}; foreach my $prj (@projects) { my($top, $rest) = $self->topname($prj); if (!defined $current) { $current = $top; push(@saved, $rest); $sinfo{$rest} = $projinfo{$prj}; } elsif ($top ne $current) { if ($current ne '.') { ## Write out the hierachical workspace $self->cd($current); ($status, $errorString) = $self->generate_hierarchy($creator, \@saved, \%sinfo); $self->{'projects'} = \@saved; $self->{'project_info'} = \%sinfo; $self->{'workspace_name'} = $self->base_directory(); ($status, $errorString) = $self->write_workspace($creator) if ($status); last if !$status; $self->cd($cwd); } ## Start the next one $current = $top; @saved = ($rest); %sinfo = (); $sinfo{$rest} = $projinfo{$prj}; } else { push(@saved, $rest); $sinfo{$rest} = $projinfo{$prj}; } } if ($status && defined $current && $current ne '.') { $self->cd($current); ($status, $errorString) = $self->generate_hierarchy($creator, \@saved, \%sinfo); $self->{'projects'} = \@saved; $self->{'project_info'} = \%sinfo; $self->{'workspace_name'} = $self->base_directory(); ($status, $errorString) = $self->write_workspace($creator) if ($status); $self->cd($cwd); } return $status, $errorString; } sub generate_project_files { my $self = shift; my $status = (scalar @{$self->{'project_files'}} == 0 ? 1 : 0); my @projects; my %pi; my %liblocs; my $creator = $self->project_creator(); my $cwd = $self->getcwd(); my $impl = $self->get_assignment('implicit'); my $postkey = $creator->get_dynamic() . $creator->get_static() . "-$self"; my $previmpl = $impl; my $prevcache = $self->{'cacheok'}; my %gstate = $creator->save_state(); my $genimpdep = $self->generate_implicit_project_dependencies(); my $errorString; $Data::Dumper::Indent = 0; ## Save this project creator setting for later use in the ## number_target_deps() method. $self->{'dependency_is_filename'} = $creator->dependency_is_filename(); ## Remove the address portion of the $self string $postkey =~ s/=.*//; ## Set the source file callback on our project creator $creator->set_source_listing_callback([\&source_listing_callback, $self]); foreach my $ofile (@{$self->{'project_files'}}) { if (!$self->excluded($ofile)) { my $file = $ofile; my $dir = $self->mpc_dirname($file); my $restore = 0; if (defined $self->{'scoped_assign'}->{$ofile}) { ## Handle the implicit assignment my $oi = $self->{'scoped_assign'}->{$ofile}->{'implicit'}; if (defined $oi) { $previmpl = $impl; $impl = $oi; } ## Handle the cmdline assignment my $cmdline = $self->{'scoped_assign'}->{$ofile}->{'cmdline'}; if (defined $cmdline && $cmdline ne '') { ## Save the cacheok value $prevcache = $self->{'cacheok'}; ## Get the current parameters and process the command line my %parameters = $self->current_parameters(); $self->process_cmdline($cmdline, \%parameters); ## Set the parameters on the creator $creator->restore_state(\%parameters); $restore = 1; } } ## If we are generating implicit projects and the file is a ## directory, then we set the dir to the file and empty the file if ($impl && -d $file) { $dir = $file; $file = ''; ## If the implicit assignment value was not a number, then ## we will add this value to our base projects. if ($impl !~ /^\d+$/) { my $bps = $creator->get_baseprojs(); push(@$bps, split(/\s+/, $impl)); $restore = 1; $self->{'cacheok'} = 0; } } ## Generate the key for this project file my $prkey = $self->getcwd() . '/' . ($file eq '' ? $dir : $file) . "-$postkey"; ## We must change to the subdirectory for ## which this project file is intended if ($self->cd($dir)) { my $files_written = []; my $gen_proj_info = []; my $gen_lib_locs = {}; if ($self->{'cacheok'} && defined $allprojects{$prkey}) { $files_written = $allprojects{$prkey}; $gen_proj_info = $allprinfo{$prkey}; $gen_lib_locs = $allliblocs{$prkey}; $status = 1; } else { $status = $creator->generate($self->mpc_basename($file)); ## If any one project file fails, then stop ## processing altogether. if (!$status) { ## We don't restore the state before we leave, ## but that's ok since we will be exiting right now. return $status, $creator, "Unable to process " . ($file eq '' ? " in $dir" : $file); } ## Get the individual project information and ## generated file name(s) $files_written = $creator->get_files_written(); $gen_proj_info = $creator->get_project_info(); $gen_lib_locs = $creator->get_lib_locations(); if ($self->{'cacheok'}) { $allprojects{$prkey} = $files_written; $allprinfo{$prkey} = $gen_proj_info; $allliblocs{$prkey} = $gen_lib_locs; } push(@{$self->{'mpc_to_output'}->{$ofile}}, @$files_written); } $self->cd($cwd); $self->save_project_info($files_written, $gen_proj_info, $gen_lib_locs, $dir, \@projects, \%pi, \%liblocs); } else { ## Unable to change to the directory. ## We don't restore the state before we leave, ## but that's ok since we will be exiting soon. return 0, $creator, "Unable to change directory to $dir"; } ## Return things to the way they were $impl = $previmpl if (defined $self->{'scoped_assign'}->{$ofile}); if ($restore) { $self->{'cacheok'} = $prevcache; $creator->restore_state(\%gstate); } } else { ## This one was excluded, so status is ok $status = 1; } } ## Add implict project dependencies based on source files ## that have been used by multiple projects. If we do it here ## before we call generate_hierarchy(), we don't have to call it ## in generate_hierarchy() for each workspace. $self->{'projects'} = \@projects; $self->{'project_info'} = \%pi; if ($status && $genimpdep) { $self->add_implicit_project_dependencies($creator, $cwd); } ## If we are generating the hierarchical workspaces, then do so $self->{'lib_locations'} = \%liblocs; if ($self->get_hierarchy() || $self->workspace_per_project()) { my $orig = $self->{'workspace_name'}; ($status, $errorString) = $self->generate_hierarchy($creator, \@projects, \%pi); $self->{'workspace_name'} = $orig; } ## Reset the projects and project_info $self->{'projects'} = \@projects; $self->{'project_info'} = \%pi; return $status, $creator, $errorString; } sub generate_project_files_fork { my $self = shift; my $status = (scalar @{$self->{'project_files'}} == 0 ? 1 : 0); my @projects; my %pi; my %liblocs; my $creator = $self->project_creator('child'); my $cwd = $self->getcwd(); my $impl = $self->get_assignment('implicit'); my $postkey = $creator->get_dynamic() . $creator->get_static() . "-$self"; my $previmpl = $impl; my $prevcache = $self->{'cacheok'}; my %gstate = $creator->save_state(); my $genimpdep = $self->generate_implicit_project_dependencies(); my $errorString; my @save; my $VAR1; $Data::Dumper::Indent = 0; ## Save this project creator setting for later use in the ## number_target_deps() method. $self->{'dependency_is_filename'} = $creator->dependency_is_filename(); ## Remove the address portion of the $self string $postkey =~ s/=.*//; ## Set the source file callback on our project creator $creator->set_source_listing_callback([\&source_listing_callback, $self]); my $pid; my @pids; my $tmp = 'mpctmp00000000'; ## remove old temp files my @tmpfiles = glob "${wdir}/mpctmp*"; for my $file (@tmpfiles) { unlink $file || die "Error: Unable to delete tmp file $file in directory $wdir"; } my $num_tmp_files = scalar (@tmpfiles); $self->diagnostic("Multiprocess MPC removed $num_tmp_files existing files like \"mpctmp\*\" in $wdir."); foreach my $ofile (@{$self->{'project_files'}}) { if ($#pids + 1 >= $num_workers) { waitpid(shift @pids, 0); } ++$tmp; ## open the output file in parent so it can die if there's an error open (FD, ">${wdir}/$tmp") || die "Can't open $tmp for write"; $pid = fork(); if ($pid != 0) { push @pids, $pid; } else { $self->{'pid'} = 'child'; if (!$self->excluded($ofile)) { my $file = $ofile; my $dir = $self->mpc_dirname($file); my $restore = 0; if (defined $self->{'scoped_assign'}->{$ofile}) { ## Handle the implicit assignment my $oi = $self->{'scoped_assign'}->{$ofile}->{'implicit'}; if (defined $oi) { $previmpl = $impl; $impl = $oi; } ## Handle the cmdline assignment my $cmdline = $self->{'scoped_assign'}->{$ofile}->{'cmdline'}; if (defined $cmdline && $cmdline ne '') { ## Save the cacheok value $prevcache = $self->{'cacheok'}; ## Get the current parameters and process the command line my %parameters = $self->current_parameters(); $self->process_cmdline($cmdline, \%parameters); ## Set the parameters on the creator $creator->restore_state(\%parameters); $restore = 1; } } ## If we are generating implicit projects and the file is a ## directory, then we set the dir to the file and empty the file if ($impl && -d $file) { $dir = $file; $file = ''; ## If the implicit assignment value was not a number, then ## we will add this value to our base projects. if ($impl !~ /^\d+$/) { my $bps = $creator->get_baseprojs(); push(@$bps, split(/\s+/, $impl)); $restore = 1; $self->{'cacheok'} = 0; } } ## Generate the key for this project file my $prkey = $self->getcwd() . '/' . ($file eq '' ? $dir : $file) . "-$postkey"; ## We must change to the subdirectory for ## which this project file is intended if ($self->cd($dir)) { my $files_written = []; my $gen_proj_info = []; my $gen_lib_locs = {}; if ($self->{'cacheok'} && defined $allprojects{$prkey}) { $files_written = $allprojects{$prkey}; $gen_proj_info = $allprinfo{$prkey}; $gen_lib_locs = $allliblocs{$prkey}; $status = 1; } else { $status = $creator->generate($self->mpc_basename($file)); ## If any one project file fails, then stop ## processing altogether. if (!$status) { # save the status info and exit. the parent will # see the error. print FD "$status|Unable to process " . ($file eq '' ? " in $dir" : $file) . "\n"; exit(1); # child error } ## Get the individual project information and ## generated file name(s) $files_written = $creator->get_files_written(); $gen_proj_info = $creator->get_project_info(); $gen_lib_locs = $creator->get_lib_locations(); } print FD "$status|''|$self->{'cacheok'}|$previmpl|$prevcache\n"; print FD "$ofile|$prkey|$dir|$cwd|$restore\n"; print FD Dumper ($files_written), "\n"; print FD Dumper ($gen_proj_info), "\n"; print FD Dumper ($gen_lib_locs), "\n"; # there's a callback that sets the project file list # since we can't callback between processes we store # the list for later print FD Dumper ($self->{'project_file_list'}), "\n"; } else { ## Unable to change to the directory. ## We don't restore the state before we leave, ## but that's ok since we will be exiting soon. print FD "$status|Unable to change directory to $dir\n"; exit (1); # child error } } else { ## This one was excluded, so status is ok ## no need to set though since the child will exit. #$status = 1; } exit(0); # child is finished } } for $pid (@pids) { # this will also reap any zombies waitpid($pid, 0); } my ($msg, $cacheok, $ofile, $prkey, $dir, $restore); # read the children's stored data my @kid_data = glob "${wdir}/mpctmp*"; for my $kd (@kid_data) { open (FD, "<$kd") || die "Can't open $kd for read"; ($status, $msg, $cacheok, $previmpl, $prevcache) = split /\|/, ; if (!$status) { return $status, $creator, $msg; } ($ofile, $prkey, $dir, $cwd, $restore) = split /\|/, ; eval (); my $files_written = $VAR1; eval (); my $gen_proj_info = $VAR1; # have to reconstitute gen_lib_locs in the same order it was # created or else multi-process implicit dependency may differ from # single process. eval (); my $gen_lib_locs; for my $k (sort { substr($a, 0 , index ($a, '|')) <=> substr ($b, 0, index ($b, '|')) } keys %$VAR1) { $gen_lib_locs->{substr ($k, index ($k, '|') + 1)} = $VAR1->{$k}; } # have to reconstitute project_file_list in the same order it was # created or else multi-process implicit dependency may differ from # single process. eval (); for my $k (sort { substr($a, 0 , index ($a, '|')) <=> substr ($b, 0, index ($b, '|')) } keys %$VAR1) { $self->{'project_file_list'}->{substr ($k, index ($k, '|') + 1)} = $VAR1->{$k}; } $self->{'cacheok'} = $cacheok; if ($self->cd($dir)) { if ($self->{'cacheok'} && defined $allprojects{$prkey}) { $files_written = $allprojects{$prkey}; $gen_proj_info = $allprinfo{$prkey}; $gen_lib_locs = $allliblocs{$prkey}; $status = 1; } else { # file is already generated. check status if (!$status) { ## We don't restore the state before we leave, ## but that's ok since we will be exiting right now. return $status, $creator, $msg; } ## Get the individual project information and ## generated file name(s) if ($self->{'cacheok'}) { $allprojects{$prkey} = $files_written; $allprinfo{$prkey} = $gen_proj_info; $allliblocs{$prkey} = $gen_lib_locs; } push(@{$self->{'mpc_to_output'}->{$ofile}}, @$files_written); } $self->cd($cwd); $self->save_project_info($files_written, $gen_proj_info, $gen_lib_locs, $dir, \@projects, \%pi, \%liblocs); } else { ## Unable to change to the directory. ## We don't restore the state before we leave, ## but that's ok since we will be exiting soon. return 0, $creator, $msg; } ## Return things to the way they were $impl = $previmpl if (defined $self->{'scoped_assign'}->{$ofile}); if ($restore) { $self->{'cacheok'} = $prevcache; $creator->restore_state(\%gstate); } } ## Add implict project dependencies based on source files ## that have been used by multiple projects. If we do it here ## before we call generate_hierarchy(), we don't have to call it ## in generate_hierarchy() for each workspace. $self->{'projects'} = \@projects; $self->{'project_info'} = \%pi; if ($status && $genimpdep) { #print "aipd: $cwd\n", Dumper ($creator), "\n"; $self->add_implicit_project_dependencies($creator, $cwd); } ## If we are generating the hierarchical workspaces, then do so $self->{'lib_locations'} = \%liblocs; if ($self->get_hierarchy() || $self->workspace_per_project()) { my $orig = $self->{'workspace_name'}; ($status, $errorString) = $self->generate_hierarchy($creator, \@projects, \%pi); $self->{'workspace_name'} = $orig; } ## Reset the projects and project_info $self->{'projects'} = \@projects; $self->{'project_info'} = \%pi; return $status, $creator, $errorString; } sub send_to_parent { my $self = shift; my $arr = shift; # send the data my $sock = new IO::Socket::INET ( PeerAddr => 'localhost', PeerPort => $wport, Proto => 'tcp', ); if (!defined ($sock)) { die "Child could not create socket"; } map { print $sock "$_\n"; } @$arr; $sock->close(); } sub generate_project_files_fork_socket { my $self = shift; my $status = (scalar @{$self->{'project_files'}} == 0 ? 1 : 0); my @projects; my %pi; my %liblocs; my $creator = $self->project_creator('child'); my $cwd = $self->getcwd(); my $impl = $self->get_assignment('implicit'); my $postkey = $creator->get_dynamic() . $creator->get_static() . "-$self"; my $previmpl = $impl; my $prevcache = $self->{'cacheok'}; my %gstate = $creator->save_state(); my $genimpdep = $self->generate_implicit_project_dependencies(); my $errorString; my @save; my $VAR1; $Data::Dumper::Indent = 0; ## Save this project creator setting for later use in the ## number_target_deps() method. $self->{'dependency_is_filename'} = $creator->dependency_is_filename(); ## Remove the address portion of the $self string $postkey =~ s/=.*//; ## Set the source file callback on our project creator $creator->set_source_listing_callback([\&source_listing_callback, $self]); my $pid; my @pids; my @pdata; # parents data sent from children. ## setup workers' data my @wdata; my $beg; my $fin; my $num_prj_files = $#{$self->{'project_files'}} + 1; ## reduce the number of workers if necessary ## what if $num_workers > SOMAXCONN?? (unlikely) if ($num_workers > SOMAXCONN) { $self->diagnostic("Multiprocess MPC reducing # workers from $num_workers to " . SOMAXCONN . ", the max # of queued connections"); $num_workers = SOMAXCONN; } if ($num_workers > $num_prj_files) { # don't fork more workers than there are jobs $self->diagnostic("Multiprocess MPC reducing # workers from $num_workers to $num_prj_files, the number of project files."); $num_workers = $num_prj_files; } my $num_per_worker = int ($num_prj_files / $num_workers); my $num_lines_per_prj = 6; $self->diagnostic("Multiprocess MPC using $num_workers workers to process $num_prj_files project files."); for (my $wctr = 0; $wctr < $num_workers; ++$wctr) { $beg = $wctr * $num_per_worker; $fin = $beg + $num_per_worker - 1; @{$wdata[$wctr]} = @{$self->{'project_files'}}[$beg..$fin]; } ## give any remaining data to last worker. if ($num_prj_files > $num_per_worker * $num_workers) { push @{$wdata[$num_workers - 1]} , @{$self->{'project_files'}}[$num_per_worker * $num_workers..$#{$self->{'project_files'}}]; } ## Setup listener. Do this before fork so that (in the rare case) ## when child tries to send data before the accept(), the socket ## is at least initialized. my $sock = new IO::Socket::INET ( LocalHost => 'localhost', LocalPort => $wport, Proto => 'tcp', Listen => $num_workers, Reuse => 1 ); if (!defined ($sock)) { die "Error setting up parent listener"; } ## spawn the workers. my $id = 0; while ($id < $num_workers) { # use pipes as barrier $pid = fork(); if ($pid != 0) { push @pids, $pid; } else { ## after fork, child knows its id and which data to use. $self->{'pid'} = 'child'; last; } ++$id; } if ($self->{pid} eq 'parent') { $self->diagnostic("Multiprocess MPC using port $wport."); # read the data from the kids for (my $ctr = 0; $ctr < $num_workers; ++$ctr) { my $handle = $sock->accept(); die "Accept error" if !$handle; my $id = <$handle>; @{$pdata[$id]} = <$handle>; # each project as 6 records if ((($#{$pdata[$id]} + 1) / $num_lines_per_prj) != $num_per_worker) { if ($#{$pdata[$id]} != 0) { # 0 indicates a failed status which will be delt with later if (($id == $num_workers - 1) && ((($#{$pdata[$id]} + 1) / $num_lines_per_prj) != $num_per_worker + $#{$self->{'project_files'}} + 1 - ($num_workers * $num_per_worker))) { # The last child may have more than num_per_worker records my $rec = $#{$pdata[$id]} + 1; my $exp = $num_per_worker * $num_lines_per_prj; die "There is an error in the child data. Expected $exp. Received $rec"; } } } } # all data has been read $sock->close(); } else { ## This is the code the workers run. undef $sock; ## generate projects my @cdata = ($id); foreach my $ofile (@{$wdata[$id]}) { if (!$self->excluded($ofile)) { my $file = $ofile; my $dir = $self->mpc_dirname($file); my $restore = 0; if (defined $self->{'scoped_assign'}->{$ofile}) { ## Handle the implicit assignment my $oi = $self->{'scoped_assign'}->{$ofile}->{'implicit'}; if (defined $oi) { $previmpl = $impl; $impl = $oi; } ## Handle the cmdline assignment my $cmdline = $self->{'scoped_assign'}->{$ofile}->{'cmdline'}; if (defined $cmdline && $cmdline ne '') { ## Save the cacheok value $prevcache = $self->{'cacheok'}; ## Get the current parameters and process the command line my %parameters = $self->current_parameters(); $self->process_cmdline($cmdline, \%parameters); ## Set the parameters on the creator $creator->restore_state(\%parameters); $restore = 1; } } ## If we are generating implicit projects and the file is a ## directory, then we set the dir to the file and empty the file if ($impl && -d $file) { $dir = $file; $file = ''; ## If the implicit assignment value was not a number, then ## we will add this value to our base projects. if ($impl !~ /^\d+$/) { my $bps = $creator->get_baseprojs(); push(@$bps, split(/\s+/, $impl)); $restore = 1; $self->{'cacheok'} = 0; } } ## Generate the key for this project file my $prkey = $self->getcwd() . '/' . ($file eq '' ? $dir : $file) . "-$postkey"; ## We must change to the subdirectory for ## which this project file is intended if ($self->cd($dir)) { my $files_written = []; my $gen_proj_info = []; my $gen_lib_locs = {}; if ($self->{'cacheok'} && defined $allprojects{$prkey}) { $files_written = $allprojects{$prkey}; $gen_proj_info = $allprinfo{$prkey}; $gen_lib_locs = $allliblocs{$prkey}; $status = 1; } else { $status = $creator->generate($self->mpc_basename($file)); ## If any one project file fails, then stop ## processing altogether. if (!$status) { # save the status info and exit. the parent will # see the error. @cdata = ($id); push @cdata, "$status|Unable to process " . ($file eq '' ? " in $dir" : $file) . "\n"; $self->send_to_parent(\@cdata); exit(1); # child error } ## Get the individual project information and ## generated file name(s) $files_written = $creator->get_files_written(); $gen_proj_info = $creator->get_project_info(); $gen_lib_locs = $creator->get_lib_locations(); } push @cdata, "$status|''|$self->{'cacheok'}|$previmpl|$prevcache"; push @cdata, "$ofile|$prkey|$dir|$cwd|$restore"; push @cdata, Dumper ($files_written); push @cdata, Dumper ($gen_proj_info); push @cdata, Dumper ($gen_lib_locs); # there's a callback that sets the project file list # since we can't callback between processes we store # the list for later push @cdata, Dumper ($self->{'project_file_list'}); $self->cd($cwd); } else { ## Unable to change to the directory. ## We don't restore the state before we leave, ## but that's ok since we will be exiting soon. @cdata = ($id); push @cdata, "$status|Unable to change directory to $dir\n"; $self->send_to_parent(\@cdata); exit (1); # child error } ## Return things to the way they were $impl = $previmpl if (defined $self->{'scoped_assign'}->{$ofile}); if ($restore) { $self->{'cacheok'} = $prevcache; $creator->restore_state(\%gstate); } } else { ## This one was excluded, so status is ok ## no need to set though since the child will exit. #$status = 1; } } # send all the data at once. $self->send_to_parent(\@cdata); exit (0); # end of child } # This is the parent again. for $pid (@pids) { # this will reap any zombies waitpid($pid, 0); } my ($msg, $cacheok, $ofile, $prkey, $dir, $restore); # read the children's stored data for (my $i = 0; $i < $num_workers; ++$i) { for (my $j = 0; $j < $#{$pdata[$i]} + 1; ++$j) { ($status, $msg, $cacheok, $previmpl, $prevcache) = split /\|/, ${$pdata[$i]}[$j++]; # check that the child was successful if (!$status) { return $status, $creator, $msg; } ($ofile, $prkey, $dir, $cwd, $restore) = split /\|/, ${$pdata[$i]}[$j++]; eval (${$pdata[$i]}[$j++]); my $files_written = $VAR1; eval (${$pdata[$i]}[$j++]); my $gen_proj_info = $VAR1; # have to reconstitute gen_lib_locs in the same order it was # created or else multi-process implicit dependency may differ from # single process. eval (${$pdata[$i]}[$j++]); my $gen_lib_locs; for my $k (sort { substr($a, 0 , index ($a, '|')) <=> substr ($b, 0, index ($b, '|')) } keys %$VAR1) { $gen_lib_locs->{substr ($k, index ($k, '|') + 1)} = $VAR1->{$k}; } # have to reconstitute project_file_list in the same order it was # created or else multi-process implicit dependency may differ from # single process. eval (${$pdata[$i]}[$j]); for my $k (sort { substr($a, 0 , index ($a, '|')) <=> substr ($b, 0, index ($b, '|')) } keys %$VAR1) { $self->{'project_file_list'}->{substr ($k, index ($k, '|') + 1)} = $VAR1->{$k}; } $self->{'cacheok'} = $cacheok; if ($self->cd($dir)) { if ($self->{'cacheok'} && defined $allprojects{$prkey}) { $files_written = $allprojects{$prkey}; $gen_proj_info = $allprinfo{$prkey}; $gen_lib_locs = $allliblocs{$prkey}; $status = 1; } else { # file is already generated. check status if (!$status) { ## We don't restore the state before we leave, ## but that's ok since we will be exiting right now. return $status, $creator, $msg; } ## Get the individual project information and ## generated file name(s) if ($self->{'cacheok'}) { $allprojects{$prkey} = $files_written; $allprinfo{$prkey} = $gen_proj_info; $allliblocs{$prkey} = $gen_lib_locs; } push(@{$self->{'mpc_to_output'}->{$ofile}}, @$files_written); } $self->cd($cwd); $self->save_project_info($files_written, $gen_proj_info, $gen_lib_locs, $dir, \@projects, \%pi, \%liblocs); } else { ## Unable to change to the directory. ## We don't restore the state before we leave, ## but that's ok since we will be exiting soon. return 0, $creator, $msg; } ## Return things to the way they were $impl = $previmpl if (defined $self->{'scoped_assign'}->{$ofile}); if ($restore) { $self->{'cacheok'} = $prevcache; $creator->restore_state(\%gstate); } } } ## Add implict project dependencies based on source files ## that have been used by multiple projects. If we do it here ## before we call generate_hierarchy(), we don't have to call it ## in generate_hierarchy() for each workspace. $self->{'projects'} = \@projects; $self->{'project_info'} = \%pi; if ($status && $genimpdep) { #print "aipd: $cwd\n", Dumper ($creator), "\n"; $self->add_implicit_project_dependencies($creator, $cwd); } ## If we are generating the hierarchical workspaces, then do so $self->{'lib_locations'} = \%liblocs; if ($self->get_hierarchy() || $self->workspace_per_project()) { my $orig = $self->{'workspace_name'}; ($status, $errorString) = $self->generate_hierarchy($creator, \@projects, \%pi); $self->{'workspace_name'} = $orig; } ## Reset the projects and project_info $self->{'projects'} = \@projects; $self->{'project_info'} = \%pi; return $status, $creator, $errorString; } sub array_contains { my($self, $left, $right) = @_; my %check; ## Initialize the hash keys with the left side array @check{@$left} = (); ## Check each element on the right against the left. foreach my $r (@$right) { return 1 if (exists $check{$r}); } return 0; } sub non_intersection { my($self, $left, $right, $over) = @_; my $status = 0; my %check; ## Initialize the hash keys with the left side array @check{@$left} = (); ## Check each element on the right against the left. ## Store anything that isn't in the left side in the over array. foreach my $r (@$right) { if (exists $check{$r}) { $status = 1; } else { push(@$over, $r); } } return $status; } sub indirect_dependency { my($self, $dir, $ccheck, $cfile) = @_; $self->{'indirect_checked'}->{$ccheck} = 1; if (index($self->{'project_info'}->{$ccheck}->[ProjectCreator::DEPENDENCIES], $cfile) >= 0) { return 1; } else { my $deps = $self->create_array( $self->{'project_info'}->{$ccheck}->[ProjectCreator::DEPENDENCIES]); foreach my $dep (@$deps) { if (defined $self->{'project_info'}->{"$dir$dep"} && !defined $self->{'indirect_checked'}->{"$dir$dep"} && $self->indirect_dependency($dir, "$dir$dep", $cfile)) { return 1; } } } return 0; } sub add_implicit_project_dependencies { my($self, $creator, $cwd) = @_; my %bidir; my %save; ## Take the current working directory and regular expression'ize it. $cwd = $self->escape_regex_special($cwd); ## Look at each projects file list and check it against all of the ## others. If any of the other projects file lists contains anothers ## file, then they are dependent (due to build parallelism). So, we ## append the dependency and remove the file in question from the ## project so that the next time around the foreach, we don't find it ## as a dependent on the one that we just modified. my @pflkeys = keys %{$self->{'project_file_list'}}; foreach my $key (@pflkeys) { foreach my $ikey (@pflkeys) { ## Not the same project and ## The same directory and ## We've not already added a dependency to this project if ($key ne $ikey && ($self->{'project_file_list'}->{$key}->[1] eq $self->{'project_file_list'}->{$ikey}->[1]) && (!defined $bidir{$ikey} || !$self->array_contains($bidir{$ikey}, [$key]))) { my @over; if ($self->non_intersection( $self->{'project_file_list'}->{$key}->[2], $self->{'project_file_list'}->{$ikey}->[2], \@over)) { ## The project contains shared source files, so we need to ## look into adding an implicit inter-project dependency. $save{$ikey} = $self->{'project_file_list'}->{$ikey}->[2]; $self->{'project_file_list'}->{$ikey}->[2] = \@over; if (defined $bidir{$key}) { push(@{$bidir{$key}}, $ikey); } else { $bidir{$key} = [$ikey]; } my $append = $creator->translate_value('after', $key); my $file = $self->{'project_file_list'}->{$ikey}->[0]; my $dir = $self->{'project_file_list'}->{$ikey}->[1]; my $cfile = $creator->translate_value('after', $ikey); ## Remove our starting directory from the projects directory ## to get the right part of the directory to prepend. $dir =~ s/^$cwd[\/\\]*//; ## Turn the append value into a key for 'project_info' and ## prepend the directory to the file. my $ccheck = $append; $ccheck =~ s/"//g; if ($dir ne '') { $dir .= '/'; $ccheck = "$dir$ccheck"; $file = "$dir$file"; } ## If the append value key contains a reference to the project ## that we were going to append the dependency value, then ## ignore the generated dependency. It is redundant and ## quite possibly wrong. $self->{'indirect_checked'} = {}; if (defined $self->{'project_info'}->{$file} && (!defined $self->{'project_info'}->{$ccheck} || !$self->indirect_dependency($dir, $ccheck, $cfile))) { ## Append the dependency $self->{'project_info'}->{$file}->[ProjectCreator::DEPENDENCIES] .= " $append"; } } } } } ## Restore the modified values in case this method is called again ## which is the case when using the -hierarchy option. foreach my $skey (keys %save) { $self->{'project_file_list'}->{$skey}->[2] = $save{$skey}; } } sub get_projects { return $_[0]->{'projects'}; } sub get_project_info { return $_[0]->{'project_info'}; } sub get_lib_locations { return $_[0]->{'lib_locations'}; } sub get_first_level_directory { my($self, $file) = @_; if (($file =~ tr/\///) > 0) { my $dir = $file; $dir =~ s/^([^\/]+\/).*/$1/; $dir =~ s/\/+$//; return $dir; } return '.'; } sub get_associated_projects { return $_[0]->{'associated'}; } sub sort_within_group { my($self, $list, $start, $end) = @_; my $deps; my %seen; my $ccount = 0; my $cmax = ($end - $start) + 1; my $previ = -1; my $prevpjs = []; my $movepjs = []; ## Put the projects in the order specified ## by the project dependencies. for (my $i = $start; $i <= $end; ++$i) { ## If our moved project equals our previously moved project then ## we count this as a possible circular dependency. my $key = "@$list"; if ($seen{$key} || (defined $$movepjs[0] && defined $$prevpjs[0] && $$movepjs[0] == $$prevpjs[0] && $$movepjs[1] == $$prevpjs[1])) { ++$ccount; } else { $ccount = 0; } ## Detect circular dependencies if ($ccount > $cmax) { my @prjs; foreach my $mvgr (@$movepjs) { push(@prjs, $$list[$mvgr]); } my $other = $$movepjs[0] - 1; if ($other < $start || $other == $$movepjs[1] || !defined $$list[$other]) { $other = undef; } $self->warning('Circular dependency detected while processing the ' . ($self->{'current_input'} eq '' ? 'default' : $self->{'current_input'}) . ' workspace. ' . 'The following projects are involved: ' . (defined $other ? "$$list[$other], " : '') . join(' and ', @prjs)); return; } ## Keep track of the previous project movement $seen{$key} = 1; $prevpjs = $movepjs; $movepjs = [] if ($previ < $i); $previ = $i; $deps = $self->get_validated_ordering($$list[$i]); if (defined $$deps[0]) { my $baseproj = ($self->{'dependency_is_filename'} ? $self->mpc_basename($$list[$i]) : $self->{'project_info'}->{$$list[$i]}->[ProjectCreator::PROJECT_NAME]); my $moved = 0; foreach my $dep (@$deps) { if ($baseproj ne $dep) { ## See if the dependency is listed after this project for (my $j = $i + 1; $j <= $end; ++$j) { my $ldep = ($self->{'dependency_is_filename'} ? $self->mpc_basename($$list[$j]) : $self->{'project_info'}->{$$list[$j]}->[ProjectCreator::PROJECT_NAME]); if ($ldep eq $dep) { $movepjs = [$i, $j]; ## If so, move it in front of the current project. ## The original code, which had splices, didn't always ## work correctly (especially on AIX for some reason). my $save = $$list[$j]; for (my $k = $j; $k > $i; --$k) { $$list[$k] = $$list[$k - 1]; } $$list[$i] = $save; ## Mark that an entry has been moved $moved = 1; $j--; } } } } --$i if ($moved); } } } sub build_dependency_chain { my($self, $name, $len, $list, $ni, $glen, $groups, $map, $gdeps) = @_; my $deps = $self->get_validated_ordering($name); if (defined $$deps[0]) { foreach my $dep (@$deps) { ## Find the item in the list that matches our current dependency my $mapped = $$map{$dep}; if (defined $mapped) { for (my $i = 0; $i < $len; $i++) { if ($$list[$i] eq $mapped) { ## Locate the group number to which the dependency belongs for (my $j = 0; $j < $glen; $j++) { if ($i >= $$groups[$j]->[0] && $i <= $$groups[$j]->[1]) { if ($j != $ni) { ## Add every project in the group to the dependency chain for (my $k = $$groups[$j]->[0]; $k <= $$groups[$j]->[1]; $k++) { my $ldep = $self->mpc_basename($$list[$k]); if (!exists $$gdeps{$ldep}) { $$gdeps{$ldep} = 1; $self->build_dependency_chain($$list[$k], $len, $list, $j, $glen, $groups, $map, $gdeps); } } } last; } } last; } } } $$gdeps{$dep} = 1; } } } sub sort_by_groups { my($self, $list, $grindex) = @_; my @groups = @$grindex; my $llen = scalar(@$list); ## Check for duplicates first before we attempt to sort the groups. ## If there is a duplicate, we quietly return immediately. The ## duplicates will be flagged as an error when creating the main ## workspace. my %dupcheck; foreach my $proj (@$list) { my $base = $self->mpc_basename($proj); return undef if (defined $dupcheck{$base}); $dupcheck{$base} = $proj; } my %circular_checked; for (my $gi = 0; $gi <= $#groups; ++$gi) { ## Detect circular dependencies if (!$circular_checked{$gi}) { $circular_checked{$gi} = 1; for (my $i = $groups[$gi]->[0]; $i <= $groups[$gi]->[1]; ++$i) { my %gdeps; $self->build_dependency_chain($$list[$i], $llen, $list, $gi, $#groups + 1, \@groups, \%dupcheck, \%gdeps); if (exists $gdeps{$self->mpc_basename($$list[$i])}) { ## There was a cirular dependency, get all of the directories ## involved. my %dirs; foreach my $gdep (keys %gdeps) { $dirs{$self->mpc_dirname($dupcheck{$gdep})} = 1; } ## If the current directory was involved, translate that into ## a directory relative to the start directory. if (defined $dirs{'.'}) { my $cwd = $self->getcwd(); my $start = $self->getstartdir(); if ($cwd ne $start) { my $startre = $self->escape_regex_special($start); delete $dirs{'.'}; $cwd =~ s/^$startre[\\\/]//; $dirs{$cwd} = 1; } } ## Display a warining to the user my @keys = sort keys %dirs; $self->warning('Circular directory dependency detected in the ' . ($self->{'current_input'} eq '' ? 'default' : $self->{'current_input'}) . ' workspace. ' . 'The following director' . ($#keys == 0 ? 'y is' : 'ies are') . ' involved: ' . join(', ', @keys)); return; } } } ## Build up the group dependencies my %gdeps; for (my $i = $groups[$gi]->[0]; $i <= $groups[$gi]->[1]; ++$i) { my $deps = $self->get_validated_ordering($$list[$i]); @gdeps{@$deps} = () if (defined $$deps[0]); } ## Search the rest of the groups for any of the group dependencies for (my $gj = $gi + 1; $gj <= $#groups; ++$gj) { for (my $i = $groups[$gj]->[0]; $i <= $groups[$gj]->[1]; ++$i) { if (exists $gdeps{$self->mpc_basename($$list[$i])}) { ## Move this group ($gj) in front of the current group ($gi) my @save; for (my $j = $groups[$gi]->[1] + 1; $j <= $groups[$gj]->[1]; ++$j) { push(@save, $$list[$j]); } my $offset = $groups[$gj]->[1] - $groups[$gi]->[1]; for (my $j = $groups[$gi]->[1]; $j >= $groups[$gi]->[0]; --$j) { $$list[$j + $offset] = $$list[$j]; } for (my $j = 0; $j <= $#save; ++$j) { $$list[$groups[$gi]->[0] + $j] = $save[$j]; } ## Update the group indices my $shiftamt = ($groups[$gi]->[1] - $groups[$gi]->[0]) + 1; for (my $j = $gi + 1; $j <= $gj; ++$j) { $groups[$j]->[0] -= $shiftamt; $groups[$j]->[1] -= $shiftamt; } my @grsave = @{$groups[$gi]}; $grsave[0] += $offset; $grsave[1] += $offset; for (my $j = $gi; $j < $gj; ++$j) { $groups[$j] = $groups[$j + 1]; $circular_checked{$j} = $circular_checked{$j + 1}; } $groups[$gj] = \@grsave; $circular_checked{$gj} = 1; ## Start over from the first group $gi = -1; ## Exit from the outter ($gj) loop $gj = $#groups; last; } } } } } sub sort_dependencies { my($self, $projects, $groups) = @_; my @list = sort { return $self->sort_projects_by_directory($a, $b) + 0; } @$projects; ## The list above is sorted by directory in order to keep projects ## within the same directory together. Otherwise, when groups are ## created we may get multiple groups for the same directory. ## Put the projects in the order specified ## by the project dependencies. We only need to do ## this if there is more than one element in the array. if ($#list > 0) { ## If the parameter wasn't passed in or it was passed in ## and was true, sort with directory groups in mind if (!defined $groups || $groups) { ## First determine the individual groups my @grindex; my $previous = [0, undef]; for (my $li = 0; $li <= $#list; ++$li) { my $dir = $self->get_first_level_directory($list[$li]); if (!defined $previous->[1]) { $previous = [$li, $dir]; } elsif ($previous->[1] ne $dir) { push(@grindex, [$previous->[0], $li - 1]); $previous = [$li, $dir]; } } push(@grindex, [$previous->[0], $#list]); ## Next, sort the individual groups foreach my $gr (@grindex) { $self->sort_within_group(\@list, @$gr) if ($$gr[0] != $$gr[1]); } ## Now sort the groups as single entities $self->sort_by_groups(\@list, \@grindex) if ($#grindex > 0); } else { $self->sort_within_group(\@list, 0, $#list); } } return @list; } sub number_target_deps { my($self, $projects, $pjs, $targets, $groups) = @_; my @list = $self->sort_dependencies($projects, $groups); ## This block of code must be done after the list of dependencies ## has been sorted in order to get the correct project numbers. for (my $i = 0; $i <= $#list; ++$i) { my $project = $list[$i]; if (defined $$pjs{$project}) { my($name, $deps) = @{$$pjs{$project}}; if (defined $deps && $deps ne '') { my @numbers; my %dhash; @dhash{@{$self->create_array($deps)}} = (); ## For each dependency, search in the sorted list ## up to the point of this project for the projects ## that this one depends on. When the project is ## found, we put the target number in the numbers array. for (my $j = 0; $j < $i; ++$j) { ## If the dependency is a filename, then take the basename of ## the project file. Otherwise, get the project name based on ## the project file from the "project_info". my $key = ($self->{'dependency_is_filename'} ? $self->mpc_basename($list[$j]) : $self->{'project_info'}->{$list[$j]}->[ProjectCreator::PROJECT_NAME]); push(@numbers, $j) if (exists $dhash{$key}); } ## Store the array in the hash keyed on the project file. $$targets{$project} = \@numbers if (defined $numbers[0]); } } } return @list; } sub project_target_translation { my($self, $case) = @_; my %map; ## Translate project names to avoid target collision with ## some versions of make. foreach my $key (keys %{$self->{'project_info'}}) { my $dir = $self->mpc_dirname($key); my $name = $self->{'project_info'}->{$key}->[ProjectCreator::PROJECT_NAME]; ## We want to compare to the upper most directory. This will be the ## one that may conflict with the project name. $dir =~ s/[\/\\].*//; if (($case && $dir eq $name) || (!$case && lc($dir) eq lc($name))) { $map{$key} = "$name-target"; } else { $map{$key} = $name; } } return \%map; } sub optionError { my($self, $str) = @_; $self->warning("$self->{'current_input'}: $str.") if (defined $str); } sub process_cmdline { my($self, $cmdline, $parameters) = @_; ## Set cache use to default. $self->{'cacheok'} = $self->default_cacheok(); if (defined $cmdline && $cmdline ne '') { my $args = $self->create_array($cmdline); ## Look for environment variables foreach my $arg (@$args) { $self->replace_env_vars(\$arg) if ($arg =~ /\$/); } my $options = $self->options('MWC', {}, 0, @$args); if (defined $options) { foreach my $key (keys %$options) { my $type = $self->is_set($key, $options); if (!defined $type) { ## This option was not used, so we ignore it } elsif ($type eq 'ARRAY') { push(@{$parameters->{$key}}, @{$options->{$key}}); } elsif ($type eq 'HASH') { my $merge = ($key eq 'addtemp' || $key eq 'addproj'); foreach my $hk (keys %{$options->{$key}}) { if ($merge && defined $parameters->{$key}->{$hk}) { push(@{$parameters->{$key}->{$hk}}, @{$options->{$key}->{$hk}}); } else { $parameters->{$key}->{$hk} = $options->{$key}->{$hk}; } } } elsif ($type eq 'SCALAR') { $parameters->{$key} = $options->{$key}; } } ## Some option data members are named consistently with the MPC ## option name. In this case, we can use this foreach loop. foreach my $consistent_opt ('exclude', 'for_eclipse', 'gendot', 'gfeature_file', 'into', 'make_coexistence', 'recurse') { ## Issue warnings for the options provided by the user if ($self->is_set($consistent_opt, $options)) { $self->optionError("-$consistent_opt is ignored"); } } ## For those that are inconsistent, we have special code to deal ## with them. if ($self->is_set('reldefs', $options)) { $self->optionError('-noreldefs is ignored'); } ## Make sure no input files were specified (we can't handle it). if (defined $options->{'input'}->[0]) { $self->optionError('Command line files ' . 'specified in a workspace are ignored'); } ## Determine if it's ok to use the cache my @cacheInvalidating = ('global', 'include', 'baseprojs', 'template', 'ti', 'relative', 'language', 'addtemp', 'addproj', 'feature_file', 'features', 'use_env', 'expand_vars'); foreach my $key (@cacheInvalidating) { if ($self->is_set($key, $options)) { $self->{'cacheok'} = 0; last; } } } } } sub current_parameters { my $self = shift; my %parameters = $self->save_state(); ## We always want the project creator to generate a toplevel $parameters{'toplevel'} = 1; return %parameters; } sub project_creator { my $self = shift; my $pid = shift; if (not defined $pid) { $pid = 'parent'; } my $str = "$self"; ## NOTE: If the subclassed WorkspaceCreator name prefix does not ## match the name prefix of the ProjectCreator, this code ## will not work and the subclassed WorkspaceCreator will ## need to override this method. $str =~ s/Workspace/Project/; $str =~ s/=HASH.*//; ## Set up values for each project creator ## If we have command line arguments in the workspace, then ## we process them before creating the project creator my $cmdline = $self->get_assignment('cmdline'); my %parameters = $self->current_parameters(); $self->process_cmdline($cmdline, \%parameters); ## Create the new project creator with the updated parameters return $str->new($parameters{'global'}, $parameters{'include'}, $parameters{'template'}, $parameters{'ti'}, $parameters{'dynamic'}, $parameters{'static'}, $parameters{'relative'}, $parameters{'addtemp'}, $parameters{'addproj'}, $parameters{'progress'}, $parameters{'toplevel'}, $parameters{'baseprojs'}, $self->{'global_feature_file'}, $parameters{'relative_file'}, $parameters{'feature_file'}, $parameters{'features'}, $parameters{'hierarchy'}, $self->{'exclude'}->{$self->{'wctype'}}, $self->make_coexistence(), $parameters{'name_modifier'}, $parameters{'apply_project'}, $self->{'generate_ins'} || $parameters{'genins'}, $self->get_into(), $parameters{'language'}, $parameters{'use_env'}, $parameters{'expand_vars'}, $self->{'gendot'}, $parameters{'comments'}, $self->{'for_eclipse'}, $pid); } sub sort_files { #my $self = shift; return 0; } sub make_coexistence { return $_[0]->{'coexistence'}; } sub get_modified_workspace_name { my($self, $name, $ext, $nows) = @_; my $nmod = $self->get_name_modifier(); my $oname = $name; if (defined $nmod) { $nmod =~ s/\*/$name/g; $name = $nmod; } ## If this is a per project workspace, then we should not ## modify the workspace name. It may overwrite another workspace ## but that's ok, it will only be a per project workspace. ## Also, if we don't want the workspace name attached ($nows) then ## we just return the name plus the extension. return "$name$ext" if ($nows || $self->{'per_project_workspace_name'}); my $pwd = $self->getcwd(); my $type = $self->{'wctype'}; my $wsname = $self->get_workspace_name(); if (!defined $previous_workspace_name{$type}->{$pwd}) { $previous_workspace_name{$type}->{$pwd} = $wsname; $self->{'current_workspace_name'} = undef; } else { my $prefix = ($oname eq $wsname ? $name : "$name.$wsname"); $previous_workspace_name{$type}->{$pwd} = $wsname; while ($self->file_written("$prefix" . ($self->{'modified_count'} > 0 ? ".$self->{'modified_count'}" : '') . "$ext")) { ++$self->{'modified_count'}; } $self->{'current_workspace_name'} = "$prefix" . ($self->{'modified_count'} > 0 ? ".$self->{'modified_count'}" : '') . "$ext"; } return (defined $self->{'current_workspace_name'} ? $self->{'current_workspace_name'} : "$name$ext"); } sub generate_recursive_input_list { my($self, $dir, $exclude) = @_; return $self->extension_recursive_input_list($dir, $exclude, $wsext); } sub verify_build_ordering { my $self = shift; foreach my $project (@{$self->{'projects'}}) { $self->get_validated_ordering($project); } } sub get_validated_ordering { my($self, $project) = @_; my $deps; if (defined $self->{'ordering_cache'}->{$project}) { $deps = $self->{'ordering_cache'}->{$project}; } else { $deps = []; if (defined $self->{'project_info'}->{$project}) { my($name, $dstr) = @{$self->{'project_info'}->{$project}}; if (defined $dstr && $dstr ne '') { $deps = $self->create_array($dstr); my $dlen = scalar(@$deps); for (my $i = 0; $i < $dlen; $i++) { my $dep = $$deps[$i]; my $found = 0; ## Avoid circular dependencies if ($dep ne $name && $dep ne $self->mpc_basename($project)) { foreach my $p (@{$self->{'projects'}}) { if ($dep eq $self->{'project_info'}->{$p}->[ProjectCreator::PROJECT_NAME] || $dep eq $self->mpc_basename($p)) { $found = 1; last; } } if (!$found) { if ($self->{'verbose_ordering'}) { $self->warning("processing '$project' and '$name' references '$dep' which has " . "not been processed."); } splice(@$deps, $i, 1); --$dlen; --$i; } } else { ## If a project references itself, we must remove it ## from the list of dependencies. splice(@$deps, $i, 1); --$dlen; --$i; } } } $self->{'ordering_cache'}->{$project} = $deps; } } return $deps; } sub source_listing_callback { my($self, $project_file, $project_name, $list) = @_; # have to keep projects in the the same order as if run in # single process. otherwise implicit dependencies produces # different output if ($self->{'pid'} ne 'parent') { $project_name = ++$self->{'imp_dep_ctr'} . '|' . $project_name; } $self->{'project_file_list'}->{$project_name} = [ $project_file, $self->getcwd(), $list ]; } sub sort_projects_by_directory { my($self, $left, $right) = @_; my $sa = index($left, '/'); my $sb = index($right, '/'); if ($sa >= 0 && $sb == -1) { return 1; } elsif ($sb >= 0 && $sa == -1) { return -1; } return $left cmp $right; } sub get_relative_dep_file { my($self, $creator, $project, $dep) = @_; ## If the dependency is a filename, we have to find the key that ## matches the project file. if ($creator->dependency_is_filename()) { foreach my $key (keys %{$self->{'project_file_list'}}) { if ($self->{'project_file_list'}->{$key}->[0] eq $dep) { $dep = $key; last; } } } if (defined $self->{'project_file_list'}->{$dep}) { my $base = $self->{'project_file_list'}->{$dep}->[1]; my @dirs = grep(!/^$/, split('/', $base)); my $last = -1; $project =~ s/^\///; for (my $i = 0; $i <= $#dirs; $i++) { my $dir = $dirs[$i]; if ($project =~ s/^$dir\///) { $last = $i; } else { last; } } my $dependee = $self->{'project_file_list'}->{$dep}->[0]; if ($last == -1) { return $base . '/' . $dependee; } else { my $built = ''; for (my $i = $last + 1; $i <= $#dirs; $i++) { $built .= $dirs[$i] . '/'; } $built .= $dependee; ## If the project contains a portion of the current working directory, ## we need to strip it off. If the workspace is a directory below one ## of the projects, the directory count will be incorrect due to the ## use of '..' within the project path. my $re; my $dir = $self->getcwd(); while($dir =~ s!^[^/]*/!! && ($re = $dir . '/' . ('../' x (($dir =~ tr/\///) + 1))) && $project !~ s!^$re!!) { } ## The code above is tricky $self->debug("Project on which this project depends: $project"); my $dircount = ($project =~ tr/\///); return ('../' x $dircount) . $built; } } return undef; } sub create_command_line_string { my $self = shift; my @args = @_; my $str; foreach my $arg (@args) { $arg =~ s/^\-\-/-/; if ($arg =~ /\$/ && $^O ne 'MSWin32') { ## If we're not running on Windows and the command line argument ## contains a dollar sign, we need to wrap the argument in single ## quotes so that the UNIX shell does not interpret it. $arg = "'$arg'"; } else { ## Unfortunately, the Windows command line shell does not ## understand single quotes correctly. So, we have the distinction ## above and handle dollar signs here too. $arg = "\"$arg\"" if ($arg =~ /[\s\*\$]/); } if (defined $str) { $str .= " $arg"; } else { $str = $arg; } } return $str; } sub print_workspace_comment { my $self = shift; my $fh = shift; if ($self->{'workspace_comments'}) { foreach my $line (@_) { print $fh $line; } } } sub get_initial_relative_values { my $self = shift; return $self->get_relative(), $self->get_expand_vars(); } sub get_secondary_relative_values { return \%ENV, $_[0]->get_expand_vars(); } sub convert_all_variables { #my $self = shift; return 1; } sub workspace_file_name { my $self = shift; return $self->get_modified_workspace_name($self->get_workspace_name(), $self->workspace_file_extension()); } sub relative { my $self = shift; my $line = $self->SUPER::relative(shift); $line =~ s/\\/\//g; return $line; } # ************************************************************ # Virtual Methods To Be Overridden # ************************************************************ sub requires_make_coexistence { #my $self = shift; return 0; } sub supports_make_coexistence { #my $self = shift; return 0; } sub generate_implicit_project_dependencies { #my $self = shift; return 0; } sub workspace_file_extension { #my $self = shift; return ''; } sub workspace_per_project { #my $self = shift; return 0; } sub default_verbose_ordering { return 0; # Don't warning if there are missing dependencies. } sub pre_workspace { #my $self = shift; #my $fh = shift; #my $creator = shift; #my $top = shift; } sub write_comps { #my $self = shift; #my $fh = shift; #my $creator = shift; #my $top = shift; } sub post_workspace { #my $self = shift; #my $fh = shift; #my $creator = shift; #my $top = shift; } sub requires_forward_slashes { #my $self = shift; return 0; } sub get_additional_output { #my $self = shift; ## This method should return an array reference of array references. ## For each entry, the array should be laid out as follows: ## [ , ## , ## , ## , ## ..., ## ## ] return []; } 1; ace-6.4.5+dfsg.orig/MPC/modules/HTMLProjectCreator.pm0000644000175000017500000000671313154167361020336 0ustar tggtggpackage HTMLProjectCreator; # ************************************************************ # Description : An HTML project creator to display all settings # Author : Justin Michel & Chad Elliott # Create Date : 8/25/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ProjectCreator; use XMLProjectBase; use vars qw(@ISA); @ISA = qw(XMLProjectBase ProjectCreator); # ************************************************************ # Data Section # ************************************************************ my $style_indent = .5; # ************************************************************ # Subroutine Section # ************************************************************ sub file_sorter { #my $self = shift; #my $left = shift; #my $right = shift; return lc($_[1]) cmp lc($_[2]); } sub label_nodes { my($self, $hash, $nodes, $level) = @_; foreach my $key (sort keys %$hash) { push(@$nodes, [$level, $key]); $self->label_nodes($$hash{$key}, $nodes, $level + 1); } } sub count_levels { my($self, $hash, $current, $count) = @_; foreach my $key (keys %$hash) { $self->count_levels($$hash{$key}, $current + 1, $count); } $$count = $current if ($current > $$count); } sub fill_value { my($self, $name) = @_; my $value; if ($name eq 'inheritance_nodes') { ## Get the nodes with numeric labels for the level my @nodes; $self->label_nodes($self->get_inheritance_tree(), \@nodes, 0); ## Push each node onto the value array $value = []; for(my $i = 0; $i <= $#nodes; ++$i) { my $file = $nodes[$i]->[1]; my $dir = $self->mpc_dirname($file); my $base = $self->mpc_basename($file); ## Relative paths do not work at all in a web browser $file = $base if ($dir eq '.'); my $path = ($base eq $file ? $self->getcwd() . '/' : ''); my $name; if ($i == 0) { ## If this is the first node, then replace the base filename ## with the actual project name. $name = $self->project_name(); } else { ## This is a base project, so we use the basename and ## remove the file extension. $name = $base; $name =~ s/\.[^\.]+$//; } ## Create the div and a tags. push(@$value, '
' . '
' . $name . '
'); } } elsif ($name eq 'tree_styles') { ## Count the number of levels deep the inheritance goes my $count = 0; $self->count_levels($self->get_inheritance_tree(), 0, \$count); my $margin = 0; my $start = 100; my $max = 255; my $inc = ($count ne 0 ? int(($max - $start) / $count) : $max); ## Push each tree style onto the value array $value = []; for(my $i = 0; $i < $count; ++$i) { push(@$value, ".tree$i { background-color: #" . sprintf("%02x%02x%02x", 0, $start, $start) . ';' . ($margin != 0 ? " margin-left: $margin" . 'in;' : '') . ' }'); $start += $inc; $margin += $style_indent; } } return $value; } sub project_file_extension { #my $self = shift; return '.html'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/WixWorkspaceCreator.pm0000644000175000017500000001325413154167361020667 0ustar tggtggpackage WixWorkspaceCreator; # ************************************************************ # Description : A Wix Workspace creator # Author : James H. Hill # Create Date : 6/23/2009 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use WixProjectCreator; use WorkspaceCreator; use WinWorkspaceBase; use File::Basename; use vars qw(@ISA); @ISA = qw(WinWorkspaceBase WorkspaceCreator); # ************************************************************ # Data Section # ************************************************************ # ************************************************************ # Subroutine Section # ************************************************************ sub workspace_file_extension { return '.wxs'; } sub workspace_file_name { my $self = shift; return $self->get_modified_workspace_name($self->get_workspace_name(), '.wxi'); } sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); my $name = $self->get_workspace_name(); ## Begin the project definition for the workspace print $fh '', $crlf, '', $crlf; } sub write_comps { my($self, $fh) = @_; my $crlf = $self->crlf(); # print the target for clean foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) { print $fh " ", $crlf; } } sub normalize { my $val = shift; $val =~ tr/ \t\/\\\-$()./_/; return $val; } sub post_workspace { my($self, $fh, $gen) = @_; my $info = $self->get_project_info(); my $crlf = $self->crlf(); # Create a component group consisting of all the projects. print $fh $crlf, ' ', $crlf, ' ', $crlf; foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) { print $fh ' ', $crlf; } print $fh ' ', $crlf, ' ', $crlf; print $fh $crlf; # For every project marked with "make_group", create a ComponentGroup that references all dependencies my %project_dependencies = (); my $projects = $self->get_projects(); my @list = $self->sort_dependencies($projects, 0); foreach my $project (@list) { my $deps = $self->get_validated_ordering($project); $project_dependencies{$project} = [ @$deps ]; } # for each project, find all dependencies foreach my $project (keys %project_dependencies) { # foreach my $cfg (@cfgs_main) -> could be or my($pname_main, $make_group_main, @cfgs_main) = $gen->access_pi_values($info, $project, ProjectCreator::PROJECT_NAME, ProjectCreator::MAKE_GROUP, ProjectCreator::CONFIGURATIONS); # only generate a group if "make_group = 1" if ($make_group_main) { # all dependencies used by any project referenced by $project my %all_deps; my @dep_stack = ($project); while (my $top = pop @dep_stack) { # add current project to dependencies (use hash key as set) $all_deps{$top} = 1; my $deps = $project_dependencies{$top}; foreach my $dep (@$deps) { # add current project's dependencies to stack for processing, if not already processed push(@dep_stack, $dep) if !exists $all_deps{$dep}; } } # for every config/platform pairing, emit a MainGroup foreach my $cfg (@cfgs_main) { my ($config, $platform) = split('\|', $cfg); print $fh ' ', $crlf, ' ', $crlf; # add main project - pattern is "ComponentGroup.__" print $fh ' ', $crlf; # loop over each dependency, and obtain its parameters foreach my $dep (keys %all_deps) { foreach my $p (@{$self->{'projects'}}) { if ($dep eq $info->{$p}->[ProjectCreator::PROJECT_NAME] || $dep eq $self->mpc_basename($p)) { my($pname_dep, @cfgs_dep) = $gen->access_pi_values($info, $p, ProjectCreator::PROJECT_NAME, ProjectCreator::CONFIGURATIONS); # add dependency - include AnyCPU if no dependency configuration matches exactly (if the AnyCPU platform exists, that is) my $pform = $platform; if (!exists {map { $_ => 1 } @cfgs_dep}->{$config.'|'.$pform}) { $pform = 'AnyCPU'; } if (exists {map { $_ => 1 } @cfgs_dep}->{$config.'|'.$pform}) { print $fh ' ', $crlf; } last; } } } print $fh ' ', $crlf, ' ', $crlf, $crlf; } } } print $fh '', $crlf; } 1; ace-6.4.5+dfsg.orig/MPC/modules/WB30WorkspaceCreator.pm0000644000175000017500000000202413154167361020564 0ustar tggtggpackage WB30WorkspaceCreator; # ************************************************************ # Description : Wind River Workbench 3.0 generator # Author : Adam Mitz (Object Computing, Inc.) # Create Date : 07/21/2010 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use WB26WorkspaceCreator; use WB30ProjectCreator; use vars qw(@ISA); @ISA = qw(WB26WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub get_project_prefix { return 'wb_'; } sub get_additional_output { ## Create the accompanying list file. It always goes in the same ## directory as the first workspace output file. See ## WorkspaceCreator.pm for a description of the array elements. return [[undef, 'wb30projects.lst', \&WB26WorkspaceCreator::list_file_body]]; } 1; ace-6.4.5+dfsg.orig/MPC/modules/AutomakeWorkspaceCreator.pm0000644000175000017500000006202313154167361021664 0ustar tggtggpackage AutomakeWorkspaceCreator; # ************************************************************ # Description : A Automake Workspace (Makefile) creator # Author : J.T. Conklin & Steve Huston # Create Date : 5/13/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use File::Copy; use AutomakeProjectCreator; use MakePropertyBase; use WorkspaceCreator; use WorkspaceHelper; use vars qw(@ISA); @ISA = qw(MakePropertyBase WorkspaceCreator); # ************************************************************ # Data Section # ************************************************************ my $acfile = 'configure.ac'; my $acmfile = 'configure.ac.Makefiles'; # ************************************************************ # Subroutine Section # ************************************************************ sub compare_output { return 1; } ## Can't cache as some intermediate project files are deleted ## and must be regenerated if a project is regenerated. sub default_cacheok { return 0; } sub files_are_different { my($self, $old, $new) = @_; my $diff = 1; if (-r $old) { my $lh = new FileHandle(); my $rh = new FileHandle(); if (open($lh, $old)) { if (open($rh, $new)) { my $done = 0; my $lline; my $rline; $diff = 0; do { $lline = <$lh>; $rline = <$rh>; if (defined $lline) { if (defined $rline) { $lline =~ s/#.*//; $rline =~ s/#.*//; $diff = 1 if ($lline ne $rline); } else { $done = 1; } } else { $diff = 1 if (defined $rline); $done = 1; } } while(!$done && !$diff); close($rh); } close($lh); } } return $diff; } sub workspace_file_name { return $_[0]->get_modified_workspace_name('Makefile', '.am'); } sub workspace_per_project { #my $self = shift; return 1; } sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); $self->print_workspace_comment($fh, '## Process this file with automake to create Makefile.in', $crlf, '##', $crlf, '## ', '$', 'Id', '$', $crlf, '##', $crlf, '## This file was generated by MPC. Any changes made directly to', $crlf, '## this file will be lost the next time it is generated.', $crlf, '##', $crlf, '## MPC Command:', $crlf, '## ', $self->create_command_line_string($0, @ARGV), $crlf, $crlf); } sub write_comps { my($self, $fh, $creator, $toplevel) = @_; my $projects = $self->get_projects(); my @list = $self->sort_dependencies($projects); my $crlf = $self->crlf(); my %unique; my @dirs; my @locals; my %proj_dir_seen; my $have_subdirs = 0; my $outdir = $self->get_outdir(); my $cond = '--'; ## This step writes a configure.ac.Makefiles list into the starting ## directory. The list contains of all the Makefiles generated down ## the tree. configure.ac can include this to get an up-to-date list ## of all the involved Makefiles. my $mfh; my $makefile; if ($toplevel) { my $need_acmfile = 1; if (! -e "$outdir/$acfile") { my $acfh = new FileHandle(); if (open($acfh, ">$outdir/$acfile")) { print $acfh "AC_INIT(", $self->get_workspace_name(), ", 1.0)$crlf", "AM_INIT_AUTOMAKE([1.9])$crlf", $crlf, "AC_PROG_CXX$crlf", "AC_PROG_CXXCPP$crlf", "AC_PROG_LIBTOOL$crlf", $crlf; my $fp = $creator->get_feature_parser(); my $features = $fp->get_names(); my %assoc = %{$self->get_associated_projects()}; foreach my $feature (sort @$features) { print $acfh 'AM_CONDITIONAL(BUILD_', uc($feature), ', ', ($fp->get_value($feature) ? 'true' : 'false'), ')', $crlf; delete $assoc{$feature}; } foreach my $akey (keys %assoc) { print $acfh 'AM_CONDITIONAL(BUILD_', uc($akey), ', true)', $crlf if ($akey ne $cond); } print $acfh $crlf, "m4_include([$acmfile])$crlf", $crlf, "AC_OUTPUT$crlf"; close($acfh); } } else { $self->information("$acfile already exists."); $need_acmfile = !$self->edit_config_ac("$outdir/$acfile", \@list); } if ($need_acmfile) { unlink("$outdir/$acmfile"); $mfh = new FileHandle(); open($mfh, ">$outdir/$acmfile"); ## The top-level is never listed as a dependency, so it needs to be ## added explicitly. $makefile = $self->mpc_basename($self->get_current_output_name()); $makefile =~ s/\.am$//; print $mfh "AC_CONFIG_FILES([ $makefile ])$crlf"; $proj_dir_seen{'.'} = 1; } } ## If we're writing a configure.ac.Makefiles file, every seen project ## goes into it. Since we only write this at the starting directory ## level, it'll include all projects processed at this level and below. foreach my $dep (@list) { if ($mfh) { ## There should be a Makefile at each level, but it's not a project, ## it's a workspace; therefore, it's not in the list of projects. ## Since we're consolidating all the project files into one workspace ## Makefile.am per directory level, be sure to add that Makefile.am ## entry at each level there's a project dependency. my $dep_dir = $self->mpc_dirname($dep); if (!defined $proj_dir_seen{$dep_dir}) { $proj_dir_seen{$dep_dir} = 1; ## If there are directory levels between project-containing ## directories (for example, at this time in ## ACE_wrappers/apps/JAWS/server, there are no projects at the ## apps or apps/JAWS level) we need to insert the Makefile ## entries for the levels without projects. They won't be listed ## in @list but are needed for make to traverse intervening directory ## levels down to where the project(s) to build are. my @dirs = split /\//, $dep_dir; my $inter_dir = ""; foreach my $dep (@dirs) { $inter_dir .= $dep; if (!defined $proj_dir_seen{$inter_dir}) { $proj_dir_seen{$inter_dir} = 1; print $mfh "AC_CONFIG_FILES([ $inter_dir/$makefile ])$crlf"; } $inter_dir .= '/'; } print $mfh "AC_CONFIG_FILES([ $dep_dir/$makefile ])$crlf"; } } ## Get a unique list of next-level directories for SUBDIRS. ## To make sure we keep the dependencies correct, insert the '.' for ## any local projects in the proper place. Remember if any subdirs ## are seen to know if we need a SUBDIRS entry generated. my $dir = $self->get_first_level_directory($dep); if (!defined $unique{$dir}) { $unique{$dir} = 1; unshift(@dirs, $dir); } if ($dir eq '.') { ## At each directory level, each project is written into a separate ## Makefile..am file. To bring these back into the build ## process, they'll be sucked back into the workspace Makefile.am file. ## Remember which ones to pull in at this level. unshift(@locals, $dep); } else { $have_subdirs = 1; } } close($mfh) if ($mfh); # The Makefile..am files append values to build target macros # for each program/library to build. When using conditionals, however, # a plain empty assignment is done outside the conditional to be sure # that each append can be done regardless of the condition test. Because # automake fails if the first isn't a plain assignment, we need to resolve # these situations when combining the files. The code below makes sure # that there's always a plain assignment, whether it's one outside a # conditional or the first append is changed to a simple assignment. # # We should consider extending this to support all macros that match # automake's uniform naming convention. A true perl wizard probably # would be able to do this in a single line of code. my %seen; my %conditional_targets; my %unconditional_targets; my %first_instance_unconditional; my $installable_headers; my $installable_pkgconfig; my $includedir; my $project_name; my $status = 1; my $errorString; ## To avoid unnecessarily emitting blank assignments, rip through the ## Makefile..am files and check for conditions. if (@locals) { my $pfh = new FileHandle(); foreach my $local (reverse @locals) { if ($local =~ /Makefile\.(.*)\.am/) { $project_name = $1; } else { $project_name = 'nobase'; } if (open($pfh, "$outdir/$local")) { my $in_condition = 0; my $regok = $self->escape_regex_special($project_name); my $inc_pattern = $regok . '_include_HEADERS'; my $pkg_pattern = $regok . '_pkginclude_HEADERS'; while (<$pfh>) { # Don't look at comments next if (/^#/); $in_condition++ if (/^if\s*/); $in_condition-- if (/^endif\s*/); if ( /(^[a-zA-Z][a-zA-Z0-9_]*_(PROGRAMS|LIBRARIES|LTLIBRARIES|LISP|PYTHON|JAVA|SCRIPTS|DATA|SOURCES|HEADERS|MANS|TEXINFOS|LIBADD|LDADD|DEPENDENCIES))\s*\+=\s*/ || /(^CLEANFILES)\s*\+=\s*/ || /(^EXTRA_DIST)\s*\+=\s*/ ) { if ($in_condition) { $conditional_targets{$1}++; } else { if (! $seen{$1} ) { $first_instance_unconditional{$1} = 1; } $unconditional_targets{$1}++; } $seen{$1} = 1; $installable_pkgconfig= 1 if (/^pkgconfig_DATA/); $installable_headers = 1 if (/^$inc_pattern\s*\+=\s*/ || /^$pkg_pattern\s*\+=\s*/); } elsif (/includedir\s*=\s*(.*)/) { $includedir = $1; } } close($pfh); $in_condition = 0; } else { $errorString = "Unable to open $local for reading."; $status = 0; last; } } } # # Clear seen hash # %seen = (); ## Print out the Makefile.am. my $wsHelper = WorkspaceHelper::get($self); my $convert_header_name; if ($status && ((!defined $includedir && $installable_headers) || $installable_pkgconfig)) { if (!defined $includedir && $installable_headers) { my $incdir = $wsHelper->modify_value('includedir', $self->get_includedir()); if ($incdir ne '') { print $fh "includedir = \@includedir\@$incdir$crlf"; $convert_header_name = 1; } } if ($installable_pkgconfig) { print $fh "pkgconfigdir = \@libdir\@/pkgconfig$crlf"; } print $fh $crlf; } if ($status && @locals) { ($status, $errorString) = $wsHelper->write_settings($self, $fh, @locals); } ## Create the SUBDIRS setting. If there are associated projects, then ## we will also set up conditionals for it as well. if ($status && $have_subdirs == 1) { my $assoc = $self->get_associated_projects(); my @aorder; my %afiles; my $entry = " \\$crlf "; print $fh 'SUBDIRS ='; foreach my $dir (reverse @dirs) { my $found; foreach my $akey (keys %$assoc) { if (defined $$assoc{$akey}->{$dir}) { if ($akey eq $cond) { if ($toplevel) { print $fh $entry, '@', $dir, '@'; $found = 1; } } else { push(@aorder, $akey); push(@{$afiles{$akey}}, $dir); $found = 1; } last; } elsif ($toplevel && defined $$assoc{$akey}->{uc($dir)} && $akey eq $cond) { print $fh $entry, '@', uc($dir), '@'; $found = 1; last; } } print $fh $entry, $dir if (!$found); } print $fh $crlf; my $second = 1; foreach my $aorder (@aorder) { if (defined $afiles{$aorder}) { $second = undef; print $fh $crlf, 'if BUILD_', uc($aorder), "\n", 'SUBDIRS +='; foreach my $afile (@{$afiles{$aorder}}) { print $fh " $afile"; } delete $afiles{$aorder}; print $fh $crlf, 'endif', $crlf; } } print $fh $crlf if ($second); } ## Now, for each target used in a conditional, emit a blank assignment ## and mark that we've seen that target to avoid changing the += to = ## as the individual files are pulled in. if ($status && %conditional_targets) { my $primary; my $count; while ( ($primary, $count) = each %conditional_targets) { if (! $first_instance_unconditional{$primary} && ($unconditional_targets{$primary} || ($count > 1))) { print $fh "$primary =$crlf"; $seen{$primary} = 1; } } print $fh $crlf; } ## Take the local Makefile..am files and insert each one here, ## then delete it. if ($status && @locals) { my $pfh = new FileHandle(); my $liblocs = $self->get_lib_locations(); my $here = $self->getcwd(); my $start = $self->getstartdir(); my %explicit; foreach my $local (reverse @locals) { if (open($pfh, "$outdir/$local")) { print $fh "## $local", $crlf; my $look_for_libs = 0; my $prev_line; my $in_explicit; while (<$pfh>) { # Don't emit comments next if (/^#/); # Check for explicit targets if ($in_explicit) { if (/^\t/) { next; } else { $in_explicit = undef; } } elsif ($prev_line !~ /\\$/ && /^([\w\/\.\-\s]+):/) { my $target = $1; $target =~ s/^\s+//; $target =~ s/\s+$//; if (defined $explicit{$target}) { $in_explicit = 1; next; } else { $explicit{$target} = 1; } } if ($convert_header_name) { if ($local =~ /Makefile\.(.*)\.am/) { $project_name = $1; } else { $project_name = 'nobase'; } my $regok = $self->escape_regex_special($project_name); my $inc_pattern = $regok . '_include_HEADERS'; my $pkg_pattern = $regok . '_pkginclude_HEADERS'; if (/^$inc_pattern\s*\+=\s*/ || /^$pkg_pattern\s*\+=\s*/) { $_ =~ s/^$regok/nobase/; } } if ( /(^[a-zA-Z][a-zA-Z0-9_]*_(PROGRAMS|LIBRARIES|LTLIBRARIES|LISP|PYTHON|JAVA|SCRIPTS|DATA|SOURCES|HEADERS|MANS|TEXINFOS|LIBADD|LDADD|DEPENDENCIES))\s*\+=\s*/ || /(^CLEANFILES)\s*\+=\s*/ || /(^EXTRA_DIST)\s*\+=\s*/ ) { if (!defined ($seen{$1})) { $seen{$1} = 1; s/\+=/=/; } } ## This scheme relies on automake.mpd emitting the 'la' libs first. ## Look for all the libXXXX.la, find out where they are located ## relative to the start of the MPC run, and relocate the reference ## to that location under $top_builddir. Unless the referred-to ## library is in the current directory, then leave it undecorated ## so the automake-generated dependency orders the build correctly. if ($look_for_libs) { my @libs = /\s+(lib(\w+).la)/gm; my $libcount = @libs / 2; for(my $i = 0; $i < $libcount; ++$i) { my $libfile = $libs[$i * 2]; my $libname = $libs[$i * 2 + 1]; my $reldir = $$liblocs{$libname}; ## If we could not find a relative directory for this ## library, it may be that it is a decorated library name. ## We will search for an approximate match. if (!defined $reldir) { my $tmpname = $libname; while($tmpname ne '') { $tmpname = substr($tmpname, 0, length($tmpname) - 1); if (defined $$liblocs{$tmpname}) { $reldir = $$liblocs{$tmpname}; $self->warning("Relative directory for $libname " . "was approximated with $tmpname."); last; } } } if (defined $reldir) { my $append = ($reldir eq '' ? '' : "/$reldir"); if ("$start$append" ne $here) { my $mod = $wsHelper->modify_libpath($_, $reldir, $libfile); if (defined $mod) { $_ = $mod; } else { s/$libfile/\$(top_builddir)$append\/$libfile/; } } } else { my $mod = $wsHelper->modify_libpath($_, $reldir, $libfile); if (defined $mod) { $_ = $mod; } else { $self->warning("No reldir found for $libname ($libfile)."); } } } $look_for_libs = 0 if ($libcount == 0); } $look_for_libs = 1 if (/_LDADD = \\$/ || /_LIBADD = \\$/); ## I have introduced a one line delay so that I can simplify ## the automake template. If our current line is empty, then ## we will remove the trailing backslash before printing the ## previous line. Automake is horribly unforgiving so we must ## avoid this situation at all cost. if (defined $prev_line) { $prev_line =~ s/\s*\\$// if ($_ =~ /^\s*$/); print $fh $prev_line; } $prev_line = $_; } ## The one line delay requires that we print out the previous ## line (if there was one) when we reach the end of the file. if (defined $prev_line) { $prev_line =~ s/\s*\\$//; print $fh $prev_line; } close($pfh); unlink("$outdir/$local"); print $fh $crlf; } else { $errorString = "Unable to open $local for reading."; $status = 0; last; } } } ## If this is the top-level Makefile.am, it needs the directives to pass ## autoconf/automake flags down the tree when running autoconf. ## *** This may be too closely tied to how we have things set up in ACE, ## even though it's recommended practice. *** if ($status && $toplevel) { my $m4inc = '-I m4'; print $fh $crlf, 'ACLOCAL = @ACLOCAL@', $crlf, 'ACLOCAL_AMFLAGS = ', (defined $wsHelper ? $wsHelper->modify_value('amflags', $m4inc) : $m4inc), $crlf, 'AUTOMAKE_OPTIONS = foreign', $crlf, $crlf, (defined $wsHelper ? $wsHelper->modify_value('extra', '') : ''); } ## Finish up with the cleanup specs. if ($status && @locals) { ## There is no reason to emit this if there are no local targets. ## An argument could be made that it shouldn't be emitted in any ## case because it could be handled by CLEANFILES or a verbatim ## clause. print $fh '## Clean up template repositories, etc.', $crlf, 'clean-local:', $crlf, "\t-rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.*", $crlf, "\t-rm -f gcctemp.c gcctemp so_locations *.ics", $crlf, "\t-rm -rf cxx_repository ptrepository ti_files", $crlf, "\t-rm -rf templateregistry ir.out", $crlf, "\t-rm -rf ptrepository SunWS_cache Templates.DB", $crlf; } return $status, $errorString; } sub get_includedir { my $self = shift; my $value = $self->getcwd(); my $start = $self->getstartdir(); ## Take off the starting directory $value =~ s/\Q$start\E//; return $value; } sub edit_config_ac { my($self, $file, $files) = @_; my $fh = new FileHandle(); my $status = 0; if (open($fh, $file)) { my $crlf = $self->crlf(); my @in; my @lines; my $assoc = $self->get_associated_projects(); my $indent = ''; my %proj_dir_seen; my $in_config_files = 0; while(<$fh>) { my $line = $_; push(@lines, $line); ## Remove comments and trailing space $line =~ s/\bdnl\s+.*//; $line =~ s/\s+$//; if ($line eq '') { } elsif ($line =~ /^\s*if\s+test\s+["]?([^"]+)["]?\s*=\s*\w+;\s*then/) { ## Entering an if test, save the name my $name = $1; $name =~ s/\s+$//; $name =~ s/.*_build_//; push(@in, $name); } elsif ($line =~ /^\s*if\s+test\s+-d\s+(.+);\s*then/) { ## Entering an if test -d, save the name my $name = $1; $name =~ s/\s+$//; $name =~ s/\$srcdir\///; push(@in, $name); } elsif ($line =~ /^\s*fi$/) { pop(@in); } elsif ($line =~ /^(\s*AC_CONFIG_FILES\s*\(\s*\[)/) { ## Entering an AC_CONFIG_FILES section, start ignoring the entries pop(@lines); push(@lines, "$1\n"); $indent = ' '; if ($lines[$#lines] =~ /^(\s+)/) { $indent .= $1; } $in_config_files = 1; } elsif ($in_config_files) { if ($line =~ /(.*)\]\s*\).*/) { ## We've reached the end of the AC_CONFIG_FILES section my $olast = pop(@lines); if ($olast =~ /^[^\s]+(\s*\]\s*\).*)/) { $olast = $1; } ## Add in the Makefiles for this configuration if ($#in < 0 && !defined $proj_dir_seen{'.'}) { push(@lines, $indent . 'Makefile' . $crlf); $proj_dir_seen{'.'} = 1; } foreach my $dep (@$files) { ## First things first, see if we've already seen this ## project's directory. If we have, then there's nothing ## else we need to do with it. my $dep_dir = $self->mpc_dirname($dep); if (!defined $proj_dir_seen{$dep_dir}) { my $ok = 1; my @dirs = split(/\//, $dep_dir); my $base = $dep; if ($base =~ s/\/.*//) { my $found = 0; foreach my $akey (keys %$assoc) { if (defined $$assoc{$akey}->{$base} || defined $$assoc{$akey}->{uc($base)}) { if ($#in >= 0) { if (index($base, $in[0]) >= 0) { if ($#in >= 1) { $found = 1; for(my $i = 0; $i <= $#in; $i++) { if (!defined $dirs[$i] || index($dirs[$i], $in[$i]) < 0) { $found = 0; last; } } } else { ## We need to see into the future here. :-) ## If the second element of @dirs matches an ## association key, we'll guess that there will ## be a "build" section devoted to it. if (!defined $dirs[1] || !defined $$assoc{$dirs[1]}) { $found = 1; } } } } else { $found = 1; } last; } } if ($#in >= 0) { $ok = $found; } else { $ok = !$found; } } if ($ok) { $proj_dir_seen{$dep_dir} = 1; my $inter_dir = ''; foreach my $dep (@dirs) { $inter_dir .= $dep; if (!defined $proj_dir_seen{$inter_dir}) { $proj_dir_seen{$inter_dir} = 1; push(@lines, $indent . $inter_dir . "/Makefile$crlf"); } $inter_dir .= '/'; } push(@lines, $indent . $dep_dir . "/Makefile$crlf"); } } } push(@lines, $olast); $in_config_files = 0; } else { ## Ignore the entry pop(@lines); } } } close($fh); ## Make a backup and create the new file my $backup = $file . '.bak'; if (copy($file, $backup)) { my @buf = stat($file); if (defined $buf[8] && defined $buf[9]) { utime($buf[8], $buf[9], $backup); } if (open($fh, ">$file")) { foreach my $line (@lines) { print $fh $line; } close($fh); $status = 1; } } else { $self->warning("Unable to create backup file: $backup"); } } return $status; } 1; ace-6.4.5+dfsg.orig/MPC/modules/AutomakeProjectCreator.pm0000644000175000017500000000227113154167361021333 0ustar tggtggpackage AutomakeProjectCreator; # ************************************************************ # Description : A Automake Project Creator # Author : J.T. Conklin & Chad Elliott # Create Date : 2/26/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use MakeProjectBase; use ProjectCreator; use vars qw(@ISA); @ISA = qw(MakeProjectBase ProjectCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub escape_spaces { #my $self = shift; return 1; } sub fill_value { my($self, $name) = @_; my $value; if ($name eq 'am_version') { $value = $self->get_assignment('version'); $value .= ':0' if (defined $value && ($value =~ tr/./:/) < 2); } return $value; } sub project_file_extension { #my $self = shift; return '.am'; } sub get_dll_exe_template_input_file { #my $self = shift; return 'automakeexe'; } sub get_dll_template_input_file { #my $self = shift; return 'automakedll'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/VS2017WorkspaceCreator.pm0000644000175000017500000000240113154167361020752 0ustar tggtggpackage VS2017WorkspaceCreator; # ************************************************************ # Description : A vs2017 (Visual Studio 2017) Workspace Creator # Author : Johnny Willemsen # Create Date : 01/05/2016 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VS2017ProjectCreator; use VC12WorkspaceCreator; use vars qw(@ISA); @ISA = qw(VC12WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); print $fh '', $crlf, 'Microsoft Visual Studio Solution File, Format Version 12.00', $crlf; $self->print_workspace_comment($fh, '# Visual Studio 15', $crlf, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, '#', $crlf, '# MPC Command:', $crlf, '# ', $self->create_command_line_string($0, @ARGV), $crlf); } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC12ProjectCreator.pm0000644000175000017500000000331713154167361020242 0ustar tggtggpackage VC12ProjectCreator; # ************************************************************ # Description : A VC12 Project Creator # Author : Johnny Willemsen # Create Date : 10/29/2013 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC11ProjectCreator; use vars qw(@ISA); @ISA = qw(VC11ProjectCreator); ## NOTE: We call the constant as a function to support Perl 5.6. my %info = (Creator::cplusplus() => {'ext' => '.vcxproj', 'dllexe' => 'vc12exe', 'libexe' => 'vc12libexe', 'dll' => 'vc12dll', 'lib' => 'vc12lib', 'template' => [ 'vc10', 'vc10filters' ], }, ); my %config = ('vcversion' => '12.00', ); # ************************************************************ # Subroutine Section # ************************************************************ sub get_info_hash { my($self, $key) = @_; ## If we have the setting in our information map, then use it. return $info{$key} if (defined $info{$key}); ## Otherwise, see if our parent type can take care of it. return $self->SUPER::get_info_hash($key); } sub get_configurable { my($self, $name) = @_; ## If we have the setting in our config map, then use it. return $config{$name} if (defined $config{$name}); ## Otherwise, see if our parent type can take care of it. return $self->SUPER::get_configurable($name); } 1; ace-6.4.5+dfsg.orig/MPC/modules/mpc_debug.pm0000644000175000017500000000402513154167361016642 0ustar tggtggpackage mpc_debug; # ************************************************************ # Description : Scope for declaring useful checkpoints in MPC. # # This package defines a scope for defining do-nothing # subroutines. Names should suggest checkpoints in the # execution of MPC, and the body of the function should # be empty. Calls to these functions can be inserted into # various locations inside MPC source code, and a developer # can set breakpoints on these functions to make it # easier to hone in on checkpoints. # # If a call is useful, but should only be enabled # during debugging (e.g., it's on a critical path and # could negatively affect performance) then one can # simply comment out the call. # # For ease in finding calls, please always fully scope # the call, e.g., mpc_debug::chkpnt_blah(); # # Author : Chris Cleeland # Create Date : 14.Dec.2010 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; # Checkpoints # # Please follow convention and begin each checkpoint name with # the string "chkpnt_". Adherence will make it easier for # another developer to locate all occurrences of checkpoints # within code using a tool like `grep`. # Called in Driver's processing of *Creators sub chkpnt_pre_creator_load { } sub chkpnt_post_creator_load { } sub chkpnt_pre_creator_create { } sub chkpnt_post_creator_create { } # Called in special 'after' keyword processing # in ProjectCreator::process_assignment sub chkpnt_pre_after_keyword_assignment { } sub chkpnt_post_after_keyword_assignment { } # Called in Parser::read_file sub chkpnt_pre_read_file { } sub chkpnt_post_read_file { } sub chkpnt_pre_parse_base_project { } sub chkpnt_post_parse_base_project { } 1; ace-6.4.5+dfsg.orig/MPC/modules/BCB2007ProjectCreator.pm0000644000175000017500000000200413154167361020456 0ustar tggtggpackage BCB2007ProjectCreator; # ************************************************************ # Description : The Borland C++ Builder 2007 Project Creator # Author : Johnny Willemsen # Create Date : 14/12/2005 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ProjectCreator; use BorlandPropertyBase; use XMLProjectBase; use vars qw(@ISA); @ISA = qw(XMLProjectBase BorlandPropertyBase ProjectCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub crlf { #my $self = shift; return "\n"; } sub project_file_extension { #my $self = shift; return '.cbproj'; } sub get_dll_exe_template_input_file { #my $self = shift; return 'bcb2007exe'; } sub get_dll_template_input_file { #my $self = shift; return 'bcb2007dll'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/Driver.pm0000644000175000017500000005066513154167361016163 0ustar tggtggpackage Driver; # ************************************************************ # Description : Functionality to call a workspace or project creator # Author : Chad Elliott # Create Date : 5/28/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use mpc_debug; use Options; use Parser; use Version; use ConfigParser; use vars qw(@ISA); @ISA = qw(Parser Options); # ************************************************************ # Data Section # ************************************************************ my $index = 0; my @progress = ('|', '/', '-', '\\'); my %valid_cfg = ('command_line' => 1, 'default_type' => 1, 'dynamic_types' => 1, 'includes' => 1, 'logging' => 1, 'main_functions' => 1, 'verbose_ordering' => 1, ); my @intype = ('mwc.pl', 'mpc.pl'); # ************************************************************ # Subroutine Section # ************************************************************ sub new { my $class = shift; my $path = shift; my $name = shift; my @creators = @_; my $self = $class->SUPER::new(); $self->{'path'} = $path; $self->{'basepath'} = ::getBasePath(); $self->{'name'} = $name; $self->{'type'} = (lc($self->{'name'}) eq $intype[0] ? 'WorkspaceCreator' : 'ProjectCreator'); $self->{'types'} = {}; $self->{'creators'} = \@creators; $self->{'reldefs'} = {}; $self->{'relorder'} = []; return $self; } sub workspaces { return $intype[0]; } sub projects { return $intype[1]; } sub locate_default_type { my $self = shift; my $name = lc(shift) . lc($self->{'type'}) . '.pm'; my $fh = new FileHandle(); foreach my $dir (@INC) { if (opendir($fh, $dir)) { foreach my $file (readdir($fh)) { if (lc($file) eq $name) { $file =~ s/\.pm$//; return $file; } } closedir($fh); } } return undef; } sub locate_dynamic_directories { my($self, $cfg, $label) = @_; my $dtypes = $cfg->get_value($label); if (defined $dtypes) { my $count = 0; my @directories; my @unprocessed = split(/\s*,\s*/, $cfg->get_unprocessed($label)); foreach my $dir (split(/\s*,\s*/, $dtypes)) { if (-d $dir) { if (-d "$dir/modules" || -d "$dir/config" || -d "$dir/templates") { push(@directories, $dir); } } elsif (!(defined $unprocessed[$count] && $unprocessed[$count] =~ s/\$[\(\w\)]+//g && $unprocessed[$count] eq $dir)) { $self->diagnostic("'$label' directory $dir not found."); } $count++; } return \@directories; } return undef; } sub add_dynamic_creators { my($self, $dirs) = @_; my $type = $self->{'type'}; foreach my $dir (@$dirs) { my $fh = new FileHandle(); if (opendir($fh, "$dir/modules")) { foreach my $file (readdir($fh)) { if ($file =~ /(.+$type)\.pm$/i) { my $name = $1; if (DirectoryManager::onVMS()) { my $fh = new FileHandle(); if (open($fh, $dir . "/modules/" . $file)) { my $line = <$fh>; if ($line =~ /^\s*package\s+(.+);/) { $name = $1; } close($fh); } } $self->debug("Pulling in $name"); push(@{$self->{'creators'}}, $name); } } closedir($fh); } } } sub parse_line { my($self, $ih, $line) = @_; my $status = 1; my $errorString; if ($line eq '') { } elsif ($line =~ /^([\w\*]+)(\s*,\s*(.*))?$/) { my $name = $1; my $value = $3; if (defined $value) { $value =~ s/^\s+//; $value =~ s/\s+$//; } if ($name =~ s/\*/.*/g) { foreach my $key (keys %ENV) { if ($key =~ /^$name$/ && !exists $self->{'reldefs'}->{$key}) { ## Put this value at the front since it doesn't need ## to be built up from anything else. It is a stand-alone ## relative definition. $self->{'reldefs'}->{$key} = undef; unshift(@{$self->{'relorder'}}, $key); } } } else { $self->{'reldefs'}->{$name} = $value; if (defined $value) { ## This relative definition may need to be built up from an ## existing value, so it needs to be put at the end. push(@{$self->{'relorder'}}, $name); } else { ## Put this value at the front since it doesn't need ## to be built up from anything else. It is a stand-alone ## relative definition. unshift(@{$self->{'relorder'}}, $name); } } } else { $status = 0; $errorString = "Unrecognized line: $line"; } return $status, $errorString; } sub optionError { my($self, $line) = @_; $self->printUsage($line, $self->{'name'}, Version::get(), keys %{$self->{'types'}}); exit(defined $line ? 1 : 0); } sub find_file { my($self, $includes, $file) = @_; foreach my $inc (@$includes) { if (-r $inc . '/' . $file) { $self->debug("$file found in $inc"); return $inc . '/' . $file; } } return undef; } sub determine_cfg_file { my($self, $cfg, $odir) = @_; my $ci = $self->case_insensitive(); $odir = lc($odir) if ($ci); foreach my $name (@{$cfg->get_names()}) { my $value = $cfg->get_value($name); if (index($odir, ($ci ? lc($name) : $name)) == 0) { $self->warning("$value does not exist.") if (!-d $value); my $cfgfile = $value . '/MPC.cfg'; return $cfgfile if (-e $cfgfile); } } return undef; } sub run { my $self = shift; my @args = @_; my $cfgfile; ## Save the original directory outside of the loop ## to avoid calling it multiple times. my $orig_dir = $self->getcwd(); ## Read the code base config file from the config directory ## under $MPC_ROOT my $cbcfg = new ConfigParser(); my $cbfile = "$self->{'basepath'}/config/base.cfg"; if (-r $cbfile) { my($status, $error) = $cbcfg->read_file($cbfile); if (!$status) { $self->error("$error at line " . $cbcfg->get_line_number() . " of $cbfile"); return 1; } $cfgfile = $self->determine_cfg_file($cbcfg, $orig_dir); } ## If no MPC config file was found and ## there is one in the config directory, we will use that. if (!defined $cfgfile) { $cfgfile = $self->{'path'} . '/config/MPC.cfg'; $cfgfile = $self->{'basepath'} . '/config/MPC.cfg' if (!-e $cfgfile); $cfgfile = undef if (!-e $cfgfile); } ## Read the MPC config file my $cfg = new ConfigParser(\%valid_cfg); if (defined $cfgfile) { my $ellipses = $cfgfile; $ellipses =~ s!.*(/[^/]+/[^/]+/[^/]+/[^/]+/[^/]+/[^/]+)!...$1!; $self->diagnostic("Using $ellipses"); my($status, $error) = $cfg->read_file($cfgfile); if (!$status) { $self->error("$error at line " . $cfg->get_line_number() . " of $cfgfile"); return 1; } OutputMessage::set_levels($cfg->get_value('logging')); } ## Assembling a string from an array can be time consuming. If we're ## not debugging, then skip it. $self->debug("CMD: $0 @ARGV") if ($self->get_debug_level()); ## After we read the config file, see if the user has provided ## dynamic types my $dynamic = $self->locate_dynamic_directories($cfg, 'dynamic_types'); if (defined $dynamic) { ## If so, add in the creators found in the dynamic directories $self->add_dynamic_creators($dynamic); ## Add the each dynamic path to the include paths foreach my $dynpath (@$dynamic) { unshift(@INC, $dynpath . '/modules'); unshift(@args, '-include', "$dynpath/config", '-include', "$dynpath/templates"); } } ## Add in the creators found in the main MPC/modules directory $self->add_dynamic_creators([$self->{'basepath'}]); ## Dynamically load in each perl module and set up ## the type tags and project creators my $creators = $self->{'creators'}; foreach my $creator (@$creators) { my $tag = $self->extractType($creator); $self->{'types'}->{$tag} = $creator; } ## Before we process the arguments, we will prepend the command_line ## config variable. my $cmd = $cfg->get_value('command_line'); if (defined $cmd) { my $envargs = $self->create_array($cmd); unshift(@args, @$envargs); } ## Now add in the includes to the command line arguments. ## It is done this way to allow the Options module to process ## the include path as it does all others. my $incs = $cfg->get_value('includes'); if (defined $incs) { foreach my $inc (split(/\s*,\s*/, $incs)) { ## We must add it to the front so that options provided at the end ## that require a parameter (but are not given one) do not gobble ## up the -include option. unshift(@args, '-include', $inc); } } my $options = $self->options($self->{'name'}, $self->{'types'}, 1, @args); ## If options are not defined, that means that calling options ## took care of whatever functionality that was required and ## we can now return with a good status. return 0 if (!defined $options); ## Set up a hash that we can use to keep track of what ## has been 'required' my %loaded; ## Set up the default creator, if no type is selected if (!defined $options->{'creators'}->[0]) { my $utype = $cfg->get_value('default_type'); if (defined $utype) { my $default = $self->locate_default_type($utype); if (defined $default) { push(@{$options->{'creators'}}, $default); } else { $self->error("Unable to locate the module that corresponds to " . "the '$utype' type."); return 1; } } } ## If there's still no default, issue an error if (!defined $options->{'creators'}->[0]) { $self->error('There is no longer a default project type. Please ' . 'specify one in MPC.cfg or use the -type option.'); return 1; } ## Set up additional main functions to recognize my $val = $cfg->get_value('main_functions'); if (defined $val) { foreach my $main (split(/\s*,\s*/, $val)) { my $err = ProjectCreator::add_main_function($main); if (defined $err) { $self->error("$err at line " . $cfg->get_line_number() . " of $cfgfile"); return 1; } } } if ($options->{'recurse'}) { if (defined $options->{'input'}->[0]) { ## This is an error. ## -recurse was used and input files were specified. $self->optionError('No files should be ' . 'specified when using -recurse'); } else { ## We have to load at least one creator here in order ## to call the generate_recursive_input_list virtual function. my $name = $options->{'creators'}->[0]; if (!$loaded{$name}) { require "$name.pm"; $loaded{$name} = 1; } ## Generate the recursive input list my $creator = $name->new(); my @input = $creator->generate_recursive_input_list( '.', $options->{'exclude'}); $options->{'input'} = \@input; ## If no files were found above, then we issue a warning ## that we are going to use the default input if (!defined $options->{'input'}->[0]) { $self->information('No files were found using the -recurse option. ' . 'Using the default input.'); } } } ## Add the default include paths. If the user has used the dynamic ## types method of adding types to MPC, we need to push the paths ## on. Otherwise, we unshift them onto the front. if ($self->{'path'} ne $self->{'basepath'}) { unshift(@{$options->{'include'}}, $self->{'path'} . '/config', $self->{'path'} . '/templates'); } push(@{$options->{'include'}}, $self->{'basepath'} . '/config', $self->{'basepath'} . '/templates'); ## All includes (except the current directory) have been added by this ## time. Both of the following can be time consuming, so we'll only do ## it if we know we're debugging. if ($self->get_debug_level()) { $self->debug("INCLUDES: @{$options->{'include'}}"); $self->dump_base_projects($options->{'include'}); } ## Set the global feature file my $global_feature_file = (defined $options->{'gfeature_file'} && -r $options->{'gfeature_file'} ? $options->{'gfeature_file'} : undef); if (defined $global_feature_file) { ## If the specified path is relative, expand it based on ## the current working directory. if ($global_feature_file !~ /^[\/\\]/ && $global_feature_file !~ /^[A-Za-z]:[\/\\]?/) { $global_feature_file = DirectoryManager::getcwd() . '/' . $global_feature_file; } } else { my $gf = 'global.features'; $global_feature_file = $self->find_file($options->{'include'}, $gf); if (!defined $global_feature_file) { $global_feature_file = $self->{'basepath'} . '/config/' . $gf; } } ## Set up default values push(@{$options->{'input'}}, '') if (!defined $options->{'input'}->[0]); $options->{'feature_file'} = $self->find_file($options->{'include'}, 'default.features') if (!defined $options->{'feature_file'}); $options->{'global'} = $self->find_file($options->{'include'}, 'global.mpb') if (!defined $options->{'global'}); ## Set the relative my $relative_file = (defined $options->{'relative_file'} && -r $options->{'relative_file'} ? $options->{'relative_file'} : undef); if (!defined $relative_file) { my $gf = 'default.rel'; $relative_file = $self->find_file($options->{'include'}, $gf); if (!defined $relative_file) { $relative_file = $self->{'basepath'} . '/config/' . $gf; } } if ($options->{'reldefs'}) { ## Only try to read the file if it exists if (defined $relative_file) { my($srel, $errorString) = $self->read_file($relative_file); if (!$srel) { $self->error("$errorString\nin $relative_file"); return 1; } foreach my $key (@{$self->{'relorder'}}) { if (defined $ENV{$key} && !defined $options->{'relative'}->{$key}) { $options->{'relative'}->{$key} = $ENV{$key}; } if (defined $self->{'reldefs'}->{$key} && !defined $options->{'relative'}->{$key}) { my $value = $self->{'reldefs'}->{$key}; if ($value =~ /\$(\w+)(.*)?/) { my $var = $1; my $extra = $2; $options->{'relative'}->{$key} = (defined $options->{'relative'}->{$var} ? $options->{'relative'}->{$var} : '') . (defined $extra ? $extra : ''); } else { $options->{'relative'}->{$key} = $value; } } ## If a relative path is defined, remove all trailing slashes ## and replace any two or more slashes with a single slash. if (defined $options->{'relative'}->{$key}) { $options->{'relative'}->{$key} =~ s/([\/\\])[\/\\]+/$1/g; $options->{'relative'}->{$key} =~ s/[\/\\]$//g; } } } ## Remove MPC_ROOT since we never want to expand it delete $options->{'relative'}->{'MPC_ROOT'}; } ## Always add the current path to the include paths unshift(@{$options->{'include'}}, $orig_dir); ## Set up un-buffered output for the progress callback $| = 1; ## Keep the starting time for the total output my $startTime = time(); my $loopTimes = 0; ## Generate the files my $status = 0; foreach my $cfile (@{$options->{'input'}}) { ## To correctly reference any pathnames in the input file, chdir to ## its directory if there's any directory component to the specified path. ## mpc_basename() always expects UNIX file format. $cfile =~ s/\\/\//g; my $base = ($cfile eq '' ? '' : $self->mpc_basename($cfile)); $base = '' if (-d $cfile); foreach my $name (@{$options->{'creators'}}) { ++$loopTimes; if (!$loaded{$name}) { mpc_debug::chkpnt_pre_creator_load($name); require "$name.pm"; mpc_debug::chkpnt_post_creator_load($name); $loaded{$name} = 1; } my $file = $cfile; mpc_debug::chkpnt_pre_creator_create($name); my $creator = $name->new($options->{'global'}, $options->{'include'}, $options->{'template'}, $options->{'ti'}, $options->{'dynamic'}, $options->{'static'}, $options->{'relative'}, $options->{'addtemp'}, $options->{'addproj'}, (-t 1 ? \&progress : undef), $options->{'toplevel'}, $options->{'baseprojs'}, $global_feature_file, $options->{'relative_file'}, $options->{'feature_file'}, $options->{'features'}, $options->{'hierarchy'}, $options->{'exclude'}, $options->{'make_coexistence'}, $options->{'name_modifier'}, $options->{'apply_project'}, $options->{'genins'}, $options->{'into'}, $options->{'language'}, $options->{'use_env'}, $options->{'expand_vars'}, $options->{'gendot'}, $options->{'comments'}, $options->{'for_eclipse'}, $options->{'workers'}, $options->{'workers_dir'}, $options->{'workers_port'}); mpc_debug::chkpnt_post_creator_create($name); ## Update settings based on the configuration file my $verbose_ordering = $cfg->get_value('verbose_ordering'); $creator->set_verbose_ordering($verbose_ordering) if defined $verbose_ordering; if ($base ne $file) { my $dir = ($base eq '' ? $file : $self->mpc_dirname($file)); if (!$creator->cd($dir)) { $self->error("Unable to change to directory: $dir"); $status++; last; } $file = $base; } my $diag = 'Generating \'' . $self->extractType($name) . '\' output using '; if ($file eq '') { $diag .= 'default input'; } else { my $partial = $self->getcwd(); my $oescaped = $self->escape_regex_special($orig_dir) . '(/)?'; $partial =~ s!\\!/!g; $partial =~ s/^$oescaped//; $diag .= ($partial ne '' ? "$partial/" : '') . $file; } $self->diagnostic($diag); my $start = time(); if (!$creator->generate($file)) { $self->error("Unable to process: " . ($file eq '' ? 'default input' : $file)); $status++; last; } my $total = time() - $start; $self->diagnostic('Generation Time: ' . (int($total / 60) > 0 ? int($total / 60) . 'm ' : '') . ($total % 60) . 's'); $creator->cd($orig_dir); } last if ($status); } ## If we went through the loop more than once, we need to print ## out the total amount of time if ($loopTimes > 1) { my $total = time() - $startTime; $self->diagnostic(' Total Time: ' . (int($total / 60) > 0 ? int($total / 60) . 'm ' : '') . ($total % 60) . 's'); } return $status; } sub progress { ## This method will be called before each output file is written. print "$progress[$index]\r"; $index++; $index = 0 if ($index > $#progress); } 1; ace-6.4.5+dfsg.orig/MPC/modules/TemplateInputReader.pm0000644000175000017500000000705513154167361020641 0ustar tggtggpackage TemplateInputReader; # ************************************************************ # Description : Reads the template input and stores the values # Author : Chad Elliott # Create Date : 5/16/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use Parser; use vars qw(@ISA); @ISA = qw(Parser); # ************************************************************ # Data Section # ************************************************************ my $mpt = 'mpt'; # ************************************************************ # Subroutine Section # ************************************************************ sub new { my($class, $inc) = @_; my $self = Parser::new($class, $inc); ## Set up the internal data members $self->{'values'} = {}; $self->{'cindex'} = 0; $self->{'current'} = [ $self->{'values'} ]; $self->{'realnames'} = {}; return $self; } sub parse_line { my($self, $ih, $line) = @_; my $status = 1; my $errorString; my $current = $self->{'current'}; if ($line eq '') { } elsif ($line =~ /^([-\w\s\(\)\.]+)\s*{$/) { ## Entering a new scope, we need to save the real name so that it can ## be accessed at a later time. my $rname = $1; $rname =~ s/\s+$//; my $name = lc($rname); $self->{'realnames'}->{$name} = $rname; ## Scopes are reentrant, so we only create a new map when we haven't ## got one. if (!defined $$current[$self->{'cindex'}]->{$name}) { $$current[$self->{'cindex'}]->{$name} = {}; } ## Keep track of the current scope push(@$current, $$current[$self->{'cindex'}]->{$name}); $self->{'cindex'}++; } elsif ($line =~ /^}$/) { ## Maintain the scope and make sure there aren't any unmatched ## braces. if ($self->{'cindex'} > 0) { pop(@$current); $self->{'cindex'}--; } else { $status = 0; $errorString = 'Unmatched curly brace'; } } elsif ($line =~ /^(\w+)\s*(\+=|=)\s*(.*)?/) { ## Save the name, operation type and value. my $name = lc($1); my $op = $2; my $value = $3; ## Turn the value into an array if (defined $value) { $value = $self->create_array($value); } else { $value = []; } ## Store the value if ($op eq '+=' && defined $$current[$self->{'cindex'}]->{$name}) { push(@{$$current[$self->{'cindex'}]->{$name}}, @$value); } else { $$current[$self->{'cindex'}]->{$name} = $value; } } elsif ($line =~ /^conditional_include\s+"([\w\s\-\+\/\\\.]+)"$/) { ## Search for the include template file. If it does not exist, we ## don't complain. It's likely that these sort of files won't exist. my $file = $self->search_include_path("$1.$mpt"); if (defined $file) { ## Process the file making sure to restore the line number seting ## when we get done. my $ol = $self->get_line_number(); ($status, $errorString) = $self->read_file($file); $self->set_line_number($ol); } } else { $status = 0; $errorString = "Unrecognized line: $line"; } return $status, $errorString; } sub get_value { ## All template names are case-insensitive. my($self, $tag) = @_; return $self->{'values'}->{lc($tag)}; } sub get_realname { ## Sometimes, we need to get back to the name retaining the case so we ## access the hash map containing them. my($self, $tag) = @_; return $self->{'realnames'}->{lc($tag)}; } 1; ace-6.4.5+dfsg.orig/MPC/modules/XMLProjectBase.pm0000644000175000017500000000161313154167361017477 0ustar tggtggpackage XMLProjectBase; # ************************************************************ # Description : An XML base module for Project Creators # Author : Chad Elliott # Create Date : 1/30/2006 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; # ************************************************************ # Subroutine Section # ************************************************************ sub get_quote_symbol { #my $self = shift; return '"'; } sub get_escaped_quote_symbol { #my $self = shift; return '\\"'; } sub get_gt_symbol { #my $self = shift; return '>'; } sub get_lt_symbol { #my $self = shift; return '<'; } sub get_and_symbol { #my $self = shift; return '&&'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/EM3ProjectCreator.pm0000644000175000017500000000204313154167361020146 0ustar tggtggpackage EM3ProjectCreator; # ************************************************************ # Description : An eMbedded Visual C++ 3.00 Project Creator # Author : Chad Elliott # Create Date : 7/3/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC6ProjectCreator; use vars qw(@ISA); @ISA = qw(VC6ProjectCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub project_file_extension { #my $self = shift; return '.vcp'; } sub get_dll_exe_template_input_file { #my $self = shift; return 'em3vcpdllexe'; } sub get_lib_exe_template_input_file { #my $self = shift; return 'em3vcplibexe'; } sub get_lib_template_input_file { #my $self = shift; return 'em3vcplib'; } sub get_dll_template_input_file { #my $self = shift; return 'em3vcpdll'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/MPC.pm0000644000175000017500000000172613154167361015341 0ustar tggtggpackage MPC; # ****************************************************************** # Description : Instantiate a Driver and run it. This is here to # maintain backward compatibility. # Author : Chad Elliott # Create Date : 1/30/2004 # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** use strict; use Driver; # ************************************************************ # Subroutine Section # ************************************************************ sub new { my $class = shift; my $self = bless {'creators' => [], }, $class; return $self; } sub getCreatorList { return $_[0]->{'creators'}; } sub execute { my($self, $base, $name, $args) = @_; my $driver = new Driver($base, $name, @{$self->{'creators'}}); return $driver->run(@$args); } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC6WorkspaceCreator.pm0000644000175000017500000000612713154167361020517 0ustar tggtggpackage VC6WorkspaceCreator; # ************************************************************ # Description : A VC6 Workspace Creator # Author : Chad Elliott # Create Date : 5/13/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC6ProjectCreator; use WinWorkspaceBase; use WorkspaceCreator; use VCPropertyBase; use vars qw(@ISA); @ISA = qw(VCPropertyBase WinWorkspaceBase WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub compare_output { #my $self = shift; return 1; } sub workspace_file_extension { #my $self = shift; return '.dsw'; } sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); ## This identifies it as a Visual C++ file print $fh 'Microsoft Developer Studio Workspace File, Format Version 6.00', $crlf; ## Optionally print the workspace comment $self->print_workspace_comment($fh, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, '#', $crlf, '# MPC Command:', $crlf, '# ', $self->create_command_line_string($0, @ARGV), $crlf, $crlf); } sub write_comps { my($self, $fh, $gen) = @_; my $projects = $self->get_projects(); my $pjs = $self->get_project_info(); my $crlf = $self->crlf(); ## Sort the project so that they resulting file can be exactly ## reproduced given the same list of projects. foreach my $project (sort { $gen->file_sorter($a, $b) } @$projects) { ## Add the project name and project file information print $fh "###############################################################################$crlf$crlf", 'Project: "', $$pjs{$project}->[ProjectCreator::PROJECT_NAME], '"=', $self->slash_to_backslash($project), " - Package Owner=<4>$crlf$crlf", "Package=<5>$crlf", '{{{', $crlf, "}}}$crlf$crlf", "Package=<4>$crlf", '{{{', $crlf; my $deps = $self->get_validated_ordering($project); if (defined $$deps[0]) { ## Add in the project dependencies foreach my $dep (@$deps) { print $fh " Begin Project Dependency$crlf", " Project_Dep_Name $dep$crlf", " End Project Dependency$crlf"; } } ## End the project section print $fh "}}}$crlf$crlf"; } } sub post_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); ## This text is always the same print $fh "###############################################################################$crlf$crlf", "Global:$crlf$crlf", "Package=<5>$crlf", '{{{', "$crlf}}}$crlf$crlf", "Package=<3>$crlf", '{{{', "$crlf}}}$crlf$crlf", "###############################################################################$crlf$crlf"; } 1; ace-6.4.5+dfsg.orig/MPC/modules/Version.pm0000644000175000017500000000275113154167361016346 0ustar tggtggpackage Version; # ************************************************************ # Description : Central location for the MPC version. # Author : Chad Elliott # Create Date : 1/5/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; # ************************************************************ # Data Section # ************************************************************ ## This is the starting major and minor version my $version = '4.1'; my $once = 1; # ************************************************************ # Subroutine Section # ************************************************************ sub get { if ($once) { ## We only need to do this once $once = 0; ## Here we determine the beta version. The base variable ## is the negated number of existing ChangeLog entries at the ## time of the release of the major and minor version. We then ## add the total number of ChangeLog entries to the base to ## get the beta version. my $base = -1; if (open(CLH, ::getBasePath() . '/ChangeLog')) { while() { if (/^\w\w\w\s\w\w\w\s/) { ++$base; } } close(CLH); ## We then append the beta version number to the version string $version .= ".$base"; } else { $version .= '.??'; } } return $version; } 1; ace-6.4.5+dfsg.orig/MPC/modules/WinPropertyBase.pm0000644000175000017500000000151613154167361020014 0ustar tggtggpackage WinPropertyBase; # ************************************************************ # Description : A Windows base module for properties # Author : Chad Elliott # Create Date : 3/9/2010 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; # ************************************************************ # Subroutine Section # ************************************************************ sub get_properties { my $self = shift; ## Get the base class properties and add the properties that we ## support. my $props = $self->Creator::get_properties(); ## All projects that use this base class are for Windows. $$props{'windows'} = 1; return $props; } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC7WorkspaceCreator.pm0000644000175000017500000002320013154167361020507 0ustar tggtggpackage VC7WorkspaceCreator; # ************************************************************ # Description : A VC7 Workspace Creator # Author : Chad Elliott # Create Date : 5/14/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC7ProjectCreator; use WinWorkspaceBase; use WorkspaceCreator; use VCPropertyBase; use vars qw(@ISA); @ISA = qw(VCPropertyBase WinWorkspaceBase WorkspaceCreator); # ************************************************************ # Data Section # ************************************************************ ## NOTE: We call the constant as a function to support Perl 5.6. my %guids = (Creator::cplusplus() => '8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942', Creator::csharp() => 'FAE04EC0-301F-11D3-BF4B-00C04F79EFBC', Creator::java() => 'E6FDF86B-F3D1-11D4-8576-0002A516ECE8', Creator::vb() => 'F184B08F-C81C-45F6-A57F-5ABD9991F28F', Creator::website() => 'E24C65DC-7377-472B-9ABA-BC803B73C61A', ); # ************************************************************ # Subroutine Section # ************************************************************ sub compare_output { #my $self = shift; return 1; } sub workspace_file_extension { #my $self = shift; return '.sln'; } sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); ## This identifies it as a Visual Studio file print $fh 'Microsoft Visual Studio Solution File, Format Version 7.00', $crlf; ## Optionally print the workspace comment $self->print_workspace_comment($fh, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, '#', $crlf, '# MPC Command:', $crlf, '# ', $self->create_command_line_string($0, @ARGV), $crlf); } sub print_inner_project { #my $self = shift; #my $fh = shift; #my $gen = shift; #my $pguid = shift; #my $deps = shift; #my $name = shift; #my $name_to_guid_map = shift; #my $proj_language = shift; #my $cfgs = shift; } sub print_configs { my($self, $fh, $configs) = @_; my $crlf = $self->crlf(); my $count = 0; ## Print out the configurations for the solution foreach my $key (sort keys %$configs) { print $fh "\t\tConfigName.$count = $key$crlf"; $count++; } } sub print_dependencies { my($self, $fh, $gen, $list, $pjs) = @_; my $crlf = $self->crlf(); ## I hate to add yet another loop through all the projects, but ## we must have some way to map plain project names to guids. my %name_to_guid_map; foreach my $project (@$list) { my($name, $guid) = $gen->access_pi_values($pjs, $project, ProjectCreator::PROJECT_NAME, ProjectCreator::PROJECT_GUID); $name_to_guid_map{$name} = $guid; } ## Project Dependencies print $fh "\tGlobalSection(ProjectDependencies) = postSolution$crlf"; foreach my $project (@$list) { my($name, $project_guid) = $gen->access_pi_values( $pjs, $project, ProjectCreator::PROJECT_NAME, ProjectCreator::PROJECT_GUID); my $deps = $self->get_validated_ordering($project); if (defined $$deps[0]) { my $i = 0; foreach my $dep (@$deps) { my $guid = $name_to_guid_map{$dep}; if (defined $guid) { print $fh "\t\t{$project_guid}.$i = {$guid}$crlf"; $i++; } } } } print $fh "\tEndGlobalSection$crlf"; } sub write_comps { my($self, $fh, $gen) = @_; my $projects = $self->get_projects(); my $pjs = $self->get_project_info(); my @list = sort @$projects; my $crlf = $self->crlf(); ## I hate to add yet another loop through all the projects, but ## we must have some way to map plain project names to guids. my %name_to_guid_map; foreach my $project (@list) { my($name, $guid) = $gen->access_pi_values($pjs, $project, ProjectCreator::PROJECT_NAME, ProjectCreator::PROJECT_GUID); $name_to_guid_map{$name} = $guid; } ## Project Information foreach my $project (@list) { my($pname, $guid, $language, @cfgs) = $gen->access_pi_values($pjs, $project, ProjectCreator::PROJECT_NAME, ProjectCreator::PROJECT_GUID, ProjectCreator::LANGUAGE, ProjectCreator::CONFIGURATIONS); my $pguid = $guids{$language}; my $deps = $self->get_validated_ordering($project); my($name, $proj) = $self->adjust_names($pname, $project, $language); print $fh "Project(\"{$pguid}\") = \"$name\", \"$proj\", \"{$guid}\"$crlf"; $self->print_inner_project($fh, $gen, $guid, $deps, $name, \%name_to_guid_map, $language, \@cfgs); print $fh "EndProject$crlf"; } ## This block creates the different possible configurations for this ## solution. print $fh "Global$crlf", "\tGlobalSection(", $self->get_solution_config_section_name(), ") = preSolution$crlf"; my %configs; foreach my $project (@list) { my @cfgs = $gen->access_pi_values($pjs, $project, ProjectCreator::CONFIGURATIONS); foreach my $cfg (@cfgs) { $configs{$self->get_short_config_name($cfg)} = $cfg; } } $self->print_configs($fh, \%configs); print $fh "\tEndGlobalSection$crlf"; ## Print dependencies if there are any $self->print_dependencies($fh, $gen, \@list, $pjs); ## Project Configuration Names print $fh "\tGlobalSection(", $self->get_project_config_section_name(), ") = postSolution$crlf"; ## See if there is an 'Any CPU' or '.NET' configuration my $anycpu; foreach my $key (keys %configs) { if (index($key, 'Any CPU') >= 0 || index($key, '.NET') >= 0) { $anycpu = 1; last; } } ## Go through each project and print out the settings per GUID foreach my $project (@list) { my($pguid, $custom_only, $nocross, @cfgs) = $gen->access_pi_values($pjs, $project, ProjectCreator::PROJECT_GUID, ProjectCreator::CUSTOM_ONLY, ProjectCreator::NO_CROSS_COMPILE, ProjectCreator::CONFIGURATIONS); my %all_configs = %configs; foreach my $cfg (sort @cfgs) { my $c = $self->get_short_config_name($cfg); my $deployable = !$nocross && !$custom_only; my $buildable = !$nocross; ## I don't like this hard-coded configuration information. ## CAE 11/4/2010 if (index($cfg, 'Win32') >= 0 || index($cfg, 'x64') >= 0) { $deployable = undef; $buildable = 1; } if (defined $anycpu) { ## There is a non-C++ project; there is no need to explicitly ## enable building of the configurations for this project. So, we ## get rid of the configuration settings from the copy of the ## configs map. delete $all_configs{$c}; } else { print $fh "\t\t{$pguid}.$c.ActiveCfg = $cfg$crlf"; print $fh "\t\t{$pguid}.$c.Build.0 = $cfg$crlf" if ($buildable); print $fh "\t\t{$pguid}.$c.Deploy.0 = $cfg$crlf" if ($deployable); } } ## If this is a mixed language workspace, we need to explicitly ## enable the building of the non-C++ projects when any platform ## other than Any CPU/.NET is selected. if (defined $anycpu) { my %printed; foreach my $c (sort @cfgs) { if ($c =~ /(.+\|)/) { my $cfg = $1; foreach my $remainder (sort keys %all_configs) { if (index($remainder, $cfg) == 0) { if (!$printed{$pguid.$remainder}) { print $fh "\t\t{$pguid}.$remainder.ActiveCfg = $c$crlf", "\t\t{$pguid}.$remainder.Build.0 = $c$crlf"; $printed{$pguid.$remainder} = 1; } } } } print $fh "\t\t{$pguid}.$c.ActiveCfg = $c$crlf", "\t\t{$pguid}.$c.Build.0 = $c$crlf"; } } else { ## Non-C++ projects have no configurations if (!defined $cfgs[0]) { foreach my $c (sort keys %configs) { my $cfg = $c . '|.NET'; print $fh "\t\t{$pguid}.$c.ActiveCfg = $cfg$crlf", "\t\t{$pguid}.$c.Build.0 = $cfg$crlf"; } } } } print $fh "\tEndGlobalSection$crlf"; $self->print_additional_sections($fh); print $fh "EndGlobal$crlf"; } sub adjust_names { my($self, $name, $proj, $lang) = @_; $proj =~ s/\//\\/g; return $name, $proj; } sub get_short_config_name { my($self, $cfg) = @_; $cfg =~ s/\|.*//; return $cfg; } sub get_solution_config_section_name { #my $self = shift; return 'SolutionConfiguration'; } sub get_project_config_section_name { #my $self = shift; return 'ProjectConfiguration'; } sub print_additional_sections { my($self, $fh) = @_; my $crlf = $self->crlf(); print $fh "\tGlobalSection(ExtensibilityGlobals) = postSolution$crlf", "\tEndGlobalSection$crlf", "\tGlobalSection(ExtensibilityAddIns) = postSolution$crlf", "\tEndGlobalSection$crlf"; } 1; ace-6.4.5+dfsg.orig/MPC/modules/GUID.pm0000644000175000017500000000232213154167361015443 0ustar tggtggpackage GUID; # ************************************************************ # Description : Generate GUID's for VC7 projects and workspaces # Author : Chad Elliott # Create Date : 5/14/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; # ************************************************************ # Subroutine Section # ************************************************************ sub generate { my($out, $in, $cwd) = @_; my $chash = GUID::hash($cwd); my $nhash = GUID::hash($out); my $ihash = GUID::hash($in); my $val = 0xfeca1bad; return sprintf("%08X-%04X-%04X-%04X-%04X%08X", $nhash & 0xffffffff, ($val >> 16) & 0xffff, ($val & 0xffff), ($ihash >> 16) & 0xffff, $ihash & 0xffff, $chash & 0xffffffff); } sub hash { my $str = shift; my $value = 0; if (defined $str) { my $length = length($str); for(my $i = 0; $i < $length; $i++) { $value = (($value << 4) & 0xffffffff) ^ ($value >> 28) ^ ord(substr($str, $i, 1)); } } return $value; } 1; ace-6.4.5+dfsg.orig/MPC/modules/BDS4WorkspaceCreator.pm0000644000175000017500000000463113154167361020613 0ustar tggtggpackage BDS4WorkspaceCreator; # ************************************************************ # Description : A BDS 4 Workspace Creator # Author : Johnny Willemsen # Create Date : 14/12/2005 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use BDS4ProjectCreator; use WinWorkspaceBase; use WorkspaceCreator; use BorlandPropertyBase; use vars qw(@ISA); @ISA = qw(BorlandPropertyBase WinWorkspaceBase WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub crlf { #my $self = shift; return "\n"; } sub compare_output { #my $self = shift; return 1; } sub workspace_file_extension { #my $self = shift; return '.bdsgroup'; } sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); ## This identifies it as a Borland Developer Studio 2006 file print $fh '', $crlf; ## Optionally print the workspace comment $self->print_workspace_comment($fh, '', $crlf, '', $crlf); } sub write_comps { my($self, $fh) = @_; my $crlf = $self->crlf(); ## Print out the guid and the personality information print $fh '', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf; ## Print out the projects in the correct build order foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) { print $fh ' $project', $crlf; } print $fh ' ', $crlf, ' ', $crlf, ' ', $crlf, '', $crlf; } 1; ace-6.4.5+dfsg.orig/MPC/modules/MakePropertyBase.pm0000644000175000017500000000150413154167361020131 0ustar tggtggpackage MakePropertyBase; # ************************************************************ # Description : A Make property base module # Author : Chad Elliott # Create Date : 3/9/2010 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; # ************************************************************ # Subroutine Section # ************************************************************ sub get_properties { my $self = shift; ## Get the base class properties and add the properties that we ## support. my $props = $self->Creator::get_properties(); ## All projects that use this base class are 'make' based. $$props{'make'} = 1; return $props; } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC10ProjectCreator.pm0000644000175000017500000000545413154167361020244 0ustar tggtggpackage VC10ProjectCreator; # ************************************************************ # Description : A VC10 Project Creator # Author : Johnny Willemsen # Create Date : 11/10/2008 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC9ProjectCreator; use vars qw(@ISA); @ISA = qw(VC9ProjectCreator); # ************************************************************ # Data Section # ************************************************************ ## NOTE: We call the constant as a function to support Perl 5.6. my %info = (Creator::cplusplus() => {'ext' => '.vcxproj', 'dllexe' => 'vc10exe', 'libexe' => 'vc10libexe', 'dll' => 'vc10dll', 'lib' => 'vc10lib', 'template' => [ 'vc10', 'vc10filters' ], }, ); my %config = ('vcversion' => '10.00', 'prversion' => '10.0.30319.1', 'toolsversion' => '4.0', 'targetframeworkversion' => '4.0', 'xmlheader' => 1, ); # ************************************************************ # Subroutine Section # ************************************************************ sub get_info_hash { my($self, $key) = @_; ## If we have the setting in our information map, the use it. return $info{$key} if (defined $info{$key}); ## Otherwise, see if our parent type can take care of it. return $self->SUPER::get_info_hash($key); } sub get_configurable { my($self, $name) = @_; return $config{$name}; } ## Because VC10 puts file filters in a different file ## that starts with the project file name, and ends ## with .filters extension. So we need to return two ## templates. sub get_template { my $self = shift; my $templates = $self->SUPER::get_template(); return (UNIVERSAL::isa($templates, 'ARRAY') ? @$templates : $templates); } sub file_visible { my($self, $template) = @_; my $templates = $self->SUPER::get_template(); if (UNIVERSAL::isa($templates, 'ARRAY')) { return ($template eq $$templates[0]); } return 1; } ## If the template is one of the additional templates, ## we need to append the proper extension to the file name. sub project_file_name { my($self, $name, $template) = @_; my $project_file_name = $self->SUPER::project_file_name($name, $template); if (!$self->file_visible($template)) { $project_file_name .= '.filters'; } return $project_file_name; } sub pre_write_output_file { my($self, $webapp) = @_; return $self->combine_custom_types(); } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC7ProjectCreator.pm0000644000175000017500000001147513154167361020172 0ustar tggtggpackage VC7ProjectCreator; # ************************************************************ # Description : A VC7 Project Creator # Author : Chad Elliott # Create Date : 4/23/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use GUID; use ProjectCreator; use VCProjectBase; use XMLProjectBase; use vars qw(@ISA); @ISA = qw(XMLProjectBase VCProjectBase ProjectCreator); # ************************************************************ # Data Section # ************************************************************ ## NOTE: We call the constant as a function to support Perl 5.6. my %info = (Creator::cplusplus() => {'ext' => '.vcproj', 'dllexe' => 'vc7exe', 'libexe' => 'vc7libexe', 'dll' => 'vc7dll', 'lib' => 'vc7lib', 'template' => 'vc7', }, Creator::csharp() => {'ext' => '.csproj', 'dllexe' => 'vc7csharp', 'libexe' => 'vc7csharp', 'dll' => 'vc7csharp', 'lib' => 'vc7csharp', 'template' => 'vc7csharp', }, Creator::java() => {'ext' => '.vjsproj', 'dllexe' => 'vc7java', 'libexe' => 'vc7java', 'dll' => 'vc7java', 'lib' => 'vc7java', 'template' => 'vc7java', }, Creator::vb() => {'ext' => '.vbproj', 'dllexe' => 'vc7vb', 'libexe' => 'vc7vb', 'dll' => 'vc7vb', 'lib' => 'vc7vb', 'template' => 'vc7vb', }, ); my %config = ('vcversion' => '7.00', 'forloopscope' => 'TRUE', ); # ************************************************************ # Subroutine Section # ************************************************************ sub languageSupported { return defined $info{$_[0]->get_language()}; } sub get_info_hash { #my($self, $key) = @_; return $info{$_[1]}; } sub get_configurable { #my($self, $name) = @_; return $config{$_[1]}; } sub fill_value { my($self, $name) = @_; if ($name eq 'guid') { ## Return a repeatable GUID for use within the template. The values ## provided will be hashed and returned in a format expected by ## Visual Studio. return GUID::generate($self->project_file_name(), $self->{'current_input'}, File::Spec->abs2rel($self->getcwd(), $self->getstartdir())); } elsif ($name eq 'language') { ## If this project is a Web Application, the language is website. ## Since Visual Studio 2003 doesn't support Web Applications, this ## will never happen. However, this code is shared by the vc8 ## project type, so it can happen then. return Creator::website if ($self->get_assignment('webapp')); ## Also for the vc8 project type, the language is stored in the ## project file as a comment when external C# references need to be ## added to the resulting project. Since a C++ project can mix with ## C#, the particular project language can not be determined by the ## workspace language. return $self->get_language(); } ## Consult another method for this template name. This method is ## overridden by the other project creators that inherit from this ## one. return $self->get_configurable($name); } sub project_file_extension { return $_[0]->get_info_hash($_[0]->get_language())->{'ext'}; } sub get_dll_exe_template_input_file { return $_[0]->get_info_hash($_[0]->get_language())->{'dllexe'}; } sub get_lib_exe_template_input_file { return $_[0]->get_info_hash($_[0]->get_language())->{'libexe'}; } sub get_dll_template_input_file { return $_[0]->get_info_hash($_[0]->get_language())->{'dll'}; } sub get_lib_template_input_file { return $_[0]->get_info_hash($_[0]->get_language())->{'lib'}; } sub get_template { return $_[0]->get_info_hash($_[0]->get_language())->{'template'}; } sub get_cmdsep_symbol { #my $self = shift; return '&'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/BorlandProjectBase.pm0000644000175000017500000000125113154167361020416 0ustar tggtggpackage BorlandProjectBase; # ************************************************************ # Description : A Borland base module for Borland Project Creators # Author : Chad Elliott # Create Date : 5/5/2009 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use WinProjectBase; use BorlandPropertyBase; our @ISA = qw(BorlandPropertyBase WinProjectBase); # ************************************************************ # Subroutine Section # ************************************************************ 1; ace-6.4.5+dfsg.orig/MPC/modules/CommandHelper.pm0000644000175000017500000000663113154167361017440 0ustar tggtggpackage CommandHelper; # ************************************************************ # Description : Base class and factory for all command helpers. # # The get() method converts the define custom type # provided to uppercase, removes the '_FILES' portion and # adds 'Helper' to the end. If a module is found matching # that name, it will be used to assist the ProjectCreator # in determining which output files will be generated by # the command given the file name and command options. # # Author : Chad Elliott # Create Date : 6/30/2008 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use File::Basename; # ************************************************************ # Data Section # ************************************************************ my %required; my %notfound; # ************************************************************ # Subroutine Section # ************************************************************ sub get { ## Create the helper name my $type = uc(shift); $type =~ s/_FILES$/Helper/; ## Don't search the filesystem again if we didn't find one the first ## time we looked. return undef if ($notfound{$type}); ## Return the helper if we've already created one return $required{$type} if (defined $required{$type}); ## Assist users in figuring out why their helper isn't being picked up. OutputMessage::debug(undef, "Searching @INC for $type.pm"); ## If we can find a helper with this name, we will ## create a singleton of that type and return it. foreach my $inc (@INC) { if (-r "$inc/$type.pm") { require "$type.pm"; $required{$type} = $type->new(); return $required{$type}; } } ## We didn't find a helper. Keep track of that fact and return undef. $notfound{$type} = 1; return undef; } sub new { my $class = shift; return bless {}, $class; } sub get_output { ## This method is called with the filename and command options and ## returns an array reference containing filenames that will be ## generated but can not be described using the normal Define_Custom ## syntax. An optional second return value is a hash reference ## describing additional dependencies as {type => {file => [deps]}}. ## It's used to tell MPC that 'file' (one of the outputs) belongs to ## 'type' and has additional dependencies 'deps'. return []; } sub get_outputexts { ## This method is expected to return an array reference containing the ## extensions for files returned by the get_output() method. They will ## be used as regular expressions so regular expression characters ## (such as '.', '[', ']', etc.) must be escaped. This can be done by ## calling $self->Parser::escape_regex_special($str); return []; } sub get_tied { ## This method is called with a file name and an array reference of ## files. The first expected return value is an array reference of those ## files listed in the passed array reference that are in some way tied ## to the file name passed in. The second is a component name to help ## MPC figure out a way to tie the files together. The result of "tied" ## files is that they may be compiled after the file name passed in. return [], undef; } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC10WorkspaceCreator.pm0000644000175000017500000000343313154167361020567 0ustar tggtggpackage VC10WorkspaceCreator; # ************************************************************ # Description : A VC10 Workspace Creator # Author : Johnny Willemsen # Create Date : 11/10/2008 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC10ProjectCreator; use VC9WorkspaceCreator; use vars qw(@ISA); @ISA = qw(VC9WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); print $fh '', $crlf, 'Microsoft Visual Studio Solution File, Format Version 11.00', $crlf; $self->print_workspace_comment($fh, '# Visual Studio 2010', $crlf, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, '#', $crlf, '# MPC Command:', $crlf, '# ', $self->create_command_line_string($0, @ARGV), $crlf); } sub website_extra_props { my($self, $fh) = @_; print $fh "\t\t" . 'TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"' . $self->crlf(); } sub cpp_proj_ref { my($self, $spc, $refguid, $attr, $relative) = @_; my $crlf = $self->crlf(); return $spc . '' . $crlf . $spc . "\t\{$refguid\}$crlf" . (defined $$attr{'copylocal'} ? $spc . "\t" . $$attr{'copylocal'} . "$crlf" : '' ) . $spc . '' . $crlf; } 1; ace-6.4.5+dfsg.orig/MPC/modules/VCProjectBase.pm0000644000175000017500000000211313154167361017343 0ustar tggtggpackage VCProjectBase; # ************************************************************ # Description : A VC Project base module # Author : Chad Elliott # Create Date : 1/4/2005 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VCPropertyBase; use WinProjectBase; use vars qw(@ISA); @ISA = qw(VCPropertyBase WinProjectBase); # ************************************************************ # Subroutine Section # ************************************************************ sub compare_output { #my $self = shift; return 1; } sub require_dependencies { my $self = shift; ## Only write dependencies for non-static projects ## and static exe projects, unless the user wants the ## dependency combined static library. return ($self->get_static() == 0 || $self->exe_target() || $self->dependency_combined_static_library()); } sub dependency_is_filename { #my $self = shift; return 0; } 1; ace-6.4.5+dfsg.orig/MPC/modules/BCB2009ProjectCreator.pm0000644000175000017500000000150513154167361020465 0ustar tggtggpackage BCB2009ProjectCreator; # ************************************************************ # Description : The Borland C++ Builder 2009 Project Creator # Author : Johnny Willemsen # Create Date : 17/10/2008 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use BCB2007ProjectCreator; use vars qw(@ISA); @ISA = qw(BCB2007ProjectCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub get_dll_exe_template_input_file { #my $self = shift; return 'bcb2009exe'; } sub get_dll_template_input_file { #my $self = shift; return 'bcb2009dll'; } 1; ace-6.4.5+dfsg.orig/MPC/modules/BMakeWorkspaceCreator.pm0000644000175000017500000000612413154167361021075 0ustar tggtggpackage BMakeWorkspaceCreator; # ************************************************************ # Description : A Borland Make Workspace (Makefile) creator # Author : Chad Elliott # Create Date : 2/03/2004 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use BMakeProjectCreator; use MakeWorkspaceBase; use WinWorkspaceBase; use WorkspaceCreator; use BorlandPropertyBase; use vars qw(@ISA); @ISA = qw(MakeWorkspaceBase WinWorkspaceBase WorkspaceCreator BorlandPropertyBase); # ************************************************************ # Data Section # ************************************************************ ## Borland Make's maximum line length my $max_line_length = 32767; my $targets = 'clean generated realclean $(CUSTOM_TARGETS)'; # ************************************************************ # Subroutine Section # ************************************************************ sub workspace_file_extension { #my $self = shift; return '.bmak'; } sub workspace_file_name { my $self = shift; return $self->get_modified_workspace_name('Makefile', '.bmak'); } sub pre_workspace { my($self, $fh) = @_; $self->workspace_preamble($fh, $self->crlf(), 'Borland Workspace Makefile', ''); } sub write_project_targets { my($self, $fh, $crlf, $target, $list, $and) = @_; my $cwd = $self->getcwd(); ## Print out a make command for each project foreach my $project (@$list) { my $dir = $self->mpc_dirname($project); $dir =~ s/\//\\/g; my $chdir = ($dir ne '.'); print $fh "\t", ($chdir ? "\$(COMSPEC) /c \"cd $dir $and " : ''), "\$(MAKE) -\$(MAKEFLAGS) -f ", $self->mpc_basename($project), " $target", ($chdir ? '"' : ''), $crlf; } } sub write_comps { my($self, $fh, $creator) = @_; my %targnum; my $pjs = $self->get_project_info(); my @list = $self->number_target_deps($self->get_projects(), $pjs, \%targnum, 0); my $crlf = $self->crlf(); ## Set up the custom targets print $fh '!ifndef CUSTOM_TARGETS', $crlf, 'CUSTOM_TARGETS=_EMPTY_TARGET_', $crlf, '!endif', $crlf; ## Translate each project name my %trans; foreach my $project (@list) { $trans{$project} = $$pjs{$project}->[ProjectCreator::PROJECT_NAME]; } ## Send all the information to our base class method $self->write_named_targets($fh, $crlf, \%targnum, \@list, $targets, '', '', \%trans, undef, $creator->get_and_symbol(), $max_line_length); } sub get_properties { my $self = shift; ## Create the map of properties that we support. my $props = {}; ## Merge in properties from all base projects foreach my $base (@ISA) { my $func = $base . '::get_properties'; my $p = $self->$func(); foreach my $key (keys %$p) { $$props{$key} = $$p{$key}; } } return $props; } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC71ProjectCreator.pm0000644000175000017500000000166313154167361020251 0ustar tggtggpackage VC71ProjectCreator; # ************************************************************ # Description : A VC7.1 Project Creator # Author : Chad Elliott # Create Date : 4/17/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC7ProjectCreator; use vars qw(@ISA); @ISA = qw(VC7ProjectCreator); # ************************************************************ # Data Section # ************************************************************ my %config = ('vcversion' => '7.10', 'forloopscope' => 'TRUE', ); # ************************************************************ # Subroutine Section # ************************************************************ sub get_configurable { my($self, $name) = @_; return $config{$name}; } 1; ace-6.4.5+dfsg.orig/MPC/modules/Options.pm0000644000175000017500000005660513154167361016363 0ustar tggtggpackage Options; # ************************************************************ # Description : Process mpc command line options # Author : Chad Elliott # Create Date : 3/20/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use DirectoryManager; use StringProcessor; use ProjectCreator; # ************************************************************ # Subroutine Section # ************************************************************ sub printUsage { my $self = shift; my $msg = shift; my $base = shift; my $version = shift; my @types = @_; print STDERR "ERROR: $msg\n" if (defined $msg); my $spaces = (' ' x (length($base) + 8)); print STDERR "$base v$version\n" . "Usage: $base [-global ] [-include ] [-recurse]\n" . $spaces . "[-ti :] [-hierarchy]\n" . $spaces . "[-template ] [-relative NAME=VAL] [-base ]\n" . $spaces . "[-noreldefs] [-notoplevel] [-static] [-genins] [-use_env]\n" . $spaces . "[-value_template ]\n" . $spaces . "[-value_project ]\n" . $spaces . "[-make_coexistence] [-feature_file ] [-gendot]\n" . $spaces . "[-expand_vars] [-features ]\n" . $spaces . "[-exclude ] [-name_modifier ]\n" . $spaces . "[-apply_project] [-version] [-into ]\n" . $spaces . "[-gfeature_file ] [-nocomments]\n" . $spaces . "[-relative_file ] [-for_eclipse]\n" . $spaces . "[-workers <#>] [-workers_dir | -workers_port <#>]\n" . $spaces . "[-language <"; my $olen = length($spaces) + 12; my $len = $olen; my $mlen = 77; my @keys = sort(Creator::validLanguages()); for(my $i = 0; $i <= $#keys; $i++) { my $klen = length($keys[$i]); $len += $klen; if ($len > $mlen) { print STDERR "\n$spaces "; $len = $olen + $klen; } print STDERR $keys[$i]; if ($i != $#keys) { print STDERR ' | '; $len += 3; } } print STDERR ">]\n", $spaces, "[-type <"; $olen = length($spaces) + 8; $len = $olen; ## Sort the project types, but keep those that are the same with different ## version numbers in the right order (i.e., vc8, vc9, vc10, vc11). The vc71 ## type is a special case and needs to stay between vc7 and vc8. @keys = sort { if ($a ne 'vc71' && $b ne 'vc71' && $a =~ /^([^\d]+)(\d+)$/) { my($a1, $a2) = ($1, $2); if ($b =~ /^([^\d]+)(\d+)$/ && $a1 eq $1) { return $a2 <=> $2; } } return $a cmp $b; } @types; for(my $i = 0; $i <= $#keys; $i++) { my $klen = length($keys[$i]); $len += $klen; if ($len > $mlen) { print STDERR "\n$spaces "; $len = $olen + $klen; } elsif ($i) { print STDERR ' '; } print STDERR $keys[$i]; if ($i != $#keys) { print STDERR ' |'; $len += 3; } } print STDERR ">]\n" . $spaces . "[files]\n\n"; print STDERR " -base Add as a base project to each generated\n", " project file. Do not provide a file extension, the\n", " .mpb extension will be tried first; if that fails the\n", " .mpc extension will be tried.\n", " -exclude Use this option to exclude directories or files when\n", " searching for input files.\n", " -expand_vars Perform direct expansion, instead of performing relative\n", " replacement with either -use_env or -relative options.\n", " -feature_file Specifies the feature file to read before processing.\n", " The default feature file is default.features under the\n", " config directory.\n", " -features Specifies the feature list to set before processing.\n", " -for_eclipse Generate files for use with eclipse. This is only\n", " useful for make based project types.\n", " -gendot Generate .dot files for use with Graphviz.\n", " -genins Generate .ins files for use with prj_install.pl.\n", " -gfeature_file Specifies the global feature file. The\n", " default value is global.features under the\n", " config directory.\n", " -global Specifies the global input file. Values stored\n", " within this file are applied to all projects.\n", " -hierarchy Generate a workspace in a hierarchical fashion.\n", " -include Specifies a directory to search when looking for base\n", " projects, template input files and templates. This\n", " option can be used multiple times to add directories.\n", " -into Place all output files in a mirrored directory\n", " structure starting at . This should be a\n", " full path. If any project within the workspace is\n", " referenced via a full path, use of this option is\n", " likely to cause problems.\n", " -language Specify the language preference; possible values are\n", " [", join(', ', sort(Creator::validLanguages())), "]. The default is\n", " ", Creator::defaultLanguage(), ".\n", " -make_coexistence If multiple 'make' based project types are\n", " generated, they will be named such that they can coexist.\n", " -name_modifier Modify output names. The pattern passed to this\n", " parameter will have the '*' portion replaced with the\n", " actual output name. Ex. *_Static\n", " -apply_project When used in conjunction with -name_modifier, it applies\n", " the name modifier to the project name also.\n", " -nocomments Do not place comments in the generated files.\n", " -noreldefs Do not try to generate default relative definitions.\n", " -notoplevel Do not generate the top level target file. Files\n", " are still processed, but no top level file is created.\n", " -recurse Recurse from the current directory and generate from\n", " all found input files.\n", " -relative Any \$() variable in an mpc file that is matched to NAME\n", " is replaced by VAL only if VAL can be made into a\n", " relative path based on the current working directory.\n", " This option can be used multiple times to add multiple\n", " variables.\n", " -relative_file Specifies the relative file to read before processing.\n", " The default relative file is default.rel under the\n", " config directory.\n", " -static Specifies that only static projects will be generated.\n", " By default, only dynamic projects are generated.\n", " -template Specifies the template name (with no extension).\n", " -workers Specifies number of child processes to use to generate\n", " projects.\n", " -workers_dir The directory for storing temporary output files\n", " from the child processes. The default is '/tmp/mpc'\n", " If neither -workers_dir nor -workers_port is used,\n", " -workers_dir is assumed.\n", " -workers_port The port number for the parent listener. If neither\n", " -workers_dir nor -workers_port is used, -workers_dir\n", " is assumed.\n", " -ti Specifies the template input file (with no extension)\n", " for the specific type (ex. -ti dll_exe:vc8exe).\n", " -type Specifies the type of project file to generate. This\n", " option can be used multiple times to generate multiple\n", " types. There is no longer a default.\n", " -use_env Use environment variables for all uses of \$() instead\n", " of the relative replacement values.\n", " -value_project This option allows modification of a project variable\n", " assignment. Use += to add VAL to the NAME's value.\n", " Use -= to subtract and = to override the value.\n", " This can be used to introduce new name value pairs to\n", " a project. However, it must be a valid project\n", " assignment.\n", " -value_template This option allows modification of a template input\n", " name value pair. Use += to add VAL to the NAME's\n", " value. Use -= to subtract and = to override the value.\n", " -version Print the MPC version and exit.\n"; } sub optionError { #my $self = shift; #my $str = shift; } sub path_cleanup { ## Clean up the path as much as possible. For some reason, ## File::Spec->canonpath() on Windows doesn't remove trailing ## /. from the path. (Current versions have fixed this, but ## we'll leave the work-around in case users have an old Perl.) my $p = File::Spec->canonpath($_[0]); $p =~ s/\\/\//g; $p =~ s!/\.$!!; return $p; } sub completion_command { my($self, $name, $types) = @_; my $str = "complete $name " . "'c/-/(gendot genins global include type template relative " . "ti static noreldefs notoplevel feature_file use_env " . "value_template value_project make_coexistence language " . "hierarchy exclude name_modifier apply_project version " . "expand_vars gfeature_file nocomments for_eclipse relative_file)/' " . "'c/dll:/f/' 'c/dll_exe:/f/' 'c/lib_exe:/f/' 'c/lib:/f/' " . "'n/-ti/(dll lib dll_exe lib_exe)/:' "; $str .= "'n/-language/("; my @keys = sort(Creator::validLanguages()); for(my $i = 0; $i <= $#keys; $i++) { $str .= $keys[$i]; $str .= " " if ($i != $#keys); } $str .= ")/' 'n/-type/("; @keys = sort keys %$types; for(my $i = 0; $i <= $#keys; $i++) { $str .= $keys[$i]; $str .= " " if ($i != $#keys); } $str .= ")/'"; return $str; } sub options { my $self = shift; my $name = shift; my $types = shift; my $defaults = shift; my @args = @_; my @include; my @input; my @creators; my @baseprojs; my %ti; my %relative; my %addtemp; my %addproj; my @exclude; my $global; my $template; my $feature_f; my $gfeature_f; my $relative_f; my @features; my $nmodifier; my $into; my $hierarchy = 0; my $language = ($defaults ? Creator::defaultLanguage() : undef); my $dynamic = ($defaults ? 1 : undef); my $comments = ($defaults ? 1 : undef); my $reldefs = ($defaults ? 1 : undef); my $toplevel = ($defaults ? 1 : undef); my $use_env = ($defaults ? 0 : undef); my $expandvars = ($defaults ? 0 : undef); my $static = ($defaults ? 0 : undef); my $recurse = ($defaults ? 0 : undef); my $makeco = ($defaults ? 0 : undef); my $applypj = ($defaults ? 0 : undef); my $genins = ($defaults ? 0 : undef); my $gendot = ($defaults ? 0 : undef); my $foreclipse = ($defaults ? 0 : undef); my $workers = ($defaults ? 0 : undef); my $workers_dir ; my $workers_port; ## Process the command line arguments for(my $i = 0; $i <= $#args; $i++) { my $arg = $args[$i]; $arg =~ s/^--/-/; if ($arg eq '-apply_project') { $applypj = 1; } elsif ($arg eq '-complete') { print $self->completion_command($name, $types) . "\n"; return undef; } elsif ($arg eq '-base') { $i++; if (!defined $args[$i]) { $self->optionError('-base requires an argument'); } else { push(@baseprojs, $args[$i]); } } elsif ($arg eq '-type') { $i++; if (!defined $args[$i]) { $self->optionError('-type requires an argument'); } else { my $type = lc($args[$i]); if (defined $types->{$type}) { my $call = $types->{$type}; my $found = 0; foreach my $creator (@creators) { if ($creator eq $call) { $found = 1; last; } } push(@creators, $call) if (!$found); } else { $self->optionError("Invalid type: $args[$i]"); } } } elsif ($arg eq '-exclude') { $i++; if (defined $args[$i]) { foreach my $exclude (split(',', $args[$i])) { push(@exclude, DirectoryManager::mpc_glob(undef, $exclude)); } } else { $self->optionError('-exclude requires a ' . 'comma separated list argument'); } } elsif ($arg eq '-expand_vars') { $expandvars = 1; } elsif ($arg eq '-feature_file') { $i++; $feature_f = $args[$i]; if (!defined $feature_f) { $self->optionError('-feature_file requires a file name argument'); } } elsif ($arg eq '-features') { $i++; if (defined $args[$i]) { push(@features, split(',', $args[$i])); } else { $self->optionError('-features requires a comma separated list argument'); } } elsif ($arg eq '-for_eclipse') { $foreclipse = 1; } elsif ($arg eq '-gfeature_file') { $i++; $gfeature_f = $args[$i]; if (!defined $gfeature_f) { $self->optionError('-gfeature_file ' . 'requires a file name argument'); } } elsif ($arg eq '-relative_file') { $i++; $relative_f = $args[$i]; if (!defined $relative_f) { $self->optionError('-relative_file ' . 'requires a file name argument'); } } elsif ($arg eq '-gendot') { $gendot = 1; } elsif ($arg eq '-genins') { $genins = 1; } elsif ($arg eq '-global') { $i++; $global = $args[$i]; if (!defined $global) { $self->optionError('-global requires a file name argument'); } } elsif ($arg eq '-help') { $self->optionError(); } elsif ($arg eq '-hierarchy') { $hierarchy = 1; } elsif ($arg eq '-include') { $i++; my $include = $args[$i]; if (!defined $include) { $self->optionError('-include requires a directory argument'); } else { ## If the specified include path is relative, expand it based on ## the current working directory. if ($include !~ /^[\/\\]/ && $include !~ /^[A-Za-z]:[\/\\]?/) { $include = DirectoryManager::getcwd() . '/' . $include; } push(@include, $include); } } elsif ($arg eq '-into') { $i++; $into = $args[$i]; if (!defined $into) { $self->optionError('-into requires a directory argument'); } } elsif ($arg eq '-language') { $i++; $language = $args[$i]; if (!defined $language) { $self->optionError('-language requires a language argument'); } elsif (!Creator::isValidLanguage($language)) { $self->optionError("$language is not a valid language"); } } elsif ($arg eq '-make_coexistence') { $makeco = 1; } elsif ($arg eq '-name_modifier') { $i++; my $nmod = $args[$i]; if (!defined $nmod) { $self->optionError('-name_modifier requires a modifier argument'); } else { $nmodifier = $nmod; } } elsif ($arg eq '-nocomments') { $comments = 0; } elsif ($arg eq '-noreldefs') { $reldefs = 0; } elsif ($arg eq '-notoplevel') { $toplevel = 0; } elsif ($arg eq '-recurse') { $recurse = 1; } elsif ($arg eq '-template') { $i++; $template = $args[$i]; if (!defined $template) { $self->optionError('-template requires a file name argument'); } } elsif ($arg eq '-relative') { $i++; my $rel = $args[$i]; if (!defined $rel) { $self->optionError('-relative requires a variable assignment argument'); } else { if ($rel =~ /(\w+)\s*=\s*(.*)/) { my $name = $1; my $val = $2; $val =~ s/^\s+//; $val =~ s/\s+$//; ## If the specified path is relative, expand it based on ## the current working directory. if ($val !~ /^[\/\\]/ && $val !~ /^[A-Za-z]:[\/\\]?/) { my $orig = $val; $val = DirectoryManager::getcwd() . '/' . $val; ## Inform the user that we're changing the value that they ## provided. $self->warning("-relative value $orig has been changed to\n$val"); } $relative{$name} = path_cleanup($val); } else { $self->optionError('Invalid argument to -relative'); } } } elsif ($arg eq '-workers') { $i++; $workers = $args[$i]; if (!defined $workers) { $self->optionError('-workers requires an argument'); } } elsif ($arg eq '-workers_dir') { $i++; $workers_dir = $args[$i]; if (!defined $workers_dir) { $self->optionError('-workers_dir requires an argument'); } if (! -d $workers_dir) { $self->diagnostic("Creating temp directory $workers_dir"); unless (mkdir $workers_dir) { $self->optionError("Unable to create temp directory $workers_dir"); } } } elsif ($arg eq '-workers_port') { $i++; $workers_port = $args[$i]; if (!defined $workers_port) { $self->optionError('-workers_port requires an argument'); } if ($workers_port < 0 || $workers_port > 65535) { $self->optionError('valid -workers_port range is between 0 and 65535'); } } elsif ($arg eq '-ti') { $i++; my $tmpi = $args[$i]; if (!defined $tmpi) { $self->optionError('-ti requires a template input argument'); } else { if ($tmpi =~ /((dll|lib|dll_exe|lib_exe):)?(.*)/) { my $key = $2; my $name = $3; if (defined $key) { $ti{$key} = $name; } else { foreach my $type ('dll', 'lib', 'dll_exe', 'lib_exe') { $ti{$type} = $name; } } } else { $self->optionError("Invalid -ti argument: $tmpi"); } } } elsif ($arg eq '-use_env') { $use_env = 1; } elsif ($arg eq '-value_template') { $i++; my $value = $args[$i]; if (!defined $value) { $self->optionError('-value_template requires a variable assignment argument'); } else { my @values; my $pc = new ProjectCreator(); if ($pc->parse_assignment($value, \@values)) { $addtemp{$values[1]} = [] if (!defined $addtemp{$values[1]}); ## The extra parameter (3rd) indicates that this value was ## specified on the command line. This "extra parameter" is ## used in ProjectCreator::update_template_variable(). push(@{$addtemp{$values[1]}}, [$values[0], $values[2], 1]); my $keywords = ProjectCreator::getKeywords(); if (defined $$keywords{$values[1]}) { $self->warning($values[1] . ' is a project keyword; you ' . 'should use -value_project instead.'); } } else { $self->optionError('Invalid argument to -value_template'); } } } elsif ($arg eq '-value_project') { $i++; my $value = $args[$i]; if (!defined $value) { $self->optionError('-value_project requires a variable assignment argument'); } else { my @values; my $pc = new ProjectCreator(); if ($pc->parse_assignment($value, \@values)) { $addproj{$values[1]} = [] if (!defined $addproj{$values[1]}); push(@{$addproj{$values[1]}}, [$values[0], $values[2]]); } else { $self->optionError('Invalid argument to -value_project'); } } } elsif ($arg eq '-version') { print 'MPC v', Version::get(), "\n"; return undef; } elsif ($arg eq '-static') { $static = 1; $dynamic = 0; } elsif ($arg =~ /^-/) { $self->optionError("Unknown option: $arg"); } else { push(@input, path_cleanup($arg)); } } ## The following can be time consuming, so we'll only do it if we know ## we're debugging. $self->dump_base_projects(\@include) if ($self->get_debug_level()); return {'global' => $global, 'feature_file' => $feature_f, 'gfeature_file' => $gfeature_f, 'relative_file' => $relative_f, 'features' => \@features, 'for_eclipse' => $foreclipse, 'include' => \@include, 'input' => \@input, 'comments' => $comments, 'creators' => \@creators, 'baseprojs' => \@baseprojs, 'template' => $template, 'ti' => \%ti, 'dynamic' => $dynamic, 'static' => $static, 'relative' => \%relative, 'reldefs' => $reldefs, 'workers' => $workers, 'workers_dir' => $workers_dir, 'workers_port' => $workers_port, 'toplevel' => $toplevel, 'recurse' => $recurse, 'addtemp' => \%addtemp, 'addproj' => \%addproj, 'make_coexistence' => $makeco, 'hierarchy' => $hierarchy, 'exclude' => \@exclude, 'name_modifier' => $nmodifier, 'apply_project' => $applypj, 'gendot' => $gendot, 'genins' => $genins, 'into' => $into, 'language' => $language, 'use_env' => $use_env, 'expand_vars' => $expandvars, }; } sub is_set { my($self, $key, $options) = @_; if (defined $options->{$key}) { if (UNIVERSAL::isa($options->{$key}, 'ARRAY')) { return 'ARRAY' if (defined $options->{$key}->[0]); } elsif (UNIVERSAL::isa($options->{$key}, 'HASH')) { my @keys = keys %{$options->{$key}}; return 'HASH' if (defined $keys[0]); } else { return 'SCALAR'; } } return undef; } sub dump_base_projects { my($self, $includes) = @_; my $dp = new FileHandle(); ## Go through each include directory and print all of the possible base ## projects. Both .mpb and .mpc files can be base projects. foreach my $dir (@$includes) { if (opendir($dp, $dir)) { $self->debug("Base projects from $dir: " . join(' ', grep(/\.mp[bc]$/, readdir($dp)))); closedir($dp); } } } 1; ace-6.4.5+dfsg.orig/MPC/modules/WorkspaceHelper.pm0000644000175000017500000000347713154167361020025 0ustar tggtggpackage WorkspaceHelper; # ************************************************************ # Description : Base class and factory for all workspace helpers # Author : Chad Elliott # Create Date : 9/01/2004 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; # ************************************************************ # Data Section # ************************************************************ my %required; # ************************************************************ # Subroutine Section # ************************************************************ sub get { my $type = shift; ## Create the helper name $type =~ s/Creator/Helper/; $type =~ s/=HASH.*//; ## If we can find a helper with this name, we will ## create a singleton of that type and return it. if (!$required{$type}) { foreach my $inc (@INC) { if (-r "$inc/$type.pm") { require "$type.pm"; $required{$type} = $type->new(); last; } } ## If we can't find the helper, we just create an ## empty helper and return that. $required{$type} = new WorkspaceHelper() if (!$required{$type}); } return $required{$type}; } sub new { my $class = shift; return bless {}, $class; } sub modify_value { my($self, $name, $value) = @_; return $value; } sub modify_libpath { #my $self = shift; #my $str = shift; #my $reldir = shift; #my $libname = shift; return undef; } sub write_settings { #my $self = shift; #my $fh = shift; #my @locals = @_; return 1, undef; } sub perform_custom_processing { #my $self = shift; #my $fh = shift; #my $creator = shift; #my $toplevel = shift; } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC8ProjectCreator.pm0000644000175000017500000000726513154167361020175 0ustar tggtggpackage VC8ProjectCreator; # ************************************************************ # Description : A VC8 Project Creator # Author : Johnny Willemsen # Create Date : 4/21/2004 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC7ProjectCreator; use vars qw(@ISA); @ISA = qw(VC7ProjectCreator); # ************************************************************ # Data Section # ************************************************************ ## NOTE: We call the constant as a function to support Perl 5.6. my %info = (Creator::cplusplus() => {'ext' => '.vcproj', 'dllexe' => 'vc8exe', 'libexe' => 'vc8libexe', 'dll' => 'vc8dll', 'lib' => 'vc8lib', 'template' => 'vc8', }, Creator::csharp() => {'ext' => '.csproj', 'dllexe' => 'vc8csharp', 'libexe' => 'vc8csharp', 'dll' => 'vc8csharp', 'lib' => 'vc8csharp', 'template' => 'vc8csharp', }, Creator::java() => {'ext' => '.vjsproj', 'dllexe' => 'vc8java', 'libexe' => 'vc8java', 'dll' => 'vc8java', 'lib' => 'vc8java', 'template' => 'vc8java', }, Creator::vb() => {'ext' => '.vbproj', 'dllexe' => 'vc8vb', 'libexe' => 'vc8vb', 'dll' => 'vc8vb', 'lib' => 'vc8vb', 'template' => 'vc8vb', }, ); my %config = ('vcversion' => '8.00'); # ************************************************************ # Subroutine Section # ************************************************************ sub languageSupported { return defined $info{$_[0]->get_language()}; } sub webapp_supported { #my $self = shift; return 1; } sub require_dependencies { ## With vc8, they fixed it such that static libraries that depend on ## other static libraries will not be included into the target library ## by default. Way to go Microsoft! return 1; } sub post_file_creation { my($self, $file) = @_; ## VC8 stores information in a .user file that may conflict ## with information stored in the project file. If we have ## created a new project file, we will remove the corresponding ## .user file to avoid strange conflicts. unlink("$file.user"); return undef; } sub get_configurable { #my($self, $name) = @_; return $config{$_[1]}; } sub get_info_hash { my($self, $key) = @_; ## If we have the setting in our information map, the use it. return $info{$key} if (defined $info{$key}); ## Otherwise, see if our parent type can take care of it. return $self->SUPER::get_info_hash($key); } sub translate_value { my($self, $key, $val) = @_; ## Microsoft uses AnyCPU in the project file, but uses Any CPU in the ## solution file. $val = 'Any CPU' if ($key eq 'platform' && $val eq 'AnyCPU'); return $self->SUPER::translate_value($key, $val); } 1; ace-6.4.5+dfsg.orig/MPC/modules/VCPropertyBase.pm0000644000175000017500000000163613154167361017572 0ustar tggtggpackage VCPropertyBase; # ************************************************************ # Description : A VC property base module # Author : Chad Elliott # Create Date : 3/9/2010 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use WinPropertyBase; use vars qw(@ISA); @ISA = qw(WinPropertyBase); # ************************************************************ # Subroutine Section # ************************************************************ sub get_properties { my $self = shift; ## Get the base class properties and add the properties that we ## support. my $props = $self->WinPropertyBase::get_properties(); ## All projects that use this base class are for Microsoft compilers. $$props{'microsoft'} = 1; return $props; } 1; ace-6.4.5+dfsg.orig/MPC/modules/EM3WorkspaceCreator.pm0000644000175000017500000000255213154167361020503 0ustar tggtggpackage EM3WorkspaceCreator; # ************************************************************ # Description : An eMbedded v3 Workspace Creator # Author : Chad Elliott # Create Date : 7/3/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use EM3ProjectCreator; use VC6WorkspaceCreator; use vars qw(@ISA); @ISA = qw(VC6WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub workspace_file_extension { #my $self = shift; return '.vcw'; } sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); ## This identifies it as a Visual C++ for WinCE file print $fh 'Microsoft eMbedded Visual Tools Workspace File, Format Version 3.00', $crlf; ## Optionally print the workspace comment $self->print_workspace_comment($fh, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, '#', $crlf, '# MPC Command:', $crlf, '# ', $self->create_command_line_string($0, @ARGV), $crlf, $crlf); } 1; ace-6.4.5+dfsg.orig/MPC/modules/WinWorkspaceBase.pm0000644000175000017500000000145313154167361020126 0ustar tggtggpackage WinWorkspaceBase; # ************************************************************ # Description : A Windows base module for Workspace Creators # Author : Chad Elliott # Create Date : 2/26/2007 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use WinPropertyBase; use vars qw(@ISA); @ISA = qw(WinPropertyBase); # ************************************************************ # Subroutine Section # ************************************************************ sub crlf { return $_[0]->windows_crlf(); } sub convert_slashes { #my $self = shift; return 1; } sub case_insensitive { #my $self = shift; return 1; } 1; ace-6.4.5+dfsg.orig/MPC/modules/RpmSpecProjectCreator.pm0000644000175000017500000000446413154167361021144 0ustar tggtggpackage RpmSpecProjectCreator; # ************************************************************ # Description : An RPM .spec file Project Creator # Author : Adam Mitz (OCI) # Create Date : 11/23/2010 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use File::Path; use ProjectCreator; use vars qw(@ISA); @ISA = qw(ProjectCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub project_file_extension { return '.dummy'; } # Don't actually write anything, just keep MPC internal data structures # up-to-date as if it had been written. We don't want a .spec file for each # MPC project because that is too fine-grained. See the corresponding # workspace creator for the actual .spec file creation. sub write_output_file { my $self = shift; my $tover = $self->get_template_override(); my @templates = $self->get_template(); @templates = ($tover) if (defined $tover); if (scalar @templates != 1) { return 0, 'there should be only one template'; } my $template = $templates[0]; $self->{'current_template'} = $template; my $name = $self->transform_file_name($self->project_file_name(undef, $template)); $self->process_assignment('project_file', $name); new TemplateParser($self)->collect_data(); if (defined $self->{'source_callback'}) { my $cb = $self->{'source_callback'}; my $pjname = $self->get_assignment('project_name'); my @list = $self->get_component_list('source_files'); if (UNIVERSAL::isa($cb, 'ARRAY')) { my @copy = @$cb; my $s = shift(@copy); &$s(@copy, $name, $pjname, \@list); } elsif (UNIVERSAL::isa($cb, 'CODE')) { &$cb($name, $pjname, \@list); } else { $self->warning("Ignoring callback: $cb."); } } # Still need outdir since ProjectCreator::write_install_file (or similar) # may depend on outdir existing before the WorkspaceCreator runs. my $outdir = $self->get_outdir(); mkpath($outdir, 0, 0777) if ($outdir ne '.'); $self->add_file_written($name); return 1, ''; } 1; ace-6.4.5+dfsg.orig/MPC/modules/VS2017ProjectCreator.pm0000644000175000017500000000342713154167361020433 0ustar tggtggpackage VS2017ProjectCreator; # ************************************************************ # Description : A vs2017 (Visual Studio 2017) Project Creator # Author : Johnny Willemsen # Create Date : 1/04/2016 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC12ProjectCreator; use vars qw(@ISA); @ISA = qw(VC12ProjectCreator); ## NOTE: We call the constant as a function to support Perl 5.6. my %info = (Creator::cplusplus() => {'ext' => '.vcxproj', 'dllexe' => 'vs2017exe', 'libexe' => 'vs2017libexe', 'dll' => 'vs2017dll', 'lib' => 'vs2017lib', 'template' => [ 'vc10', 'vc10filters' ], }, ); my %config = ('vcversion' => '15.00', 'toolsversion' => '15.0', ); # ************************************************************ # Subroutine Section # ************************************************************ sub get_info_hash { my($self, $key) = @_; ## If we have the setting in our information map, then use it. return $info{$key} if (defined $info{$key}); ## Otherwise, see if our parent type can take care of it. return $self->SUPER::get_info_hash($key); } sub get_configurable { my($self, $name) = @_; ## If we have the setting in our config map, then use it. return $config{$name} if (defined $config{$name}); ## Otherwise, see if our parent type can take care of it. return $self->SUPER::get_configurable($name); } 1; ace-6.4.5+dfsg.orig/MPC/modules/VC71WorkspaceCreator.pm0000644000175000017500000000407613154167361020602 0ustar tggtggpackage VC71WorkspaceCreator; # ************************************************************ # Description : A VC7.1 Workspace Creator # Author : Chad Elliott # Create Date : 4/17/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use VC71ProjectCreator; use VC7WorkspaceCreator; use vars qw(@ISA); @ISA = qw(VC7WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); ## This identifies it as a Visual Studio 2003 file print $fh 'Microsoft Visual Studio Solution File, Format Version 8.00', $crlf; ## Optionally print the workspace comment $self->print_workspace_comment($fh, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, '#', $crlf, '# MPC Command:', $crlf, '# ', $self->create_command_line_string($0, @ARGV), $crlf); } sub print_inner_project { my($self, $fh, $gen, $pguid, $deps, $project_name, $name_to_guid_map) = @_; if ($self->allow_empty_dependencies() || defined $$deps[0]) { ## Print out the project dependencies my $crlf = $self->crlf(); print $fh "\tProjectSection(ProjectDependencies) = postProject$crlf"; foreach my $dep (@$deps) { my $guid = $name_to_guid_map->{$dep}; print $fh "\t\t{$guid} = {$guid}$crlf" if (defined $guid); } print $fh "\tEndProjectSection$crlf"; } } sub allow_empty_dependencies { #my $self = shift; return 1; } sub print_configs { my($self, $fh, $configs) = @_; my $crlf = $self->crlf(); foreach my $key (sort keys %$configs) { print $fh "\t\t$key = $key$crlf"; } } sub print_dependencies { ## These are done in the print_inner_project method } 1; ace-6.4.5+dfsg.orig/MPC/modules/BMakeProjectCreator.pm0000644000175000017500000000435113154167361020545 0ustar tggtggpackage BMakeProjectCreator; # ************************************************************ # Description : A BMake Project Creator # Author : Chad Elliott # Create Date : 2/03/2004 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use ProjectCreator; use BorlandProjectBase; use MakeProjectBase; use vars qw(@ISA); @ISA = qw(MakeProjectBase BorlandProjectBase ProjectCreator); # ************************************************************ # Data Section # ************************************************************ my %names = ('cppdir' => 'source_files', 'rcdir' => 'resource_files'); # ************************************************************ # Subroutine Section # ************************************************************ sub fill_value { my($self, $name) = @_; if (defined $names{$name}) { my %dirnames = ('.' => 1); foreach my $file ($self->get_component_list($names{$name}, 1)) { my $dirname = $self->mpc_dirname($file); if ($dirname eq '') { $dirname = '.'; } else { $dirname =~ s/\//\\/g; } $dirnames{$dirname} = 1; } ## Sort the directories to ensure that '.' comes first return join(';', sort keys %dirnames); } return undef; } sub get_and_symbol { #my $self = shift; return '&$(__TRICK_BORLAND_MAKE__)&'; } sub project_file_extension { #my $self = shift; return '.bmak'; } sub get_dll_exe_template_input_file { #my $self = shift; return 'bmakedllexe'; } sub get_lib_exe_template_input_file { #my $self = shift; return 'bmakelibexe'; } sub get_lib_template_input_file { #my $self = shift; return 'bmakelib'; } sub get_dll_template_input_file { #my $self = shift; return 'bmakedll'; } sub get_properties { my $self = shift; ## Create the map of properties that we support. my $props = {}; ## Merge in properties from all base projects foreach my $base (@ISA) { my $func = $base . '::get_properties'; my $p = $self->$func(); foreach my $key (keys %$p) { $$props{$key} = $$p{$key}; } } return $props; } 1; ace-6.4.5+dfsg.orig/MPC/modules/GHSWorkspaceCreator.pm0000644000175000017500000001267013154167361020542 0ustar tggtggpackage GHSWorkspaceCreator; # ************************************************************ # Description : A GHS Workspace creator for version 4.x # Author : Chad Elliott # Create Date : 7/3/2002 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use GHSProjectCreator; use WorkspaceCreator; use GHSPropertyBase; use vars qw(@ISA); @ISA = qw(GHSPropertyBase WorkspaceCreator); # ************************************************************ # Data Section # ************************************************************ my %directives = ('I' => 1, 'L' => 1, 'D' => 1, 'l' => 1, 'G' => 1, 'non_shared' => 1, 'bsp' => 1, 'os_dir' => 1, ); my $tgt; my $integrity = '[INTEGRITY Application]'; my @integ_bsps; # ************************************************************ # Subroutine Section # ************************************************************ sub compare_output { #my $self = shift; return 1; } sub workspace_file_name { return $_[0]->get_modified_workspace_name('default', '.gpj'); } sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); my $prjs = $self->get_projects(); ## Take the primaryTarget from the first project in the list if (defined $$prjs[0]) { my $fh = new FileHandle(); my $outdir = $self->get_outdir(); if (open($fh, "$outdir/$$prjs[0]")) { while(<$fh>) { if (/^#primaryTarget=(.+)$/) { $tgt = $1; last; } } close($fh); } } ## Print out the preliminary information print $fh "#!gbuild$crlf", "primaryTarget=$tgt$crlf", "[Project]$crlf", "\t--one_instantiation_per_object$crlf", "\t:sourceDir=.$crlf", "\t--std$crlf", "\t-language=cxx$crlf", "\t--long_long$crlf", "\t--new_style_casts$crlf"; } sub create_integrity_project { my($self, $int_proj, $project, $type, $target) = @_; my $outdir = $self->get_outdir(); my $crlf = $self->crlf(); my $fh = new FileHandle(); my $int_file = $int_proj; $int_file =~ s/\.gpj$/.int/; if (open($fh, ">$outdir/$int_proj")) { ## First print out the project file print $fh "#!gbuild$crlf", "\t$integrity$crlf", "$project\t\t$type$crlf", "$int_file$crlf"; foreach my $bsp (@integ_bsps) { print $fh "$bsp$crlf"; } close($fh); ## Next create the integration file if (open($fh, ">$outdir/$int_file")) { print $fh "Kernel$crlf", "\tFilename\t\t\tDynamicDownload$crlf", "EndKernel$crlf$crlf", "AddressSpace$crlf", "\tFilename\t\t\t$target$crlf", "\tLanguage\t\t\tC++$crlf", "\tLibrary\t\t\t\tlibINTEGRITY.so$crlf", "\tLibrary\t\t\t\tlibc.so$crlf", "\tLibrary\t\t\t\tlibscxx_e.so$crlf", "\tTask Initial$crlf", "\t\tStackLength\t\t0x8000$crlf", "\tEndTask$crlf", "EndAddressSpace$crlf"; close($fh); } } } sub mix_settings { my($self, $project) = @_; my $rh = new FileHandle(); my $mix = $project; my $outdir = $self->get_outdir(); ## Things that seem like they should be set in the project ## actually have to be set in the controlling project file. if (open($rh, "$outdir/$project")) { my $crlf = $self->crlf(); my $integrity_project = (index($tgt, 'integrity') >= 0); my($int_proj, $int_type, $target); while(<$rh>) { if (/^\s*(\[(Program|Library|Subproject)\])\s*$/) { my $type = $1; if ($integrity_project && $type eq '[Program]') { $int_proj = $project; $int_proj =~ s/(\.gpj)$/_int$1/; $int_type = $type; $mix =~ s/(\.gpj)$/_int$1/; $type = $integrity; } $mix .= "\t\t$type$crlf" . "\t-object_dir=" . $self->mpc_dirname($project) . '/.obj' . $crlf; } elsif (/^\s*(\[Shared Object\])\s*$/) { $mix .= "\t\t$1$crlf" . "\t-pic$crlf" . "\t-object_dir=" . $self->mpc_dirname($project) . '/.shobj' . $crlf; } elsif ($integrity_project && /^(.*\.bsp)\s/) { push(@integ_bsps, $1); } else { if (/^\s*\-((\w)\w*)/) { ## Save the required options into the mixed project string if (defined $directives{$2} || defined $directives{$1}) { $mix .= $_; } ## If this is an integrity project, we need to find out ## what the output file will be for the integrate file. if (defined $int_proj && /^\s*\-o\s+(.*)\s$/) { $target = $1; } } } } if (defined $int_proj) { $self->create_integrity_project($int_proj, $project, $int_type, $target); } close($rh); } return $mix; } sub write_comps { my($self, $fh) = @_; ## Print out each projet foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) { print $fh $self->mix_settings($project); } } 1; ace-6.4.5+dfsg.orig/MPC/modules/BCB2007WorkspaceCreator.pm0000644000175000017500000000761513154167361021023 0ustar tggtggpackage BCB2007WorkspaceCreator; # ************************************************************ # Description : A BCB2007 Workspace Creator # Author : Johnny Willemsen # Create Date : 14/12/2005 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use BCB2007ProjectCreator; use BorlandPropertyBase; use WinWorkspaceBase; use WorkspaceCreator; use vars qw(@ISA); @ISA = qw(BorlandPropertyBase WinWorkspaceBase WorkspaceCreator); # ************************************************************ # Subroutine Section # ************************************************************ sub crlf { #my $self = shift; return "\n"; } sub compare_output { #my $self = shift; return 1; } sub workspace_file_extension { #my $self = shift; return '.groupproj'; } sub pre_workspace { my($self, $fh) = @_; my $crlf = $self->crlf(); ## This identifies it as a Borland C++Builder 2007 file print $fh '', $crlf; ## Optionally print the workspace comment # $self->print_workspace_comment($fh, # '', $crlf, # '', # $crlf); } sub write_comps { my($self, $fh) = @_; my $crlf = $self->crlf(); my $project_info = $self->get_project_info(); my @projects = $self->sort_dependencies($self->get_projects(), 0); ## Print GUID and personality information print $fh ' ', $crlf, ' {1946f85e-487f-46b6-8e41-159cd446db35}', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' Default.Personality', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf; ## Print the project targets foreach my $project (@projects) { my $name = $$project_info{$project}->[ProjectCreator::PROJECT_NAME]; print $fh ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf; } ## Print the target build order print $fh ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, ' ', $crlf, '', $crlf; } 1; ace-6.4.5+dfsg.orig/MPC/modules/FeatureParser.pm0000644000175000017500000000376713154167361017501 0ustar tggtggpackage FeatureParser; # ************************************************************ # Description : Reads the feature files and store the values # Author : Chad Elliott # Create Date : 5/21/2003 # ************************************************************ # ************************************************************ # Pragmas # ************************************************************ use strict; use Parser; use vars qw(@ISA); @ISA = qw(Parser); # ************************************************************ # Subroutine Section # ************************************************************ sub new { my $class = shift; my $features = shift; my @files = @_; my $self = $class->SUPER::new(); ## Set the values associative array $self->{'values'} = {}; ## Process each feature file foreach my $f (@files) { if (defined $f) { my($status, $warn) = $self->read_file($f); if (!$status) { ## We only want to warn the user about problems ## with the feature file. my $lnumber = $self->get_line_number(); $self->warning($self->mpc_basename($f) . ": line $lnumber: $warn"); } } } ## Process each feature definition foreach my $feature (@$features) { my($status, $warn) = $self->parse_line(undef, $feature); ## We only want to warn the user about problems ## with the -feature option. $self->warning("-features parameter: $warn") if (!$status); } return $self; } sub parse_line { my($self, $if, $line) = @_; my $error; if ($line eq '') { } elsif ($line =~ /^(\w+)\s*=\s*(\d+)$/) { ## This is a valid value, so we can store it. $self->{'values'}->{lc($1)} = $2; } else { $error = "Unrecognized line: $line"; } return (defined $error ? 0 : 1), $error; } sub get_names { my @names = sort keys %{$_[0]->{'values'}}; return \@names; } sub get_value { ## All feature names are case-insensitive. my($self, $tag) = @_; return $self->{'values'}->{lc($tag)}; } 1; ace-6.4.5+dfsg.orig/MPC/prj_install.pl0000755000175000017500000003210213154167361015565 0ustar tggtgg#! /usr/bin/perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # ****************************************************************** # Author: Chad Elliott # Create Date: 3/09/2004 # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** use strict; use Cwd; use FileHandle; use File::Copy; use File::Basename; use File::Find; # ****************************************************************** # Data Section # ****************************************************************** my $insext = 'ins'; my $version = '2.0'; my %defaults = ('header_files' => 1, 'idl_files' => 1, 'inline_files' => 1, 'pidl_files' => 1, 'template_files' => 1, 'mpb_files' => 1, ); my %special = ('exe_output' => 1, 'lib_output' => 1, ); my %extended; my %actual; my %base; my %override; my $keepgoing = 0; my $binarydir = ''; eval 'symlink("", "");'; my $hasSymlink = ($@ eq ''); # ****************************************************************** # Subroutine Section # ****************************************************************** sub rm_updirs { my $path = shift; my @parts = split(/[\/\\]/, $path); ## Split the path into parts and check for '..'. If we find one ## and the previous entry wasn't one, then we can remove them both. for(my $i = 0; $i <= $#parts; $i++) { if ($i > 0 && $parts[$i] eq '..' && $parts[$i - 1] ne '..') { splice(@parts, $i - 1, 2); $i -= 2; } } return join('/', @parts); } sub get_dest { my($file, $insdir) = @_; return rm_updirs($insdir . '/' . (defined $actual{$file} ? "$actual{$file}/" . basename($file) : $file)); } sub copyFiles { my($files, $insdir, $symlink, $verbose) = @_; my $type = ($symlink ? 'link' : 'copy'); my $cwd = getcwd(); # If > 1 file in @$files is a symlink to the same target, create one of the # files (the shorter-named one) as a symlink in the destination tree. my %localLink; # keys: files to create as symlinks in the destination # values: symlink target (used in the main loop, below) my %linkTargets; # keys: link targets in the source tree # values: name of the symlink in the source tree foreach my $file (@$files) { if (-l $file) { my $dest = readlink($file); if (exists $linkTargets{$dest} && $file ne $linkTargets{$dest}) { if (length $file <= length $linkTargets{$dest}) { $localLink{$file} = $linkTargets{$dest}; } else { $localLink{$linkTargets{$dest}} = $file; $linkTargets{$dest} = $file; } } else { $linkTargets{$dest} = $file; } } } foreach my $file (@$files) { my $dest = get_dest($file, $insdir); my $fulldir = dirname($dest); if (! -d $fulldir) { my $tmp = ''; foreach my $part (split(/[\/\\]/, $fulldir)) { $tmp .= $part . '/'; mkdir($tmp, 0755); } } if (! -e $dest || (-M $file) < (-M $dest)) { if ($verbose) { print '', ($symlink ? 'Linking' : 'Copying'), " to $dest\n"; } my $status; if ($symlink) { unlink($dest); $status = symlink("$cwd/$file", $dest); } elsif (exists $localLink{$file}) { my $target = get_dest($localLink{$file}, $insdir); if ($fulldir eq dirname($target)) { $target = basename($target); } if ($verbose) { print "\tCreating local symlink to $target\n"; } unlink($dest); $status = symlink($target, $dest); } else { $status = copy($file, $dest); chmod(0755, $dest) if ($status && -x $file); } if (!$status) { print STDERR "ERROR: Unable to $type $file to $dest\n"; if (!$keepgoing) { return 0; } } } else { print "Skipping $file\n" if ($verbose); } } return 1; } sub determineSpecialName { my($tag, $dir, $info) = @_; my($insdir, $name) = split(/\s+/, $info); if (defined $name) { $insdir .= '/'; } else { $name = $insdir; $insdir = ''; } my $odir = ($insdir =~ /^\// ? $insdir : ($dir . $insdir)) . $binarydir; $odir = '.' if $odir eq ''; if ($tag eq 'exe_output') { my @exes; my $fh = new FileHandle(); if (opendir($fh, $odir)) { foreach my $file (grep(!/^\.\.?$/, readdir($fh))) { if ($file =~ /^$name$/ || $file =~ /^$name.*\.exe$/i) { push(@exes, "$dir$insdir$binarydir$file"); } } closedir($fh); } return @exes; } elsif ($tag eq 'lib_output') { my @libs; my $fh = new FileHandle(); if (opendir($fh, $odir)) { foreach my $file (grep(!/^\.\.?$/, readdir($fh))) { if ($file =~ /^lib$name(-[0-9]+(\.[0-9]+)*)?\.(a|so|sl|dylib)/ || $file =~ /^(lib)?$name.*\.(dll|lib)$/i) { push(@libs, "$dir$insdir$binarydir$file"); } } closedir($fh); } return @libs; } return "$dir$name"; } sub replaceVariables { my $line = shift; while($line =~ /(\$\(([^)]+)\))/) { my $whole = $1; my $name = $2; my $val = (defined $ENV{$name} ? $ENV{$name} : ''); $line =~ s/\$\([^)]+\)/$val/; } return $line; } sub loadInsFiles { my($files, $tags, $verbose) = @_; my $fh = new FileHandle(); my @copy; foreach my $file (@$files) { if (open($fh, $file)) { if ($verbose) { print "Loading $file\n"; } my $base = dirname($file); if ($base eq '.') { $base = ''; } else { $base =~ s/^\.[\/\\]+//; $base .= '/'; } my $current; while(<$fh>) { my $line = $_; $line =~ s/^\s+//; $line =~ s/\s+$//; if ($line ne '') { if ($line =~ /^(\w+):$/) { if (defined $$tags{$1}) { $current = $1; } else { $current = undef; } } elsif (defined $current) { $line = replaceVariables($line); my $perFileOverride = undef; my $start = $#copy + 1; if (defined $special{$current}) { push(@copy, determineSpecialName($current, $base, $line)); } else { my($src, $dst); if ($line =~ /^\"([^"]+)\" (.*)/ || $line =~ /^(\S+) (\S+)/) { ($src, $dst) = ($1, $2); } else { ($src, $dst) = ($line, ''); } if (defined $extended{$current}) { push(@copy, "$base$src"); $perFileOverride = $dst; } else { push(@copy, "$base$src"); } } if (-d $copy[-1]) { my $dir = pop @copy; my $replace = $perFileOverride ? ($perFileOverride . '/' . basename($dir)) : ''; find({no_chdir => 1, wanted => sub { if (!(-d || /\.svn\// || /~$/)) { push @copy, $_; my $rel = $_; $rel =~ s/^$dir/$replace/; $actual{$_} = (defined $override{$current} ? $override{$current} : $base{$current}) . '/' . dirname($rel); } } }, $dir); } elsif (defined $override{$current}) { for(my $i = $start; $i <= $#copy; ++$i) { $actual{$copy[$i]} = $override{$current}; } } elsif (defined $base{$current}) { for(my $i = $start; $i <= $#copy; ++$i) { $actual{$copy[$i]} = $base{$current} . '/' . ($perFileOverride ? $perFileOverride : dirname($copy[$i])); } } } } } close($fh); } else { print STDERR "Unable to open $file\n"; return (); } } return @copy; } sub getInsFiles { my $file = shift; my @files; if (-d $file) { my $fh = new FileHandle(); if (opendir($fh, $file)) { foreach my $f (grep(!/^\.\.?$/, readdir($fh))) { push(@files, getInsFiles("$file/$f")); } closedir($fh); } } elsif ($file =~ /\.$insext$/) { push(@files, $file); } return @files; } sub usageAndExit { my $msg = shift; print STDERR "$msg\n" if (defined $msg); my $base = basename($0); my $spc = ' ' x (length($base) + 8); print STDERR "$base v$version\n", "Usage: $base [-a tag1[,tagN]] [-b tag=dir] [-d dir]", ($hasSymlink ? '[-l] ' : ''), "[-o tag=dir]\n", $spc, "[-s tag1[,tagN]] [-x tag1[,tagN]] [-v] [-k] [-i]\n", $spc, "[install directory] [$insext files or directories]\n\n", "Install files matching the tag specifications found ", "in $insext files.\n\n", "-a Adds to the default set of tags that get copied.\n", "-b Install tag into dir underneath the install directory.\n", "-d Libs/executables are copied from this sub-directory.\n", "-i Read standard input in place of the $insext file.\n", "-k Keep going if a file to be copied is missing.\n", ($hasSymlink ? "-l Use symbolic links instead of copying.\n" : ''), "-o Install tag into dir.\n", "-s Sets the tags that get copied.\n", "-v Enables verbose mode.\n", "-x Enable extended behavior for the given tags:\n", " These tags will use the 'gendir' setting from the\n", " project as a relative target directory.\n", "\n", "The default set of tags are:\n"; my $first = 1; foreach my $key (sort keys %defaults) { print STDERR '', ($first ? '' : ', '), $key; $first = 0; } print STDERR "\n"; exit(0); } # ****************************************************************** # Main Section # ****************************************************************** my $verbose; my $first = 1; my $insdir; my $symlink; my @insfiles; my %tags = %defaults; for(my $i = 0; $i <= $#ARGV; ++$i) { my $arg = $ARGV[$i]; if ($arg =~ /^-/) { if ($arg eq '-a') { ++$i; if (defined $ARGV[$i]) { foreach my $tag (split(',', $ARGV[$i])) { $tags{$tag} = 1; } } else { usageAndExit('-a requires a parameter.'); } } elsif ($arg eq '-b') { ++$i; if (defined $ARGV[$i]) { if ($ARGV[$i] =~ /([^=]+)=(.*)/) { $base{$1} = $2; } else { usageAndExit("Invalid parameter to -b: $ARGV[$i]"); } } else { usageAndExit('-b requires a parameter.'); } } elsif ($arg eq '-d') { ++$i; if (defined $ARGV[$i]) { $binarydir = $ARGV[$i]; $binarydir =~ s/\\/\//g; $binarydir .= '/' unless $binarydir =~ /\/$/; } else { usageAndExit('-d requires a parameter.'); } } elsif ($arg eq '-i') { push(@insfiles, '-'); } elsif ($arg eq '-k') { $keepgoing = 1; } elsif ($arg eq '-l') { $symlink = $hasSymlink; } elsif ($arg eq '-o') { ++$i; if (defined $ARGV[$i]) { if ($ARGV[$i] =~ /([^=]+)=(.*)/) { $override{$1} = $2; } else { usageAndExit("Invalid parameter to -o: $ARGV[$i]"); } } else { usageAndExit('-o requires a parameter.'); } } elsif ($arg eq '-s') { ++$i; if (defined $ARGV[$i]) { %tags = (); foreach my $tag (split(',', $ARGV[$i])) { $tags{$tag} = 1; } } else { usageAndExit('-s requires a parameter.'); } } elsif ($arg eq '-v') { $verbose = 1; } elsif ($arg eq '-x') { ++$i; if (defined $ARGV[$i]) { foreach my $tag (split(',', $ARGV[$i])) { $extended{$tag} = 1; } } else { usageAndExit('-x requires a parameter.'); } } else { usageAndExit('Unkown option: ' . $arg); } } elsif (!defined $insdir) { $arg =~ s/\\/\//g; $insdir = $arg; } else { if ($first) { $first = 0; if ($verbose) { print "Collecting $insext files...\n"; } } $arg =~ s/\\/\//g; push(@insfiles, getInsFiles($arg)); } } if (!defined $insdir) { usageAndExit(); } elsif (!defined $insfiles[0]) { print "No $insext files were found.\n"; exit(1); } my $status = 1; my @files = loadInsFiles(\@insfiles, \%tags, $verbose); if (defined $files[0]) { $status = (copyFiles(\@files, $insdir, $symlink, $verbose) ? 0 : 1); } exit($status); ace-6.4.5+dfsg.orig/MPC/docs/0000775000175000017500000000000013157240624013635 5ustar tggtggace-6.4.5+dfsg.orig/MPC/docs/MPC.sgml0000644000175000017500000005720113154167361015146 0ustar tggtgg ]> MPC 1 &mpc;, &mwc; generate project and workspace files &mpc; OPTION FILE &mwc; OPTION FILE DESCRIPTION &mpc; and &mwc;, the Makefile, Project and Workspace Creator generate platform and compiler specific files to automate the compilation process (e.g. GNUmakefile and Makefile.am). The most common way to use the Make Project Creator is to run the workspace generator (&mwc;). This script will generate projects and a single workspace that contains the generated projects. If no input FILE (.mwc file) is specified, it will recurse into the directory in which the script was started. It looks for .mpc files and generates a project or projects for each one found. Most of what is stated about &mwc; applies to &mpc; except that it only generates projects. If an input FILE (.mpc file) is not provided, the project creator will attempt to create a default project in the directory from which the script was started. -global file specifies the global input file. Values stored within this file are applied to all projects. If not specified, defaults to config/global.mpb -include directory specifies a directory to search when looking for base projects, template input files and templates. This option can be used multiple times to add directories. Two include directories are used by default (config and templates) -recurse recurse from the current directory and generate from all found input files. -ti dll | lib | dll_exe | lib_exe:file specifies the template input file (with no extension) for the specific type, e.g. -ti dll_exe:vc8exe. Each project creator has a default template input file for each type of project (dll_exe, lib_exe, dll, lib). You can override the default template input file name with the -ti option. The file must have a mpt extension and must reside within the include search directories. NOTE: the lib and the lib_exe template input files are only used when MPC is generating static projects -hierarchy generate a workspace in a hierarchical fashion. Forces the generation of a hierarchical workspace at each directory level in between the toplevel directory and the location of the .mpc file that is being processed. This is the default for make based workspace creators. NOTE: This option has no effect when when used with &mpc; -template file specifies the template name (with no extension). file should have a .mpd extension and sit in one of the include search directories. NOTE: The -template option overrides the template file for all types specified -relative name=var any $() variable in an mpc file that is matched to name is replaced by var only if var can be made into a relative path based on the current working directory -base project add project as a base project to each generated project file. Do not provide a file extension, the .mpb extension will be tried first; if that fails the .mpc extension will be tried -nocomments do not place comments in the generated files -noreldefs do not try to generate default relative definitions for *_ROOT, which come from environment variables -notoplevel do not generate the top level target file. Files are still processed, but no top level file is created. For &mwc;, it says process all projects for a workspace, but do not generate the top level workspace file. For &mpc;, it says process the .mpc files, but do not generate the project files -static specifies that only static projects are generated. By default, only dynamic projects will be generated. This parameter was previously -static_only. Currently, &mpc; only supports generating dynamic projects or static projects, but not both during the same run. To generate them both you must run &mpc; twice, once with the -static option and once without. Additionally, the vc6, em3, vc7, vc71 and vc8 project names will no longer automatically have _Static appended to the project name when generating static projects. This can still be achieved by using the -name_modifier option. When generating static projects, inter-project dependencies will not be generated for libraries within vc6, em3, vc7, and vc71 workspaces. The reason is due to the fact that each static library that depended upon another would be combined at the library creation stage, resulting in extremely large libraries. Dependencies are handled correctly by vc8 and later. This behavior can be modified by setting the MPC_DEPENDENCY_COMBINED_STATIC_LIBRARY environment variable. It will force &mpc; to generate inter-project dependencies for libraries within a single workspace -genins generate .ins files after processing each project that can be used in conjunction with the prj_install.pl script to install different parts of the project (such as header files) into an alternate location -use_env use environment variables for all uses of $() instead of the relative replacement values -value_template name+=val | name=val | name-=val this option allows modification of a template input name pair. Use += to add val to the name's value. Use -= to subtract and = to override the value. If a template variable value will contain spaces, it is best to enclose the whole setting in double quotes and use single quotes within the value to retain spaces (if it is necessary) -value_project name+=val | name=val | name-=val this option allows modification of a project variable assignment. Use += to add val to the name's value. Use -= to subtract and = to override the value. This can be used to introduce new name value pairs to a project. However, it must be a valid project assignment -make_coexistence if multiple make based project types are generated, they will be named such that they can coexist -feature_file file specifies the features file to read before processing. These feature names can be anything, but they should correspond to values used for the requires and avoids keywords. If a feature is required and is not enabled then the project will not be created. If a feature is to be avoided and it is enabled then the project will not be created. The default feature file is default.features under the config directory -expand_vars perform direct expansion, instead of performing relative replacement with either -use_env or -relative options -features features specifies the feature list to set before processing. Values specified by this option overwrite values from features files, e.g. -features "qos=1,ssl=0" -gendot generate .dot files for use with Graphvis. This option, which is only useful with &mwc;, will result in the generation of .dot files for each workspace processed. Each .dot file will contain information that can be fed to Graphvis to display the dependency information for the various projects found within the workspace. -exclude directories use this option to exclude directories or files when searching for input files. NOTE: This option has no effect when used with &mpc; -name_modifier pattern modify generated workspace or project names. The pattern passed to this parameter will have the * portion replaced with the actual output name. For example -name_modifier '*_Static' will result in all workspace and project names ending in _Static, e.g. FOO_Static.dsw and FOO_Static.dsp -apply_project when used in conjunction with -name_modifier, it applies the name modifier to the project name also. NOTE: this option has no effect without the -name_modifier option -workers Specifies number of child processes to use to generate projects. -workers_dir The directory for storing temporary output files from the child processes. The default is '/tmp/mpc' If neither -workers_dir nor -workers_port is used, -workers_dir is assumed. -workers_port The port number for the parent listener. -version print the MPC version and exit -into directory place all output files in a mirrored directory structure starting at directory -gfeature_file file specifies the global feature file. The default value is global.features under the config directory -language cplusplus | csharp | java | vb specify the language preference. The default is cplusplus -type automake | bcb2007 | bcb2009 | bds4 | bmake | cc | em3 | ghs | html | make | nmake | sle | vc6 | vc7 | vc71 | vc8 | vc9 | vc10 | wb26 specifies the type of project file to generate. This option can be used multiple times to generate multiple types. There is no longer a default. NOTE: The -ti option overrides the template input file for all types specified MPC Codebase Configuration File This configuration file can be used to specify alternate locations for the MPC Configuration File. If a base.cfg is found underneath the 'config' directory where MPC is executed, it will be read to determine the location of MPC.cfg based on the directory in which MPC was started. For example, if $MPC_ROOT/mwc.pl is run under /foo/bar_root/src and $MPC_ROOT/config/base.cfg contained: /foo/bar_root = /foo/bar_root/MPC/config MPC would attempt to open and read /foo/bar_root/MPC/config/MPC.cfg as the MPC Configuration File. If the base configuration file is not present, MPC will try to use $MPC_ROOT/config/MPC.cfg as the MPC Configuration File. You may reference environment variables, accessed by $NAME, on either side of the equals sign. MPC Configuration File In an effort to move away from the use of environment variables, a configuration file has been introduced. The configuration file (MPC.cfg) can contain settings to provide command line options, control logging and direct MPC to dynamic project types. The following keywords are allowed in the configuration file, which will be read from the 'config' directory of MPC. command_line provide additional command line options to MPC. The value of this setting will be prepended to the options passed to &mwc; or &mpc; default_type provide a single project type (as specified by the -type option) as the default project type dynamic_types this comma separated list points to directories in which MPC will search for Perl modules to implement additional MPC project types, base projects or template files. This setting can be used to augment or replace functionality in MPC. For each suitable directory found, it will add a modules include path for Perl to find modules, add a config include path to locate base projects and a template include path to find MPC templates. includes similar to the -include command line option, it adds the list of comma separated paths to the MPC include search paths. logging if this setting contains info=1, informational messages will be printed. If it contains warn=1, warning messages will be printed. If it contains diag=1, diagnostic messages will be printed. If it contains debug=1, debug messages will be printed. And lastly, if it contains detail=1, detail messages will be printed. If it contains none of these, &mpc; will not print out any information or warnings when processing projects or workspaces. Errors are always printed if any are encountered. verbose_ordering if this is set, &mwc; will warn the user about references to projects in the after keyword that have not been processed ENVIRONMENT VARIABLES The following environment variable could affect &mwc; and &mpc;: MPC_DEPENDENCY_COMBINED_STATIC_LIBRARY see the help on -static parameter above MPC_GHS_UNIX this environment variable is only meaningful when generating the ghs project files. By default, the ghs type assumes that it is for Windows. If this is not the case, set this environment variable prior to running MPC ace-6.4.5+dfsg.orig/MPC/docs/LICENSE0000644000175000017500000000451213154167361014645 0ustar tggtggMPC (Licensed Product) is protected by copyright, and is distributed under the following terms. MPC (Make, Project and workspace Creator) is an open source tool, developed by OCI and written in Perl. It is designed to generate a variety of tool specific project files from a common baseline. Through the powerful combination of inheritance and defaults MPC is able to reduce the maintenance burden normally associated with keeping multiple target platforms, their unique build tools, and inconsistent feature sets current. It is also easily extensible to support new build environments. The objective is to solve the prevalent problem of fragile build environments, usually experienced by developer groups, by replacing it with a singular robust build environment, and an active community of users committed to its evolution. Since MPC is open source and free of licensing fees, you are free to use, modify, and distribute the source code, as long as you include this copyright statement. In particular, you can use MPC to build proprietary software and are under no obligation to redistribute any of your source code that is built using MPC. Note, however, that you may not do anything to the MPC code, such as copyrighting it yourself or claiming authorship of the MPC code, that will prevent MPC from being distributed freely using an open source development model. Warranty LICENSED PRODUCT IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. Support LICENSED PRODUCT IS PROVIDED WITH NO SUPPORT AND WITHOUT ANY OBLIGATION ON THE PART OF OCI OR ANY OF ITS SUBSIDIARIES OR AFFILIATES TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT. Support may be available from OCI to users who have agreed to a support contract. Liability OCI OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY LICENSED PRODUCT OR ANY PART THEREOF. IN NO EVENT WILL OCI OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL DAMAGES, EVEN IF OCI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. MPC copyright OCI. St. Louis MO USA, 2003-2006 ace-6.4.5+dfsg.orig/MPC/docs/html/0000775000175000017500000000000013157240624014601 5ustar tggtggace-6.4.5+dfsg.orig/MPC/docs/html/rpmworkflow.png0000644000175000017500000007175513154167361017720 0ustar tggtggPNG  IHDR[MBbKGD IDATxw\V͒ [ME#d9R\ 5Lm8ʑrU\KEQ %W)P 'P|<}s}}>:ץQJ)B!BHO!B!"IB!BKV!B!%$B!B!J,IZB!BX !B!($iB!BQbI*B!ĒU!B!D%IB!BKV!B!%$B!B!J,IZB!BX !B!( g rŠE!B! hϼs]i=z(6lx"B!B6l9s]i!00yB!BYf U*B!ĒU!B!D%IB!BKV!B!%$B!B!J,IZB!BX !B!($iB!BQb:!B留ŋ… \t8㵏T233}6FFF`nn9666`kk5kTuB|Ѕ ~:KJJ ("55144DP\9,,,B Pre~ёexM$B!(Unݺűc8~Mnn.ԨQC{WNlll033eˢGFF$''Mro:Dtt4wggg4i}4jCCCl !\p!߾(228 ^:+W{{{^{5,,,D__,,,HII!;;INN&..8?۹|2\FpqqW_iӦ888l[5IZBQ%%%q ɓRfM\\\4huGGG =7npΟ?_EDD֭#11333Zj'4m}}BA[фDpp0׮]ggg\\\ڵ+kёիɬ,.]EFFo1w\233Rv?B%zօ}}} ,B!bccٲe 7n$88͚5777^uʕ+0x"aaaBtt4666t֍ݻI2etEDDi&6nș3g(WxzzJÆ u"33'OJpp0$&&Lѣ 6Y|k֬חH;%iB!Dp]6oҥK ̌N:ѽ{wڷo_$WP [LL [laӦMaffF>}2d͚5uxBv+V`?ZjѣGwKoI͛ٸq#Ԯ]GJ5IZBQ]| rJܹ3 m۶*ell,ׯgɒ%8qƍ3l0 !J`,XΝ;f:JY"""駟Xz5tԉ#F^,K*:te=0D ׫W/]Pb?/իWSR%uh?`ɒ%^+++ƌСC= !tg׮]̘10<<<>|8]t)'ݻlٲӲeK&OL^IZBvB}寿SNt҅{DDU!E?חP~}]T" 4Ǐc``@- uHB0nݺEvX~=7ndɒ%r!,,,Xlׯgڵܾ}[a !0x`fΜɲe˘7o gaUÃ6mڰyf]$DwUZjիW {ٳ'aaaիWu$B!(|~!7ndΝ:Rؘu{ѷo_tV\\:tҒÇSN]TjԫW0ر#III:GV!B/KyftNh3gݻwɓIR'##Ν;h߰uHNŊٽ{7۷'##CgH*BBԩS Sj-SNՋ;w:!J &sNʖ-pJ-vɿˤIt$B!()))1rHzpJ=F?FaGR#((oSjU]SUZ IB! 177gƌajjի u8Bx 6qѢE ]hժ}C%;;뗤U!->>oYf^SRRXb\N\\+WO> Kfݻ7y-ċf͚5ܾ} &_'N/L&Mbǎ)ˬY5jTZ}G֭Yj^^^:tG?вeKt?U;{%,,(Wk׮{,[LܹsEhٲ%~)϶annΈ#9s&JB+ $iB!s o߾h4B-7,,)SL]e([, 4(x ƍӭ[7m\&O̧~ʈ#h֬lxx8GfL-%%%%߉jժ',,Pf͚E9jݻ7|zUlÍ%&&>7(kmB!ܹsHXZZԩSd硔zmO:U(,RSSsw%))l{.w!55,n߾Mvv6)))Arr2l|=yϻwfݔ)Sfo f޼yl޼3glߑGOO~ W_Ѯ];<<< ?5k2~x~Ƃ-JE Q$iBb7wW^̛7˗3a\|~guСCϴ\XXsaӦMϴRD233IKK#--L&99 III!++ć&YYY? -SSSʔ)Cٲe100lٲ)SSSS100xb qʢI& 25jЩS"mw3fh"Ο?:5XNB/9s[[bm-DiR~}b\2˖-k׮ 0'Obmm](u7iwwwBBBɩxb?+IB'''Fĉ6l7ndǎ (og.sO333022\r`ii1&&&TZCCCʕ+$0beea>~I}}}Rǻᆱ-8++ vڥm2WX4iذ6,H(ǏG__zمmǎtСE͒%KHJJlٲEZӥK}-ZĐ!Cظq3Օ^B```Ç7n\ !D022bܸq >> h``S5 '00۷oOV&Mbdee'|BTT 4`4mڔ\:O?Dzz:#F`矸yf;v,gΜulذ?QQQ,[J*/@!!!9sźu<=[n1yd=W^e…899=t888ĥKXn+Vdeeo߾nƍ?0䊷ۂ8q"#G LLL066BwƔАl^u{=w|lݺГ֊+r \ѣGٳ'J)=Jpp0ɜ?PՆh4$$$hgee3{l}+J*ږ~’DPPk֬)xcbbŽ; S;ooslڴŋkO\'&&̕+WW^%uԡbŊ4nX;o^E155-uQGʕ+s窓'OE)ccceee_ʕ+jԨ/^ԬY:v̙ռyf͚x6lRJݹsGuAٳյkԗ_~5gΜǮLKKS 4P-NsqqQ6ZR*$$D9::j_)))fy=$pppPWFYYYcǪg>qpΝ;W1}7L5jH?~\)Բe˔[ڽ{Zt255UW^ P* @TJM6)OOOմiS|}}ƍ۵k9FeeeVZ222TttC3f:uꨜB-W'|4irss ';8z~*22RS244TǏW{Q]vUS#FP|h݁y P͛7W֭Ӿ߫͛7k_o߾]uE0a.퐛5j&MT$Bv'N>;rGeee (ggTMK>gΜo7|S:..eSRRX/}gϞ|ukNO,IeN:UUX1A ;CzQJ;>*6{Vkkk(OOO~zTwQׯ{y%$$˫UV:!JXejj6mڤP^8ׯW*..+CF!Ɋ+W'NZj4nܘ@=*O<[N>}8qDڿX6 cqW۶mݻ7C ʕ+k.ߧI͕W?3zzgϞ,Yxy}f/ rEG^^뀀6m͛(—é]6EB L2{x]ˆ?dԩ{ !D1)z}}v'V^M6mXd _}QⳔyEp+E E닽3/Č3:t(.]*^b+Wd\2 !^7oo߾L8޽{ƍ,mرԬYJ DZ=zNbB3czzٳUV1j(Ə5ERǏ'===_G@999dgg8E^}{M6,_wߥ]v̞=֭[Ӻukj֬Є(6VVV[=== wRQP\9ʗ/իWB ԯ_@:w̺u배Z^J)}<ȱc{();!x?99)S0n8yIX^Yi݃;j(,YM~ZhMjO$=?ʣO166f׏sңGWͣbx6ȕ_~{ʖ-ˮ]HLLe˖\xQ!*k׮7ߤ_~̚5>ȁ>|8 7ggglmmy뭷7oBif4q޽c̝;-&/LȢEiٲNBQJ\pyƌ3gbŊyVرcIIIҥK0~xYhpo۷ꪽoȑ#lܸ6m0|5kЯ_?4 +W+;wرcL4wyiӦpQ֮]KΝWG=/BϞ=+3W_} >#6mDdd$f⭷zIMMeݺu=ziӦPJ'n3I&1~x:w˟2R t҅-Z~zZnJ\fΜɴiӘ8q"ӧOw^L\]]quuĊ$443k,㱰e˖Һuk^{Bk>_֯_^x%9aӶm[9ya/Yz .]k.z+WXf vuMGdd$w]!8BJڐ&<,/f%+wQ={TjĉO=ҥKM)SF-YUoRruuU'OV{QɅ}O).]R+VPoS#zzOS IDATzaZ^TTrppPvvvjǎż6Ƕm۔U:uT)C! -[:L! 6lchт?Sa4jԈxyg*KP~}N`` W^… ,^Zjn:ڷo51[n%!!Jw5ё5j0l0^ʰaZ+++lڵk~|DDDoҩS'*C'>>w}.]qrruXZJ)ׯmNm>_Դ_ll,!!!ٳg122^xxxмyswi;T#77޽{pG&dŊtؑQFaf̘[_4|L<֭[G^tJBrW\ރF@@tW^!88~{+'ЊՑ#Gڵ+p ̙S TT>}_sIغu+o& 0URV- 9sAJ i-Dit-6oȑ#qvvbŊ[oŞ={}6|gNiFXR|y~W~%ݻ77=gggV\Rb8;;G1tPrOB<+J<|>/--M(;;;ebb>Cu9]UdrrrԮ]TuRSSNܔTʕU>}7|TNNN˜3gC???u֭'.#ߟSTIIIj۶mjW_UzzzJ___?Xر>zsԿ} jРAP۫oF%&&J%Qbb믕222R Rϟ/:V!BJ3/۩[.]w:Bq5O;vDÇux033M6|gHIIaĉ4hЀ *еkWU;pȑB$8|0J*L0ooo-[W JԳEv```$Ś5kCw^~Gn݊:u[ntСTyel¦M8x ˗gРASV-]\rrr8q8pP077E111A)ErHNN֖w/bΝYx1+W~g=OOOAVVNNNၻ;666kff&FFFV$%%vZ~G?NZѣ=ziӦO=^(8z(6mb͜? B~,X rq,BEOOvѮ];bccZwww<==q镜b̾}|tܙcҮ]; ufקI&4i҄#GpmN?#SNL24k֌uKX ݻwSNϟKM2ѣ$ܽ{ZjᅬGvV +@ٲe6lÆ #227qFfϞM*Uh۶-xzzRj"i\rEڷo/[oѸqc]$iB!Dbkk=h}6;v`޽,\1cP\96mJ&Mhܸ1...888K:ucǎ9qJ)4iB6mM$EW^=իСC^ݶm<\VVYYY 2UVf/lO &,,;w`oo; *[ajܸ17f;wm۶Ojj*4i#9q?~cǎqE,,,hݺ5GSNԩSX)j !^j")) 찱La !?^1(( p] Q8::Rzulmm>LLLeˢݻwsܹsx∍%..h.\ q˗I&xyy1uTZnMrtJ{{{0`cÆ _)Çqrrb̙5"!""B;́HMMrxzz_CՉ:uPNƌCvv6;v%KR ~ёʕ+kAvvvXZZbnn!zSRR&++T%>>]牎󤦦hpppŅCҺuk5kBQ{.qqq\v7o˵kHJJ"99DIII!99;wAzz;wX"}}}ʕ+XXX`aaAr尵;;;*U-*T4:F_<@|||tgҤIQ\9ʗ/Oʕ?:\zC\QBjժEZ];}4gϞ… DGGs)vEll,iii\ ԬY郣#T^V酶o߾^eFƍG@@~Q& N@@+100e˖lR;-99Hmbĵk׈'33222Ɔʕ+Hǎqttv4jԨXM%IZOnn./^$::Z!!!!T\Y`ZYYQJmiffQ+6Ƙh_'%%i}9/MIIƍ$&&jޟPR%5k]vB]08Bw iԨ5zOZZdroe˖T{JNF=h8>(iӦfϞMVprrߵg`iiI֭iݺCONN͛$''LNNky>XZZj̊4ivQQQ̑#G8|0/5jԠ~xyy1rHիcTT^z}?77s)gŊ$%%3-ZyԩSGΪ>޽MN>1cưnݺbR!JCCCƌCժUIiN_tB/\ҚѣGٻw/v̨jժѼys>#^u)[-yWUG\BDDaaaBqwwM6mVz/ILL|ԯ_@ׯ_ !DS".B~/Dz5lž={ !99zѶm[mZJ]Y"%]tu s)SLaԬYmMv066qB<;w޽{ "22FCy5)S0qG>!_ޅ$RpJիW_ظq#aaa-[;pBڴi#IjӰaC6lСC%""{gw):uGtSSS]-DuI>|LTSlY*T@|||yWXf#;y8x9BWJJ 7nG__UV=wo ..;wsN 駟lll,s! oooIZ T%/,YPʗ/Onݘ4i^^^FOO\\\?~5j'K ..3tPjժ#F !!>p_>|xEoӦ 'O|b*B!GLZh۶--Z ..m۶qiFM t7n7|Õ+W2e +Vޞ#Fpu]'^ ڵ1cꫯbgg/QQQ׏`nݺŞ={7n...tZjDFF_KcBQ3zhՕݻw3x` ޽{iڴ)eʔiӦ eСۄꊱ1۷Ν;ݻW_}cccڵkGRR1lݺubll7iiiL>FCNa!~+ ޷ofС >c2mڴܒB\%*i~:h;N1DK( Ǝŋꫯزe NNN̛7l]'J,}q|3gbbbXt)>>>TXQ !(ZԨQ>}pĉ|u0y["k???=Z?OӪ000FI= Q'ӷo_,,,8|07e8ժUm۶70f<Ț5k(_C%DNNɌ7///5j$= !(ry< =D|^w} ܹsYB4:;Bܽ{7o&K #::777n޼D 蘯%IXBիW$+SN`hh]d Q(q۶mtڕw}uaii0D1iҤ aaa! !Bg<ERgSӵFGo111ܺuT.]iڴi\xqi\z>-Z믿bff'4i҄zЬYBF=GfAr垵ڗ_|9t!!!̝;_VZhAnݺũShݺ5l߾]Ǒ?ٞ={ԩ%f\@K~zl [f /]Si4)BfhJ<O0v̛͛7EIZk֬vί Cݿ`mmNb|V۷u)99+Vо}{lmm1b~т*;!BQ:[Һ|r*WLǎR… H1;w滗C:u=-[ZjL4K !Ktt4N"!!,(-iݲe ]t)%44Co+ƴoߞ;ww^^}Ui׮;lllh4\\&NFf͚o\~u떯[n{0p@ڴiӧڵk߿?DFFҿfΜ Kꫯprr*;wݻ[ô ѣꫯx״5T֭[ ¿K@@ 4^z| FQ͚5S_x9LIIQS\;w:yZh266VVVV+@>rB!JGj4edd#KHHjtxAxQ 6%'55 oGz:t(C aĉh{ygќK 4hЀLFͲe˘8qbB;wp%^˗r ܾ}[ni322HMM #ClٲN{ʕ+ XYYi+VHjը^:իWRJJÕ)S-[{J|CWڵtv{.vvvԭ[www<==qssFס*\z/MLL qqqOBBiii$&&Z`ffʕ lllP*Tf͚ԬYT^^3Ų555E IDATsTϞ=ٳ34 ޶m%+*Uvжm[z:u*ڵ{؞VZZNNN|7V۷K>q>F>9994j{{{lĄJc}aќ8qiVU! EBB'NٳDEEqN>M\\vsssjԨA屶RJԯ_+++ʔ)%?Q?!99;whXΞ=͛7z䥁իWٙz{.SL1oӓ&y g\|Y۫(zرͥaÆၛtz$""">Μ9QfMmY~}lll055wgaa@JJ (HLL$--8s  &&F{lhddDzhܸѤI~ES,IjܹsQ]=nXO߾}9qѭ[7V^̈́ YjUe.^HJ$v,^^}d~'>3`Eٳt֍^zK} ɉҧOUƚ5;1:8Z*PQJI 3)&fXQ %cn0cI1BGOx?Suq~u}lѱ;P$6wUSS.A':ոr .]/7H$a߿? BWW=zhZ<~x!߿4>}6mByy9B!0x`XXXʪ6Ÿpߚv 1,ZK,,NŹa0l0/VUHHH@LL yfx<AAA\v 555裏`bb#G" l8rrrܴ4` `bb;;;ΎK;vӧOK2'1zhcΝ󑕕DDD@]]WQQ(//7m~%VUUiii`eJJJPRRɓ' K.n=z7obmzAee%tuu1uTL0IúPܺu SL +m׮]_]]]z2yܻwN©SpY@KK 9s&,,,`ll,|>ݺuCn`eeUZD\zݻ7|~<|>PsԤ19r$F oBBbccqqlذ\O5$yz"##s΁cРApvvƪU`nn]o/Ԅe|2㑐͛71[[[={lX[S%3f̀ݻ>}1 čo YYYxyy!44ׯ>cǎk;;;9r֭m߼y3 ԩS Ǝ %%%믘;w.L~'NhuӧTY]]D"xyyaĉ077th|󒔔>jõp1磠mvv6_(**jxEEE.KpK~_M=ۄuСCwD"yf|ёtMѻwoݛ~Q]]9sOƮ]P[[ kkkn#7$͛x߿?`A[[&&& Bx>>4?Xʩc̘13f ɓ'Cll,:uAFFСCKKKI8+((@XXvލhhh .#%kD"1[^111ºu SSS̘1&MpbРA9r$|||.wn݊npsl?m{~uqF̞=?PӧOamm`+VԩSXj޽ sss;woYVVNSK.4w!** ޸t333_C(wqk{!6l؀7J)Sm4_@JJ >} 555aҥG~4k*%%% >IVWW7Hn_Mtpz}^ڠܺc!r=>1i$5 Rw%:uAaРAXhJJJbҥ񁝝&M &Ht{KR߿=aÆaڵ~퉰S~<VVV N444/F"&&aaaXr%aeev}z,,,ի٘1cX`` iKl9;;7xm%ɓ'ُkN oi}^3g2faa֭[۠)++cڵk,663fhh455P(l@ `L__Y[[37776m46|f믿vY²Xiii??B:j>3󙞞 d׮]thSQQɓݻm6ܹs}.]3m\/jRR ]֭[}Fr>\Cll,bccʰzb---@(~ܹsĉí[XXXS.^G֯_jMyn 8>>ؾ};ߋ ==&?1֤r nȗuܙKd:K.R1!5w܉~/fΜ ??? 555Oիaccggg,[ 666zr\tKRϟ?RD"bٲe[:bbb ѓO>ӧf͚E1ƺ~%ݻw999-;`nՄ}69[na8qƌڔKKK>|nB`` aÆ!((H^z[{ÓB,#22ΒA[4<[9*++ŭWPPz<oKj_7_CZx̞=߇7-ZݻK:...ʕ+aggOOOO|IIIHLLDbb"._  mRJ^f``̞=1"&&Xb͛ j}"99FFFXn|||Z[[cٲe044DlllǙ p!a055ի1|#a˖-PPP㑐w c޽ dddȑ#prrtH >|_~py w'##--fW---66~P(|PƆ25yU~~>||| 1b9r+Gn-̨(̛7Xj̙Q\z_~ ;;;n'RFFF7ojkkqU:q@@444^pB F,++ |2V\ ???ZM5pe_8rb1z!$/ޠ?3 3fܹs B"1o߾HNNkC}(z聠 I:PTTlBn)Ɔ2?z\U5z_ mPfZI&pwwtH www8;;s'N={CnoBBn߾ cccaŰ !M'O> P]] MMMnՂשEJJ frI CCC.]B  Æ ɓ1x`DEEaKgcƌ `nn/k֬C#ի={6/`ڵ-*qNi=***PQQiVXMMMK <Ν;uC:YMM5_~'bȑ m@AAk׮ŨQ0a"$$HHH@FFB!憟666r]4W}HkaDŨW ,, 7oބ0]cU 8.\ɓX̭+ OZgϞHJJݻxbc!hHVVV^;wbȐ!tLMM%!444Ѭ=IC>|XWרoMn_7NNc /4i*iKKK`ڴipww1M;;;XXX@AAA!K:ChT\\:uƞ֗⯿|>vZ~z8x 1aIEH˃2…DԄ&D"D"rrr`bb [ntu֡&M!<ւU^c1₂lٲ=z'''̚5 I'O;wݻ7|/Ü&Zx UUU}SUm5)}y(r?g :uP3f`ܹMZ? I=R`8s $i={xjjj`kk]"**=حq,u=ҥ -[@?~&L555=cǎСC)mCyyygϢsΘ:u*f͚%u BHsBJ}s5}P}uNVN^Ծm(sK.ܻ\]]jر[n ϟggמ?VZE ضmt8HTxx8B kطo/hcK}ZG `ȑ9r$=zppuu FQFaСE۷o611yc spphn̳gϘ*ߛk/K(--E||<Μ93gƍ,,,`aa++fxTUUx".^K.Ν; 쌁~T派JH۫h0Xb;׷o_BnR8zhxpuumm!##zŋ1x`A|gomw8}t9/_r>Q[[cӧ۟AGGYYY8{,>cÆ niӦ!//IsZCQQ#F#?F||<믨add~/RSSq ܼy7n@jj*!`ii)SC C& dee mmmnj۩S'ւ1^zgϞvϟVJw zzz077Gxx8%SRR6םrK.y!''Im"11Ix<ٓyaذakM6M:ֻ9r$&OvYJZ_c^0&''˸~:.\`CWWz@6HG{ģGwE~~>WzpBSAAk||TWWk׮>|8\\\---oK7n]7nٳg*L:-7`ddm۶aРA\7/^ ޽Yfa޼y ^%K磤شi ~(//GJJ ```@dffؽ{7ҚOkrvvho/!reTTT`Ȑ!m~'NׯήZy9nܸCC&7n퍕+W}6dr xu*P CFFRSS%|111SBD"hiiA[[ֆ*TTTeeen}Ν;+ %''W'555^Tp,..Fmm- QXXbœ'O#ɓ'ܹ3h[YYaʔ)߿?//!)r*##JÆ <Ç=zYl^^^:[;AHHnF~IDATu333 11 , ҠǏǧ~TCAAf곃+̞=0h 8q"&NX RUU222cǎCӔxZ233ۤmBٿ hhhI۷o_|?>3Ɛ ???[y桴6lhp2f͚ 6 ((;vۺu+w{ͤP]A%S޳gzU>|,dggɓ'Ǐʕ+(,,DQQ={&eeeѹsg@CCׯ젩nݺA[[zB׮][iN!HR݅N >ΰ#(((4yx}60vXJJJ\|}}+++]vիѥKno߾ظq#$W_}wѢE8qc G~6%֦gϞE"yxblݺ8|08ڋy.\_JZ {쁖k?wQUU@[[[/yƍ5k@$GիW[7A$5yxtK}I5lvII 3ZRR*p]II[_AUU뵥e %FBH7nԛ(++CEEE]rvvf̘e˖ť:?e?~<|}}q5ojkk[ǀ7nƍפs)BRJ>8***֠n JJJؼy3&O3f… ˗L#‘#GX7uطon݊˗C,/hܡݖ)))Dd"=ttt F!?~խGjk*,, &L@pp0݋+W߿E"p=z[[[l۶M&DnmǎmÖ-[Иnݺa׮]ɓ-.'OZ8ڵkxM..RB!1~W)Spqx\Ӥ$|nxGGG 44~ WIXn]}6o^l-M5رch v:::022±cZ^zaѢE }jFœ9s?h>[,X m?6VB!ɓqر6I 88K [YYqӧ^T_t)';smܚ+VVZ'"((cǎ7 ՠSN _])񴦈())qk;v,"""Z0j޽9s~zt~-nȫkׯ_###:tޔgϞ&uUӹmׯabbҠݶÇ1f̘6iI&I& B!toi0 zj6fjjj7sL,,,غuXmmm6? dddX>}Xppp?YZZ2:ݗ|||Xnn.+..fLYY`-b,==2LMMϟ7+PZZttt֭[ۤ}B:|\3*++@ ٨Qح[رc&؂ XJJ w͛7< , ~Q6j( BxbުIDDSQQaM_,ػ_#[9B!D%'' 111nx<6gϞիWTY&CtR>|o]ʋ /+}ӳE4<B!MbffٳgcرΖt8/.mF +-\%%% t(eeekRJ!&ѣG7iVKsmBI|WذaC|"8r䈤y9r6mBXXX/II+!BLFF(**#?~fz!ϟ?6;^Gbܹs%!R8q"bcc%{#&&&L%K`ccǧB!"Zٽq–ѣCqq1.\&w;P|9s&o.p:˗/ǔ)S0f$&&J:/!!>}:/_.(i%BHiii!.."Ta6mi&x}@JJ \]]%!Pl޼yÒz X^:(i%BH֭[8q"K 2ϱi&سgΜ9ݻK:4B:OOO@NN իQ^^.鰤Nyy9VZAA^^׮]ĉ%JZ !JTUUi&\t JJJOaooIa%{ƢE0uTܺu ^^^ #ӧsKw߿F`aO?UV!!!{thJZ !ҪLMMqi$%%ANNC9vE@`` h"?X~=TUU%!@ Ν;prrLMMo>TWWK:vW]] X xyy w… !$^=B!MX[[ɓx" 0{l|GEJJÓ DFF {Fhh(kclܸ`ƍ1m4!%%;w{-JZ !Ҧ,,,l,^ǎ)%KƍTVVѣ2e 4551n8TWWˡ)0 a޽{.F%K{™3gP[[+[Mmm-Μ9OOOt K.޽{H!` 'lBi#<<߇>38;;cСՐ{ɓ8}4Ξ=2ƍH$t%%%8x BBB---5 G#dee%b<111Btt4?~ [[[L>ƍRıo>xzzh0%BWԩS8uΝ;jzS r8t"##q())Arr28 ѫWvVB!W\pW\Aii)add 0044ؼϪ*ddd 55o͛74TTT࣏>1d :&&&Tɓ'?8<|033 cccBNN]bz9Ґׯڵkr 8::U9(i%B{x"_[n͛ɡGA= uuuK.ܭP(CEEk(--EAA>}>~YYYFFF?~Z044,,,#ӑ˗/sIcII x<u^zgϞիv튮]BCCPRR2B!7DUUUAQQJJJ'O //yyyHOOGzz:{򐟟R<{ 1nt(**BFF<PTTD׮]NS @I+!BSPTTD=$ ! $>#dB!B!4JZ !B!H-JZ !B!H-JZ !B!H-JZ !B!H-JZ !B!H-JZ !B!HѣGF,B!B#-nIkUU<< MPC: WB26 Project Type

WB26 Project Type documentation

Starting with ACE/TAO x.6.3 it is possible to generate project files for the WindRiver Workbench version 2.6 (VxWorks 6.4). We have validated the MPC support for the ACE lib, TAO libs and the TAO tests.

With VxWorks we have to do a cross build. The first step is to setup a host build, from this host build we use the gperf and TAO_IDL tools in the cross build.

The Workbench is using eclipse as framework and then has several WindRiver specific extensions. Part of the generation done by MPC is then specifically for the WindRiver tools, part is for the eclipse environment. The Workbench uses the fixed project filenames .project, .wrproject, and .wrmakefile. In the .project file the files in the project are listed, in the .wrproject the compiler and linker flags are defined, and in the .wrmakefile the custom build rules are defined, like triggering the IDL compiler.

By default the files are generated in the same directory as the MPC file. When you have multiple projects in one directory you have to add -make_coexistence to the invocation of mwc.pl Then for each project a new subdirectory will be created to store the files the workbench needs. If you run mwc.pl -make_coexistence from the ACE_wrappers directory you will get a lot of subdirectories in your tree.

By default we generate for the flexible build support, when you want to use standard build use -value_template standard_build=1.

To get a project with all dependencies create a new workspace file, f.e. vxworks.mwc

workspace(vxworks) {
  ace
  TAO/tao
  TAO/tests/Hello
}

You should generate the project files from a VxWorks development shell or should have executed the wrenv script. With x.6.4 or newer you do execute:

set ACE_ROOT=your_path
cd %ACE_ROOT%
perl %ACE_ROOT%\bin\mwc.pl vxworks.mwc -type wb26 -make_coexistence

After you have generated the project files you have to import them into your current Workbench workspace with the following steps Open the workbench Select File, Import, General, Existing Projects into Workspace Select your ACE_ROOT directory and let the Workbench search for projects Select now the projects you want to import in the Projects list and select Finish After importing close the workbench Copy the prefs file to its location, see below Start the workbench again

The build order of the projects is stored in an eclipse file that is generated as workspace by the wb26 generator. After you have imported the projects into the Workbench close it and then copy the generated org.eclipse.core.resources.prefs file to the .metadata\.plugins\org.eclipse.core.runtime\.settings directory of the Workbench and then restart the workbench again. Do note that the build order can only be generated for the projects that are listed in the MPC workspace. The other option is to use subprojects to which you can enable with -value_template enable_subprojects=1. There is a bug in Workbench 2.6/3.0 related to the build order, it is ignored if you use wrws_update to build the workspace from the commandline.

When compiling TAO you need to have tao_idl and gperf available. You can copy tao_idl and gperf manually to the ACE_wrappers\bin directory of your target build or you can specify an alternative tao_idl when generating the workspace like below.

perl %ACE_ROOT%\bin\mwc.pl vxworks.mwc -type wb26 -value_template tao_idl=$(HOST_TAO_IDL)
perl %ACE_ROOT%\bin\mwc.pl vxworks.mwc -type wb26 -value_template tao_idl=c:\tmp\tao_idl

When using the -expand_vars by default only the environment variables which match the wildcard *_ROOT are expanded. If you want to get other environment variables expanded (like WIND_BASE) you can specify these through the -relative argument or use a file that you specify with -relative_file. For example you can use the following relative_file which expands the environment variables listed.

*_ROOT
TAO_ROOT,  $ACE_ROOT/TAO
CIAO_ROOT, $TAO_ROOT/CIAO
*_BASE

We do have some limitations at this moment because of restrictions in MPC or the Workbench. We are working on resolving the MPC restrictions, the Workbench restrictions have been reported to WindRiver and are already converted to enhancement requests. It is important to get these enhancement requests implemented by WindRiver. As user you can have impact on the importancy of these enhancement requests, create a new TSR for WindRiver and ask WindRiver to implement these enhancement requests. Pleas let us know that you have done this so that we can inform our local WindRiver contacts. We also have a large list of POSIX enhancement requests, if you are interested in more POSIX compliance contact us to get this list. You need to close the workbench when generating the project files. The WB doesn't detect that the .project/.wrproject/org.eclipse.core.resources.prefs files got changed on disk (WIND00116553) You need to import, close, and then change the build order file (WIND00116553) When using includes/recursive_includes do not use . as path, but an environment variable which can be expanded to a full path (combined WB/MPC restriction) We need to generate full paths in the .project file because WB doesn't support relative files like ../MyHeader.h (WIND00116641) There is no dependency between the IDL file and the resulting *C.{h,cpp,inl} and *S.{h,cpp,inl} files. This is because the IDL compiler can't be integrated a real build tool because a custom clean step can't be defined (WIND00117037)


ace-6.4.5+dfsg.orig/MPC/docs/html/RpmSpec.html0000644000175000017500000001734313154167361017051 0ustar tggtgg MPC: RpmSpec Type

RpmSpec Type documentation

Background/Abstract

  • The RpmSpec Type generates .spec files suitable for use by the rpmbuild utility to build and package. It additionally creates a Bourne shell script that automates creation of source tarball and proper dependency-order building/packaging of .spec files.
  • The RpmSpec type refines the existing aggregated workspace MPC concept, as well as introduces the ability to have specific clauses inside workspace declarations (.mwc files). Consequently, workspace files utilizing these new features are not backwards-compatible with prior releases of MPC.
  • Since RPM is primarily Linux-based, RpmSpec only officially supports use on Linux-based systems. It may work on platforms for which an RPM port exists, but such success would be coincidental and neither intended, tested, nor guaranteed.

Pre-requisites

  • The following software items are required and in the execution path (as well as any of their respective dependencies):
    RPM
    Minimum of version 4.7.1 recommended (not tested with other versions).
    Development toolchain
    This can be the standard development toolchain. Packaging for other architectures is supported if the toolchain in the path is a cross-compiler for that architecture.

Usage

The RpmSpec type refines an existing concept in MPC known as aggregate workspaces to define package scopes. When mwc.pl is run on a top-level workspace with -type rpmspec, each aggregated workspace is presumed to define the scope of a package that will become an RPM. Inter-project dependencies that exist between any projects known to the top-level workspace automatically turn into inter-package dependencies in RPMs.

Generic workflow

rpm workflow
Figure: RPM Workflow
Presuming .mwc files already exist, and that inter-project dependencies are complete and well-formed (i.e., contain sufficient after statements to insure proper build ordering):
  1. Use the command mwc.pl -type rpmspec top-level-workspace.mwc to generate .spec files and *_rpm.sh builder script.
  2. Run the top-level-workspace_rpm.sh script to build/package.

Adapting/Writing Projects for Packaging

Creating Workspaces

The RpmSpec type uses aggregate workspaces to define the scope of a package. In other words, defining a package involves writing a .mwc file that includes all the projects that should go into that package. An additional .mwc file must be written for each additional package. Finally, these package workspaces get aggregated into a workspace.

RPM packages require extra information not needed by "normal" MPC projects or workspaces. This information is defined in a specific clause in the workspace for the rpmspec type, e.g.,

// top-level workspace
workspace {
  specific (rpmspec) {
    rpm_version = 1.0
    rpm_release = 1
  }
  package1.mwc
  package2.mwc
}
Details on the variables allowed in the specific clause can be found in the $MPC_ROOT/docs/templates/rpmspec.txt file.

If you use workspaces as a part of building right now, you may wish to write additional workspace files specifically for packaging via RPM.

Making Projects Install-Ready

MPC-assisted packaging requires some attention from the developer in order to yield its full potential. What this means is that in order for a project to avail itself to be packaged, it must take care to insure that any collateral (such as files) that it needs to end up in the package get installed via MPC's install feature. Note that this feature is currently only implemented within the gnuace project type. Typically, this involves inheriting from the install base project in order to enable auto-generation of installation rules in the makefiles. MPC defaults to making educated guesses as to what files should be installed (e.g., for an exe project, it figures that the executable should be installed), but a developer can augment or replace MPC's guesses using Install*_Files groupings. See the documentation on the gnuace installation feature for details.

Notes

Notes on Generated RPMs

  1. RPMs are relocatable using the --prefix or --relocate options to rpm.
  2. The RpmSpec type has no control over where the RPM system performs it's "work" (building, staging, packaging, etc.). In the past, this was often /usr/src/redhat, though your system may be configured differently.
    rpmbuild holds this directory in its _topdir configuration variable. To see the value of _topdir on your system, execute the following command:
    $ rpmbuild --showrc | grep '_topdir[^}]'
    -14: _topdir	%{getenv:HOME}/rpmbuild
    
  3. Binary RPMs land in _topdir/RPMS.
  4. Source RPMs land in _topdir/SRPMS.

Notes on Generated Script

  1. The script takes one optional argument indicating the architecture for which it should create packages. The script makes no attempt to "find" a toolchain for that architecture, instead presuming that whatever toolchain is needed can be found in the PATH or is specified in the .spec file.
  2. The script performs a build/install activity for each package. Installation is not into the running system, but rather into a "fake" area. Installation is necessary to satisfy inter-package dependency requirements.
    The location of the "fake" area defaults to /tmp/mpcrpm but can be changed by setting the <%rpm_mpc_temp%> in a workspace specific clause, typically in the top-level workspace.

Last modified: Fri Jan 14 09:09:04 CST 2011 ace-6.4.5+dfsg.orig/MPC/docs/html/WB30.html0000644000175000017500000001652013154167361016147 0ustar tggtgg MPC: WB30 Project Type

WB30 Project Type documentation

Background/Abstract

  • The WB30 Project Type generates project files utilizable by Wind River Workbench, version 3.0. Workbench is built on the Eclipse platform and inherits many of its features. In this document, "eclipse" is used at times to describe features common to both eclipse itself and workbench. The project type generates workbench projects from generic mpc files. These workbench projects can then be imported into a user's workspace and built using the workbench "managed flexible build".
  • MPC's WB30 Project Type currently supports Linux and Windows as both host and target platforms. It can be extended to support other platforms as well.
  • Usage

    For every project myprojname { } in mpc files, the WB30 project type generates a corresponding "workbench project" directory of the form wb_myprojname. The WB30 Project Type uses Eclipse's linked resource feature to work around Eclipse's usual requirement that source files reside inside the Eclipse project directory. However, the linked resource feature also comes with restrictions; see the note for details.

    Generic workflow

    Presuming .mpc files already exist:
    1. Generate projects using -type wb30.
    2. Import projects into a Workbench workspace. From within Workbench (preferably an otherwise-empty workspace) select File->Import... and perform the following actions:
      1. Choose General->Existing Projects Into Workspace and click Next
      2. In "Select Root Directory:" text field, enter the full path to the MPC workspace.
      3. Workbench will scan all the subdirectories looking for existing projects.
      4. Be sure that the checkbox next to Copy projects into workspace is UNchecked. Copying projects into the workspace unnecessarily duplicates files, plus we have found that Workbench can get confused with file paths sometimes (though sometimes it will work).
      5. Click Finish to proceed with the import.

    Building A Project

    To build a project or set of projects, select the project (or projects) in the Project pane, then select Project->Build Project.

    Platforms and Buildspecs

    The default platform for WB30 is called "Native" and corresponds to creating a project in Workbench using File -> New -> Native Application Project. Although this method doesn't have (in workbench) any direct support for building shared libraries, MPC does generate projects that pass the correct compiler and linker flags to create shared (dynamic) libraries. Selecting static or shared libraries with WB30 works the same as with any other MPC project type.

    The alternative platform, "VxWorks" can be selected by passing the option -value_template platform=VxWorks on the mwc.pl command line. Currently the VxWorks support is inherited from the existing -type wb26 template, so it may need some more work before it is production-ready. Note that the wb26 template supported only DKM projects for VxWorks (Downloadable Kernel Modules).

    Each platform includes a list of supported buildspecs, and a single default buildspec. For the "Native" platform, the list of supported buildspecs is:

    • Linux_gnu_native_3.x_4.x
    • Windows_gnu_native_3.x_4.x
    Users can select the list of buildspecs by passing the option -value_template buildspecs=<specs> on the mwc.pl command line, where <specs> is replaced by the buildspec value or values. Multiple values are separated by spaces (with the entire specs string enclosed in quotes). Similarly, the default buildspec can be selected with -value_template default_buildspec=<spec>.

    New buildspecs (or even platforms) can be added by either editing the file $MPC_ROOT/templates/wb30dll.mpt (if the modification will be submitted back to the public MPC repository), or creating a file named user_wb30dll.mpt anywhere on the MPC -include search path. Within either of these files, create a scope for the platform/buildspec and use assignment statements within that scope to set the various template variables. The existing buildspecs serve as the best examples.

    Notes

    1. MPC doesn't directly generate Workbench workspaces, because they depend on an unknown binary file format that it can't generate. Instead of generating files that can be loaded as a Workbench workspace, MPC generates two files representing the workspace:
      1. wb30projects.lst
      2. org.eclipse.core.resources.prefs
      wb30projects.lst contains comment lines (starting with #) followed by one line per project, listing the full path to the .project file.
      org.eclipse.core.resources.prefs also begins with comment lines (starting with #) follwed by the contents of one of the files from Eclipse's workspace format, specifically: .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs Unfortunately, this file alone is not enough to actually constitute a workspace because Eclipse uses other binary files in this .settings directory.
    2. WB30 uses Eclipse's linked resource feature to work around the usual requirement that all source code reside in Workbench project directories. These act similar to symbolic links. While convenient so that a developer is not required to conform to Workbench's directory layout, it comes at a price: the target of the link must be specified as a full path. The consequence of this restriction is that, once the WB30 projects get generated, the source directory can not move in the filesystem without re-generating the projects.
    3. MPC's WB30 Project Generator creates directories named wb_* for projects. To remove all WB30 projects from a directory hierarchy, on Linux you can use a command such as:
        $ find . -name 'wb_*' -type d | xargs rm -rf
      

    ace-6.4.5+dfsg.orig/MPC/docs/html/MakeProjectCreator.html0000644000175000017500000130233213154167361021220 0ustar tggtgg MPC

     

    The Makefile, Project, and Workspace Creator (MPC)

    Introduction


    Maintaining multiple build tool files for a multi-platform project can be quite a challenge, especially when the project structure and platforms are constantly changing and evolving. A project may support Makefiles, Visual C++ project files, Borland Makefiles, and many others. Adding files, deleting files, changing project options or even changing the name of the target within your project will require you to expend time updating each build tool file. What you need instead is a single location to store project specific information to avoid repetitious, tedious modifications to multiple build tool files. This is where Makefile Project Creator (MPC) comes into the picture.

    MPC can be used to generate build tool specific project files from a generic mpc file. The MPC project file is a collection of source files that make up a single build target. MPC uses platform specific input along with mpc files and generates build tool specific files like makefiles, Visual C++ workspace and project files, Visual Studio solution and project files, etc.

    MPC provides many advantages over the build tool files it replaces. It provides mechanisms for minimizing maintenance of project build files. It does this through support for project inheritance and defaults for all aspects of a project, and the syntax is simple and easy to use and maintain. These and other features will be discussed in detail in the following sections. The structure and syntax of the MPC files are described in the Writing MPC and MWC Files section. In addition, a complete example of the use of MPC is shown in the Example MPC File section.

    Using MPC


    An MPC project is a set of parameters that describe an individual build target (such as a library or executable). These parameters include the target name, include paths, source files, header files, etc. One or more projects can be defined within a single mpc file. An MPC workspace is just an arbitrary collection of projects.

    Projects can be generated (without workspaces) by using the mpc.pl script. Multiple mpc files can be passed to this script. If no mpc files are passed to the script, it will search for project-related files (such as source files, header files, etc.) and incorporate them into a default project.

    This diagram shows a high-level view of project file generation using mpc.pl.

    Generating projects with mpc.pl

     

    Generating projects with mpc.pl

    To generate workspaces, you must run mwc.pl. This script will generate projects from mpc files and create a workspace based on those mpc files. If no mwc files are passed to the script, it will search in the current directory and its subdirectories for all mpc files and incorporate them into a single workspace.

    For make based project types (make, gnuace, bmake, nmake), a workspace is just a top-level makefile. But, for graphical interfaces such as Visual Studio, a workspace is the top-level file that groups all of the project files together.

    The following diagram shows a high-level view of workspace file generation using mwc.pl.

    Generating workspaces with mwc.pl

     

    Generating workspaces with mwc.pl

    Supported Build Tools

    MPC generates workspaces and projects for use with many build tools. This table lists the MPC types (used with mpc’s -type option) and their associated build tools.

    MPC Types

    Type

    Build Tool

    automake

    GNU Automake.

    bcb2007

    Borland C++ Builder 2007.

    bcb2009

    CodeGear C++ Builder 2009.

    bds4

    Support for Borland Developer Studio 4 is incomplete.

    bmake

    Borland Make.

    cc

    Code Composer Studio 2.0

    cdt6

    Eclipse CDT 6 (for Eclipse "Galileo" 3.5)

    cdt7

    Eclipse CDT 7 (for Eclipse "Helios" 3.6)

    em3

    eMbedded Visual C++ 3.00 and 4.00.

    ghs

    Green Hills C++ Builder.

    gnuace

    GNU Make for ACE/TAO/CIAO only (ACE/TAO/CIAO extension).

    html

    html pages are generated for visualization of project information.

    make

    Generic make. The makefiles generated by this project type can be used with any version of make. However, due to configuration issues, it should not be used with ACE or TAO.

    nmake

    Microsoft NMake.

    rpmspec

    RPM packaging .spec files.

    sle

    Support for Visual SlickEdit is incomplete.

    vc6

    Visual C++ 6.0.

    vc7

    Visual Studio .NET 2002.

    vc71

    Visual Studio .NET 2003.

    vc8

    Visual Studio 2005.

    vc9

    Visual Studio 2008.

    vc10

    Visual Studio 2010.

    vc11

    Visual Studio 2012.

    vc12

    Visual Studio 2013.

    vc14

    Visual Studio 2015.

    vs2017

    Visual Studio 2017.

    wb26

    Wind River Workbench 2.6.

    wb30

    Wind River Workbench 3.0.

    wix

    Wix toolset for .msi creation.

    Command Line

    The command line options for the workspace creator (mwc.pl) and the project creator (mpc.pl) are exactly the same. The project creator is used to generate one or more separate projects by passing mpc files to it on the command line. The workspace creator is used to generate one or more workspaces and the projects related to those workspaces.

    The table below describes each option with the more commonly used options in bold and project specific options in italics.

    Command Line Options

    Option

    Description

    -base

    This option allows the user to force every project to inherit from a specified base project. This option can be used multiple times to force multiple inheritance upon a project.

    -complete

    This hidden option can be used to generate a tcsh complete command that allows a user of the tcsh shell to complete on options as well as file names.

    -exclude

    If this option is used with mwc.pl , the directories or mwc files provided in a comma separated list will be excluded when searching for mpc files. Each element provided for exclusion should be relative to the starting directory. This option has no effect when used with mpc.pl.

    -expand_vars

    This option instructs MPC to perform direct replacement of $() variables with the values from the environment (if the -use_env option is used) or the values specified by the -relative option.

    -feature_file

    This option allows the user to override the default feature file (MPC/config/ default.features or ACE_wrappers/bin/MakeProjectCreator/config/default.features ) which may or may not exist. This file can be used to override feature values specified in the global.features file located in the config directory. Feature files are described in the Feature File section.

    -features

    Specifies the feature list to set before processing. This is a comma separated list and should contain no spaces. The -features option can be used multiple times on the same command line, the effect is the same as if the parameters had been specified with a single -features options, with the parameters joined by commas.

    -for_eclipse

    Allows generated makefiles to be used with Eclipse.

    -gendot

    A .dot file, for use with Graphviz, will be created for each workspace processed.

    -genins

    This option instructs MPC to generate an “install” file after processing each project. These “install” files can be used with the prj_install.pl script which will copy portions of the project related files into a user specified location.

    -gfeature_file

    Specifies the global feature file. The default global feature file is global.features found in the config directory.

    -global

    This option specifies the global input file. Values stored within this base project are applied to all generated projects. The default value is ACE_wrappers/bin/MakeProjectCreator/global.mpb or MPC/config/global.mpb .

    -hierarchy

    If this option is used with mwc.pl , it will generate a workspace at each directory between the directory in which it is run and the location of a processed mpc file. This option has no effect when used with mpc.pl and is the default for “make” based workspace types.

    -include

    Include search directories are added with this option. These search directories are used when locating base projects, template input files and templates. It can be used multiple times on the same command line.

    -into

    This option specifies that all generated project files will be placed in a mirrored directory structure. If any project within the workspace is referenced via a full path, use of this option is likely to cause problems.

    -language

    This option is used to specify which language to assume when generating projects. The default language is cplusplus, but csharp, java and vb are also supported.

    -make_coexistence

    Make based project types that normally name the workspace Makefile (bmake or nmake ) will name the generated output files such that they can coexist within the same directory. In essence, the bmake and nmake workspace names will not be Makefile, but the name of the workspace followed by the project type (.bmake or .nmake ).

    -name_modifier

    This option allows the user to modify the output names of projects and workspaces. These are usually determined by either the mpc or mwc file, but can be modified using a pattern replacement. The parameter passed to this option will be used as the pattern and any asterisks (*) found in the pattern will be replaced with the project or workspace name depending on which type of file is being created.

    -apply_project

    This option is only useful with the -name_modifier option. When used in conjunction with -name_modifier, the pattern will be applied to the project name in addition to the project or workspace name.

    -nocomments

    Comments will not be placed in the generated workspace files.

    -noreldefs

    This option specifies that the default relative definitions should not be generated. See the -relative option below.

    -notoplevel

    This option tells mwc.pl to generate all workspace related project files, but do not generate the associated workspace. This option tells mpc.pl to process all mpc files passed in, but it will not generate any project files.

    -recurse

    Search from the current directory for any input files and process them from the directory in which they are located.

    -relative

    Relative paths are used to replace variables enclosed with $(). By default, any environment variable that ends in _ROOT will be automatically used as a relative path replacement. For more information see the -relative Option.

    -relative_file

    This option allows you to override the default relative definitions file, which is default.rel under the MPC config directory.

    -static

    Specifies that static project files will be generated from the MPC projects. The default is to generate dynamic project files.

    -template

    This option allows a user to specify an alternate template. Each project type has its own template and this option allows a user to override the default template.

    -ti

    Each project type has a set of template input files. With this option the default template input file can be overridden for a particular project type. For more information see the -ti Option.

    -type

    This option specifies the type of project or workspace to be generated. It can be specified multiple times to generate different project types for a single set of input files.

    -use_env

    This option instructs MPC to replace all $() instances with the corresponding environment variable value instead of using values provided by the -relative option.

    -value_project

    Use this option to override an mpc project assignment from the command line. This can be used to introduce new name value pairs to a project. However, it must be a valid project assignment. For more information see the -value_project Option.

    -value_template

    This option can be used to override existing template input variable values from the command line. It can not be used to introduce new template input name value pairs. For more information see the -value_template Option.

    -workers

    Specifies number of child processes to use to generate projects. For more information see the -workers Option.

    -workers_dir

    The directory for storing temporary output files from the child processes. The default is '/tmp/mpc' on Unix systems and %TEMP% on Windows. If neither -workers_dir nor -workers_port is used, -workers_dir is assumed. For more information see the -workers_dir Option.

    -workers_port

    The port number for the parent listener. If neither -workers_dir nor -workers_port is used, -workers_dir is assumed. For more information see the -workers_port Option.

    -version

    The MPC version is printed and no files are processed.

    Additional Option Descriptions

    Some of the options in Command Line Options require an expanded explanation. You will find more information on the -relative, -ti, -value_project, -value_template, -workers, -workers_dir and -workers_port options below.

    The -relative Option.

    Some project types do not (completely) support the idea of accessing environment variables through the use of $(), and therefore MPC must ensure that generated projects are usable in these cases. In order to avoid the existence of $() variables within the generated project files, relative paths are put in place of those (where possible).

    The -relative option takes a single parameter of a name value pair, for example:

    mwc.pl -relative PROJ_TOP=/usr/projects/top

    In above example, if the text "$(PROJ_TOP) " is found as a value for any mpb, mpc, mpd, or mpt variable then it is replaced by a path that is relative to /usr/projects/top. For example, if an mpc file located under /usr/projects/top/dir contained the following:

    project {

      includes += $(PROJ_TOP)

    }

    The generated project file would contain text similar to:

    CPPFLAGS += -I..

    The $(PROJ_TOP) string was replaced with a directory value that is relative to the directory in which the mpc file is located.

    The -ti Option.

    The -ti option allows you to identify different template input files based on the type of target being built. Template input files correspond to four different categories: dll, lib, dll_exe, and lib_exe. Not all project types distinguish between the different categories, but the templates for various project types will be combined with different template input files, depending on the build target type, to generate different output.

    To override the default template input file names, a -ti option is provided. The -ti option takes a single parameter of the form type:file. The type is one of the four categories stated above and the file is the base name of an mpt file located somewhere in the include search paths.

    The following example shows a usage of the -ti option. It says that when generating a static project (lib), use the vc7lib template input file and when generating a dynamic project (dll), use the vc7dll template input file:

    mpc.pl -type vc71 -ti lib:vc7dsplib -ti dll:vc7dspdll

    These happen to be the default values for the vc71 type, but it illustrates that a different template input can be specified for each category.

    The -value_project Option.

    The -value_project option can be useful when the need arises to modify the value of an MPC variable across one or more mpc files. For example, if you wanted to generate all of your projects with an additional include search path you would run the following command:

    mwc.pl -value_project includes+=/include/path

    In the above example, an additional include search path of /include/path would be placed in all generated projects.

    The -value_template Option.

    This option modifies existing or adds new template input name/value pairs. For example, if you wanted to generate dynamic vc71 projects with only Release targets, you would run the following command:

    mwc.pl -type vc71 -value_template configurations=Release

    To find out what template input variables are defined, see the individual mpd file of interest ($ACE_ROOT/bin/MakeProjectCreator/templates/*.mpd and $MPC_ROOT/templates/*.mpd ) and search for names used within <% and %> or use the document_template.pl script described in the Template Variable Documentation section. Names that are not listed as project keywords (see Assignment Keywords) are template variables.

    The -workers Option.

    This option specifies the number of child process to use to generate projects. Using multiple workers can decrease project generation time significantly on multiprocessor systems. For example, if you wanted to distribute projects among four worker processes, you would run the following command:

    mwc.pl -type gnuace -workers 4

    In multi-process MPC, each child has to pass intermediate project info back to the parent. This is done using temporary files or using a socket. The temp file implementation, the -workers_dir option, forks a new child for each project and ensures there are never more children running than requested. The socket listener implementation, the -workers_port option, pre-forks N children and distributes jobs to them.

    The -workers_dir Option.

    This option specifies the directory for storing temporary output files from the child processes. The default is '/tmp/mpc' on Unix-like systems and %TEMP% on Windows. If neither -workers_dir nor -workers_port is used, -workers_dir is assumed. For example, if you wanted to use 4 workers and '/tmp/mydir' for temporary filess, you would run the following command:

    mwc.pl -type gnuace -workers 4 -workers_dir /tmp/mydir

    The -workers_port Option.

    This option specifies the port number where the parent listens for project information from the children. If you wanted to receive information from 2 workers on port 9876, you would run the following command:

    mwc.pl -type gnuace -workers 2 -workers_port 9876

    Configuration Files

    Codebase Configuration File (base.cfg)

    This configuration file can be used to specify alternate locations for the MPC Configuration File (discussed below). If a base.cfg is found underneath the config directory in the MPC root directory, it will be read to determine the location of MPC.cfg based on the directory in which MPC was started.

    The base.cfg file allows you to specify which MPC.cfg file to use with the syntax: <execution_path_root> = <mpc_config_path>.  For a base.cfg file containing the following:

    /foo/bar_root = /foo/bar_root/MPC/config

    Meaning that when $MPC_ROOT/mwc.pl is run in a directory below /foo/bar_root, it will search for MPC.cfg in the directory /foo/bar_root/MPC/config.

    For example, if $MPC_ROOT/mwc.pl is run under /foo/bar_root/src , MPC would attempt to open and read /foo/bar_root/MPC/config/MPC.cfg as the MPC Configuration File. If the base configuration file is not present, MPC will try to use $MPC_ROOT/config/MPC.cfg as the MPC Configuration File.

    You may reference environment variables, accessed via the dollar sign (e.g., $NAME), on either side of the equals sign. In either this file or the MPC Configuration File (see below), an alternate form of environment variable reference may be used for variables which are not expected to be defined in all scenarios. These variables use the syntax $?NAME instead of $NAME. With this syntax, if the environment variable NAME is not defined, no error or warning is printed by MPC, and the substring starting with $?NAME until the next whitespace is expanded to the empty string.

    MPC Configuration File

    In an effort to move away from the use of environment variables, a configuration file has been introduced. The configuration file (MPC.cfg) can contain settings to provide command line options, control logging and direct MPC to dynamic project types.

    The following keywords are allowed in the configuration file.

    Keyword

    Description

    command_line

    Provide additional command line options to MPC. The value of this setting will be prepended to the options passed to mwc.pl or mpc.pl.

    default_type

    Provide a single project type (as specified by the -type option) as the default project type.

    dynamic_types

    This comma separated list points to directories in which MPC will search for Perl modules to implement additional MPC project types, base projects or template files. This setting can be used to augment or replace functionality in MPC. For each suitable directory found, it will add a modules include path for Perl to find modules, add a config include path to locate base projects and a template include path to find MPC templates.

    includes

    Similar to the -include command line option, it adds the list of comma separated paths to the MPC include search paths.

    logging

    If this setting contains info=1, informational messages will be printed. If it contains warn=1, warning messages will be printed. If it contains diag=1, diagnostic messages will be printed. If it contains debug=1, debug message will be printed. And lastly, if it contains detail=1, detail messages will be printed. If it contains none of these, MPC will not print out any information or warnings when processing projects or workspaces. Errors are always printed if any are encountered. The default value is warn=1, diag=1, detail=1 .

    main_functions

    Provide additional main functions to be recognized in conjunction with automatic executable project recognition. The value assigned should be of the form <language>:<func name>[, <language>:<func name>]* . A function can be specified for all languages by only providing the function name.

    verbose_ordering

    If this is set, mwc.pl will warn the user about references to projects in the after keyword that have not been processed.

    Environment Variables

    MPC recognizes a few environment variables that alter the way it performs certain tasks. The sections below describe each one and the effect it has on MPC.

    The MPC_DEPENDENCY_COMBINED_STATIC_LIBRARY environment variable only affects the way workspace dependencies are created for static projects with the em3, vc6, vc7, vc71, vc8, vc9, vc10, vc11, vc12, vc14 and vs2017 project types. If this environment variable is set, MPC will generate inter-project dependencies for libraries within a single workspace. This is usually not desired since adding these dependencies in a static workspace has the side effect of including dependent libraries into the dependent library.

    The MPC_GHS_UNIX environment variable is only meaningful when generating the ghs project files. By default, the ghs type assumes that it is for Windows. Set this environment variable prior to running MPC if this is not the case.

    The MPC_USE_WIN_COMMANDS environment variable causes the Windows related pseudo template variables to be used regardless of the type of project being generated.

    Writing MPC and MWC Files


    You may want to familiarize yourself with the various input files for MPC. The input file types and the syntax of each are discussed in the sections below.

    Input Files

    There are four different input files associated with MPC. For most users of MPC, the main files of concern are mpc and mwc files.

    Project Files (mpc)

    Project files, those with the mpc extension, contain such things as include paths, library paths, source files and inter-project dependencies. An mpc file can contain one or more “projects” each of which needs to be uniquely named to avoid project generation errors. Projects represent build targets such as libraries and executables.

    Workspace Files (mwc)

    Workspaces are defined by providing a list of mpc files, directories or other mwc files in a single mwc file. For each mpc file, the Workspace Creator calls upon the Project Creator to generate the project. After all of the projects are successfully generated, the tool-specific workspace is generated containing the projects and any defined inter-project dependency information (if supported by the build tool). An mwc file can contain one or more “workspaces,” each of which needs to be uniquely named. If no workspace files are provided to the workspace creator, the current directory is traversed and any mpc files located will be part of the workspace that is generated.

    Base Project Files (mpb)

    One of the many unique and useful features of MPC is that the project definition files can use inheritance. Project inheritance allows a user to set up a base project (mpb file) that can contain information that is applicable to all derived projects. Common project attributes, such as include paths, library paths, and inter-project dependencies, could be described in this base project and any project that inherits from it would contain this information as well.

    Base Workspace Files (mwb)

    As with projects, workspaces can also inherit from other workspaces. A base workspace can provide workspace information that may be common to other workspaces.

    General Input File Syntax

    In this section we discuss the syntax of the various files. We also describe some of the default values that go along with these files.

    mwc and mwb files

    Workspaces can contain individual mpc files or directories. There can be one or more workspaces defined within a single mwc file.

    workspace(optional name): optional_base_workspace {

      file.mpc

      directory

      other.mwc

     

      exclude(vc6, vc7, vc71, vc8, vc9, vc10, vc11, vc12, vc14, vs2017, nmake) {

        this_directory

      }

     

      exclude(prop:microsoft) {

        non_microsoft

      }

     

      specific(rpmspec) {

        rpm_version = 1.0

      }

    }

    A workspace can be given a name. This is the value given in the parentheses after the keyword workspace. If the workspace is not given a name, the workspace name is taken from the name of the mwc file without the extension.

    Workspaces can also inherit from other workspaces. In the above example, optional_base_workspace would be the base name of an mwb file with no extension that contains workspace information. This information would then be included in each workspace that inherits from it.

    The lines between the curly braces contain assignments, mpc files, directories, other workspace files or exclusion sections. For each listed item,

    • an mpc file will be included in the workspace,
    • a directory recursively traversed and any mpc files found will be included,
    • a workspace file will be aggregated into the main workspace.

    A workspace can have assignments interspersed within the directories and mpc files. These assignments modify the way projects are generated.

    The cmdline setting can be used to provide command line options that would normally be passed to mwc.pl (see Command Line Options). However, the -exclude, -for_eclipse, -gendot, -gfeature_file, -into, -make_coexistence, -recurse, -reldefs, and -type options as well as input files are ignored. Environment variables may be accessed through $NAME, where NAME is the environment variable name. The cmdline assignment may be useful for workspaces that require specific mwc.pl options in order to process correctly.

    The only other setting supported by mwc.pl is implicit. If implicit is set to 1 then default project files are generated in each directory where no mpc file exists. The implicit keyword can also be set to the name of a base project. In this case, the implicitly generated project will inherit from the base project specified in the assignment. Either way, if the directory does not contain files that can be used within a project, no project is created. Setting implicit can be useful when you want to define specific workspaces, but the MPC defaults are sufficient for the directories involved within the workspace.

    Workspaces support a specific clause conceptually and syntactically similar to the project specific clause. Any variables assigned within the clause are only available to workspaces, not to projects. Two sorts of assignments are possible: first are assignments to the keywords cmdline and implicit and the second are type-specific variables. Consult the documentation for the type for details on type-specific variables. Keyword assignments impact the entire workspace, not just the specific scope.

    Scoped assignments are assignments that are associated with specific mpc files or directories listed with the scope of the assignment. The following example shows a scoped assignment of cmdline that only applies to one of the mpc files listed in the workspace . In this example, directory/foo.mpc would be processed as if the -static option had been passed on the command line whereas other directories and mpc files would not.

    workspace {

      ...

      static {

        cmdline += -static

        directory/foo.mpc

      }

     

      exclude(gnuace, make) {

        some.mpc

      }

     

      // Associate the name "other" with dir3

      associate(other) {

        dir3

      }

    }

    Exclusion sections are used to prevent directories and mpc files from being processed. These excluded directories and mpc files will be skipped when generating project files and workspaces. The exclude keyword accepts project types as well as properties (see Properties) within the parentheses (as above), which will cause the workspace creator to only exclude the listing for particular types. If no types are provided, exclusion will take place for all project types.

    The associate scope associates a name with one or more directories. This does not add directories to a workspace, it only makes an association. This may or may not have an effect on the generated workspace; it depends solely upon whether the project type supports associations. Currently automake is the only project type that supports associations. Each directory listed under an association is grouped together and built conditionally based on the association name.

    Comments are similar to the C++ style comments. Any text after a double slash (// ) is considered a comment.

    mpc and mpb files
    Project Declarations

    Project declarations are similar to workspace declarations, but are a bit more complex. An mpc file can contain one or more “projects” and each project can inherit from base projects.

     

    project(optional name): base_project, another_base_project {

      exename = client

      includes += directory_name other_directory

      libpaths += /usr/X11R6/lib

     

      Header_Files {

        file1.h

        file2.h

        fileN.h

      }

     

      Source_Files {

        file1.cpp

        file2.cpp

        fileN.cpp

      }

    }

    If the optional project name is not given, then the project name is taken from the name of the mpc file without the extension. Therefore, if your mpc file is going to contain multiple projects, it is important to provide project names to prevent each generated project from overwriting the other. MPC will issue an error and stop if duplicate project names are detected.

    Base Projects

    Base projects can be of the extension mpb and mpc. If a file with the name of the base project with an mpb or mpc extension cannot be found within the mpc include search path, a fatal error is issued and processing halts.

    Assignment Keywords

    This table shows the keywords that can be used in an assignment (i.e., =, += or -= ) within an mpc file. The most commonly used keywords are shown in bold face.

    Assignment Keywords

    Keyword

    Description

    after

    Specifies that this project must be built after 1 or more project names listed.

    An extended syntax is available in order to associate name-value pairs with a dependency: <project name[:name=value]>
    These name-value pairs may be used in the creation of the dependencies of the project.

    avoids

    Specifies which features should be disabled in order to generate the project file. Under the GNUACE type, it also specifies which make macros should not be set to build the target.

    custom_only

    This setting instructs MPC to create projects that only contain custom generation targets. Any files included in the projects will be provided by custom component lists defined through the use of Define_Custom.

    dependent_upon

    This keyword can only be used as a header component scoped setting (ie. inside the scope of Header_Files). It determines which file the header file is dependent upon for vc8, and vc9 only.

    dllout

    If defined, specifies where the dynamic libraries will be placed. This overrides libout in the dynamic case.

    dynamicflags

    Specifies preprocessor flags passed to the compiler when building a dynamic library.

    exename

    Determines that the project will be an executable and the name of the executable target.

    exeout

    Specifies where executables will be placed.

    includes

    Specifies one or more directories to supply to the compiler for use as include search paths.

    libout

    Specifies where the dynamic and static libraries will be placed.

    libpaths

    Specifies one or more directories to supply to the compiler for use as library search paths.

    libs

    Specifies one or more libraries to link into the target. Library modifiers may be added when being processed in the template file. For example, library modifiers are added when using the vc6 project type.

    lit_libs

    This is the same as libs except that a library modifier will not be added.

    macros

    Values supplied here will be passed directly to the compiler as command line defined macros.

    managed

    Specifies that the source files should be compiled as managed C++. This is only supported by the nmake, vc7, vc71, vc8, vc9, vc10, vc11, vc12, vc14, and vs2017 project types.

    no_pch

    It specifies that precompiled headers should not be used for the source files listed within the scope of it’s setting. This keyword can only be used as a source component scoped setting (i.e., inside the scope of Source_Files).

    pch_header

    The name of the precompiled header file. See the discussion below this table for more information.

    pch_source

    The name of the precompiled source file. See the discussion below this table for more information.

    postbuild

    If this is defined in the project, the value will be interpreted as commands to run after the project has been successfully built. The <% %> construct (see Template Files) can be used within this value to access template variables and functions of the template parser. See Common Pseudo Variables for a list of pseudo variables that are also available.

    postclean

    If this is defined in the project, the value will be interpreted as commands to run after the project has been cleaned. It should be noted that this setting is not supported by all project types. As with postbuild, the <% %> construct (see Template Files) can be used within this value to access template variables and functions of the template parser. See Common Pseudo Variables for a list of pseudo variables that are also available.

    prebuild

    If this is defined in the project, the value will be interpreted as commands to run before the project has been built. As with postbuild, the <% %> construct (see Template Files) can be used within this value to access template variables and functions of the template parser. See Common Pseudo Variables for a list of pseudo variables that are also available.

    pure_libs

    This is similar to lit_libs except that no prefix or extension is added to the names specified.

    recurse

    If set to 1, MPC will recurse into directories listed under component listings (such as Source_Files, Header_Files, etc.) and add any component corresponding files to the list. This keyword can be used as a global project setting or a component scoped setting.

    recursive_includes

    This is similar to includes in that it provides include paths to the compiler. However, each path supplied will be recursively searched for sub-directories which will also be provided as include paths to the compiler.

    recursive_libpaths

    This is similar to libpaths in that it provides library search paths to the linker. However, each path supplied will be recursively searched for sub-directories which will also be provided as library search paths to the linker.

    requires

    Specifies which features should be enabled in order to generate the project file. Under the GNUACE type, it also specifies which make macros should be set to build the target.

    sharedname

    Determines that the project will be a library and the name of the dynamic library target. See the discussion below this table for more information.

    staticflags

    Specifies preprocessor flags passed to the compiler when building a static library.

    staticname

    Determines that the project will be a library and the name of the static library target.

    tagchecks

    For GNUACE Make only, specifies one or more names to search for in the macros specified by tagname.

    tagname

    Specifies the GNUACE Make macro to check before building the target.

    version

    Specifies the version number for the library or executable.

    webapp

    Determines whether the project is a Web Application. A web application project will have no project file written but the information will be included in the workspace if web applications are supported by the project type.

    Assignments can also use the += and -= operators to add and subtract values from keyword values.

    Assignments can be bracketed by curly braces so they can span multiple lines. The opening curly brace must be the last thing on the same line as the operator and the closing brace must be on its own line (but can have leading white space). Optionally, \n, \s, or \ns can be included after the operator. These indicate that new lines should be retained (\n) and leading white space should be retained (\s).

    specific(rpmspec) {

     rpm_description = \ns {

    This description

    spans multiple lines.

     }

    }

    If a sharedname is specified in the mpc file and staticname is not used, then staticname is assumed to be the same as sharedname. This also applies in the opposite direction.

    If neither exename, sharedname nor staticname is specified, MPC will search the source files for a main function. If a main is found, the exename will be set to the name of the file, minus the extension, that contained the main function. Otherwise, sharedname and staticname will be set to the project name.

    If the project name, exename, sharedname or staticname contain an asterisk it instructs MPC to dynamically determine a portion of the name based on certain defaults. If the project name contains an asterisk, then the asterisk will be replaced with the default project name. If exename, sharedname or staticname contains an asterisk, then the asterisk will be replaced with the project name.

    If the pch_header keyword is not used and a file exists, in the directory in which the mpc file is located, that matches *_pch.h it is assumed to be the precompiled header for that directory. If there are multiple pch files in the directory, then the precompiled header that closely matches the project name will be chosen. Similar logic applies for the pch_source keyword.

    Components

    An mpc file can also specify the files to be included in the generated “project” file. These files are specified using the component names shown in the following table. However, most of the time users will want to allow MPC to provide the default values for project files.

    Component Names and Default Values

    Name

    Default Value

    Source_Files

    Defaults to all files in the directory that have the following extensions: cpp, cxx, cc, c, and C.

    Header_Files

    Defaults to all files in the directory that have the following extensions: h, hpp, hxx, and hh.

    Inline_Files

    Defaults to all files in the directory that have the following extensions: i and inl.

    Template_Files

    Defaults to all files in the directory that end in the following: _T.cpp, _T.cxx, _T.cc, _T.c, and _T.C.

    Documentation_Files

    Defaults to all files in the directory that match the following: README, readme, .doc, .html and .txt.

    Resource_Files

    Defaults to all files in the directory that match the project name and have an rc extension.

    If a component is not specified in the mpc file, the default value will be used. To disallow a particular set of files that may exist in the directory, you must declare an empty set of the particular component type.

    Each component name accepts two forms. The first form is a simple list of files within the construct.

    Source_Files {

      file1.cpp

      file2.cpp

    }

    The second form is a complex list of files within named blocks.

    Source_Files(MACRO_NAME) {

      BlockA {

        file1.cpp

        file2.cpp

      }

      BlockB {

        file3.cpp

        file4.cpp

      }

    }

    The second form allows the user to logically group the files to make future maintenance easier. Using this form has the effect of visually grouping files in the generated project file for the em3, gnuace, vc6, vc7, vc71, vc8, vc9, vc10, vc11, vc12, vc14, and vs2017 project types.

    If a file is listed in the Source_Files component list and a corresponding header or inline file exists in the directory, it is added to the corresponding component list unless it is already listed.

    Verbatim Clause

    The verbatim construct can be used to place text into a generated project file verbatim. The verbatim syntax is as follows:

    verbatim(<project type>, <location>) {

      ...

    }

    When MPC is generating a project of type <project type> and encounters a marker in the template file (see Template File Keywords ) that matches the <location> name, it will place the text found inside the construct directly into the generated project. If the text inside the construct requires that white space be preserved, each line must be enclosed in double quotes. The following verbatim example would result in gnuace generated projects having a rule at the bottom of the GNUmakefile where the all: target depends on foo.

    verbatim(gnuace, bottom) {

      all: foo

    }

    Expand Clause

    The expand keyword can be used to provide values for variable names enclosed within $(). In the example below, we see the name VAR_NAME inside the parenthesis. Whenever MPC sees $(VAR_NAME) it will attempt to replace it with values from the expansion list. MPC will first try to replace it with the value of the environment variable named ENV_VAR. If that environment variable has a value, it will be used. Otherwise, it will continue down the list until a suitable value is found. In this example, the text last_resort_value will be used. MPC will leave the $() value as it was in the event that no value is found.

    expand(VAR_NAME) {

      $ENV_VAR

      last_resort_value

    }

    Specific Clause

    The specific keyword can be used to define assignments that are specific to a particular project type or property specified in the parenthesis. This will allow platform or OS-specific values to be placed into a project. For example, on one platform you may want to link in a library named qt-mt, but on another you need to link in qt-mt230nc.

    specific(prop:windows) {

      lit_libs += qt-mt230nc

    } else {

      lit_libs += qt-mt

    }

    If an else clause is provided, it is required to be on the same line as the closing curly brace. You may also negate the project type or property (using ’!’) which will cause the specific to be evaluated for all types except the type specified.

    If a keyword used within a specific section is not recognized as a valid MPC keyword, it is interpreted to be template value modifier. In this situation, this construct works exactly the same way as the -value_template command line option (see Command Line Options).

    The following table shows which properties apply to which project types. The static property (not represented in the table) is set if the -static option is supplied when processing the project files. Additionally, a property that corresponds to the language will be set (e.g., cplusplus, csharp, java, vb).

    Property Table

    Project Type

    borland

    make

    microsoft

    windows

    automake

     

    Yes

     

     

    bcb2007

    Yes

     

     

    Yes

    bcb2009

    Yes

     

     

    Yes

    bds4

    Yes

     

     

    Yes

    bmake

    Yes

    Yes

     

    Yes

    cc

     

     

     

    Yes

    em3

     

     

    Yes

    Yes

    ghs

     

     

     

    Depends

    make

     

    Yes

     

     

    nmake

     

    Yes

    Yes

    Yes

    vc6

     

     

    Yes

    Yes

    vc7

     

     

    Yes

    Yes

    vc71

     

     

    Yes

    Yes

    vc8

     

     

    Yes

    Yes

    vc9

     

     

    Yes

    Yes

    vc10

     

     

    Yes

    Yes

    vc11

     

     

    Yes

    Yes

    vc12

     

     

    Yes

    Yes

    wix

     

     

     

    Yes

    The ghs project type can be used on both Windows and UNIX. The windows property will be active if the MPC_GHS_UNIX environment variable is not set during project generation.

    Conditional Clause

    This scope allows addition of source files conditionally based on a particular project type or property (see the property table ). The syntax is as follows:

     

    conditional(<project type|property> [, <project type|property> ...]) {

      source1.cpp

      ...

    }

    conditional(<project type|property> [, <project type|property> ...]) {

      source1.cpp

      ...

    } else {

      source2.cpp

      ...

    }

    If the else is provided, it is required to be on the same line as the closing curly brace. You may also negate the project type (using ’!’) which will cause the conditional to be evaluated for all types except the type specified.

    Custom Types and Build Rules

    MPC allows you to define your own custom file types to support a variety of custom build rules. Below is an example of a custom definition.

    project {

      Define_Custom(MOC) {

        automatic = 0

        command = $(QTDIR)/bin/moc

        output_option = -o

        inputext = .h

        pre_extension = _moc

        source_outputext = .cpp

        keyword mocflags = commandflags

      }

     

      // Custom Component

      MOC_Files {

        QtReactor.h

      }

     

      Source_Files {

        QtReactor_moc.cpp

      }

    }

     

    The above example defines a custom file type, “MOC ”, that describes basic information about how to process the input files and what output files are created. Once the custom file type is defined, MOC_Files can be used to specify the input files for this new file type.

    Define_Custom definitions may use single inheritance. This is useful for creating aliased names:

    Define_Custom(QtMOC) : MOC {

    }

    The following table contains the keywords that can be used within the scope of Define_Custom.

    Define_Custom Keywords

    Keyword

    Description

    automatic_in

    If set to 1, then attempt to automatically determine which files belong to the set of input files for the custom type. If set to 0, then no files are automatically added to the input files.

    automatic_out

    If set to 1, then attempt to automatically determine which generated files belong to the set of components (Source_Files, Inline_Files , Header_Files, Template_Files, Resource_Files and Documentation_Files) based on type files that the command generates. If omitted, then automatic_out is assumed to be 1.

    command

    The name of the command that should be used to process the input files for the custom type.

    commandflags

    Any options that should be passed to the command.

    dependent

    If this is given a value, then a dependency upon that value will be given to all of the generated files. The default for this is unset and no dependency will be generated.

    dependent_libs

    If this is given a value, then a dependency upon that library value will be given to all of the generated files. The format for this entry should be the basename for the library (no library prefix, postfix, or extension) preceded by any relative or absolute path to the library. The typical use for this would be so that a project is rebuilt when a library needs to be rebuilt for its dependent executable. The default for this is unset and no dependency will be generated.

    inputext

    This is a comma separated list of input file extensions that belong to the command.

    keyword <name>

    This is a special assignment that allows the user to map <name> into the project level namespace. The value (if any) that is assigned to this construct must be one of the keywords that can be used within a Define_Custom clause. The result of this assignment is the ability modify the value of keywords that are normally only accessible within the scope of a custom component (e.g. command, commandflags, etc.).

    libpath

    If the command requires a library that is not in the normal library search path, this keyword can be used to ensure that the command is able to find the library that it needs to run.

    output_option

    If the command takes an option to specify a single file output name, then set it here. Otherwise, this should be omitted.

    output_follows_input

    This setting defaults to 1 and indicates that output files from the custom command will end up in the same directory as the input files. If this is set to 0, it is assumed that the output files will go into the same directory as the .mpc file.

    pch_postrule

    If this is set to 1, then a rule will be added to the custom rule that will modify the source output files to include the precompiled header file.

    postcommand

    This allows users to create arbitrary commands that will be run after the main command is run to process the custom input files.

    pre_extension

    If the command produces multiple files of the same extension, this comma separated list can be used to specify them. For example, tao_idl creates two types of files per extension (C.h, S.h, C.cpp, S.cpp, etc.) This applies to all extension types.

    source_pre_extension

    This is the same as pre_extension except that it only applies to source files.

    inline_pre_extension

    This is the same as pre_extension except that it only applies to inline files.

    header_pre_extension

    This is the same as pre_extension except that it only applies to header files.

    template_pre_extension

    This is the same as pre_extension except that it only applies to template files.

    resource_pre_extension

    This is the same as pre_extension except that it only applies to resource files.

    documentation_pre_extension

    This is the same as pre_extension except that it only applies to documentation files.

    generic_pre_extension

    This is the same as pre_extension except that it only applies to generic files.

    pre_filename

    The syntax for this is the same as pre_extension, but the values specified are prepended to the file name instead of the extension. This applies to all extension types.

    source_pre_filename

    This is the same as pre_filename except that it only applies to source files.

    inline_pre_filename

    This is the same as pre_filename except that it only applies to inline files.

    header_pre_filename

    This is the same as pre_filename except that it only applies to header files.

    template_pre_filename

    This is the same as pre_filename except that it only applies to template files.

    resource_pre_filename

    This is the same as pre_filename except that it only applies to resource files.

    documentation_pre_filename

    This is the same as pre_filename except that it only applies to documentation files.

    generic_pre_filename

    This is the same as pre_filename except that it only applies to generic files.

    pre_dirname

    The syntax for this is the same as pre_filename, but the value specified is prepended to the directory portion of the file name instead of the file name itself. If a separate directory is desired, the pre_dirname setting should end in a slash.

    source_pre_dirname

    This is the same as pre_dirname except that it only applies to source files.

    inline_pre_dirname

    This is the same as pre_dirname except that it only applies to inline files.

    header_pre_dirname

    This is the same as pre_dirname except that it only applies to header files.

    template_pre_dirname

    This is the same as pre_dirname except that it only applies to template files.

    resource_pre_dirname

    This is the same as pre_dirname except that it only applies to resource files.

    documentation_pre_dirname

    This is the same as pre_dirname except that it only applies to documentation files.

    generic_pre_dirname

    This is the same as pre_dirname except that it only applies to generic files.

    source_outputext

    This is a comma separated list of possible source file output extensions. If the command does not produce source files, then this can be omitted.

    inline_outputext

    This is a comma separated list of possible inline file output extensions. If the command does not produce inline files, then this can be omitted.

    header_outputext

    This is a comma separated list of possible header file output extensions. If the command does not produce header files, then this can be omitted.

    template_outputext

    This is a comma separated list of possible template file output extensions. If the command does not produce template files, then this can be omitted.

    resource_outputext

    This is a comma separated list of possible resource file output extensions. If the command does not produce resource files, then this can be omitted.

    documentation_outputext

    This is a comma separated list of possible documentation file output extensions. If the command does not produce documentation files, then this can be omitted.

    generic_outputext

    If the command does not generate any of the other output types listed above, then the extensions should be listed under this.

    There is a special interaction between custom components and the source, header and inline components. If a custom definition is set to be “automatic” and custom component files are present but not specified, the default custom generated names are added to the source, header and inline component lists unless those names are already listed (or partially listed) in those component lists. See Custom Types and Build Rules for more information about defining your own custom type.

    Particular output extensions for custom build types are not required. However, at least one output extension type is required for MPC to generate a target. Your command does not necessarily have to generate output, but an extension type is required if you want the input file to be processed during the project compilation.

    If the custom output can not be represented with the above output extension keywords (*_outputext) and you have knowledge of the output files a priori , you can represent them with the >> construct.

    Below is an example that demonstrates the use of >>. The command takes an input file name of foo.prp and produces two files that have completely unrelated filenames, hello.h and hello.cpp.

    project {

      Define_Custom(Quogen) {

      automatic = 0

      command = perl quogen.pl

      commandflags = --debuglevel=1 --language=c++ \

                     --kernel_language=c++

      inputext = .prp

      keyword quogenflags = commandflags

      }

     

      Quogen_Files {

        foo.prp >> hello.h hello.cpp

      }

     

      Source_Files {

        hello.cpp

      }

    }

     

    You can use the << construct to represent dependencies for specific custom input file. For instance, in the above example, assume that foo.prp depends upon foo.in, we would represent this by adding << foo.in as shown below.

    Quogen_Files {

      foo.prp >> hello.h hello.cpp << foo.in

    }

     

    An additional construct can be used within the scope of a Define_Custom. This construct is called optional, and can be used to represent optional custom command output that is dependent upon particular command line parameters passed to the custom command.

    project {

      Define_Custom(TEST) {

        optional(keyword) {

          flag_keyword(option) += value [, value]

        }

      }

    }

    In the above fragment, keyword can be any of the pre_extension, pre_filename keywords or any of the keywords that end in _outputext. The flag_keyword can be any of the custom definition keywords, however only commandflags has any functional value. The flag_keyword value is searched for the option value contained inside the parenthesis. If it is found the value or values after the += are added to the list specified by keyword. This can also be negated by prefixing the option with an exclamation point (!).

    The example below shows how the optional construct is used by the custom definition for the tao_idl command (see ACE_wrappers/TAO/MPC/config/taoidldefaults.mpb ). The -GA option causes tao_idl to generate an additional source file (based on the idl file name) with an A.cpp extension. The -Sc option causes tao_idl to suppress the generation of S_T related files.

    Define_Custom(IDL) {

      ...

      inputext = .idl

      source_pre_extension = C, S

      header_pre_extension = C, S

      inline_pre_extension = C, S

      source_outputext = .cpp, .cxx, .cc, .C

      header_outputext = .h, .hpp, .hxx, .hh

      inline_outputext = .inl, .i

      keyword idlflags = commandflags

     

      optional(source_pre_extension) {

        commandflags(-GA) += A

      }

      optional(template_outputext) {

        commandflags(!-Sc) += S_T.cpp, S_T.cxx, S_T.cc, S_T.C

      }

      optional(header_pre_extension) {

        commandflags(!-Sc) += S_T

      }

      optional(inline_pre_extension) {

        commandflags(!-Sc) += S_T

      }

    }

     

    For custom file types, there are a few keywords that can be used within the custom file type component lists: command, commandflags, dependent, dependent_libs, gendir, postcommand, and recurse.

    The recurse keyword works as described in Assignment Keywords.

    The command, commandflags, dependent, dependent_libs and postcommand keywords can be used to augment or override the value defined in the Define_Custom section.

    The gendir keyword can be used (only if output_option is set in Define_Custom ) to specify the directory in which the generated output will go. Here is an example:

    MOC_Files {

      commandflags += -nw

      gendir = moc_generated

      QtReactor.h

    }

     

    Source_Files {

      moc_generated/QtReactor_moc.cpp

    }

    In the above example, the -nw option is added to commandflags and the generated file (QtReactor_moc.cpp ) is placed in the moc_generated directory. If the MOC custom definition did not have an output_option setting, then options would need to be added to commandflags or a postcommand would need to be defined to ensure that the output actually went into the moc_generated directory.

    Modify_Custom

    An existing Define_Custom section can be modified by using Modify_Custom. The syntax of the body is identical to that of a Define_Custom. The example below shows a modification to the TAO IDL defaults found in taoidldefaults.mpb of the TAO+ACE distribution. Everything provided by the Define_Custom(IDL) remains unchanged except for the values set within the Modify_Custom(IDL).

    project: taoidldefaults {

      specific(!automake) {

        tao_idlflags += -Sc -hs _s.h -si _s.i -ss _s.cpp -hc .h -ci .i -cs .cpp

      }

     

      // This allows "make idl_stubs" to work

      verbatim(gnuace, macros) {

        IDL_CLIENT_HDR_EXT ?= .h

        IDL_CLIENT_INL_EXT ?= .i

        IDL_CLIENT_SRC_EXT ?= .cpp

        IDL_SERVER_HDR_EXT ?= _s.h

        IDL_SERVER_INL_EXT ?= _s.i

        IDL_SERVER_SRC_EXT ?= _s.cpp

      }

     

      Modify_Custom(IDL) {

        source_pre_extension = , _s

        header_pre_extension = , _s

        inline_pre_extension = , _s

        inline_outputext     = .i

      }

    }

    Custom Post Command

    When defining a postcommand as part of a Define_Custom, a few pseudo template variables are available to provide some flexibility. The following table shows the pseudo template variables that can be accessed only from the postcommand. Please note that <% and %> are part of the syntax.

    Post Command Pseudo Variables

    Variable

    Description

    <%input%>

    The input file to the command.

    <%input_basename%>

    The basename of the input file to the command.

    <%input_dirname%>

    The directory name of the input file to the command.

    <%input_noext%>

    The input file to the command with the extension stripped off.

    <%input_ext%>

    This gives the file extension of the input file (if there is one).

    <%output%>

    The output file created by the original command.

    <%output_basename%>

    The basename of the output file to the command.

    <%output_dirname%>

    The directory name of the output file to the command.

    <%output_noext%>

    The output file created by the original command with the extension stripped off.

    <%output_ext%>

    This gives the file extension of the output file (if there is one).

    The output file can be referenced as a generic output file, or it can be referenced as a component file using one of the following variables. If it does not match the specific type the value will be empty.

    <%documentation_file%>

    The output file if it is a documentation file.

    <%header_file%>

    The output file if it has a header file extension.

    <%inline_file%>

    The output file if it has an inline file extension.

    <%resource_file%> (<%resx_file%> for C# and VB)

    The output file if it has a resource file extension.

    <%source_file%>

    The output file if it has a source file extension.

    <%template_file%>

    The output file if it is a template file.

    <%documentation_file_noext%>

    The output file without an extension if it is a documentation file.

    <%header_file_noext%>

    The output file without an extension if it has a header file extension.

    <%inline_file_noext%>

    The output file without an extension if it has an inline file extension.

    <%resource_file_noext%> (<%resx_file_noext%> for C# and VB)

    The output file without an extension if it has a resource file extension.

    <%source_file_noext%>

    The output file without an extension if it has a source file extension.

    <%template_file_noext%>

    The output file without an extension if it is a template file.

    The extensions of the input and output files are also available as pseudo variables.

    <%input_ext%>

    The extension of the input file (if it has one).

    <%output_ext%>

    The extension of the output file (if it has one).

    The following table describes the pseudo template variables that can be used in the command, commandflags, dependent, output_option and postcommand settings.

    Common Pseudo Variables

    Variable

    Description

    <%and%>

    A platform and project non-specific representation of a command conditional and.

    <%cat%>

    A platform non-specific command to print a file to the terminal.

    <%cmdsep%>

    A project and platform non-specific command separator which always runs right-hand side of the command. For example, in the following psuedo commmand string, both the <%cat%> and <%mv%> commands would be run. <%cat%> <%source_file%> <%gt%> foo <%cmdsep%> <%mv%> foo other_dir

    <%cmp%>

    A platform non-specific command to compare two files.

    <%cp%>

    A platform non-specific command to copy a file.

    <%crlf%>

    A platform non-specific line ending.

    <%equote%>

    A project non-specific escaped double quote.

    <%gendir%>

    The output directory specified by the gendir setting. This variable is not available to postbuild, postclean, orprebuild.

    <%gt%>

    A platform and project non-specific representation of a greater than sign.

    <%lt%>

    A platform and project non-specific representation of a less than sign.

    <%mkdir%>

    A platform non-specific command to make a directory.

    <%mv%>

    A platform non-specific command to move a file.

    <%nul%>

    A platform non-specific null device.

    <%pathsep%>

    A platform non-specific path separator (; or :).

    <%or%>

    A platform and project non-specific representation of a command conditional or.

    <%os%>

    Returns either win32 or unix.

    <%prj_type%>

    The project type as supplied by the -type command line option.

    <%quote%>

    A project non-specific representation of a double quote.

    <%rm%>

    A platform non-specific command to delete a file.

    <%rmdir%>

    A platform non-specific recursive directory delete command.

    <%slash%>

    A platform non-specific directory separator.

    <%temporary%>

    A temporary file name. The generated temporary file name contains no directory portion and is the same for each use within the same variable setting.

    The following variables will be set to the known extension for Windows based project types and empty on non-Windows based project types.

    <%bat%>

    The extension for batch files.

    <%cmd%>

    The extension for command files.

    <%exe%>

    The extension for executable files.

    The Feature File

    The term feature, as used by MPC, describes different concepts or external software that a project may require in order to build properly. The feature file determines which features are enabled or disabled which has a direct effect on whether or not MPC generates a project.

    It supports the standard comment (// ) and assignment of numbers to feature names. These feature names will correspond to values given to the requires and avoids keywords in mpc files.

    If a feature is not listed in the feature file or is listed with a boolean value of true (1), that feature is enabled. If a feature is listed and has a boolean value of false (0), that feature is disabled.

    If a feature name is listed in the requires value for a particular project and that feature is enabled, that project will be generated. If the feature is not enabled, the project will not be generated.

    The opposite holds true for the avoids keyword. If a feature name is listed in the avoids value for a project and the feature is disabled, that project will be generated. If the feature is enabled, the project will not be generated.

    The global feature file for MPC contains the following values.

    boost = 0

    bzip2 = 0

    java = 0

    mfc = 0

    python = 0

    qt = 0

    rpc = 0

    swig_java = 0

    swig_perl = 0

    swig_php = 0

    swig_python = 0

    swig_ruby = 0

    swig_tcl = 0

    uses_wchar = 0

    xalan = 0

    xerces = 0

    xerces2 = 0

    xerces3 = 0

    ziparchive = 0

    zlib = 0

    zzip = 0

    In the above contents, all of these features are disabled for each project generated. If these values do not suit your needs, then you must do one of the following:

    • Create a project specific feature file in the config directory (ex., make.features for the make project type) to set features for a particular project type.
    • Create a default.features file in the config directory that contains the feature set you need. These will be applied to all project types.
    • Create a feature file anywhere you like with the features you want and use the -feature_file option to specify the location.
    • Use the -features option to dynamically modify the feature settings.

    Generated projects will have a combination of features specified in the global.features file as well as in your feature file. Therefore, if a feature is disabled in the global file and you want to enable it, you must explicitly enable it in your feature file.

    Feature Projects

    A feature project contains information as a project would, but can only be a base project and will only be added to a sub project if the features that it requires are enabled or the features that it avoids are disabled.

    A feature definition requires at least one feature name. A name by itself specifies that the feature must be enabled. A ’!’ in front of the feature name indicates that the feature must be disabled. There may be more than one comma separated feature listed between the parenthesis.

    The following example show how to declare a feature project.

    // ziparchive.mpb

    feature(ziparchive) {

      includes += $(ZIPARCHIVEROOT)

      libpaths += $(ZIPARCHIVEROOT)/lib

      libs     += ziparch

    }

     

    With this example, any project that inherits from the ziparchive base feature project will contain the project information only if the ziparchive feature is enabled.

    Defaults

    MPC has been designed to minimize the amount of maintenance that goes into keeping build tool files up-to-date with the project. If your source code is organized properly, the maintenance of your mpc files should be minimal.

    With the use of inheritance and proper code arrangement, an mpc file for a TAO related project may be as simple as:

    project: taoserver {

    }

    This project definition could be used to generate a project for a TAO server with multiple idl, header and source files.

    The idea of proper source layout is basically summarized as one directory per binary target. If only the files that pertain to a single target are located in the directory with the mpc file, then the MPC defaults will satisfy most project needs.

    Of course, it will not always be possible or desirable to organize your project code in this fashion, so all defaulting behavior can be overridden. The next sections describe the default behaviors of MPC and how to override them.

    Source Files

    New source files are added and others are removed quite often in a developing project. If the Source_Files component is left out of an mpc file, then MPC will assume that any file matching one of the source extensions is to be included in the project. For most project types, the source extensions are: .cpp, .cxx, .cc, .c and .C. Only the following extensions are considered source extensions: .cpp, .cxx and .c for the em3 and vc6 project types as eMbedded Visual C++ and Visual C++ 6.0 do not understand files with the .cc or .C extension.

    Template Files

    MPC assumes that any file matching one of the template extensions is to be included in the project if the Template_Files component is left out of an mpc file. For most project types, the template extensions are: _T.cpp, _T.cxx, _T.cc, _T.c, and _T.C. However, only the _T.cpp and _T.cxx extensions are considered template extensions for the em3 and vc6 project types.

    If the Source_Files component is defaulted, and a file is explicitly listed in the Template_Files section that happens to appear to MPC as a source file (i.e., has a source file extension, but does not have _T directly before it), MPC will automatically exclude it from the Source_Files component.

    Inline Files

    As with source files, the Inline_Files component can be left out of an mpc file to allow it to generate defaults. Files that match the .i and .inl extensions are considered inline files.

    The Inline_Files component has a special interaction with the Source_Files component. If the Source_Files component has files listed and the Inline_Files component is omitted, then each source file is matched to an inline file. If the matching inline file is found or would be generated from a custom command, it is added to the Inline_Files component list.

    Header Files

    As with source files, the Header_Files component can be left out of an mpc file to allow it to generate defaults. Files that match the .h, .hpp, .hxx, and .hh extensions are considered header files.

    The Header_Files component has a special interaction with the Source_Files component. If the Source_Files component has files listed and the Header_Files component is omitted, then each source file is matched to a header file. If the matching header file is found or would be generated from a custom command, then it is added to the Header_Files component list.

    Documentation Files

    The Documentation_Files component, if omitted, will default to all files that end in the following: README, readme, .doc, .html and .txt.

    Resource Files

    The Resource_Files component, if omitted, will default to only the files that end in .rc and are similar to the name of the project. For example, if a directory contains three .rc files and the project name is foo, only the .rc files that contain the word foo will automatically be added to the Resource_Files component list.

    Custom Defined Files

    The Custom Defined Files components have a special interaction with the Source_Files component. If the custom command generates source files and has the automatic_out setting set to 1, they will automatically be added to the Source_Files component list. If any of the files listed in the Source_Files components list match any of the generated source file names, then none of the generated source file names will be automatically added to the Source_Files components list.

    Example MPC File

    The example below uses the directory contents of $TAO_ROOT/orbsvcs/performance-tests/RTEvent/lib to illustrate the simplicity of mpc files:

    Auto_Disconnect.cpp Loopback_Supplier.h RTEC_Initializer.cpp

    Auto_Disconnect.h Low_Priority_Setup.cpp RTEC_Initializer.h

    Auto_Disconnect.inl Low_Priority_Setup.h rtec_perf_export.h

    Auto_Functor.cpp Low_Priority_Setup.inl RTEC_Perf.mpc

    Auto_Functor.h Makefile RTPOA_Setup.cpp

    Auto_Functor.inl ORB_Holder.cpp RTPOA_Setup.h

    Client_Group.cpp ORB_Holder.h RTPOA_Setup.inl

    Client_Group.h ORB_Holder.inl RTServer_Setup.cpp

    Client_Group.inl ORB_Shutdown.cpp RTServer_Setup.h

    Client_Options.cpp ORB_Shutdown.h RTServer_Setup.inl

    Client_Options.h ORB_Shutdown.inl Send_Task.cpp

    Client_Pair.cpp ORB_Task_Activator.cpp Send_Task.h

    Client_Pair.h ORB_Task_Activator.h Send_Task_Stopper.cpp

    Client_Pair.inl ORB_Task_Activator.inl Send_Task_Stopper.h

    Consumer.cpp ORB_Task.cpp Send_Task_Stopper.inl

    Consumer.h ORB_Task.h Servant_var.cpp

    Control.cpp ORB_Task.inl Servant_var.h

    Control.h Peer_Base.cpp Servant_var.inl

    EC_Destroyer.cpp Peer_Base.h Shutdown.cpp

    EC_Destroyer.h PriorityBand_Setup.cpp Shutdown.h

    EC_Destroyer.inl PriorityBand_Setup.h Shutdown.inl

    Federated_Test.idl PriorityBand_Setup.inl Supplier.cpp

    Implicit_Deactivator.cpp RIR_Narrow.cpp Supplier.h

    Implicit_Deactivator.h RIR_Narrow.h SyncScope_Setup.cpp

    Implicit_Deactivator.inl RT_Class.cpp SyncScope_Setup.h

    Loopback_Consumer.cpp RT_Class.h SyncScope_Setup.inl

    Loopback_Consumer.h RT_Class.inl TAO_RTEC_Perf.dsp

    Loopback.cpp RTClient_Setup.cpp TAO_RTEC_Perf.dsw

    Loopback.h RTClient_Setup.h Task_Activator.cpp

    Loopback_Pair.cpp RTClient_Setup.inl Task_Activator.h

    Loopback_Pair.h RTCORBA_Setup.cpp Task_Activator.inl

    Loopback_Pair.inl RTCORBA_Setup.h

    Loopback_Supplier.cpp RTCORBA_Setup.inl

    The following mpc file (RTEC_Perf.mpc ) shows the simple and small number of lines required to generate usable build tool project files.

    project(RTEC_Perf): strategies, rtcorbaevent, minimum_corba {

      sharedname = TAO_RTEC_Perf

      idlflags += -Wb,export_macro=TAO_RTEC_Perf_Export \

                  -Wb,export_include=rtec_perf_export.h

      dllflags += TAO_RTEC_PERF_BUILD_DLL

     

      Template_Files {

        Auto_Disconnect.cpp

        Auto_Functor.cpp

        Low_Priority_Setup.cpp

        RIR_Narrow.cpp

        Servant_var.cpp

        Shutdown.cpp

        Task_Activator.cpp

      }

    }

    A line-by-line explanation of the example mpc file is listed below.

    project(RTEC_Perf): strategies, rtcorbaevent, minimum_corba {

    The first line declares a project named RTEC_Perf that inherits from the base projects listed after the colon.

    sharedname = TAO_RTEC_Perf

    Line two determines that the project is a library and the library name is TAO_RTEC_Perf.

    idlflags += -Wb,export_macro=TAO_RTEC_Perf_Export \

    -Wb,export_include=rtec_perf_export.h

    Lines three and four add to the flags passed to the IDL compiler when processing the idl files.

    dllflags += TAO_RTEC_PERF_BUILD_DLL

    Line five adds TAO_RTEC_PERF_BUILD_DLL to the dllflags, which defines a macro that is used by the rtec_perf_export.h header file.

    Template_Files {

      Auto_Disconnect.cpp

      Auto_Functor.cpp

      Low_Priority_Setup.cpp

      RIR_Narrow.cpp

      Servant_var.cpp

      Shutdown.cpp

      Task_Activator.cpp

    }

    Lines 7 through 15 name the listed cpp files as part of the Template_Files.
    Note: This usage of Template_Files refers to files containing C++ template declaration and definition source code and should not be confused with MPC template files which are used to define the structure of generated project files.

    You may have noticed that there isn’t much to the file above. With the default behaviors that are built into MPC, there does not need to be. We rely on the defaults to determine the values of IDL_Files, Source_Files, Inline_Files , and Header_Files. Since the template files in this example C++ project do not follow the naming convention assumed by the MPC built-in defaults (_T.cpp, _T.cxx, _T.cc, _T.C), we must explicitly list them. We also rely on inheritance to get many of the TAO-related options.

    Adding a New Type


    If MPC does not support a particular build tool, you may want to consider adding a new project type. For instance, support could be added to MPC for Boost Jam, Xcode and many others. To do so will require knowledge of the MPC input files, as well as Object Oriented Perl.

    Input File Syntax

    This section describes the syntax of the files that are used during project generation.

    Template Files (mpd)

    Template files make up the bulk of what MPC puts into each generated project file. They provide the plain text and the layout of the data provided by the mpc files, using various template directives.

    Template directives are declared using a <% %> construct. This construct is used to create if statements, for loops and to access variables. One thing to note is that any text, including white space, that is not enclosed within <% %> is left untouched and is passed directly into the generated project file.

    An if statement can appear on a single line or it can span multiple lines. For example, the following line:

    <%if(exename)%>BIN = <%exename%><%else%>LIB = <%sharedname%><%endif%>

    is equivalent to:

    <%if(exename)%>

    BIN = <%exename%>

    <%else%>

    LIB = <%sharedname%>

    <%endif%>

    A foreach statement can also appear on a single line or can span multiple lines. As described below in the keywords section, the foreach statement evaluates the variable in a space-separated list context.

    There are a couple of ways to write a foreach loop. The first and preferred way is to name the loop variable and then list each variable to be evaluated.

    FILES=<%foreach(fvar, idl_files source_files header_files)%> <%fvar%><%endfor%>

    The second way is to let the foreach statement determine the loop variable. With this style, each value can be accessed via the first variable name passed to the foreach with the trailing ’s ’ removed.

    FILES=<%foreach(idl_files source_files header_files)%> <%idl_file%><%endfor%>

    Note that the <%idl_file%> variable will contain each individual value of the idl_files, source_files and header_files list. If the variable in the foreach does not end in ’s ’, the variable of the same name within the foreach will contain each individual value, e.g.,

    <%foreach(filelist)%> <%filelist%><%endfor%>

    The following table lists keywords that can appear in template files.

    Template File Keywords

    Keyword

    Description

    basename

    Evaluates the variable name and removes the directory portion from that value.

    basenoextension

    This is similar to basename except that the extension is also removed from the variable name value.

    comment

    The value passed to comment is ignored and can be any set of characters, except a new line or a closing parenthesis.

    compares

    This function returns true if the variable value (first parameter) is equal to the string value (second parameter).

    contains

    This function returns true if the variable value (first parameter) contains the regular expression (second parameter).

    deref

    Dereference the variable passed as a parameter, treating its value as another variable name and returning that variable's value.

    dirname

    Evaluates the variable name and removes the basename from that value.

    duplicate_index

    This function returns a number based on the number of times a file with the same name (but different directory) is seen within a project. The function returns false upon the first occurrence of a file.

    else

    Used with the if statement. An else block will be evaluated if the statement does not evaluate to true.

    endfor

    Used with foreach. This ends foreach block.

    endif

    Used with the if statement. This ends an if or if/else block.

    ends_with

    This function returns true if the variable value (first parameter) ends with the regular expression (second parameter).

    eval

    This is similar to eval in perl. The template variable passed to this function will be evaluated within the context of the current template.

    extensions

    Returns a list of extensions based on the component name parameter (e.g., source_files, header_files, etc.)

    flag_overrides

    This is directly related to overriding the project-wide settings in an mpc file. It takes two variable names that are comma separated. The first corresponds to a file name and the second is any variable name.

    foreach

    The given variable names are evaluated in a list context which is space separated.

    forfirst

    Used with foreach. The literal value passed to forfirst will be placed on the first iteration of foreach.

    forlast

    Used with foreach. The literal value passed to forlast will be placed on the last iteration of foreach.

    fornotfirst

    Used with foreach. The literal value passed to fornotfirst will be placed on each iteration of foreach except for the first.

    fornotlast

    Used with foreach. The literal value passed to fornotlast will be placed on each iteration of foreach except for the last.

    full_path

    Returns full path of the value of the variable name passed a the parameter.

    has_extension

    Returns true is the variable value has a file extension.

    if

    Used to determine if a variable is defined. The not operator (! ) can be used to invert the if check. This construct will only check for values defined within an mpc or mpt file. Default values (even those implemented by the project creators) are not considered in the if statement.

    keyname_used

    This function is used to associate a key with a variable value. If the key has been associated with a variable value more than once, either through physical repetition of the key in the template or through evaluation of a foreach context, the count of association will be appended to the output.

    lc

    Return the given variable value in all lower case characters.

    marker

    This is directly related to the verbatim keyword from the mpc syntax. This can be used to designate markers within a template. Ex. <%marker(local)%>.

    multiple

    This function returns true if the array parameter contains multiple values.

    noextension

    Evaluates the variable name value as a file name and removes the extension from that value including the period.

    normalize

    Convert spaces, dashes, slashes, dollar signs, parenthesis and dots in the given variable value to underscores.

    remove_from

    This function will remove a file in a component list. It requires three parameters. The first parameter is a component name (e.g., Source_Files), the second parameter is a regular expression pattern and the third parameter is a project or template variable name. The fourth and optional parameter allows you to alter the project or template variable value by removing the end matching portion. If the value of the project or template variable (i.e., parameter three) after being modified by parameter four and having the regular expression pattern (i.e., parameter two) appended to it matches any value within the compent list (named by parameter one), it will be removed from that component list and passed back. any

    reverse

    This function reverses the order of the array parameter values.

    scope

    This is used to set the scope of execution of a function that will operate on the template output. A scope is begun by passing "enter" as the first parameter and a function name as the second parameter. Currently, the only function name supported is "escape". The third parameter specifies a string on which the function will operate. Any template text that matches the string parameter while within this scope will be transformed by the function parameter. A scope is then ended by passing "leave".

    set

    This function is used to set or create a template variable. This function takes two parameters; the first is the template variable name and the second is the variable value.

    sort

    This function sorts the array parameter values.

    starts_with

    This function returns true if the variable value (first parameter) starts with the regular expression (second parameter).

    transdir

    Replaces values within the directory portion of a variable value with something that can be used as a relative path. The current working directory is removed and ".." is replaced with "dotdot".

    translate_vars

    The first parameter to this function is the name of a variable. The second, optional, parameter is the operating system for which the project is being generated (e.g., linux, solaris, win32, etc.) It replaces $(...) found within the value of the variable with the equivalent environment variable reference based on the operating system.

    uc

    Return the given variable value in all upper case characters.

    ucw

    Return the given variable value with the first letter of each word in upper case. Words are separated by spaces or underscores.

    uniq

    This function returns the unique set of the array parameter values.

    The following table lists special names that can be used as variables in some template files. The variables listed in the Common_Pseudo_Variables table can be used as well (except for <%temporary%>).

    Special Values used in Template Files

    Value

    Description

    am_version

    Implemented by the Automake project creator module, converts the version setting into a suitable value for automake.

    ciao

    Implemented by the GNUACE project creator module, specifies that the project uses CIAO.

    compilers

    Implemented by the Make project creator module, provides the compiler name based on the current project language.

    cppdir

    This value is implemented by the BMake project creator module. It returns a semicolon separated list of directories taken from each value in the Source_Files list.

    custom_types

    Contains a list of the custom build types. See Custom Types for more details.

    cwd

    The full current working directory.

    forcount

    This only has a value within the context of a foreach and provides a 1 based count, by default, of the index of the elements in foreach.

    guid

    This value is implemented by the VC7 and WIX project creator modules. It returns a guid value based on the project that is usable within VC7, VC71, VC8, VC9, VC10, VC11, VC12, and WIX project files.

    language

    This value is implemented by the VC7 and Make project creator modules. It returns the current language setting for the project.

    make_file_name

    This value is implemented by the VC6 and EM3 project creator modules. It returns the project name with the make file extension that corresponds to the particular project type.

    project_file

    This variable contains the name of the output file for the current project being generated.

    project_name

    This variable contains the name of the current project being generated.

    rcdir

    This value is implemented by the BMake project creator module. It returns a semicolon separated list of directories taken from each value in the Resource_Files list.

    source_directory

    This value is implemented by the WIX project creator module. It converts the variable portion of the binary output directory (either exeout, dllout, or libout) to a suitable value for WIX.

    tao

    Implemented by the GNUACE project creator module, specifies that the project uses TAO.

    vcversion

    This value is implemented by the VC7ProjectCreator. It returns the version number of the type of project being generated. 7.00 is return for vc7, 7.10 is return for vc71 and 8.00 is returned for vc8, 9.00 is returned for vc9, 10.00 is returned for vc10, 11.00 is returned for vc11, 12.0 is returned for vc12, 14.0 is returned for vc14, 14.1 is returned for vs2017.

    vpath

    This value is implemented by the GNUACEProjectCreator. It returns a value, based on the location of the source files, that specifies the VPATH setting for GNU Make.

    Template Variable Documentation

    Template variables used within the MPC templates are numerous and vary from template to template; there are far too many to include in this document. However, you can generate an HTML document containing all of the template variables used within a template using the document_template.pl script found in the devtools directory under the MPC root directory. You may find that some templates and individual template variables are well documented and, unfortunately, some are not.

    The script will generate documentation for an individual template file. The usage is as follows:

    document_template.pl v1.3

    Usage: document_template.pl <template> [<html output> [language]]

     

    html output - This defaults to the name of the template file with the .mpd

                  extension replaced with .html.

    language    - This defaults to the language for which the template is designed.

                  It can be any of the valid language settings for MPC:

                  cplusplus csharp java vb

    Custom Types

    To support multiple custom build types, a special keyword was introduced. The custom_types keyword is used to access the list of custom types defined by the user. In a foreach context, each custom type can be accessed through the custom_type keyword.

    A variety of information is available from each custom_type through the -> operator. The input files, input extensions, command, command output option, command flags, and output file directory are all accessible through the field names that correspond to the particular type.

    The input files associated with the custom type are accessed through custom_type->input_files. Each input file has a set of output files associated with it which can be accessed in a foreach context through custom_type->input_file->output_files. The custom type fields are those listed in the Define_Custom Keywords table as well as those listed in the following table.

    Custom Type Fields

    Value

    Description

    dependencies

    The files on which the processing of the custom input file depends.

    gendir

    The output directory associated with a particular input file. This field has no meaning when accessed directly through the custom_type. It should always be used within the context of a flag_overrides (see Template File Keywords ).

    input_files

    The input files associated with the custom type.

    inputexts

    The input file extensions associated with the custom type.

    non_source_output_files

    All output files generated from the custom input file that are not considered source code files by MPC.

    output_files

    All output files generated from the custom input file.

    source_output_files

    All output files generated from the custom input file that are considered source code files by MPC.

    The example below, which creates generic makefile rules for building custom input files, shows basic use of the custom type and the various fields that can be accessed. The main limitation with the custom_types keyword, as can be seen below, is that the foreach variable cannot be named as stated previously.

    <%if(custom_types)%>

    <%foreach(custom_types)%>

    <%foreach(custom_type->input_files)%>

    <%foreach(custom_type->input_file->output_files)%>

    <%custom_type->input_file->output_file%>: <%custom_type->input_file%>

            <%custom_type->command%> <%custom_type->commandflags%> $@

     

    <%endfor%>

    <%endfor%>

    <%endfor%>

    <%endif%>

    Certain project types don't support the same input file used by multiple custom types (current examples of this are vc10, vc11, vc12, vc14, vs2017, cdt6, and cdt7). To accommodate these types, MPC has a capability called "combined custom". With this capability enabled in the specific ProjectCreator, MPC will "fold together" the multiple custom steps so that the target tool (Visual Studio or Eclipse CDT) sees it as a single custom step that happens to run two or more commands. When "combined custom" is enabled, the template needs to be written for it by checking if custom_type->input_file->commands is non-empty. If it isn't empty, the values in it can be iterated over with a <%foreach%>. During that iteration, the following values can be obtained by the template. Each one would appear in the template preceeded by custom_type->input_file->

    Custom Type Fields for Combined Custom

    Value

    Description

    command

    The effective command, taking into account the flag_overrides.

    command->outopt

    The output_option for this particular command, taking into account the flag_overrides.

    command->outfile

    The first output file for this particular command (for use with outopt).

    command->flags

    The commandflags for this particular command, taking into account the flag_overrides.

    command->gdir

    The gendir for this particular command.

    Grouped Files

    File grouping is part of the syntax of mpc files. If a set of files are grouped within the mpc file, they can be accessed as a group within the mpd file.

    Files (such as Source_Files, Header_Files ) can be grouped together as shown here. Within the mpd file, the different components can be accessed by prepending grouped_ to the component (grouped_source_files, grouped_header_files, etc.)

    Grouped Files Field Names

    Field Name

    Description

    files

    The input files associated with the group.

    component_name

    The name of the set of multiple groups of files.

    The example below, which creates make macros for each file group, shows basic use of grouping and the fields that can be accessed. The main limitation with file grouping, as can be seen below, is that the foreach variable cannot be named as stated previously. The following example involves source files, but any of the components listed in the mpc and mpb section can be used.

    <%if(grouped_source_files)%>

    <%comment(Get back each set of grouped files)%>

    <%foreach(grouped_source_files)%>

    <%comment(This will provide the name of the group)%>

    <%grouped_source_file%> = \

    <%comment(Get all the source files in a single group)%>

    <%foreach(grouped_source_file->files)%>

            <%grouped_source_file->file)%><%fornotlast(" \\")%>

    <%endfor%>

    <%endfor%>

     

    ifndef <%grouped_source_files->component_name%>

    <%grouped_source_files->component_name%> = \

    <%foreach(grouped_source_files)%>

            <%grouped_source_file%><%fornotlast(" \\")%>

    <%endfor%>

    endif

    <%endif%>

     

    Template Input Files (mpt)

    Template input files provide build tool specific information that is common to all projects, such as compiler switches, intermediate directories, compiler macros, etc. Each project type can provide template input files for dynamic libraries, static libraries, dynamic executables and static executables. However, none of these are actually required by MPC.

    The template input files are more free-form than the other MPC file types. It is similar to the mpc syntax except that there is no project definition and there is only one keyword. The keyword, conditional_include, is used to include other mpt files if they can be found in the MPC include search path. If the name listed in double quotes after conditional_include is not found, it is ignored and no warning is produced. The mpt extension is automatically added to the name provided.

    The template input files contain variable assignments and collections of variable assignments. A variable assignment is of the form:

    variable_name = value1 "value 2"

    variable_name += another_value

     

    This variable can then be used within the corresponding mpd file.

    Variable assignments can be grouped together and named within the mpt file and used as scoped variables within the mpd file. The following example shows the use of collections of variable assignments.

    // mpt file

    configurations = Release Debug

    common_defines = WIN32 _CONSOLE

     

    Release {

      compile_flags = /W3 /GX /O2 /MD /GR

      defines = NDEBUG

    }

     

    Debug {

      compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy

      defines = _DEBUG

    }

     

    conditional_include "vcfullmacros"

     

    Below is the portion of the mpd file that would use the information provided in the mpt file above.

    <%foreach(configurations)%>

    Name = <%configuration%>

    <%compile_flags%><%foreach(defines common_defines)%> /D <%define%>=1<%endfor%>

     

    <%endfor%>

    The following output is generated from the above example:

    Name = Release

    /W3 /GX /O2 /MD /GR /D NDEBUG=1 /D WIN32=1 /D _CONSOLE=1

     

    Name = Debug

    /W3 /Gm /GX /Zi /Od /MDd /GR /Gy /D _DEBUG=1 /D WIN32=1 /D _CONSOLE=1

    If a foreach variable value corresponds to a variable group name, that variable group is available within the scope of that foreach.

     

    A Simple Example

    We will discuss what it would take to add support for a fictional build tool throughout this section. The Generating projects with mpc.pl diagram shows the relationship between the template and project creator discussed below.

    Template

    The best thing to do is to start with the template. The template is the most important piece when adding a new project type. It basically tells MPC how to lay out all of the information it gathers while processing an mpc file. The template file will have a mixture of plain text and the mpd syntax described in the Template Files section. Here is our sample fictional.mpd.

    //=======================================================================

    // This project has been generated by MPC.

    // CAUTION! Hand edit only if you know what you are doing!

    //=======================================================================

     

    // Section 1 - PROJECT OPTIONS

    ctags:*

    debugSwitches:-nw

    //end-proj-opts

     

    // Section 2 - MAKEFILE

    Makefile.<%project_name%>

     

    // Section 3 - OPTIONS

    //end-options

     

    // Section 4 - TARGET FILE

    <%if(exename)%>

    <%exename%>

    <%else%>

    <%if(sharedname)%>

    <%sharedname%>

    <%else%>

    <%if(staticname)%>

    <%staticname%>

    <%endif%>

    <%endif%>

    <%endif%>

     

    // Section 5 - SOURCE FILES

    <%foreach(source_files)%>

    <%source_file%>

    <%endfor%>

    //end-srcfiles

     

    // Section 6 - INCLUDE DIRECTORIES

    <%foreach(includes)%>

    <%include%>

    <%endfor%>

    //end-include-dirs

     

    // Section 7 - LIBRARY DIRECTORIES

    <%foreach(libpaths)%>

    <%libpath%>

    <%endfor%>

    //end-library-dirs

     

    // Section 8 - DEFINITIONS

    <%foreach(macros defines)%>

    -D<%macro%>

    <%endfor%>

    <%if(pch_header)%>

    <%foreach(pch_defines)%>

    -D<%pch_define%>

    <%endfor%>

    <%endif%>

    //end-defs

     

    // Section 9 - C FLAGS

    <%cflags("-g")%>

     

    // Section 10 - LIBRARY FLAGS

    <%libflags%>

     

    // Section 11 - SRC DIRECTORY

    .

     

    // Section 12 - OBJ DIRECTORY

    <%objdir(".")%>

     

    // Section 13 - BIN DIRECTORY

    <%if(exeout)%><%exeout%><%else%>.<%endif%>

     

    // User targets section. Following lines will be

    // inserted into Makefile right after the generated cleanall target.

    // The Project File editor does not edit these lines - edit the .vpj

    // directly. You should know what you are doing.

    // Section 14 - USER TARGETS

    <%marker(top)%>

    <%marker(macros)%>

    <%marker(local)%>

    <%marker(bottom)%>

    //end-user-targets

     

    // Section 15 - LIBRARY FILES

    <%foreach(libs lit_libs pure_libs)%>

    <%lib%>

    <%endfor%>

    //end-library-files

    Note that output is generated differently depending upon whether <%exename%>, <%sharedname%> or <%staticname%> is defined due to the if statements that were used with relation these variable names. Also, certain portions of the project file are only generated if particular variables are set.

    Project Creator

    Next, you would write the FictionalProjectCreator.pm. It may be best to start with a copy of the MakeProjectCreator.pm and edit it. Change the package name to FictionalProjectCreator and have it inherit from MakeProjectBase and ProjectCreator. Then, override the methods that are needed for this particular type.

    package FictionalProjectCreator;

     

    # ************************************************************

    # Description : A Fictional Project Creator

    # Author : Chad Elliott

    # Create Date : 10/01/2004

    # ************************************************************

     

    # ************************************************************

    # Pragmas

    # ************************************************************

     

    use strict;

     

    use MakeProjectBase;

    use ProjectCreator;

     

    use vars qw(@ISA);

    @ISA = qw(MakeProjectBase ProjectCreator);

     

    # ************************************************************

    # Subroutine Section

    # ************************************************************

     

    sub convert_slashes {

      #my $self = shift;

      return 0;

    }

     

     

    sub project_file_extension {

      #my $self = shift;

      return '.fic';

    }

     

     

    sub get_dll_exe_template_input_file {

      #my $self = shift;

      return 'fictionalexe';

    }

     

     

    sub get_dll_template_input_file {

      #my $self = shift;

      return 'fictionaldll';

    }

     

     

    sub get_template {

      #my $self = shift;

      return 'fictional';

    }

     

    1;

     

    In our example, we inherit from the MakeProjectBase which provides some methods that are common to all “make” based project creators.

    We override the convert_slashes method to return 0. A zero return value tells MPC not to convert slashes to back slashes (converting slashes is useful for Windows related build tools).

    We then override the project_file_extension method to return the project file extension which is used by a method defined in the MakeProjectBase module.

    Next, we override the get_dll_exe_template_input_file and get_dll_template_input_file methods. Those methods return the specific template input file names for a dynamic executable and dynamic library, respectively.

    Lastly, we override the get_template method to return the template file name for our new project type. In our case, the method returns fictional which corresponds to the name of the template file we created earlier.

    There are many other methods that can be overridden to change the way MPC generates output. For a complete list, see the “Virtual Methods To Be Overridden” section of the Creator.pm and ProjectCreator.pm.

    Workspace Creator

    The last part that you would need to write is the FictionalWorkspaceCreator.pm. This module is usually more code-intensive than its Project Creator counterpart.

    package FictionalWorkspaceCreator;

     

    # ************************************************************

    # Description : A Fictional Workspace Creator

    # Author : Chad Elliott

    # Create Date : 10/01/2004

    # ************************************************************

     

    # ************************************************************

    # Pragmas

    # ************************************************************

     

    use strict;

     

    use FictionalProjectCreator;

    use WorkspaceCreator;

     

    use vars qw(@ISA);

    @ISA = qw(WorkspaceCreator);

     

    # ************************************************************

    # Subroutine Section

    # ************************************************************

     

    sub workspace_file_name {

      my $self = shift;

      return $self->get_modified_workspace_name($self->get_workspace_name(), '.fws');

    }

     

     

    sub pre_workspace {

      my($self, $fh) = @_;

      my $crlf = $self->crlf();

     

      print $fh '<?xml version="1.0" encoding="UTF-8"?>', $crlf,

                '<!-- MPC Command -->', $crlf,

                "<!-- $0 @ARGV -->", $crlf;

    }

     

     

    sub write_comps {

      my($self, $fh) = @_;

      my $projects = $self->get_projects();

      my @list = $self->sort_dependencies($projects);

      my $crlf = $self->crlf();

     

      print $fh '<projects>', $crlf;

      foreach my $project (@list) {

        print $fh " <project path=\"$project\"/>$crlf";

      }

      print $fh "</projects>$crlf";

    }

     

     

    1;

     

     

    The first method we override from WorkspaceCreator.pm is the workspace_file_name method. It is used to determine the output file for the generated workspace.

    Second, we override the pre_workspace method, which we use to print out the generic unchanging section of our generated workspace.

    Lastly, we override the write_comps method. This method is where the bulk of the work is done in our workspace creator. A workspace creator has many sets of data available. A reference to the list of project file names can be obtained through the get_projects method; project-specific information can be obtained through the get_project_info method which returns an array reference where each array element is an array containing the project name, project dependencies and a project guid (if applicable).

    ace-6.4.5+dfsg.orig/MPC/docs/html/images/0000775000175000017500000000000013157240624016046 5ustar tggtggace-6.4.5+dfsg.orig/MPC/docs/html/images/mwc.fig0000644000175000017500000000253013154167361017324 0ustar tggtgg#FIG 3.2 Landscape Center Inches Letter 100.00 Single -2 1200 2 6 225 225 6375 1875 6 1425 900 2025 1200 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 6 1425 1050 1800 1050 1800 1200 2025 1050 1800 900 1800 1050 -6 6 4275 900 4875 1200 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 6 4275 1050 4650 1050 4650 1200 4875 1050 4650 900 4650 1050 -6 6 225 300 1425 1875 6 225 300 1425 1875 5 1 0 1 0 7 50 0 -1 0.000 0 1 0 0 825.000 525.000 225 1650 825 1800 1425 1650 1 2 0 1 0 7 50 0 -1 0.000 1 0.0000 825 412 600 112 225 300 1425 525 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 1425 450 1425 1650 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 225 450 225 1650 -6 4 0 0 50 0 0 16 0.0000 4 165 390 600 1275 File\001 4 0 0 50 0 0 16 0.0000 4 165 630 450 1050 MWC\001 -6 6 2025 375 4275 1650 2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 4275 1650 4275 375 2025 375 2025 1650 4275 1650 4 0 0 50 0 0 16 0.0000 4 165 750 2775 1200 Creator\001 4 0 0 50 0 0 16 0.0000 4 225 1710 2325 975 Make Workspace\001 -6 6 4875 225 6375 1875 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 4875 225 6375 225 6375 1875 4875 1875 4875 225 4 0 0 50 0 0 16 0.0000 4 225 1095 5025 600 Workspace\001 4 0 0 50 0 0 16 0.0000 4 165 390 5400 825 File\001 4 0 0 50 0 0 16 0.0000 4 210 1035 5100 1125 (Makefile,\001 4 0 0 50 0 0 16 0.0000 4 180 915 5100 1425 dsw, sln,\001 4 0 0 50 0 0 16 0.0000 4 210 480 5100 1650 etc.)\001 -6 -6 ace-6.4.5+dfsg.orig/MPC/docs/html/images/OCILOGO_bw_book.eps0000644000175000017500000021570013154167361021362 0ustar tggtggZxH%!PS-Adobe-2.0 EPSF-1.2 %%Title: OCILOGO_bw_book.e (Converted)-2 %%Creator: FreeHand 8.0 %%CreationDate: 10/6/00 5:11 PM %%BoundingBox: 0 0 139 92 %%FHPathName:Mac OS 9:Desktop Folder:oci_logos:OCI1COLO:OCIBLACK:OCILOGO_bw_book.e (Converted)-2 %ALDOriginalFile:Mac OS 9:Desktop Folder:oci_logos:OCI1COLO:OCIBLACK:OCILOGO_bw_book.e (Converted)-2 %ALDBoundingBox: -3 -13 141 95 %%FHPageNum:1 %%DocumentSuppliedResources: procset Altsys_header 4 0 %%ColorUsage: Color %%DocumentProcessColors: Cyan Magenta Yellow Black %%EndComments %%BeginAGDEmbeddedDoc: version 1.0 %:s8W,W5t==!^::f!!!&QO!!3-(<,$2\ErZ1?!!iQH0fLmD#?8Pj %:!!",2&-+=A0E=*f1c7-F+>Gf01+kNd!&?Gj3AWf!!<3-E,]>d"9E"QAS#`[!!N?0!*'#:!+A"k!(:Q%FT?I_F9#l4,$hjP %:!!<3/3=K#%!!QqS7WiTY!!!*$"oq=U!H_TJ!.f.j!WWCC@;oWb!WWIEEbUREV*G7c%g;t5rrN0$$31)u$Vk8W7s/MJ6"FPJ:gn!>$U#+&AHEJE'`\mK!!*'$!!*'!!"f22'EAaG$NLk@(d\3,>6"X\!ZWHiS,iU0/-\EA!#uXt1]WU3N%KHJ<58FX,e2ma=1B@_>&d:9)"#1E%!!!9d+qm$QF_u\[1a5;0F*)>;66eDm!rrU?@;KNmJokpK=qEJ+"TUkJ$t0-G!,DQ7"#81'*#64]+!&5N$!OOX=!PJIBK`Hf,!!i,r#m't1BEX!&Xa("T^2&"U^C9dnpL,!&Xb3"o:GC!*9>X!&Xa("T^8("U]loAlf.i!&Xb3"ZQK`:Y2^I %:"mc/A!&Xa("T^>*"U_YW$\\RX!&Xa("T^EolR)iCVf<)u!&Xb3"ZQK`"bcq6!%.pN2(&P7R<'a0!<0_j!/C_;!*9>X!&Xa("T^P0"U^-.-\VOX!/C_;!*9?ire1>0!%.pN3@=t;HugZh!&Xb3"ZQK`"bcq6!7qAS+Ai,#,m=8LZu\#(GWH302#tF[TEYC(+;A`p!!!$"49.DB3&tP,!&=O.K'tX0/-%."-lN'cb0!k5 %:5!;O?!&m))!!&3`4U?$m[HSA*!'pbg2Zl<'DNI'a#66bk"TSZQ!=8`nM[/`Q!!#dr5l_2k"98Z,;a5)=20*XtD(o'R8O3U`0`WEu70"G1!$M>1!&mR[8WF("-S?8:1J.WIe9_8t2$j9`7fiZV!s2:;!+e\$3E&HK(B@#,>lt(N!X1:Z!!!!*!S'8]!OR3'!S2sU!OOLf!+Uug8K63r5lnB"635Vr6NORp5TG4RfI$OtZY_K$%%Tbh %:#m&l9IfTNL[t*?:h"!P+!g8-.@+IK9EK]SOB)fl2QE]7'b]g%tgO+99&m3*cgkgnjuN^57=?g`So`&-9JfT)ma(^B)$/3.;/7hc9`-JH#7D5JBkqh@okh^\?ahhYqp(!$K!]^B*4g!!0l[1MI-ri8O\9!!0s8J-"SE^]D8`569_Do7X#= %:rN^Hqt6:LaFc=Te_S!P?E:6NcEX4TWU9s+"k %:9`VVe5:Hm>kiD^DZol,)kG&"grW0EJJcY$c!WfZD&EAt+!KRj01g;*ffF!+!S6Na(`JUme%[,694V)^$6TnI&VqO97]gIAPW&>:&:':P`!NC^'6Nb&pI0$FrSH6H!!!I`OWuYIH]Z%bhXK93.!P0lh!5AQ;?oUD0JH;k4JcWIbrrF5JY*rJt^*S=2Xh,eY]fnfdWLs6B!PWhC!Nrk^6Nb-NK)r4'5a#04R[!LgWM!QP4kZi0uq%KQTY!)!L:\UOXL'nH>c!Q]1G!LiG)!QRKY!M.GA6i[52TS!9>d3&J5[/L*#'A`a\+O)bbU6f.8bc?3oShUPr=T\\t!([V#!R67K!M7qG!RPsD"tdRj5QoCn#+]tT!RQRP!M%tp8I!W0!!!'$TJ&V4dMRK8T?_icdJsCsK)qX0r^[(:P5bPJ5gO9Z %:+44(K#!WFA"9=g>!Mc\u(=[PY!MS-J!RguJ#QOn"^RbJUq`OtSUf.BISO3AW!Mgn=!S1HV!Mc51!S3"B&-)a,d9\KVM$!dV"[<%=#Qk)15c'OU!Rrl/VKAP(#1:H-!N)72+?fof*i:XldRnuiVmKP,eO4rhW!EG[+9BtT>c9lY!S%:(!NBQ]eGqlB!WfFJ^B)j?4!6E[!RkI80Lu=o?Sp+\0EF4a!R]GK!NS7#cuB* %:=Y\6?634!95lo]c"@3'f'O_$e=ZukeMW%>;b.I`b^]CQ>_#_b>CTJ;&!DNPR/P#oa#mF!(!NA.4aso>,:gsIJN]%'">SR5AbL8]WVG=l,bLD(DV`P"'q?0>P!N("W6NbEQ!`]]O8M^r8*ruoQa:eN12T3^e!N%'S!QJXK!<=7>,J=,sq0rFA860EDrBgU[#UEEf!QI$%Ud$"'a>n78&S>8l %::-IPB!<=gt'0lSn;VhGsYr*I\9ZK6s!?)B=(-au2+t3Rh+t3`H4+@9k2$cm&NQ-3rrEO\4!)*_nH]IcM>^ML;]`CfRN^MgKIp@>d=C6pi-g,.F!KoW)9RE"-!aL)9?C#1@?6 %:!ON8a!K8lVZNS/HMb7%ZYoj%o!+#f6ScJkK=?Zbkd=VIU5QR*T.^aSP!J]T"!OOA,!J`[+!nO`S_Z>K'=dQ?UX%38s3s14#Gte9m5SJ`LT!(;l!J6Yg!O+DYK>f`u1d`Z>Ju)@EZ8=+_mX5,@5$ELm*4%ZA+]&2k4p_2q!OaaQK05=)3@]ZP!,5!J;=O'0iXNT`>,(4Dob5!!!<,!!0[FI0"j[(V5c]!J2L]!PFL[0ckj[=U)VX!s*m6REb^c9-H%'7p801^\UeFjE*3!IWS##uWe/4F;<;bKi:tH;T:qcTHQ")I=+D"O]:FG&P(qd5_DT\\S3L_'OeehAn6GWl.3!7a2YL->o"0%)k/Km`t&e('!MKaAK3!s71IF&H\$?)!Qm6?J[A_d`]SSN&V+Ek!Q[BMJ7\]\a#n]uM?6?m:^"j%H[I]2aQ3=$IY!+Pauk$!OJ&OR6I%]?I?a^3bWL6$3*43a0\FDO %:H[/_D!5JR;!!)WIYS7';56Clc%*\bP!ol'm!!*'!!WZ4%!)@s]VcEe!oIDh^$Gc]B!H^$rlo[bS8T+_3!<<-#!KjEK!*LTM)%$?L!"&c-!J5Xh!"(jnLBB^>(]XPC"TUI`?2ss.O>d7H!9_5s!LkbGK`H5qJ949baalt`Sn"&eK`H5q-NsNg-Ns_I2Zob5!JX(BPhd$A %:!JLMr!(R4a2&;#dRK8*Be_kQM-NsNi-Ns^_3!5(#&;:+,!(R3u=dfAM*<9C;!JLMr!%.pNE[M"p[Cg5T^$,.ji#RLOFT=o8ZkBSD^c@haK`H5q-NsNm-Ns\Si5!Ni!P^ei!JLMr!(R40*k26e*=jl+85kB[0FT=o8!9hb(Q3"g>'ENmfFT!-J93"g*"MK`H5q-NsO$VhHK%#-pBCJDDt2K`GZaa[k\2kK`GZa-NsO.-Ns_$]m;aOPWT&%!-J93"jT(.P;O,0!-J8h"TaQ0"U;pHf-D47K[64jK`H5q7g6jd$AU_PK`H5qTH,B`!KJN2#1B:b!MrS`!JLMr!(R4A2&:K=W&5?E!-J8h"Ta]4"U=L-)$-7gScONF_"U9C$nP1/c-%u>A!(R4\1'adauh %:-Ns_%^%F>eZ8N#C!-J93"k?-E2A1]DFT0FrC5UG*44!-J93"mo2>!MYc6!JLMr!%.pN5WGVg"U;qahZ9Y:?ibr]FT=o8a3lOE5QR_q1BE10FTndbnH4PTj/;4(H!%.pN\0hFahCi+7IQ]69!-J9C"Ugtbk5fuo/E)9_AH4(]!P0W^#3V.f!NI/d+q+L+!-J93"m7a1V_AsA!-J8h"Tc7`"U/Wg(nlLfi2AH4(]!Pg&d#/E/#O>%3!!-J93"i<5OOZ,&\s+LGq[5fN' %:!%.pN_C#Kk]K?:_0ai[8FT=o886SObK`H5qX4J^&!Q6>h#/<8SS2L\-!-J93"is?M3bL4-M`0K`H5q7g87(!JLMr!%.pNbU3PufK:j6on+t,K`H5q7g7I'!JE08K`H5q-NsOr-Ns_+3Y_8S6"P`MXZJVt %:FT=o8eMmts2[+m8FT@4Tf3./!-J8h"Td+#"U<^D"/e7es&XmSFT=o85SlrlK`H5q-NsP%-Ns_,0Ft6C$&&A%!3]Ho"kGdEW]U]D!-J8h"Td7'"U<7,$]$nIK`H5q]j=24bBO&A!-J8h"Td=)"U<@4$%4`9K`H5q7g75P?8qt83ZWnScO\K@ %:FTrSM_1:!-J93"m7fJT0!UlMaFT=o8\iLjh2[+m8FT3!"^5FTFSH%*7]&qp=.!%.pM!<=JN#0q2rK`H5q7g2M[2&-/Wqh5#m!%.pN![e-U&2^FTu]b5oH?)$,#GYQ9FXFT=o8bQ168Ho:9S#DE/#!%.pN$mu2_[Cg5TFm/N"K`H5q7g/nVZkBSDGWD2nK`H5q-NsM\-Ns^c(tAik)tDCt %:!I2@@!JLMr!(R4)!Xo*WpBgrb#DE/#!%.pN&17Vc^rqE4G+8G@1COK`H5q7g/nWc_Hd,H#=;sK`H5q-NsMd-Ns_-A2teQ"&GKhK`H5q7g7X2G6*'hoDsXGFTA'S-NsMf-Ns_4_\)uma)(j2!-J93"lS;@C873G %:TL&[(`i&ol!-J8h"T]Mh"Uu;K`H5q7g7d.5HZqPK`H5q-NsMj-Ns_=]E:7uO$!Mu!-J93"m>Nj!KqE`!JLMr!2(>["T]Yl"U=GkgAuJl$iu%^FT=o8mk@0?J9g@c!JLMr!%.pN+=@UB=!-J93"nk%eX#pfE!-J:Vc6ibr3%"k68K^WpK`H5qa0tm\^K`GZa-NsN3Y?iR[#.6H7Hohmn!-J93"gU&iH9;Ui!-J8h"T^`hGUEY![P\i-49L9;FT=o8ZSr%W`e=D8!!!*$nS8e* %:!"fA7Ui5lgrb!C$Vc!WmrR!WW9%,6.]d!!"/C5QO.s#lk!.nustVG<-4')8Da7"opcm56Z<7!CJ.8)/]][!,_dS!WW6%6ifUT4TRVF3<0$[2ZNgXVUfn- %:!!"&tnS!!!$7!>>JG!=o2?!=Jo7!=&T)!!6"rU!5SZM!5/BE!4`*=!!!#,!4)[1!3ZC)!36+!!2fes!2T[j!20Cb!1a+Z!1!/gi6!/COS!/1E*!.b-"!.=io!-nQg!!!"A!-8-[!,hjS!,DRK!,$s-#64co!D3Fos8N*g!!!?+!<FTR!%.dS!DA=U!!#dr5l_2k"98]-6T#5O5]-R6!+c.P!-C:1!WW9%!WW?;,6:L=+92Bb!DEMY"98Q*!)1Y3!!3-$3sYie,6.]d!D`[s!DigNO8o@_s8N3%!WW3,_sE0e %:!R,,+!L.96kKnn_K`Ho0NAtSPK`Et1<<^DH;C;VPYF*-,%j&@UJH:H)FT=o88-$/E_,p_l!&Xa("T_S`h'W@1^&LE#"bcr!!(R2`!&k#]K`H5q-NsNO-Ns_Sd7Y$:$\\S'!(R2`!(R3H!-J8h"T_^Q"U<])!`9@*7tgqc!(R2`!(R3H!-J8h"T_dS"U=3HJl`,0!-J;?^./>t!(R3H!-J8h"T_jU"U7@5Ys'7`!-J93"\8Wn?X+KR %:4oYfI?Q4\!2#o!-!F@,W#"0>!"bcr!!(R2`!&k$f)t3f\!&Xa("T`!Y"U7@47g4SHFT=o88,tRO:bIG%2#o!-!Iq^j-Ns]B)+Oja!-J93"\8VP"9F2VFT>Cmsd1p7g2EaRkQmW!-J8h"T`9a"U7@52[!(uK`Et17g8ei8-)3aK`H5q-NsNc-Ns]B)E.du`<-XA %:)MJ/K!(R2`!Cmi!%.pNE[M"p6lAJuK`H5q7g8kk8,tRO=ri:s2#o!-!H][m#"fP!"bcr!!(R2`!&k$W)"7KY!&Xa("T`co"U7R47g4SHFT=o88,tRO:`+ld2#o!-!GB`'"C?B@ %:-Ns]H'SZm+15,]c!(R2`!Ii[7!JLM2!%.pNJ,O[@"U7R52[!:uK`Et17g2Ea2[!4`K`Et1-NsNu-Ns_SpIm5!"BR@4!&XaH"\8YQ"BY\Y!&Xa("Ta'""U7@52['0<<#UGj2#p,M8-(XP=94*U2#o!-!IuO$#"0@g"B6:n!<6sp!(R2`!B1-`!JLM2!%.pNJgU^+6lL8u9SEI(!(R3RIn0T^!!$(UK`Et1-NsO(-Ns]B)E.dua0-)# %:)MJ/K!(R4ks%!/L"BY\Y!&Xa("Ta?*"U7@52[!(uK`Et17g2Ea2[&mT=94*U2#o!-!Ji*,#"0@g"B6:n!&XaH"\8YQ"BY\Y!8mf6!%.pNMC/Q36lIue<#UGj2#p,M8-(XP=94*U2#o!-!C?UA-Ns^_c[>hC4)0HLFT=o88,tCL!JLMr!2KN@"TaW2"U;q'_cI"q!-J93"\8V`"bcr!!%.pNOH95c"U#"0>!"bcr!!(R2`!&k#]K`L$/FT!"bcr!!(R2`!(R3H!-J8h"Tb2B"U>"a6lAJuK`H5qSVXjf %:7g2E`7g4SHFT!%.pNU*g*K6lJQ!K`H5q7g2E`7g4SHhu.Zt-NsOH-Ns]B)+Oja!-J93"\8V`"bcr!!%.pNVC)NOs5-3^7g4SHFT=o88,u-`K`H5q-NsOL-Ns]B)+Oja!-J;?O%0@E!(R3H!-J8h"TbVN"U7@4WVF;12MD,g!(R4is%!/YWeCFq!%.pNX="/U6l@od<]5X32#p,MBncSK %:8-)3aK`L$0FT?Q4\!rr4hU7g2Ea8E,='FTX!7Cg(!%.pNasR?"U<^MT"bcq6!/C_;!*9>X!&Xa("T_-lbU3Q$WWGIf"bcq6!/C_;!*9>X!&Xa("Tcmr"UZ@GYr.)6"bcq6!/C_;!*9>X!&Xa("Tcst"U[OT:GMhKK`Et1LBTX;g!?3$[N" %:!EfeU!s-t!!uXQ.6NBRW!!**#!7q8%!RUqo!R1Yg!QbA_!<<,=!Q+rS!P\ZK!P8BC!Oi(0!4;j6!O2[/!NcC'!N?*t!<<+r!M][h!M9C`!Lj+X!LEfe!0mSK!KdDD!K@,6.k-=NQ!%.dS!T&_>!!#dr5l_2k!rrK)63%%BEWBeR@fU9E!-&tZhuI1*hZ*i^#QP54:&o2e!c7pG!,OLn;ugJK;uh.C1E6Gr*`EA6"B7/[D)hWq!YtM3!#@^E!<qS!#@j0!!!dVFTI-t!#CLp!!3cU(6JVT#8Wg2!!3q@!!!'9\H1amf`2'h_#`[U"k7YsGo.;Y!W`9:liI.u5QV_k!!!':.08Tn%LH*GG]Zjm"a#$+AH;dL/-#_1!U0XK2\60J!.Y7R!!-%!,6@'1i;l[RA9TO)!!K=74VCFO'mVqUE\S=a!!"&A!.Pgc!,i_A!>%Na!VHEm@K6E.Yi@*A %:rrW6+'U9dFA,nG]rs'mlV$<7WCBabf!s7sp"(;0HNWB+Z!ruI+RFthJ"/fA1"opY&D[HII!!*,j!UgKu"98jKCh-4JH"@KdE_^%[:_,Q!6Os.s!V6?Y!V?IWJA;-b?iU3,rrMZj!%Sr!W'/'!!$@l!Wi?*2b!iT#:ME^##_d>#bVDM[9-E/.(3t]!!"tZ.2`Nu;%XYk'*gr+;GIg(!)ZX78-)'[;!f/+N!Cc;\HYJ&%4VUj %:9*7$O8-()9]Meo4!)di+M?cQM;G2a/%080`!<<-$pCI<)"#V)$WZ\Q@m8jbmu(J&!!P/83X[1_nHMhOFpB9;!6hg#Y4t@s)/*D&;:?4R!Ma4,hsW[!(?lY!@DU;#$6:$#:67C#$9\A`'"?R8O.7a %:!&Iq`!*.pqK`FpN/$+ %:2#p/J)576<2uj2;!-J94!"Teu1!*N(u!W[=+'Ou:j=lWusj26QNFT>2D(9-(k!JLMr!/LYQ%e0ch!JLORC,Gu^!DW_V!+#e^!&Xc,VT&=1O/!),'Xp9Fm"*'g/k#=SVS!`]4sS?PNb%i2b]:PSp1$jR>(9a4D$Sd0ZD5S$rsdU-A_JH/+=F;"jT2hk65TL8u\r4E7FOhaBcQ^1VO;$:?a!B(Nt!=>Y/%oR-M;?fuF4Ot,Q&-)\W&dAeG&lqC3a2a4s %:!XpCg!tPbO!Y5>G!!$"p!UQNDKk&%TZ+h!)69Y!*5IT,=Fm$$Y18P:Bq1%AlSg>7H6f:8-&\j%JOrK=)Y5H%3!+g=5!$IirXW/5nliit&mcYZ9H=0HK'+a.!t#)D!Z1n;;bmDq!-qWH2)QaA=+pXlrcJ3%$O6W[RS6A.!/1E/!BW;FM<%(+0n#"9KGB*<6'ta](D&5`#J)^'$VA#5h6871FqNK`F=D#6$je(S"S.K`H5qL]K1>:]c=N2#p/J:'7cJgFT@3u8HqE\K`Et18-/NMs#8t@#)*&"!/LY6&I(K$K`Et18-)+Mh)Ya?!)p%#!*3?=8-/!#O"Q>t,jN]]AH6QI8djldXAAqO!-J9t!=ofC''BHaNX-RH %:!JLM2!+#dZ!RF*9$:^$[kF4;3)he:389Fo%#O3a/=94*UliAqenRP)om-A"U&-b8;#"8Mn91W%_<,X*S!U9gJ"p+a&\X*NdoVGOfI/m"F:CB\oK`H5qL]K=fs4C3ZK`Et18-)Kl2um"eK`Et12&u`Q!!*'#!\6,N!\"TZ,om1AoH4+(]lED)?U*D1]gn^3WK.L:B:LsB?:A2o6CO<>:g'3,mu,: %:,8AET<<1bjfL5d*.bj?`7%XZP!)kpJ+(S@O5!*+Vi#"8MTZq(3b!u`jjj3V!34/rKX"&V,S8-)9d:uuj)s7&AZINcC$ %:70#UY2#p/J:C0Aj8e!i`/S*NYtgsd)jI"!([.:Ze\RdKKqs+hA;[]B*I/o'(;7>:W!C["5!-J9t!C(i65QQQ=<3-If %:2#p/Jb'>Z156a(I#)*&"!/LY0RTKTE!&XaI!QZm]=U+WhK`H5qL]K;&#!`3C!&XaI!D3\Y!!\,WFTBf'57Z1s%KIXd#")6%5Yhsn66R$F$N``u4D+XT/MRP2rrN1D/\qH%7@4:qpR"q\^ZHu\"@W;X*kkK###X64#/:"j8+[#!+<7&UGOu*Q4q.]qH+-cR2a::B%Yd!`iYQ6Nb.p)b9K(_BU'0DcHePi8$g%8--I0ku7pW!&sNS70!o*;_jM,!Pp'g7\'aueq$g$_>6@26U^uG!Q1dg##dIb';4)l1!C["*e4^'D+XPPS0jbCj+rLSR#tRr34obRCa@@El!t56'!].7b4\l+!Nrf<&J%*@]<@EP$FT=lD]OnfY!JLMr!/LXd$Wa8s#!`3C!&XaIY/^O% %:!P*_r"ulSeK`H5qNsgaE^=U$Ei##>4*#.<:E##>[##%/"LD#d*-Z]54o:gS;LK`JK3!':hCKt&5Wo2uj/e2?["[ilREF&$BNYZN?/R!NU$';Zj%Tl3967_Df`k(O;/B[UG";X*##P=m#!iG^!2_IU2#p/J:C0Aj8e(B.0oop!d%QN0)u"PrrE*$!!%$/V/;e9e\^/4VW["Pf0)BR,:NmHf@JR)f@DAV!Z@F.G6.an#QT)lJ-("!#VH)Ws8N*"!d=+1/s[(L*7]\lnY[`#&_DC\.0q=(bp`o"+94,!!dk%L.0op%!e+8X/H>eNrrE*$HN4'9V!jb!eCCQ.0op*+FjNG=U6PY!<<'";9(9s %:!!7]@Up,Rc!"dZa`UTk%r"7QW4"1F`^@Ju`+c*iX.0ou+bQ5$.(=l<:ps1L#Qce;!b)Fn!WXYT!/pu==U6JW!<<'"!!8&J!!/lNFqN5Z[IL1?$k_-:9.:,p!Z8-VY'R6s.0ou8RKAQP!%A0ROTL\t!*KRV!!*'!!<<1^nY>\n&_'>O5csRT@MBF,[o4^]g24P* %:#SsU$pZGAJ %:!!!W$!!("s"7Z?jbHLsHFg1oGMH,0,8HAGm$CDA6i55Nt!!&stV?AT)o!A#QUM!TihXJ#QOi)s8N*"!hSqW2HCF=MjfQ^!c"Pplt?;](*A!i,kt.0opM!iB*+,ldrFrrE*$!!&eaUA%CpdnGbkWEqCnfsZMhm35NeiN@#QeB4!j2S).0opW!jGf54"PX_N+RYo %:XT/@kU3Sp7da!:2WSBlRg+e52$n2H1Knb55K2F''!bPsEZN:+U#QV455le;q#U06Ks8N*"!j_?j3]7Su!%!\KnZ!O%&__2^.0q>PJ,k$7.0ot`6#=aH\,lXZ#QVC:\lf:^!!*'!!<<*"!k7]nq^rK/:i5a&>#Z*f+@E>r.0q>KH[0m]h^Jg4F#!g1!WXYT!!j^]!l"h373DR1s8N*"!ke&s]Dr']&^h8&nZ&!^&_cZB.0q>FBB)%N %:G6BXBF`XG\/O]\cQib,+!%A0R_ZIbZ#Qt,L!!*'!!<<2;nY(@P&^f$4!.j[?fOPTK/Yaa#-uj9GE,KSC#QbE#J,TMi!WXYT!6>5`=U6&K!<<'"!!!!#`po`d((nrXDE6YreP#UjNpC=6i".0p!0A-0sV!%A0R&4"JAc<1Dn!!*'!!<<2EnY#ml!!j1a<))n`/`a&7C_^PimR@"'1!WXYT!8IWA!8Uc`)?9d;rrE*$g@:h%p(>XO+I=tUX:pO)gh=k[#Uin^=BS`n&6UFf!h]GnhuWm-#QWfbi`QO)!!*$a!<3'"!oNO@!q$ZI==s'E8DE\r %:;NqFu&_s;5.0q>',ua51]."!eVITbi`"2tM.0oq9!p<\l(]XR9rrE*$jRJiB!lO.4cl"/"XHB"bgud??#UiRR1%%hj:E:ki!j'NGl2gr7#QX/llraSs!#GV8s8N*"!pT6IK\dXUhKFh&o'qlR<)f8q'737GoU#!kF["YFYJ. %:oE#"A#QPE$o`Fhi#Sd=>s8N*"!qYrS#0m2S&^O\knZ>Qn&`'5R.0q=k7m[d*6U=$f#Qhd?!r2lt.0oqM!rH++'EA[E!<<'"!!;rcT#\h_cQ*2ZXTAWb]FiuZq^De!6/4WU4JXD3!leb)JcboQ!%A0RrrW6'8T>CD!<<'"!!3-#rUHJ8^(JZHrUI#6`"CiM5_]@i#UhiV3Gpe\.0p"!ao__I!;Qm&&3p@#"^)*D!!*'!!<<3'^2@1+Li-ohJh&B"W+B.4)fdkV"2!WXYT!!r`7=U5T>&-)_1rrE*%#P"AmXqArdmI@=\"A7/UhOkN2#UhO!0UFE6.0p".Qn\^G%0?MY#QP>:%p9/L!!*'!!<<31!!)P[bGGls+Q`-rM;/^"h]%+d.0q=U0e=n+.k(`*hu3^6(]XOb#QPM?5l_U%#S-n8s8N*"!tk'oN1LX+!$L7VnZKso&`4WS.0q=PSs>e+ %:?mh!]7hAiQ#Qj.!"$90V!%A0R(]tXY#S$h7s$-Sa!<<3;nXWC?&^@'#nZN2a#S7U*>q7?0-mjrunK]!WXYT!$)._=U752GmGAZSIUYlc!p_^c1.u,oF]uN1B[.H2d!!*'!!<<3O!!)Pa)ZgVrlCd[P^Gcb[Nn8g`"onZ(!<<-#1Yi$R!!!*S<I!)!V`0ED1S!V6?Y"#9sA!!"rOs8N0UJ.Vb]"98FiR[KV4RK,k"*bJsm!3d"l!]0rY+VFc4!!iZb"$-D^#64c(5QLfc!!N?.!!3H2f^W>RL$4VS!*'#CD.ciKP[hT2!!rlAo\p&T(oU=#!"&],0`V4S!<[!@2\5rhjVBjV('Xa=s8N0\!!"&?(gm=D44=00!G*p7&!!!*`EeZ@8 %:"$utfE*ic1!!(7M4e](k!!!*%!3#Sjs"t2f!2qm]4TGTb%SQj,@m!Fl3s#?a+iC]J8ODZFt]!s;I&rr<%/"+1pg8HN`L7fYgT!!!-%#67IW#"8`6!-HMr2ZPc>"'%tp0`Yhg"#g2[VZQr"56(`b":?g_6NDBr!cC"&tPGs"(_K3>!36b"_e06!f7.e70EVjrrN0%0`acY#$NDS54&;!1($eoK`GZa!WX>G!/1E,!!#@g?kOrir`OpT70#:N"op1Y!CLir!rrQ\14=p+gp,*2[g!!!!:!!#?"0PW^K!<>Oh5la1N0S)2j!'pV"b5_MN!!#@e5la1N5la1NW<4dS#QOin!XJc+70*AE5l`S]!!#\Y9)q6X@0/q!5la1N!+-")"\Sh]!!%:PT#i=* %:!'p``!(R,W!!!!aFp^;@!!*'B!&Xa1!&c\76NC-e"9WLJ#&kt;RP6j($31)+rr<%)"ZiL\kk5!!XT6LSM?X%h!)bRhB/kQc4D@-%F?'=iCi;:Q!s!!@3q!GhjH!s*4@"&8qb!UDeX,Z>Tb!,qu>dPj\M %:0b=G-i_VJ#;$o/\!<<$'!!b&/)m0\O!b;92/aNQV"opAX*DZbh!!#LY9ca97!BgNH&j.'D!1AFh<#6q`AH2c2s$g^=ARPW?@VfTU,9m0g#QOm";fm%oDG^CH5*Q'K@fQKB0`a[V@rq]L;ZHk+!C/mM!#.Ts9PJQi!!..I0`_7SLB&%h#Ye'&D-FP1D/[,43#Ac(#DlPJl010YpE,Tf3FCb^Y:gnHZ!!!$T!A?r`Dfp"!9`kF31BB6uCh[j+!!"6%>LBUE %:$oJ&:7VQKh#'FrMX$?hI!B!Yr@;Gp/!G4Fp3&!Su2-0oi#lk!I/jf_Q!!,(\3'dg:EcQ)B>lePY6UNs;3WV*94:#@N#&\';*)QiNAi'NR!?OpKDF"Rt&-+s,!BUlZ!?ORDDe!P_#XE!6Ci"VU3s%_L*`-lq@qB1<#sA8U!CB*_k$`=F@lGSi$!.X*Dui<0?NXnP1)r:U:`gYX6<$,o9`m6RG8rI@;#sK^!Din]!)`efNY=)Jn:lrq %:E(hu3.O?B)!)inr7i%6g0EG,R+9>A=FEq\6JH8"^1'(AU/4XggLhUC2F#FGJF!WdS@q0RC-3-A5?oh"U+TMKC=TKRC@:Cnj0b?>GF#skB*")`Ijr!EN8%;F`ar!0`b30=YU(c2D@K&VZo>F!,[4J4>6$G1)Iib'!$YJn/itOaAj'L"!A6eA2'+AK/0ji73<;DG5la1N,;T?\2Ln'n5l`o.!'gQM!<<-c!C-ZN!C-ZN!C-ZN!C/FA_#R+s5l_l*5lhu,rrNBn*cfKQ %:~> %%EndAGDEmbeddedDoc %%BeginResource: procset Altsys_header 4 0 userdict begin /AltsysDict 300 dict def end AltsysDict begin /bdf{bind def}bind def /xdf{exch def}bdf /defed{where{pop true}{false}ifelse}bdf /ndf{1 index where{pop pop pop}{dup xcheck{bind}if def}ifelse}bdf /d{setdash}bdf /h{closepath}bdf /H{}bdf /J{setlinecap}bdf /j{setlinejoin}bdf /M{setmiterlimit}bdf /n{newpath}bdf /N{newpath}bdf /q{gsave}bdf /Q{grestore}bdf /w{setlinewidth}bdf /Xic{matrix invertmatrix concat}bdf /Xq{matrix currentmatrix mark}bdf /XQ{cleartomark setmatrix}bdf /sepdef{ dup where not { AltsysSepDict } if 3 1 roll exch put }bdf /st{settransfer}bdf /colorimage defed /_rci xdf /cntr 0 def /readbinarystring{ /cntr 0 def 2 copy readstring { { dup (\034) search { length exch pop exch dup length 0 ne { dup dup 0 get 32 sub 0 exch put /cntr cntr 1 add def } { pop 1 string dup 0 6 index read pop 32 sub put }ifelse 3 copy putinterval pop 1 add 1 index length 1 sub 1 index sub dup 0 le {pop pop exit}if getinterval } { pop exit } ifelse } loop }if cntr 0 gt { pop 2 copy dup length cntr sub cntr getinterval readbinarystring } if pop exch pop } bdf /_NXLevel2 defed { _NXLevel2 not { /colorimage where { userdict eq { /_rci false def } if } if } if } if /md defed{ md type /dicttype eq { /colorimage where { md eq { /_rci false def }if }if /settransfer where { md eq { /st systemdict /settransfer get def }if }if }if }if /setstrokeadjust defed { true setstrokeadjust /C{curveto}bdf /L{lineto}bdf /m{moveto}bdf } { /dr{transform .25 sub round .25 add exch .25 sub round .25 add exch itransform}bdf /C{dr curveto}bdf /L{dr lineto}bdf /m{dr moveto}bdf /setstrokeadjust{pop}bdf }ifelse /privrectpath { 4 -2 roll m dtransform round exch round exch idtransform 2 copy 0 lt exch 0 lt xor {dup 0 exch rlineto exch 0 rlineto neg 0 exch rlineto} {exch dup 0 rlineto exch 0 exch rlineto neg 0 rlineto} ifelse closepath }bdf /rectclip{newpath privrectpath clip newpath}def /rectfill{gsave newpath privrectpath fill grestore}def /rectstroke{gsave newpath privrectpath stroke grestore}def /_fonthacksave false def /currentpacking defed { /_bfh {/_fonthacksave currentpacking def false setpacking} bdf /_efh {_fonthacksave setpacking} bdf } { /_bfh {} bdf /_efh {} bdf }ifelse /packedarray{array astore readonly}ndf /` { false setoverprint /-save0- save def 5 index concat pop storerect left bottom width height rectclip pop /MMdict_count countdictstack def /MMop_count count 1 sub def userdict begin /showpage {} def 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit [] 0 setdash newpath } bdf /currentpacking defed{true setpacking}if /min{2 copy gt{exch}if pop}bdf /max{2 copy lt{exch}if pop}bdf /xformfont { currentfont exch makefont setfont } bdf /fhnumcolors 1 statusdict begin /processcolors defed { pop processcolors } { /deviceinfo defed { deviceinfo /Colors known { pop deviceinfo /Colors get } if } if } ifelse end def /printerRes gsave matrix defaultmatrix setmatrix 72 72 dtransform abs exch abs max grestore def /graycalcs [ {Angle Frequency} {GrayAngle GrayFrequency} {0 Width Height matrix defaultmatrix idtransform dup mul exch dup mul add sqrt 72 exch div} {0 GrayWidth GrayHeight matrix defaultmatrix idtransform dup mul exch dup mul add sqrt 72 exch div} ] def /calcgraysteps { forcemaxsteps { maxsteps } { /currenthalftone defed {currenthalftone /dicttype eq}{false}ifelse { currenthalftone begin HalftoneType 4 le {graycalcs HalftoneType 1 sub get exec} { HalftoneType 5 eq { Default begin {graycalcs HalftoneType 1 sub get exec} end } {0 60} ifelse } ifelse end } { currentscreen pop exch } ifelse printerRes 300 max exch div exch 2 copy sin mul round dup mul 3 1 roll cos mul round dup mul add 1 add dup maxsteps gt {pop maxsteps} if dup minsteps lt {pop minsteps} if } ifelse } bdf /nextrelease defed { /languagelevel defed not { /framebuffer defed { 0 40 string framebuffer 9 1 roll 8 {pop} repeat dup 516 eq exch 520 eq or { /fhnumcolors 3 def /currentscreen {60 0 {pop pop 1}}bdf /calcgraysteps {maxsteps} bdf }if }if }if }if fhnumcolors 1 ne { /calcgraysteps {maxsteps} bdf } if /currentpagedevice defed { currentpagedevice /PreRenderingEnhance known { currentpagedevice /PreRenderingEnhance get { /calcgraysteps { forcemaxsteps {maxsteps} {256 maxsteps min} ifelse } def } if } if } if /gradfrequency 144 def printerRes 1000 lt { /gradfrequency 72 def } if /adjnumsteps { dup dtransform abs exch abs max printerRes div gradfrequency mul round 5 max min }bdf /goodsep { spots exch get 4 get dup sepname eq exch (_vc_Registration) eq or }bdf /BeginGradation defed {/bb{BeginGradation}bdf} {/bb{}bdf} ifelse /EndGradation defed {/eb{EndGradation}bdf} {/eb{}bdf} ifelse /bottom -0 def /delta -0 def /frac -0 def /height -0 def /left -0 def /numsteps1 -0 def /radius -0 def /right -0 def /top -0 def /width -0 def /xt -0 def /yt -0 def /df currentflat def /tempstr 1 string def /clipflatness currentflat def /inverted? 0 currenttransfer exec .5 ge def /tc1 [0 0 0 1] def /tc2 [0 0 0 1] def /storerect{/top xdf /right xdf /bottom xdf /left xdf /width right left sub def /height top bottom sub def}bdf /concatprocs{ systemdict /packedarray known {dup type /packedarraytype eq 2 index type /packedarraytype eq or}{false}ifelse { /proc2 exch cvlit def /proc1 exch cvlit def proc1 aload pop proc2 aload pop proc1 length proc2 length add packedarray cvx } { /proc2 exch cvlit def /proc1 exch cvlit def /newproc proc1 length proc2 length add array def newproc 0 proc1 putinterval newproc proc1 length proc2 putinterval newproc cvx }ifelse }bdf /i{dup 0 eq {pop df dup} {dup} ifelse /clipflatness xdf setflat }bdf version cvr 38.0 le {/setrgbcolor{ currenttransfer exec 3 1 roll currenttransfer exec 3 1 roll currenttransfer exec 3 1 roll setrgbcolor}bdf}if /vms {/vmsv save def} bdf /vmr {vmsv restore} bdf /vmrs{vmsv restore /vmsv save def}bdf /eomode{ {/filler /eofill load def /clipper /eoclip load def} {/filler /fill load def /clipper /clip load def} ifelse }bdf /normtaper{}bdf /logtaper{9 mul 1 add log}bdf /CD{ /NF exch def { exch dup /FID ne 1 index/UniqueID ne and {exch NF 3 1 roll put} {pop pop} ifelse }forall NF }bdf /MN{ 1 index length /Len exch def dup length Len add string dup Len 4 -1 roll putinterval dup 0 4 -1 roll putinterval }bdf /RC{4 -1 roll /ourvec xdf 256 string cvs(|______)anchorsearch {1 index MN cvn/NewN exch def cvn findfont dup maxlength dict CD dup/FontName NewN put dup /Encoding ourvec put NewN exch definefont pop}{pop}ifelse}bdf /RF{ dup FontDirectory exch known {pop 3 -1 roll pop} {RC} ifelse }bdf /FF{dup 256 string cvs(|______)exch MN cvn dup FontDirectory exch known {exch pop findfont 3 -1 roll pop} {pop dup findfont dup maxlength dict CD dup dup /Encoding exch /Encoding get 256 array copy 7 -1 roll {3 -1 roll dup 4 -2 roll put}forall put definefont} ifelse}bdf /RCJ{4 -1 roll /ourvec xdf 256 string cvs (|______) anchorsearch {pop cvn dup FDFJ exch 1 index eq { _bfh findfont _efh dup maxlength dict CD dup /FontName 3 index put dup /Encoding ourvec put 1 index exch definefont pop } {exch pop} ifelse } {pop} ifelse }bdf /RFJ{ dup FontDirectory exch known {pop 3 -1 roll pop} {RCJ} ifelse }bdf /hasfont { /resourcestatus where { pop /Font resourcestatus { pop pop true } { false } ifelse } { dup FontDirectory exch known {pop true} { 256 string cvs (fonts/) exch MN status {pop pop pop pop true} {false} ifelse } ifelse } ifelse }bdf /FDFJ { dup hasfont not { pop /Ryumin-Light-83pv-RKSJ-H hasfont { /Ryumin-Light-83pv-RKSJ-H } { /Courier } ifelse } if }bdf /FFJ{ _bfh dup 256 string cvs (|______)exch MN cvn dup FontDirectory exch known { exch pop findfont 3 -1 roll pop } { pop FDFJ dup findfont dup maxlength dict CD dup dup /Encoding exch /Encoding get 256 array copy 7 -1 roll { 3 -1 roll dup 4 -2 roll put }forall put definefont } ifelse _efh }bdf /GS { dup hasfont { FFJ curtextmtx makefont setfont exch 5 1 roll ts pop } { pop pop ts } ifelse } bdf /RCK{4 -1 roll /ourvec xdf 256 string cvs (|______) anchorsearch {pop cvn dup FDFK exch 1 index eq { _bfh findfont _efh dup maxlength dict CD dup /FontName 3 index put dup /Encoding ourvec put 1 index exch definefont pop } {exch pop} ifelse } {pop} ifelse }bdf /RFK{ dup FontDirectory exch known {pop 3 -1 roll pop} {RCK} ifelse }bdf /hasfont { /resourcestatus where { pop /Font resourcestatus { pop pop true } { false } ifelse } { dup FontDirectory exch known {pop true} { 256 string cvs (fonts/) exch MN status {pop pop pop pop true} {false} ifelse } ifelse } ifelse }bdf /FDFK { dup hasfont not { pop /JCsm hasfont { /JCsm } { /Courier } ifelse } if }bdf /FFK{ _bfh dup 256 string cvs (|______)exch MN cvn dup FontDirectory exch known { exch pop findfont 3 -1 roll pop } { pop FDFK dup findfont dup maxlength dict CD dup dup /Encoding exch /Encoding get 256 array copy 7 -1 roll { 3 -1 roll dup 4 -2 roll put }forall put definefont } ifelse _efh }bdf /RCTC{4 -1 roll /ourvec xdf 256 string cvs (|______) anchorsearch {pop cvn dup FDFTC exch 1 index eq { _bfh findfont _efh dup maxlength dict CD dup /FontName 3 index put dup /Encoding ourvec put 1 index exch definefont pop } {exch pop} ifelse } {pop} ifelse }bdf /RFTC{ dup FontDirectory exch known {pop 3 -1 roll pop} {RCTC} ifelse }bdf /FDFTC { dup hasfont not { pop /DFMing-Lt-HK-BF hasfont { /DFMing-Lt-HK-BF } { /Courier } ifelse } if }bdf /FFTC{ _bfh dup 256 string cvs (|______)exch MN cvn dup FontDirectory exch known { exch pop findfont 3 -1 roll pop } { pop FDFTC dup findfont dup maxlength dict CD dup dup /Encoding exch /Encoding get 256 array copy 7 -1 roll { 3 -1 roll dup 4 -2 roll put }forall put definefont } ifelse _efh }bdf /fps{ currentflat exch dup 0 le{pop 1}if { dup setflat 3 index stopped {1.3 mul dup 3 index gt{pop setflat pop pop stop}if} {exit} ifelse }loop pop setflat pop pop }bdf /fp{100 currentflat fps}bdf /clipper{clip}bdf /W{/clipper load 100 clipflatness dup setflat fps}bdf userdict begin /BDFontDict 29 dict def end BDFontDict begin /bu{}def /bn{}def /setTxMode{av 70 ge{pop}if pop}def /gm{m}def /show{pop}def /gr{pop}def /fnt{pop pop pop}def /fs{pop}def /fz{pop}def /lin{pop pop}def /:M {pop pop} def /sf {pop} def /S {pop} def /@b {pop pop pop pop pop pop pop pop} def /_bdsave /save load def /_bdrestore /restore load def /save { dup /fontsave eq {null} {_bdsave} ifelse } def /restore { dup null eq { pop } { _bdrestore } ifelse } def /fontsave null def end /MacVec 256 array def MacVec 0 /Helvetica findfont /Encoding get 0 128 getinterval putinterval MacVec 127 /DEL put MacVec 16#27 /quotesingle put MacVec 16#60 /grave put /NUL/SOH/STX/ETX/EOT/ENQ/ACK/BEL/BS/HT/LF/VT/FF/CR/SO/SI /DLE/DC1/DC2/DC3/DC4/NAK/SYN/ETB/CAN/EM/SUB/ESC/FS/GS/RS/US MacVec 0 32 getinterval astore pop /Adieresis/Aring/Ccedilla/Eacute/Ntilde/Odieresis/Udieresis/aacute /agrave/acircumflex/adieresis/atilde/aring/ccedilla/eacute/egrave /ecircumflex/edieresis/iacute/igrave/icircumflex/idieresis/ntilde/oacute /ograve/ocircumflex/odieresis/otilde/uacute/ugrave/ucircumflex/udieresis /dagger/degree/cent/sterling/section/bullet/paragraph/germandbls /registered/copyright/trademark/acute/dieresis/notequal/AE/Oslash /infinity/plusminus/lessequal/greaterequal/yen/mu/partialdiff/summation /product/pi/integral/ordfeminine/ordmasculine/Omega/ae/oslash /questiondown/exclamdown/logicalnot/radical/florin/approxequal/Delta/guillemotleft /guillemotright/ellipsis/nbspace/Agrave/Atilde/Otilde/OE/oe /endash/emdash/quotedblleft/quotedblright/quoteleft/quoteright/divide/lozenge /ydieresis/Ydieresis/fraction/currency/guilsinglleft/guilsinglright/fi/fl /daggerdbl/periodcentered/quotesinglbase/quotedblbase /perthousand/Acircumflex/Ecircumflex/Aacute /Edieresis/Egrave/Iacute/Icircumflex/Idieresis/Igrave/Oacute/Ocircumflex /apple/Ograve/Uacute/Ucircumflex/Ugrave/dotlessi/circumflex/tilde /macron/breve/dotaccent/ring/cedilla/hungarumlaut/ogonek/caron MacVec 128 128 getinterval astore pop /findheaderfont { /Helvetica findfont } def end %. AltsysDict %%EndResource %%EndProlog %%BeginSetup AltsysDict begin _bfh _efh end %. AltsysDict %%EndSetup AltsysDict begin /onlyk4{false}ndf /ccmyk{dup 5 -1 roll sub 0 max exch}ndf /cmyk2gray{ 4 -1 roll 0.3 mul 4 -1 roll 0.59 mul 4 -1 roll 0.11 mul add add add 1 min neg 1 add }bdf /setcmykcolor{1 exch sub ccmyk ccmyk ccmyk pop setrgbcolor}ndf /maxcolor { max max max } ndf /maxspot { pop } ndf /setcmykcoloroverprint{4{dup -1 eq{pop 0}if 4 1 roll}repeat setcmykcolor}ndf /findcmykcustomcolor{5 packedarray}ndf /setcustomcolor{exch aload pop pop 4{4 index mul 4 1 roll}repeat setcmykcolor pop}ndf /setseparationgray{setgray}ndf /setoverprint{pop}ndf /currentoverprint false ndf /cmykbufs2gray{ 0 1 2 index length 1 sub { 4 index 1 index get 0.3 mul 4 index 2 index get 0.59 mul 4 index 3 index get 0.11 mul 4 index 4 index get add add add cvi 255 min 255 exch sub 2 index 3 1 roll put }for 4 1 roll pop pop pop }bdf /colorimage{ pop pop [ 5 -1 roll/exec cvx 6 -1 roll/exec cvx 7 -1 roll/exec cvx 8 -1 roll/exec cvx /cmykbufs2gray cvx ]cvx image } %. version 47.1 on Linotronic of Postscript defines colorimage incorrectly (rgb model only) version cvr 47.1 le statusdict /product get (Lino) anchorsearch{pop pop true}{pop false}ifelse and{userdict begin bdf end}{ndf}ifelse fhnumcolors 1 ne {/yt save def} if /customcolorimage{ aload pop (_vc_Registration) eq { pop pop pop pop separationimage } { /ik xdf /iy xdf /im xdf /ic xdf ic im iy ik cmyk2gray /xt xdf currenttransfer {dup 1.0 exch sub xt mul add}concatprocs st image } ifelse }ndf fhnumcolors 1 ne {yt restore} if fhnumcolors 3 ne {/yt save def} if /customcolorimage{ aload pop (_vc_Registration) eq { pop pop pop pop separationimage } { /ik xdf /iy xdf /im xdf /ic xdf 1.0 dup ic ik add min sub 1.0 dup im ik add min sub 1.0 dup iy ik add min sub /ic xdf /iy xdf /im xdf currentcolortransfer 4 1 roll {dup 1.0 exch sub ic mul add}concatprocs 4 1 roll {dup 1.0 exch sub iy mul add}concatprocs 4 1 roll {dup 1.0 exch sub im mul add}concatprocs 4 1 roll setcolortransfer {/dummy xdf dummy}concatprocs{dummy}{dummy}true 3 colorimage } ifelse }ndf fhnumcolors 3 ne {yt restore} if fhnumcolors 4 ne {/yt save def} if /customcolorimage{ aload pop (_vc_Registration) eq { pop pop pop pop separationimage } { /ik xdf /iy xdf /im xdf /ic xdf currentcolortransfer {1.0 exch sub ik mul ik sub 1 add}concatprocs 4 1 roll {1.0 exch sub iy mul iy sub 1 add}concatprocs 4 1 roll {1.0 exch sub im mul im sub 1 add}concatprocs 4 1 roll {1.0 exch sub ic mul ic sub 1 add}concatprocs 4 1 roll setcolortransfer {/dummy xdf dummy}concatprocs{dummy}{dummy}{dummy} true 4 colorimage } ifelse }ndf fhnumcolors 4 ne {yt restore} if /separationimage{image}ndf /spotascmyk false ndf /newcmykcustomcolor{6 packedarray}ndf /inkoverprint false ndf /setinkoverprint{pop}ndf /setspotcolor { spots exch get dup 4 get (_vc_Registration) eq {pop 1 exch sub setseparationgray} {0 5 getinterval exch setcustomcolor} ifelse }ndf /currentcolortransfer{currenttransfer dup dup dup}ndf /setcolortransfer{st pop pop pop}ndf /fas{}ndf /sas{}ndf /fhsetspreadsize{pop}ndf /filler{fill}bdf /F{gsave {filler}fp grestore}bdf /f{closepath F}bdf /S{gsave {stroke}fp grestore}bdf /s{closepath S}bdf userdict /islevel2 systemdict /languagelevel known dup { pop systemdict /languagelevel get 2 ge } if put islevel2 not { /currentcmykcolor { 0 0 0 1 currentgray sub } ndf } if /tc { gsave setcmykcolor currentcmykcolor grestore } bind def /testCMYKColorThrough { tc add add add 0 ne } bind def /fhiscomposite where not { userdict /fhiscomposite islevel2 { gsave 1 1 1 1 setcmykcolor currentcmykcolor grestore add add add 4 eq } { 1 0 0 0 testCMYKColorThrough 0 1 0 0 testCMYKColorThrough 0 0 1 0 testCMYKColorThrough 0 0 0 1 testCMYKColorThrough and and and } ifelse put } { pop } ifelse /bc4 [0 0 0 0] def /_lfp4 { 1 pop /yt xdf /xt xdf /ang xdf storerect /taperfcn xdf /k2 xdf /y2 xdf /m2 xdf /c2 xdf /k1 xdf /y1 xdf /m1 xdf /c1 xdf c1 c2 sub abs m1 m2 sub abs y1 y2 sub abs k1 k2 sub abs maxcolor calcgraysteps mul abs round height abs adjnumsteps dup 1 lt {pop 1} if 1 sub /numsteps1 xdf currentflat mark currentflat clipflatness /delta top bottom sub numsteps1 1 add div def /right right left sub def /botsv top delta sub def { { W xt yt translate ang rotate xt neg yt neg translate dup setflat /bottom botsv def 0 1 numsteps1 { numsteps1 dup 0 eq {pop pop 0.5} {div} ifelse taperfcn /frac xdf bc4 0 c2 c1 sub frac mul c1 add put bc4 1 m2 m1 sub frac mul m1 add put bc4 2 y2 y1 sub frac mul y1 add put bc4 3 k2 k1 sub frac mul k1 add put bc4 vc 1 index setflat { mark {newpath left bottom right delta rectfill}stopped {cleartomark exch 1.3 mul dup setflat exch 2 copy gt{stop}if} {cleartomark exit}ifelse }loop /bottom bottom delta sub def }for } gsave stopped grestore {exch pop 2 index exch 1.3 mul dup 100 gt{cleartomark setflat stop}if} {exit}ifelse }loop cleartomark setflat }bdf /bcs [0 0] def /_lfs4 { /yt xdf /xt xdf /ang xdf storerect /taperfcn xdf /tint2 xdf /tint1 xdf bcs exch 1 exch put tint1 tint2 sub abs bcs 1 get maxspot calcgraysteps mul abs round height abs adjnumsteps dup 2 lt {pop 2} if 1 sub /numsteps1 xdf currentflat mark currentflat clipflatness /delta top bottom sub numsteps1 1 add div def /right right left sub def /botsv top delta sub def { { W xt yt translate ang rotate xt neg yt neg translate dup setflat /bottom botsv def 0 1 numsteps1 { numsteps1 div taperfcn /frac xdf bcs 0 1.0 tint2 tint1 sub frac mul tint1 add sub put bcs vc 1 index setflat { mark {newpath left bottom right delta rectfill}stopped {cleartomark exch 1.3 mul dup setflat exch 2 copy gt{stop}if} {cleartomark exit}ifelse }loop /bottom bottom delta sub def }for } gsave stopped grestore {exch pop 2 index exch 1.3 mul dup 100 gt{cleartomark setflat stop}if} {exit}ifelse }loop cleartomark setflat }bdf /_rfs6 { /tint2 xdf /tint1 xdf bcs exch 1 exch put /inrad xdf /radius xdf /yt xdf /xt xdf tint1 tint2 sub abs bcs 1 get maxspot calcgraysteps mul abs round radius inrad sub abs adjnumsteps dup 1 lt {pop 1} if 1 sub /numsteps1 xdf radius inrad sub numsteps1 dup 0 eq {pop} {div} ifelse 2 div /halfstep xdf currentflat mark currentflat clipflatness { { dup setflat W 0 1 numsteps1 { dup /radindex xdf numsteps1 dup 0 eq {pop pop 0.5} {div} ifelse /frac xdf bcs 0 tint2 tint1 sub frac mul tint1 add put bcs vc 1 index setflat { newpath mark xt yt radius inrad sub 1 frac sub mul halfstep add inrad add 0 360 { arc radindex numsteps1 ne inrad 0 gt or { xt yt numsteps1 0 eq { inrad } { radindex 1 add numsteps1 div 1 exch sub radius inrad sub mul halfstep add inrad add }ifelse dup xt add yt moveto 360 0 arcn } if fill }stopped {cleartomark exch 1.3 mul dup setflat exch 2 copy gt{stop}if} {cleartomark exit}ifelse }loop }for } gsave stopped grestore {exch pop 2 index exch 1.3 mul dup 100 gt{cleartomark setflat stop}if} {exit}ifelse }loop cleartomark setflat }bdf /_rfp6 { 1 pop /k2 xdf /y2 xdf /m2 xdf /c2 xdf /k1 xdf /y1 xdf /m1 xdf /c1 xdf /inrad xdf /radius xdf /yt xdf /xt xdf c1 c2 sub abs m1 m2 sub abs y1 y2 sub abs k1 k2 sub abs maxcolor calcgraysteps mul abs round radius inrad sub abs adjnumsteps dup 1 lt {pop 1} if 1 sub /numsteps1 xdf radius inrad sub numsteps1 dup 0 eq {pop} {div} ifelse 2 div /halfstep xdf currentflat mark currentflat clipflatness { { dup setflat W 0 1 numsteps1 { dup /radindex xdf numsteps1 dup 0 eq {pop pop 0.5} {div} ifelse /frac xdf bc4 0 c2 c1 sub frac mul c1 add put bc4 1 m2 m1 sub frac mul m1 add put bc4 2 y2 y1 sub frac mul y1 add put bc4 3 k2 k1 sub frac mul k1 add put bc4 vc 1 index setflat { newpath mark xt yt radius inrad sub 1 frac sub mul halfstep add inrad add 0 360 { arc radindex numsteps1 ne inrad 0 gt or { xt yt numsteps1 0 eq { inrad } { radindex 1 add numsteps1 div 1 exch sub radius inrad sub mul halfstep add inrad add }ifelse dup xt add yt moveto 360 0 arcn } if fill }stopped {cleartomark exch 1.3 mul dup setflat exch 2 copy gt{stop}if} {cleartomark exit}ifelse }loop }for } gsave stopped grestore {exch pop 2 index exch 1.3 mul dup 100 gt{cleartomark setflat stop}if} {exit}ifelse }loop cleartomark setflat }bdf /lfp4{_lfp4}ndf /lfs4{_lfs4}ndf /rfs6{_rfs6}ndf /rfp6{_rfp6}ndf /cvc [0 0 0 1] def /vc{ AltsysDict /cvc 2 index put aload length dup 4 eq {pop dup -1 eq{pop setrgbcolor}{setcmykcolor}ifelse} {6 eq {sethexcolor} {setspotcolor} ifelse } ifelse }bdf 0 setseparationgray /imgr {1692 1602 1836 1710 } def /bleed 0 def /clpr {1692 1602 1836 1710 } def /xs 1 def /ys 1 def /botx 0 def /overlap 0 def /wdist 18 def 0 2 mul fhsetspreadsize 0 0 ne {/df 0 def /clipflatness 0 def} if /maxsteps 256 def /forcemaxsteps false def /minsteps 0 def userdict begin /AGDOrigMtx matrix currentmatrix def end vms -1695 -1615 translate /currentpacking defed{false setpacking}if /spots[ 1 0 0 0 (Process Cyan) false newcmykcustomcolor 0 1 0 0 (Process Magenta) false newcmykcustomcolor 0 0 1 0 (Process Yellow) false newcmykcustomcolor 0 0 0 1 (Process Black) false newcmykcustomcolor ]def n [] 0 d 3.863708 M 1 w 0 j 0 J false setoverprint 0 i false eomode [0 0 0 1] vc vms 1752.9429 1669.9084 m 1752.9429 1684.3897 1776.2186 1696.7394 1808.9566 1701.5996 C 1808.9566 1703.3362 L 1804.2872 1703.6411 1799.507 1703.8188 1794.6159 1703.8188 C 1746.6261 1703.8188 1707.721 1688.6367 1707.721 1669.9084 C 1707.721 1651.1809 1746.6261 1635.9988 1794.6159 1635.9988 C 1799.507 1635.9988 1804.2872 1636.1764 1808.9566 1636.4813 C 1808.9566 1638.2176 L 1776.2186 1643.0774 1752.9429 1655.4274 1752.9429 1669.9084 C [0 0 0 0.4] vc f n 1718.1765 1669.8924 m 1718.1765 1677.9268 1724.6895 1684.4398 1732.724 1684.4398 C 1740.7585 1684.4398 1747.2715 1677.9268 1747.2715 1669.8924 C 1747.2715 1661.858 1740.7585 1655.345 1732.724 1655.345 C 1724.6895 1655.345 1718.1765 1661.858 1718.1765 1669.8924 C h q W n 1751.9525 1677.3259 m 1740.1298 1650.7269 L 1713.5361 1662.5496 L 1725.3587 1689.1486 L 1751.9525 1677.3259 L [0 0 0 1] vc f n 1746.231 1694.1008 m 1755.8637 1689.8184 1760.201 1678.5366 1755.9185 1668.9019 C 1751.6361 1659.2672 1740.3559 1654.9284 1730.7232 1659.2108 C 1721.0904 1663.4932 1716.7532 1674.775 1721.0356 1684.4097 C 1725.318 1694.0444 1736.5982 1698.3832 1746.231 1694.1008 C [0 0 0 0.975] vc f n 1746.0321 1693.6535 m 1755.4179 1689.4809 1759.6439 1678.4884 1755.4713 1669.1007 C 1751.2987 1659.7131 1740.3077 1655.4855 1730.922 1659.6581 C 1721.5362 1663.8307 1717.3102 1674.8232 1721.4828 1684.2109 C 1725.6554 1693.5985 1736.6464 1697.8261 1746.0321 1693.6535 C [0 0 0 0.95] vc f n 1745.8333 1693.2062 m 1754.9721 1689.1434 1759.0869 1678.4401 1755.0241 1669.2995 C 1750.9613 1660.1589 1740.2596 1656.0426 1731.1208 1660.1054 C 1721.982 1664.1682 1717.8672 1674.8714 1721.93 1684.0121 C 1725.9928 1693.1527 1736.6945 1697.269 1745.8333 1693.2062 C [0 0 0 0.925] vc f n 1745.6345 1692.7589 m 1754.5263 1688.8059 1758.5299 1678.3919 1754.5769 1669.4984 C 1750.6239 1660.6048 1740.2114 1656.5997 1731.3196 1660.5527 C 1722.4278 1664.5057 1718.4243 1674.9196 1722.3772 1683.8132 C 1726.3302 1692.7068 1736.7427 1696.7119 1745.6345 1692.7589 C [0 0 0 0.9] vc f n 1745.4357 1692.3116 m 1754.0805 1688.4684 1757.9729 1678.3437 1754.1297 1669.6972 C 1750.2865 1661.0506 1740.1632 1657.1568 1731.5184 1661 C 1722.8736 1664.8432 1718.9813 1674.9679 1722.8245 1683.6144 C 1726.6676 1692.261 1736.7909 1696.1548 1745.4357 1692.3116 C [0 0 0 0.875] vc f n 1745.2369 1691.8643 m 1753.6347 1688.1309 1757.4159 1678.2955 1753.6825 1669.896 C 1749.9491 1661.4965 1740.115 1657.7139 1731.7172 1661.4473 C 1723.3194 1665.1807 1719.5383 1675.0161 1723.2717 1683.4156 C 1727.0051 1691.8151 1736.8391 1695.5977 1745.2369 1691.8643 C [0 0 0 0.85] vc f n 1745.0381 1691.417 m 1753.1889 1687.7934 1756.8589 1678.2472 1753.2353 1670.0948 C 1749.6117 1661.9423 1740.0669 1658.271 1731.916 1661.8946 C 1723.7652 1665.5182 1720.0953 1675.0643 1723.7189 1683.2168 C 1727.3425 1691.3693 1736.8873 1695.0406 1745.0381 1691.417 C [0 0 0 0.825] vc f n 1744.8392 1690.9697 m 1752.7431 1687.4559 1756.3019 1678.199 1752.7881 1670.2936 C 1749.2743 1662.3882 1740.0187 1658.8281 1732.1149 1662.3419 C 1724.211 1665.8557 1720.6523 1675.1125 1724.1661 1683.018 C 1727.6799 1690.9234 1736.9354 1694.4835 1744.8392 1690.9697 C [0 0 0 0.8] vc f n 1744.6404 1690.5224 m 1752.2973 1687.1184 1755.7449 1678.1508 1752.3409 1670.4924 C 1748.9369 1662.834 1739.9705 1659.3852 1732.3137 1662.7892 C 1724.6568 1666.1932 1721.2093 1675.1608 1724.6133 1682.8192 C 1728.0173 1690.4776 1736.9836 1693.9264 1744.6404 1690.5224 C [0 0 0 0.775] vc f n 1744.4416 1690.0751 m 1751.8515 1686.7809 1755.1878 1678.1026 1751.8937 1670.6912 C 1748.5995 1663.2799 1739.9223 1659.9424 1732.5125 1663.2365 C 1725.1026 1666.5307 1721.7663 1675.209 1725.0605 1682.6204 C 1728.3547 1690.0317 1737.0318 1693.3693 1744.4416 1690.0751 C [0 0 0 0.75] vc f n 1744.2428 1689.6278 m 1751.4057 1686.4434 1754.6308 1678.0544 1751.4465 1670.89 C 1748.2621 1663.7257 1739.8742 1660.4995 1732.7113 1663.6838 C 1725.5484 1666.8682 1722.3233 1675.2572 1725.5077 1682.4215 C 1728.6921 1689.5858 1737.08 1692.8122 1744.2428 1689.6278 C [0 0 0 0.725] vc f n 1744.044 1689.1805 m 1750.9599 1686.1059 1754.0738 1678.0061 1750.9993 1671.0889 C 1747.9247 1664.1716 1739.826 1661.0566 1732.9101 1664.1311 C 1725.9943 1667.2057 1722.8804 1675.3055 1725.9549 1682.2227 C 1729.0295 1689.14 1737.1281 1692.2551 1744.044 1689.1805 C [0 0 0 0.7] vc f n 1743.8452 1688.7332 m 1750.5141 1685.7684 1753.5168 1677.9579 1750.552 1671.2877 C 1747.5873 1664.6174 1739.7778 1661.6136 1733.1089 1664.5784 C 1726.44 1667.5432 1723.4374 1675.3537 1726.4021 1682.0239 C 1729.3669 1688.6942 1737.1763 1691.698 1743.8452 1688.7332 C [0 0 0 0.675] vc f n 1743.6464 1688.2859 m 1750.0683 1685.4309 1752.9598 1677.9097 1750.1048 1671.4865 C 1747.2499 1665.0633 1739.7296 1662.1708 1733.3078 1665.0257 C 1726.8858 1667.8807 1723.9944 1675.4019 1726.8493 1681.8251 C 1729.7043 1688.2483 1737.2245 1691.1409 1743.6464 1688.2859 C [0 0 0 0.65] vc f n 1743.4476 1687.8386 m 1749.6225 1685.0934 1752.4028 1677.8615 1749.6576 1671.6853 C 1746.9125 1665.5092 1739.6815 1662.7279 1733.5066 1665.473 C 1727.3317 1668.2182 1724.5514 1675.4501 1727.2966 1681.6263 C 1730.0417 1687.8024 1737.2726 1690.5838 1743.4476 1687.8386 C [0 0 0 0.625] vc f n 1743.2487 1687.3913 m 1749.1766 1684.756 1751.8458 1677.8132 1749.2104 1671.8841 C 1746.5751 1665.955 1739.6333 1663.285 1733.7054 1665.9203 C 1727.7775 1668.5557 1725.1084 1675.4984 1727.7438 1681.4275 C 1730.3791 1687.3566 1737.3208 1690.0266 1743.2487 1687.3913 C [0 0 0 0.6] vc f n 1743.0499 1686.944 m 1748.7309 1684.4184 1751.2888 1677.765 1748.7632 1672.0829 C 1746.2376 1666.4008 1739.5851 1663.8421 1733.9042 1666.3676 C 1728.2233 1668.8932 1725.6654 1675.5466 1728.191 1681.2287 C 1730.7165 1686.9107 1737.369 1689.4696 1743.0499 1686.944 C [0 0 0 0.575] vc f n 1742.8511 1686.4967 m 1748.285 1684.0809 1750.7317 1677.7168 1748.316 1672.2817 C 1745.9002 1666.8467 1739.5369 1664.3992 1734.103 1666.8149 C 1728.6691 1669.2307 1726.2224 1675.5948 1728.6382 1681.0298 C 1731.0539 1686.4649 1737.4172 1688.9124 1742.8511 1686.4967 C [0 0 0 0.55] vc f n 1742.6523 1686.0494 m 1747.8392 1683.7435 1750.1747 1677.6685 1747.8688 1672.4806 C 1745.5628 1667.2926 1739.4888 1664.9563 1734.3018 1667.2622 C 1729.1149 1669.5682 1726.7794 1675.643 1729.0854 1680.831 C 1731.3913 1686.019 1737.4653 1688.3553 1742.6523 1686.0494 C [0 0 0 0.525] vc f n 1742.4535 1685.6021 m 1747.3934 1683.406 1749.6177 1677.6203 1747.4216 1672.6794 C 1745.2254 1667.7384 1739.4406 1665.5134 1734.5006 1667.7095 C 1729.5607 1669.9057 1727.3365 1675.6913 1729.5326 1680.6322 C 1731.7287 1685.5732 1737.5135 1687.7982 1742.4535 1685.6021 C [0 0 0 0.5] vc f n 1742.2547 1685.1548 m 1746.9476 1683.0685 1749.0607 1677.5721 1746.9744 1672.8782 C 1744.888 1668.1843 1739.3924 1666.0705 1734.6994 1668.1568 C 1730.0065 1670.2431 1727.8935 1675.7395 1729.9798 1680.4334 C 1732.0661 1685.1273 1737.5617 1687.2411 1742.2547 1685.1548 C [0 0 0 0.475] vc f n 1742.0558 1684.7075 m 1746.5018 1682.731 1748.5037 1677.5239 1746.5272 1673.077 C 1744.5506 1668.6301 1739.3443 1666.6276 1734.8983 1668.6041 C 1730.4523 1670.5807 1728.4505 1675.7877 1730.427 1680.2346 C 1732.4035 1684.6815 1737.6099 1686.684 1742.0558 1684.7075 C [0 0 0 0.45] vc f n 1741.857 1684.2602 m 1746.056 1682.3935 1747.9467 1677.4756 1746.0799 1673.2758 C 1744.2132 1669.076 1739.2961 1667.1847 1735.0971 1669.0514 C 1730.8981 1670.9182 1729.0075 1675.8359 1730.8742 1680.0358 C 1732.741 1684.2356 1737.6581 1686.1269 1741.857 1684.2602 C [0 0 0 0.425] vc f n 1741.6582 1683.8129 m 1745.6102 1682.056 1747.3897 1677.4274 1745.6327 1673.4746 C 1743.8758 1669.5218 1739.2479 1667.7418 1735.2959 1669.4987 C 1731.3439 1671.2556 1729.5645 1675.8842 1731.3214 1679.837 C 1733.0784 1683.7897 1737.7062 1685.5698 1741.6582 1683.8129 C [0 0 0 0.4] vc f n 1741.4594 1683.3656 m 1745.1644 1681.7185 1746.8326 1677.3792 1745.1855 1673.6734 C 1743.5384 1669.9677 1739.1997 1668.2989 1735.4947 1669.946 C 1731.7897 1671.5931 1730.1215 1675.9324 1731.7686 1679.6382 C 1733.4158 1683.3439 1737.7544 1685.0127 1741.4594 1683.3656 C [0 0 0 0.375] vc f n 1741.2606 1682.9183 m 1744.7186 1681.381 1746.2756 1677.331 1744.7383 1673.8723 C 1743.201 1670.4135 1739.1516 1668.856 1735.6935 1670.3933 C 1732.2355 1671.9306 1730.6785 1675.9806 1732.2159 1679.4393 C 1733.7532 1682.8981 1737.8026 1684.4556 1741.2606 1682.9183 C [0 0 0 0.35] vc f n 1741.0618 1682.471 m 1744.2728 1681.0435 1745.7186 1677.2828 1744.2911 1674.0711 C 1742.8636 1670.8594 1739.1034 1669.4131 1735.8923 1670.8406 C 1732.6813 1672.2681 1731.2355 1676.0288 1732.6631 1679.2405 C 1734.0906 1682.4522 1737.8507 1683.8985 1741.0618 1682.471 C [0 0 0 0.325] vc f n 1740.863 1682.0237 m 1743.827 1680.706 1745.1616 1677.2345 1743.8439 1674.2699 C 1742.5262 1671.3053 1739.0552 1669.9702 1736.0911 1671.2879 C 1733.1271 1672.6056 1731.7926 1676.0771 1733.1103 1679.0417 C 1734.428 1682.0063 1737.8989 1683.3414 1740.863 1682.0237 C [0 0 0 0.3] vc f n 1740.6642 1681.5764 m 1743.3812 1680.3685 1744.6046 1677.1863 1743.3967 1674.4687 C 1742.1888 1671.7511 1739.007 1670.5273 1736.29 1671.7352 C 1733.5729 1672.9431 1732.3496 1676.1253 1733.5575 1678.8429 C 1734.7654 1681.5605 1737.9471 1682.7843 1740.6642 1681.5764 C [0 0 0 0.275] vc f n 1740.4653 1681.1291 m 1742.9354 1680.031 1744.0476 1677.1381 1742.9495 1674.6675 C 1741.8514 1672.197 1738.9588 1671.0844 1736.4888 1672.1825 C 1734.0187 1673.2806 1732.9066 1676.1735 1734.0047 1678.6441 C 1735.1028 1681.1146 1737.9953 1682.2272 1740.4653 1681.1291 C [0 0 0 0.25] vc f n 1740.2665 1680.6818 m 1742.4896 1679.6935 1743.4906 1677.0899 1742.5023 1674.8663 C 1741.514 1672.6428 1738.9107 1671.6415 1736.6876 1672.6298 C 1734.4645 1673.6181 1733.4636 1676.2217 1734.4519 1678.4453 C 1735.4402 1680.6688 1738.0434 1681.6701 1740.2665 1680.6818 C [0 0 0 0.225] vc f n 1740.0677 1680.2345 m 1742.0438 1679.356 1742.9336 1677.0416 1742.0551 1675.0651 C 1741.1766 1673.0887 1738.8625 1672.1986 1736.8864 1673.0771 C 1734.9103 1673.9556 1734.0206 1676.27 1734.8991 1678.2464 C 1735.7776 1680.2229 1738.0916 1681.113 1740.0677 1680.2345 C [0 0 0 0.2] vc f n 1739.8689 1679.7872 m 1741.598 1679.0185 1742.3765 1676.9934 1741.6078 1675.264 C 1740.8392 1673.5345 1738.8143 1672.7557 1737.0852 1673.5244 C 1735.3561 1674.2931 1734.5776 1676.3182 1735.3463 1678.0476 C 1736.115 1679.7771 1738.1398 1680.5559 1739.8689 1679.7872 C [0 0 0 0.175] vc f n 1739.6701 1679.3399 m 1741.1522 1678.681 1741.8195 1676.9452 1741.1606 1675.4628 C 1740.5018 1673.9804 1738.7661 1673.3128 1737.284 1673.9717 C 1735.8019 1674.6306 1735.1346 1676.3664 1735.7935 1677.8488 C 1736.4524 1679.3312 1738.188 1679.9988 1739.6701 1679.3399 C [0 0 0 0.15] vc f n 1739.4713 1678.8926 m 1740.7064 1678.3435 1741.2625 1676.8969 1740.7134 1675.6616 C 1740.1644 1674.4263 1738.7179 1673.8699 1737.4828 1674.419 C 1736.2478 1674.9681 1735.6917 1676.4147 1736.2407 1677.65 C 1736.7898 1678.8853 1738.2362 1679.4417 1739.4713 1678.8926 C [0 0 0 0.125] vc f n 1739.2724 1678.4453 m 1740.2606 1678.006 1740.7055 1676.8487 1740.2662 1675.8604 C 1739.8269 1674.8721 1738.6698 1674.427 1737.6817 1674.8663 C 1736.6935 1675.3056 1736.2487 1676.4629 1736.6879 1677.4512 C 1737.1272 1678.4395 1738.2843 1678.8846 1739.2724 1678.4453 C [0 0 0 0.1] vc f n 1739.0736 1677.998 m 1739.8148 1677.6685 1740.1485 1676.8005 1739.819 1676.0592 C 1739.4895 1675.3179 1738.6216 1674.9841 1737.8805 1675.3136 C 1737.1393 1675.6431 1736.8057 1676.5111 1737.1351 1677.2524 C 1737.4646 1677.9937 1738.3325 1678.3275 1739.0736 1677.998 C [0 0 0 0.075] vc f n 1738.8748 1677.5507 m 1739.369 1677.331 1739.5915 1676.7523 1739.3718 1676.258 C 1739.1521 1675.7638 1738.5734 1675.5412 1738.0793 1675.7609 C 1737.5852 1675.9806 1737.3627 1676.5593 1737.5824 1677.0536 C 1737.802 1677.5478 1738.3807 1677.7704 1738.8748 1677.5507 C [0 0 0 0.05] vc f n 1738.676 1677.1034 m 1738.9231 1676.9935 1739.0345 1676.704 1738.9246 1676.4568 C 1738.8147 1676.2097 1738.5252 1676.0983 1738.2781 1676.2082 C 1738.031 1676.3181 1737.9197 1676.6076 1738.0296 1676.8548 C 1738.1394 1677.1019 1738.4289 1677.2133 1738.676 1677.1034 C [0 0 0 0.025] vc f n Q false eomode n 1696 1669.892 m 1696 1690.1745 1712.4417 1706.6162 1732.7242 1706.6162 C 1753.0066 1706.6162 1769.4483 1690.1745 1769.4483 1669.892 C 1769.4483 1649.6096 1753.0066 1633.1679 1732.7242 1633.1679 C 1712.4417 1633.1679 1696 1649.6096 1696 1669.892 C 0.7208 w 4 M [0 0 0 1] vc false setoverprint s n 1700.584 1624.8698 m 1701.4764 1625.7105 1702.6007 1626.1242 1703.9973 1626.1242 C 1705.3931 1626.1242 1706.5309 1625.7105 1707.4229 1624.8698 C 1708.3279 1624.0034 1708.8063 1622.8791 1708.8063 1621.5599 C 1708.8063 1620.2417 1708.3279 1619.1166 1707.4229 1618.2637 C 1706.5309 1617.4237 1705.3931 1616.9972 1703.9973 1616.9972 C 1702.6007 1616.9972 1701.4764 1617.4237 1700.584 1618.2637 C 1699.6794 1619.1166 1699.2007 1620.2551 1699.2007 1621.5599 C 1699.2007 1622.8791 1699.6794 1624.0034 1700.584 1624.8698 C h 1703.9973 1618.8586 m 1705.4577 1618.8586 1706.5181 1619.9708 1706.5181 1621.5599 C 1706.5181 1623.1506 1705.4577 1624.2749 1703.9973 1624.2749 C 1702.536 1624.2749 1701.4764 1623.1506 1701.4764 1621.5599 C 1701.4764 1619.9708 1702.536 1618.8586 1703.9973 1618.8586 C f n 1709.6563 1623.9429 m 1712.2116 1623.9429 L 1714.0466 1623.9429 1714.9695 1623.3339 1714.9695 1622.1684 C 1714.9695 1621.5599 1714.655 1621.0838 1714.0466 1620.8094 C 1715.0101 1620.5053 1715.4866 1619.9175 1715.4866 1619.005 C 1715.4866 1617.6767 1714.574 1617.0171 1712.7489 1617.0171 C 1709.6563 1617.0171 L 1709.6563 1623.9429 L h 1713.2254 1621.9253 m 1713.2254 1622.4527 1712.9213 1622.7156 1712.2926 1622.7156 C 1711.4003 1622.7156 L 1711.4003 1621.2054 L 1712.2926 1621.2054 L 1712.9213 1621.2054 1713.2254 1621.4384 1713.2254 1621.9253 C h 1712.4042 1618.285 m 1713.2659 1618.285 1713.6515 1618.4983 1713.6515 1619.0967 C 1713.6515 1619.705 1713.2357 1619.968 1712.3939 1619.968 C 1711.4003 1619.968 L 1711.4003 1618.285 L 1712.4042 1618.285 L f n 1716.6298 1617.7278 m 1716.6298 1623.9429 L 1718.3636 1623.9429 L 1718.3636 1617.6667 L 1718.3636 1615.8316 1717.8667 1615.0506 1716.1734 1615.0001 C 1715.5548 1616.369 L 1716.5078 1616.3988 1716.6298 1616.7236 1716.6298 1617.7278 C f n 1719.7679 1623.9429 m 1724.4013 1623.9429 L 1724.4013 1622.6651 L 1721.5016 1622.6651 L 1721.5016 1621.2558 L 1724.2698 1621.2558 L 1724.2698 1619.968 L 1721.5016 1619.968 L 1721.5016 1618.3156 L 1724.4827 1618.3156 L 1724.4827 1617.0171 L 1719.7679 1617.0171 L 1719.7679 1623.9429 L f n 1729.0042 1616.8963 m 1727.8991 1616.8963 1726.9864 1617.2403 1726.317 1617.8692 C 1725.6276 1618.5281 1725.2424 1619.4406 1725.2424 1620.4754 C 1725.2424 1622.584 1726.7633 1624.0645 1729.1662 1624.0645 C 1730.028 1624.0645 1730.819 1623.872 1731.5897 1623.4967 C 1731.5897 1621.8741 L 1730.819 1622.3716 1730.0486 1622.6146 1729.2778 1622.6146 C 1727.8784 1622.6146 1727.027 1621.8031 1727.027 1620.4754 C 1727.027 1619.1975 1727.8379 1618.3462 1729.146 1618.3462 C 1729.9775 1618.3462 1730.819 1618.6404 1731.6505 1619.2175 C 1731.6505 1617.5957 L 1730.8293 1617.1295 1729.9672 1616.8963 1729.0042 1616.8963 C f n 1734.3569 1622.6552 m 1732.0656 1622.6552 L 1732.0656 1623.9429 L 1738.4736 1623.9429 L 1738.4736 1622.6552 L 1736.182 1622.6552 L 1736.182 1617.0171 L 1734.3569 1617.0171 L 1734.3569 1622.6552 L f n 1746.2235 1616.8224 m 1744.8143 1616.8224 1743.6508 1617.2616 1742.7977 1618.0632 C 1741.9185 1618.9033 1741.4274 1620.0675 1741.4274 1621.3859 C 1741.4274 1624.0745 1743.3665 1625.9621 1746.4304 1625.9621 C 1747.5291 1625.9621 1748.5373 1625.7162 1749.5198 1625.2386 C 1749.5198 1623.1698 L 1748.5373 1623.803 1747.5551 1624.1136 1746.5725 1624.1136 C 1744.7883 1624.1136 1743.7026 1623.0795 1743.7026 1621.3859 C 1743.7026 1619.757 1744.7368 1618.671 1746.4044 1618.671 C 1747.4644 1618.671 1748.5373 1619.0455 1749.5976 1619.7825 C 1749.5976 1617.7143 L 1748.5504 1617.1195 1747.4516 1616.8224 1746.2235 1616.8224 C f n 1751.2745 1623.071 m 1751.9739 1623.7305 1752.8562 1624.0546 1753.9511 1624.0546 C 1755.0463 1624.0546 1755.9386 1623.7305 1756.6383 1623.071 C 1757.3479 1622.3915 1757.7231 1621.5095 1757.7231 1620.4754 C 1757.7231 1619.4406 1757.3479 1618.5594 1756.6383 1617.8899 C 1755.9386 1617.2303 1755.0463 1616.8963 1753.9511 1616.8963 C 1752.8562 1616.8963 1751.9739 1617.2303 1751.2745 1617.8899 C 1750.5646 1618.5594 1750.1896 1619.4513 1750.1896 1620.4754 C 1750.1896 1621.5095 1750.5646 1622.3915 1751.2745 1623.071 C h 1753.9511 1618.3562 m 1755.097 1618.3562 1755.9282 1619.2281 1755.9282 1620.4754 C 1755.9282 1621.7221 1755.097 1622.6047 1753.9511 1622.6047 C 1752.8054 1622.6047 1751.9739 1621.7221 1751.9739 1620.4754 C 1751.9739 1619.2281 1752.8054 1618.3562 1753.9511 1618.3562 C f n 1758.7349 1623.9429 m 1760.2657 1623.9429 L 1762.4863 1621.1549 L 1764.7168 1623.9429 L 1766.2481 1623.9429 L 1766.2481 1617.0171 L 1764.5445 1617.0171 L 1764.5445 1621.307 L 1762.4863 1618.7719 L 1760.4483 1621.307 L 1760.4483 1617.0171 L 1758.7349 1617.0171 L 1758.7349 1623.9429 L f n 1767.6063 1623.9429 m 1770.1613 1623.9429 L 1772.0069 1623.9429 1772.9194 1623.2941 1772.9194 1621.8741 C 1772.9194 1620.4342 1771.9556 1619.725 1770.0191 1619.725 C 1769.3503 1619.725 L 1769.3503 1617.0171 L 1767.6063 1617.0171 L 1767.6063 1623.9429 L h 1771.1342 1621.8642 m 1771.1342 1622.361 1770.81 1622.6552 1770.1818 1622.6552 C 1769.3503 1622.6552 L 1769.3503 1621.0738 L 1770.1719 1621.0738 L 1770.82 1621.0738 1771.1342 1621.3269 1771.1342 1621.8642 C f n 1780.3946 1619.978 m 1780.3946 1618.0213 1779.168 1616.8963 1777.1197 1616.8963 C 1775.0715 1616.8963 1773.8447 1618.0213 1773.8447 1619.978 C 1773.8447 1623.9429 L 1775.5889 1623.9429 L 1775.5889 1620.0489 L 1775.5889 1618.9339 1776.1361 1618.3462 1777.1296 1618.3462 C 1778.1232 1618.3462 1778.6613 1618.9339 1778.6613 1620.0489 C 1778.6613 1623.9429 L 1780.3946 1623.9429 L 1780.3946 1619.978 L f n 1783.3931 1622.6552 m 1781.1018 1622.6552 L 1781.1018 1623.9429 L 1787.5095 1623.9429 L 1787.5095 1622.6552 L 1785.2183 1622.6552 L 1785.2183 1617.0171 L 1783.3931 1617.0171 L 1783.3931 1622.6552 L f n 1788.3077 1623.9429 m 1790.0922 1623.9429 L 1790.0922 1617.0171 L 1788.3077 1617.0171 L 1788.3077 1623.9429 L f n 1793.2086 1617.0171 m 1791.4945 1617.0171 L 1791.4945 1623.9429 L 1793.0154 1623.9429 L 1796.7267 1619.8159 L 1796.7267 1623.9429 L 1798.4402 1623.9429 L 1798.4402 1617.0171 L 1797.0821 1617.0171 L 1793.2086 1621.3674 L 1793.2086 1617.0171 L f n 1803.2184 1616.8963 m 1802.1139 1616.8963 1801.1906 1617.2403 1800.5318 1617.8692 C 1799.8425 1618.5281 1799.4572 1619.4406 1799.4572 1620.4754 C 1799.4572 1622.5948 1800.9781 1624.0645 1803.3911 1624.0645 C 1804.273 1624.0645 1805.1045 1623.8513 1805.9666 1623.4362 C 1805.9666 1621.9153 L 1805.0435 1622.3816 1804.2119 1622.6146 1803.4826 1622.6146 C 1802.0826 1622.6146 1801.2412 1621.8031 1801.2412 1620.4754 C 1801.2412 1619.1776 1802.0527 1618.3462 1803.3405 1618.3462 C 1803.6853 1618.3462 1804.02 1618.4172 1804.354 1618.5594 C 1804.354 1619.4307 L 1803.4016 1619.4307 L 1803.4016 1620.7284 L 1806.118 1620.7284 L 1806.118 1617.8288 L 1805.2666 1617.1905 1804.3341 1616.8963 1803.2184 1616.8963 C f n 1807.1393 1617.8089 m 1807.1393 1618.295 1807.5244 1618.7008 1808.0213 1618.7008 C 1808.5891 1618.7008 1808.9637 1618.295 1808.9637 1617.6262 C 1808.9637 1616.6121 1808.2238 1615.7094 1807.0888 1615.5275 C 1807.0888 1615.8218 L 1807.4534 1616.2169 1807.626 1616.5921 1807.626 1616.9872 C 1807.626 1617.0171 1807.626 1617.0377 1807.626 1617.0584 C 1807.3219 1617.1494 1807.1393 1617.4436 1807.1393 1617.8089 C f n vmrs 1812.3885 1625.8882 m 1814.6635 1625.8882 L 1814.6635 1617.0584 L 1812.3885 1617.0584 L 1812.3885 1625.8882 L f n 1817.8254 1617.0171 m 1816.112 1617.0171 L 1816.112 1623.9429 L 1817.6329 1623.9429 L 1821.3441 1619.8159 L 1821.3441 1623.9429 L 1823.057 1623.9429 L 1823.057 1617.0171 L 1821.6988 1617.0171 L 1817.8254 1621.3674 L 1817.8254 1617.0171 L f n 1827.8357 1616.8963 m 1826.7306 1616.8963 1825.8181 1617.2403 1825.1493 1617.8692 C 1824.4599 1618.5281 1824.0748 1619.4406 1824.0748 1620.4754 C 1824.0748 1622.584 1825.5956 1624.0645 1827.9978 1624.0645 C 1828.8599 1624.0645 1829.6509 1623.872 1830.4213 1623.4967 C 1830.4213 1621.8741 L 1829.6509 1622.3716 1828.8805 1622.6146 1828.1101 1622.6146 C 1826.71 1622.6146 1825.8586 1621.8031 1825.8586 1620.4754 C 1825.8586 1619.1975 1826.6702 1618.3462 1827.9779 1618.3462 C 1828.8094 1618.3462 1829.6509 1618.6404 1830.4825 1619.2175 C 1830.4825 1617.5957 L 1829.6608 1617.1295 1828.7994 1616.8963 1827.8357 1616.8963 C f n 1832.2051 1618.7008 m 1832.7126 1618.7008 1833.0978 1618.3049 1833.0978 1617.8089 C 1833.0978 1617.3221 1832.702 1616.9262 1832.2051 1616.9262 C 1831.7084 1616.9262 1831.3232 1617.3221 1831.3232 1617.8089 C 1831.3232 1618.295 1831.7084 1618.7008 1832.2051 1618.7008 C f n 1812.5825 1703.3582 m 1830.7838 1703.3582 L 1830.7838 1689.8491 L 1812.5825 1689.8491 L 1812.5825 1703.3582 L f n 1812.5825 1686.9509 m 1830.7838 1686.9509 L 1830.7838 1636.3086 L 1812.5825 1636.3086 L 1812.5825 1686.9509 L f n vmr vmr end %%Trailer MM*: UUUC0`UUUUT0UUUUP.****WUUU@ UUUT`⢠@UUUUU@UUUUUT****:(UUUU]@UUUUUUUUUUR UUUUA ***0WuUUU  U_UUT " UEUP @@ @UQU@@ @*"* @ @UuUU@@ @ꪈ@ @UUU@@ @@ @UUu@@@@ @U@@@* @ @U@@  UP  U_T0 WUU  +**UUUB 興 UUUUUR UUUUT UUUU] ****:UUUUuP@Ȉ`UUUU@ UUUUTU]UUU@ :****uUUUUP`0UUUUT "UUUCxac baY>s> 2aM0{8 yyn0rcAo`a΂@fg0@y@>c>@P(pH h@`8HHHHHHHHHHHHHHHHHHHHHHHHH2]o@"8 * 2 ,`ace-6.4.5+dfsg.orig/MPC/docs/html/images/mpc.fig0000644000175000017500000000454713154167361017327 0ustar tggtgg#FIG 3.2 Landscape Center Inches Letter 100.00 Single -2 1200 2 6 150 150 6075 5400 6 150 150 6075 5400 6 150 150 6075 5400 6 4200 2550 4875 2850 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 6 4200 2700 4650 2700 4650 2850 4875 2700 4650 2550 4650 2700 -6 6 1350 2550 2325 2850 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 6 1350 2700 2100 2700 2100 2850 2325 2700 2100 2550 2100 2700 -6 6 4875 1875 6075 3525 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 4875 1875 6075 1875 6075 3525 4875 3525 4875 1875 4 0 0 50 0 0 16 0.0000 4 225 930 4950 3225 dsp, etc.)\001 4 0 0 50 0 0 16 0.0000 4 225 735 4950 3000 vcproj,\001 4 0 0 50 0 0 16 0.0000 4 210 1035 4950 2775 (Makefile,\001 4 0 0 50 0 0 16 0.0000 4 165 390 5250 2400 File\001 4 0 0 50 0 0 16 0.0000 4 225 690 5100 2175 Project\001 -6 6 2325 2025 4200 3300 2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 4200 3300 4200 2025 2325 2025 2325 3300 4200 3300 4 0 0 50 0 0 16 0.0000 4 225 1305 2625 2625 Make Project\001 4 0 0 50 0 0 16 0.0000 4 165 750 2850 2850 Creator\001 -6 6 150 3825 1350 5400 5 1 0 1 0 7 50 0 -1 0.000 0 1 0 0 750.000 4050.000 150 5175 750 5325 1350 5175 1 2 0 1 0 7 50 0 -1 0.000 1 0.0000 750 3937 600 112 150 3825 1350 4050 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 150 3975 150 5175 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 1350 3975 1350 5175 4 0 0 50 0 0 16 0.0000 4 225 930 300 4500 Template\001 4 0 0 50 0 0 16 0.0000 4 225 960 300 4725 Input File\001 -6 6 150 1950 1350 3525 5 1 0 1 0 7 50 0 -1 0.000 0 1 0 0 750.000 2175.000 150 3300 750 3450 1350 3300 1 2 0 1 0 7 50 0 -1 0.000 1 0.0000 750 2062 600 112 150 1950 1350 2175 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 150 2100 150 3300 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 1350 2100 1350 3300 4 0 0 50 0 0 16 0.0000 4 225 930 300 2625 Template\001 4 0 0 50 0 0 16 0.0000 4 165 390 525 2850 File\001 -6 6 150 150 1350 1725 5 1 0 1 0 7 50 0 -1 0.000 0 1 0 0 750.000 375.000 150 1500 750 1650 1350 1500 1 2 0 1 0 7 50 0 -1 0.000 1 0.0000 750 262 600 112 150 150 1350 375 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 150 300 150 1500 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 1350 300 1350 1500 4 0 0 50 0 0 16 0.0000 4 165 390 525 1125 File\001 4 0 0 50 0 0 16 0.0000 4 165 525 450 900 MPC\001 -6 6 1350 900 1650 4575 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 4 1350 900 1650 900 1650 4575 1350 4575 -6 -6 -6 -6 4 0 0 50 0 0 12 0.0000 4 15 135 450 2925 \001 4 0 0 50 0 0 12 0.0000 4 15 45 5025 2775 \001 ace-6.4.5+dfsg.orig/MPC/docs/html/images/mwc.gif0000644000175000017500000000365013154167361017330 0ustar tggtggGIF87az,zڋ޼H扦ʶ L ĢL*̦ JԪj Ob Nj rzXGxwXquX訓@u3 3)0%$) W:*Rڶ"Xk{E+: 2˚a L1c-̂=KJ7Lt=]n~0n~N8zpľbPfYDȮbK8ڡ( _l./J {cA[hjpfHF A䙠Ԩe6ȩRž;M@QeTJUkS:VF* `zի'Qv酅Ҫm巭PJh\>a߼<#d8/WZsN5b$'\´Xwb5̖ZFbԀEoހ?~VqtS<2njÙsp=}[oآا'&b#ɊޖGl_ |A?r}\!ށpTRaxeXWL b5aj`e(R "mw;*89ƧyWUffbyn3)$X;a&ISds?N]Ce9_}\vh&c&N"rfrlXz%a]+= Wm(Ȣ>EmmIhmە^vӈah^(e&C){_7ѰjKzbbJWX|Rp6+&z&cRl51(W-es.-YkvHc.U貹 UoyL a{680֐.cZn*YLV0'[jluhIJNhcZ6ݺ"謋S|E01FINoJ(:meOWÛn]^lu"U̚+ا9tD ?<}+xfA1S5GߨvOڵ9L~cD^`os{'?(r6bsK^qw;hu &wɎb|"{r؟5-H*POs二ILbMS؝ʂ+MhUŬ\MNR$1QҸ;g3+(RyUa&)\ D0O2sԱ7qrTþiY 0!aTfc= _1vŘαcH$̨8yEE4dy?@ˆqo}y!}"V cjfA=BBGBRbX^*N4H rctZiP**$30i#M @t"a!KcR-||3%h>U!#6DrS6b2ccDe nsKD'9O_X"iN]$gz*Jdh*!eTy~<ɺt-g5iTouAFiZm_'g ookMa 0<.T;\1Ε$| Vݴ!x+t=/zG[ |u7žqoz_.0[`C#UlXK k? x$.O;ace-6.4.5+dfsg.orig/MPC/docs/html/images/mwc_mtiff.eps0000644000175000017500000003735313154167361020546 0ustar tggtgg,%!PS-Adobe-2.0 EPSF-2.0 %%Title: mwc.fig %%Creator: fig2dev Version 3.2 Patchlevel 4 %%CreationDate: Wed Sep 10 11:26:59 2003 %%For: totten_s@mozart (totten_s,U-OCISTLINT\totten_s,S-1-5-21-1120626505-248914894-612134452-1226) %%BoundingBox: 0 0 371 101 %%Magnification: 1.0000 %%EndComments /$F2psDict 200 dict def $F2psDict begin $F2psDict /mtrx matrix put /col-1 {0 setgray} bind def /col0 {0.000 0.000 0.000 srgb} bind def /col1 {0.000 0.000 1.000 srgb} bind def /col2 {0.000 1.000 0.000 srgb} bind def /col3 {0.000 1.000 1.000 srgb} bind def /col4 {1.000 0.000 0.000 srgb} bind def /col5 {1.000 0.000 1.000 srgb} bind def /col6 {1.000 1.000 0.000 srgb} bind def /col7 {1.000 1.000 1.000 srgb} bind def /col8 {0.000 0.000 0.560 srgb} bind def /col9 {0.000 0.000 0.690 srgb} bind def /col10 {0.000 0.000 0.820 srgb} bind def /col11 {0.530 0.810 1.000 srgb} bind def /col12 {0.000 0.560 0.000 srgb} bind def /col13 {0.000 0.690 0.000 srgb} bind def /col14 {0.000 0.820 0.000 srgb} bind def /col15 {0.000 0.560 0.560 srgb} bind def /col16 {0.000 0.690 0.690 srgb} bind def /col17 {0.000 0.820 0.820 srgb} bind def /col18 {0.560 0.000 0.000 srgb} bind def /col19 {0.690 0.000 0.000 srgb} bind def /col20 {0.820 0.000 0.000 srgb} bind def /col21 {0.560 0.000 0.560 srgb} bind def /col22 {0.690 0.000 0.690 srgb} bind def /col23 {0.820 0.000 0.820 srgb} bind def /col24 {0.500 0.190 0.000 srgb} bind def /col25 {0.630 0.250 0.000 srgb} bind def /col26 {0.750 0.380 0.000 srgb} bind def /col27 {1.000 0.500 0.500 srgb} bind def /col28 {1.000 0.630 0.630 srgb} bind def /col29 {1.000 0.750 0.750 srgb} bind def /col30 {1.000 0.880 0.880 srgb} bind def /col31 {1.000 0.840 0.000 srgb} bind def end save newpath 0 101 moveto 0 0 lineto 371 0 lineto 371 101 lineto closepath clip newpath -12.8 113.2 translate 1 -1 scale /cp {closepath} bind def /ef {eofill} bind def /gr {grestore} bind def /gs {gsave} bind def /sa {save} bind def /rs {restore} bind def /l {lineto} bind def /m {moveto} bind def /rm {rmoveto} bind def /n {newpath} bind def /s {stroke} bind def /sh {show} bind def /slc {setlinecap} bind def /slj {setlinejoin} bind def /slw {setlinewidth} bind def /srgb {setrgbcolor} bind def /rot {rotate} bind def /sc {scale} bind def /sd {setdash} bind def /ff {findfont} bind def /sf {setfont} bind def /scf {scalefont} bind def /sw {stringwidth} bind def /tr {translate} bind def /tnt {dup dup currentrgbcolor 4 -2 roll dup 1 exch sub 3 -1 roll mul add 4 -2 roll dup 1 exch sub 3 -1 roll mul add 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} bind def /shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul 4 -2 roll mul srgb} bind def /DrawEllipse { /endangle exch def /startangle exch def /yrad exch def /xrad exch def /y exch def /x exch def /savematrix mtrx currentmatrix def x y tr xrad yrad sc 0 0 1 startangle endangle arc closepath savematrix setmatrix } def /$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def /$F2psEnd {$F2psEnteredState restore end} def $F2psBegin 10 setmiterlimit 0 slj 0 slc 0.06000 0.06000 sc % % Fig objects follow % % % here starts figure with depth 50 /Times-Roman ff 240.00 scf sf 5100 1650 m gs 1 -1 sc ( etc.\)) col0 sh gr % Polyline 7.500 slw n 4275 1050 m 4650 1050 l 4650 1200 l 4875 1050 l 4650 900 l 4650 1050 l gs col0 s gr % Arc n 825.0 525.0 1275.0 118.1 61.9 arcn gs col0 s gr % Ellipse n 825 412 600 112 0 360 DrawEllipse gs col0 s gr % Polyline n 1425 450 m 1425 1650 l gs col0 s gr % Polyline n 225 450 m 225 1650 l gs col0 s gr /Times-Roman ff 240.00 scf sf 600 1275 m gs 1 -1 sc (File) col0 sh gr /Times-Roman ff 240.00 scf sf 450 1050 m gs 1 -1 sc (MWC) col0 sh gr % Polyline n 2130 375 m 2025 375 2025 1545 105 arcto 4 {pop} repeat 2025 1650 4170 1650 105 arcto 4 {pop} repeat 4275 1650 4275 480 105 arcto 4 {pop} repeat 4275 375 2130 375 105 arcto 4 {pop} repeat cp gs col0 s gr /Times-Roman ff 240.00 scf sf 2775 1200 m gs 1 -1 sc (Creator) col0 sh gr /Times-Roman ff 240.00 scf sf 2325 975 m gs 1 -1 sc (Make Workspace) col0 sh gr % Polyline n 4875 225 m 6375 225 l 6375 1875 l 4875 1875 l cp gs col0 s gr /Times-Roman ff 240.00 scf sf 5025 600 m gs 1 -1 sc (Workspace) col0 sh gr /Times-Roman ff 240.00 scf sf 5400 825 m gs 1 -1 sc (File) col0 sh gr /Times-Roman ff 240.00 scf sf 5100 1125 m gs 1 -1 sc (\(Makefile,) col0 sh gr /Times-Roman ff 240.00 scf sf 5100 1425 m gs 1 -1 sc ( dsw, sln,) col0 sh gr % Polyline n 1425 1050 m 1800 1050 l 1800 1200 l 2025 1050 l 1800 900 l 1800 1050 l gs col0 s gr % here ends figure; $F2psEnd rs showpage showpage II*tf Rf)$()126|HHGNU Ghostscript 7.052003:09:10 11:27:02<2f746d7_? X@ @ @@ ; .1D?2 >e)/.7x@@7 SD4#D@@ q !@@@@(, BH 4g@ !@@ @@@@@@@@@x *F@X: ǀ b 8X0@@ X1 @@#cxW_l@@@\`@4DJKA # ` AP4CNi !0F00B%XĆ1a1$2d"ʋ t ;mxgq \@ h  T #Dp@ @ !``,( @@C  XP+GX z@}p@ !$b@ A2A!0  ABI!0`@(B2F\@C8y@ ~d0@qH0 !"  "@@D+  vq8  T@@@@ !f< =ޗN_4t_%+ -lqQ+J|h1c;n1$AHhɕF@| &?d2fCghhzL:)p}3 R?R Va u''|$8ME`t >:C^xC_n>'{UGEpփ[zT8&_l^b N!"4.%aH6&u5L:5BE2)bNCNY XaIq9L\] 'b&djfy oV&srHD9^z>vg+ h-j2Ta* Ĥ/ZJ%饠aZh|jf%jj㠼V+Ͱy&$.lTkƇtFn枫nK{P4/iv y*\Khk (=~ r"kυ}ᒃ!zP@|_O,o˙{è&<ݞRotIYщHyڳ|C1d4ImNw@A_ՃyE+&9bVt|~ޭ1o4pэ&))g75sZ])#|rK8Շ7Zhl%/$KoVF`43%2ͻ ح=v/yb;n{蠷IJu{~5O3d F;*}n۠ʮsx&+v=Og__L+ה5|Þ=ӹq/"`2%I$B?tEx o _^)n/!w_핫nY<{(rntIՐɍVԿ$GΗmqh3Md-jz~7CM/V nA7f hsZeN3]콹F&دV8).omZiS6V Ez*3lH^HoVh&I'7Mrw9}>ЪP3;d|يnS g\f plsW*ӻ.C=6,˽b_鐵IG{oY>~Ƶ-Lw*#߆2^9 <>*+ + zbΪ|>q䦽9E\9t8,V{uښ>{1Ļ늾u^N/߬׉O}{sCB?ehǐx X -w83Wv8 hgsz<$z|"xzOf,Xxo4y08{.u4nGx8xtxT$()126x?HHGNU Ghostscript 7.052003:09:10 11:27:40<2f746d7}@' `@ /` @ @ @@@  @}  (ppB`@@aA  Jx@T@C@`@ @ @@# "!_ @@@*  !@ @  @@ @@@ @ @   @pt=@w  @@@~   ?J @@@ ` @BH? '@B, ! `@(@_  p8xOXB? @@  B@ @@ B@@ @@O  @! @X b @3! @@  D?p @@  (@ hp  B0@bA y H@@B0@   D A @@7pyo  0@ @!@@@ @ @0@ p@t{|    {@@@   @@@p@}o  @ @ @@ @ @ @`@ @@x|b<@ CȑCD$$F@@"!!" ُ@@ z@@ ^FN@$" !P  HD$$ 3@  @ @@  @ @@ @(80X008,`?f9 @9&>n@v@$()1~@2@HHGNU Ghostscript 7.052003:09:10 11:27:40R&> @ @ @ @ @ @ @ace-6.4.5+dfsg.orig/MPC/docs/html/rpmworkflow.dot0000644000175000017500000000137213154167361017706 0ustar tggtggdigraph rpmpackaging { rankdir=LR; subgraph cluster_completeprocess { // rpmbuild output rpmbuild [shape="box"]; rpmbuild -> SRPM; rpmbuild -> bRPM; // inputs to rpmbuild specfile -> rpmbuild ; tarball -> rpmbuild ; mwc [shape="box" label="mwc.pl"]; rpmscript [shape="box" label="*_rpm.sh script"]; mwc -> specfile; mwc -> rpmscript; rpmscript -> tarball; mwcfiles [label=".mwc files"]; mwcfiles -> mwc; } } ace-6.4.5+dfsg.orig/MPC/docs/html/CDT6.html0000644000175000017500000003024513154167361016174 0ustar tggtgg MPC: CDT6 Project Type

    CDT6 Project Type documentation

    Background/Abstract

  • The CDT6 Project Type generates project files utilizable by Eclipse's CDT plugin, version 6. This is the version generally available/compatible with the Eclipse "Galileo" release. The project type generates eclipse projects from generic mpc files. These Eclipse/CDT projects can then be imported into a user's workspace and built using CDT's internal builder.
  • MPC's CDT6 Project Type currently supports Linux and Windows as both host and target platforms.
  • Pre-requisites

    • The following software items are required and in the execution path (as well as any of their respective dependencies):
      Eclipse Galileo
      Standard download from http://www.eclipse.org/downloads.
      CDT 6.0
      This comes packaged together with Eclipse Galileo in the Eclipse IDE for C/C++ Development.
      Eclipse-compatible toolchain
      On linux platforms, this should just be the standard installation of the GNU toolchain for that linux distribution. On Windows, Eclipse uses the MinGW toolchain, available for download. Suggested tool set is Automated MinGW Installer.
      a compatible make tool
      This does not need to be a full-featured GNU make, but it must be in the PATH as an executable named make. On Linux, the standard GNU make suffices. On Windows, the make package from GNUWin32 is a good choice.
    • The default value of 256Mb for Eclipse's Java VM heap size is insufficient for building projects the size of ACE/TAO/CIAO. A minimum of 768Mb or more is suggested. This can be done on the command line launch of eclipse, or in the eclipse.ini file.

    Usage

    For every project myprojname { } in mpc files, the CDT6 project type generates a corresponding "eclipse project" directory of the form cdt_myprojname. The CDT6 Project Type uses Eclipse's linked resource feature to work around Eclipse's usual requirement that source files reside inside the Eclipse project directory. However, the linked resource feature also comes with restrictions; see the note for details.

    Generic workflow

    Presuming .mpc files already exist:
    1. Generate projects using -type cdt6.
    2. Import projects into an Eclipse workspace.

    Workflow for building ACE/TAO

    1. Check out a copy of ACE/TAO.
    2. Configure ACE/TAO for your target(s) by setting up config.h.
    3. Set up environment variables (ACE_ROOT, TAO_ROOT, etc.), PATH, LD_LIBRARY_PATH (or similar), etc.
    4. Verify settings in global.features and, if changes are necessary, make appropriate changes in default.features.
    5. Generate projects using -type cdt6 insuring the use of mwc.pl from within ACE, e.g.,
      $ cd $TAO_ROOT
      $ mwc.pl -type cdt6 TAO_ACE.mwc
      
      mwc.pl will churn for awhile.
    6. Suggestion: Verify that Project->Build Automatically is unchecked (has no checkmark to its immediate left). If this is left on, then the build will start as soon as the import in the next step begins, and it will build everything.
    7. From within Eclipse (preferably an otherwise-empty workspace) select File->Import... and perform the following actions:
      1. Choose General->Existing Projects Into Workspace and click Next
      2. In "Select Root Directory:" text field, enter the full path to the directory above ACE, TAO, etc. (you can also use the "Browse" feature to select the directory from the GUI). For example, if you checked everything out into /home/joedeveloper/acetao and ACE and TAO are in a peer layout under that directory, you would enter /home/joedeveloper/acetao in the text field.
      3. Eclipse will scan all the subdirectories looking for existing projects; this can take a few minutes for something as large as TAO or CIAO. NOTE: If you have previously run MPC to generate CDT projects with one workspace (.mwc file) and then ran it later with a different workspace without removing the projects from the first generation, Eclipse will still find those projects for import. See the note on removing generated projects for information on how to do that.
      4. Be sure that the checkbox next to Copy projects into workspace is UNchecked. Copying projects into the workspace unnecessarily duplicates files, plus we have found that Eclipse can get confused with file paths sometimes (though sometimes it will work).
      5. Feel free to use Working Sets or not. You may also choose to import a subset of the discovered projects by manipulating them in the list, however, experience suggests that the list is ignorant of dependency interactions between projects, so you must manage that manually (i.e., you could import a project, but not projects upon which the first depends, and that first project would then fail to build).
      6. Click Finish to proceed with the import.
      Eclipse will now start populating the Projects pane with projects. If you didn't uncheck Build Automatically, then builds will start. Regardless, the C++ indexer will run in the background across the source of all projects.

    Building A Project

    To build a project or set of projects, select the project (or projects) in the Project pane, then select Project->Build Project. Eclipse will evaluate ALL dependencies automatically, though not necessarily quickly.

    Hint: a good choice to get all of ACE/TAO built is to choose the Naming Service project.

    Multiple Platforms

    Just as a project created within CDT can be set up to support multiple platforms, so too can projects generated via MPC. To the extent possible, the platforms are represented in generated projects in the same way as they are in "native" projects (though there will be some differences).

    Generating Projects with Multiple Platform Support

    Platforms are named in a list called platforms in the CDT6 template (much like other MPC templates). The list defaults to the platform on which mwc.pl is run. To generate for another platforms, or for additional platforms, you must provide platforms with the list of platforms to generate.

    Generate projects using a similar incantation to the default (from above) using -type cdt6 and -value_template platform="<platform_list>", insuring the use of mwc.pl from within ACE, e.g.,

    $ cd $TAO_ROOT
    $ mwc.pl -type cdt6 -value_template platforms="linux cellppu" TAO_ACE.mwc
    

    Platforms are defined as scopes in templates/cdt6platforms.mpt.

    Cross-Compilation

    Cross-compilation is handled the same as a platform; the target is the platform. If you want to generate for cross-compilation, the cross-compiler information must be defined in a scope (typically named for the target type) in templates/cdt6platforms.mpt. If a scope does not exist for the target, follow the instructions for adding a new platform.

    In the example given above, cellppu is the name of the platform for cross-compilation.

    Adding a New Platform

    To add a new platform, particularly one for cross-compilation, it's probably easiest to start from an existing scope, e.g., cellppu. For cross-compilation where the cross-compiler toolchain is GNU Compiler-based, you will need to provide the names of the various executables in the toolchain in the values as, ar, cc, and cxx. And, optionally, ccld and/or cxxld if the linker used for linking C and C++ executables, respectively, is different from the respective compiler. CDT expects these to be in the path.

    Notes

    1. There is no generated workspace. Eclipse's concept of workspace is very different from MPC's, and there is no way to generate a workspace. Eclipse's workspace concept doesn't permit sharing among machines or developers or even checking a workspace into version control.
    2. The Eclipse "workspace" and MPC project + source must not be in the same directory hierarchy. For example, if you chose to have Eclipse store its workspace in /home/joedeveloper/workspace, you may not put your MPC project+source under that directory. However, putting the MPC project+source under /home/joedeveloper/acetao or similar, i.e., as a peer to the workspace directory, is fine.
    3. CDT6 uses Eclipse's linked resource feature to work around the usual requirement that all source code reside in Eclipse project directories. These act similar to Unix symbolic links. While convenient so that a developer is not required to conform to Eclipse's directory layout, it comes at a price: the target of the link must be specified as a full path. The consequence of this restriction is that, once the CDT6 projects get generated, the source should not move in the filesystem.
    4. MPC's CDT Project Generator creates directories named cdt_* for projects, similar to how the GNUACE generator generates makefiles of the form GNUmakefile.*. To remove all CDT projects from a directory hierarchy, on Linux you can use a command such as:
        $ find . -name 'cdt_*' -print | xargs rm -rf
      
    5. Perfect hash generation using the IDL compiler is not currently working because the IDL compiler cannot find the gperf executable. This may be a PATH issue, "installation" issue, or an mpc file dependency issue. The IDL compiler works but does not generate perfect hash lookups.

    Last modified: Thu Jul 22 11:14:15 CDT 2010 ace-6.4.5+dfsg.orig/MPC/docs/html/MakeProjectCreator.css0000644000175000017500000011610213154167361021041 0ustar tggtggA.link { color: blue; text-decoration: underline; } A.visited { color: purple; text-decoration: underline; } A.active { color: red; text-decoration: underline; } LI.Appendix-name { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 19.500000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 27.000000pt; font-weight: Bold; font-style: small-caps Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } LI.Appendix-number { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 15.000000pt; font-weight: Bold; font-style: small-caps Regular; color: #b2b2b2; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.AuthorBook { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 292.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 13.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } LI.Body { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 11.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.BodyNoLead { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 11.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.Body { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 10.000000pt; font-size: 11.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.BodyNoLead { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 2.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 10.000000pt; font-size: 11.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.Bullet1 { display: block; text-align: left; text-indent: -18.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 18.000000pt; font-size: 11.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.Bullet2 { display: block; text-align: left; text-indent: -11.999527pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 41.999756pt; font-size: 11.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.Bulleted { display: block; text-align: left; text-indent: -18.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 18.000000pt; font-size: 12.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.BulletNoLead1 { display: block; text-align: left; text-indent: -12.000229pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 12.000229pt; font-size: 10.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.BulletNoLead2 { display: block; text-align: left; text-indent: -11.999527pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 23.999756pt; font-size: 10.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.Callout { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 3.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 8.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } P.CellBody { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 12.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.CellHeading { display: block; text-align: center; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 12.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } H1.ChapterNum, H2.ChapterNum, H3.ChapterNum, H4.ChapterNum, H5.ChapterNum, H6.ChapterNum { display: block; text-align: left; text-indent: -126.000000pt; margin-top: 83.000000pt; margin-bottom: 166.000000pt; margin-right: 0.000000pt; margin-left: 126.000000pt; font-size: 20.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } P.Code { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 2.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 8.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Courier New"; } P.Code-Line2 { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 2.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 12.000229pt; font-size: 8.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Courier New"; } P.Code-Line3 { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 2.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 23.999756pt; font-size: 8.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Courier New"; } P.Code-Line4 { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 2.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 36.000000pt; font-size: 8.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Courier New"; } P.Code-Line5 { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 2.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 48.000229pt; font-size: 8.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Courier New"; } P.CodeLarge { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 3.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 12.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Courier New"; } P.CodeWide { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 3.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 8.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Courier New"; } P.Copyright { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.EditingNote { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 3.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Italic; color: #0000ff; text-decoration: underline ; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.FigTitle, H2.FigTitle, H3.FigTitle, H4.FigTitle, H5.FigTitle, H6.FigTitle { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 1.000000pt; margin-bottom: 1.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } P.Footnote { display: block; text-align: left; text-indent: -12.000229pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 12.000229pt; font-size: 10.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } H1.Head1, H2.Head1, H3.Head1, H4.Head1, H5.Head1, H6.Head1 { display: block; text-align: left; text-indent: -126.000000pt; margin-top: 100.000000pt; margin-bottom: 200.000000pt; margin-right: 0.000000pt; margin-left: 126.000000pt; font-size: 24.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.Head2, H2.Head2, H3.Head2, H4.Head2, H5.Head2, H6.Head2 { display: block; text-align: left; text-indent: -66.023987pt; margin-top: 22.000000pt; margin-bottom: 10.000000pt; margin-right: 0.000000pt; margin-left: 66.023987pt; font-size: 18.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.Head3, H2.Head3, H3.Head3, H4.Head3, H5.Head3, H6.Head3 { display: block; text-align: left; text-indent: -66.023987pt; margin-top: 15.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 66.023987pt; font-size: 15.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.Head4, H2.Head4, H3.Head4, H4.Head4, H5.Head4, H6.Head4 { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 16.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 13.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } LI.Head4-nonum { display: block; text-align: left; text-indent: -66.023987pt; margin-top: 16.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 66.023987pt; font-size: 13.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.Head5, H2.Head5, H3.Head5, H4.Head5, H5.Head5, H6.Head5 { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 13.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 11.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } LI.Head5-special { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 13.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 11.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.Head6, H2.Head6, H3.Head6, H4.Head6, H5.Head6, H6.Head6 { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 12.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Italic; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.Heading1, H2.Heading1, H3.Heading1, H4.Heading1, H5.Heading1, H6.Heading1 { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 14.000000pt; margin-bottom: 6.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 14.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } H1.Heading2, H2.Heading2, H3.Heading2, H4.Heading2, H5.Heading2, H6.Heading2 { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 12.000000pt; margin-bottom: 3.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 12.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.HeadingRunIn { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 6.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 12.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.IlloCaption { display: block; text-align: left; text-indent: -50.399994pt; margin-top: 5.000000pt; margin-bottom: 1.000000pt; margin-right: 0.000000pt; margin-left: 50.399994pt; font-size: 10.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.IlloCaptionApp { display: block; text-align: left; text-indent: -50.399994pt; margin-top: 5.000000pt; margin-bottom: 1.000000pt; margin-right: 0.000000pt; margin-left: 50.399994pt; font-size: 10.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.Indent1 { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 18.000000pt; font-size: 11.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.Indent2 { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 23.999756pt; font-size: 11.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.Indented { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 18.000000pt; font-size: 12.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.IndexTitle { display: block; text-align: center; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 5.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 25.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } P.Mapping-Table-Cell { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 2.000000pt; margin-bottom: 2.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 12.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.Mapping-Table-Title { display: block; text-align: center; text-indent: 0.000000pt; margin-top: 1.000000pt; margin-bottom: 1.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } LI.NoteBody { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 15.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 11.000000pt; font-weight: medium; font-style: Italic; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.NoteSpecial { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 15.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 11.000000pt; font-weight: medium; font-style: Italic; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.NoteSpecial2 { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 9.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 7.000000pt; font-weight: medium; font-style: Italic; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.Numbered { display: block; text-align: left; text-indent: -18.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 18.000000pt; font-size: 11.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.Numbered1 { display: block; text-align: left; text-indent: -18.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 18.000000pt; font-size: 12.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.Numbered2 { display: block; text-align: left; text-indent: -12.000229pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 30.000229pt; font-size: 11.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } H1.NumberedTableTitle, H2.NumberedTableTitle, H3.NumberedTableTitle, H4.NumberedTableTitle, H5.NumberedTableTitle, H6.NumberedTableTitle { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 1.000000pt; margin-bottom: 1.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } LI.OptionHeader { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 22.000000pt; margin-bottom: 10.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 18.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } LI.ParmBody { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 11.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.Part-Name { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 58.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 24.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.Part-No { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 58.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 24.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } P.PublisherBook { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 12.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.RuningH-F { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 3.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 9.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } LI.Section-name { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 15.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 24.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } LI.Section-number { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 15.000000pt; font-weight: Bold; font-style: small-caps Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } H1.SideDescription, H2.SideDescription, H3.SideDescription, H4.SideDescription, H5.SideDescription, H6.SideDescription { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.SideExample, H2.SideExample, H3.SideExample, H4.SideExample, H5.SideExample, H6.SideExample { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.SideException, H2.SideException, H3.SideException, H4.SideException, H5.SideException, H6.SideException { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.SideImpact, H2.SideImpact, H3.SideImpact, H4.SideImpact, H5.SideImpact, H6.SideImpact { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 4.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.SideLine, H2.SideLine, H3.SideLine, H4.SideLine, H5.SideLine, H6.SideLine { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.SideLocCodeAUnits, H2.SideLocCodeAUnits, H3.SideLocCodeAUnits, H4.SideLocCodeAUnits, H5.SideLocCodeAUnits, H6.SideLocCodeAUnits { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 15.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.SideLocCodeUnits, H2.SideLocCodeUnits, H3.SideLocCodeUnits, H4.SideLocCodeUnits, H5.SideLocCodeUnits, H6.SideLocCodeUnits { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 15.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.SideNote, H2.SideNote, H3.SideNote, H4.SideNote, H5.SideNote, H6.SideNote { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 20.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.SideParameters, H2.SideParameters, H3.SideParameters, H4.SideParameters, H5.SideParameters, H6.SideParameters { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.SideReturn, H2.SideReturn, H3.SideReturn, H4.SideReturn, H5.SideReturn, H6.SideReturn { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.SideSeeAlso, H2.SideSeeAlso, H3.SideSeeAlso, H4.SideSeeAlso, H5.SideSeeAlso, H6.SideSeeAlso { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.SideSynopsis, H2.SideSynopsis, H3.SideSynopsis, H4.SideSynopsis, H5.SideSynopsis, H6.SideSynopsis { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } H1.SideUsage, H2.SideUsage, H3.SideUsage, H4.SideUsage, H5.SideUsage, H6.SideUsage { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 4.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } P.TableFootnote { display: block; text-align: left; text-indent: -12.000229pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 18.000000pt; margin-left: 30.000229pt; font-size: 10.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.TableTitle { display: block; text-align: center; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 12.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.Tbl-Body { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 2.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.Tbl-Heading { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } P.Tbl-SideHeading { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } P.Tbl-Subhead { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 3.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 9.500000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.TblCaption { display: block; text-align: left; text-indent: -48.000229pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 48.000229pt; font-size: 10.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.TblCaptionApp { display: block; text-align: left; text-indent: -48.000229pt; margin-top: 5.500000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 48.000229pt; font-size: 9.500000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.TblCode { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 8.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Courier New"; } P.TblFootnote { display: block; text-align: left; text-indent: -12.000229pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 12.000229pt; font-size: 8.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } H1.Title, H2.Title, H3.Title, H4.Title, H5.Title, H6.Title { display: block; text-align: center; text-indent: 0.000000pt; margin-top: 24.000000pt; margin-bottom: 12.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 18.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.TitleBook { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 60.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 30.000000pt; font-weight: medium; font-style: Italic; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.TopLine { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 5.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 11.000000pt; font-weight: medium; font-style: Italic; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.zHead-rightside { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 12.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 13.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } LI.zNumberAppendix { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 3.000000pt; margin-bottom: 0.000000pt; margin-right: 4.999680pt; margin-left: 0.000000pt; font-size: 126.000000pt; font-weight: Bold; font-style: Regular; color: #00ffff; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } LI.zNumberSection { display: block; text-align: right; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 4.999680pt; margin-left: 0.000000pt; font-size: 72.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.zRunningFooter { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 8.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } P.zRunningHeader { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 8.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } P.zSlugline { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 10.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } EM.Bold { font-weight: Bold; } EM.BoldCode { font-size: 11.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Courier New"; } EM.Code { font-size: 11.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Courier New"; } EM.CodeOption { font-size: 11.000000pt; font-weight: medium; font-style: Italic; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } EM.Dialog-Box-Title { font-size: 11.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial Narrow"; } EM.Emphasis { font-style: Oblique; } EM.EquationVariables { font-style: Italic; } EM.IXgenMarker { text-decoration: underline ; } EM.SmallCaps { text-transform: none; } EM.Subscript { vertical-align: sub; } EM.Superscript { vertical-align: super; } EM.SymbolFont { font-family: "Symbol"; } EM.TableCode { font-size: 10.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Courier New"; } EM.Underline { text-decoration: underline ; } EM.URL { font-size: 11.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Courier New"; } EM.zAuto-Format { font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; font-family: "Arial"; } EM.zAuto-FormatGray { font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #b2b2b2; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } EM.zBulletGray { font-size: 10.000000pt; font-weight: Bold; font-style: Regular; color: #b2b2b2; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } EM.zBulletHyphen { font-size: 11.000000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; font-family: "Arial"; } EM.zCaptionNumberFormat { font-size: 9.500000pt; font-weight: Bold; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } EM.zPageNumber { font-size: 9.000000pt; font-weight: medium; font-style: Regular; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Times New Roman"; } EM.zWhite { font-size: 4.000000pt; font-weight: medium; font-style: Regular; color: #ffffff; text-decoration: none; vertical-align: baseline; font-family: "Times New Roman"; } img.floating { float: right; margin: lex; } pre.codeexample { font-size: 8.0 pt; font-family: "courier new"; margin-left: 24 pt; } ace-6.4.5+dfsg.orig/MPC/docs/README0000644000175000017500000013617713154167361014535 0ustar tggtgg .:: 3/13/2002 ::. The Makefile, Project and Workspace Creator. Designed by Justin Michel (michel_j@ociweb.com) and Chad Elliott. Implemented by Chad Elliott (elliott_c@ociweb.com). A single tool (MPC) can be used to generate tool specific input (i.e., Makefile, dsp, vcproj, etc.) The generator takes platform and building tool generic files (mpc files) as input which describe basic information needed to generate a "project" file for various build tools. These tools include Make, NMake, Visual C++ 6, Visual C++ 7, etc. One of the many unique and useful features of the Makefile, Project and Workspace Creator is that the project definition files can employ the idea of inheritance. This feature allows a user to set up a basic base project (mpb file) that can contain information that is applicable to all sub-projects. Things such as include paths, library paths and inter-project dependencies could be described in this base project and any project that inherits from it would contain this information as well. Another set of files, known as template input files (mpt files), provides the generator with the necessary information to fill platform and build tool specific information for dynamic and static library and binary executable projects. Together, the generic input files and the template input files are applied toward a platform and build specific template (mpd file) to create the final product (a build tool specific input file). These templates contain "variables" that are filled in by the project creator with information gathered through the mpc and mpt files and possibly by default values set within the template itself. Workspaces are defined by providing a list of mpc files in a single (mwc) file. For each mpc file specified, the workspace creator (mwc.pl) calls upon the project creator to generate the project. After all of the projects are successfully generated, the tool specific workspace is generated containing the projects and any defined inter-project dependency information (if supported by the build tool). If no workspace files are provided to the workspace creator, then the current directory is traversed and any mpc files located will be part of the workspace that is generated. Workspace Declarations ---------------------- workspace(workspace_name) { file.mpc directory relative/path/to/another/mwc_file } Workspaces can contain individual mpc files, directories or other mwc files. In the case of a directory, the workspace creator will traverse it and use any mpc files that are found. If another workspace file is listed in the workspace files, it will be aggregated into the workspace with paths relative to the directory in which the main workspace is found. These "aggregated" workspaces should not inherit from any other base workspace. The workspace files should have an 'mwc' extension. You can exclude directories and .mpc files from a workspace using the 'exclude' scope operator: workspace { dir1 dir2 // exclude this_dir for all project types exclude { dir2/this_dir } // exclude other_dir for vc6, vc71, vc8, and vc9 types exclude(vc6, vc71, vc8, vc9) { dir2/other_dir } // exclude unix_only for every type except gnuace and make exclude(!gnuace, !make) { dir2/unix_only } // exclude non_window for every windows project type exclude(prop:windows) { dir2/non_windows } // exclude microsoft_only for all non-microsoft project types exclude(!prop:microsoft) { dir2/microsoft_only } dir3 // Associate the name "other" with dir3 associate(other) { dir3 } specific(rpmspec) { rpm_version = 1.0 } } The associate scope associates a name with one or more directories. This does not add directories to a workspace, it only makes an association. This may or may not have an effect on the generated workspace; it depends solely upon whether the project type supports associations. Currently automake is the only project type that supports associations. Each directory listed under an association is grouped together and built conditionally based on the association name. Workspaces support a 'specific' clause conceptually and syntactically similar to the project 'specific' clause, described below. Any variables assigned within the clause are only available to workspaces, not to projects. Two sorts of assignments are possible: first are assignments to the keywords cmdline and implicit (described in the section 'Workspaces', below) and the second are type-specific variables. Consult the documentation for the type for details on type-specific variables. Keyword assignments (cmdline and implicit) impact the entire workspace, not just the 'specific' scope. Finally, prop:value are properties in MPC. They are used to group together common workspace/project types. More details on properties in MPC can be found in the section on the 'specific' keyword in the Project Declarations section below. Project Declarations -------------------- project(project_name) : baseproject, anotherbaseproject { exename = foo includes += "." libpaths = directory Source_Files { file1.cpp file2.cpp . . fileN.cpp } Header_Files { file1.h file2.h . . fileN.h } } MPC expects all files to be listed with forward slashes (/) if a file name contains a directory. Providing files with back slashes (\) can cause unexpected results during generation. When listing files within components (Source_Files, Header_Files, etc.), you can use wild cards (*?[]) to include groups of files as can be done in shells. You can exclude files by preceding the name (or wild card) with the '!', but this sort of exclusion only pertains to files that exist in the directory at the time of project generation. There is an additional syntax similar to the '!' ('^') which works the same as the '!' except that after all of the source files are added to the list (after automatic custom generated files are added) these files are explicitly removed from the list. The (project_name) part of the project declaration is optional. If it is left off, the project name will default to the name of the mpc file without the extension. Inheritance is optional. If the project name or workspace name contains an asterisk (*) then the default project (workspace) name will be used in its place. For example, if the mpc file is named example.mpc and it contains the following: project(*client) { The project name will be example_client. If the any part of the modified project (workspace) name contains a capital letter then each word will be capitalized. For instance, if the above mpc file example was named Example.mpc, then the modified project name would be Example_Client. If the value set for exename contains an asterisk then the asterisk portion of the name will be replaced with the current project name. The same logic applies to sharedname, staticname, after and libs. If multiple projects are going to be contained within a single workspace (using mwc.pl), there can be no duplication of project names. This is disallowed due to limitations of some workspace tools. Project Keywords ---------------- exename Specifies the name of the executable that will be created sharedname Specifies the name of the shared library that will be created staticname Specifies the name of the static library that will be created buildflags This keyword can only be used as a source component scoped setting (ie. inside the scope of Source_Files). It specifies additional build flags that will be passed to the compiler as the source files are being compiled. dependent_upon This keyword can only be used as a header component scoped setting (ie. inside the scope of Header_Files). It determines which file the header file is dependent upon for vc8, and vc9 only. dllout If defined, specifies where the dynamic libraries will be placed. This overrides libout in the dynamic case. libout Specifies where the dynamic and static libraries will be placed exeout Specifies where executables will be placed (Previously known as install) managed This keyword can be used as a global setting or as a source component scoped setting (ie. inside the scope of Source_Files). It specifies that the source files should be compiled as managed C++. Since this is Microsoft specific, it is only supported by the nmake, vc7 - vc14, and vs* project types. no_pch This keyword can only be used as a source component scoped setting (ie. inside the scope of Source_Files). It specifies that precompiled headers should not be used for the source files listed within the scope of it's setting. pch_header Specifies the precompiled header file name pch_source Specifies the precompiled source file name postbuild If this is defined in the project, the value will be interpreted as commands to run after the project has been successfully built. The <%..%> construct can be used within this value to access template variables and functions of the template parser. In addition, the following pseudo variables can be used. <%cat%> - Platform non-specific command to cat a file. <%cmp%> - Platform non-specific compare command. <%cp%> - Platform non-specific copy command. <%mkdir%> - Platform non-specific mkdir command. <%mv%> - Platform non-specific move command. <%os%> - Returns either win32 or unix. <%rm%> - Platform non-specific delete command. <%rmdir%> - Platform non-specific recursive directory delete command. <%nul%> - Platform non-specific null device. <%pathsep%>- Platform non-specific path separator (; or :). <%gt%> - Project non-specific greater than sign. <%lt%> - Project non-specific less than sign. <%and%> - Project non-specific and sign. <%or%> - Project non-specific or sign. <%quote%> - Project non-specific double quote. <%slash%> - Platform non-specific directory separator. <%equote%> - Project non-specific escaped quote. <%crlf%> - Platform non-specific line ending. <%cmdsep%> - Project/platform non-specific command separator which always runs the right-hand side command. prebuild This is similar to postbuild except that it will be performed before the build instead of after. postclean This is similar to postbuild except that it will be performed after cleaning up the project (the realclean target for make based project types). NOTE: This is not used in the IDE based project types since there is no hook for such an action. recurse If set to 1, MPC will recurse into directories listed under component listings and add any component corresponding files to the list. This keyword can be used as a global project setting or a component scoped setting. version Specifies the version number for the library or executable macros These values will be passed as macros to the compiler. libpaths Specifies 1 or more locations to find libraries recursive_libpaths Specifies 1 or more locations to find libraries which will be added recursively. includes Specifies 1 or more locations to find include files libs Specifies 1 or more libraries to link into the exe or library recursive_includes Specifies 1 or more locations to find include files which will be added recursively. lit_libs Specifies 1 or more libraries to link into the exe or library. If libraries receive a library decorator, then these will not. pure_libs Specifies 1 or more libraries to link into the exe or library. The values specified for this variable are passed to the linker unmodified. after Specifies that this project must be built after 1 or more project names listed. An extended syntax is available in order to associate name-value pairs with a dependency: These name-value pairs may be used in the creation of the dependencies of the project. custom_only Create a project that contains only custom generation targets (any file type described by a Define_Custom section). This will automatically be set to 1 when a project contains no source or resource files, but does contain custom input files. dynamicflags Specifies preprocessor flags needed for dynamic libraries staticflags Specifies preprocessor flags needed for static libraries verbatim This allows arbitrary information to be place in a generated project file. The syntax is as follows: verbatim(, [, 1]) { .. .. } When MPC is generating a project of type and comes upon a marker that matches the name, it will place the text found inside the construct directly into the generated project. If the third and optional parameter is passed and is true, the verbatim section will be added to existing verbatim settings at the same location. If you need to preserve white space, the line or lines should be placed inside double quotes. specific This scope allows assignments that are specific to a particular project type or property. The syntax is as follows: specific( [, ...]) { lit_libs += c ... } or specific( [, ...]) { lit_libs += c ... } else { lit_libs += c_other ... } If the else is provided, it is required to be on the same line as the closing curly brace. You may also negate the project type (using '!') which will cause the specific to be evaluated for all types except the type specified. The following property names are available: borland, make, microsoft, windows, and static. The table below shows which properties apply to which project types. The static property will be set if the -static option was supplied. Additionally, a property that corresponds to the language will be set (e.g., cplusplus, csharp, java, vb). | borland | make | microsoft | windows | ---------+---------+------+-----------+---------| automake | | X | | | bcb2007 | X | | | X | bcb2009 | X | | | X | bds4 | X | | | X | bmake | X | X | | X | cc | | | | X | em3 | | | X | X | ghs | | | | ? | make | | X | | | nmake | | X | X | X | vc* | | | X | X | vs* | | | X | X | wix | | | | X | ? - indicates that this is controlled by the MPC_GHS_UNIX environment variable. If a keyword is not recognized as a valid MPC keyword, it is interpreted as a template value modifier. In this situation, this construct has the exact same restrictions as the -value_template command line option. See the USAGE file for more information. Scopes are available in some of the MPC templates. These scopes are created by using a template variable within a <%foreach%> context. The scope will be, one at a time, each space separated words within the template variable value. Variables can be modified using a scope modifier. For example, the word 'FOO' will be added to the template variable 'defines' when it is seen in the 'Debug' scope: specific { Debug::defines += FOO } expand This scope allows the specification for a variable that is found within $() to be expanded from the list of possible values. These possible values can contain environment variables (specified by $VAR_NAME) and plain text. If a possible value contains an environment variable and that variable is defined then this value is used to expand the $() variable. If the environment variable is not defined then this possible value is not used. The syntax is as follows: expand() { . . } conditional This scope allows addition of source files conditionally based on a particular project type or property as describe in the 'specific' section. The syntax is as follows: conditional( [, ...]) { source1.cpp ... } or conditional( [, ...]) { source1.cpp ... } else { source2.cpp ... } If the else is provided, it is required to be on the same line as the closing curly brace. You may also negate the project type (using '!') which will cause the conditional to be evaluated for all types except the type specified. requires Specifies which features should be enabled in order to generate the project file. avoids Specifies which features should be disabled in order to generate the project file. webapp Determines whether the project is a Web Application or not. A web application project will have no project file written but the information will be included in the workspace (if web applications are supported by the project type). C# Specific Project Keywords ---------------------------- dependent_upon This can only be applied to source and resx components. It determines which file the source or resx file is dependent upon for vc8 - vc14, vs* only. generates_source This can only be applied to resx components. It indicates that the resx file or files auto generates a source file for vc8 - vc14, vs* only. A value of '1' indicates that the resx file generates a source file and the default generator is used. Any other value indicates that the resx file generates a source file and the generator name is taken from the value supplied. The auto generated name is created by taking the resx file without the extension and appending .Designer.cs. subtype This can only be applied to source and resx components. It determines the SubType setting for vc8 - vc14, vs* only. Custom File Definitions ----------------------- In order to support a variety of custom build rules, MPC allows you to define your own custom file types. Below is an example of a custom definition. project { Define_Custom(MOC) { automatic_in = 0 automatic_out = 0 command = $(QTDIR)/bin/moc postcommand = echo <%quote%>#include <%lt%>some.h<%gt%><%quote%> <%gt%> <%temporary%> <%and%> \ <%cat%> <%output%> <%gt%><%gt%> <%temporary%> <%and%> \ <%mv%> <%temporary%> <%output%> output_option = -o inputext = .h pre_extension = _moc source_outputext = .cpp } MOC_Files { QtReactor.h } Source_Files { QtReactor_moc.cpp } } The above example defines a custom file type "MOC" which describes basic information about how to process the input files and what output files are created. Once the custom file type is defined, MOC_Files can be defined in order to specify the input files for this new file type. Define_Custom definitions may use single inheritance. This is useful for creating aliased names: Define_Custom(QtMOC) : MOC { } Here is a list of keywords that can be used within the scope of Define_Custom or Modify_Custom: automatic This keyword is deprecated. Use automatic_in and automatic_out instead. automatic_in If set to 1, then attempt to automatically determine which files belong to the set of input files for the custom type. If set to 0, then no files are automatically added to the input files. If omitted, automatic_in is assumed to be 1. automatic_out If set to 1, then attempt to automatically determine which generated files belong to the set of components (e.g., Source_Files, Header_Files, etc.) based on the type of file generated from the custom command. If set to 0, then no files are automatically added to the various components. If omitted, automatic_out is assumed to be 1. command The name of the command that should be used to process the input files for the custom type. commandflags Any options that should be passed to the command go here. dependent If this is given a value, then a dependency upon that value will be given to all of the generated files. The default for this is unset and no dependency will be generated. dependent_libs If this is given a value, then a dependency upon that library value will be given to all of the generated files. The format for this entry should be the basename for the library (no library prefix, postfix, or extension) preceded by any relative or absolute path to the library. The typical use for this would be so that a project is rebuilt when a library needs to be rebuilt for its dependent executable. The default for this is unset and no dependency will be generated. inputext This is a comma separated list of input file extensions that belong to the command. keyword This is a special assignment that takes the form of the following: keyword newname = existing_custom_name This has the effect of mapping newname to be the same as existing_custom_name. existing_custom_name, which is optional, corresponds to one of the keywords available within a Define_Custom scope (except for keyword). This function puts newname into the project level scope such that it can be used outside of the scope of the particular custom file type being defined. It should be noted that the mapped keywords can not be used within the scope of a 'specific' clause. It does not cause an error, but it has absolutely no affect. If existing_custom_name is not supplied, then the only way to utilize the newname value is from within the template code. ex. <%newname%> libpath If the command requires an additional library path, add it here. output_option If the command takes an option to specify only a single file output name, then set it here. Otherwise, this should be omitted. output_follows_input This setting defaults to 1 and indicates that output files from the custom command will end up in the same directory as the input files. If this is set to 0, it is assumed that the output files will go into the same directory as the .mpc file. pch_postrule If this is set to 1, then a rule will be added to the custom rule that will modify the source output files to include the precompiled header file. postcommand Allows a user to execute arbitrary commands after the main command is run to generate the output file. The following pseudo variables can be accessed from within the postcommand assignment: <%input%> - The input file for the original command. <%output%> - The output created by the original command. <%input_basename%> - The basename of the input file. <%input_dirname%> - The directory of the input file. <%input_noext%> - The input file with no extension. <%output_basename%> - The basename of the output file. <%output_dirname%> - The directory of the output file. <%output_noext%> - The output file with no extension. The output file can be referenced as a generic output file using <%output%> or can be referenced as a component file (if it matches the particular type) using one of the following: <%source_file%> <%template_file%> <%header_file%> <%inline_file%> <%documentation_file%> <%resource_file%> The output file without an extension can be referenced as a generic output file using <%output_noext%> or can be referenced as a component file (if it matches the particular type) using one of the following: <%source_file_noext%> <%template_file_noext%> <%header_file_noext%> <%inline_file_noext%> <%documentation_file_noext%> <%resource_file_noext%> The following are also available for use within the postcommand setting. They return the extension (if there is any) of the input and output files respectively: <%input_ext%> <%output_ext%> The following pseudo template variables, in addition to all project settings, are valid for use within the command, commandflags, dependent, postcommand and output_option settings: <%and%> - Project non-specific and sign. <%cat%> - Platform non-specific command to cat a file. <%cmdsep%> - Project/platform non-specific command separator which always runs the right-hand side command. <%cp%> - Platform non-specific copy command. <%gendir%> - The output directory specified by the gendir setting. <%gt%> - Project non-specific greater than sign. <%lt%> - Project non-specific less than sign. <%nul%> - Platform non-specific null device. <%mkdir%> - Platform non-specific mkdir command. <%mv%> - Platform non-specific move command. <%or%> - Project non-specific or sign. <%quote%> - Project non-specific double quote. <%rm%> - Platform non-specific delete command. <%temporary%> - A temporary file name. <%prj_type%> - The project type supplied by the -type option. The following pseudo template variables will be set to the known extension for Windows and empty on non-Windows based project types. <%bat%> - The extension for batch files. <%cmd%> - The extension for command files. <%exe%> - The extension for executable files. If any referenced pseudo template variable does not contain a value, then the particular setting (command, commandflags, dependent, postcommand or output_option) will not be used. It should also be noted that use of automatically generated project settings, such as sharedname, exename, etc., may not exist at the time that a project setting is evaluated and will end up empty. To avoid this situation, explicitly set project settings that are going to be used within this context. pre_extension If the command produces multiple files of the same extension, this comma separated list can be used to specify them. For example, tao_idl creates two types of files per extension (C.h, S.h, C.cpp, S.cpp, etc). source_pre_extension This is the same as pre_extension except that it only applies to source files. inline_pre_extension This is the same as pre_extension except that it only applies to inline files. header_pre_extension This is the same as pre_extension except that it only applies to header files. template_pre_extension This is the same as pre_extension except that it only applies to template files. resource_pre_extension This is the same as pre_extension except that it only applies to resource files. documentation_pre_extension This is the same as pre_extension except that it only applies to documentation files. generic_pre_extension This is the same as pre_extension except that it only applies to generic files. pre_filename This is similar to pre_extension except that the values are prepended to the file name instead of the extension. source_pre_filename This is the same as pre_filename except that it only applies to source files. inline_pre_filename This is the same as pre_filename except that it only applies to inline files. header_pre_filename This is the same as pre_filename except that it only applies to header files. template_pre_filename This is the same as pre_filename except that it only applies to template files. resource_pre_filename This is the same as pre_filename except that it only applies to resource files. documentation_pre_filename This is the same as pre_filename except that it only applies to documentation files. generic_pre_filename This is the same as pre_filename except that it only applies to generic files. pre_dirname This is similar to pre_filename except that the value is prepended to the directory portion of the file name instead of the file name itself. If a separate directory is desired, the pre_dirname setting should end in a slash. source_pre_dirname This is the same as pre_dirname except that it only applies to source files. inline_pre_dirname This is the same as pre_dirname except that it only applies to inline files. header_pre_dirname This is the same as pre_dirname except that it only applies to header files. template_pre_dirname This is the same as pre_dirname except that it only applies to template files. resource_pre_dirname This is the same as pre_dirname except that it only applies to resource files. documentation_pre_dirname This is the same as pre_dirname except that it only applies to documentation files. generic_pre_dirname This is the same as pre_dirname except that it only applies to generic files. source_outputext This is a comma separated list of possible source file output extensions. If the command does not produce source files, then this can be omitted. inline_outputext This is a comma separated list of possible inline file output extensions. If the command does not produce inline files, then this can be omitted. header_outputext This is a comma separated list of possible header file output extensions. If the command does not produce header files, then this can be omitted. template_outputext This is a comma separated list of possible template file output extensions. If the command does not produce template files, then this can be omitted. resource_outputext This is a comma separated list of possible resource file output extensions. If the command does not produce resource files, then this can be omitted. documentation_outputext This is a comma separated list of possible documentation file output extensions. If the command does not produce documentation files, then this can be omitted. generic_outputext If the command does not generate any of the other output types listed above, then the extensions should be listed under this. If the custom output can not be represented with the above output extension keywords (*_outputext) and you have knowledge of the output files a priori, you can represent them with the '>>' construct. Below is an example that demonstrates the use of '>>'. The command takes an input file name of foo.prp and produces two files that have completely unrelated filenames (i.e. foo !~ hello). project { Define_Custom(Quogen) { automatic_in = 0 automatic_out = 0 command = perl quogen.pl commandflags = --debuglevel=1 --language=c++ \ --kernel_language=c++ inputext = .prp keyword quogenflags = commandflags } Quogen_Files { foo.prp >> hello.h hello.cpp } Source_Files { hello.cpp } } You can use the '<<' construct to represent dependencies for specific custom input file. For instance, in the above example, assume that foo.prp depends upon foo.in, we would represent this by adding << foo.in as shown below. Quogen_Files { foo.prp >> hello.h hello.cpp << foo.in } There is a construct that can be used within a Define_Custom section called 'optional' and can be used to represent optional custom output dependent upon particular command line parameters passed to the custom command. project { Define_Custom(TEST) { optional(keyword) { flag_keyword(option) += value [, value] } } } In the above example, keyword can be any of the pre_extension, pre_filename or keywords that end in _outputext. flag_keyword can be any of the custom definition keywords, however only commandflags really make any sense. Inside the parenthesis, the flag_keyword value is searched for the 'option' value. If it is found, then the 'value' after the += is added to the list specified by 'keyword'. This can also be negated by prefixing 'option' with an exclamation point (!). project { Define_Custom(IDL) { source_pre_extension = C, S optional(source_pre_extension) { commandflags(-GA) += A } } } In the preceding example, the source_pre_extension contains C and S. The optional clause can be read as follows: If 'commandflags' contains -GA then add A to source_pre_extension. Particular output extensions are not required. However at least one output extension type is required in order for MPC to generate a target. Within graphical build environments, the custom input file will be listed regardless of the presence of an extension definition. In this case, the input file will be "excluded" from the build. For custom file types, there are a few keywords that can be used within the custom file type input lists: command, commandflags, dependent, dependent_libs, gendir and postcommand. These keywords (except for gendir) can be used to augment or override the values of the same name defined in a Define_Custom section. gendir can be used to specify the directory in which the generated output will go. Below is an example: MOC_Files { commandflags += -nw gendir = moc_generated QtReactor.h } Source_Files { moc_generated/QtReactor_moc.cpp } In the above example, the generated file (QtReactor_moc.cpp) is placed in the moc_generated directory and the -nw option is added to commandflags. It should be noted that if the custom file definition does not set the output_option then you must provide the necessary options in commandflags to ensure that the generated output goes into the directory specified by gendir. The following example illustrates the use of the keyword mapping capability of the Define_Custom: project { Define_Custom(CIDL) { automatic_in = 0 automatic_out = 0 command = $(CIAO_ROOT)/bin/cidlc commandflags = -I$(TAO_ROOT)/tao -I$(TAO_ROOT)/orbsvcs/orbsvcs -- inputext = .cidl source_outputext = _svnt.cpp generic_outputext = E.idl // Allow cidlflags to be used outside the scope of CIDL_Files keyword cidlflags = commandflags } // This will get added to all commandflags for CIDL_Files cidlflags += --some_option CIDL_Files { // This will have a combination of the original commandflags plus // the value added to cidlflags above. file.cidl } CIDL_Files { // This will have a combination of the original commandflags plus // the value added to cidlflags above plus the value added to // cidlflags here. cidlflags += --another_option another_file.cidl } } A Modify_Custom section can be used to modify an existing custom definition. The Define_Custom must be processed prior to processing a Modify_Custom section; otherwise, an error will occur. Special type of feature project ------------------------------- A feature project contains information as a project would, but can only be a base project and will only be added to a sub project if the features that it requires (or avoids) are present. A feature definition requires at least one feature name. A name by itself specifies that the feature is required. A '!' in front of the feature name indicates that the feature must be disabled. There may be more than one feature listed between the parenthesis and they must be comma separated. Each feature will be logically anded together. The following feature definition requires that the qt feature be enabled. feature(qt) { Define_Custom(MOC) { automatic_in = 0 automatic_out = 0 command = $(QTDIR)/bin/moc output_option = -o inputext = .h pre_extension = _moc source_outputext = .cpp } MOC_Files { QtSpecific.h } Source_Files { QtSpecific_moc.cpp } } Assuming that the above feature definition is stored in a file named qt_specific.mpb, an mpc project could inherit from it and would only receive the feature definition if the qt feature was enabled. project: qt_specific { ... } Feature Files ------------- Features are enabled and disable within feature files or through the use of the -features option (see USAGE for more details). The first feature file read is always global.features found in the config directory. The second feature file read is the project type name with .features appended (ex. vc71.features, make.features, etc.) which must be located in the same directory as the global.features file. Lastly, the file specified by the -feature_file option is read if this option is used. Each successive feature file has precedence over the previous. That is, if a feature has already been set previously it is overridden. The -features option has precedence over feature files. Special Keywords Available to Templates --------------------------------------- project_name This contains the name of the project. project_file This contains the name of the output file. guid This is used by the VC7 project and workspace creator. configurations When used within a foreach context, this info (each configuration) is gathered for use with the VC7 workspace creator. flag_overrides Used to determine flags that have been overridden on a per file basis. custom_types The list of custom file types that may have been defined in the mpc file or a base project. fornotlast Insert the text on every foreach iteration except the last. forlast Insert the text only on the last foreach iteration. fornotfirst Insert the text on every foreach iteration except the first. forfirst Insert the text only on the first foreach iteration. forcount By default, a one based index number of the foreach iterations. The base can be modified by providing a base number in the foreach as in the following examples: <%foreach(4, includes)%> ... <%endfor%> <%foreach(include, 4, includes)%> ... <%endfor%> If the list variable ('includes' in the above example) is a function call, it is necessary to provide both a variable name and a base count number. Project Variable and Template Input Variable Interaction -------------------------------------------------------- Project variables and template input variables are separate entities and in the context of the TemplateParser, template input variables have precedence over project variables. This means that if the project keyword 'libout' is set in an MPC project and is set as a template input variable, the template input variable value will be used. There are exceptions to this rule. The following list shows the project keywords that have their MPC project value appended to the template input value (if there is a template input value). libpaths includes libs lit_libs pure_libs dynamicflags staticflags requires avoids macros Workspaces ---------- Workspaces (mwc files) can have assignments similar to projects. There are currently only two assignments allowed. The first is 'cmdline'. The values given to the cmdline assignment will be processed as command line options, but only to the projects that are contained within the workspace (or the scope of the assignment). All command line options are valid for cmdline, except for the following: -exclude, -for_eclipse, -gendot, -gfeature_file, -into, -make_coexistence, -noreldefs, and -recurse. The second assignment is 'implicit'. This assignment takes two different types of values. It takes a boolean value (0 or 1) to indicate that an implicit project should be created in directories that contain no mpc file, but contain project related files (source, headers, etc.). The default value for implicit is 0. It also takes a character string that represents a base project (similar to the -base option). In this case, implicit is enabled and each implicitly generate project file will have the base project or base projects (when addition is used) when the project is created. Defaulting Behavior ------------------- 1) If a project name is not specified: it will be defaulted to the name of the mpc file without the extension 2) If a particular list is not specified (Source_Files, Header_Files, etc.): all of the files in the directory will be added to the corresponding list by extension 3) If the custom type is automatic (both input and output) and custom files (ex., idl files) exist in the directory and the custom files components (ex., IDL_Files) are left defaulted (i.e. not listed) or the custom files components are specified and none of the custom generated files are listed in the corresponding lists: the custom files are added to the custom files component list if they weren't specified and all of the (would be) generated files will be added to the front of the corresponding lists (source, inline and header lists) 4) If files are listed in the Source_Files list and a corresponding header or inline file exists: the corresponding file will be added to the corresponding list (if it isn't already there) 5) If a sharedname is specified and staticname is not: staticname is assigned the sharedname value (the same applies if staticname is specified and sharedname is not) 6) If exename is specified then the project target is considered an executable. If neither exename, sharedname or staticname are used and any of the source files listed contains a language dependent "main", then the project target is considered an executable, otherwise it is considered a library. 7) If pch_header is not specified and a header file matches *_pch.h: it is assumed to be the precompiled header file (the same applies to pch_source) Processing Order ---------------- 1) Project file is read 2) Template input file is read 3) Template file is read 4) Output project is written ace-6.4.5+dfsg.orig/MPC/docs/USAGE0000644000175000017500000004334613154167361014437 0ustar tggtggRunning the Workspace Generator ------------------------------- The most common way to use the Make Project Creator is to run the workspace generator (mwc.pl). This script will generate projects and a single workspace that contains the generated projects. If no input file (.mwc file) is specified, it will recurse into the directory in which the script was started. It looks for .mpc files and generates a project or projects for each one found. Usage: mwc.pl [-global ] [-include ] [-recurse] [-ti :] [-hierarchy] [-template ] [-relative NAME=VAL] [-base ] [-noreldefs] [-notoplevel] [-static] [-genins] [-use_env] [-value_template ] [-value_project ] [-make_coexistence] [-feature_file ] [-gendot] [-expand_vars] [-features ] [-exclude ] [-name_modifier ] [-apply_project] [-version] [-into ] [-gfeature_file ] [-nocomments] [-relative_file ] [-for_eclipse] [-workers <#>] [-workers_dir | -workers_port <#>] [-language ] [-type ] [files] -base Add as a base project to each generated project file. Do not provide a file extension, the .mpb extension will be tried first; if that fails the .mpc extension will be tried. -exclude Use this option to exclude directories or files when searching for input files. -expand_vars Perform direct expansion, instead of performing relative replacement with either -use_env or -relative options. -feature_file Specifies the feature file to read before processing. The default feature file is default.features under the config directory. -features Specifies the feature list to set before processing. -for_eclipse Generate files for use with eclipse. This is only useful for make based project types. -gendot Generate .dot files for use with Graphviz. -genins Generate .ins files for use with prj_install.pl. -gfeature_file Specifies the global feature file. The default value is global.features under the config directory. -global Specifies the global input file. Values stored within this file are applied to all projects. -hierarchy Generate a workspace in a hierarchical fashion. -include Specifies a directory to search when looking for base projects, template input files and templates. This option can be used multiple times to add directories. -into Place all output files in a mirrored directory structure starting at . This should be a full path. If any project within the workspace is referenced via a full path, use of this option is likely to cause problems. -language Specify the language preference; possible values are [cplusplus, csharp, java, vb]. The default is cplusplus. -make_coexistence If multiple 'make' based project types are generated, they will be named such that they can coexist. -name_modifier Modify output names. The pattern passed to this parameter will have the '*' portion replaced with the actual output name. Ex. *_Static -apply_project When used in conjunction with -name_modifier, it applies the name modifier to the project name also. -nocomments Do not place comments in the generated files. -noreldefs Do not try to generate default relative definitions. -notoplevel Do not generate the top level target file. Files are still processed, but no top level file is created. -recurse Recurse from the current directory and generate from all found input files. -relative Any $() variable in an mpc file that is matched to NAME is replaced by VAL only if VAL can be made into a relative path based on the current working directory. This option can be used multiple times to add multiple variables. -relative_file Specifies the relative file to read before processing. The default relative file is default.rel under the config directory. -static Specifies that only static projects will be generated. By default, only dynamic projects are generated. -template Specifies the template name (with no extension). -workers Specifies number of child processes to use to generate projects. -workers_dir The directory for storing temporary output files from the child processes. The default is '/tmp/mpc' If neither -workers_dir nor -workers_port is used, -workers_dir is assumed. -workers_port The port number for the parent listener. If neither -workers_dir nor -workers_port is used, -workers_dir is assumed. -ti Specifies the template input file (with no extension) for the specific type (ex. -ti dll_exe:vc8exe). -type Specifies the type of project file to generate. This option can be used multiple times to generate multiple types. There is no longer a default. -use_env Use environment variables for all uses of $() instead of the relative replacement values. -value_project This option allows modification of a project variable assignment. Use += to add VAL to the NAME's value. Use -= to subtract and = to override the value. This can be used to introduce new name value pairs to a project. However, it must be a valid project assignment. -value_template This option allows modification of a template input name value pair. Use += to add VAL to the NAME's value. Use -= to subtract and = to override the value. -version Print the MPC version and exit. The default global input file (config/global.mpb) is used if -global is not specified on the command line. Two include directories are used by default (config and templates). Each project creator has a default template input file for each type of project (dll_exe, lib_exe, dll, lib). You can override the default template input file name with the -ti option. The file must have a 'mpt' extension and must reside within the include search directories. NOTE: the 'lib' and the 'lib_exe' template input files are only used when MPC is generating static projects. The -exclude option is used to exclude directories when searching for input files. NOTE: This option has no effect when used with mpc.pl. The -gendot option (useful only to mwc.pl) will result in the generation of .dot files for each workspace processed. Each .dot file will contain information that can be fed to Graphvis to display the dependency information for the various projects found within the workspace. The -genins option will cause MPC to generate an "install" file after processing each project that can be used in conjunction with the prj_install.pl script to install different parts of the project (such as header files) into an alternate location. The -hierarchy option is used to force the generation of a hierarchical workspace at each directory level in between the toplevel directory and the location of the mpc file that is being processed. This is the default for "make" based workspace creators. NOTE: This option only has an effect when passed to mwc.pl. The -template option is used to override the default template name. This file should have a .mpd extension and sit in one of the include search directories. NOTE: The -template option overrides the template file for all types specified. The -static option can be used to generate only static project files. The -static_only option has been replaced by the -static option. Currently, MPC only supports generating dynamic projects or static projects, but not both during the same run. To generate them both you must run MPC twice, once with the -static option and once without. Additionally, the vc6, em3, vc7, vc71 and vc8 project names will no longer automatically have _Static appended to the project name when generating static projects. This can still be achieved by using the -name_modifier option. When generating static projects, inter-project dependencies will not be generated for libraries within vc6, em3, vc7 and vc71 workspaces. The reason is due to the fact that each static library that depended upon another would be combined at the library creation stage, resulting in extremely large libraries. Dependencies are handled correctly by vc8 and later. This behavior can be modified by setting the MPC_DEPENDENCY_COMBINED_STATIC_LIBRARY environment variable. It will force MPC to generate inter-project dependencies for libraries within a single workspace. The -name_modifier option can be used to modify the generated workspace or project name. The parameter to the -name_modifier option is a pattern where an asterisk (*) within the pattern is replaced by the actual workspace or project name. Thus, passing -name_modifier '*_Static' to mwc.pl will result in all workspace and project names ending in _Static. (Ex. FOO_Static.dsw, FOO_Static.dsp, etc.) The -apply_project option, when used in conjunction with the -name_modifier option, causes MPC to apply the name modifier to the project name in addition to the workspace and project file names. This option has no effect outside the scope of the -name_modifier option. The -noreldefs option says not to generate default relative definitions for *_ROOT (which comes from environment variables). The -notoplevel option tells mwc.pl to generate all projects for a workspace, but do not generate the top level workspace file. For mpc.pl, it says process the mpc files, but do not generate the project files. The -recurse option is used to search for all files that could be processed from the current directory and its sub-directories. If directories are passed in a comma separated list (e.g -recurse=examples,apps,TAO), then those directories will be excluded when searching for project or workspace files. The -type option can be used multiple times on the same command line to generate projects of different types per mpc file. NOTE: The -ti option overrides the template input file for all types specified. The -feature_file specifies a file to be read that enables or disables features. These feature names can be anything, but they should correspond to values used for the 'requires' and 'avoids' keywords. If a feature is required and is not enabled then the project will not be created. If a feature is to be avoided and it is enabled then the project will not be created. The -features specifies additional list of features values. Values specified by this option overwrite values from features files. Example: mwc.pl -features "qos=1,ssl=0" ace.mwc The -features option can be used multiple times on the same command line, the effect is the same as if the parameters had been specified with a single -features options, with the parameters joined by commas. The -value_template option can be used to set various template variables. If a template variable value will contain spaces, it is best to enclose the whole setting in double quotes and use single quotes within the value to retain spaces (if it is necessary). Below is an example where the value will have spaces and some spaces need to be retained. mwc.pl -value_template "configurations=Debug Release 'Memcheck Debug' 'Memcheck Release'" Running only the Project Generator ---------------------------------- Most of what is stated about the Workspace Generator applies to the Project Generator except that it only generates projects. If an input file (.mpc file) is not provided, the project creator will attempt to create a default project in the directory from which the script was started. MPC Codebase Configuration File ------------------------------- This configuration file can be used to specify alternate locations for the MPC Configuration File. If a base.cfg is found underneath the 'config' directory where MPC is executed, it will be read to determine the location of MPC.cfg based on the directory in which MPC was started. For example, if $MPC_ROOT/mwc.pl is run under /foo/bar_root/src and $MPC_ROOT/config/base.cfg contained: /foo/bar_root = /foo/bar_root/MPC/config MPC would attempt to open and read /foo/bar_root/MPC/config/MPC.cfg as the MPC Configuration File. If the base configuration file is not present, MPC will try to use $MPC_ROOT/config/MPC.cfg as the MPC Configuration File. You may reference environment variables, accessed by $NAME, on either side of the equals sign. In either this file or the MPC Configuration File (see below), an alternate form of environment variable reference may be used for variables which are not expected to be defined in all scenarios. These variables use the syntax $?NAME instead of $NAME. With this syntax, if the environment variable NAME is not defined, no error or warning is printed by MPC, and the entire substring starting with $?NAME until the next whitespace is expanded to the empty string. MPC Configuration File ---------------------- In an effort to move away from the use of environment variables, a configuration file has been introduced. The configuration file (MPC.cfg) can contain settings to provide command line options, control logging and direct MPC to dynamic project types. The following keywords are allowed in the configuration file, which will be read from the 'config' directory of MPC. command_line - Provide additional command line options to MPC. The value of this setting will be prepended to the options passed to mwc.pl or mpc.pl. default_type - Provide a single project type (as specified by the -type option) as the default project type. dynamic_types - This comma separated list points to directories in which MPC will search for Perl modules to implement additional MPC project types, base projects or template files. This setting can be used to augment or replace functionality in MPC. For each suitable directory found, it will add a 'modules' include path for Perl to find modules, add a 'config' include path to locate base projects and a 'template' include path to find MPC templates. includes - Similar to the -include command line option, it adds the list of comma separated paths to the MPC include search paths. logging - If this setting contains info=1, informational messages will be printed. If it contains warn=1, warning messages will be printed. If it contains diag=1, diagnostic messages will be printed. If it contains debug=1, debug message will be printed. And lastly, if it contains detail=1, detail messages will be printed. If it contains none of these, MPC will not print out any information or warnings when processing projects or workspaces. Errors are always printed if any are encountered. The default is warn=1 diag=1 detail=1. main_functions - Provide additional main functions to be recognized in conjunction with automatic executable project recognition. The value assigned should be of the form :[, :]*. A function can be specified for all languages by only providing the function name. verbose_ordering - If this is set, mwc.pl will warn the user about references to projects in the 'after' keyword that have not been processed. Below is an example configuration file: // MPC configuration file dynamic_types = $ACE_ROOT/bin/MakeProjectCreator logging = info=1 warn=1 verbose_ordering = 1 Environment Variables --------------------- MPC_DEPENDENCY_COMBINED_STATIC_LIBRARY - See the -static section above. MPC_GHS_UNIX - This environment variable is only meaningful when generating the ghs project files. By default, the ghs type assumes that it is for Windows. If this is not the case, set this environment variable prior to running MPC. MPC_USE_WIN_COMMANDS - Setting this causes the Windows related pseudo template variables to be used regardless of the type of project being generated. ace-6.4.5+dfsg.orig/MPC/docs/templates/0000775000175000017500000000000013157240624015633 5ustar tggtggace-6.4.5+dfsg.orig/MPC/docs/templates/vc10.txt0000644000175000017500000005106413154167361017154 0ustar tggtgg// Document template variables for templates templates\vc10.mpd. // Please try to keep this alphabetically sorted. // add_references = If enabled, MPC will add Reference XML elements describing project-to-project references (set with the MPC after keyword) for .NET projects. additionalmanifestdependencies = Specifies attributes that will be placed in the dependency section of the manifest file. additionalusingdirectories = Specifies one or more directories (separate directory names with a semicolon) to be searched to resolve names passed to a #using directive. addmodulenamestoassembly = Add a module reference to an assembly. Type information in the module will not be available to the assembly program that added the module reference. However, type information in the module will be available to any program that references the assembly. allowisolation = Linker manifest option to specify behavior for manifest lookup. assemblerlistinglocation = Specifies relative path and/or name for ASM listing file; can be file or directory name. assembleroutput = Specifies the contents of assembly language output file. assemblydebug = Linker option to emit the DebuggableAttribute attribute with debug information tracking and disables JIT optimizations. assemblylinkresource = Linker option for creating a link to a .NET Framework resource in the output file; the resource file is not placed in the output file. assemblyreferences = List of .NET assemblies to reference in the project. baseaddress = Sets a base address for the program. basicruntimechecks = Perform basic runtime error checks, incompatible with any optimization type other than debug. browseinformation = Enable Browse Information : Specifies level of browse information in .bsc file. browseinformationfile = Specifies optional name for browser information file. buffersecuritycheck = Check for buffer overruns; useful for closing hackable loopholes on internet servers. The default is enabled. callingconvention = Select the default calling convention (Cdecl, FastCall, StdCall). clrimagetype = Sets the type of a CLR image (ForceIJWImage, ForcePureILImage, ForceSafeILImage). clrsupportlasterror = Preserve Last Error Code for PInvoke Calls (Enabled = default, Disabled, SystemDlls). clrthreadattribute = Explicitly specify the threading attribute for the entry point of your CLR program (MTAThreadingAttribute, STAThreadingAttribute). clrunmanagedcodecheck = Specifies whether the linker will apply SuppressUnmanagedCodeSecurityAttribute to linker-generated PInvoke calls from managed code into native DLLs. common_defines = Specifies macros that are common to all target types. compileas = Override default C or C++ selection (CompileAsC, CompileAsCpp). compileasmanaged = Use this only if you need to explicitly set the MSBuild XML CompileAsManaged tag. Otherwise use MPC's built-in keyword for "managed". comreferences = Creates references to COM libraries. Each entry in the list takes the form libraryname:guid=the_guid and can optionally list more attribute name/value pairs separated by commas. The libraryname includes .dll (or other extension). The valid attributes besides guid (with their defaults) are majorver (1), minorver (0), lcid (0), wrapper (tlbimp), isolated (false), copylocal (omitted), refout (for ReferenceOutputAssembly, omitted) and clsa (for CopyLocalSatelliteAssemblies, omitted). cpu_defines = Macros that are specific to a particular CPU platform. createhotpatchableimage = Prepares an image for hotpatching (Enabled, X86Image, X64Image, ItaniumImage). culture = Resource compiler option for the culture as a decimal language id (default 1033 = en-US). dataexecutionprevention = Marks an executable as having been tested to be compatible with Windows Data Execution Prevention feature. debug_cmd_args = Commandline arguments that have to be set before debugging debug_format = Specifies the type of debugging information generated by the compiler. debug_prj = This is an internally used template variable to determine if the configuration originated as "Debug". In the event that the 'optimize' template variable is overridden, debug_prj allows the correct run-time library to be chosen. debug_work_dir = Default working directory during debugging defines = Macros that are specific to a particular configuration. delayloaddlls = List of DLLs (semicolon-separated) to delay load. disablelanguageextensions = Compiler option for disabling language extensions. disablespecificwarnings = A space separated list of warning numbers to be disabled. driver = Linker option to build a Windows NT kernel mode driver (Driver, UpOnly, WDM). embedmanagedresourcefile = Embeds a resource file in the output file. embedmanifest = MSBuild property for EmbedManifest. enablecomdatfolding = Linker option to perform identical COMDAT folding (defaults to on if optimize is on). enableenhancedinstructionset = Enable use of instructions found on processors that support enhanced instruction sets, e.g., the SSE and SSE2 enhancements to the IA-32. Currently only available when building for the x86 architecture (StreamingSIMDExtensions, StreamingSIMDExtensions2). enablefibersafeoptimizations = Enables memory space optimization when using fibers and thread local storage access. enableintrinsicfunctions = Compiler switch for enabling intrinsic functions (defaults to true in Release configurations). encoding = XML encoding for the vcxproj file (default utf-8) entrypointsymbol = Specifies an entry point function as the starting address for an .exe file or DLL. errorreporting = Specifies how internal tool (compiler) errors should be reported back to Microsoft (None, Prompt, Queue, Send). exceptionhandling = Specifies the model of exception handling to be used by the compiler (Async, Sync, SyncCThrow, false). expandattributedsource = Create listing file with expanded attributes injected into source file. exportnamedfunctions = Librarian option to export one or more specified functions. favorsizeorspeed = Whether to favor code size or code speed, optimization must be turned on (Size, Speed, Neither). fixedbaseaddress = Creates a program that can be loaded only at its preferred base address. floatingpointexceptions = Reliable floating-point exception model. Exceptions will be raised immediately after they are triggered. floatingpointmodel = Sets the floating point model (Precise, Strict, Fast). forceconformanceinforloopscope = Used to implement standard C++ behavior for the for statement loops (defaults to on). forcedincludefiles = A semicolon-separated list of files that are forced includes. forcedusingfiles = A semicolon-separated list of files that are forced #usings. forcefileoutput = Linker option to create an .exe file or DLL even if a symbol is referenced but not defined or is multiply defined. It may create invalid exe file. (Enabled, MultiplyDefinedSymbolOnly, UndefinedSymbolOnly). forcesymbolreferences = A semicolon-separated list of symbols for the linker to add to the symbol table. functionlevellinking = Allows the compiler to package individual functions in the form of packaged functions (COMDATs). Required for edit and continue to work. functionorder = Linker option to optimize your program by placing certain COMDATs into the image in a predetermined order. LINK places the functions in the specified order within each section in the image. generatedebuginformation = Linker option for enabling debug information (defaults to true). generatemanifest = Specifies that the linker should create a side-by-side manifest file. generatemapfile = Specifies that the linker should create a mapfile. generatexmldocumentationfiles = Specifies that the compiler should generate XML documentation comment files (.XDC). guid = The value for this variable is generated during project generation. heapcommitsize = Specifies total heap allocation size in physical memory. heapreservesize = Specifies total heap allocation size in virtual memory. ignore_default_library_names = List of default libraries to ignore. ignorealldefaultlibraries = Ignore all default libraries. ignoreembeddedidl = Any IDL attributes in source code should not be processed into an .idl file. ignorestandardincludepath = Prevents the compiler from searching for include files in directories specified in the INCLUDE environment variable. imagehassafeexceptionhandlers = If specified, the linker will only produce an image if it can also produce a table of the image's safe exception handlers. This table specifies for the operating system which exception handlers are valid for the image. importlibrary = Overrides the default import library name. inlinefunctionexpansion = Select the level of inline function expansion (Disabled, OnlyExplicitInline, AnySuitable). intdir = Specify this to override the default intermediate directory. keycontainer = Specify a key container to sign an assembly. keyfile = Specify key or key pair to sign an assembly. If set, embedmanifest defaults to false. largeaddressaware = Tells the linker that the application can handle addresses larger than 2 gigabytes. lib_options = Additional command-line options for the librarian. link_options = Additional command-line options for the linker. linkerrorreporting = Allows you to provide linker internal compiler error (ICE) information directly to the Visual C++ team (PromptImmediately, QueueForNextLogin, SendErrorReport, NoErrorReport). linkstatus = Specifies whether the linker should display a progress indicator showing what percentage of the link is complete. linktimecodegeneration = Enables link time code generation of objects compiled with Whole Program Optimization. linkwarnaserror = Causes no output file to be generated if the linker generates a warning. makebuild = Command line to use for invoking nmake (makefile project only). makeclean = Command line to use for invoking nmake clean (makefile project only). makeoutput = Output file resulting from building with nmake. Having this set creates a makefile project. makerebuild = Command line to use for invoking nmake rebuild (makefile project only). manifestfile = Change the default name of the manifest file. The default name of the manifest file is the output file name with .manifest appended. mapexports = Include exported function in the mapfile (see generatemapfile). mapfilename = Override the default name for the generated mapfile (see generatemapfile). mergedidlbasefilename = Specifies the name and extension of the .idl file generated from embedded IDL. mergesections = A string of the form from=to. Combines the first section (from) with the second section (to), naming the resulting section to. midl_defines = Preprocessor definitions for the Microsoft IDL compiler. midl_flags = Additional options for the Microsoft IDL compiler. midl_includes = Include directories for the Microsoft IDL compiler. midl_notlb = If enabled, do not generate stubless proxies (Microsoft IDL compiler). midlcommandfile = Linker option for embedded Microsoft IDL, specifies a file containing a MIDL command line. minimalrebuild = Enables minimal rebuild, which determines whether C++ source files that include changed C++ class definitions (stored in header (.h) files) need to be recompiled. Defaults to true if optimization is disabled. minimumrequiredversion = Specify the minimum required version of the subsystem. moduledefinitionfile = Passes a module-definition file (.def) to the linker. Only one .def file can be specified. multiprocessorcompilation = Enables multi-processor compilation. nmakeassemblysearchpath = .NET assembly search path (makefile project only). nmakeforcedusingassemblies = Forced #using assemblies (makefile project only). noentrypoint = Use this option to prevent the linker from linking a reference to _main into the DLL. objectfilename = Specifies a name to override the default object file name; can be file or directory name. omitdefaultlibname = Do not include default library names in .obj files. omitframepointers = Suppresses creation of frame pointers on the call stack. openmp = A backwards compatibility variable that is equivalent to openmpsupport. openmpsupport = If set to true, enables OpenMP 2.0 language extensions. optimizereferences = Linker optimization that eliminates functions and/or data that are never referenced. output_subdir = This is used in determining the sub-directory under which intermediate files will be placed. pch_header_output = Specifies the path and/or name of the generated precompiled header file. pdbc = If this boolean template variable is set, the C/C++ Output Files property "Program Database File Name" will be set according to the project target. pdbl = If this boolean template variable is set, the Linker Debugging property "Generate Program Database File" will be set according to the project target. peruserredirection = When Register Output is enabled, Per-user redirection forces registry writes to HKEY_CLASSES_ROOT to be redirected to HKEY_CURRENT_USER. platform = Specifies the target platform. platform_defines = Macros that are specific to a particular platform. platformtoolset = Use an alternate toolset, for example from vc9 or a different Windows SDK release (PlatformToolset in the vcxproj file). preprocesskeepcomments = Suppresses comment strip from source code; requires that one of the 'Preprocessing' options be set. preprocesssuppresslinenumbers = Preprocess without #line directives. preprocesstofile = Preprocesses C and C++ source files and writes the preprocessed output to a file. This option suppresses compilation, thus it does not produce an .obj file. preventdllbinding = Sets a bit in a DLL's header that indicates to Bind.exe that the image is not allowed to be bound. You may not want a DLL to be bound if it has been digitally signed (binding invalidates the signature). profile = Produces an output file that can be used with the Performance Tools profiler. Requires GenerateDebugInformation (/DEBUG) to be set. profileguideddatabase = Specify .pgd file for profile guided optimizations. programdatabasefilename = Specifies a name for a compiler-generated PDB file; also specifies base name for the required compiler-generated IDB file; can be file or directory name. prversion = Project file version randomizedbaseaddress = Randomized Base Address referencepath = Semicolon-separated path for the MSBuild XML ReferencePath element. registeroutput = Specifies whether to register the primary output of this build. release_link_options = Allows passing arbitrary options to the linker when making a release build. removeobjects = Librarian option to omit the specified object from the output library. LIB creates an output library by combining all objects (whether in object files or libraries), and then deleting any objects specified in this option. runtime_library = This corresponds to the C/C++ Code Generation property "Runtime Library". If the template variable is set to one of (MultiThreaded, MultiThreadedDebug, MultiThreadedDLL, MuliThreadedDebugDLL), it overrides MPC's normal setting. Otherwise, the normal setting is determined based on the target (static/shared) and debug/release configuration. runtimetypeinfo = Adds code for checking C++ object types at run time (runtime type information). Default is true. sectionalignment = Specifies the alignment of each section within the linear address space of the program. The number argument is in bytes and must be a power of two. setchecksum = Sets the Checksum in the header of an .exe file. showincludes = Generates a list of include files with compiler output. showprogress = Prints linker progress messages. smallertypecheck = Enable checking for conversion to smaller types, incompatible with any optimization type other than debug. specifysectionattributes = Changes the attributes of a section, overriding the attributes set when the .obj file for the section was compiled. stringpooling = Enables the compiler to create a single read-only copy of identical strings in the program image and in memory during execution, resulting in smaller programs, an optimization called string pooling. stripprivatesymbols = Creates a second program database (PDB) file without private symbols when you build your program image with any of the compiler or linker options that generate a PDB file. structmemberalignment = Specifies boundaries for struct member alignment (1Byte, 2Bytes, 4Bytes, 8Bytes, 16Bytes). subsystem = Linker option to set a header telling the operating system how to run the .exe file. The choice of subsystem (Console, Windows, Native, EFI Application, EFI ROM, EFI Runtime, WindowsCE, POSIX) affects the entry point symbol (or entry point function) that the linker will choose. supportnobindofdelayloadeddll = The NOBIND qualifier tells the linker not to include a bindable IAT in the final image. supportunloadofdelayloadeddll = The UNLOAD qualifier tells the delay-load helper function to support explicit unloading of the DLL. suppressstartupbanner = Compiler and linker option that prevents display of the copyright message and version number. swaprunfromcd = Tells the operating system to first copy the linker output to a swap file, and then run the image from there. This is a Windows NT 4.0 (and later) feature. When CD is specified, the operating system will copy the image on a removable disk to a page file and then load it. swaprunfromnet = Tells the operating system to first copy the linker output to a swap file, and then run the image from there. This is a Windows NT 4.0 (and later) feature. If it is specified, the operating system will first copy the binary image from the network to a swap file and load it from there. This option is useful for running applications over the network. targetframeworkversion = The TargetFrameworkVersion attribute. targetmachine = Specifies the subsystem for the linker. See vc10platforms.mpt for some of the settings. terminalserveraware = Sets a flag in the IMAGE_OPTIONAL_HEADER DllCharacteristics field in the program image's optional header. When this flag is set, Terminal Server will not make certain changes to the application. toolsversion = Override the value of the ToolsVersion attribute of the Project XML element in the vcxproj file. treatlibwarningaserrors = Causes no output file to be generated if the librarian generates a warning. treatspecificwarningsaserrors = Treats the specific compiler warnings as errors, given a semicolon-separated list of compiler warning numbers. treatwchar_tasbuiltintype = When specified, the type wchar_t becomes a native type that maps to __wchar_t in the same way that short maps to __int16. Enabled by default. turnoffassemblygeneration = Tells the linker to create an image for the current output file without a .NET Framework assembly. typelibraryfile = Specifies the name and extension of the .tlb file generated from embedded IDL. typelibraryresourceid = Specifies the resource ID of the linker-generated type library. uacexecutionlevel = Specifies the requested execution level for the application when running with User Account Control (AsInvoker, HighestAvailable, RequireAdministrator). uacuiaccess = UAC Bypass UI Protection: Specifies whether or not to bypass user interface protection levels for other windows on the desktop. Set this property to 'Yes' only for accessibility applications. undefineallpreprocessordefinitions = Undefine all previously defined preprocessor values. undefinepreprocessordefinitions = Specifies one or more preprocessor undefines (semicolon-separated). unicode = If enabled: sets the CharacterSet to Unicode, enables Unicode-specific preprocessor macro definitions, and changes the entrypoint (if using unicode_mfc_entry). unicode_mfc_entry = Sets the entrypoint symbol for Unicode MFC configurations. usefullpaths = Use full paths in diagnostic messages. useofatl = Specifies how ATL is used by the configuration (Static, Dynamic). useofmfc = Specifies how MFC is used by the configuration (Static, Dynamic). useunicodeforassemblerlisting = Causes the assembler listing output file to be created in UTF-8 format. useunicoderesponsefiles = Instructs the project system to generate Unicode response files when spawning the librarian. use_pdb_modifier = A boolean value to determine whether the 'pdb_modifier' setting will be appended vcprojectversion = Visual C++ version to be used verbose = Verbose librarian option. warnaserror = Treats all compiler warnings as errors. warning_level = Numeric value for warning level (1-4, default is 3), or the strings "all" or "none" (0 is an alias for none). wholeprogramoptimization = Enables cross-module optimizations by delaying code generation until link time but requires linktimecodegeneration to take effect (wholeprogramoptimization defaults to true in Release configurations). windowstargetplatformversion = Windows SDK to be used xml_version = XML version for the vcxproj (default 1.0) xmldocumentationfilename = Specifies the name of the compiler-generated XML documentation files; can be file or directory name. ace-6.4.5+dfsg.orig/MPC/docs/templates/cdt6project.txt0000644000175000017500000000017513154167361020627 0ustar tggtgg// Document template variables for templates templates/cdt6project.mpd. // Please try to keep this alphabetically sorted. // ace-6.4.5+dfsg.orig/MPC/docs/templates/cc.txt0000644000175000017500000000114113154167361016757 0ustar tggtgg// Current as of 9/26/2006 // This defines the role of all the template variables specific to the // 'cc' project type. // // Please try to keep this alphabetically sorted. // big_endian = If the target architecture is big endian, set this to 1. ccversion = The version of Code Composer. cpufamily = The CPU Family for the project. defines = Macros that are specific to a particular configuration. output_dir = The configuration specific directory where output files are placed. rtti = This boolean variable determines whether RTTI is enabled or not. target_version = This is the target architecture version. ace-6.4.5+dfsg.orig/MPC/docs/templates/wb26wrproject.txt0000644000175000017500000000701013154167361021113 0ustar tggtgg// Document template variables for templates templates/wb26wrproject.mpd. // Please try to keep this alphabetically sorted. // ar = Tool that creates archive libraries ar_dbgflags = Flags passed to ar in debug mode only ar_derivedsigs = File extension created by ar ar_flags = Flags passed to ar regardless of debug mode ar_nondbgflags = Flags passed to ar in non-debug mode ass_dbgflags = Flags passed to the assembler in debug mode only ass_derivedsigs = File extension created by the assembler ass_flags = Flags passed to the assembler regardless of debug mode ass_nondbgflags = Flags passed to the assembler in non-debug mode c_dbgflags = C compiler flags for debug mode c_derivedsigs = C compiler output file pattern c_flags = C compiler flags regardless of debug mode c_nondbgflags = C compiler flags for non-debug mode cc = C compiler clnk_derivedsigs = C linker output file pattern common_defines = Specifies macros that are common to all target types cxx = C++ compiler cxx_dbgflags = C++ compiler flags for debug mode cxx_derivedsigs = C++ compiler output file pattern cxx_flags = C++ compiler flags regardless of debug mode cxx_nondbgflags = C++ compiler flags for non-debug mode cxxlnk_derivedsigs = C++ linker output file pattern default_buildspec = Which buildspec from the buildspecs should be default defines = Specifies macros that are common to all target types dll_buildtool = Name of the tool to use to create shared/dynamic libraries (for example, C++-Linker or C-Linker) dll_prefix = Prefix for shared/dynamic libraries exe_buildtool = Name of the tool to use to create executables (for example, C++-Linker or C-Linker) librarian_objects = Object file list to use as input to the archiver/librarian link_groups = A boolean template variable that determines if the GNU linker specific --start-group and --end-group options are used for the VxWorks Partial Image Linker linker_dbgflags = Linker flags for debug mode (VxWorks) linker_flags = Linker flags regardless of debug mode (VxWorks) linker_nondbgflags = Linker flags for non-debug mode (VxWorks) munchflag = Flags for the VxWorks munch TCL script nm = nm utility (VxWorks) no_platform_in_wrproject = If enabled, the platform attribute of the wrxml/properties XML element in .wrproject is empty. part_dbgflags = Debug flags for the VxWorks Partial Image Linker part_derivedsigs = Outupt file patterns for the VxWorks Partial Image Linker part_flags = Flags for the VxWorks Partial Image Linker part_nondbgflags = Non-debug flags for the VxWorks Partial Image Linker pic = Special flags needed to build objects that will become part of a shared library (-fPIC on Linux) platform_asflags = Assembler flags common to the platform or buildspec platform_ccflags = C compiler flags common to the platform or buildspec platform_cxxflags = C++ compiler flags common to the platform or buildspec platform_includes = Include directories common to the platform or buildspec platform_name = Value of the platform_name attribute of the wrxml/properties XML element in .wrproject project_type = Value of the project_type attribute of the wrxml/properties XML element in .wrproject project_type_macro = Value of the PROJECT_TYPE macro in the GlobalMacro list shflags = Flags passed to the linker to create a shared/dynamic libraries instead of an executable wrprj_macros = List of Macros for the BLD::Info|Macros section of the .wrproject. Each element in this list will in turn be de-referenced (used as an MPC template variable name) to obtain its values. LIBPATH and LIBS has special treatment here to get -L and -l prepended. ace-6.4.5+dfsg.orig/MPC/docs/templates/rpmspec.txt0000644000175000017500000000467213154167361020057 0ustar tggtgg// Document template variables for -type rpmspec // Please try to keep this alphabetically sorted. // env_check = Optional. Names of environment variables that must be set when the RPM is built. makefile_generator = Script that will run in the %build section of the RPM spec file in order to generate makefiles. If the default is changed it should be a wrapper around mwc.pl and pass all relevant arguments to mwc.pl. makefile_name_pattern = A shell wildcard pattern describing the makefiles created by makefile_generator. makeflags = Additional flags to pass on the make command line in the %build section of the RPM spec file. mkgen_args = Additional arguments to pass to the makefile_generator. prebuild = Additional command to run in the %build section of the RPM spec (before makefile_generator). rpm_autorequiresprovides = Sets the RPM spec AutoReqProv tag. rpm_buildrequires = Optional. Sets the RPM spec BuildRequires tag. rpm_description = Required. Sets the content of the %description section of the RPM spec file. Multiple lines can be separated by \n. rpm_group = Required. Sets the RPM spec Group tag. rpm_license = Sets the RPM spec License tag. rpm_mpc_requires = Do not provide a value, it is filled in by the RpmSpecWorkspaceCreator. rpm_mpc_temp = Temporary directory for "fake installing" RPMs to satisfy dependency requirements during building. rpm_mpc_workspace = Do not provide a value, it is filled in by the RpmSpecWorkspaceCreator. rpm_name = Do not provide a value, it is filled in by the RpmSpecWorkspaceCreator. rpm_post_cmd = Sets the content of the %post section of the RPM spec file. rpm_postun_cmd = Sets the content of the %postun section of the RPM spec file. rpm_prefix = Sets the RPM spec Prefix tag. rpm_pre_cmd = Sets the content of the %pre section of the RPM spec file. rpm_preun_cmd = Sets the content of the %preun section of the RPM spec file. rpm_provides = Optional. Sets the RPM spec Provides tag. rpm_releasenumber = Required. Sets the RPM spec Release tag. rpm_requires = Optional. Sets the RPM spec Requires tag. These values will be used in addition to dependencies that MPC already knows due to the 'after' assignments. rpm_source_base = Sets the URL or path base of the RPM spec Source tag. The RPM tarball name will be appended so it should end with a slash. rpm_summary = Required. Sets the RPM spec Summary tag. rpm_url = Optional. Sets the URL of the application. rpm_version = Required. Sets the RPM spec Version tag. ace-6.4.5+dfsg.orig/MPC/docs/templates/vc7vb.txt0000644000175000017500000000237313154167361017431 0ustar tggtgg// Current as of 10/26/2006 // This defines the role of all the template variables specific to the // 'vc7' and 'vc71' project types with the vb language. // // Please try to keep this alphabetically sorted. // common_defines = Specifies macros that are common to all target types. defines = Macros that are specific to a particular configuration. guid = The value for this variable is generated during project generation. incremental = This setting corresponds to the Configuration Properties Optimizations property "Enable incremental build". The boolean values true and false correspond to enabling or disabling the feature in the IDE. prversion = This setting specifies the ProductVersion in the generated .vbproj file. scc = This template variable enables or disables the use of Scc. schemaversion = This setting specifies the SchemaVersion in the generated .vbproj file. startupobject = This corresponds to the Common Properties General property "Startup object". trace = This setting corresponds to the Configuration Properties Build property "Define TRACE constant". If this boolean template variable is set, the TRACE constant will be defined. winapp = This boolean template variable indicates whether the application target is for the Console or Windows subsystem. ace-6.4.5+dfsg.orig/MPC/docs/templates/common.txt0000644000175000017500000000614713154167361017675 0ustar tggtgg// Document template variables that are common to all or most templates. // Please try to keep this alphabetically sorted. // compile_flags = This holds flags passed to the compiler for source files. configurations = This determines build configurations (ex. Debug, Release, etc.) cwd = The current working directory of the project. delaysign = Set this to true or false to enable delay signing. dll_ext = The dynamic library extension. The value for this depends on the project type. exe_ext = The executable extension. The value for this depends on the project type. forcount = The count of the number of times iteration has occurred within the current foreach loop. The base value is determined by the foreach declaration. intermediate_dir = A configuration specific location where object files are placed. language = The MPC language setting at the time of project generation. lib_ext = The static or impl library extension. The value for this depends on the project type. lib_modifier = Used to modifier a library name. The value of this is appendend to the library name before the extension is added. lib_prefix = The dynamic and static library prefix. The value for this depends on the project type. libname_prefix = This is a prefix that will be prepended to the actual library name (ex. libXY.so where X is libname_prefix and Y is sharedname). linkflags = Flags that are passed during the creation of dynamic libraries and executables. macro_for_lib_modifier = A boolean value to determine whether the lib_modifier is added as MPC_LIB_MODIFIER to the compiler flags make_coexistence = This will be true if the -make_coexistence option was passed to MPC. need_staticflags = This will be true if the project is a static project. optimize = Indicate if the project will be optimized or not. output_dir = A configuration specific output directory for output targets. pch_defines = C preprocessor macros that indicate that precompiled headers will be used. platforms = This determines for which platform the project will be built. prelink = If supported by the build tool, this specifies a command to run prior to linking the target. project_file = The name of the current project file being created. project_name = The name of the current project being processed. stackcommitsize = The Stack Commit Size for Windows executables. stackreservesize = The Stack Reserve Size for Windows executables. type_is_binary = This will be true is the project is a dynamic library or an executable. type_is_dynamic = This will be true if the project is a dynamic library. type_is_static = This will be true if the project is a static library project. use_lib_modifier = A boolean value to determine whether the 'lib_modifier' setting will be appended to the library name. use_exe_modifier = A boolean value to determine whether the 'lib_modifier' setting will be appended to the executable name. win_version = This is a variation of the 'version' project value that has been translated into a value usable on Windows. windows_style = Controls the location of Debug executables and all installed executables. If it is set, the Debug executable is placed in the Debug directory. ace-6.4.5+dfsg.orig/MPC/docs/templates/vc8.txt0000644000175000017500000004052513154167361017103 0ustar tggtgg// Current as of 5/30/2008 // This defines the role of all the template variables specific to the // 'vc8' project type. // // Please try to keep this alphabetically sorted. // additionalmanifestdependencies = Specifies the additional XML manifest fragments the linker will put in the manifest file. additionalusingdirectories = A semi-colon separated list of directories to search for #using files. addmodulenamestoassembly = Import the specified non-assembly file into the final output. add_references = If this is set, the project will be generated with project references based on the 'after' keyword setting. allowisolation = Specifies manifest file lookup behavior for side-by-side assemblies. assemblerlistinglocation = Specifies the relative path and/or name for the ASM listing file. assembleroutput = Specifies the contents of the assembly language output file. 0 is "No Listing", 1 is "Assembly-Only Listing", 2 is "Assembly, Machine Code and Source", 3 is "Assembly With Machine Code", and 4 is "Assembly With Source Code". assemblydebug = Emits the debuggable attribute to the assembly. 0 is "No Debuggable attribute emitted", 1 is "Runtime tracking and disable optimizations", 2 is "No runtime tracking and enable optimizations". assemblylinkresource = Links a resource file to the output assembly. assemblyreferences = A space separated list of assembly references. baseaddress = Specifies the base address for the program. basicruntimechecks = This corresponds to the C/C++ Code Generation property "Basic Runtime Checks". The numeric value specifies the pull-down value in the IDE. browseinformation = Specifies the level of browse information in the .bsc file. 0 is "None", 1 is "Include All Browse Information", and 2 is "No Local Symbols". browseinformationfile = Specifies the optional name for the browser information file. buffersecuritycheck = This corresponds to the C/C++ Code Generation property "Buffer Security Check". The boolean value specifies the pull-down value in the IDE. callingconvention = Specifies the default calling convention. 0 is __cdecl, 1 is __fastcall, and 2 is __stdcall. charset = This setting specifies the "Character Set" in the General properties. The values 0, 1, and 2 specify Not Set, Unicode, and Multi-Byte respectively. clrimagetype = Specifies the type of a CLR image. 0 is "Default image type", 1 is "Force IJW image", 2 is "Force pure IL image", and 3 is "Force safe IL image". clrthreadattribute = Specifies the threading attribute for the entry point of your CLR program. 0 is "No threading attribute set", 1 is "MTA threading attribute", and 2 is "STA threading attribute". common_defines = Specifies macros that are common to all target types. compileas = Select compile language for .c and .cpp files. 0 is "Default", 1 is "Compile as C Code", and 2 is "Compile as C++ Code". configurationtype = Specifies the type of output this configuration generates. cpu_defines = Macros that are specific to a particular CPU platform. culture = This corresponds to the Resources General property "Culture". The numeric value corresponds to the pull-down values in the IDE. debug_format = This setting specifies the "Debug Information Format" found in the C/C++ General properties. The numeric value specifies the pull-down value in the IDE. debug_prj = This is an internally used template variable to determine if the configuration originated as "Debug". In the event that the 'optimize' template variable is overridden, debug_prj allows the correct run-time library to be chosen. defaultcharisunsigned = If set to true, designates char to be unsigned. defines = Macros that are specific to a particular configuration. delayloaddlls = Specifies one or more semi-colon separated DLLs for delayed loading delaysign = If set to true, indicates whether the output assembly should be delay signed. detect64bitportabilityproblems = This corresponds to the C/C++ Code Generation property "Detect 64-bit Portability Issues". The boolean value specifies the pull-down value in the IDE. disablelanguageextensions = If set to true, disables language extensions. disablespecificwarnings = A space separated list of warning numbers to be disabled. driver = Specifies the driver for the linker. embedmanagedresourcefile = Embed the specified .NET resource file. enablecomdatfolding = Removes redundant COMDAT symbols from the linker output. 0 is "Default", 1 is "Do Not Remove Redundant COMDATs", and 2 is "Remove Redundant COMDATs". enableenhancedinstructionset = Enable use of instructions found on processors that support enhanced instruction sets. enablefibersafeoptimizations = Enables memory space optimization when using fibers and thread local storage. enablefunctionlevellinking = This corresponds to the C/C++ Code Generation property "Enable Function-Level Linking". The boolean value specifies the pull-down value in the IDE. enableintrinsicfunctions = If set to true, enables intrinsic functions (which contain faster, but possibly larger, code). enableprefast = If set to true, enables Native Code Analysis. encoding = Specifies the XML encoding for the generated .vcproj file. entrypointsymbol = Sets the starting symbol for a .exe file or DLL. errorreporting = Specifies how internal tool errors should be reported back to Microsoft. 0 is "Default", 1 is "Prompt Immediately", 2 is "Queue For Next Login". exceptionhandling = Calls destructors for automatic objects during a stack unwind caused by an exception. 0 is "No", 1 is "Yes", and 2 is "Yes With SEH Exceptions". expandattributedsource = Create listing file with expanded attributes injected into the source file. favorsizeorspeed = Set to 0 to favor neither size or speed, 1 to favor speed, and 2 to favor size during optimization. fixedbaseaddress = Specifies if the image must be loaded at a fixed address. 0 is "Default", 1 is "Generate a relocation section", and 2 is "Image must be loaded at a fixed address". fixedbaseaddress = This corresponds to the Linker Advanced property "Fixed Base Address". The values 1 and 2 correspond to Relocatable (not fixed) and Load at a Fixed Address respectively. floatingpointexceptions = If set to true, enables floating point exceptions. floatingpointmodel = Sets the floating point mode. Use 0 for precise, 1 for strict and 2 for fast. forceconformanceinforloopscope = If set to false, disables for loop variable conformance. forcedincludefiles = Specifies one or more forced include files. forcedusingfiles = Specifies one or more forces #using files. forcesymbolreferences = Force the linker to include a reference to this symbol. functionorder = Places COMDATs into the image in a predetermined order. This variable must be set to a file name containing the order. generatedebuginformation = Enables generation of debug information if set to true. generatemanifest = If set to false, disabled generation of a manifest file. generatemapfile = This corresponds to the Linker Debugging property "Generate Map File". The boolean value specifies the pull-down value in the IDE. generatepreprocessedfile = Specifies the preprocessing option for this configuration. 0 is "No", 1 is "With Line Numbers", and 2 is "Without Line Numbers". generatexmldocumentationfiles = If set to true, specifies that the compiler should generate XML documentation comment files (.XDC). guid = The value for this variable is generated during project generation. heapcommitsize = Specifies total heap allocation size in bytes of physical memory. heapreservesize = Specifies total heap allocation size in bytes of virtual memory. ignore_default_library_names = The value for this is evaluated as a space separated list of default library names to ignore. It corresponds to the Linker Input property "Ignore Specific Library". ignorealldefaultlibraries = Ignore all default libraries during linking. ignoreimportlibrary = Specifies that the import library generated by this project should not be imported into dependent projects. ignorestandardincludepath = If set to true, the compiler will ignore the standard include path. importlibrary = Specifies the name of the import library. This allows the override of the default project import library name based on the sharedname project setting. inlinefunctionexpansion = This corresponds to the C/C++ Optimization property "Inline Function Expansion". A value of 1 indicates /Ob1 (inline only those designated to be inlined). A value of 2 indicates /Ob2 (inline any suitable function). keepcomments = If set to true, comments are not stripped from the source code. keycontainer = Specifies the named container of the key for strongly naming the output assembly. keyfile = Specifies the file that contains the key for strongly naming the output assembly. language = This template variable is based on the language setting of MPC, except if the 'webapp' project variable is set. In that case, it is 'website'. largeaddressaware = Enables handling address larger than 2 Gb. 0 is "Default", 1 is "Do Not Support Addresses Larger Than 2 Gigabytes", and 2 is "Support Addresses Larger Than 2 Gigabytes". lib_options = Allows passing arbitrary options to the librarian tool. link_options = Allows passing arbitrary options to the linker. linkincremental = This setting corresponds to the Linker General property "Enable Incremental Linking". The values 1 and 2 correspond to NO and YES respectively. linklibrarydependencies = Disables automatically linking in libraries from project dependencies if set to false. linktimecodegeneration = Enables link time code generation of objects compiled with Whole Program Optimization. manifestfile = Specifies the name of the manifest file to generate. mapexports = Includes exported functions in the map file information if set to true. mapfilename = Specifies a name for the mapfile. mergesections = Causes the linker to merge 'from' into section 'to'. The setting must be of the form 'from=to'. midl_defines = Macros specified here correspond to the MIDL General property "Preprocessor Definitions". midl_flags = The value for this variable is passed to the MIDL command as "Additional Options". midl_includes = This correspond to the MIDL General property "Additional Include Directories". midl_notlb = Suppresses the creation of a type library for the IDL file. minimalrebuild = This corresponds to the C/C++ Code Generation property "Enable Minimal Rebuild". The boolean value specifies the pull-down value in the IDE. moduledefinitionfile = This setting corresponds to the Linker Input property "Module Definition File". objectfile = Specifies a name to override the default object file name. It can be a file or directory name. omitdefaultlibname = Do not include default library names in .obj files. omitframepointers = If set to true, suppresses frame pointers. openmp = If set to true, enables OpenMP 2.0 language extensions. optimizeforwindows98 = Align code on 4Kb boundaries. optimizereferences = Enables elimination of functions and/or data that are never referenced. 0 is "Default", 1 is "Keep Unreferenced Data", and 2 is "Eliminate Unreferenced Data". output_subdir = This is used in determining the sub-directory under which intermediate files will be placed. pdbc = If this boolean template variable is set, the C/C++ Output Files property "Program Database File Name" will be set according to the project target. pdbl = If this boolean template variable is set, the Linker Debugging property "Generate Program Database File" will be set according to the project target. platform_defines = Macros that are specific to a particular platform. platform = Specifies the target platform. precompiledheaderfile = Specifies the path and/or name of the generated precompiled header file. profile = Produce an output file that can be used with the Enterprise Developer performance profiler. profileguideddatabase = Specifies the database file to use when using profile guided optimizations. programdatabasefilename = Specifies a name for a compiler-generate .PDB file. This setting is only used if the 'pdbc' template variable is not set. registeroutput = Specifies whether to register the primary output of this build if set to true. release_link_options = Allows passing arbitrary options to the linker when making a release build resourceonlydll = A resource-only DLL will be created if set to true. runtime_library = This corresponds to the C/C++ Code Generation property "Runtime Library". If the template variable is set, the numeric value will be used. Otherwise, it will be determined based on the target and debug/optimize configuration. The numeric value specifies the pull-down value in the IDE. runtimetypeinfo = If set to false, disables RTTI. setchecksum = Enables setting the checksum in the header of a .exe if set to true. showincludes = Generates a list of include files with compiler output if set to true. showprogress = Enables detailed display of progress. 0 is "Not Set", 1 is "Display All Progress Messages", and 2 is "Displays Some Progress Messages". smallertypecheck = Enable checking of conversion to smaller types. stringpooling = This corresponds to the C/C++ Code Generation property "Enable String Pooling". The boolean value specifies the pull-down value in the IDE. stripprivatesymbols = Do not put private symbols into the generated .PDB file. structmemberalignment = Specify 1, 2, 4, 8, or 16-byte boundaries for struct member alignment using the numbers 1, 2, 3, 4, or 5 respectively. subsystem = This corresponds to the Linker System property "SubSystem". This variable should not be set directly by the user; instead the project should inherit from 'mfc'. supportunloadofdelayloadeddll = If set to true, allows explicit unloading of the delay loaded DLLs. suppressstartupbanner = Suppress the display of the startup banner and information messages. swaprunfromcd = Run the application from the swap location of the CD. swaprunfromnet = Run the application from the swap location of the network. targetmachine = Specifies the subsystem for the linker. See vc8platforms.mpt for some of the settings. terminalserveraware = Enables terminal server awareness. 0 is "Default", 1 is "Not Terminal Server Aware", and 2 is "Application is Terminal Server Aware". treatwchar_tasbuiltintype = This corresponds to the C/C++ Language property "Treat wchar_t as Built-in Type". The boolean value specifies the pull-down value in the IDE. turnoffassemblygeneration = If set to true, specifies that no assembly will be generated even though common language runtime information is present in the object files. undefineallpreprocessordefinitions = Undefine all previously defined preprocessor values. undefinepreprocessordefinitions = Specifies one or more preprocessor undefines. unicode = If this boolean template variable is set, the UNICODE and _UNICODE macros are added to the C/C++ Preprocessor property "Preprocessor Definitions". unicode_mfc_entry = This corresponds to the Linker Advanced property "Entry Point". This variable should not be set directly by the user; instead the project should inherit from 'mfc'. usefullpaths = Use full paths in diagnostic messages if set to true. uselibrarydependencyinputs = If set to true, specifies that inputs to the librariant tool are used rather than the library file itself when linking in libraries of project dependencies. useofatl = Specifies how ATL is used by the configuration. 0 corresponds to "Not using ATL", 1 corresponds to "Static Link to ATL", and 2 corresponds to "Dynamic Link to ATL". useofmfc = Specifies how MFC is used by the configuration. 0 corresponds to "Use Standard Windows Libraries", 1 corresponds to "Use MFC in a Static Library" and 2 corresponds to "Use MFC in a Shared DLL". useunicoderesponsefiles = Instructs the project system to generate UNICODE response files when spawning the compiler. vcprojecttype = Specifies the ProjectType setting within the generated .vcproj file. vcversion = Specifies the version of the generated .vcproj file. This value is determined by the VC8ProjectCreator. warnaserror = If set to true, the compiler treats all warnings as errors. warning_level = This setting corresponds to the C/C++ General property "Warning Level". Valid values are 0 through 4. wholeprogramoptimization = Specifies that the program will be optimized across .obj boundaries. 0 is "No Whole Program Optimization", 1 is "Use Link Time Code Generation", 2 is "Profile Guided Optimization - Instrument", 3 is "Profile Guided Optimization - Optimize", and 4 is ""Profile Guided Optimization - Update". xmldocumentationfilename = Specifies the name of the generated XML documentation files. xml_version = Specifies the XML version for the generated .vcproj file. ace-6.4.5+dfsg.orig/MPC/docs/templates/ghs.txt0000644000175000017500000000233113154167361017155 0ustar tggtggbsp = If a bsp is necessary, this variable should be set to the bsp name. exceptions = This controls whether exceptions are used or not. It is on by default. libext = Similar to the common lib_ext except that this one is normally left to the default. no_use_pch = Set this to disable precompiled header support. os_dir = Set this to the full path of the OS directory (ex. C:\GHS\int507). postmkdir = Allows arbitrary text after the use of mkdir. primarytarget = This specifies the primaryTarget value that is placed in the toplevel workspace. Some example values are: ppc_integrity.tgt, ppc_linux.tgt, ppc_standalone.tgt and ppc_vxworks.tgt. reltop = This is the current directory of the project relative to the top-level directory. reltop_dllout = Similar to dllout except that it's relative to the top-level directory. reltop_exeout = Similar to exeout except that it's relative to the top-level directory. reltop_includes = Similar to includes except that it's relative to the top-level directory. reltop_libout = Similar to libout except that it's relative to the top-level directory. reltop_libpaths = Similar to libpaths except that it's relative to the top-level directory. slash = The value used to separate directories and files. ace-6.4.5+dfsg.orig/MPC/docs/templates/make.txt0000644000175000017500000001520213154167361017312 0ustar tggtgg// Current as of 1/14/2010 // This defines the role of all the template variables specific to the // 'make' project type. // // Please try to keep this alphabetically sorted. // ar = The static library creation tool. arflags = Flags passed to the static library creation tool. arflags64 = The 64-bit version of flags passed to the static library creation tool. build64bit = Determine whether this project is built in 64-bit mode. cc = Holds the C compiler. cflags = A set of flags that are only passed to the C compiler. ccflags = A set of flags that are only passed to the C++ compiler. checkopt = Compiler specific options to signify syntax checking only. chmod = A utility to change permissions on a file. clean = Additional files or directories to be "cleaned" when the clean target is invoked. compile_option = The option used to specify that the compiler should only compile. compilerflags = This holds options specific to a particular compiler. compilerflags64 = The 64-bit specific options passed to a particular compiler. compilers = Although it is plural, it holds only a single compiler which is used to determine specific flags and default platform. copy = A utility to copy a file. coverage = Set this to enable code coverage compile flags (if supported). covopt = The compiler options used to enable coverage testing. cpu = This can be used with the Wind River specific compilers to specify the CPU macro. cputype = This can be used with the Wind River specific compilers to specify the CPU type. cxx = Holds the C++ compiler. cxxint = This is Green Hills specific and specifies the type of integration. default_configuration = If multiple platforms/configurations are used, this variable can be set to determine which configuration is active when CFG is not set on the command line. delete = A utility to delete a file. depgen = A utility to generate make dependencies. depgen_flags = Flags to be passed to the dependency generator utility. devnull = The null device for a particular platform. dld = The linker to create dynamic libraries. dmclink = Used by the dmc compiler, this determines if the dmc special mode of linking is used. echo_outer_quote = A quote variable to assist in Windows/UNIX compatibility. exe_linkflags = Provides additional link flags for binary targets. The value is eval'ed. expanded_variable_assignment = Used to enable the setting of custom library paths. Be default this is disabled due to lack of support from all make variants. extraarflags = Additional, platform specific, flags to be passed to the static library creation tool. extracppflags = Additional, platform specific, flags to be passed to the source file compiler. genflags = Used to determine the default compile mode (either debug or optimized). gnumake = Indicates that GNU Make extensions can be used in the generated Makefile. ld = Used to override the default linker and flags for executables. ldlibs = Platform specific libraries to be linked into dynamic libraries and executables. libgenopt = This is used to pass an option, if necessary, to the static library creation tool to specify the library name. libopt = The option used to specify that a library will be linked into dynamic libraries or executables. libpathopt = The option used to provide a path to libraries that will be linked into dynamic libraries or executables. linkflags = Platform specific flags passed during the linking of dynamic libraries and executables. linkflags64 = The 64-bit version of platform specific flags passed during the linking of dynamic libraries and executables. make_include = This allows users to "include" arbitrary files into the generated makefiles. makedir = A utility to make a directory. move = A utility to move a file. nm = A utility to generate a symbol listing of an object file or executable. notparallel = Should the .NOTPARALLEL be place in the makefile when it has generated targets? obj_dir = If specified, object files will be place in this directory. It should always end in a slash. obj_ext = The object file extension. output_dir_ext = An optional extension for output directories. output_option = The option used to specify the output location of various parts of a project such as object file, libraries and executables. pchcreate = Options passed to the source compiler to create a precompiled header binary. pchext = The extension of the precompiled header binary file. pchnobj = If set, the creation of the precompiled header binary does not create an object file. pchstop = An optional setting that some compilers use to indicate the last include file to be considered in creating a precompiled header binary. pchsupport = Determine if precompiled header support is generated into the makefile. pchuse = Options passed to the source compiler to specify that a precompiled header binary be used. pic = The position independent code option for a particular compiler. postlinkbinary = If specified, the command will be executed at the end of linking a binary executable. prelinktarget = Specific to VxWorks, this indicates a file that is compiled prior to linking a shared object library or executable. prelinktargetobj = Specific to VxWork, this indicates the object file that is needed prior to linking a shared object library or executable. profile = Set this to enable profiling compile flags (if supported). profopt = The compiler options to enable profiling. ranlib = A boolean setting to determine if ranlib is needed or not. rc = The name of the resource file compiler. res_ext = The extension for compiled resource files. shflags = Platform specific flags passed during the linking of dynamic libraries. slash = The value used to separate directories and files. specialscript = Specific to VxWorks, the text in this value is used as a script to generate the 'prelinktarget' file. supports_include = A boolean value used to indicate whether the version of make supports inclusion of files that do not yet exist. targetoutdir = Specifies a location for all targets and intermediaries within the makefile. It should always end in a slash. tempinc = A compiler specific setting that can be used to dermine a temporary location for template instantiations. tempincopt = A compiler specific option to indicate the temporary directory specified by 'tempinc'. testdirend = Used in creating intermediate directories. testdirstart = Used in creating intermediate directories. touch = The utility used to create the initial dependency file. type = A utility to display a file on the terminal. versupport = A platform specific setting that inidicates if shared library versioning is supported. visibility = A boolean setting to determine if visibility options are passed to the compiler. visopt = The compiler specific options to enable symbol visibility. ace-6.4.5+dfsg.orig/MPC/docs/templates/vc7.txt0000644000175000017500000001574713154167361017112 0ustar tggtgg// Current as of 3/23/2010 // This defines the role of all the template variables specific to the // 'vc7' and 'vc71' project types. // // Please try to keep this alphabetically sorted. // basicruntimechecks = This corresponds to the C/C++ Code Generation property "Basic Runtime Checks". The numeric value specifies the pull-down value in the IDE. buffersecuritycheck = This corresponds to the C/C++ Code Generation property "Buffer Security Check". The boolean value specifies the pull-down value in the IDE. charset = This setting specifies the "Character Set" in the General properties. The values 0, 1, and 2 specify Not Set, Unicode, and Multi-Byte respectively. common_defines = Specifies macros that are common to all target types. configuration_type = This corresponds to the General property "Configuration Type". The values 1, 2, 4, and 10 correspond to Application, Dynamic Library, Static Library, and Utility respectively. culture = This corresponds to the Resources General property "Culture". The numeric value corresponds to the pull-down values in the IDE. debug_format = This setting specifies the "Debug Information Format" found in the C/C++ General properties. The numeric value specifies the pull-down value in the IDE. debug_prj = This is an internally used template variable to determine if the configuration originated as "Debug". In the event that the 'optimize' template variable is overridden, debug_prj allows the correct run-time library to be chosen. defines = Macros that are specific to a particular configuration. detect64bitportabilityproblems = This corresponds to the C/C++ Code Generation property "Detect 64-bit Portability Issues". The boolean value specifies the pull-down value in the IDE. disablespecificwarnings = A space separated list of warning numbers to be disabled. enablefunctionlevellinking = This corresponds to the C/C++ Code Generation property "Enable Function-Level Linking". The boolean value specifies the pull-down value in the IDE. encoding = Specifies the XML encoding for the generated .vcproj file. exceptions = This setting corresponds to the C/C++ Code Generation property "Enable C++ Exceptions". The boolean value specifies the pull-down value in the IDE. fixedbaseaddress = This corresponds to the Linker Advanced property "Fixed Base Address". The values 1 and 2 correspond to Relocatable (not fixed) and Load at a Fixed Address respectively. forloopscope = This corresponds to the C/C++ Language property "Force Conformance In For Loop Scope". The boolean value specifies the pull-down value in the IDE. generatemapfile = This corresponds to the Linker Debugging property "Generate Map File". The boolean value specifies the pull-down value in the IDE. guid = The value for this variable is generated during project generation. ignore_default_library_names = The value for this is evaluated as a space separated list of default library names to ignore. It corresponds to the Linker Input property "Ignore Specific Library". ignorealldefaultlibraries = Ignore all default libraries during linking. inlinefunctionexpansion = This corresponds to the C/C++ Optimization property "Inline Function Expansion". A value of 1 indicates /Ob1 (inline only those designated to be inlined). A value of 2 indicates /Ob2 (inline any suitable function). lib_options = Allows passing arbitrary options to the librarian tool. link_options = Allows passing arbitrary options to the linker. linkincremental = This setting corresponds to the Linker General property "Enable Incremental Linking". The values 1 and 2 correspond to NO and YES respectively. machine = This corresponds to the Linker Advanced property "Target Machine". The numeric value corresponds to the pull-down values in the IDE. midl_defines = Macros specified here correspond to the MIDL General property "Preprocessor Definitions". midl_flags = The value for this variable is passed to the MIDL command as "Additional Options". midl_includes = This correspond to the MIDL General property "Additional Include Directories". midl_notlb = Suppresses the creation of a type library for the IDL file. minimalrebuild = This corresponds to the C/C++ Code Generation property "Enable Minimal Rebuild". The boolean value specifies the pull-down value in the IDE. moduledefinitionfile = This setting corresponds to the Linker Input property "Module Definition File". opticf = This corresponds to the Linker Optimization property "Enable COMDAT Folding". The value 1 corresponds to "Do Not Remove Redundant COMDATs" and 2 corresponds to "Remove Redundant COMDATs". optref = This corresponds to the Linker Optimization property "References". The value 1 corresponds to "Keep Unreferenced Data" and 2 corresponds to "Eliminate Unreferenced Data". output_subdir = This is used in determining the sub-directory under which intermediate files will be placed. pdbc = If this boolean template variable is set, the C/C++ Output Files property "Program Database File Name" will be set according to the project target. pdbl = If this boolean template variable is set, the Linker Debugging property "Generate Program Database File" will be set according to the project target. platform = Specifies the target platform. rtti = This corresponds to the C/C++ Language property "Enable Run-Time Type Info". The boolean value specifies the pull-down value in the IDE. runtime_library = This corresponds to the C/C++ Code Generation property "Runtime Library". If the template variable is set, the numeric value will be used. Otherwise, it will be determined based on the target and debug/optimize configuration. The numeric value specifies the pull-down value in the IDE. stringpooling = This corresponds to the C/C++ Code Generation property "Enable String Pooling". The boolean value specifies the pull-down value in the IDE. subsystem = This corresponds to the Linker System property "SubSystem". This variable should not be set directly by the user; instead the project should inherit from 'mfc'. unicode = If this boolean template variable is set, the UNICODE and _UNICODE macros are added to the C/C++ Preprocessor property "Preprocessor Definitions". unicode_mfc_entry = This corresponds to the Linker Advanced property "Entry Point". This variable should not be set directly by the user; instead the project should inherit from 'mfc'. use_mfc = This corresponds to the General property "Use of MFC". This variable should not be set directly by the user; instead the project should inherit from 'mfc'. useofatl = This corresponds to the General property "Use of ATL". vcprojecttype = Specifies the ProjectType setting within the generated .vcproj file. vcversion = Specifies the version of the generated .vcproj file. This value is determined by the VC7ProjectCreator or the VC71ProjectCreator. warning_level = This setting corresponds to the C/C++ General property "Warning Level". Valid values are 0 through 4. wchar_t = This corresponds to the C/C++ Language property "Treat wchar_t as Built-in Type". The boolean value specifies the pull-down value in the IDE. xml_version = Specifies the XML version for the generated .vcproj file. ace-6.4.5+dfsg.orig/MPC/docs/templates/vc8java.txt0000644000175000017500000000257713154167361017752 0ustar tggtgg// Current as of 3/05/2007 // This defines the role of all the template variables specific to the // 'vc8' project type with the java language. // // Please try to keep this alphabetically sorted. // allowunsafeblocks = Enable/disable the use of the unsafe keyword. common_defines = Specifies macros that are common to all target types. defines = Macros that are specific to a particular configuration. guid = The value for this variable is generated during project generation. keyfile = Indicate the keyfile to use when signing the assembly. prversion = This setting specifies the ProductVersion in the generated .vjsproj file. registerforcominterop = This setting corresponds to the Build Output property "Register for COM interop". The boolean values true and false correspond to enabling or disabling the feature in the IDE. schemaversion = This setting specifies the SchemaVersion in the generated .vjsproj file. startupobject = This corresponds to the Application property "Startup object". trace = This setting corresponds to the Build General property "Conditional Compilation Constants". If this boolean template variable is set, the TRACE constant will be defined. warning_level = This corresponds to the Build General property "Warning level". Valid values are 0 through 4. winapp = This boolean template variable indicates whether the application target is for the Console or Windows subsystem. ace-6.4.5+dfsg.orig/MPC/docs/templates/vc8csharp.txt0000644000175000017500000000506413154167361020303 0ustar tggtgg// Current as of 10/26/2006 // This defines the role of all the template variables specific to the // 'vc8' project type with the csharp language. // // Please try to keep this alphabetically sorted. // allowunsafeblocks = Enable/disable the use of the unsafe keyword. common_defines = Specifies macros that are common to all target types. comreferences = Creates references to COM libraries. Each entry in the list takes the form libraryname:guid=the_guid and can optionally list more attribute name/value pairs separated by commas. The valid attributes besides guid (with their defaults) are majorver (1), minorver (0), lcid (0), wrapper (tlbimp), isolated (False), copylocal (False), and embed (omitted). defines = Macros that are specific to a particular configuration. disablespecificwarnings = A space separated list of warning numbers to be disabled. guid = The value for this variable is generated during project generation. keyfile = Indicate the keyfile to use when signing the assembly. platformtarget = Set the Platform Target, for example x86 to force a 32-bit .NET framework. prefer32bit = This setting indicates whether or not 32-bit binaries should be used over 64-bit binaries. prversion = This setting specifies the ProductVersion in the generated .csproj file. registerforcominterop = This setting corresponds to the Build Output property "Register for COM interop". The boolean values true and false correspond to enabling or disabling the feature in the IDE. schemaversion = This setting specifies the SchemaVersion in the generated .csproj file. startupobject = This corresponds to the Application property "Startup object". targetframeworkprofile = Target a certain profile of the .NET framework, such as "Client". targetframeworkversion = The TargetFrameworkVersion attribute. Setting this also enables a reference to the System.Core using the same version number as a requirement. toolsversion = The ToolsVersion attribute of the Project XML element. trace = This setting corresponds to the Build General property "Conditional Compilation Constants". If this boolean template variable is set, the TRACE constant will be defined. uiculture = This setting indicates the culture for the project. vcversion = Specifies the version of the generated .csproj file. This value is determined by the VC8ProjectCreator. warning_level = This corresponds to the Build General property "Warning level". Valid values are 0 through 4. winapp = This boolean template variable indicates whether the application target is for the Console or Windows subsystem. xmlheader = Enable the header. ace-6.4.5+dfsg.orig/MPC/docs/templates/vc7csharp.txt0000644000175000017500000000260213154167361020275 0ustar tggtgg// Current as of 10/26/2006 // This defines the role of all the template variables specific to the // 'vc7' and 'vc71' project types with the csharp language. // // Please try to keep this alphabetically sorted. // allowunsafeblocks = Enable/disable the use of the unsafe keyword. common_defines = Specifies macros that are common to all target types. defines = Macros that are specific to a particular configuration. guid = The value for this variable is generated during project generation. incremental = This setting corresponds to the Configuration Properties Advanced property "Incremental Build". The boolean values true and false correspond to enabling or disabling the feature in the IDE. keyfile = Indicate the keyfile to use when signing the assembly. prversion = This setting specifies the ProductVersion in the generated .csproj file. scc = This template variable enables or disables the use of Scc. schemaversion = This setting specifies the SchemaVersion in the generated .csproj file. startupobject = This corresponds to the Common Properties General property "Startup Object". trace = This setting corresponds to the Configuration Properties Build property "Conditional Compilation Constants". If this boolean template variable is set, the TRACE constant will be defined. winapp = This boolean template variable indicates whether the application target is for the Console or Windows subsystem. ace-6.4.5+dfsg.orig/MPC/docs/templates/wb26wrmakefile.txt0000644000175000017500000000052113154167361021222 0ustar tggtgg// Document template variables for templates templates/wb26wrmakefile.mpd. // Please try to keep this alphabetically sorted. // buildspecs = List of possible build specifications dll_prefix = Prefix for shared/dynamic libraries platform_makefilevars = Platform-specific variables that should have \ to / translation done in the makefile ace-6.4.5+dfsg.orig/MPC/docs/templates/vc8vb.txt0000644000175000017500000000240013154167361017421 0ustar tggtgg// Current as of 10/26/2006 // This defines the role of all the template variables specific to the // 'vc8' project type with the vb language. // // Please try to keep this alphabetically sorted. // common_defines = Specifies macros that are common to all target types. defines = Macros that are specific to a particular configuration. guid = The value for this variable is generated during project generation. prversion = This setting specifies the ProductVersion in the generated .vbproj file. registerforcominterop = This setting corresponds to the Compile property "Register for COM interop". The boolean values true and false correspond to enabling or disabling the feature in the IDE. schemaversion = This setting specifies the SchemaVersion in the generated .vbproj file. startupobject = This corresponds to the Application property "Startup object". trace = This setting corresponds to the Compile Advanced Compile Options property "Define TRACE constant". If this boolean template variable is set, the TRACE constant will be defined. warning_level = This setting corresponds to the Compile property "Disable all warnings". Valid values are 0 and 1. winapp = This boolean template variable indicates whether the application target is for the Console or Windows subsystem. ace-6.4.5+dfsg.orig/MPC/docs/templates/make.net.txt0000644000175000017500000000513613154167361020104 0ustar tggtgg// Current as of 8/5/2009 - Happy Birthday Molly! // This defines the role of all the template variables specific to the // 'make' project type using the csharp language. // // Please try to keep this alphabetically sorted. // allowunsafeblocks = Enable/disable the use of the unsafe keyword. clean = Additional files or directories to be "cleaned" when the clean target is invoked. compilers = Although it is plural, it holds only a single compiler which is used to determine specific flags. copy = A utility to copy a file. def_flag = Compiler specific flag to define a macro. delete = A utility to delete a file. devnull = The null device for a particular platform. exe_flag = Compiler specific flag to create an executable. expanded_variable_assignment = Used to enable the setting of custom library paths. Be default this is disabled due to lack of support from all make variants. ico_flag = Compiler specific flag for specifying the icon file. key_flag = Compiler specific flag to specify the keyfile. keyfile = Indicate the keyfile to use when signing the assembly. lib_flag = Compiler specific flag to set the library search paths. make_include = This allows users to "include" arbitrary files into the generated makefiles. makedir = A utility to make a directory. mkbundle = The command to create a native bundled executable. move = A utility to move a file. opt_flag = Compiler specific flag to optimize the compilation. out_flag = Compiler specific flag to specify the output type. packages = Packages to reference from within the binary target. pkg_flag = Compiler specific flag to specify the package file. ref_flag = Compiler specific flag to specify a reference assembly. resx_flag = Compiler specific flag to specify the resource file. shared_flag = Compiler specific flag to create a shared library. slash = The value used to separate directories and files. supports_include = A boolean value used to indicate whether the version of make supports inclusion of files that do not yet exist. targetoutdir = Specifies a location for all targets and intermediaries within the makefile. It should always end in a slash. testdirend = Used in creating intermediate directories. testdirstart = Used in creating intermediate directories. trace = If this boolean template variable is set, the TRACE constant will be defined. type = A utility to display a file on the terminal. unsafe_flag = Compiler specific flag to enable the use of the unsafe keyword. winapp = This boolean template variable indicates whether the application target is for the Console or Windows subsystem. winexe_flag = Compiler specific flag to create a Windows executable. ace-6.4.5+dfsg.orig/MPC/docs/templates/cdt6cproject.txt0000644000175000017500000000777013154167361021002 0ustar tggtgg// Document template variables for templates templates/cdt6cproject.mpd. // Please try to keep this alphabetically sorted. // binary_parsers = List of parsers eclipse uses on binaries for the platform. build64bit = Indicator for 64-bit build. build_artefact_type = CDT tag indicating whether we're building a shared lib, executable, etc. c_compiler_option_superclass = CDT tag for "superclass" for C compiler options. c_linker_dynamiclib_superclass = CDT tag for "superclass" for C linker dynamic lib options. c_linker_tool_superclass_root = CDT tag for "superclass" for C linker. ccflags = (Optional) List of additional flags that should be passed to the C compiler. common_defines = Specifies macros that are common to all target types. configuration_parent_root = Root of CDT tag used for element. cpp_compiler_option_superclass = CDT tag for "superclass" for C++ compiler options cpp_linker_dynamiclib_superclass = CDT tag for "superclass" for C++ linker dynamic lib options. cpp_linker_tool_input_superclass = CDT tag for "superclass" for C++ linker element. cpp_linker_tool_superclass_root = Root of CDT tag for "superclass" for C++ linker. cpu_defines = Macros specific to a particular CPU platform. cxxflags = (Optional) List of additional flags that should be passed to the C++ compiler. debugging_level = Textual name of debugging level (defined by CDT) used during compilation. defines = Macros specific to a particular configuration. dll_ext_nodot = Same as dll_ext but with no preceding period/dot. envvar_post = Host platform-specific string to be appended to an environment variable in a script/batch file. envvar_pre = Host platform-specific string to be prepended to an environment variable in a script/batch file. error_parsers = List of parsers eclipse uses on error output for the platform. exe_ext_nodot = Same as exe_ext but with no preceding period/dot. lib_ext_nodot = Same as lib_ext but with no preceding period/dot. libenv = Name of platform environment variable that holds the library path. linker_option_superclass = CDT tag for "superclass" for generic linker. linkflags64 = Linker flags to be used during a 64-bit build. makefile_tmpfile = Name of a temporary file that can be used by a generated makefile. mkdir_pre = Host platform-specific test that must precede a mkdir command. optimization_level = Textual name of optimization level (defined by CDT) used during compilation. outputtype_superclass = CDT tag for "superclass" for the type of output file being produced by a build step. pathsep = Host platform-specific separator used between elements of the PATH environment variables. platform_defines = Macros specific to a particular platform. platform_libs = Libraries specific to a particular platform. platform_specializer = Target platform-specific keyword used in some CDT tags (see cdt6platforms.mpt). project_element_type_id = Target platform-specific CDT tag used in the element. project_type = Target platform-specific string indicating project type. project_type_name = Target platform-specific string indicating name associated with project_type. quote_echo = Host platform-specific character used to quote arguments to echo in a script/batch file. script_hdr = Host platform-specific preamble placed in a script/batch file. script_tmpfile = Name of a temporary file that can be used by a generated script. setenv = Host platform-specific command used to set an environment variable in a script/batch file. shell = Host platform-specific command to invoke a shell on a file. targetplatform_superclass = CDT tag for "superclass" for the element. threadflags = Target platform-specific flags required when building with threading enabled. tool_name_prefix = String used in CDT GUI prefixing the names of tools in the toolchain. toolchain_internal_builder_root = Root of CDT tag for element's nonInternalBuilderId attribute. toolchain_superclass_root = Root of CDT tag for "superclass" of element. use_threads = Flag automatically set when feature(threads) is on. ace-6.4.5+dfsg.orig/MPC/docs/templates/automake.txt0000644000175000017500000000303713154167361020206 0ustar tggtgg// Current as of 2/2/2007 // This defines the role of all the template variables specific to the // 'automake' project type. // // Please try to keep this alphabetically sorted. // am_release = Provides the value to use with the -release option when creating a shared library. am_version = Provides an automake'ized version string based on the 'version' project variable. common_defines = Specifies macros that are common to all target types. defines = Macros that are specific to a particular configuration. idl_files = When a Define_Custom(IDL) is used, they will be accessible through this variable name. includedir = Specifies the include directory for the specific project. install_headers = If set, header, inline, template, idl, and pidl files will be installed. install_this_target = If set, script files, executables and library targets will be installed. For libraries, it also determines if it will be dynamic (set) or static (not set). man_files = When a Define_Custom(MAN) is used, they will be accessible through this variable name. pidl_files = When a Define_Custom(PIDL) is used, they will be accessible through this variable name. pkgconfig_files = When a Define_Custom(pkgconfig) is used, they will be accessible through this variable name. script_files = When a Define_Custom(Script) is used, they will be accessible through this variable name. use_lib_modifier_for_lit_libs = If this template variable is set, the 'lib_modifier' template variable value will be appended to the library names of those specified by the 'lit_libs' project variable. ace-6.4.5+dfsg.orig/MPC/docs/templates/wix.txt0000644000175000017500000000166413154167361017213 0ustar tggtgg// Current as of 8/10/2009 // This defines the role of all the template variables specific to the // 'wix' project type. // // Please try to keep this alphabetically sorted. // // for the original wix support guid = The value for this variable is generated during project generation. install_location = A space separated list of installation directories. source_directory = The value of either exeout, dllout, or libout with the variable portion converted to a suitable value for WIX. // if wix_extended=1 is set exclude = If true (1), no components are generated for WiX for this project guid = The value for this variable is generated during project generation. install_location = A space separated list of installation directories. make_group = If true (1), a top-level group is created that references all components of all of the project's project dependencies. com_register = If true (1), instruct WiX to register the project as a COM server ace-6.4.5+dfsg.orig/MPC/docs/templates/wb26.txt0000644000175000017500000000102413154167361017152 0ustar tggtgg// Document template variables for templates templates/wb26.mpd. // Please try to keep this alphabetically sorted. // additional_natures = Eclipse natures that should appear in the .project file disable_subprojects = Disables generation of subprojects (.wrproject) and project references (.project) project_prefix = Prefix for the project names and the MPC-created directory that contains .project, .wrproject, etc. standard_build = Specify that you want to use standard build instead of flexible build (not tested with -type wb30) ace-6.4.5+dfsg.orig/MPC/docs/templates/bmake.txt0000644000175000017500000000371713154167361017464 0ustar tggtgg// Current as of 9/25/2006 // This defines the role of all the template variables specific to the // 'bmake' project type. // // Please try to keep this alphabetically sorted. // binary_compile_flags = Compiler flags passed to both dynamic libraries and executables cc = The name of the C++ compiler. cflags = C compiler flags to be use during compilation and linking. ccflags = C++ compiler flags specific to a particular compiler. common_defines = Macros that are common to all configurations. common_flags = Compiler flags that are common to all configurations. common_libs = Libraries that are common to all configurations. compilers = The list of possible compilers. cppdir = The list of directories to be searched when locating C++ files. This is determined by the BMakeProjectCreator. debug_macros = Macros that are only set for debug builds. debug_prj = Indicates that the current template configuration is debug. This is different than negating the 'optimize' template variable. defines = Macros that are specific to a particular configuration. dllflags = Linker flags that are required to create a dynamic library. exeflags = Linker flags that are required to create an executable. libflags = Flags that are required to create a static library. link = The name of the tool used to create dynamic libraries and executables. obj_ext = The extension given to object files. postlinkrmext = A configuration specific extension applied to the 'exename' and removed during cleanup. rc = The name of the resource compiler. rcdir = The list of directories to be searched when locating resource files. This is determined by the BMakeProjectCreator. startup_letter = The text used during the creation of the startup object file. thflags = Thread related compiler flags. tlib = The name of the tool used to create static libraries. unicode_flags = Compiler flags used to create Unicode targets. use_vcl = A binary value indicating the use of VCL. warnflags = Compiler flags to set the warning levels. ace-6.4.5+dfsg.orig/MPC/docs/templates/vc7java.txt0000644000175000017500000000260213154167361017736 0ustar tggtgg// Current as of 11/15/2007 // This defines the role of all the template variables specific to the // 'vc7' and 'vc71' project types with the java language. // // Please try to keep this alphabetically sorted. // allowunsafeblocks = Enable/disable the use of the unsafe keyword. common_defines = Specifies macros that are common to all target types. defines = Macros that are specific to a particular configuration. guid = The value for this variable is generated during project generation. incremental = This setting corresponds to the Configuration Properties Advanced property "Incremental Build". The boolean values true and false correspond to enabling or disabling the feature in the IDE. keyfile = Indicate the keyfile to use when signing the assembly. prversion = This setting specifies the ProductVersion in the generated .vjsproj file. scc = This template variable enables or disables the use of Scc. schemaversion = This setting specifies the SchemaVersion in the generated .vjsproj file. startupobject = This corresponds to the Common Properties General property "Startup Object". trace = This setting corresponds to the Configuration Properties Build property "Conditional Compilation Constants". If this boolean template variable is set, the TRACE constant will be defined. winapp = This boolean template variable indicates whether the application target is for the Console or Windows subsystem. ace-6.4.5+dfsg.orig/MPC/mwc.pl0000755000175000017500000000415013154167361014034 0ustar tggtgg#! /usr/bin/perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # ****************************************************************** # Author: Chad Elliott # Date: 6/17/2002 # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** require 5.006; use strict; use FindBin; use File::Spec; use File::Basename; ## Sometimes $FindBin::RealBin will end up undefined. If it is, we need ## to use the directory of the built-in script name. And, for VMS, we ## have to convert that into a UNIX path so that Perl can use it ## internally. my $basePath = (defined $FindBin::RealBin && $FindBin::RealBin ne '' ? $FindBin::RealBin : File::Spec->rel2abs(dirname($0))); $basePath = VMS::Filespec::unixify($basePath) if ($^O eq 'VMS'); ## Add the full path to the MPC modules to the Perl include path my $mpcpath = $basePath; unshift(@INC, $mpcpath . '/modules'); # Has to be a require because it's in the modules directory. require mpc_debug; ## If the ACE_ROOT environment variable is defined and this version of ## MPC is located inside the directory to which ACE_ROOT points, we will ## assume that the user wanted the ACE specific version of this script. ## We will change the $basePath to what it would have been had the user ## run this script out of $ACE_ROOT/bin. my $aceroot = $ENV{ACE_ROOT}; $aceroot =~ s!\\!/!g if (defined $aceroot); $basePath = $aceroot . '/bin/MakeProjectCreator' if (defined $aceroot && $aceroot eq dirname($basePath)); require Driver; # ************************************************************ # Subroutine Section # ************************************************************ sub getBasePath { return $mpcpath; } # ************************************************************ # Main Section # ************************************************************ my $driver = new Driver($basePath, Driver::workspaces()); exit($driver->run(@ARGV)); ace-6.4.5+dfsg.orig/MPC/ChangeLog0000644000175000017500000001742313154167361014467 0ustar tggtggMon Aug 7 14:23:34 UTC 2017 Adam Mitz * docs/README: Updated README for vc/vs version numbers. Fri May 12 11:12:03 UTC 2017 Chad Elliott * templates/uvis.mpd: Added 'linkflags' to affect the linker options. Thu Mar 23 19:33:48 UTC 2017 Adam Mitz * config/pin_base.mpb: * config/pin_tool.mpb: * config/winapp.mpb: * config/wireshark.mpb: * docs/README: * docs/html/MakeProjectCreator.html: * modules/VS2017ProjectCreator.pm: * modules/VS2017WorkspaceCreator.pm: * bin/registry.pl: * templates/vs2017dll.mpt: * templates/vs2017exe.mpt: * templates/vs2017lib.mpt: * templates/vs2017libexe.mpt: * templates/vs2017platforms.mpt: Renamed "-type vc15" to vs2017. Updated documentation. * modules/VC15ProjectCreator.pm: * modules/VC15WorkspaceCreator.pm: * templates/vc15dll.mpt: * templates/vc15exe.mpt: * templates/vc15lib.mpt: * templates/vc15libexe.mpt: * templates/vc15platforms.mpt: Removed/renamed these files. Mon Feb 13 21:58:22 UTC 2017 Adam Mitz * modules/ProjectCreator.pm: Enhanced handling of 'gendir' for project types that use "combined custom" (mostly vc >= 10). Need to track common 'gendir' for output file and also get the input-file-specific value of 'gendir' to replace the <%gendir%> token. Tue Feb 7 15:36:45 UTC 2017 Chad Elliott * templates/uvis.mpd: Updated to support the 'prebuild' keyword. Mon Jan 30 18:41:22 UTC 2017 Chad Elliott * templates/uvis.mpd: Added template variables to set the ram sizes and a scatter file. Tue Jan 17 15:16:06 UTC 2017 Chad Elliott * modules/UVISWorkspaceCreator.pm: Convert slashes in the project path to backslashes. * templates/uvis.mpd: Support building assembly files and only put the device and CMSIS sections in if the project is an executable and there are device_files. Thu Nov 17 13:20:23 UTC 2016 Chad Elliott * templates/uvis.mpd: Added the ability to set the IRAM1 and IRAM2 sizes. Wed Nov 16 21:50:12 UTC 2016 Chad Elliott * templates/uvis.mpd: * templates/uvis.mpt: Added support for user defined DEVICE_Files and CMSIS_Files to support building for specific targets. Wed Nov 16 14:44:33 UTC 2016 Chad Elliott * modules/Depgen/Driver.pm: * modules/Depgen/MakeDependencyWriter.pm: Added an option to override the creation of Cygwin paths on Windows. * templates/make.mpd: * templates/makedll.mpt: Corrected linking with the Keil compiler. * templates/uvis.mpd: Fixed the implementation of the pure_libs keyword. Thu Nov 10 18:00:05 UTC 2016 Chad Elliott * templates/uvis.mpd: Updated to support 'postbuild' and to support linking in libraries to an executable. Wed Nov 9 17:57:54 UTC 2016 Chad Elliott * docs/USAGE: * modules/UVISProjectCreator.pm: * modules/UVISWorkspaceCreator.pm: * templates/uvis.mpd: * templates/uvis.mpt: Added support for the Keil uVision 5 IDE. Mon Oct 31 16:16:07 UTC 2016 Chad Elliott * templates/makedll.mpt: Updated to change the platform for the Keil compiler to something specific to the operating system and architecture. Wed Oct 26 11:31:35 UTC 2016 Chad Elliott * templates/makedll.mpt: Added support for the Keil compiler. Mon Sep 26 21:08:34 UTC 2016 Adam Mitz * modules/ProjectCreator.pm (generated_source_listed): From Chad Elliott: removed an optimization that was invalid * modules/ProjectCreator.pm (other changes): * modules/CommandHelper.pm: Allow CommandHelper::get_output to return more detailed dependency info. See comments in that function for usage. Mon Mar 7 19:40:37 UTC 2016 Chad Elliott * modules/ProjectCreator.pm: Fixed an issue with custom_only projects that define empty Source_Files sections. For these projects, an empty section is equivalent to a defaulted section as they do not serve any real purpose. * templates/make.mpd: Fixed spacing. Wed Feb 17 19:19:40 UTC 2016 Chad Elliott * modules/ProjectCreator.pm: When creating a project with only custom projects, keep explicitly added files when removing non-custom_only aspects of the project. Tue Sep 8 13:16:45 UTC 2015 Chad Elliott * templates/makedll.mpt: Added a C macro that corresponds to the coverage and profiling options. Mon Jul 27 20:04:02 UTC 2015 Chad Elliott * modules/Creator.pm: * modules/TemplateParser.pm: Fixed a bug where scoped names would get added to the non-scoped name in every scope. This bug was introduced by me in my change from Fri Jul 6 16:46:47 UTC 2012. Mon Feb 23 12:34:28 UTC 2015 Chad Elliott * modules/WorkspaceCreator.pm: Do not completely override -value_template and -value_project settings given on the actual MPC command line with workspace 'cmdline' settings. They are now merged together. Thu Jan 08 07:50:12 UTC 2015 Johnny Willemsen * modules/VC8WorkspaceCreator.pm: Completed the changes for the entry below. The original modification was not complete. Thu Nov 20 11:56:03 UTC 2014 Chad Elliott * modules/ProjectCreator.pm: Made a tiny grammatical correction in an informational message. * modules/VC8WorkspaceCreator.pm: When creating external dependencies, only create a full path using the output directory or current directory if the project name is not a full path itself. Thank you to Manfred Peter for finding and reporting this bug. Wed Nov 5 08:12:27 UTC 2014 Johnny Willemsen * templates/vc1xdll.mpt: * templates/vc1xexe.mpt: Set same pdbc/pdbl settings to generate pdb files as we do with older vc versions Wed Nov 5 08:03:49 UTC 2014 Johnny Willemsen * docs/templates/vc10.txt: * templates/vc10.mpd: * templates/vc1xdll.mpt: * templates/vc1xexe.mpt: * templates/vc7dll.mpt: With TAO we have the case that exe and dll have the same name which causes problems with the pdb file. Add a new use_pdb_modifier which we enable by default for vc1x, it adds _dll to the pdb file for a dll, and _exe to the pdb file for a exe Wed Oct 8 13:41:24 UTC 2014 Chad Elliott * MPC version 4.1.0 released. Local Variables: mode: change-log add-log-time-format: (lambda () (progn (setq tz (getenv TZ)) (set-time-zone-rule UTC) (setq time (format-time-string %a %b %e %H:%M:%S %Z %Y (current-time))) (set-time-zone-rule tz) time)) indent-tabs-mode: nil End: ace-6.4.5+dfsg.orig/MPC/clone_build_tree.pl0000755000175000017500000003761013154167361016553 0ustar tggtgg#! /usr/bin/perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # ****************************************************************** # Author: Chad Elliott # Date: 4/8/2004 # Description: Clone a build tree into an alternate location. # This script is a rewrite of create_ace_build.pl and # does not restrict the user to place the build # in any particular location or that it be used with # ACE_wrappers. Some of the functions were borrowed # from create_ace_build.pl, but were modified quite a # bit. # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** use strict; use Cwd; use FileHandle; use File::Copy; use File::Find; use File::Path; use File::stat; use File::Basename; # ****************************************************************** # Data Section # ****************************************************************** my $exclude; my @foundFiles; my $verbose = 0; my $lbuildf = 0; my $lnonbuildf = 0; my $version = '1.16'; eval 'symlink("", "");'; my $hasSymlink = ($@ eq ''); # ****************************************************************** # Subroutine Section # ****************************************************************** sub findCallback { my $matches = !(/^CVS\z/s && ($File::Find::prune = 1) || /^\.svn\z/s && ($File::Find::prune = 1) || defined $exclude && /^$exclude\z/s && ($File::Find::prune = 1) || /^\.cvsignore\z/s && ($File::Find::prune = 1) || /^\..*obj\z/s && ($File::Find::prune = 1) || /^Templates\.DB\z/s && ($File::Find::prune = 1) || /^Debug\z/s && ($File::Find::prune = 1) || /^Release\z/s && ($File::Find::prune = 1) || /^Static_Debug\z/s && ($File::Find::prune = 1) || /^Static_Release\z/s && ($File::Find::prune = 1) ); if ($matches) { if(!$lnonbuildf) { $matches &&= (! -l $_ && ! ( -f $_ && /^core\z/s) && ! /^.*\.rej\z/s && ! /^.*\.state\z/s && ! /^.*\.so\z/s && ! /^.*\.[oa]\z/s && ! /^.*\.dll\z/s && ! /^.*\.lib\z/s && ! /^.*\.obj\z/s && ! /^.*~\z/s && ! /^\.\z/s && ! /^\.#.*\z/s && ! /^.*\.ncb\z/s && ! /^.*\.opt\z/s && ! /^.*\.bak\z/s && ! /^.*\.suo\z/s && ! /^.*\.ilk\z/s && ! /^.*\.pdb\z/s && ! /^.*\.pch\z/s && ! /^.*\.log\z/s && ! ( -f $_ && /^.*\.d\z/s ) ); } if ($matches) { if (!$lbuildf) { $matches = (! /^.*\.dsp\z/s && ! /^.*\.dsw\z/s && ! /^.*\.vcproj\z/s && ! /^.*\.sln\z/s && ! /^Makefile.*\z/s && ! /^GNUmakefile.*\z/s && ! /^.*\.am\z/s && ! /^\.depend\..*\z/s && ! /^.*\.vcn\z/s && ! /^.*\.vcp\z/s && ! /^.*\.vcw\z/s && ! /^.*\.vpj\z/s && ! /^.*\.vpw\z/s && ! /^.*\.cbx\z/s && ! /^.*\.bpgr\z/s && ! /^.*\.bmak\z/s && ! /^.*\.bmake\z/s && ! /^.*\.mak\z/s && ! /^.*\.nmake\z/s && ! /^.*\.bld\z/s && ! /^.*\.icc\z/s && ! /^.*\.icp\z/s && ! /^.*\.classpath\z/s && ! /^.*\.project\z/s && ! /^.*\.wrproject\z/s && ! /^.*\.wrmakefile\z/s && ! /^.*\.vxtest\z/s ); } if ($matches) { ## Remove the beginning dot slash as we save the file push(@foundFiles, $File::Find::name); $foundFiles[$#foundFiles] =~ s/^\.[\\\/]+//; } } } } sub getFileList { File::Find::find({wanted => \&findCallback}, '.'); return \@foundFiles; } sub backupAndMoveModified { my($realpath, $linkpath) = @_; my $mltime = -M $linkpath; my $mrtime = -M $realpath; my $status = 1; ## -M returns the number of days since modification. Therefore, ## a smaller time means that it has been modified more recently. ## This is different than what stat() returns. ## If the hard linked file is newer than the original file, that means ## the link has been broken by something and needs to be "fixed". We ## will back up the original file and move the modified file into it's ## place. if ($mltime < $mrtime) { $status = 0; ## Move the real file to a backup unlink("$realpath.bak"); if (rename($realpath, "$realpath.bak")) { ## Move the linked file to the real file name if (move($linkpath, $realpath)) { $status = 1; } else { ## The move failed, so we will attempt to put ## the original file back. unlink($realpath); rename("$realpath.bak", $realpath); } } } elsif ($mltime != $mrtime || -s $linkpath != -s $realpath) { ## The two files are different in some way, we need to make a backup ## so that we don't cause a loss of data/work. $status = 0; } if (!$status) { ## We were not able to properly deal with this file. We will ## attempt to preserve the modified file. unlink("$linkpath.bak"); rename($linkpath, "$linkpath.bak"); } } sub hardlink { my($realpath, $linkpath) = @_; if ($^O eq 'MSWin32' && ! -e $realpath) { ## If the real file "doesn't exist", then we need to ## look up the short file name. my $short = Win32::GetShortPathName($realpath); ## If we were able to find the short file name, then we need to ## try again. if (defined $short) { $realpath = $short; } else { ## This should never happen, but there appears to be a bug ## with the underlying Win32 APIs on Windows Server 2003. ## Long paths will cause an error which perl will ignore. ## Unicode versions of the APIs seem to work fine. ## To experiment try Win32 _fullpath() and CreateHardLink with ## long paths. print "WARNING: Skipping $realpath.\n"; return 1; } } return link($realpath, $linkpath); } sub symlinkFiles { my($files, $fullbuild, $dmode, $startdir, $absolute) = @_; my $sdlength = length($startdir) + 1; my $partial = ($absolute ? undef : substr($fullbuild, $sdlength, length($fullbuild) - $sdlength)); foreach my $file (@$files) { my $fullpath = "$fullbuild/$file"; if (-e $fullpath) { ## We need to make sure that we're not attempting to mix hardlinks ## and softlinks. if (! -d $fullpath && ! -l $fullpath) { my $stat = stat($fullpath); if ($stat->nlink() > 1) { print STDERR "ERROR: Attempting to mix softlinks ", "with a hardlink build.\n", "$fullpath has ", $stat->nlink(), " links.\n"; return 1; } } } else { if (-d $file) { if ($verbose) { print "Creating $fullpath\n"; } if (!mkpath($fullpath, 0, $dmode)) { print STDERR "ERROR: Unable to create $fullpath\n"; return 1; } } else { if ($absolute) { if ($verbose) { print "symlink $startdir/$file $fullpath\n"; } if (!symlink("$startdir/$file", $fullpath)) { print STDERR "ERROR: Unable to symlink $fullpath\n"; return 1; } } else { my $buildfile = "$partial/$file"; my $slashcount = ($buildfile =~ tr/\///); my $real = ($slashcount == 0 ? './' : ('../' x $slashcount)) . $file; print "symlink $real $fullpath\n" if ($verbose); if (!symlink($real, $fullpath)) { print STDERR "ERROR: Unable to symlink $fullpath\n"; return 1; } } } } } ## Remove links that point to non-existant files. The subroutine is ## now anonymous to avoid the "will not stay shared" warning for %dirs. my %dirs; File::Find::find({wanted => sub { if (-l $_ && ! -e $_) { unlink($_); $dirs{$File::Find::dir} = 1; if ($verbose) { print "Removing $File::Find::dir/$_\n"; } } } }, $fullbuild); foreach my $key (keys %dirs) { rmdir($key); } return 0; } sub hardlinkFiles { my($files, $fullbuild, $dmode, $startdir) = @_; my @hardlinks; foreach my $file (@$files) { my $fullpath = "$fullbuild/$file"; if (-d $file) { if (! -e $fullpath) { if ($verbose) { print "Creating $fullpath\n"; } if (!mkpath($fullpath, 0, $dmode)) { print STDERR "ERROR: Unable to create $fullpath\n"; return 1; } } } else { if (-e $fullpath) { ## We need to make sure that we're not attempting to mix hardlinks ## and softlinks. if (-l $fullpath) { print STDERR "ERROR: Attempting to mix hardlinks ", "with a softlink build.\n", "$fullpath is a softlink.\n"; return 1; } backupAndMoveModified($file, $fullpath); } if (! -e $fullpath) { if ($verbose) { print "hardlink $file $fullpath\n"; } if (!hardlink($file, $fullpath)) { print STDERR "ERROR: Unable to link $fullpath\n"; return 1; } } ## If we successfully linked the file or it already exists, ## we need to keep track of it. push(@hardlinks, $file); } } ## Remove links that point to non-existant files my $lfh = new FileHandle(); my $txt = "$fullbuild/clone_build_tree.links"; if (open($lfh, $txt)) { my %dirs; while(<$lfh>) { my $line = $_; $line =~ s/\s+$//; if (! -e $line) { my $full = "$fullbuild/$line"; unlink($full); $dirs{dirname($full)} = 1; print "Removing $full\n" if ($verbose); } } close($lfh); foreach my $key (keys %dirs) { rmdir($key); } } ## Rewrite the link file. unlink($txt); if (open($lfh, ">$txt")) { foreach my $file (@hardlinks) { print $lfh "$file\n"; } close($lfh); } return 0; } sub linkFiles { my($absolute, $dmode, $hardlink, $builddir, $builds) = @_; my $status = 0; my $starttime = time(); my $startdir = getcwd(); ## Ensure that the build directory exists and is writable mkpath($builddir, 0, $dmode); if (! -d $builddir || ! -w $builddir) { print STDERR "ERROR: Unable to create or write to $builddir\n"; return 1; } ## Search for the clonable files print "Searching $startdir for files...\n"; my $files = getFileList(); my $findtime = time() - $starttime; print 'Found ', scalar(@$files), ' files and directories in ', $findtime, ' second', ($findtime == 1 ? '' : 's'), ".\n"; foreach my $build (@$builds) { my $fullbuild = "$builddir/$build"; ## Create all of the links for this build if (-d $fullbuild) { print "Updating $fullbuild\n"; } else { print "Creating $fullbuild\n"; mkpath($fullbuild, 0, $dmode); } if ($hardlink) { $status += hardlinkFiles($files, $fullbuild, $dmode, $startdir); } else { $status += symlinkFiles($files, $fullbuild, $dmode, $startdir, $absolute); } print "Finished in $fullbuild\n"; } print 'Total time: ', time() - $starttime, " seconds.\n" if ($status == 0); return $status; } sub usageAndExit { my $msg = shift; print STDERR "$msg\n" if (defined $msg); my $base = basename($0); my $spc = ' ' x (length($base) + 8); print STDERR "$base v$version\n\n", "Create a tree identical in layout to the current directory\n", "with the use of ", ($hasSymlink ? "symbolic links or " : ''), "hard links.\n\n", "Usage: $base [-b ] [-d ] [-f] [-n]", ($hasSymlink ? "[-a] [-l] " : ''), "[-v]\n", $spc, "[build names...]\n\n", ($hasSymlink ? "-a Use absolute paths when creating soft links.\n" . "-l Use hard links instead of soft links.\n" : ''), "-b Set the build directory. It defaults to the ", "/build.\n", "-d Set the directory permissions mode.\n", "-f Link build files (Makefile, .dsw, .sln, .etc).\n", "-n Link non-build files normally avoided (.o,.so, etc.).\n", "-s Set the start directory. It defaults to the ", ".\n", "-v Enable verbose mode.\n"; exit(0); } # ****************************************************************** # Main Section # ****************************************************************** my $dmode = 0777; my $absolute = 0; my $hardlink = !$hasSymlink; my $builddir; my @builds; my $startdir; for(my $i = 0; $i <= $#ARGV; ++$i) { if ($ARGV[$i] eq '-a') { $absolute = 1; } elsif ($ARGV[$i] eq '-b') { ++$i; if (defined $ARGV[$i]) { $builddir = $ARGV[$i]; ## Convert backslashes to slashes $builddir =~ s/\\/\//g; ## Remove trailing slashes $builddir =~ s/\/+$//; ## Remove duplicate slashes while($builddir =~ s/\/\//\//g) { } } else { usageAndExit('-b requires an argument'); } } elsif ($ARGV[$i] eq '-d') { ++$i; if (defined $ARGV[$i]) { $dmode = $ARGV[$i]; } else { usageAndExit('-d requires an argument'); } } elsif ($ARGV[$i] eq '-f') { $lbuildf = 1; } elsif ($ARGV[$i] eq '-l') { $hardlink = 1; } elsif ($ARGV[$i] eq '-n') { $lnonbuildf = 1; } elsif ($ARGV[$i] eq '-v') { $verbose = 1; } elsif ($ARGV[$i] eq '-s') { ++$i; if (defined $ARGV[$i]) { $startdir = $ARGV[$i]; } else { usageAndExit('-s requires an argument'); } } elsif ($ARGV[$i] =~ /^-/) { usageAndExit('Unknown option: ' . $ARGV[$i]); } else { push(@builds, $ARGV[$i]); } } if (defined $startdir && !chdir($startdir)) { print "ERROR: Unable to change directory to $startdir\n"; exit(1); } $builddir = getcwd() . '/build' if (!defined $builddir); if (index($builddir, getcwd()) == 0) { $exclude = substr($builddir, length(getcwd()) + 1); $exclude =~ s/([\+\-\\\$\[\]\(\)\.])/\\$1/g; $exclude =~ s/.*?([^\/]+)$/$1/; } else { $absolute = 1; } if (!defined $builds[0]) { my $cwd = getcwd(); if (chdir($builddir)) { @builds = glob('*'); chdir($cwd); } else { usageAndExit('There are no builds to update.'); } } exit(linkFiles($absolute, $dmode, $hardlink, $builddir, \@builds)); ace-6.4.5+dfsg.orig/MPC/rpm/0000775000175000017500000000000013157240624013503 5ustar tggtggace-6.4.5+dfsg.orig/MPC/rpm/buildrpm.sh0000755000175000017500000000631213154167361015663 0ustar tggtgg#!/bin/sh # ****************************************************************** # Author: Chad Elliott # Date: 8/13/2009 # Description: Create an MPC rpm based on the current version number. # ****************************************************************** ## First find out where this script is located if [ "$0" != "`basename $0`" ]; then if [ "`echo $0 | cut -c1`" = "/" ]; then loc="`dirname $0`" else loc="`pwd`/`dirname $0`" fi else ## Do my own 'which' here loc="." for i in `echo $PATH | tr ':' '\012'`; do if [ -x "$i/$0" -a ! -d "$i/$0" ]; then loc="$i" break fi done fi ## Now, get back to where the main MPC script is located while [ ! -x $loc/mpc.pl ]; do loc=`dirname $loc` done ## Build up the packager name and email address if [ -z "$REPLYTO" ]; then DOMAIN=`hostname | sed 's/[^\.][^\.]*\.//'` FULLDOMAIN=`echo $DOMAIN | grep '\.'` if [ -z "$DOMAIN" -o -z "$FULLDOMAIN" ]; then RESOLVDOMAIN=`grep '^search' /etc/resolv.conf | sed 's/.*\s//'` FULLDOMAIN=`echo $RESOLVDOMAIN | grep '\.'` if [ -z "$DOMAIN" -o -n "$FULLDOMAIN" ]; then DOMAIN=$RESOLVDOMAIN fi fi REPLYTO="$LOGNAME@$DOMAIN" fi PACKAGER=`getent passwd $LOGNAME | cut -d: -f5` if [ -z "$PACKAGER" ]; then PACKAGER=$CL_USERNAME fi if [ -z "$PACKAGER" ]; then PACKAGER="<$REPLYTO>" else PACKAGER="$PACKAGER <$REPLYTO>" fi ## Save the MPC version VERSION=`$loc/mpc.pl --version | sed 's/.*v//'` ## This is where we'll create the spec file and do the work WDIR=/tmp/mpc.$$ ## This is the directory name that RPM expects MDIR=MPC-$VERSION ## This corresponds to BuildRoot in MPC.spec BDIR=/tmp/mpc ## This is the final install directory and corresponds to the %files section ## of MPC.spec FDIR=/usr/lib/MPC ##Check if build and work directory already exist if [ -d "$BDIR" -o -f "$BDIR" ]; then echo "Necessary directory $BDIR already exists." echo "Exiting." exit fi if [ -d "$WDIR" -o -f "$WDIR" ]; then echo "Necessary directory $WDIR already exists." echo "Exiting." exit fi ## Create our working directory mkdir -p $WDIR ## The directory where RPM will place the resulting file if [ -x /usr/src/redhat -a -w /usr/src/redhat ]; then RPMLOC=/usr/src/redhat elif [ -x /usr/src/packages -a -w /usr/src/packages ]; then RPMLOC=/usr/src/packages else RPMLOC=$WDIR/rpmbuild mkdir -p $RPMLOC mkdir -p $RPMLOC/BUILD mkdir -p $RPMLOC/RPMS mkdir -p $RPMLOC/SOURCES fi ## Make the spec file cd $WDIR sed "s/VERSION/$VERSION/; s/PACKAGER/$PACKAGER/; s!FINALDIR!$FDIR!" $loc/rpm/MPC.templ > MPC.spec ## Make a copy of the original MPC source to the new directory mkdir -p $MDIR/$FDIR cd $loc tar --exclude=.svn -cf - . | (cd $WDIR/$MDIR/$FDIR; tar -xf -) ## Create the build source tar.bz2 cd $WDIR tar --owner root --group root -cf $RPMLOC/SOURCES/$MDIR.tar $MDIR bzip2 -9f $RPMLOC/SOURCES/$MDIR.tar ## Perform the RPM creation step rm -rf $BDIR mkdir -p $BDIR rpmbuild --define "_topdir $RPMLOC" --define "_buildrootdir $BDIR" --define "buildroot $BDIR" --define "__arch_install_post %{nil}" -bb MPC.spec if [ "$RPMLOC" = "$WDIR/rpmbuild" ]; then echo "Copying rpm to $loc/rpm" cp $RPMLOC/RPMS/*/*.rpm $loc/rpm fi ## Clean everything up cd .. rm -rf $WDIR $BDIR ace-6.4.5+dfsg.orig/MPC/rpm/MPC.templ0000644000175000017500000000137313154167361015172 0ustar tggtggSummary: MPC - The Makefile, Project and Workspace Creator. Name: MPC Version: VERSION Release: 0 License: Open Software License Group: Software Development BuildRoot: /tmp/mpc Source: %{name}-%{version}.tar.bz2 URL: http://www.ociweb.com/products/mpc Vendor: Object Computing, Inc. Packager: PACKAGER buildarch: noarch %description MPC (Make, Project and workspace Creator) is an open source tool, developed by OCI and written in Perl. It is designed to generate a variety of tool specific project files from a common baseline. %defattr(-,root,root) %pre %prep %setup %build %install tar cf - * | (cd $RPM_BUILD_ROOT && tar xf -) %post ln -sf FINALDIR/mwc.pl /usr/bin ln -sf FINALDIR/mpc.pl /usr/bin %postun rm -f /usr/bin/mwc.pl /usr/bin/mpc.pl %files FINALDIR ace-6.4.5+dfsg.orig/MPC/vs_postclean.pl0000755000175000017500000000712213154167361015750 0ustar tggtgg#! /usr/bin/perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # ****************************************************************** # Author: Chad Elliott # Date: 7/10/2008 # Description: Visual Studio doesn't support a post clean build step, # so this script will do it. # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** use strict; use FileHandle; use File::Basename; use Cwd; # ****************************************************************** # Data Section # ****************************************************************** my $version = '1.0'; # ****************************************************************** # Subroutine Section # ****************************************************************** sub read_proj { my($cfg, $file) = @_; my $fh = new FileHandle(); my $cmd; if (open($fh, $file)) { my $cfg_ok; my $next_name; my $next_command; while(<$fh>) { ## Locate the start of a Configuration section if (//g; $cmd =~ s/</) { if (/^Project\([^)]+\)\s*=\s*"[^\"]+",\s*"([^\"]+)"/) { clean_proj($cfg, $1); } } close($fh); } } # ****************************************************************** # Main Section # ****************************************************************** if ($#ARGV == -1) { print "PostClean v$version\n", "Usage: ", basename($0), " [CFG=] \n\n", "Executes the MPC generated VCPostCleanEventTool commands in a project.\n", "These events are ignored by VisualStudio and must be handled by an outside\n", "tool (i.e., this script).\n"; exit(0); } ## Determine the project or solution configuration (defaulting to the ## default created by MPC). my $cfg = 'Debug|Win32'; if ($ARGV[0] =~ /^CFG=(.+)/) { $cfg = $1; shift(@ARGV); } foreach my $file (@ARGV) { if ($file =~ /\.sln$/) { clean_sln($cfg, $file); } else { ## It's not a solution file, we'll assume it's a project clean_proj($cfg, $file); } } ace-6.4.5+dfsg.orig/MPC/templates/0000775000175000017500000000000013157240624014703 5ustar tggtggace-6.4.5+dfsg.orig/MPC/templates/vc12libexe.mpt0000644000175000017500000000017213154167361017372 0ustar tggtgg// -*- MPC -*- conditional_include "vc12platforms" conditional_include "vc1xlibexe" conditional_include "user_vc12libexe" ace-6.4.5+dfsg.orig/MPC/templates/wb30dll.mpt0000644000175000017500000000277413154167361016707 0ustar tggtgg conditional_include "wb26dll" additional_natures = org.eclipse.cdt.core.cnature org.eclipse.cdt.core.ccnature project_prefix = wb_ platform = Native // platforms Native { no_platform_in_wrproject = 1 platform_name = project_type = ApplicationProject enable_subprojects = 1 exe_ext = dll_ext = .so dll_prefix = lib ar = ar ar_flags = crus librarian_objects = %Objects% exe_buildtool = C++-Linker dll_buildtool = C++-Linker buildspecs = Linux-gnu-native-3.x-4.x Windows-gnu-native-3.x-4.x default_buildspec = Linux-gnu-native-3.x-4.x wrprj_macros = TOOL_PATH LIBPATH LIBS ADAPT_DEPS } // buildspecs Linux-gnu-native-3.x-4.x { cxx = g++ cc = gcc platform_asflags = -MD -MP platform_cxxflags = -MD -MP platform_ccflags = -MD -MP ass_flags = -x assembler -fno-builtin -Wall cxx_flags = -ansi -fno-builtin -Wall c_flags = -ansi -fno-builtin -Wall ass_dbgflags = -g cxx_dbgflags = -g c_dbgflags = -g pic = -fPIC shflags = -shared } Windows-gnu-native-3.x-4.x { exe_ext = .exe cxxlnk_derivedsigs = *.exe clnk_derivedsigs = *.exe dll_prefix = dll_ext = .dll cxx = g++ cc = gcc platform_asflags = -MD -MP platform_cxxflags = -MD -MP platform_ccflags = -MD -MP ass_flags = -x assembler -fno-builtin -Wall cxx_flags = -fno-builtin -Wall //-ansi not supported with MinGW c_flags = -fno-builtin -Wall //-ansi not supported with MinGW ass_dbgflags = -g cxx_dbgflags = -g c_dbgflags = -g shflags = -shared } conditional_include "user_wb30dll" ace-6.4.5+dfsg.orig/MPC/templates/bds4.mpd0000644000175000017500000004273213154167361016252 0ustar tggtgg ace.bpf <%foreach(defines common_defines macros)%> <%endfor%> <%if(type_is_dynamic)%> <%foreach(dynamicflags)%> <%endfor%> <%endif%> <%if(need_staticflags)%> <%foreach(staticflags)%> <%endfor%> <%endif%> <%foreach(4, includes)%> <%endfor%> <%if(type_is_dynamic)%> <%endif%> <%if(contains(linkflags, -aa))%> <%else%> <%endif%> <%if(source_files)%> <%foreach(source_files)%> <%endfor%> <%endif%> <%if(header_files)%> <%foreach(header_files)%> <%endfor%> <%endif%> <%if(inline_files)%> <%foreach(inline_files)%> <%endfor%> <%endif%> <%foreach(custom_types)%> <%if(custom_type->input_files)%> <%foreach(custom_type->input_files)%> <%endfor%> <%endif%> <%endfor%> <%if(template_files)%> <%foreach(template_files)%> <%endfor%> <%endif%> <%if(documentation_files)%> <%foreach(documentation_files)%> <%endfor%> <%endif%> <%if(resource_files)%> <%foreach(resource_files)%> <%endfor%> <%endif%> False False 1 0 0 0 False False False False False 1043 1252 1.0.0.0 1.0.0.0 False False False True False ace-6.4.5+dfsg.orig/MPC/templates/vc10dll.mpt0000644000175000017500000000016413154167361016674 0ustar tggtgg// -*- MPC -*- conditional_include "vc10platforms" conditional_include "vc1xdll" conditional_include "user_vc10dll" ace-6.4.5+dfsg.orig/MPC/templates/common.mpt0000644000175000017500000000022413154167361016714 0ustar tggtgg// -*- MPC -*- // This file contains assignments that are common to all templates pch_defines += USING_PCH use_lib_modifier = 1 use_exe_modifier = ace-6.4.5+dfsg.orig/MPC/templates/vc10exe.mpt0000644000175000017500000000016413154167361016702 0ustar tggtgg// -*- MPC -*- conditional_include "vc10platforms" conditional_include "vc1xexe" conditional_include "user_vc10exe" ace-6.4.5+dfsg.orig/MPC/templates/vc11platforms.mpt0000644000175000017500000000071613154167361020134 0ustar tggtgg// -*- MPC -*- // // Any of these platforms can set using value_template platforms= // when generating solutions/projects. // //platforms = Win32 x64 platforms = Win32 x64 default_platform = Win32 PlatformToolset = v110 Win32 { output_subdir = I386 } x64 { output_subdir = AMD64 cpu_defines = _AMD64_ platform_defines = _WIN64 TargetMachine = "0" // We let VC++ figure it out for us. link_options = /machine:AMD64 } ace-6.4.5+dfsg.orig/MPC/templates/sledll.mpt0000644000175000017500000000016313154167361016705 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" conditional_include "user_sledll" ace-6.4.5+dfsg.orig/MPC/templates/uvis.mpd0000644000175000017500000006512013154167361016400 0ustar tggtgg 2.1
    ### uVision Project, (C) Keil Software
    <%project_name%> 0x4 ARM-ADS 5060183::V5.06 update 2 (build 183)::ARMCC <%foreach(configurations)%> <%foreach(devices)%> <%device%> <%vendor%> Keil.<%dfp%>_DFP.1.2.0 http://www.keil.com/pack IRAM(<%iram1_start%>,<%iram1_size%>) IRAM2(<%iram2_start%>,<%iram2_size%>) IROM(0x08000000,0x00100000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0<%dfp%>_1024 -FS08000000 -FL0100000 -FP0($$Device:<%device%>$Flash\<%flash%>)) 0 $$Device:<%device%>$Device\Include\<%register%> $$Device:<%device%>$SVD\<%sfd%> 0 0 0 0 0 0 1 .\Objects\ <%if(exename)%><%exename%><%else%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%endif%> <%if(exename)%>1<%else%>0<%endif%> <%if(exename)%>0<%else%>1<%endif%> 0 <%debuginformation%> 1 .\Listings\ 1 0 0 0 0 0 0 0 0 <%if(prebuild)%>1<%else%>0<%endif%> 0 <%eval(prebuild)%> 0 0 0 0 <%if(postbuild)%>1<%else%>0<%endif%> 0 <%eval(postbuild)%> 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 3 1 SARMCM3.DLL -REMAP -MPU DCM.DLL -pCM4 SARMCM3.DLL -MPU TCM.DLL -pCM4 1 0 0 0 16 1 0 0 1 1 4096 1 BIN\UL2CM3.DLL 0 0 1 1 1 1 1 1 1 0 1 1 0 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 "Cortex-M4" 0 0 0 1 1 0 0 2 1 0 8 1 0 0 0 3 3 0 0 0 0 0 0 0 0 0 0 1 0 <%if(xram1_start && xram1_size)%>1<%else%>0<%endif%> <%if(xram2_start && xram2_size)%>1<%else%>0<%endif%> <%if(xram3_start && xram3_size)%>1<%else%>0<%endif%> <%if(iram1_start && iram1_size)%>1<%else%>0<%endif%> <%if(iram2_start && iram2_size)%>1<%else%>0<%endif%> 0 0x0 0x0 0 0x0 0x0 0 0x0 0x0 0 0x0 0x0 0 0x0 0x0 0 0x0 0x0 0 <%iram1_start%> <%iram1_size%> 1 0x8000000 0x100000 0 0x0 0x0 0 0x0 0x0 0 0x0 0x0 0 0x0 0x0 1 0x8000000 0x100000 0 0x0 0x0 0 <%xram1_start(0x0)%> <%xram1_size(0x0)%> 0 <%xram2_start(0x0)%> <%xram2_size(0x0)%> 0 <%xram3_start(0x0)%> <%xram3_size(0x0)%> 0 <%iram1_start%> <%iram1_size%> 0 <%iram2_start%> <%iram2_size%> 1 1 0 0 1 0 0 0 0 0 2 0 0 0 0 1 1 1 1 0 0 <%genflags%> <%foreach(macros)%><%macro%> <%endfor%>ARMCC <%foreach(includes)%><%include%><%fornotlast(";")%><%endfor%> 1 0 0 0 0 0 0 0 0 <%if(scatter_file)%>0<%else%>1<%endif%> 0 0 0 1 0 0x08000000 0x20000000 <%scatter_file%> <%linkflags%> <%endfor%> <%endfor%> Source 0 0 0 0 0 2 2 2 2 2 11 1 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 0 0 2 2 0 0 2 2 2 2 2 2 2 2 2 <%foreach(source_files)%> <%basename(source_file)%> <%if(ends_with(source_file, \.s))%> 2 <%else%> 1 <%endif%> <%source_file%> <%endfor%> <%if(header_files)%> Include <%foreach(header_files)%> <%basename(header_file)%> 5 <%header_file%> <%endfor%> <%endif%> <%if(inline_files)%> Inline <%foreach(inline_files)%> <%basename(inline_file)%> 5 <%inline_file%> <%endfor%> <%endif%> <%if(documentation_files)%> Misc <%foreach(documentation_files)%> <%basename(documentation_file)%> 5 <%documentation_file%> <%endfor%> <%endif%> <%if(exename)%> Libraries <%foreach(libs lit_libs)%> <%basename(lib)%>.lib 4 <%libpaths%>\<%lib%>.lib <%endfor%> <%foreach(pure_libs)%> <%basename(pure_lib)%> 4 <%pure_lib%> <%endfor%> <%endif%> ::Board Support 0 0 0 0 0 1 2 2 2 2 11 1 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 0 0 0 0 2 2 2 2 2 2 2 2 2 ::CMSIS 0 0 0 0 0 1 2 2 2 2 11 1 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 0 0 2 2 2 2 2 2 2 2 2 2 2 <%if(exename)%> <%foreach(configurations)%> <%foreach(devices)%> <%if(device_files)%> <%endif%> <%foreach(cmsis_files)%> <%cmsis_file%> <%endfor%> <%foreach(device_files)%> <%if(ends_with(device_file, \.s))%> <%device_file%> <%else%> <%device_file%> <%endif%> <%endfor%> <%endfor%> <%endfor%> <%endif%>
    ace-6.4.5+dfsg.orig/MPC/templates/vs2017platforms.mpt0000644000175000017500000000071613154167361020324 0ustar tggtgg// -*- MPC -*- // // Any of these platforms can set using value_template platforms= // when generating solutions/projects. // //platforms = Win32 x64 platforms = Win32 x64 default_platform = Win32 PlatformToolset = v141 Win32 { output_subdir = I386 } x64 { output_subdir = AMD64 cpu_defines = _AMD64_ platform_defines = _WIN64 TargetMachine = "0" // We let VC++ figure it out for us. link_options = /machine:AMD64 } ace-6.4.5+dfsg.orig/MPC/templates/wixcs.mpd0000644000175000017500000001046413154167361016550 0ustar tggtgg <%marker(top)%> <%foreach(platforms)%> <%foreach(configurations)%> <%if(!exclude)%> <%comment("Only put one component in a fragment. If, say, both the debug and release components are in the")%> <%comment("same fragment, and just the debug component is used in an installer, the release component will")%> <%comment("be identified as unused, and an error generated. That is, it seems that referencing any component")%> <%comment("in a fragment causes the entire fragment to be pulled in, and any unused component in the fragment will be flagged as an error")%> <%if(!no_binary)%> <%endif%> <%foreach(cultures)%> <%if(compares(culture, _neutral_))%> <%comment("Do nothing here - the neutral culture will be built as the primary output of the project")%> <%else%> <%endif%> <%endfor%> <%marker(component_top)%> <%if(!no_binary)%> <%endif%> <%foreach(cultures)%> <%if(compares(culture, _neutral_))%> <%comment("Do nothing here - the neutral culture will be built as the primary output of the project")%> <%else%> <%endif%> <%endfor%> <%marker(component_bottom)%> <%endif%> <%endfor%> <%endfor%> <%marker(bottom)%> ace-6.4.5+dfsg.orig/MPC/templates/vc14exe.mpt0000644000175000017500000000016413154167361016706 0ustar tggtgg// -*- MPC -*- conditional_include "vc14platforms" conditional_include "vc1xexe" conditional_include "user_vc14exe" ace-6.4.5+dfsg.orig/MPC/templates/uvis.mpt0000644000175000017500000000043213154167361016413 0ustar tggtggconfigurations = Release devices = STM32L476ZGTx Debug { debuginformation = 1 } Release { debuginformation = 0 } STM32L476ZGTx { board = STM32L476 dfp = STM32L4xx vendor = STMicroelectronics flash = STM32L4xx_1024.FLM register = stm32l4xx.h sfd = STM32L4x6.svd } ace-6.4.5+dfsg.orig/MPC/templates/vc8lib.mpt0000644000175000017500000000307613154167361016623 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release common_defines = WIN32 _WINDOWS _CRT_NONSTDC_NO_WARNINGS ConfigurationType = 4 Detect64BitPortabilityProblems = false MinimalRebuild = false conditional_include "vc8platforms" Release { optimize = 2 defines = NDEBUG output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = s GenerateDebugInformation = false } Debug { debug_prj = 1 defines = _DEBUG output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = sd } Memcheck Release { optimize = 2 defines = NDEBUG output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = s BasicRuntimeChecks = 0 FixedBaseAddress = 1 } Memcheck Debug { debug_prj = 1 defines = _DEBUG output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = sd BasicRuntimeChecks = 0 FixedBaseAddress = 1 } MFC Release { optimize = 2 defines = NDEBUG output_dir = Static_MFC_Release intermediate_dir = Static_MFC_Release lib_modifier = mfcs UseOfMFC = 2 GenerateDebugInformation = false } MFC Debug { debug_prj = 1 defines = _DEBUG output_dir = Static_MFC_Debug intermediate_dir = Static_MFC_Debug lib_modifier = mfcsd UseOfMFC = 2 } conditional_include "vcpartialmacros" conditional_include "user_vc8lib" ace-6.4.5+dfsg.orig/MPC/templates/nmakeexe.mpt0000644000175000017500000000771313154167361017233 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" type_description = "Console Application" type_code = 0x0103 configurations = Debug Release "Static Debug" "Static Release" platforms = Win32 default_configuration = Debug common_defines = WIN32 _CONSOLE subsystem = console TreatWChar_tAsBuiltInType = true systemlibs = advapi32.lib user32.lib Win32 { machine_description = x86 machine = I386 } Win64 { machine_description = IA64 machine = IA64 cpu_defines = WIN64 add_compile = /Wp64 } x64 { machine_description = x64 machine = AMD64 cpu_defines = _AMD64_ add_compile = /Wp64 platform_defines = _WIN64 } Release { use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /EHsc /MD /GR defines = NDEBUG compile_flags_removed = /YX output_dir = Release intermediate_dir = Release need_staticflags = debug_switch = } Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /EHsc /Zi /MDd /GR /Gy defines = _DEBUG compile_flags_removed = /YX intermediate_dir = Debug lib_modifier = d need_staticflags = pdbl = 1 pdbc = 1 } Static Release { use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /EHsc /MD /GR defines = NDEBUG compile_flags_removed = /YX lib_modifier = s need_staticflags = 1 output_dir = Static_Release intermediate_dir = Static_Release debug_switch = } Static Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /EHsc /Zi /MDd /GR /Gy defines = _DEBUG compile_flags_removed = /YX lib_modifier = sd need_staticflags = 1 output_dir = Static_Debug intermediate_dir = Static_Debug pdbl = 1 pdbc = 1 } MFC Release { subsystem = windows use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /EHsc /MD /GR defines = NDEBUG _AFXDLL compile_flags_removed = /YX output_dir = MFC_Release intermediate_dir = MFC_Release lib_modifier = mfc need_staticflags = debug_switch = unicode_mfc_entry = wWinMainCRTStartup } MFC Debug { subsystem = windows use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /EHsc /Zi /MDd /GR /Gy defines = _DEBUG _AFXDLL compile_flags_removed = /YX output_dir = MFC_Debug intermediate_dir = MFC_Debug lib_modifier = mfcd need_staticflags = pdbl = 1 pdbc = 1 unicode_mfc_entry = wWinMainCRTStartup } Static MFC Release { subsystem = windows use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /EHsc /MD /GR defines = NDEBUG _AFXDLL compile_flags_removed = /YX lib_modifier = mfcs need_staticflags = 1 output_dir = Static_MFC_Release intermediate_dir = Static_MFC_Release debug_switch = unicode_mfc_entry = wWinMainCRTStartup } Static MFC Debug { subsystem = windows use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /EHsc /Zi /MDd /GR /Gy defines = _DEBUG _AFXDLL compile_flags_removed = /YX lib_modifier = mfcsd need_staticflags = 1 output_dir = Static_MFC_Debug intermediate_dir = Static_MFC_Debug pdbl = 1 pdbc = 1 unicode_mfc_entry = wWinMainCRTStartup } conditional_include "vcfullmacros" conditional_include "user_nmakeexe" ace-6.4.5+dfsg.orig/MPC/templates/vc7libexe.mpt0000644000175000017500000000456413154167361017327 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release common_defines = WIN32 _CONSOLE configuration_type = 1 subsystem = 1 output_subdir = I386 Release { LinkIncremental = 1 optimize = 3 defines = NDEBUG output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = s } Debug { optimize = debug_prj = 1 defines = _DEBUG output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = sd pdbl = 1 pdbc = 1 } Memcheck Release { optimize = 3 defines = NDEBUG output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = s BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 pdbl = 1 } Memcheck Debug { optimize = debug_prj = 1 defines = _DEBUG output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = sd pdbc = 1 BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 pdbl = 1 } MFC Release { LinkIncremental = 1 optimize = 3 defines = NDEBUG _AFXDLL output_dir = Static_MFC_Release intermediate_dir = Static_MFC_Release lib_modifier = mfcs use_mfc = 2 unicode_mfc_entry = wWinMainCRTStartup } MFC Debug { optimize = debug_prj = 1 defines = _DEBUG _AFXDLL output_dir = Static_MFC_Debug intermediate_dir = Static_MFC_Debug lib_modifier = mfcsd pdbl = 1 pdbc = 1 use_mfc = 2 unicode_mfc_entry = wWinMainCRTStartup } ETS Release { optimize = 3 defines = NDEBUG output_dir = ETS_Release intermediate_dir = ETS_Release lib_modifier = s runtime_library = 2 GenerateMapFile = TRUE lit_libs += etsapi wsock32 } ETS Debug { optimize = defines = _DEBUG output_dir = ETS_Debug intermediate_dir = ETS_Debug lib_modifier = sd runtime_library = 3 pdbl = 1 pdbc = 1 GenerateMapFile = TRUE lit_libs += etsapi wsock32 } conditional_include "vcpartialmacros" conditional_include "user_vc7libexe" ace-6.4.5+dfsg.orig/MPC/templates/ghslibexe.mpt0000644000175000017500000000012513154167361017376 0ustar tggtgg// -*- MPC -*- conditional_include "ghscommon" conditional_include "user_ghslibexe" ace-6.4.5+dfsg.orig/MPC/templates/vc7java.mpt0000644000175000017500000000045313154167361016771 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release trace = 1 Release { optimize = 1 output_dir = Release } Debug { optimize = output_dir = Debug } conditional_include "user_vc7java" ace-6.4.5+dfsg.orig/MPC/templates/vc8csharp.mpt0000644000175000017500000000051113154167361017324 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release platforms = AnyCPU trace = 1 Release { optimize = 1 output_dir = Release } Debug { optimize = output_dir = Debug } conditional_include "user_vc8csharp" ace-6.4.5+dfsg.orig/MPC/templates/vc8platforms.mpt0000644000175000017500000001500113154167361020053 0ustar tggtgg// -*- MPC -*- // // Any of these platforms can set using value_template platforms= // when generating solutions/projects. // //platforms = Win32 x64 "Pocket PC 2003 (ARMV4)" "Smartphone 2003 (ARMV4)" \ // "Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" "Windows Mobile 5.0 Smartphone SDK (ARMV4I)" \ // "Windows Mobile 6 Standard SDK (ARMV4I)" platforms = Win32 x64 default_platform = Win32 Win32 { output_subdir = I386 } x64 { output_subdir = AMD64 cpu_defines = _AMD64_ platform_defines = _WIN64 TargetMachine = "17" link_options = /machine:AMD64 } Pocket PC 2003 (ARMV4) { output_subdir = PocketPC2003_ARMV4 cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE $(PLATFORMDEFINES) _WINDOWS _UNICODE UNICODE POCKETPC2003_UI_MODEL link_options = /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE lit_libs += ccrtrtti iphlpapi subsystem = "0" EnableFunctionLevelLinking = "true" TargetMachine = "3" } Smartphone 2003 (ARMV4) { output_subdir = Smartphone2003_ARMV4 cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE $(PLATFORMDEFINES) _WINDOWS _UNICODE UNICODE SMARTPHONE2003_UI_MODEL link_options = /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE lit_libs += ccrtrtti iphlpapi subsystem = "0" EnableFunctionLevelLinking = "true" TargetMachine = "3" } Windows Mobile 5.0 Pocket PC SDK (ARMV4I) { output_subdir = WinMobile50_PocketPC_ARMV4I cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE $(PLATFORMDEFINES) _WINDOWS _UNICODE UNICODE POCKETPC2003_UI_MODEL link_options = /subsystem:windowsce,5.01 /machine:THUMB lit_libs += iphlpapi subsystem = "0" TargetMachine = "3" } Windows Mobile 5.0 Smartphone SDK (ARMV4I) { output_subdir = WinMobile50_Smartphone_ARMV4I cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE $(PLATFORMDEFINES) _WINDOWS _UNICODE UNICODE SMARTPHONE2005_UI_MODEL link_options = /subsystem:windowsce,5.01 /machine:THUMB lit_libs += iphlpapi subsystem = "0" TargetMachine = "3" } Windows Mobile 6 Standard SDK (ARMV4I) { unicode = 1 output_subdir = WinMobile60_SDK_ARMV4I cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = _WIN32_WCE=$(CEVER) UNDER_CE=$(CEVER) WINCE _WINDOWS $(PLATFORMDEFINES) link_options = /subsystem:windowsce,5.02 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } Windows Mobile 6 Professional SDK (ARMV4I) { unicode = 1 output_subdir = WinMobile60_SDK_ARMV4I cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = _WIN32_WCE=$(CEVER) UNDER_CE=$(CEVER) WINCE _WINDOWS $(PLATFORMDEFINES) link_options = /subsystem:windowsce,5.02 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } SuperSonic_CE6 (ARMV4I) { unicode = 1 output_subdir = SUPERSONIC_CE6_ARMV4I cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,6.00 /savebaserelocations:"$(TargetDir)/$(TargetName).rel" optimizereferences = 0 enablecomdatfolding = 0 subsystem = "0" TargetMachine = "16" stackreservesize = 65536 stackcommitsize = 4096 lit_libs += iphlpapi } eBox4300_WINCE600_SDK (x86) { unicode = 1 output_subdir = eBox4300_WINCE600_SDK cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,6.0 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } eBox2300_WINCE600_SDK (x86) { unicode = 1 output_subdir = eBox2300_WINCE600_SDK cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,6.0 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } Beckhoff_HMI_500 (x86) { unicode = 1 output_subdir = Beckhoff_HMI_500 (x86) cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,5.00 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } Beckhoff_HMI_500 (ARMV4I) { unicode = 1 output_subdir = Beckhoff_HMI_500 (ARMV4i) cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,5.00 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } Beckhoff_HMI_600 (x86) { unicode = 1 output_subdir = Beckhoff_HMI_600 (x86) cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,6.00 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } BR APC620 PPC700 CE 5.00 V1.2 (x86) { unicode = 1 output_subdir = BR APC620 + PPC700 CE 5.00 V1.2 (x86) cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,5.00 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } STANDARDSDK_500 (x86) { unicode = 1 output_subdir = STANDARDSDK_500_x86 cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,5.00 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } Stellar_EC7 (ARMv4I) { unicode = 1 output_subdir = STELLAR_EC7_ARMV4I cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,7.00 /savebaserelocations:"$(TargetDir)/$(TargetName).rel" optimizereferences = 0 enablecomdatfolding = 0 subsystem = "0" TargetMachine = "16" stackreservesize = 65536 stackcommitsize = 4096 lit_libs += iphlpapi } ace-6.4.5+dfsg.orig/MPC/templates/em3vcpdll.mpt0000644000175000017500000000513413154167361017322 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" type_description = "Dynamic-Link Library" configurations = Debug Release platforms = "WCE ARM" "WCE ARMV4" "WCE emulator" "WCE x86" default_configuration = Debug default_platform = "WCE ARM" common_defines = UNICODE _UNICODE unicode = 1 WCE x86 { type_code = 0x8302 cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = IX86 cpu_defines = _i386_ _X86_ x86 ignore_libs = OLDNAMES.lib pure_libs += $(CEx86Corelibc) } WCE emulator { type_code = 0xa602 cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = IX86 cpu_defines = _i386_ _X86_ x86 ignore_libs = OLDNAMES.lib pure_libs += $(CEx86Corelibc) } WCE ARM { type_code = 0x8502 cpu_id = D6518FFC-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = ARM cpp = clarm.exe cpu_defines = ARM _ARM_ } WCE ARMV4 { type_code = 0xa302 cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = ARM cpp = clarm.exe cpu_defines = ARM _ARM_ ARMV4 cpu_options = /QRxscale } Release { use_debug_libraries = optimize = 1 compile_flags = /W3 /GR defines = NDEBUG compile_flags_removed = /YX output_dir = Release intermediate_dir = Release } Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /Zi /GR /Gy defines = _DEBUG compile_flags_removed = /Fr /YX output_dir = . intermediate_dir = Debug lib_modifier = d pdbl = 1 pdbc = 1 } MFC Release { use_debug_libraries = optimize = 1 compile_flags = /W3 /GR defines = NDEBUG compile_flags_removed = /YX output_dir = MFC_Release intermediate_dir = MFC_Release lib_modifier = mfc use_mfc = 2 } MFC Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /Zi /GR /Gy defines = _DEBUG compile_flags_removed = /Fr /YX output_dir = MFC_Debug intermediate_dir = MFC_Debug lib_modifier = mfcd pdbl = 1 pdbc = 1 use_mfc = 2 } conditional_include "vcpartialmacros" conditional_include "user_em3vcpdll" ace-6.4.5+dfsg.orig/MPC/templates/vc1xexe.mpt0000644000175000017500000000422013154167361017007 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release common_defines = WIN32 _CONSOLE _CRT_NONSTDC_NO_WARNINGS ConfigurationType = 1 SubSystem = Console MinimalRebuild = false GenerateDebugInformation = true use_pdb_modifier = 1 pdb_modifier = _exe Release { LinkIncremental = 1 optimize = MaxSpeed defines = NDEBUG output_dir = Release intermediate_dir = Release EnableIntrinsicFunctions = true WholeProgramOptimization = true } Debug { debug_prj = 1 defines = _DEBUG intermediate_dir = Debug lib_modifier = d pdbl = 1 pdbc = 1 } Memcheck Release { optimize = MaxSpeed defines = NDEBUG output_dir = Release intermediate_dir = Release BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 EnableIntrinsicFunctions = true WholeProgramOptimization = true pdbl = 1 } Memcheck Debug { debug_prj = 1 defines = _DEBUG intermediate_dir = Debug lib_modifier = d BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 pdbl = 1 } MFC Release { LinkIncremental = 1 optimize = MaxSpeed common_defines = WIN32 _WINDOWS defines = NDEBUG _AFXDLL output_dir = MFC_Release intermediate_dir = MFC_Release lib_modifier = mfc UseOfMFC = Dynamic unicode_mfc_entry = wWinMainCRTStartup EnableIntrinsicFunctions = true WholeProgramOptimization = true } MFC Debug { debug_prj = 1 common_defines = WIN32 _WINDOWS defines = _DEBUG _AFXDLL output_dir = MFC_Debug intermediate_dir = MFC_Debug lib_modifier = mfcd UseOfMFC = Dynamic unicode_mfc_entry = wWinMainCRTStartup pdbl = 1 pdbc = 1 } conditional_include "vcpartialmacros" ace-6.4.5+dfsg.orig/MPC/templates/wixcs.mpt0000644000175000017500000000005713154167361016565 0ustar tggtgg// -*- MPC -*- conditional_include "vc8csharp" ace-6.4.5+dfsg.orig/MPC/templates/vc10lib.mpt0000644000175000017500000000016413154167361016667 0ustar tggtgg// -*- MPC -*- conditional_include "vc10platforms" conditional_include "vc1xlib" conditional_include "user_vc10lib" ace-6.4.5+dfsg.orig/MPC/templates/bcb2009.mpd0000644000175000017500000002060413154167361016451 0ustar tggtgg {f76f525d-aee9-4af7-a366-e9119e55548d} CppDynamicLibrary Debug Build 12.0 true true Base true true Base true dll JPHNE <%foreach(includes)%><%include%><%fornotlast(";")%><%endfor%> false true $(BDS)\lib\vcl100.csm true <%foreach(includes)%><%include%><%fornotlast(";")%><%endfor%> <%if(use_vcl)%>false<%else%>true<%endif%> false vcl.bpi;rtl.bpi;vclx.bpi;dbrtl.bpi;vcldb.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;vclib.bpi;ibxpress.bpi;xmlrtl.bpi;vclactnband.bpi;inet.bpi;IntrawebDB_80_100.bpi;Intraweb_80_100.bpi;vclie.bpi;inetdbbde.bpi;inetdbxpress.bpi;IndyCore.bpi;IndySystem.bpi;bcbofficexp.bpi;bcbsmp.bpi;soaprtl.bpi;dsnap.bpi;IndyProtocols.bpi;bcbie.bpi;bdertl.bpi;teeui.bpi;teedb.bpi;tee.bpi;vcldbx.bpi;dsnapcon.bpi;websnap.bpi;webdsnap.bpi <%foreach(includes)%><%include%>;<%endfor%>.\;$(BDS)\lib;$(BDS)\lib\obj DLL true true false $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;.. $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;.. <%foreach(includes)%><%include%>;<%endfor%>;.\;$(BDS)\lib;$(BDS)\lib\obj $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;.. <%foreach(libpaths)%><%libpath%>;<%endfor%>;$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk NO_STRICT <%foreach(defines)%><%define%><%fornotlast(";")%><%endfor%> <%foreach(defines)%><%define%><%fornotlast(";")%><%endfor%> true <%foreach(defines)%><%define%><%fornotlast(";")%><%endfor%> <%foreach(includes)%><%include%>;<%endfor%> false true true false true DEBUG;$(DCC_Define) true Debug_Build true true $(BDS)\lib\debug;$(ILINK_LibraryPath) _DEBUG;$(BCC_Defines) Full true true false Release_Build $(BDS)\lib\release;$(ILINK_LibraryPath) NDEBUG;$(BCC_Defines) None CPlusPlusBuilder.Personality CppDynamicLibrary False False 1 0 0 0 False False False False False 1043 1252 1.0.0.0 1.0.0.0 False False False True False False True True <%if(source_files)%> <%foreach(source_files)%> <%endfor%> <%endif%> <%if(header_files)%> <%foreach(header_files)%> <%endfor%> <%endif%> <%if(inline_files)%> <%foreach(inline_files)%> <%endfor%> <%endif%> <%if(template_files)%> <%foreach(template_files)%> <%endfor%> <%endif%> <%if(documentation_files)%> <%foreach(documentation_files)%> <%endfor%> <%endif%> <%if(resource_files)%> <%foreach(resource_files)%> <%endfor%> <%endif%> ace-6.4.5+dfsg.orig/MPC/templates/wb26.mpd0000644000175000017500000000441013154167361016165 0ustar tggtgg <%project_prefix%><%project_name%> Generated by MPC <%if(after && !disable_subprojects)%> <%endif%> com.windriver.ide.core.wrbuilder com.windriver.ide.core.wrnature com.windriver.ide.core.wrcorenature <%foreach(additional_natures)%> <%additional_nature%> <%endfor%> <%if(!standard_build && make_coexistence)%> <%foreach(source_files)%> <%source_file%> 1 <%full_path(source_file)%> <%endfor%> <%foreach(header_files)%> <%header_file%> 1 <%full_path(header_file)%> <%endfor%> <%if(pch_header)%> <%pch_header%> 1 <%full_path(pch_header)%> <%endif%> <%foreach(inline_files)%> <%inline_file%> 1 <%full_path(inline_file)%> <%endfor%> <%foreach(template_files)%> <%template_file%> 1 <%full_path(template_file)%> <%endfor%> <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> <%if(starts_with(custom_type->input_file, \.\.))%><%basename(custom_type->input_file)%><%else%><%custom_type->input_file%><%endif%> 1 <%full_path(custom_type->input_file)%> <%endfor%> <%endfor%> <%endif%> ace-6.4.5+dfsg.orig/MPC/templates/bcb2009dll.mpt0000644000175000017500000000021413154167361017160 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" common_defines = WIN32 conditional_include "user_bdsdll" ace-6.4.5+dfsg.orig/MPC/templates/bds4dll.mpt0000644000175000017500000000021413154167361016753 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" common_defines = WIN32 conditional_include "user_bdsdll" ace-6.4.5+dfsg.orig/MPC/templates/vc1xlibexe.mpt0000644000175000017500000000421313154167361017500 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release common_defines = WIN32 _CONSOLE _CRT_NONSTDC_NO_WARNINGS ConfigurationType = 1 SubSystem = Console MinimalRebuild = false GenerateDebugInformation = true Release { LinkIncremental = 1 optimize = MaxSpeed defines = NDEBUG output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = s EnableIntrinsicFunctions = true WholeProgramOptimization = true } Debug { debug_prj = 1 defines = _DEBUG output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = sd } Memcheck Release { optimize = MaxSpeed defines = NDEBUG output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = s BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 EnableIntrinsicFunctions = true WholeProgramOptimization = true } Memcheck Debug { debug_prj = 1 defines = _DEBUG output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = sd BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 } MFC Release { LinkIncremental = 1 optimize = MaxSpeed common_defines = WIN32 _WINDOWS defines = NDEBUG _AFXDLL output_dir = Static_MFC_Release intermediate_dir = Static_MFC_Release lib_modifier = mfcs UseOfMFC = Dynamic unicode_mfc_entry = wWinMainCRTStartup EnableIntrinsicFunctions = true WholeProgramOptimization = true } MFC Debug { debug_prj = 1 common_defines = WIN32 _WINDOWS defines = _DEBUG _AFXDLL output_dir = Static_MFC_Debug intermediate_dir = Static_MFC_Debug lib_modifier = mfcsd UseOfMFC = Dynamic unicode_mfc_entry = wWinMainCRTStartup } conditional_include "vcpartialmacros" ace-6.4.5+dfsg.orig/MPC/templates/bmakelib.mpt0000644000175000017500000000054313154167361017176 0ustar tggtgg// -*- MPC -*- conditional_include "bmakecommon" Release { optimize = 1 defines = NDEBUG intermediate_dir = Static_Release lib_modifier = _bsr } Debug { optimize = debug_prj = 1 defines = _DEBUG intermediate_dir = Static_Debug lib_modifier = _bsd } conditional_include "user_bmakelib" ace-6.4.5+dfsg.orig/MPC/templates/bmakelibexe.mpt0000644000175000017500000000076413154167361017705 0ustar tggtgg// -*- MPC -*- conditional_include "bmakecommon" startup_letter = x Release { optimize = 1 defines = NDEBUG output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = _bsr postlinkrmext = .tds } Debug { optimize = debug_prj = 1 defines = _DEBUG output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = _bsd postlinkrmext = .tds } conditional_include "user_bmakelibexe" ace-6.4.5+dfsg.orig/MPC/templates/em3vcplib.mpt0000644000175000017500000000477613154167361017330 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" type_description = "Static Library" platforms = "WCE ARM" "WCE ARMV4" "WCE emulator" "WCE x86" default_configuration = Debug default_platform = "WCE ARM" configurations = Debug Release common_defines = UNICODE _UNICODE unicode = 1 WCE x86 { type_code = 0x8304 cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = IX86 cpu_defines = _i386_ _X86_ x86 } WCE emulator { type_code = 0xa604 cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = IX86 cpu_defines = _i386_ _X86_ x86 } WCE ARM { type_code = 0x8504 cpu_id = D6518FFC-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = ARM cpp = clarm.exe cpu_defines = ARM _ARM_ } WCE ARMV4 { type_code = 0xa304 cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = ARM cpp = clarm.exe cpu_defines = ARM _ARM_ ARMV4 cpu_options = /QRxscale } Release { use_debug_libraries = optimize = 1 compile_flags = /W3 /GR defines = NDEBUG compile_flags_removed = /YX output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = s } Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /Zi /GR /Gy defines = _DEBUG compile_flags_removed = /Fr /YX output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = sd pdbc = 1 } MFC Release { use_debug_libraries = optimize = 1 compile_flags = /W3 /GR defines = NDEBUG compile_flags_removed = /YX output_dir = Static_MFC_Release intermediate_dir = Static_MFC_Release lib_modifier = mfcs use_mfc = 2 } MFC Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /Zi /GR /Gy defines = _DEBUG compile_flags_removed = /Fr /YX output_dir = Static_MFC_Debug intermediate_dir = Static_MFC_Debug lib_modifier = mfcsd pdbc = 1 use_mfc = 2 } conditional_include "vcpartialmacros" conditional_include "user_em3vcplib" ace-6.4.5+dfsg.orig/MPC/templates/vc7.mpd0000644000175000017500000005705413154167361016120 0ustar tggtgg" encoding="<%encoding("Windows-1252")%>"?> " Version="<%vcversion%>" Name="<%project_name%>" ProjectGUID="{<%guid%>}" SccProjectName="" SccLocalPath=""> "/> <%foreach(configurations)%> <%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%><%endif%><%endif%>" IntermediateDirectory="<%intermediate_dir%>\<%noextension(project_file)%><%if(output_subdir)%>\<%output_subdir%><%endif%>" <%if(type_is_static && staticname)%> ConfigurationType="4" <%else%> <%if(custom_only)%> ConfigurationType="10" <%else%> ConfigurationType="<%configuration_type("2")%>" <%endif%> <%endif%> UseOfMFC="<%use_mfc("0")%>" <%if(UseOfATL)%> UseOfATL="<%UseOfATL%>" <%endif%> ATLMinimizesCRunTimeLibraryUsage="FALSE" <%if(managed)%> ManagedExtensions="1" <%endif%> CharacterSet="<%charset("0")%>"> <%if(!custom_only)%> AdditionalOptions="<%compile_flags%><%foreach(DisableSpecificWarnings)%> /wd<%DisableSpecificWarning%><%endfor%>" <%endif%> <%if(optimize)%> Optimization="<%optimize%>" <%else%> Optimization="0" <%endif%> <%if(InlineFunctionExpansion)%> InlineFunctionExpansion="<%InlineFunctionExpansion%>" <%endif%> AdditionalIncludeDirectories="<%foreach(includes)%><%include%><%fornotlast(",")%><%endfor%>" PreprocessorDefinitions="<%if(unicode)%>UNICODE;_UNICODE;<%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%><%dynamicflag%>;<%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%><%staticflag%>;<%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%><%pch_define%>;<%endfor%><%endif%><%foreach(defines common_defines macros)%><%define%><%fornotlast(";")%><%endfor%><%if(macro_for_lib_modifier)%><%if(use_lib_modifier)%><%if(lib_modifier)%>;MPC_LIB_MODIFIER=\"<%lib_modifier%>\"<%endif%><%endif%><%endif%>" MinimalRebuild="<%MinimalRebuild("FALSE")%>" ExceptionHandling="<%exceptions("TRUE")%>" <%if(!managed)%> <%if(optimize)%> <%if(BasicRuntimeChecks)%> BasicRuntimeChecks="<%BasicRuntimeChecks%>" <%endif%> <%else%> BasicRuntimeChecks="<%BasicRuntimeChecks("3")%>" <%endif%> <%endif%> <%if(StringPooling)%> StringPooling="<%StringPooling%>" <%endif%> <%if(runtime_library)%> RuntimeLibrary="<%runtime_library%>" <%else%> RuntimeLibrary="<%if(type_is_static || need_staticflags)%><%if(debug_prj)%>1<%else%>0<%endif%><%else%><%if(debug_prj)%>3<%else%>2<%endif%><%endif%>" <%endif%> BufferSecurityCheck="<%BufferSecurityCheck("TRUE")%>" EnableFunctionLevelLinking="<%EnableFunctionLevelLinking("TRUE")%>" TreatWChar_tAsBuiltInType="<%wchar_t("TRUE")%>" <%if(forloopscope)%> ForceConformanceInForLoopScope="<%forloopscope%>" <%endif%> RuntimeTypeInfo="<%rtti("TRUE")%>" <%if(pch_header)%> <%if(pch_source)%> UsePrecompiledHeader="3" <%else%> UsePrecompiledHeader="2" <%endif%> PrecompiledHeaderThrough="<%pch_header%>" <%endif%> <%if(pdbc)%> ProgramDataBaseFileName="<%if(type_is_static)%><%libout%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb<%else%><%intermediate_dir%>\<%noextension(project_file)%><%if(output_subdir)%>\<%output_subdir%><%endif%>/<%endif%>" <%endif%> WarningLevel="<%warning_level("3")%>" SuppressStartupBanner="TRUE" Detect64BitPortabilityProblems="<%Detect64BitPortabilityProblems("FALSE")%>" DebugInformationFormat="<%debug_format("3")%>"/> <%endif%> <%if(!custom_only)%> Name="VCLibrarianTool" <%if(staticname)%> OutputFile="<%libout%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>" <%endif%> <%if(lib_options)%> AdditionalOptions="<%lib_options%>" <%endif%> <%else%> Name="VCLinkerTool" <%if(!source_files || link_options)%> AdditionalOptions="<%if(!source_files)%>/noentry <%endif%><%if(link_options)%><%link_options%><%endif%>" <%endif%> <%if(type_is_binary)%> AdditionalDependencies="<%foreach(reverse(libs))%><%fornotfirst(" ")%><%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%><%endfor%><%foreach(reverse(lit_libs))%> <%lit_lib%>.lib<%endfor%><%foreach(reverse(pure_libs))%> <%pure_lib%><%endfor%>" <%endif%> <%if(exename || sharedname || staticname)%> OutputFile="$(OutDir)\<%if(type_is_dynamic)%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%else%><%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%><%endif%>" <%endif%> <%if(win_version)%> Version="<%win_version%>" <%endif%> LinkIncremental="<%LinkIncremental("2")%>" SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="<%foreach(libpaths)%><%libpath%><%fornotlast(";")%><%endfor%>" <%if(ignore_default_library_names)%> IgnoreDefaultLibraryNames="<%foreach(ignore_default_library_names)%><%ignore_default_library_name%><%fornotlast(";")%><%endfor%>" <%endif%> <%if(IgnoreAllDefaultLibraries)%> IgnoreAllDefaultLibraries="<%IgnoreAllDefaultLibraries%>" <%endif%> <%if(ModuleDefinitionFile)%> ModuleDefinitionFile="<%ModuleDefinitionFile%>" <%endif%> <%if(pdbl)%> GenerateDebugInformation="TRUE" <%if(sharedname)%> ProgramDatabaseFile="$(OutDir)\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb" <%else%> <%if(exename)%> ProgramDatabaseFile="$(OutDir)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>.pdb" <%endif%> <%endif%> <%endif%> <%if(GenerateMapFile)%> GenerateMapFile="<%GenerateMapFile%>" <%endif%> SubSystem="<%subsystem("1")%>" <%if(StackReserveSize)%> StackReserveSize="<%StackReserveSize%>" <%endif%> <%if(StackCommitSize)%> StackCommitSize="<%StackCommitSize%>" <%endif%> <%if(optimize)%> OptimizeReferences="<%optref("2")%>" EnableCOMDATFolding="<%opticf("2")%>" <%else%> <%if(optref)%> OptimizeReferences="<%optref%>" <%endif%> <%endif%> <%if(unicode && unicode_mfc_entry && exename && source_files)%> EntryPointSymbol="<%unicode_mfc_entry%>" <%endif%> <%if(type_is_dynamic && sharedname)%> ImportLibrary="<%libout%>\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>" <%endif%> <%endif%> <%if(FixedBaseAddress || managed)%> FixedBaseAddress="<%FixedBaseAddress("1")%>" <%endif%> TargetMachine="<%machine("1")%>"/> <%endif%> AdditionalOptions="<%midl_flags%>" <%endif%> <%if(midl_includes)%> AdditionalIncludeDirectories="<%foreach(midl_includes)%><%midl_include%><%fornotlast(",")%><%endfor%>" <%endif%> <%if(midl_defines)%> PreprocessorDefinitions="<%foreach(midl_defines)%><%midl_define%><%fornotlast(";")%><%endfor%>" <%endif%> <%if(midl_notlb)%> GenerateTypeLibrary="FALSE" <%endif%> TypeLibraryName="$(InputName).tlb" HeaderFileName="$(InputName).h" InterfaceIdentifierFileName="$(InputName)_i.c" ProxyFileName="$(InputName)_p.c" /> CommandLine="<%eval(postbuild)%>" <%endif%> /> CommandLine="<%eval(prebuild)%>" <%endif%> /> <%if(!custom_only)%> CommandLine="<%eval(prelink)%>" <%endif%> /> <%if(postclean)%> <%endif%> <%endfor%>" Culture="<%culture("1033")%>" AdditionalIncludeDirectories="<%foreach(includes)%><%include%><%fornotlast(",")%><%endfor%>"/> <%endif%> <%endfor%> <%if(exename || sharedname || staticname)%> <%if(source_files)%> <%endfor%>"> <%if(pch_source)%> <%foreach(configurations)%> <%endfor%> <%endif%> <%if(grouped_source_files)%> <%foreach(sort(grouped_source_files))%> <%if(compares(grouped_source_file, default_group))%> <%foreach(grouped_source_file->files)%> <%if(duplicate_index(grouped_source_file->file))%> <%foreach(configurations)%> file, buildflags))%> AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>" <%endif%> <%if(flag_overrides(grouped_source_file->file, no_pch))%> UsePrecompiledHeader="0" <%endif%> <%if(flag_overrides(grouped_source_file->file, managed))%> BasicRuntimeChecks="0" CompileAsManaged="2" <%endif%> ObjectFile="$(IntDir)\$(InputName)<%duplicate_index(grouped_source_file->file)%>.obj"/> <%endfor%> <%else%> <%if(flag_overrides(grouped_source_file->file, buildflags) || flag_overrides(grouped_source_file->file, no_pch) || flag_overrides(grouped_source_file->file, managed))%> <%foreach(configurations)%> file, buildflags))%> AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>" <%endif%> <%if(flag_overrides(grouped_source_file->file, no_pch))%> UsePrecompiledHeader="0" <%endif%> <%if(flag_overrides(grouped_source_file->file, managed))%> BasicRuntimeChecks="0" CompileAsManaged="2" <%endif%> /> <%endfor%> <%endif%> <%endif%> <%endfor%> <%else%> <%foreach(grouped_source_file->files)%> <%if(duplicate_index(grouped_source_file->file))%> <%foreach(configurations)%> file, buildflags))%> AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>" <%endif%> <%if(flag_overrides(grouped_source_file->file, no_pch))%> UsePrecompiledHeader="0" <%endif%> <%if(flag_overrides(grouped_source_file->file, managed))%> BasicRuntimeChecks="0" CompileAsManaged="2" <%endif%> ObjectFile="$(IntDir)\$(InputName)<%duplicate_index(grouped_source_file->file)%>.obj"/> <%endfor%> <%else%> <%if(flag_overrides(grouped_source_file->file, buildflags) || flag_overrides(grouped_source_file->file, no_pch) || flag_overrides(grouped_source_file->file, managed))%> <%foreach(configurations)%> file, buildflags))%> AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>" <%endif%> <%if(flag_overrides(grouped_source_file->file, no_pch))%> UsePrecompiledHeader="0" <%endif%> <%if(flag_overrides(grouped_source_file->file, managed))%> BasicRuntimeChecks="0" CompileAsManaged="2" <%endif%> /> <%endfor%> <%endif%> <%endif%> <%endfor%> <%endif%> <%endfor%> <%else%> <%foreach(source_files)%> <%if(duplicate_index(source_file))%> <%foreach(configurations)%> AdditionalOptions="<%flag_overrides(source_file, buildflags)%>" <%endif%> <%if(flag_overrides(source_file, no_pch))%> UsePrecompiledHeader="0" <%endif%> <%if(flag_overrides(source_file, managed))%> BasicRuntimeChecks="0" CompileAsManaged="2" <%endif%> ObjectFile="$(IntDir)\$(InputName)<%duplicate_index(source_file)%>.obj"/> <%endfor%> <%else%> <%if(flag_overrides(source_file, buildflags) || flag_overrides(source_file, no_pch) || flag_overrides(source_file, managed))%> <%foreach(configurations)%> AdditionalOptions="<%flag_overrides(source_file, buildflags)%>" <%endif%> <%if(flag_overrides(source_file, no_pch))%> UsePrecompiledHeader="0" <%endif%> <%if(flag_overrides(source_file, managed))%> BasicRuntimeChecks="0" CompileAsManaged="2" <%endif%> /> <%endfor%> <%endif%> <%endif%> <%endfor%> <%endif%> <%endif%> <%endif%> <%if(header_files)%> <%endfor%>"> <%if(pch_header)%> <%endif%> <%if(grouped_header_files)%> <%foreach(sort(grouped_header_files))%> <%if(compares(grouped_header_file, default_group))%> <%foreach(grouped_header_file->files)%> <%endfor%> <%else%> <%foreach(grouped_header_file->files)%> <%endfor%> <%endif%> <%endfor%> <%else%> <%foreach(header_files)%> <%endfor%> <%endif%> <%endif%> <%foreach(custom_types)%> <%if(custom_type->input_files)%> <%endfor%>"> <%foreach(custom_type->input_files)%> <%foreach(configurations)%> input_file->output_files)%> ExcludedFromBuild="TRUE" <%endif%> > <%if(custom_type->input_file->output_files)%> input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies || (!need_staticflags && (flag_overrides(custom_type->input_file, dependent_libs) || custom_type->dependent_libs)))%> AdditionalDependencies="<%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%dep%><%if(!has_extension(dep))%><%exe_ext%><%endif%><%fornotlast(";")%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%><%custom_type->dependent%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%><%fornotlast(";")%><%endfor%><%endif%><%endif%><%foreach(custom_type->input_file->dependencies)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent)%>;<%else%><%fornotfirst(";")%><%endif%><%custom_type->input_file->dependencie%><%endfor%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%>;<%else%><%fornotfirst(";")%><%endif%><%dirname(dep_lib)%>\<%libname_prefix%><%basename(dep_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%>;<%else%><%fornotfirst(";")%><%endif%><%dirname(custom_type->dependent_lib)%>\<%libname_prefix%><%basename(custom_type->dependent_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%endfor%><%endif%><%endif%><%endif%>" <%endif%> Outputs="<%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(";")%><%endfor%>"/> <%endif%> <%endfor%> <%endfor%> <%endif%> <%endfor%> <%if(inline_files)%> <%endfor%>"> <%if(grouped_inline_files)%> <%foreach(sort(grouped_inline_files))%> <%if(compares(grouped_inline_file, default_group))%> <%foreach(grouped_inline_file->files)%> <%endfor%> <%else%> <%foreach(grouped_inline_file->files)%> <%endfor%> <%endif%> <%endfor%> <%else%> <%foreach(inline_files)%> <%endfor%> <%endif%> <%endif%> <%if(template_files)%> <%if(grouped_template_files)%> <%foreach(sort(grouped_template_files))%> <%if(compares(grouped_template_file, default_group))%> <%foreach(grouped_template_file->files)%> <%foreach(configurations)%> <%endfor%> <%endfor%> <%else%> <%foreach(grouped_template_file->files)%> <%foreach(configurations)%> <%endfor%> <%endfor%> <%endif%> <%endfor%> <%else%> <%foreach(template_files)%> <%foreach(configurations)%> <%endfor%> <%endfor%> <%endif%> <%endif%> <%if(documentation_files)%> <%if(grouped_documentation_files)%> <%foreach(sort(grouped_documentation_files))%> <%if(compares(grouped_documentation_file, default_group))%> <%foreach(grouped_documentation_file->files)%> <%foreach(configurations)%> <%endfor%> <%endfor%> <%else%> <%foreach(grouped_documentation_file->files)%> <%foreach(configurations)%> <%endfor%> <%endfor%> <%endif%> <%endfor%> <%else%> <%foreach(documentation_files)%> <%foreach(configurations)%> <%endfor%> <%endfor%> <%endif%> <%endif%> <%if(resource_files && !type_is_static)%> <%if(grouped_resource_files)%> <%foreach(sort(grouped_resource_files))%> <%if(compares(grouped_resource_file, default_group))%> <%foreach(grouped_resource_file->files)%> <%endfor%> <%else%> <%foreach(grouped_resource_file->files)%> <%endfor%> <%endif%> <%endfor%> <%else%> <%foreach(resource_files)%> <%endfor%> <%endif%> <%endif%> ace-6.4.5+dfsg.orig/MPC/templates/vc7vb.mpt0000644000175000017500000000045113154167361016455 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release trace = 1 Release { optimize = 1 output_dir = Release } Debug { optimize = output_dir = Debug } conditional_include "user_vc7vb" ace-6.4.5+dfsg.orig/MPC/templates/bcb2009exe.mpt0000644000175000017500000000021413154167361017166 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" common_defines = WIN32 conditional_include "user_bdsexe" ace-6.4.5+dfsg.orig/MPC/templates/vc7vb.mpd0000644000175000017500000001451113154167361016437 0ustar tggtgg " SchemaVersion = "<%schemaversion("2.0")%>" ProjectGuid = "{<%guid%>}" <%if(scc)%> SccProjectName = "<%scc%>" SccLocalPath = "<%scc%>" SccAuxPath = "<%scc%>" SccProvider = "<%scc%>" <%endif%> > <%foreach(ico_files)%> <%if(forfirst)%> ApplicationIcon = "<%ico_file%>" <%endif%> <%endfor%> <%else%> ApplicationIcon = "" <%endif%> AssemblyKeyContainerName = "" <%if(exename || sharedname || staticname)%> AssemblyName = "<%if(exename)%><%exename%><%else%><%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%endif%>" <%endif%> AssemblyOriginatorKeyFile = "" DefaultClientScript = "JScript" DefaultHTMLPageLayout = "Grid" DefaultTargetSchema = "IE50" DelaySign = "<%DelaySign("false")%>" <%if(exename || sharedname || staticname)%> OutputType = "<%if(exename)%><%if(winapp)%>Win<%endif%>Exe<%else%>Library<%endif%>" <%endif%> OutputCompare = "Binary" OptionExplicit = "On" OptionStrict = "Off" RootNamespace = "" StartupObject = "<%startupobject%>" <%if(libpaths)%> ReferencePath = "<%foreach(libpaths)%><%libpath%><%fornotlast(";")%><%endfor%>" <%endif%> > <%foreach(configurations)%> <%endfor%>" DefineDebug = "<%if(optimize)%>false<%else%>true<%endif%>" DefineTrace = "<%if(trace)%>true<%else%>false<%endif%>" DefineSymbols = "<%if(optimize)%>false<%else%>true<%endif%>" IncrementalBuild = "<%incremental("false")%>" Optimize = "<%if(optimize)%>true<%else%>false<%endif%>" <%if(exename || sharedname || staticname)%> OutputPath = "<%if(exename)%><%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir%><%endif%><%else%>.\<%output_dir%><%endif%><%else%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%output_dir%><%endif%>\" <%endif%> RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" WarningLevel = "1" /> <%endfor%> <%foreach(libs)%> <%endfor%> <%foreach(lib, lit_libs pure_libs)%> <%endfor%> <%foreach(source_files)%> <%endfor%> <%foreach(resx_files)%> <%endfor%> <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> input_file->output_files)%> BuildAction = "Compile" Generator = "<%if(custom_type->libpath)%>PATH=%PATH%;<%custom_type->libpath%> <%endif%><%if(flag_overrides(custom_type->input_file, gendir))%>if not exist <%flag_overrides(custom_type->input_file, gendir)%> mkdir <%flag_overrides(custom_type->input_file, gendir)%> <%endif%><%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%><%custom_type->input_file%> <%custom_type->output_option%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_files)%><%else%><%custom_type->input_file->output_files%><%endif%><%else%><%custom_type->input_file%><%endif%><%if(flag_overrides(custom_type->input_file, postcommand))%><%foreach(custom_type->input_file)%>&&<%flag_overrides(custom_type->input_file, postcommand)%><%endfor%><%else%><%if(custom_type->postcommand)%><%foreach(custom_type->input_file)%>&&<%custom_type->postcommand%><%endfor%><%endif%><%endif%>" <%else%> BuildAction = "None" <%endif%> /> <%endfor%> <%endfor%> <%foreach(aspx_files)%> <%endfor%> <%foreach(ico_files)%> <%endfor%> <%foreach(config_files)%> <%endfor%> <%foreach(documentation_files)%> <%endfor%> ace-6.4.5+dfsg.orig/MPC/templates/vc6dspdll.mpt0000644000175000017500000000315213154167361017330 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "vccommon" conditional_include "windowscommon" type_description = "Dynamic-Link Library" type_code = 0x0102 configurations = Debug Release common_defines = WIN32 _WINDOWS Release { use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /GX /MD /GR defines = NDEBUG compile_flags_removed = /YX output_dir = Release intermediate_dir = Release debug_switch = } Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy defines = _DEBUG compile_flags_removed = /Fr /YX intermediate_dir = Debug lib_modifier = d pdbl = 1 pdbc = 1 } MFC Release { use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /GX /MD /GR defines = NDEBUG _WINDLL _AFXDLL compile_flags_removed = /YX output_dir = MFC_Release intermediate_dir = MFC_Release debug_switch = lib_modifier = mfc use_mfc = 2 } MFC Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy defines = _DEBUG _WINDLL _AFXDLL compile_flags_removed = /Fr /YX output_dir = MFC_Debug intermediate_dir = MFC_Debug lib_modifier = mfcd pdbl = 1 pdbc = 1 use_mfc = 2 } conditional_include "vcpartialmacros" conditional_include "user_vc6dspdll" ace-6.4.5+dfsg.orig/MPC/templates/vs2017dll.mpt0000644000175000017500000000017013154167361017062 0ustar tggtgg// -*- MPC -*- conditional_include "vs2017platforms" conditional_include "vc1xdll" conditional_include "user_vs2017dll" ace-6.4.5+dfsg.orig/MPC/templates/make.net.mpd0000644000175000017500000001552113154167361017114 0ustar tggtgg#---------------------------------------------------------------------------- # Macros #---------------------------------------------------------------------------- <%marker(top)%> <%foreach(compilers)%> ICONOPT =<%foreach(ico_files)%><%if(forfirst)%> <%ico_flag%><%ico_file%><%endif%><%endfor%> RESXOPT =<%foreach(resx_files)%> <%resx_flag%><%resx_file%><%endfor%> TARGETDIR = <%if(exename && exeout)%><%exeout%><%slash%><%targetoutdir%><%else%><%if(sharedname && libout)%><%libout%><%slash%><%targetoutdir%><%else%>.<%slash%><%targetoutdir%><%endif%><%endif%> TARGET =<%if(exename)%> $(TARGETDIR)<%exename%><%exe_ext%><%else%><%if(sharedname)%> $(TARGETDIR)<%lib_prefix%><%libname_prefix%><%sharedname%><%dll_ext%><%endif%><%endif%> LDFLAGS =<%if(libpaths)%> <%lib_flag%><%foreach(libpaths)%><%libpath%><%fornotlast(",")%><%endfor%><%endif%><%if(libs || lit_libs || pure_libs)%> <%ref_flag%><%foreach(libs)%><%libname_prefix%><%lib%><%if(lit_libs || pure_libs)%>,<%else%><%fornotlast(",")%><%endif%><%endfor%><%foreach(lit_libs pure_libs)%><%lit_lib%><%fornotlast(",")%><%endfor%><%endif%><%if(packages)%> <%pkg_flag%><%foreach(packages)%><%package%><%fornotlast(",")%><%endfor%><%endif%> CFLAGS =<%if(compile_flags)%> <%compile_flags%><%endif%> <%if(optimize)%><%opt_flag%><%else%><%def_flag%>DESIGN,DEBUG<%endif%><%if(trace)%> <%def_flag%>TRACE<%endif%><%if(macros)%> <%def_flag%><%foreach(macros)%><%macro%><%fornotlast(",")%><%endfor%><%endif%><%if(keyfile)%> <%key_flag%><%keyfile%><%endif%><%if(compares(allowunsafeblocks, true))%> <%unsafe_flag%><%endif%> TESTDIRSTART = <%testdirstart("test -d")%> TESTDIREND = <%testdirend("||")%> CAT = <%type("cat")%> MV = <%move("mv -f")%> RM = <%delete("rm -rf")%> CP = <%copy("cp -p")%> NUL = <%devnull("/dev/null")%> MKDIR = <%makedir("mkdir -p")%> <%if(custom_types)%> GENERATED_DIRTY =<%foreach(custom_types)%><%foreach(custom_type->input_files)%><%if(custom_type->input_file->output_files)%><%foreach(custom_type->input_file->output_files)%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%endfor%><%endif%><%endfor%><%endfor%> <%endif%> <%if(exename)%> MONO_ETC = /etc/mono MONO_CONFIG = $(MONO_ETC)/config BIN = $(TARGETDIR)<%exename%> <%endif%> <%if(supports_include && make_include)%> include <%make_include%> <%endif%> <%marker(macros)%> #---------------------------------------------------------------------------- # Local targets #---------------------------------------------------------------------------- all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY) $(TARGET)<%if(postbuild)%> __postbuild__<%endif%> <%if(exename)%> $(TARGET): <%source_files%> @$(TESTDIRSTART) "$(TARGETDIR)" $(TESTDIREND) $(MKDIR) "$(TARGETDIR)" <%compiler%> <%if(winapp)%><%winexe_flag%><%else%><%exe_flag%><%endif%> <%out_flag%>$(TARGET) $(CFLAGS) $(LDFLAGS) $(ICONOPT) $(RESXOPT) <%source_files%> $(BIN): $(TARGET) <%mkbundle%> --static --deps -z --config $(MONO_CONFIG) $(TARGET) $(CONFIG_DIR_OPT) -o $(BIN) strip $(BIN) bundle: $(BIN) <%else%> <%if(sharedname)%> $(TARGET): <%source_files%> @$(TESTDIRSTART) "$(TARGETDIR)" $(TESTDIREND) $(MKDIR) "$(TARGETDIR)" <%compiler%> <%shared_flag%> <%out_flag%>$(TARGET) $(CFLAGS) $(LDFLAGS) $(ICONOPT) $(RESXOPT) <%source_files%> bundle: <%endif%> <%endif%> <%if(custom_types)%> <%foreach(custom_types)%> <%if(expanded_variable_assignment && custom_type->libpath)%> DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):<%custom_type->libpath%> LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):<%custom_type->libpath%> SHLIB_PATH := $(SHLIB_PATH):<%custom_type->libpath%> LIBPATH := $(LIBPATH):<%custom_type->libpath%> PATH := $(PATH):<%custom_type->libpath%> <%endif%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> <%if(multiple(custom_type->input_file->output_files))%> .NOTPARALLEL: <%endif%> <%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(" ")%><%endfor%>: <%custom_type->input_file%><%if(custom_type->input_file->dependencies)%> <%custom_type->input_file->dependencies%><%endif%><%if(flag_overrides(custom_type->input_file, dependent))%> <%flag_overrides(custom_type->input_file, dependent)%><%else%><%if(custom_type->dependent)%> <%custom_type->dependent%><%endif%><%endif%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%dirname(dep_lib)%>/<%lib_prefix%><%libname_prefix%><%basename(dep_lib)%><%dll_ext%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%dirname(custom_type->dependent_lib)%>/<%lib_prefix%><%libname_prefix%><%basename(custom_type->dependent_lib)%><%dll_ext%><%endfor%><%endif%><%endif%><%endif%> <%if(flag_overrides(custom_type->input_file, gendir))%> @$(TESTDIRSTART) "<%flag_overrides(custom_type->input_file, gendir)%>" $(TESTDIREND) $(MKDIR) "<%flag_overrides(custom_type->input_file, gendir)%>" <%endif%> <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%><%custom_type->input_file%> <%custom_type->output_option%> "$@"<%else%><%custom_type->input_file%><%endif%> <%if(flag_overrides(custom_type->input_file, postcommand))%> <%foreach(custom_type->input_file)%> <%flag_overrides(custom_type->input_file, postcommand)%> <%endfor%> <%else%> <%if(custom_type->postcommand)%> <%foreach(custom_type->input_file)%> <%custom_type->postcommand%> <%endfor%> <%endif%> <%endif%> <%endif%> <%endfor%> <%endfor%> .PRECIOUS: $(GENERATED_DIRTY) <%endif%> generated: $(GENERATED_DIRTY) @-: clean: -$(RM) $(TARGET)<%if(exename)%> $(BIN)<%endif%><%if(clean)%> <%clean%><%endif%> realclean: clean <%if(custom_types)%> -$(RM) $(GENERATED_DIRTY) <%endif%> <%if(postclean)%> -<%eval(postclean)%> <%endif%> <%if(prebuild)%> __prebuild__: @<%eval(prebuild)%> <%endif%> <%if(postbuild)%> __postbuild__: @<%eval(postbuild)%> <%endif%> <%marker(local)%> #---------------------------------------------------------------------------- # Dependencies #---------------------------------------------------------------------------- depend: @-: <%endfor%> <%marker(bottom)%> ace-6.4.5+dfsg.orig/MPC/templates/bds4exe.mpt0000644000175000017500000000021413154167361016761 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" common_defines = WIN32 conditional_include "user_bdsexe" ace-6.4.5+dfsg.orig/MPC/templates/bcb2007.mpd0000644000175000017500000002045313154167361016451 0ustar tggtgg {f76f525d-aee9-4af7-a366-e9119e55548d} CppDynamicLibrary Debug Build true true true Base true true Base dll JPHNE <%foreach(includes)%><%include%><%fornotlast(";")%><%endfor%> false true $(BDS)\lib\vcl100.csm true <%foreach(includes)%><%include%><%fornotlast(";")%><%endfor%> <%if(use_vcl)%>false<%else%>true<%endif%> false vcl.bpi;rtl.bpi;vclx.bpi;dbrtl.bpi;vcldb.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;vclib.bpi;ibxpress.bpi;xmlrtl.bpi;vclactnband.bpi;inet.bpi;IntrawebDB_80_100.bpi;Intraweb_80_100.bpi;vclie.bpi;inetdbbde.bpi;inetdbxpress.bpi;IndyCore.bpi;IndySystem.bpi;bcbofficexp.bpi;bcbsmp.bpi;soaprtl.bpi;dsnap.bpi;IndyProtocols.bpi;bcbie.bpi;bdertl.bpi;teeui.bpi;teedb.bpi;tee.bpi;vcldbx.bpi;dsnapcon.bpi;websnap.bpi;webdsnap.bpi <%foreach(includes)%><%include%>;<%endfor%>.\;$(BDS)\lib;$(BDS)\lib\obj DLL true true false $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;.. $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;.. <%foreach(includes)%><%include%>;<%endfor%>;.\;$(BDS)\lib;$(BDS)\lib\obj $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;.. <%foreach(libpaths)%><%libpath%>;<%endfor%>;$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk NO_STRICT <%foreach(defines)%><%define%><%fornotlast(";")%><%endfor%> <%foreach(defines)%><%define%><%fornotlast(";")%><%endfor%> true <%foreach(defines)%><%define%><%fornotlast(";")%><%endfor%> <%foreach(includes)%><%include%>;<%endfor%> false true true false true DEBUG;$(DCC_Define) true Debug_Build true true $(BDS)\lib\debug;$(ILINK_LibraryPath) _DEBUG;$(BCC_Defines) Full true true false Release_Build $(BDS)\lib\release;$(ILINK_LibraryPath) NDEBUG;$(BCC_Defines) None CPlusPlusBuilder.Personality CppDynamicLibrary False False 1 0 0 0 False False False False False 1043 1252 1.0.0.0 1.0.0.0 False False False True False False True True <%if(source_files)%> <%foreach(source_files)%> <%endfor%> <%endif%> <%if(header_files)%> <%foreach(header_files)%> <%endfor%> <%endif%> <%if(inline_files)%> <%foreach(inline_files)%> <%endfor%> <%endif%> <%if(template_files)%> <%foreach(template_files)%> <%endfor%> <%endif%> <%if(documentation_files)%> <%foreach(documentation_files)%> <%endfor%> <%endif%> <%if(resource_files)%> <%foreach(resource_files)%> <%endfor%> <%endif%> ace-6.4.5+dfsg.orig/MPC/templates/bmakecommon.mpt0000644000175000017500000000252213154167361017717 0ustar tggtgg// -*- MPC -*- // The *32 settings are for bcc32, *32c are for bcc32c (the clang based bcc32), and *64 are for bcc64 (also clang based) conditional_include "common" configurations = Debug Release common_defines = WIN32 _WINDOWS common32_defines = common32c_defines = common64_defines = WIN64 common_libs = ws2_32$(LIB_EXT) common32_libs = import32$(LIB_EXT) cw32mti$(LIB_EXT) common32c_libs = import32$(LIB_EXT) cw32mti$(LIB_EXT) common64_libs = import64$(LIB_EXT) cw64mti$(LIB_EXT) common32_flags = -a8 common32c_flags = -a8 -Xclang -fdelayed-template-parsing -Xclang -Wno-unused-value common64_flags = -fdelayed-template-parsing unicode_flags = -WU unicode_lib_modifier = u unicode_exe_modifier = u obj32_ext = .obj obj32c_ext = .obj obj64_ext = .o dll_ext = .dll lib32_ext = .lib lib32c_ext = .lib lib64_ext = .a exe_ext = .exe cc32 = bcc32 rc = brcc32 link32 = ilink32 cc32c = bcc32c cc64 = bcc64 link64 = ilink64 tlib32 = tlib tlib64 = tlib64 thrflags32 = -tWM thrflags32c = -tWM thrflags64 = -tM binaryflags32 = -tWR -tWD binaryflags32c = -tWR -tWD binaryflags64 = -tR -tD dllflags = -Tpd -Gi -x -Gn -w-dup libflags = /C ccflags = -q exeflags = -Tpe -x -Gn warnflags32 = -w-rvl -w-rch -w-ccc -w-obs -w-aus -w-pia -w-inl -w-mls warnflags32c = warnflags64 = ace-6.4.5+dfsg.orig/MPC/templates/windowscommon.mpt0000644000175000017500000000012213154167361020324 0ustar tggtgg// -*- MPC -*- lib_prefix = lib_ext = .lib dll_ext = .dll exe_ext = .exe ace-6.4.5+dfsg.orig/MPC/templates/wb26wrmakefile.mpd0000644000175000017500000004614313154167361020245 0ustar tggtgg<%foreach(platform)%><%comment(there can't be more than one active platform but using a foreach allows platform settings to be grouped in scopes in the mpt files)%># The file ".wrmakefile" is the template used by the Wind River Workbench to # generate the makefiles of this project. Add user-specific build targets and # make rules only(!) in this project's ".wrmakefile" file. These will then be # automatically dumped into the makefiles. WIND_HOME := $(subst \,/,$(WIND_HOME)) <%foreach(platform_makefilevars)%> <%platform_makefilevar%> := $(subst \,/,$(<%platform_makefilevar%>)) <%endfor%> ACE_ROOT := $(subst \,/,$(ACE_ROOT)) TAO_ROOT := $(subst \,/,$(TAO_ROOT)) CIAO_ROOT := $(subst \,/,$(CIAO_ROOT)) HOST_ROOT := $(subst \,/,$(HOST_ROOT)) <%if(sharedname || staticname)%> <%if(libout || dllout)%> ACE_LIBOUT := <%if(dllout)%><%dllout%><%else%><%libout%><%endif%> <%endif%> <%endif%> <%if(exename)%> ACE_EXEOUT := <%exeout(".")%> <%endif%> ACE_EXE_EXT = <%foreach(buildspecs)%>$(if $(filter <%buildspec%>,$(BUILD_SPEC)),<%exe_ext%>)<%endfor%> <%if(exename)%> ACE_TARGET_PREFIX := ACE_TARGET_NAME := <%exename%> ACE_TARGET_EXT = $(ACE_EXE_EXT) PROJECT_TARGET = $(if $(ACE_TARGET_EXT),$(filter %$(ACE_TARGET_EXT),$(PROJECT_TARGETS)),$(PROJECT_TARGETS)) <%else%> <%if(sharedname && !compares(platform, VxWorks))%> ACE_TARGET_DIR = $(ACE_TARGET_NAME)_$(BUILD_SPEC) ACE_TARGET_PREFIX = <%foreach(buildspecs)%>$(if $(filter <%buildspec%>,$(BUILD_SPEC)),<%dll_prefix%>)<%endfor%> ACE_TARGET_NAME := <%sharedname%> ACE_TARGET_EXT = <%foreach(buildspecs)%>$(if $(filter <%buildspec%>,$(BUILD_SPEC)),<%dll_ext%>)<%endfor%> PROJECT_TARGET = $(filter %$(ACE_TARGET_EXT),$(PROJECT_TARGETS)) <%else%> <%if(staticname || sharedname)%> ACE_TARGET_PREFIX = <%foreach(buildspecs)%>$(if $(filter <%buildspec%>,$(BUILD_SPEC)),<%lib_prefix%>)<%endfor%> ACE_TARGET_NAME := <%staticname%> ACE_TARGET_EXT = <%foreach(buildspecs)%>$(if $(filter <%buildspec%>,$(BUILD_SPEC)),<%lib_ext%>)<%endfor%> PROJECT_TARGET = $(filter %$(ACE_TARGET_EXT),$(PROJECT_TARGETS)) <%endif%> <%endif%> <%endif%> ACE_TARGET_DIR ?= $(ACE_TARGET_NAME) <%if(custom_only)%> PROJECT_TARGET = CUSTOM_ONLY <%endif%> <%if(libs && libpaths && exename && need_staticflags)%> DEPLIBS = $(foreach lib,<%foreach(libs)%> <%libname_prefix%><%lib%><%endfor%> <%lit_libs%>, $(foreach libpath,<%foreach(libpaths)%><%if(!standard_build)%> <%if(make_coexistence)%>../../<%else%>../<%endif%><%libpath%><%endif%> <%libpath%><%endfor%>, $(wildcard $(libpath)/lib$(lib).a))) <%endif%> <%if(standard_build)%> all : generate_sources pre_recursion subdirs_all post_recursion pre_build main_all post_build <%else%> all : generate_sources pre_build main_all post_build <%endif%> <%if(!standard_build)%> _clean :: @echo "make: removing targets and objects of `pwd`" <%endif%> %IDE_GENERATED% <%if(standard_build && exename)%> $(OBJ_DIR)/<%exename%>_partialImage.o : $(OBJECTS) $(SUB_OBJECTS) $(DEPLIBS) <%else%> <%if(!standard_build && libs && libpaths && exename && need_staticflags)%> $(ACE_TARGET_DIR)/$(MODE_DIR)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT): $(DEPLIBS) <%endif%> <%endif%> <%if(!standard_build)%> -include $(PRJ_ROOT_DIR)/*.makefile <%endif%> -include *.makefile <%if(custom_only)%> main_all : external_build @echo "make: built targets of `pwd`" <%else%> <%if(standard_build)%> main_all : check_objectdir external_build $(PROJECT_TARGETS) <%else%> main_all : external_build $(PROJECT_TARGETS) <%endif%> @echo "make: built targets of `pwd`" <%endif%> <%if(standard_build)%> check_objectdir : @if [ ! -d "$(OBJ_DIR)" ]; then\ mkdir -p $(OBJ_DIR);\ fi # main entry point for pre processing prior to the recursion pre_recursion :: @echo "" # main entry point for post processing after the recursion post_recursion :: @echo "" <%endif%> # entry point for extending the build external_build :: @echo "" # main entry point for pre processing prior to the build <%if(prebuild)%> pre_build :: @<%if(!standard_build)%><%if(make_coexistence)%>cd ../.. ; <%else%>cd .. ; <%endif%><%endif%><%eval(prebuild)%> <%endif%> <%if(standard_build)%> ACE_ALL_OBJECTS := $(SUB_OBJECTS) $(OBJECTS) ifneq ($(PROJECT_TARGET),) pre_build :: $(PRE_BUILD_STEP) @echo "Create object list $(PRJ_ROOT_DIR)/filelist.txt";\ rm -f $(PRJ_ROOT_DIR)/filelist.txt;\ for object in _dummy_ $(ACE_ALL_OBJECTS); do\ if [ "$$object" = "_dummy_" ]; then\ continue ;\ fi;\ echo "$$object" >> $(PRJ_ROOT_DIR)/filelist.txt;\ done else pre_build :: $(PRE_BUILD_STEP) @echo "" endif <%else%> pre_build :: $(PRE_BUILD_STEP) @echo "Create object list";\ rm -f $(PRJ_ROOT_DIR)/filelist.txt;\ <%if(exename)%> for object in _dummy_ $(OBJECTS_<%exename%>); do\ <%else%> for object in _dummy_ $(OBJECTS_<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>); do\ <%endif%> if [ "$$object" = "_dummy_" ]; then\ continue ;\ fi;\ echo "$$object" >> $(PRJ_ROOT_DIR)/filelist.txt ;\ done <%endif%> # function for generating the correct Custom type Prerequisite (input or dep) # using a ../ or ../../ prefix unless it's already an absolute path CUST_PRE = <%if(!standard_build)%>$(if $(patsubst $%,,$(1:/%=)),<%if(make_coexistence)%>../../<%else%>../<%endif%>)$(1)<%else%>$(1)<%endif%> # function for adding an exe_ext, if needed and the file exists ADD_EXT = $(if $(ACE_EXE_EXT),$(if $(suffix $(1)),$(1),$(wildcard $(1) $(1)$(ACE_EXE_EXT))),$(1)) <%if(custom_types)%> SPACE = $(should_be_unset) $(should_be_unset) GENERATED_DIRTY =<%if(!standard_build)%> $(addprefix <%if(make_coexistence)%>../../<%else%>../<%endif%>,<%endif%><%foreach(custom_types)%><%foreach(custom_type->input_files)%><%if(custom_type->input_file->output_files)%><%foreach(custom_type->input_file->output_files)%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%endfor%><%endif%><%endfor%><%endfor%><%if(!standard_build)%>)<%endif%> <%else%> GENERATED_DIRTY = <%endif%> # entry point for generating sources prior to the build <%if(standard_build)%> ifneq ($(PROJECT_TARGET),) <%endif%> generate_sources :: $(GENERATED_DIRTY) <%foreach(custom_types)%> <%if(custom_type->libpath)%> LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):<%custom_type->libpath%> PATH := $(PATH):<%custom_type->libpath%> <%endif%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> <%if(multiple(custom_type->input_file->output_files))%> .NOTPARALLEL: <%endif%> <%if(!standard_build)%>$(addprefix <%if(make_coexistence)%>../../<%else%>../<%endif%>,<%endif%><%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(" ")%><%endfor%><%if(!standard_build)%>)<%endif%>: $(foreach pre,<%custom_type->input_file%><%if(custom_type->input_file->dependencies)%><%foreach(custom_type->input_file->dependencies)%><%if(contains(custom_type->input_file->dependencie, \$))%> $(subst $(SPACE),\$(SPACE),<%custom_type->input_file->dependencie%>)<%else%> <%scope(enter, escape, \\s)%><%custom_type->input_file->dependencie%><%scope(leave)%><%endif%><%endfor%><%endif%><%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%if(contains(dep, \$))%> $(subst $(SPACE),\$(SPACE),<%dep%>)<%else%> <%scope(enter, escape, \\s)%><%dep%><%scope(leave)%><%endif%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%><%if(contains(custom_type->dependent, \$))%> $(subst $(SPACE),\$(SPACE),<%custom_type->dependent%>)<%else%> <%scope(enter, escape, \\s)%><%custom_type->dependent%><%scope(leave)%><%endif%><%endfor%><%endif%><%endif%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%if(contains(dep, \$))%> $(subst $(SPACE),\$(SPACE),<%dirname(dep_lib)%>/<%libname_prefix%><%basename(dep_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%>)<%else%> <%scope(enter, escape, \\s)%><%dirname(dep_lib)%>/<%libname_prefix%><%basename(dep_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%scope(leave)%><%endif%><%endfor%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%if(contains(custom_type->dependent_libs, \$))%> $(subst $(SPACE),\$(SPACE),<%dirname(custom_type->dependent_lib)%>/<%libname_prefix%><%basename(custom_type->dependent_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%>)<%else%> <%scope(enter, escape, \\s)%><%dirname(custom_type->dependent_lib)%>/<%libname_prefix%><%basename(custom_type->dependent_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%scope(leave)%><%endif%><%endfor%><%endif%><%endif%><%endif%>,$(call ADD_EXT,$(call CUST_PRE,$(pre)))) <%if(flag_overrides(custom_type->input_file, gendir))%> <%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%> @<%if(!standard_build)%><%if(make_coexistence)%>cd ../.. ; <%else%>cd .. ; <%endif%><%endif%>test -d "<%flag_overrides(custom_type->input_file, gendir)%>" || mkdir -p "<%flag_overrides(custom_type->input_file, gendir)%>" <%endif%> <%endif%> $(TRACE_FLAG)<%if(!standard_build)%><%if(make_coexistence)%>cd ../.. ; <%else%>cd .. ; <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%><%custom_type->input_file%> <%custom_type->output_option%><%foreach(custom_type->input_file->output_files)%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%endfor%><%else%><%custom_type->input_file%><%endif%> <%if(flag_overrides(custom_type->input_file, postcommand))%> <%foreach(custom_type->input_file)%> $(TRACE_FLAG)<%if(!standard_build)%><%if(make_coexistence)%>cd ../.. ; <%else%>cd .. ; <%endif%><%endif%><%flag_overrides(custom_type->input_file, postcommand)%> <%endfor%> <%else%> <%if(custom_type->postcommand)%> <%foreach(custom_type->input_file)%> $(TRACE_FLAG)<%if(!standard_build)%><%if(make_coexistence)%>cd ../.. ; <%else%>cd .. ; <%endif%><%endif%><%custom_type->postcommand%> <%endfor%> <%endif%> <%endif%> <%if(pch_header)%> <%if(custom_type->pch_postrule)%> <%foreach(custom_type->input_file->source_output_files)%> @<%if(!standard_build)%><%if(make_coexistence)%>cd ../.. ; <%else%>cd .. ; <%endif%><%endif%>echo '#include "<%pch_header%>"' > temp.$$$$ && cat <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temp.$$$$ && mv temp.$$$$ <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> <%endfor%> <%endif%> <%endif%> <%endif%> <%endfor%> <%endfor%> <%if(standard_build)%> else generate_sources :: @echo "" endif <%endif%> DIR_PREFIX = <%if(make_coexistence)%><%dirname(project_file)%>/<%endif%>$(BUILD_SPEC) # main entry point for post processing after the build <%if(postbuild)%> post_build :: @<%if(!standard_build)%><%if(make_coexistence)%>cd ../.. ; <%else%>cd .. ; <%endif%><%endif%><%eval(postbuild)%> <%endif%> post_build :: $(POST_BUILD_STEP) deploy_output @echo "" # entry point for deploying output after the build <%if(standard_build)%> ifneq ($(PROJECT_TARGET),) <%endif%> <%if(!standard_build)%> deploy_output :: <%if(exename)%>$(call CUST_PRE,$(ACE_EXEOUT)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT))<%else%><%if(sharedname || staticname)%><%if(libout || dllout)%>$(call CUST_PRE,$(ACE_LIBOUT)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT))<%endif%><%endif%><%endif%> <%if(exename)%> $(call CUST_PRE,$(ACE_EXEOUT)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT)): $(ACE_TARGET_DIR)/$(MODE_DIR)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT) $(TRACE_FLAG)<%if(make_coexistence)%>cd ../.. ; <%else%>cd .. ; <%endif%>test -d $(ACE_EXEOUT) || mkdir -p $(ACE_EXEOUT); cp $(DIR_PREFIX)/$(ACE_TARGET_DIR)/$(MODE_DIR)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT) $(ACE_EXEOUT) <%else%> <%if(sharedname || staticname)%> <%if(libout || dllout)%> $(call CUST_PRE,$(ACE_LIBOUT)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT)): $(ACE_TARGET_DIR)/$(MODE_DIR)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT) $(TRACE_FLAG)<%if(make_coexistence)%>cd ../.. ; <%else%>cd .. ; <%endif%>test -d $(ACE_LIBOUT) || mkdir -p $(ACE_LIBOUT); cp $(DIR_PREFIX)/$(ACE_TARGET_DIR)/$(MODE_DIR)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT) $(ACE_LIBOUT) <%endif%> <%endif%> <%endif%> <%else%> deploy_output :: <%if(exename)%> <%if(exeout)%> if [ $(ACE_EXEOUT) != . ]; then\ if [ ! -d $(ACE_EXEOUT) ]; then\ mkdir -p $(ACE_EXEOUT);\ fi;\ if test -e $(ACE_EXEOUT)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT); then \ if test $(OBJ_DIR)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT) -nt $(ACE_EXEOUT)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT); then \ cp $(OBJ_DIR)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT) $(ACE_EXEOUT);\ fi \ else \ cp $(OBJ_DIR)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT) $(ACE_EXEOUT);\ fi\ fi <%endif%> <%else%> <%if(sharedname || staticname)%> <%if(libout || dllout)%> if [ $(ACE_LIBOUT) != . ]; then\ if [ ! -d $(ACE_LIBOUT) ]; then\ mkdir -p $(ACE_LIBOUT);\ fi;\ if test -e $(ACE_LIBOUT)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT); then \ if test $(OBJ_DIR)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT) -nt $(ACE_LIBOUT)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT); then \ cp $(OBJ_DIR)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT) $(ACE_LIBOUT);\ fi \ else \ cp $(OBJ_DIR)/$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT) $(ACE_LIBOUT);\ fi\ fi <%endif%> <%endif%> <%endif%> <%endif%> @echo "" <%if(standard_build)%> else deploy_output :: @echo "" endif <%endif%> <%if(standard_build)%> # order subdirs to use subprojects first isSubProject = $(if $(subst $(subst $(CURDIR)/,,$(dir)),,$(dir)),, $(dir)) SUB_PROJECTS := $(foreach dir, $(SUBDIRS), $(isSubProject)) isSubFolder = $(if $(subst $(subst $(CURDIR)/,,$(dir)),,$(dir)), $(dir)) SUB_FOLDERS := $(foreach dir, $(SUBDIRS), $(isSubFolder)) SUBDIRS_ORDERED := $(SUB_PROJECTS) $(SUB_FOLDERS) # recursive make in SUBDIRS subdirs_all : @_PWD=`pwd`;\ for dir in _dummy_ $(SUBDIRS_ORDERED); do\ if [ "$$dir" = "_dummy_" ]; then\ continue ;\ fi;\ if [ ! -d "$$dir" ]; then\ continue ;\ fi;\ echo "Recursive make: Changing to Directory '$$dir'";\ cd "$$dir";\ "$(MAKE)" -f "$(MAKEFILE)" $(MFLAGS) all || exit;\ echo "Recursive make: Changing back to Directory '$$_PWD'";\ cd "$$_PWD";\ done clean :: @_PWD=`pwd`;\ for dir in _dummy_ $(SUBDIRS_ORDERED); do\ if [ "$$dir" = "_dummy_" ]; then\ continue ;\ fi;\ if [ ! -d "$$dir" ]; then\ continue ;\ fi;\ echo "Recursive make: Changing to Directory '$$dir'";\ cd "$$dir";\ "$(MAKE)" -f "$(MAKEFILE)" $(MFLAGS) $@ || exit;\ echo "Recursive make: Changing back to Directory '$$_PWD'";\ cd "$$_PWD";\ done <%endif%> clean :: external_clean $(CLEAN_STEP) _clean # entry point for extending the build clean <%if(standard_build)%> ifneq ($(PROJECT_TARGET),) <%endif%> external_clean :: <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> $(TRACE_FLAG)<%if(!standard_build)%><%if(make_coexistence)%>cd ../.. ; <%else%>cd .. ; <%endif%><%endif%>rm -f <%foreach(custom_type->input_file->output_files)%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%endfor%> <%endif%> <%endfor%> <%endfor%> <%if(exename)%> <%if(exeout || !standard_build)%> $(TRACE_FLAG)<%if(!standard_build)%><%if(make_coexistence)%>cd ../.. ; <%else%>cd .. ; <%endif%><%endif%>rm -f <%exeout(".")%>/$(ACE_TARGET_NAME)$(ACE_TARGET_EXT) <%endif%> <%else%> <%if(sharedname || staticname)%> $(TRACE_FLAG)<%if(!standard_build)%><%if(make_coexistence)%>cd ../.. ; <%else%>cd .. ; <%endif%><%endif%>rm -f <%if(dllout)%><%dllout%>/<%else%><%libout%>/<%endif%>$(ACE_TARGET_PREFIX)$(ACE_TARGET_NAME)$(ACE_TARGET_EXT) <%endif%> <%endif%> <%if(postclean)%> $(TRACE_FLAG)<%if(!standard_build)%><%if(make_coexistence)%>cd ../.. ; <%else%>cd .. ; <%endif%><%endif%><%eval(postclean)%> <%endif%> @echo "" <%if(standard_build)%> else external_clean :: @echo "" endif <%endif%> <%if(standard_build)%> _clean : if [ -d $(OBJ_DIR) ]; then\ echo "make: removing targets and objects of `pwd`";\ rm -f $(OBJECTS) $(PROJECT_TARGETS) $(DEP_FILES) $(wildcard $(OBJ_DIR)/*.unstripped) $(wildcard $(OBJ_DIR)/ctdt.*) \ rm -rf $(OBJ_DIR);\ rm -f $(PRJ_ROOT_DIR)/filelist.txt;\ else\ echo "make: removing targets and objects of `pwd`, already done";\ fi build_all_specs : @echo "building target default for ALL build-specs";\ for spec in _dummy_ $(ALL_BUILD_SPECS); do\ if [ "$$spec" = "_dummy_" ]; then\ continue ;\ fi;\ echo " ";\ echo "building all for build-spec '$$spec'";\ "$(MAKE)" -f "$(MAKEFILE)" $(MFLAGS) BUILD_SPEC=$$spec DEBUG_MODE=$(DEBUG_MODE) TRACE=$(TRACE) || exit;\ done clean_all_specs : @echo "building target clean for ALL build-specs";\ for spec in _dummy_ $(ALL_BUILD_SPECS); do\ if [ "$$spec" = "_dummy_" ]; then\ continue ;\ fi;\ echo " ";\ echo "building clean for build-spec '$$spec'";\ "$(MAKE)" -f "$(MAKEFILE)" $(MFLAGS) BUILD_SPEC=$$spec DEBUG_MODE=$(DEBUG_MODE) TRACE=$(TRACE) clean || exit;\ done build_enabled_specs : @echo "building target default for ENABLED build-specs";\ for spec in _dummy_ $(ENABLED_BUILD_SPECS); do\ if [ "$$spec" = "_dummy_" ]; then\ continue ;\ fi;\ echo " ";\ echo "building all for build-spec '$$spec'";\ "$(MAKE)" -f "$(MAKEFILE)" $(MFLAGS) BUILD_SPEC=$$spec DEBUG_MODE=$(DEBUG_MODE) TRACE=$(TRACE) || exit;\ done clean_enabled_specs : @echo "building target clean for ENABLED build-specs";\ for spec in _dummy_ $(ENABLED_BUILD_SPECS); do\ if [ "$$spec" = "_dummy_" ]; then\ continue ;\ fi;\ echo " ";\ echo "building clean for build-spec '$$spec'";\ "$(MAKE)" -f "$(MAKEFILE)" $(MFLAGS) BUILD_SPEC=$$spec DEBUG_MODE=$(DEBUG_MODE) TRACE=$(TRACE) clean || exit;\ done <%endif%> <%if(standard_build)%> <%if(sharedname || staticname)%> ifneq ($(PROJECT_TARGET),) $(OBJ_DIR)/<%lib_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%lib_ext%> : $(OBJECTS) $(SUB_OBJECTS) endif <%endif%> <%endif%> <%endfor%> ace-6.4.5+dfsg.orig/MPC/templates/vs2017libexe.mpt0000644000175000017500000000017613154167361017565 0ustar tggtgg// -*- MPC -*- conditional_include "vs2017platforms" conditional_include "vc1xlibexe" conditional_include "user_vs2017libexe" ace-6.4.5+dfsg.orig/MPC/templates/automakeexe.mpt0000644000175000017500000000013013154167361017730 0ustar tggtgg// -*- MPC -*- conditional_include "automakedll" conditional_include "user_automakeexe" ace-6.4.5+dfsg.orig/MPC/templates/vc1xlib.mpt0000644000175000017500000000351313154167361017000 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release common_defines = WIN32 _WINDOWS _CRT_NONSTDC_NO_WARNINGS ConfigurationType = 4 MinimalRebuild = false GenerateDebugInformation = true Release { optimize = MaxSpeed defines = NDEBUG output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = s EnableIntrinsicFunctions = true WholeProgramOptimization = true } Debug { debug_prj = 1 defines = _DEBUG output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = sd } Memcheck Release { optimize = MaxSpeed defines = NDEBUG output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = s BasicRuntimeChecks = 0 FixedBaseAddress = 1 EnableIntrinsicFunctions = true WholeProgramOptimization = true } Memcheck Debug { debug_prj = 1 defines = _DEBUG output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = sd BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 } MFC Release { optimize = MaxSpeed defines = NDEBUG output_dir = Static_MFC_Release intermediate_dir = Static_MFC_Release lib_modifier = mfcs UseOfMFC = Dynamic EnableIntrinsicFunctions = true WholeProgramOptimization = true } MFC Debug { debug_prj = 1 defines = _DEBUG output_dir = Static_MFC_Debug intermediate_dir = Static_MFC_Debug lib_modifier = mfcsd UseOfMFC = Dynamic } conditional_include "vcpartialmacros" ace-6.4.5+dfsg.orig/MPC/templates/vc7dll.mpt0000644000175000017500000000405713154167361016627 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release common_defines = WIN32 _WINDOWS output_subdir = I386 Release { LinkIncremental = 1 optimize = 3 defines = NDEBUG output_dir = Release intermediate_dir = Release } Debug { optimize = debug_prj = 1 defines = _DEBUG output_dir = . intermediate_dir = Debug lib_modifier = d pdbl = 1 pdbc = 1 } Memcheck Release { optimize = 3 defines = NDEBUG output_dir = Release intermediate_dir = Release BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 pdbl = 1 } Memcheck Debug { optimize = debug_prj = 1 defines = _DEBUG output_dir = . intermediate_dir = Debug lib_modifier = d pdbc = 1 BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 pdbl = 1 } MFC Release { LinkIncremental = 1 optimize = 3 defines = NDEBUG output_dir = MFC_Release intermediate_dir = MFC_Release lib_modifier = mfc use_mfc = 2 } MFC Debug { optimize = debug_prj = 1 defines = _DEBUG output_dir = MFC_Debug intermediate_dir = MFC_Debug lib_modifier = mfcd pdbl = 1 pdbc = 1 use_mfc = 2 } ETS Release { optimize = 3 defines = NDEBUG output_dir = ETS_Release intermediate_dir = ETS_Release runtime_library = 2 GenerateMapFile = TRUE lit_libs += etsapi wsock32 } ETS Debug { optimize = defines = _DEBUG output_dir = ETS_Debug intermediate_dir = ETS_Debug lib_modifier = d runtime_library = 3 pdbl = 1 pdbc = 1 GenerateMapFile = TRUE lit_libs += etsapi wsock32 } conditional_include "vcpartialmacros" conditional_include "user_vc7dll" ace-6.4.5+dfsg.orig/MPC/templates/html.mpd0000644000175000017500000001320013154167361016346 0ustar tggtgg <%project_name%>

    <%project_name%>

    <%foreach(inheritance_nodes)%> <%forfirst("

    MPC Inheritance Hierarchy

    ")%> <%inheritance_node%> <%forlast("
    ")%> <%endfor%> <%foreach(custom_types)%> <%endfor%> <%if(configurations || pch_defines)%> <%comment("common to all mpt files")%> <%if(pch_defines)%> <%endif%> <%foreach(configurations)%> <%comment("borland, nmake, va4, em3, vc6, vc7 and vc71 mpt files")%> <%if(defines || common_defines)%> <%endif%> <%if(compile_flags)%> <%endif%> <%comment("make mpt files")%> <%if(cxx)%> <%endif%> <%if(compilerflags)%> <%endif%> <%if(linkflags)%> <%endif%> <%foreach(platforms)%> <%if(shflags)%> <%endif%> <%if(ldlibs)%> <%endif%> <%if(extracppflags)%> <%endif%> <%if(dll_ext)%> <%endif%> <%comment("em3 mpt files")%> <%if(cpu_id)%> <%endif%> <%if(platform_id)%> <%endif%> <%if(cpu_defines)%> <%endif%> <%endfor%> <%endfor%> <%endif%>
    MPC Project Settings
    NameValue
    after<%after%>
    avoids<%avoids%>
    custom_only<%custom_only%>
    dllout<%dllout%>
    dynamicflags<%dynamicflags%>
    exename<%exename%>
    includes<%includes%>
    exeout<%exeout%>
    libout<%libout%>
    libpaths<%libpaths%>
    libs<%foreach(libs)%><%libname_prefix%><%lib%><%fornotlast(" ")%><%endfor%>
    lit_libs<%lit_libs%>
    macros<%macros%>
    pch_header<%pch_header%>
    pch_source<%pch_source%>
    prebuild<%prebuild%>
    postbuild<%postbuild%>
    postclean<%postclean%>
    pure_libs<%pure_libs%>
    recurse<%recurse%>
    requires<%requires%>
    sharedname<%libname_prefix%><%sharedname%>
    staticflags<%staticflags%>
    staticname<%libname_prefix%><%staticname%>
    tagname *<%tagname%>
    tagchecks *<%tagchecks%>
    version<%version%>
    MPC Project Files
    NameValue
    Source Files<%source_files%>
    Header Files<%header_files%>
    Inline Files<%inline_files%>
    Template Files<%template_files%>
    Resource Files<%resource_files%>
    Documentation Files<%documentation_files%>
    <%ucw(custom_type)%><%custom_type->input_files%>
    MPC Template Settings
    NameValue
    pch_defines<%pch_defines%>
    Configuration: <%configuration%>
    defines<%defines%> <%common_defines%>
    compile_flags<%compile_flags%>
    cxx<%cxx%>
    compilerflags<%compilerflags%>
    linkflags<%linkflags%>
    Platform: <%platform%>
    shflags<%shflags%>
    ldlibs<%ldlibs%>
    extracppflags<%extracppflags%>
    dll_ext<%dll_ext%>
    cpu_id<%cpu_id%>
    platform_id<%platform_id%>
    cpu_defines<%cpu_defines%>

    * This keyword is specific to the gnuace project type.

    ace-6.4.5+dfsg.orig/MPC/templates/cdt6dll.mpt0000644000175000017500000000034313154167361016762 0ustar tggtgg// -*- MPC -*- conditional_include "cdt6platforms" configurations = debug release project_type_name = "Shared Library" project_type = so build_artefact_type = org.eclipse.cdt.build.core.buildArtefactType.sharedLib pic = -fPIC ace-6.4.5+dfsg.orig/MPC/templates/make.net.mpt0000644000175000017500000000150113154167361017125 0ustar tggtgg// -*- MPC -*- conditional_include "windowscommon" mcs { main_flag = -main: out_flag = -out: lib_flag = -lib: def_flag = -define: exe_flag = -target:exe winexe_flag = -target:winexe opt_flag = -optimize key_flag = -keyfile: unsafe_flag = -unsafe shared_flag = -target:library ref_flag = -r: pkg_flag = -pkg: mkbundle = mkbundle resx_flag = -resource: ico_flag = -win32icon: } gmcs { main_flag = -main: out_flag = -out: lib_flag = -lib: def_flag = -define: exe_flag = -target:exe winexe_flag = -target:winexe opt_flag = -optimize key_flag = -keyfile: unsafe_flag = -unsafe shared_flag = -target:library ref_flag = -r: pkg_flag = -pkg: mkbundle = mkbundle2 resx_flag = -resource: ico_flag = -win32icon: } ace-6.4.5+dfsg.orig/MPC/templates/vc12platforms.mpt0000644000175000017500000000071613154167361020135 0ustar tggtgg// -*- MPC -*- // // Any of these platforms can set using value_template platforms= // when generating solutions/projects. // //platforms = Win32 x64 platforms = Win32 x64 default_platform = Win32 PlatformToolset = v120 Win32 { output_subdir = I386 } x64 { output_subdir = AMD64 cpu_defines = _AMD64_ platform_defines = _WIN64 TargetMachine = "0" // We let VC++ figure it out for us. link_options = /machine:AMD64 } ace-6.4.5+dfsg.orig/MPC/templates/ghscommon.mpt0000644000175000017500000000020513154167361017415 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "unixcommon" optimize = 1 exceptions = 1 lib_modifier = ace-6.4.5+dfsg.orig/MPC/templates/ghsdllexe.mpt0000644000175000017500000000012513154167361017403 0ustar tggtgg// -*- MPC -*- conditional_include "ghscommon" conditional_include "user_ghsdllexe" ace-6.4.5+dfsg.orig/MPC/templates/wb30exe.mpt0000644000175000017500000000010113154167361016673 0ustar tggtggconditional_include "wb30dll" conditional_include "user_wb30exe" ace-6.4.5+dfsg.orig/MPC/templates/wix.mpd0000644000175000017500000003150313154167361016217 0ustar tggtgg <%marker(top)%> <%if(wix_extended)%> <%foreach(platforms)%> <%foreach(configurations)%> <%if(!exclude)%> <%comment("Only put one component in a fragment. If, say, both the debug and release components are in the")%> <%comment("same fragment, and just the debug component is used in an installer, the release component will")%> <%comment("be identified as unused, and an error generated. That is, it seems that referencing any component")%> <%comment("in a fragment causes the entire fragment to be pulled in, and any unused component in the fragment will be flagged as an error")%> <%if(!no_binary)%> <%endif%> <%if(gme_install || gme_decorator)%> <%endif%> <%if(gme_paradigm)%> <%endif%> <%if(install_resources)%> <%foreach(resource_files)%> <%endfor%> <%endif%> <%foreach(components)%> <%endfor%> <%marker(component_top)%> <%if(!no_binary)%> <%foreach(name, install_location)%> <%endfor%> /<%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%>/<%else%><%output_dir(".")%>/<%endif%><%endif%><%endif%><%endif%><%if(type_is_dynamic)%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%else%><%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%><%endif%>" DiskId="<%diskid(1)%>" <%if(com_register)%> SelfRegCost="1" <%endif%> /> <%foreach(name, install_location)%> <%endfor%> <%endif%> <%if(gme_install || gme_decorator)%> <%if(gme_install)%> <%if(gme_has_icon)%> <%endif%> <%endfor%>" Action="write" /> <%foreach(gme_paradigms)%> <%endfor%> <%endif%> <%endif%> <%if(gme_paradigm)%> <%foreach(name, install_location)%> <%endfor%> <%foreach(name, install_location)%> <%endfor%> <%endif%> <%marker(component_bottom)%> <%endif%> <%endfor%> <%endfor%> <%else%> <%if(!custom_only)%> <%if(!no_binary)%> <%endif%> <%if(gme_install || gme_decorator)%> <%endif%> <%if(gme_paradigm)%> <%endif%> <%if(install_resources)%> <%foreach(resource_files)%> <%endfor%> <%endif%> <%foreach(components)%> <%endfor%> <%endif%> <%if(!custom_only)%> <%marker(component_top)%> <%if(!no_binary)%> <%foreach(name, install_location)%> <%endfor%> <%foreach(name, install_location)%> <%endfor%> <%endif%> <%if(install_resources)%> <%foreach(resource_files)%> <%foreach(name, install_location)%> <%endfor%> <%foreach(name, install_location)%> <%endfor%> <%endfor%> <%endif%> <%if(gme_install || gme_decorator)%> <%if(gme_install)%> <%if(gme_has_icon)%> <%endif%> <%endfor%>" Action="write" /> <%foreach(gme_paradigms)%> <%endfor%> <%endif%> <%endif%> <%if(gme_paradigm)%> <%foreach(name, install_location)%> <%endfor%> <%foreach(name, install_location)%> <%endfor%> <%endif%> <%marker(component_bottom)%> <%endif%> <%endif%> <%marker(bottom)%> ace-6.4.5+dfsg.orig/MPC/templates/unixcommon.mpt0000644000175000017500000000011613154167361017620 0ustar tggtgg// -*- MPC -*- lib_prefix = lib lib_ext = .a dll_ext = .so exe_ext = ace-6.4.5+dfsg.orig/MPC/templates/bcb2007exe.mpt0000644000175000017500000000021413154167361017164 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" common_defines = WIN32 conditional_include "user_bdsexe" ace-6.4.5+dfsg.orig/MPC/templates/cc.mpd0000644000175000017500000000576513154167361016010 0ustar tggtgg; Code Composer Project File, Version <%ccversion("2.0")%> (do not modify or remove this line) [Project Settings] ProjectDir="<%cwd%>" ProjectType=<%if(exename)%>Executable<%else%>Library<%endif%> CPUFamily=<%cpufamily("TMS320C64XX")%> <%if(exename)%> Tool="Linker" <%else%> Tool="Archiver" <%endif%> Tool="Compiler" Tool="CustomBuilder" Tool="DspBiosBuilder" <%foreach(configurations)%> Config="<%configuration%>" <%endfor%> <%if(after)%> ; MPC ADD DEPENDENCIES <%endif%> [Source Files] <%foreach(source_files)%> Source="<%source_file%>" <%endfor%> <%if(prebuild || postbuild)%> <%foreach(configurations)%> ["<%configuration%>" Settings] <%if(prebuild)%> InitialBuildCmd=<%eval(prebuild)%>;Run=Always <%endif%> <%if(postbuild)%> FinalBuildCmd=<%eval(postbuild)%>;Run=Always <%endif%> <%endfor%> <%endif%> <%if(custom_types)%> [Generated Files] <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> <%foreach(custom_type->input_file->output_files)%> Source="<%custom_type->input_file->output_file%>" <%endfor%> <%endfor%> <%endfor%> <%endif%> <%foreach(configurations)%> ["Compiler" Settings: "<%configuration%>"] Options=<%if(optimize)%>-o3<%else%>-g<%endif%> <%if(rtti)%>-rtti <%endif%><%if(compile_flags)%><%compile_flags%> <%endif%>-fr"$(Proj_dir)\<%intermediate_dir%>" <%foreach(includes)%>-i"<%include%>" <%endfor%><%foreach(macros defines)%>-d"<%macro%>" <%endfor%><%if(need_staticflags)%><%foreach(staticflags)%>-d"<%staticflag%>" <%endfor%><%endif%><%if(big_endian)%>-me <%endif%><%target_version("-mv6400")%> <%endfor%> <%foreach(configurations)%> <%if(exename)%> ["Linker" Settings: "<%configuration%>"] Options=-c -m"<%if(exeout)%><%exeout%>\<%endif%><%if(windows_style)%><%output_dir%>\<%endif%><%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>.map" -o"<%if(exeout)%><%exeout%>\<%endif%><%if(windows_style)%><%output_dir%>\<%endif%><%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%>" -w -x<%foreach(libpaths)%> -i"<%libpath%>"<%endfor%><%foreach(libs)%> -l"<%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>"<%endfor%><%foreach(lit_libs)%> -l"<%lit_lib%><%lib_ext%>"<%endfor%> <%else%> ["Archiver" Settings: "<%configuration%>"] Options=-r -o<%libout%>\<%lib_prefix%><%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%> <%endif%> <%endfor%> <%foreach(source_files)%> <%if(flag_overrides(source_file, buildflags))%> <%foreach(configurations)%> ["<%source_file%>" Settings: "<%configuration%>"] Options="Compiler" +{<%flag_overrides(source_file, buildflags)%>} <%endfor%> <%endif%> <%endfor%> <%foreach(custom_types)%> <%foreach(custom_types->input_files)%> <%if(ends_with(custom_types->input_file, \.cmd))%> <%foreach(configurations)%> ["<%custom_types->input_file%>" Settings: "<%configuration%>"] LinkOrder=1 <%endfor%> <%endif%> <%endfor%> <%endfor%> <%foreach(source_files)%> <%if(ends_with(source_file, \.cmd))%> <%foreach(configurations)%> ["<%source_file%>" Settings: "<%configuration%>"] LinkOrder=1 <%endfor%> <%endif%> <%endfor%> ace-6.4.5+dfsg.orig/MPC/templates/nmakedll.mpt0000644000175000017500000001106213154167361017215 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release "Static Debug" "Static Release" platforms = Win32 default_configuration = Debug common_defines = WIN32 _WINDOWS TreatWChar_tAsBuiltInType = true systemlibs = advapi32.lib user32.lib Win32 { machine_description = x86 machine = I386 } Win64 { machine_description = IA64 machine = IA64 cpu_defines = WIN64 add_compile = /Wp64 } x64 { machine_description = x64 machine = AMD64 cpu_defines = _AMD64_ add_compile = /Wp64 platform_defines = _WIN64 } Release { type_code = 0x0102 use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /EHsc /MD /GR defines = NDEBUG compile_flags_removed = /YX output_dir = Release intermediate_dir = Release debug_switch = type_is_static = type_is_dynamic = 1 type_is_binary = 1 need_staticflags = } Debug { type_code = 0x0102 use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /EHsc /Zi /MDd /GR /Gy defines = _DEBUG compile_flags_removed = /Fr /YX output_dir = . intermediate_dir = Debug lib_modifier = d type_is_static = type_is_dynamic = 1 type_is_binary = 1 need_staticflags = pdbl = 1 pdbc = 1 } Static Release { type_description = "Static Library" type_code = 0x0104 use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /EHsc /MD /GR defines = NDEBUG compile_flags_removed = /YX output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = s debug_switch = type_is_static = 1 type_is_binary = type_is_dynamic = need_staticflags = 1 } Static Debug { type_description = "Static Library" type_code = 0x0104 use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /EHsc /Zi /GR /Gy /MDd defines = _DEBUG compile_flags_removed = /Fr /YX output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = sd type_is_static = 1 type_is_binary = type_is_dynamic = need_staticflags = 1 pdbc = 1 } MFC Release { type_code = 0x0102 use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /EHsc /MD /GR defines = NDEBUG compile_flags_removed = /YX output_dir = MFC_Release intermediate_dir = MFC_Release lib_modifier = mfc debug_switch = type_is_static = type_is_dynamic = 1 type_is_binary = 1 need_staticflags = } MFC Debug { type_code = 0x0102 use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /EHsc /Zi /MDd /GR /Gy defines = _DEBUG compile_flags_removed = /Fr /YX output_dir = MFC_Debug intermediate_dir = MFC_Debug lib_modifier = mfcd type_is_static = type_is_dynamic = 1 type_is_binary = 1 need_staticflags = pdbl = 1 pdbc = 1 } Static MFC Release { type_description = "Static Library" type_code = 0x0104 use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /EHsc /MD /GR defines = NDEBUG compile_flags_removed = /YX output_dir = Static_MFC_Release intermediate_dir = Static_MFC_Release lib_modifier = mfcs debug_switch = type_is_static = 1 type_is_binary = type_is_dynamic = need_staticflags = 1 } Static MFC Debug { type_description = "Static Library" type_code = 0x0104 use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /EHsc /Zi /GR /Gy /MDd defines = _DEBUG compile_flags_removed = /Fr /YX output_dir = Static_MFC_Debug intermediate_dir = Static_MFC_Debug lib_modifier = mfcsd type_is_static = 1 type_is_binary = type_is_dynamic = need_staticflags = 1 pdbc = 1 } conditional_include "vcfullmacros" conditional_include "user_nmakedll" ace-6.4.5+dfsg.orig/MPC/templates/vc8csharp.mpd0000644000175000017500000002612613154167361017316 0ustar tggtgg<%if(xmlheader)%> <%endif%> ToolsVersion="<%toolsversion%>"<%endif%> DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> Local <%prversion("8.0.50727")%> <%schemaversion("2.0")%> {<%guid%>} <%if(UICulture)%> <%UICulture%> <%endif%> <%foreach(configurations)%> <%if(forfirst)%> <%configuration%> <%endif%> <%endfor%> <%foreach(platforms)%> <%if(forfirst)%> <%platform%> <%endif%> <%endfor%> <%if(ico_files)%> <%foreach(ico_files)%> <%if(forfirst)%> <%ico_file%> <%endif%> <%endfor%> <%endif%> <%if(exename || sharedname || staticname)%> <%if(exename)%><%exename%><%else%><%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%endif%> <%endif%> <%keyfile%> <%if(keyfile)%> true <%endif%> JScript Grid IE50 <%DelaySign("false")%> <%if(exename || sharedname || staticname)%> <%if(exename)%><%if(winapp)%>Win<%endif%>Exe<%else%>Library<%endif%> <%endif%> <%project_name%> OnBuildSuccess <%startupobject%> <%foreach(libpaths)%><%libpath%><%fornotlast(";")%><%endfor%> <%if(TargetFrameworkVersion)%> v<%TargetFrameworkVersion%> <%endif%> <%if(TargetFrameworkProfile)%> <%TargetFrameworkProfile%> <%endif%> <%foreach(platforms)%> <%foreach(configurations)%> <%if(exename || sharedname || staticname)%> <%if(exename)%><%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir%><%endif%><%else%>.\<%output_dir%><%endif%><%else%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%output_dir%><%endif%>\ <%endif%> <%allowunsafeblocks(false)%> 285212672 false <%foreach(defines common_defines macros)%><%define%>;<%endfor%><%if(!optimize)%>DESIGN;DEBUG;<%endif%><%if(trace)%>TRACE<%endif%> <%if(optimize)%>false<%else%>true<%endif%> 4096 false <%if(DisableSpecificWarnings)%> <%foreach(DisableSpecificWarnings)%><%DisableSpecificWarning%><%fornotlast(";")%><%endfor%> <%endif%> <%if(optimize)%>true<%else%>false<%endif%> <%RegisterForComInterop("false")%> false false <%warning_level("4")%> <%if(optimize)%>none<%else%>full<%endif%> prompt <%if(PlatformTarget)%> <%PlatformTarget%> <%endif%> <%if(Prefer32Bit)%> <%Prefer32Bit%> <%endif%> <%endfor%> <%endfor%> <%if(!compares(vcversion, 8.00))%> <%foreach(source_files)%> <%if(ends_with(source_file, \.manifest))%> <%source_file%> <%endif%> <%endfor%> <%endif%> <%if(after)%> <%endif%> <%if(TargetFrameworkVersion)%> <%TargetFrameworkVersion%> <%endif%> <%foreach(libs)%> <%libname_prefix%><%lib%> <%endfor%> <%foreach(lib, sort(lit_libs pure_libs))%> <%lib%> <%endfor%> <%foreach(comreferences)%> {<%uc(comreference->guid)%>} <%comreference->majorver("1")%> <%comreference->minorver("0")%> <%comreference->lcid("0")%> <%comreference->wrapper("tlbimp")%> <%comreference->isolated("False")%> <%comreference->copylocal("False")%> <%if(comreference->embed)%> <%comreference->embed%> <%endif%> <%endfor%> <%foreach(appdef_files)%> MSBuild:Compile Designer <%endfor%> <%foreach(source_files)%> <%if(contains(flag_overrides(source_file, subtype), ^(Form|Component|UserControl)$))%> <%flag_overrides(source_file, subtype)%> <%if(flag_overrides(source_file, dependent_upon))%> <%flag_overrides(source_file, dependent_upon)%> <%endif%> <%if(remove_from(source_files, \.Designer\.cs, source_file, \.cs))%> <%basename(source_file)%> <%endif%> <%if(remove_from(resx_files, resx, source_file, cs))%> Designer <%basename(source_file)%> <%endif%> <%foreach(removed, 1, remove_from(resx_files, .*\.resx, source_file, cs))%> Designer <%basename(source_file)%> <%endfor%> <%endif%> <%endfor%> <%foreach(source_files)%> <%if(!contains(flag_overrides(source_file, subtype), ^(Form|Component|UserControl)$))%> <%if(!compares(vcversion, 8.00) && ends_with(source_file, \.manifest))%> <%else%> <%if(flag_overrides(source_file, dependent_upon))%> <%flag_overrides(source_file, dependent_upon)%> <%endif%> <%endif%> <%endif%> <%endfor%> <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> <%if(custom_type->libpath)%>PATH=%PATH%;<%custom_type->libpath%> <%endif%><%if(flag_overrides(custom_type->input_file, gendir))%>if not exist <%flag_overrides(custom_type->input_file, gendir)%> mkdir <%flag_overrides(custom_type->input_file, gendir)%> <%endif%><%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%><%custom_type->input_file%> <%custom_type->output_option%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_files)%><%else%><%custom_type->input_file->output_files%><%endif%><%else%><%custom_type->input_file%><%endif%><%if(flag_overrides(custom_type->input_file, postcommand))%><%foreach(custom_type->input_file)%>&&<%flag_overrides(custom_type->input_file, postcommand)%><%endfor%><%else%><%if(custom_type->postcommand)%><%foreach(custom_type->input_file)%>&&<%custom_type->postcommand%><%endfor%><%endif%><%endif%> <%else%> <%endif%> <%endfor%> <%endfor%> <%foreach(page_files)%> Designer MSBuild:Compile <%endfor%> <%foreach(resx_files)%> <%if(flag_overrides(resx_file, subtype))%> <%flag_overrides(resx_file, subtype)%> <%endif%> <%if(flag_overrides(resx_file, generates_source))%> <%if(compares(flag_overrides(resx_file, generates_source), 1))%> <%if(ends_with(resx_file, \.settings))%> SettingsSingleFileGenerator <%else%> ResXFileCodeGenerator <%endif%> <%else%> <%flag_overrides(resx_file, generates_source)%> <%endif%> <%basenoextension(resx_file)%>.Designer.cs <%endif%> <%if(flag_overrides(resx_file, dependent_upon))%> <%flag_overrides(resx_file, dependent_upon)%> <%endif%> <%if(flag_overrides(resx_file, generates_source))%> True True <%basename(resx_file)%> <%endif%> <%endfor%> <%foreach(embedded_resource_files)%> <%endfor%> <%foreach(resource_files)%> <%endfor%> <%foreach(ico_files)%> <%endfor%> <%foreach(config_files)%> <%if(flag_overrides(config_file, generates_source))%> True True <%basename(config_file)%> <%else%> <%endif%> <%endfor%> <%foreach(documentation_files)%> <%endfor%> <%foreach(splash_files)%> <%endfor%> <%if(prebuild)%><%eval(prebuild)%><%endif%> <%if(postbuild)%><%eval(postbuild)%><%endif%>
    ace-6.4.5+dfsg.orig/MPC/templates/make.mpd0000644000175000017500000004745313154167361016340 0ustar tggtgg#---------------------------------------------------------------------------- # Macros #---------------------------------------------------------------------------- <%marker(top)%> <%if(multiple(configurations) || multiple(platforms))%> <%if(default_configuration)%> CFG = <%default_configuration%> <%else%> <%foreach(configurations)%> <%if(forfirst)%> <%if(multiple(platforms))%> <%foreach(platforms)%> <%if(forfirst)%> CFG = <%platform%> <%configuration%> <%endif%> <%endfor%> <%else%> CFG = <%configuration%> <%endif%> <%endif%> <%endfor%> <%endif%> <%endif%> <%foreach(compilers)%> <%foreach(platforms)%> <%foreach(configurations)%> <%if(multiple(platforms))%> ifeq ($(CFG), <%platform%> <%configuration%>) <%else%> <%if(multiple(configurations))%> ifeq ($(CFG), <%configuration%>) <%endif%> <%endif%> CC = <%cc%> CXX = <%cxx%> <%if(ld)%> LD = <%ld%> <%else%> LD = $(CXX) $(CCFLAGS) $(CPPFLAGS) <%endif%> AR = <%ar("ar")%> <%if(nm)%> NM = <%nm%> <%endif%> <%if(cxxint)%> CXXINT = <%cxxint%> <%endif%> <%if(cputype)%> CPUTYPE = <%cputype%> <%endif%> <%if(cpu)%> CPU = <%cpu%> <%endif%> <%if(dll_ext && pic)%> PICFLAGS = <%pic%> <%endif%> <%if(cflags)%> CFLAGS = <%cflags%> <%endif%> <%if(ccflags)%> CCFLAGS = <%ccflags%> <%endif%> CPPFLAGS = <%if(visibility && visopt)%><%visopt%> <%endif%>$(PICFLAGS) $(GENFLAGS)<%if(compile_flags)%> <%compile_flags%><%endif%><%if(profile)%> <%profopt%><%endif%><%if(coverage)%> <%covopt%><%endif%><%if(cpu)%> -DCPU=$(CPU)<%endif%><%if(tempincopt)%> <%tempincopt%>$(TEMPINCDIR)<%endif%><%if(compilerflags)%> <%compilerflags%><%endif%><%if(build64bit && compilerflags64)%> <%compilerflags64%><%endif%><%if(pch_source && pchsupport)%><%foreach(pch_defines)%> -D<%pch_define%><%endfor%><%endif%><%if(extracppflags)%><%foreach(extracppflags)%><%if(!starts_with(extracppflag, -D) || !contains(language, java))%> <%extracppflag%><%endif%><%endfor%><%endif%><%if(includes)%><%foreach(includes)%> -I"<%include%>"<%endfor%><%endif%><%if(!contains(language, java) && macros)%><%foreach(macros)%> -D<%macro%><%endfor%><%endif%> OBJEXT = <%obj_ext%> OUTPUT_OPTION = <%output_option(-o \"$@\")%> COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) <%compile_option("-c")%> COMPILE.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) <%compile_option%> <%if(rc)%> RESEXT = <%res_ext%> <%endif%> <%if(build64bit && arflags64)%> ARFLAGS = <%if(extraarflags)%><%extraarflags%> <%endif%><%arflags64%> <%else%> <%if(arflags)%> ARFLAGS = <%if(extraarflags)%><%extraarflags%> <%endif%><%arflags%> <%endif%> <%endif%> <%if(tempinc)%> TEMPINCDIR = <%tempinc%><%if(tempincopt)%><%slash%><%project_name%><%endif%> <%endif%> LDFLAGS =<%if(libpaths)%><%foreach(libpaths)%><%if(targetoutdir)%> <%libpathopt(-L)%>"<%libpath%><%slash%><%targetoutdir%>"<%endif%> <%libpathopt(-L)%>"<%libpath%>"<%endfor%><%endif%><%if(linkflags)%> <%linkflags%><%endif%><%if(profile)%> <%profopt%><%endif%><%if(coverage)%> <%covopt%><%endif%><%if(build64bit && linkflags64)%> <%linkflags64%><%endif%> CCC = $(CXX) MAKEFILE = <%project_file%> DEPENDENCIES = <%if(supports_include)%>.depend.<%endif%>$(MAKEFILE) <%if(exename)%> BTARGETDIR = <%if(exeout)%><%exeout%><%output_dir_ext%><%else%>.<%endif%><%slash%><%targetoutdir%> BIN = $(BTARGETDIR)<%exename%>$(EXESUFFIX)$(EXEEXT) <%else%> LTARGETDIR = <%libout%><%if(!compares(libout, .))%><%output_dir_ext%><%endif%><%slash%><%targetoutdir%> <%endif%> CAT = <%type("cat")%> MV = <%move("mv -f")%> RM = <%delete("rm -rf")%> CP = <%copy("cp -p")%> NUL = <%devnull("/dev/null")%> MKDIR = <%makedir("mkdir -p")%> TESTDIRSTART = <%testdirstart("test -d")%> TESTDIREND = <%testdirend("||")%> TOUCH = <%touch("touch")%> EXEEXT = <%exe_ext%> LIBPREFIX = <%lib_prefix%><%libname_prefix%> <%if(use_lib_modifier)%> LIBSUFFIX = <%lib_modifier%> <%endif%> <%if(use_exe_modifier)%> EXESUFFIX = <%lib_modifier%> <%endif%> GENFLAGS =<%if(!contains(configuration, Release) || optimize)%> <%genflags%><%endif%> <%if(link_lib_name)%> LDLIBS =<%foreach(libs)%> "$(LIBPREFIX)<%lib%>$(LIBSUFFIX)<%lib_ext%>"<%endfor%><%foreach(lit_libs)%> "$(LIBPREFIX)<%lit_lib%><%lib_ext%>"<%endfor%><%foreach(pure_libs)%> "<%pure_lib%>"<%endfor%> <%ldlibs%> <%else%> LDLIBS =<%foreach(libs)%> <%libopt%>"<%libname_prefix%><%lib%>$(LIBSUFFIX)"<%endfor%><%foreach(lit_libs)%> <%libopt%>"<%lit_lib%>"<%endfor%><%foreach(pure_libs)%> "<%pure_lib%>"<%endfor%> <%ldlibs%> <%endif%> OBJS =<%if(pch_source && pchsupport)%> <%targetoutdir%><%obj_dir%><%noextension(pch_source)%>$(OBJEXT)<%endif%><%foreach(source_files)%> <%if(targetoutdir || obj_dir)%><%targetoutdir%><%obj_dir%><%transdir(source_file)%><%basenoextension(source_file)%><%else%><%noextension(source_file)%><%endif%>$(OBJEXT)<%endfor%><%if(rc)%><%foreach(resource_files)%> <%targetoutdir%><%obj_dir%><%resource_file%>$(RESEXT)<%endfor%><%endif%> <%if(lib_ext)%> <%if(staticname)%> AREXT = <%lib_ext%> LIB = $(LTARGETDIR)$(LIBPREFIX)<%staticname%>$(LIBSUFFIX)$(AREXT) <%endif%> <%endif%> <%if(dll_ext && sharedname)%> SOEXT = <%dll_ext%> SHTARGETDIR = <%if(dllout)%><%dllout%><%if(!compares(dllout, .))%><%output_dir_ext%><%endif%><%else%><%libout%><%if(!compares(libout, .))%><%output_dir_ext%><%endif%><%endif%><%slash%><%targetoutdir%> <%if(version && versupport)%> SHLIB_BASE = $(LIBPREFIX)<%sharedname%>$(LIBSUFFIX)$(SOEXT) <%endif%> SHLIB = $(SHTARGETDIR)$(LIBPREFIX)<%sharedname%>$(LIBSUFFIX)$(SOEXT) <%if(shflags)%> SHFLAGS = <%shflags%> <%endif%> <%endif%> SRC =<%if(pch_source && pchsupport)%> <%pch_source%><%endif%> <%source_files%> LINK.cc = <%if(dld)%><%dld%> $(LDFLAGS)<%else%>$(LD) $(LDFLAGS)<%endif%> <%if(!contains(language, java))%> <%if(dynamicflags)%> DYNAMICFLAGS =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%> <%endif%> <%if(staticflags)%> STATICFLAGS =<%foreach(staticflags)%> -D<%staticflag%><%endfor%> <%endif%> EXPORTFLAGS = <%if(exename)%><%if(need_staticflags)%>$(STATICFLAGS)<%endif%><%else%><%if(dll_ext && sharedname)%>$(DYNAMICFLAGS)<%else%>$(STATICFLAGS)<%endif%><%endif%> <%endif%> <%if(gnumake && libpaths)%> <%if(exename || sharedname)%> DEPLIBS = $(foreach lib,<%foreach(libs)%> <%libname_prefix%><%lib%>$(LIBSUFFIX)<%endfor%> <%lit_libs%>, $(foreach libpath,<%foreach(libpaths)%><%if(targetoutdir)%> <%libpath%>/<%targetoutdir%><%endif%> <%libpath%><%endfor%>, $(wildcard $(libpath)/lib$(lib)<%lib_ext(".a")%>))) <%endif%> <%endif%> <%if(multiple(configurations) || multiple(platforms))%> endif <%endif%> <%endfor%> <%if(supports_include && make_include)%> include <%make_include%> <%endif%> <%marker(macros)%> #---------------------------------------------------------------------------- # Local targets #---------------------------------------------------------------------------- <%if(exename)%> all:<%if(prebuild)%> __prebuild__<%endif%> $(BIN)<%if(postbuild)%> __postbuild__<%endif%> <%if(specialscript)%> specialscript: @echo '<%specialscript%>' > $@ @<%chmod("chmod")%> 755 $@ <%endif%> <%if(prelinktarget)%> <%prelinktarget%>: specialscript $(OBJS) @specialscript "$(NM)" "$(OBJS)" "$(LDLIBS)" "<%if(libpaths)%><%foreach(libpaths)%><%if(targetoutdir)%><%libpath%><%slash%><%targetoutdir%> <%endif%><%libpath%><%fornotlast(" ")%><%endfor%><%else%>.<%endif%>" "$(BIN)" "$@" @$(RM) specialscript <%if(prelinktargetobj)%> <%targetoutdir%><%obj_dir%><%prelinktargetobj%>: <%prelinktarget%> $(COMPILE.cc) $(OUTPUT_OPTION) <%prelinktarget%> @$(RM) <%prelinktarget%> <%endif%> <%endif%> $(BIN):<%if(tempinc)%> $(TEMPINCDIR)<%endif%><%if(prelinktargetobj)%> <%targetoutdir%><%obj_dir%><%prelinktargetobj%><%else%><%if(prelinktarget)%> <%prelinktarget%><%endif%><%endif%> $(OBJS)<%if(gnumake && libpaths)%> $(DEPLIBS)<%endif%> @$(TESTDIRSTART) "$(BTARGETDIR)" $(TESTDIREND) $(MKDIR) "$(BTARGETDIR)" <%if(prelink)%> <%eval(prelink)%> <%endif%> $(LINK.cc) $(OBJS) $(LDLIBS)<%if(exe_linkflags)%> <%eval(exe_linkflags)%><%endif%> $(OUTPUT_OPTION) <%if(postlinkbinary)%> <%postlinkbinary%> <%endif%> <%endif%> <%if(dll_ext && sharedname)%> all:<%if(prebuild)%> __prebuild__<%endif%><%if(version && versupport)%> $(SHLIB).<%version%><%endif%> $(SHLIB)<%if(postbuild)%> __postbuild__<%endif%> <%if(version && versupport)%> $(SHLIB): cd $(SHTARGETDIR) && ln -s $(SHLIB_BASE).<%version%> $(SHLIB_BASE) <%endif%> $(SHLIB)<%if(version && versupport)%>.<%version%><%endif%>: <%if(tempinc)%>$(TEMPINCDIR) <%endif%>$(OBJS)<%if(gnumake && libpaths)%> $(DEPLIBS)<%endif%> @$(TESTDIRSTART) "$(SHTARGETDIR)" $(TESTDIREND) $(MKDIR) "$(SHTARGETDIR)" <%if(prelink)%> <%eval(prelink)%> <%endif%> <%if(dmclink)%> link /impl <%if(pch_source && pchsupport)%><%targetoutdir%><%obj_dir%><%noextension(pch_source)%>$(OBJEXT)+<%endif%><%foreach(source_files)%><%if(targetoutdir || obj_dir)%><%targetoutdir%><%obj_dir%><%transdir(source_file)%><%basenoextension(source_file)%><%else%><%noextension(source_file)%><%endif%>$(OBJEXT)<%fornotlast("+")%><%endfor%>,$@,<%ldlibs%><%if(rc)%><%foreach(resource_files)%><%forfirst(",,")%><%targetoutdir%><%obj_dir%><%resource_file%>$(RESEXT)<%fornotlast("+")%><%endfor%><%endif%> <%else%> $(LINK.cc) $(SHFLAGS) $(OBJS) $(LDLIBS) $(OUTPUT_OPTION) <%endif%> <%else%> <%if(staticname)%> all:<%if(prebuild)%> __prebuild__<%endif%> $(LIB)<%if(postbuild)%> __postbuild__<%endif%> <%endif%> <%endif%> <%if(staticname)%> $(LIB): <%if(tempinc)%>$(TEMPINCDIR) <%endif%>$(OBJS) @$(TESTDIRSTART) "$(LTARGETDIR)" $(TESTDIREND) $(MKDIR) "$(LTARGETDIR)" $(AR) $(ARFLAGS) <%libgenopt%>$(LIB) $(OBJS)<%if(tempinc)%> `find $(TEMPINCDIR) -name \*.o\*`<%endif%> <%if(ranlib)%> ranlib $(LIB) <%endif%> <%endif%> <%if(custom_types)%> <%if(gnumake)%> SPACE = $(should_be_unset) $(should_be_unset) <%endif%> GENERATED_DIRTY =<%foreach(custom_types)%><%foreach(custom_type->input_files)%><%if(custom_type->input_file->output_files)%><%foreach(custom_type->input_file->output_files)%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%endfor%><%endif%><%endfor%><%endfor%> <%if(!source_files)%> all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%> <%endif%> <%foreach(custom_types)%> <%if(expanded_variable_assignment && custom_type->libpath)%> DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):<%custom_type->libpath%> LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):<%custom_type->libpath%> SHLIB_PATH := $(SHLIB_PATH):<%custom_type->libpath%> LIBPATH := $(LIBPATH):<%custom_type->libpath%> PATH := $(PATH):<%custom_type->libpath%> <%endif%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> <%if(notparallel && multiple(custom_type->input_file->output_files))%> .NOTPARALLEL: <%endif%> <%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(" ")%><%endfor%>: <%custom_type->input_file%><%if(custom_type->input_file->dependencies)%><%foreach(custom_type->input_file->dependencies)%><%if(gnumake)%><%if(contains(custom_type->input_file->dependencie, \$))%> $(subst $(SPACE),\$(SPACE),<%custom_type->input_file->dependencie%>)<%else%> <%scope(enter, escape, \\s)%><%custom_type->input_file->dependencie%><%scope(leave)%><%endif%><%else%><%if(!contains(custom_type->input_file->dependencie, \$))%> <%scope(enter, escape, \\s)%><%custom_type->input_file->dependencie%><%scope(leave)%><%endif%><%endif%><%endfor%><%endif%><%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%if(gnumake)%><%if(contains(dep, \$))%> $(subst $(SPACE),\$(SPACE),<%dep%>)<%else%> <%scope(enter, escape, \\s)%><%dep%><%scope(leave)%><%endif%><%else%><%if(!contains(dep, \$))%> <%scope(enter, escape, \\s)%><%dep%><%scope(leave)%><%endif%><%endif%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%><%if(gnumake)%><%if(contains(custom_type->dependent, \$))%> $(subst $(SPACE),\$(SPACE),<%custom_type->dependent%>)<%else%> <%scope(enter, escape, \\s)%><%custom_type->dependent%><%scope(leave)%><%endif%><%else%><%if(!contains(custom_type->dependent, \$))%> <%scope(enter, escape, \\s)%><%custom_type->dependent%><%scope(leave)%><%endif%><%endif%><%endfor%><%endif%><%endif%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%if(gnumake)%><%if(contains(dep_lib, \$))%> $(subst $(SPACE),\$(SPACE),<%dirname(dep_lib)%>/$(LIBPREFIX)<%basename(dep_lib)%>$(LIBSUFFIX)$(SOEXT))<%else%> <%scope(enter, escape, \\s)%><%dirname(dep_lib)%>/$(LIBPREFIX)<%basename(dep_lib)%>$(LIBSUFFIX)$(SOEXT)<%scope(leave)%><%endif%><%else%><%if(!contains(dep_lib, \$))%> <%scope(enter, escape, \\s)%><%dirname(dep_lib)%>/$(LIBPREFIX)<%basename(dep_lib)%>$(LIBSUFFIX)$(SOEXT)<%scope(leave)%><%endif%><%endif%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%if(gnumake)%><%if(contains(custom_type->dependent_libs, \$))%> $(subst $(SPACE),\$(SPACE),<%dirname(custom_type->dependent_lib)%>/$(LIBPREFIX)<%basename(custom_type->dependent_lib)%>$(LIBSUFFIX)$(SOEXT))<%else%> <%scope(enter, escape, \\s)%><%dirname(custom_type->dependent_lib)%>/$(LIBPREFIX)<%basename(custom_type->dependent_lib)%>$(LIBSUFFIX)$(SOEXT)<%scope(leave)%><%endif%><%else%><%if(!contains(custom_type->dependent_libs, \$))%> <%scope(enter, escape, \\s)%><%dirname(custom_type->dependent_lib)%>/$(LIBPREFIX)<%basename(custom_type->dependent_lib)%>$(LIBSUFFIX)$(SOEXT)<%scope(leave)%><%endif%><%endif%><%endfor%><%endif%><%endif%><%endif%> <%if(flag_overrides(custom_type->input_file, gendir))%> @$(TESTDIRSTART) "<%flag_overrides(custom_type->input_file, gendir)%>" $(TESTDIREND) $(MKDIR) "<%flag_overrides(custom_type->input_file, gendir)%>" <%endif%> <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%><%custom_type->input_file%> <%custom_type->output_option%> "$@"<%else%><%custom_type->input_file%><%endif%> <%if(flag_overrides(custom_type->input_file, postcommand))%> <%foreach(custom_type->input_file)%> <%flag_overrides(custom_type->input_file, postcommand)%> <%endfor%> <%else%> <%if(custom_type->postcommand)%> <%foreach(custom_type->input_file)%> <%custom_type->postcommand%> <%endfor%> <%endif%> <%endif%> <%if(pchsupport && pch_header)%> <%if(custom_type->pch_postrule)%> <%foreach(custom_type->input_file->source_output_files)%> @echo <%echo_outer_quote("'")%>#include "<%pch_header%>"<%echo_outer_quote("'")%> > temp.$$$$ && $(CAT) <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temp.$$$$ && $(MV) temp.$$$$ <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> <%endfor%> <%endif%> <%endif%> <%endif%> <%endfor%> <%endfor%> .PRECIOUS: $(GENERATED_DIRTY) <%if(source_files)%> $(OBJS): $(GENERATED_DIRTY) <%endif%> <%endif%> generated:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY) @-: <%if(tempinc)%> $(TEMPINCDIR): @-$(TESTDIRSTART) "$(TEMPINCDIR)" $(TESTDIREND) $(MKDIR) "$(TEMPINCDIR)" 2> $(NUL) <%endif%> <%if(pch_source && pchsupport)%> <%targetoutdir%><%obj_dir%><%noextension(pch_source)%>$(OBJEXT): <%pch_source%> <%if(targetoutdir || obj_dir)%> @$(TESTDIRSTART) "<%targetoutdir%><%obj_dir%><%dirname(pch_source)%>" $(TESTDIREND) $(MKDIR) "<%targetoutdir%><%obj_dir%><%dirname(pch_source)%>" <%endif%> <%if(ends_with(pch_source, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%if(pchcreate)%><%pchcreate%><%targetoutdir%><%obj_dir%><%pch_header%><%pchext%> <%endif%>$(EXPORTFLAGS)<%if(!pchnobj)%> $(OUTPUT_OPTION)<%endif%> <%pch_source%> <%if(pchnobj)%> @$(CP) <%targetoutdir%><%obj_dir%><%pch_header%><%pchext%> <%targetoutdir%><%obj_dir%><%noextension(pch_source)%>$(OBJEXT) <%endif%> <%endif%> <%foreach(source_files)%> <%if(targetoutdir || obj_dir)%><%targetoutdir%><%obj_dir%><%transdir(source_file)%><%basenoextension(source_file)%><%else%><%noextension(source_file)%><%endif%>$(OBJEXT): <%source_file%> <%if(targetoutdir || obj_dir)%> @$(TESTDIRSTART) "<%targetoutdir%><%obj_dir%><%transdir(source_file)%>" $(TESTDIREND) $(MKDIR) "<%targetoutdir%><%obj_dir%><%transdir(source_file)%>" <%endif%> <%if(ends_with(source_file, \.c) || ends_with(source_file, \.[Ss]))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%><%if(pchuse && pch_source && pchsupport)%><%pchuse%><%pch_header%><%pchext%> <%if(pchstop)%><%pchstop%><%pch_header%><%endif%><%endif%>$(EXPORTFLAGS) $(OUTPUT_OPTION) <%source_file%> <%if(source_file->postcommand)%> <%source_file->postcommand%> <%endif%> <%endfor%> <%if(resource_files)%> <%if(rc)%> <%foreach(resource_files)%> <%targetoutdir%><%obj_dir%><%resource_file%>$(RESEXT): <%if(targetoutdir || obj_dir)%> @$(TESTDIRSTART) "<%targetoutdir%><%obj_dir%><%dirname(resource_file)%>" $(TESTDIREND) $(MKDIR) "<%targetoutdir%><%obj_dir%><%dirname(resource_file)%>" <%endif%> <%rc%><%foreach(includes)%> -I<%include%><%endfor%> <%resource_file%> <%targetoutdir%><%obj_dir%><%resource_file%>$(RESEXT) <%endfor%> <%endif%> <%endif%> clean: -$(RM) $(OBJS) <%if(pch_source && pchsupport)%> -$(RM) <%targetoutdir%><%obj_dir%><%pch_header%><%pchext%> <%endif%> <%if(clean)%> -$(RM) <%clean%><%if(sharedname)%><%foreach(dir, clean)%> $(SHTARGETDIR)<%dir%><%endfor%><%endif%><%if(staticname || sharedname)%><%foreach(dir, clean)%> $(LTARGETDIR)<%dir%><%endfor%><%endif%><%if(exename)%><%foreach(dir, clean)%> $(BTARGETDIR)<%dir%><%endfor%><%endif%> <%endif%> realclean: clean -$(RM) <%if(exename)%>$(BIN)<%else%><%if(dll_ext && sharedname && version && versupport)%>$(SHLIB).<%version%> <%endif%>$(SHLIB) $(LIB)<%endif%> <%if(custom_types)%> -$(RM) $(GENERATED_DIRTY) <%endif%> <%if(obj_dir)%> -$(RM) <%targetoutdir%><%obj_dir%> <%endif%> <%if(postclean)%> -<%eval(postclean)%> <%endif%> check-syntax: $(COMPILE.cc) $(EXPORTFLAGS)<%if(checkopt)%> <%checkopt%><%endif%> $(CHK_SOURCES) <%if(prebuild)%> __prebuild__: @<%eval(prebuild)%> <%endif%> <%if(postbuild)%> __postbuild__:<%if(exename)%> $(BIN)<%endif%><%if(dll_ext && sharedname)%><%if(version && versupport)%> $(SHLIB).<%version%><%endif%> $(SHLIB)<%else%><%if(staticname)%> $(LIB)<%endif%><%endif%> @<%eval(postbuild)%> <%endif%> <%marker(local)%> #---------------------------------------------------------------------------- # Dependencies #---------------------------------------------------------------------------- <%if(!gnumake)%> $(DEPENDENCIES): @$(TOUCH) $(DEPENDENCIES) <%endif%> depend: <%if(source_files || pch_source)%> -<%if(targetoutdir || obj_dir)%>VDIR='<%subst(targetoutdir,\$,$$)%><%subst(obj_dir,\$,$$)%>' <%endif%><%depgen("$(MPC_ROOT)/depgen.pl")%> <%depgen_flags%> $(CFLAGS) $(CCFLAGS) $(CPPFLAGS) -f $(DEPENDENCIES) $(SRC) 2> $(NUL) <%else%> @-: <%endif%> <%if(forlast)%> <%if(supports_include)%> <%if(gnumake)%>-<%endif%>include $(DEPENDENCIES) <%else%> # DO NOT DELETE THIS LINE <%endif%> <%endif%> <%endfor%> <%endfor%> <%marker(bottom)%> ace-6.4.5+dfsg.orig/MPC/templates/vc8exe.mpt0000644000175000017500000000330713154167361016633 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release common_defines = WIN32 _CONSOLE _CRT_NONSTDC_NO_WARNINGS ConfigurationType = 1 SubSystem = 1 Detect64BitPortabilityProblems = false MinimalRebuild = false conditional_include "vc8platforms" Release { LinkIncremental = 1 optimize = 2 defines = NDEBUG output_dir = Release intermediate_dir = Release GenerateDebugInformation = false } Debug { debug_prj = 1 defines = _DEBUG intermediate_dir = Debug lib_modifier = d } Memcheck Release { LinkIncremental = 1 optimize = 2 defines = NDEBUG output_dir = Release intermediate_dir = Release BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 } Memcheck Debug { debug_prj = 1 defines = _DEBUG intermediate_dir = Debug lib_modifier = d BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 } MFC Release { LinkIncremental = 1 optimize = 2 common_defines = WIN32 _WINDOWS defines = NDEBUG _AFXDLL output_dir = MFC_Release intermediate_dir = MFC_Release lib_modifier = mfc UseOfMFC = 2 unicode_mfc_entry = wWinMainCRTStartup GenerateDebugInformation = false } MFC Debug { debug_prj = 1 common_defines = WIN32 _WINDOWS defines = _DEBUG _AFXDLL output_dir = MFC_Debug intermediate_dir = MFC_Debug lib_modifier = mfcd UseOfMFC = 2 unicode_mfc_entry = wWinMainCRTStartup } conditional_include "vcpartialmacros" conditional_include "user_vc8exe" ace-6.4.5+dfsg.orig/MPC/templates/makeexe.mpt0000644000175000017500000000012013154167361017036 0ustar tggtgg// -*- MPC -*- conditional_include "makedll" conditional_include "user_makeexe" ace-6.4.5+dfsg.orig/MPC/templates/vc10platforms.mpt0000644000175000017500000001531513154167361020134 0ustar tggtgg// -*- MPC -*- // // Any of these platforms can set using value_template platforms= // when generating solutions/projects. // //platforms = Win32 x64 "Pocket PC 2003 (ARMV4)" "Smartphone 2003 (ARMV4)" \ // "Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" "Windows Mobile 5.0 Smartphone SDK (ARMV4I)" \ // "Windows Mobile 6 Standard SDK (ARMV4I)" platforms = Win32 x64 default_platform = Win32 PlatformToolset = v100 Win32 { output_subdir = I386 } x64 { output_subdir = AMD64 cpu_defines = _AMD64_ platform_defines = _WIN64 TargetMachine = "0" // We let VC++ figure it out for us. link_options = /machine:AMD64 } // The "embedded" platforms below were copied from vc8platforms.mpt and may // need to be changed before they will work with vc10. Pocket PC 2003 (ARMV4) { output_subdir = PocketPC2003_ARMV4 cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE $(PLATFORMDEFINES) _WINDOWS _UNICODE UNICODE POCKETPC2003_UI_MODEL link_options = /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE lit_libs += ccrtrtti iphlpapi subsystem = "0" EnableFunctionLevelLinking = "true" TargetMachine = "0" } Smartphone 2003 (ARMV4) { output_subdir = Smartphone2003_ARMV4 cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE $(PLATFORMDEFINES) _WINDOWS _UNICODE UNICODE SMARTPHONE2003_UI_MODEL link_options = /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE lit_libs += ccrtrtti iphlpapi subsystem = "0" EnableFunctionLevelLinking = "true" TargetMachine = "0" } Windows Mobile 5.0 Pocket PC SDK (ARMV4I) { output_subdir = WinMobile50_PocketPC_ARMV4I cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE $(PLATFORMDEFINES) _WINDOWS _UNICODE UNICODE POCKETPC2003_UI_MODEL link_options = /subsystem:windowsce,5.01 /machine:THUMB lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } Windows Mobile 5.0 Smartphone SDK (ARMV4I) { output_subdir = WinMobile50_Smartphone_ARMV4I cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE $(PLATFORMDEFINES) _WINDOWS _UNICODE UNICODE SMARTPHONE2005_UI_MODEL link_options = /subsystem:windowsce,5.01 /machine:THUMB lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } Windows Mobile 6 Standard SDK (ARMV4I) { unicode = 1 output_subdir = WinMobile60_SDK_ARMV4I cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = _WIN32_WCE=$(CEVER) UNDER_CE=$(CEVER) WINCE _WINDOWS $(PLATFORMDEFINES) link_options = /subsystem:windowsce,5.02 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } Windows Mobile 6 Professional SDK (ARMV4I) { unicode = 1 output_subdir = WinMobile60_SDK_ARMV4I cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = _WIN32_WCE=$(CEVER) UNDER_CE=$(CEVER) WINCE _WINDOWS $(PLATFORMDEFINES) link_options = /subsystem:windowsce,5.02 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } SuperSonic_CE6 (ARMV4I) { unicode = 1 output_subdir = SUPERSONIC_CE6_ARMV4I cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,6.00 /savebaserelocations:"$(TargetDir)/$(TargetName).rel" optimizereferences = 0 enablecomdatfolding = 0 subsystem = "0" TargetMachine = "16" stackreservesize = 65536 stackcommitsize = 4096 lit_libs += iphlpapi } eBox4300_WINCE600_SDK (x86) { unicode = 1 output_subdir = eBox4300_WINCE600_SDK cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,6.0 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } eBox2300_WINCE600_SDK (x86) { unicode = 1 output_subdir = eBox2300_WINCE600_SDK cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,6.0 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } Beckhoff_HMI_500 (x86) { unicode = 1 output_subdir = Beckhoff_HMI_500 (x86) cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,5.00 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } Beckhoff_HMI_500 (ARMV4I) { unicode = 1 output_subdir = Beckhoff_HMI_500 (ARMV4i) cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,5.00 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } Beckhoff_HMI_600 (x86) { unicode = 1 output_subdir = Beckhoff_HMI_600 (x86) cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,6.00 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } BR APC620 PPC700 CE 5.00 V1.2 (x86) { unicode = 1 output_subdir = BR APC620 + PPC700 CE 5.00 V1.2 (x86) cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,5.00 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } STANDARDSDK_500 (x86) { unicode = 1 output_subdir = STANDARDSDK_500_x86 cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,5.00 lit_libs += iphlpapi subsystem = "0" TargetMachine = "0" } Stellar_EC7 (ARMv4I) { unicode = 1 output_subdir = STELLAR_EC7_ARMV4I cpu_defines = $(ARCHFAM) $(_ARCHFAM_) platform_defines = UNDER_CE=$(CEVER) _WIN32_WCE=$(CEVER) WINCE _WINDOWS _UNICODE UNICODE link_options = /subsystem:windowsce,7.00 /savebaserelocations:"$(TargetDir)/$(TargetName).rel" optimizereferences = 0 enablecomdatfolding = 0 subsystem = "0" TargetMachine = "16" stackreservesize = 65536 stackcommitsize = 4096 lit_libs += iphlpapi } ace-6.4.5+dfsg.orig/MPC/templates/vc8java.mpd0000644000175000017500000001312213154167361016747 0ustar tggtgg Local <%prversion("8.0.50727")%> <%schemaversion("2.0")%> {<%guid%>} <%foreach(configurations)%> <%if(forfirst)%> <%configuration%> <%endif%> <%endfor%> <%foreach(platforms)%> <%if(forfirst)%> <%platform%> <%endif%> <%endfor%> <%if(exename || sharedname || staticname)%> <%if(exename)%><%exename%><%else%><%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%endif%> <%endif%> <%keyfile%> <%if(keyfile)%> true <%endif%> JScript Grid IE50 <%DelaySign("false")%> <%if(exename || sharedname || staticname)%> <%if(exename)%><%if(winapp)%>Win<%endif%>Exe<%else%>Library<%endif%> <%endif%> OnBuildSuccess <%startupobject%> <%foreach(libpaths)%><%libpath%><%fornotlast(";")%><%endfor%> <%foreach(platforms)%> <%foreach(configurations)%> <%if(exename || sharedname || staticname)%> <%if(exename)%><%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir%><%endif%><%else%>.\<%output_dir%><%endif%><%else%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%output_dir%><%endif%>\ <%endif%> <%allowunsafeblocks(false)%> 285212672 <%foreach(defines common_defines macros)%><%define%>;<%endfor%><%if(!optimize)%>DESIGN;DEBUG;<%endif%><%if(trace)%>TRACE<%endif%> <%if(optimize)%>false<%else%>true<%endif%> <%if(optimize)%>true<%else%>false<%endif%> <%RegisterForComInterop("false")%> false <%warning_level("4")%> <%if(optimize)%>none<%else%>full<%endif%> <%endfor%> <%endfor%> <%if(after)%> <%endif%> <%foreach(libs)%> <%libname_prefix%><%lib%> <%endfor%> <%foreach(lib, sort(lit_libs pure_libs))%> <%lib%> <%endfor%> <%foreach(source_files)%> <%if(flag_overrides(source_file, subtype))%><%flag_overrides(source_file, subtype)%><%else%>Code<%endif%> <%if(flag_overrides(source_file, dependent_upon))%> <%flag_overrides(source_file, dependent_upon)%> <%endif%> <%endfor%> <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> <%if(custom_type->libpath)%>PATH=%PATH%;<%custom_type->libpath%> <%endif%><%if(flag_overrides(custom_type->input_file, gendir))%>if not exist <%flag_overrides(custom_type->input_file, gendir)%> mkdir <%flag_overrides(custom_type->input_file, gendir)%> <%endif%><%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%><%custom_type->input_file%> <%custom_type->output_option%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_files)%><%else%><%custom_type->input_file->output_files%><%endif%><%else%><%custom_type->input_file%><%endif%><%if(flag_overrides(custom_type->input_file, postcommand))%><%foreach(custom_type->input_file)%>&&<%flag_overrides(custom_type->input_file, postcommand)%><%endfor%><%else%><%if(custom_type->postcommand)%><%foreach(custom_type->input_file)%>&&<%custom_type->postcommand%><%endfor%><%endif%><%endif%> <%else%> <%endif%> <%endfor%> <%endfor%> <%foreach(documentation_files)%> <%endfor%> <%if(prebuild)%><%eval(prebuild)%><%endif%> <%if(postbuild)%><%eval(postbuild)%><%endif%> ace-6.4.5+dfsg.orig/MPC/templates/vc12exe.mpt0000644000175000017500000000016413154167361016704 0ustar tggtgg// -*- MPC -*- conditional_include "vc12platforms" conditional_include "vc1xexe" conditional_include "user_vc12exe" ace-6.4.5+dfsg.orig/MPC/templates/wb30cproject.mpd0000644000175000017500000000245213154167361017716 0ustar tggtgg ace-6.4.5+dfsg.orig/MPC/templates/vc12dll.mpt0000644000175000017500000000016413154167361016676 0ustar tggtgg// -*- MPC -*- conditional_include "vc12platforms" conditional_include "vc1xdll" conditional_include "user_vc12dll" ace-6.4.5+dfsg.orig/MPC/templates/cdt6lib.mpt0000644000175000017500000000033013154167361016751 0ustar tggtgg// -*- MPC -*- conditional_include "cdt6platforms" configurations = debug release project_type_name = "Static Library" project_type = lib build_artefact_type = org.eclipse.cdt.build.core.buildArtefactType.staticLib ace-6.4.5+dfsg.orig/MPC/templates/cdt6exe.mpt0000644000175000017500000000031413154167361016766 0ustar tggtgg// -*- MPC -*- conditional_include "cdt6platforms" configurations = debug release project_type_name = Executable project_type = exe build_artefact_type = org.eclipse.cdt.build.core.buildArtefactType.exe ace-6.4.5+dfsg.orig/MPC/templates/vc10libexe.mpt0000644000175000017500000000017213154167361017370 0ustar tggtgg// -*- MPC -*- conditional_include "vc10platforms" conditional_include "vc1xlibexe" conditional_include "user_vc10libexe" ace-6.4.5+dfsg.orig/MPC/templates/cdt6platforms.mpt0000644000175000017500000001516213154167361020223 0ustar tggtgg// -*- MPC -*- // Any of these platforms can be set using // -value_template platforms="blah blah blah" // when generating a CDT project/workspace combo. The default is to use the // platform that matches the host that's running MPC (see fill_value() in // CDT6ProjectCreator.pm). // // // Platforms // conditional_include "common" conditional_include "unixcommon" // We include this at the global b/c most // platforms are unix-ish. windowscommon // overrides these in the relevant scopes. // These will have platform_specializer appended if it's defined configuration_parent_root = cdt.managedbuild.config.gnu toolchain_superclass_root = cdt.managedbuild.toolchain.gnu toolchain_internal_builder_root = cdt.managedbuild.target.gnu.builder targetplatform_superclass = cdt.managedbuild.target.gnu.platform outputtype_superclass = cdt.managedbuild.tool.gnu.cpp.linker.output // These are just defaults exe_ext_nodot = dll_ext_nodot = so lib_ext_nodot = a tool_name_prefix = GNU c_linker_tool_superclass_root = cdt.managedbuild.tool.gnu.c.linker // must have .so.debug appended cpp_linker_tool_superclass_root = cdt.managedbuild.tool.gnu.cpp.linker // must have .so.debug appended linker_option_superclass = gnu.cpp.link.option // must have .XXX appended cpp_compiler_option_superclass = gnu.cpp.compiler.option c_compiler_superclass = ??? c_compiler_option_superclass = gnu.c.compiler.option project_element_type_id = cdt.managedbuild.target.gnu c_linker_dynamiclib_superclass = gnu.c.link.so.debug.option.shared cpp_linker_dynamiclib_superclass = gnu.cpp.link.so.debug.option.shared cpp_linker_tool_input_superclass = cdt.managedbuild.tool.gnu.cpp.linker.input linux { binary_parsers = org.eclipse.cdt.core.ELF error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser threadflags = -pthread platform_libs += rt dl } // cellppu is an example for how to do a cross-compile (or, really, any compile using // tools with non-standard names). cellppu { as = ppu-as ar = ppu-ar cc = ppu-gcc // can set ccld to name of C Linker if different from cc cxx = ppu-g++ // can set cxxld to name of C++ Linker if different from cxx binary_parsers = org.eclipse.cdt.core.ELF error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser threadflags = -pthread platform_libs += rt dl } // This scope serves as an example of a custom platform. On 64-bit linux, // you can compile a 32-bit binary by passing -m32 to gcc. Using this custom // platform, MPC can generate CDT projects that have "Build Configurations" // for both 64-bit and 32-bit. This would be enabled by running mwc.pl with // -value_template platforms="linux linux_m32" linux_m32 { binary_parsers = org.eclipse.cdt.core.ELF error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser ccflags += -m32 cxxflags += -m32 linkflags += -m32 threadflags = -pthread platform_libs += rt dl } macosx { dll_ext = .dylib exe_ext_nodot = dll_ext_nodot = dylib lib_ext_nodot = a binary_parsers = org.eclipse.cdt.core.MachO64 error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser host_platform = host_macosx project_element_type_id = cdt.managedbuild.target.macosx // platform_specializer gets added on to various things like configuration_parent_root, etc. configuration_parent_root = cdt.managedbuild.config platform_specializer = macosx tool_name_prefix = "MacOS X" linker_option_superclass = macosx.cpp.link.option c_linker_dynamiclib_superclass = macosx.c.link.macosx.so.debug.option.shared cpp_linker_dynamiclib_superclass = macosx.cpp.link.macosx.so.debug.option.shared c_linker_tool_superclass_root = cdt.managedbuild.tool.macosx.c.linker.macosx // must have .so.debug appended cpp_linker_tool_superclass_root = cdt.managedbuild.tool.macosx.cpp.linker.macosx // must have .so.debug appended cpp_linker_tool_input_superclass = cdt.managedbuild.tool.macosx.cpp.linker.input outputtype_superclass = cdt.managedbuild.tool.macosx.cpp.linker.output.so } win32 { conditional_include "windowscommon" lib_prefix = lib // this is different from VC++ b/c we're using mingw exe_ext_nodot = exe dll_ext_nodot = dll lib_ext_nodot = lib platform_libs = threadflags = -mthreads binary_parsers = org.eclipse.cdt.core.PE error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser host_platform = host_win32 project_element_type_id = cdt.managedbuild.target.gnu.mingw platform_specializer = mingw tool_name_prefix = MinGW linker_option_superclass = gnu.cpp.link.option // must have .XXX appended c_compiler_superclass = cdt.managedbuild.tool.gnu.c.compiler.mingw c_linker_dynamiclib_superclass = gnu.c.link.mingw.so.debug.option.shared cpp_linker_dynamiclib_superclass = gnu.cpp.link.mingw.so.debug.option.shared c_linker_tool_superclass_root = cdt.managedbuild.tool.gnu.c.linker.mingw // must have .so.debug appended cpp_linker_tool_superclass_root = cdt.managedbuild.tool.gnu.cpp.linker.mingw // must have .so.debug appended cpp_linker_tool_input_superclass = cdt.managedbuild.tool.mingw.cpp.linker.input } cygwin { binary_parsers = org.eclipse.cdt.core.PE error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser host_platform = host_win32 platform_specializer = cygwin } solaris { binary_parsers = org.eclipse.cdt.core.ELF error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser platform_specializer = solaris } // default values for the host-specific variables, overridden below host_platform = linux libenv = LD_LIBRARY_PATH shell = sh script_ext = .sh script_hdr = #!/bin/sh script_tmpfile = temporary$$.src makefile_tmpfile = temporary$$$$.src setenv = export envvar_pre = $ pathsep = : quote_echo = ' ln = ln -sf host_macosx { libenv = DYLD_LIBRARY_PATH } host_win32 { libenv = PATH shell = cmd /c script_ext = .cmd script_hdr = "@echo off & set TMPFILE=temporary%RANDOM%.src" script_tmpfile = %TMPFILE% makefile_tmpfile = temporary_mpc.src setenv = set envvar_pre = % envvar_post = % pathsep = ; mkdir_pre = if not exist ln = copy /y quote_echo = } // Abstractions for different configurations release { optimization_level = max debugging_level = none } debug { optimization_level = none debugging_level = max } ace-6.4.5+dfsg.orig/MPC/templates/ghsdll.mpt0000644000175000017500000000012213154167361016676 0ustar tggtgg// -*- MPC -*- conditional_include "ghscommon" conditional_include "user_ghsdll" ace-6.4.5+dfsg.orig/MPC/templates/vc7lib.mpt0000644000175000017500000000405013154167361016613 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release common_defines = WIN32 _WINDOWS configuration_type = 4 output_subdir = I386 Release { optimize = 3 defines = NDEBUG output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = s } Debug { optimize = debug_prj = 1 defines = _DEBUG output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = sd pdbc = 1 } Memcheck Release { optimize = 3 defines = NDEBUG output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = s BasicRuntimeChecks = 0 FixedBaseAddress = 1 } Memcheck Debug { optimize = debug_prj = 1 defines = _DEBUG output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = sd pdbc = 1 BasicRuntimeChecks = 0 FixedBaseAddress = 1 } MFC Release { optimize = 3 defines = NDEBUG output_dir = Static_MFC_Release intermediate_dir = Static_MFC_Release lib_modifier = mfcs use_mfc = 2 } MFC Debug { optimize = debug_prj = 1 defines = _DEBUG output_dir = Static_MFC_Debug intermediate_dir = Static_MFC_Debug lib_modifier = mfcsd pdbc = 1 use_mfc = 2 } ETS Release { optimize = 3 defines = NDEBUG output_dir = ETS_Release intermediate_dir = ETS_Release lib_modifier = s runtime_library = 2 GenerateMapFile = TRUE lit_libs += etsapi wsock32 } ETS Debug { optimize = defines = _DEBUG output_dir = ETS_Debug intermediate_dir = ETS_Debug lib_modifier = sd runtime_library = 3 pdbl = 1 pdbc = 1 GenerateMapFile = TRUE lit_libs += etsapi wsock32 } conditional_include "vcpartialmacros" conditional_include "user_vc7lib" ace-6.4.5+dfsg.orig/MPC/templates/cccommon.mpt0000644000175000017500000000067713154167361017236 0ustar tggtgg// -*- MPC -*- conditional_include "common" lib_prefix = lib_ext = .lib dll_ext = .dll exe_ext = .out configurations = Debug Release common_defines = rtti = 1 big_endian = windows_style = 1 Release { optimize = 1 output_dir = Release intermediate_dir = Release } Debug { optimize = defines = _DEBUG output_dir = Debug intermediate_dir = Debug lib_modifier = d } ace-6.4.5+dfsg.orig/MPC/templates/vc14lib.mpt0000644000175000017500000000016413154167361016673 0ustar tggtgg// -*- MPC -*- conditional_include "vc14platforms" conditional_include "vc1xlib" conditional_include "user_vc14lib" ace-6.4.5+dfsg.orig/MPC/templates/vc10.mpd0000644000175000017500000012217413154167361016166 0ustar tggtgg" encoding="<%encoding("utf-8")%>"?> <%foreach(platforms)%> <%foreach(configurations)%> <%configuration%> <%platform%> <%endfor%> <%endfor%> <%project_name%> {<%guid%>} <%project_name%> <%if(VCProjectVersion)%> <%VCProjectVersion%> <%endif%> <%if(WindowsTargetPlatformVersion)%> <%WindowsTargetPlatformVersion%> <%endif%> <%if(managed)%> ManagedCProj v<%TargetFrameworkVersion("4.0")%> <%else%> <%if(UseOfMFC)%>MFCProj<%else%><%platform("Win32")%>Proj<%endif%> <%endif%> <%foreach(platforms)%> <%foreach(configurations)%> <%if(type_is_dynamic)%>DynamicLibrary<%else%><%if(type_is_static && staticname)%>StaticLibrary<%else%><%if(custom_only)%>Utility<%else%><%if(makeoutput)%>Makefile<%else%>Application<%endif%><%endif%><%endif%><%endif%> <%if(UseOfMFC)%> <%UseOfMFC%> <%endif%> <%if(UseOfATL)%> <%UseOfATL%> <%endif%> <%if(debug_prj)%>true<%else%>false<%endif%> <%if(unicode)%> Unicode <%else%> NotSet <%endif%> <%if(PlatformToolset)%> <%PlatformToolset%> <%endif%> <%if(managed)%> <%if(compares(managed,0))%>false<%else%><%if(compares(managed,1))%>true<%else%><%if(compares(managed,2))%>Pure<%else%><%if(compares(managed,3))%>Safe<%else%><%managed%><%endif%><%endif%><%endif%><%endif%> <%endif%> <%if(WholeProgramOptimization)%> <%WholeProgramOptimization%> <%endif%> <%endfor%> <%endfor%> <%foreach(platforms)%> <%foreach(configurations)%> <%endfor%> <%endfor%> <_ProjectFileVersion><%prversion%> <%foreach(platforms)%> <%foreach(configurations)%> <%if(makeoutput)%> <%if(debug_prj)%>true<%else%>false<%endif%> <%if(unicode)%>UNICODE;_UNICODE;<%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%><%dynamicflag%>;<%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%><%staticflag%>;<%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%><%pch_define%>;<%endfor%><%endif%><%foreach(defines common_defines cpu_defines platform_defines macros)%><%define%><%fornotlast(";")%><%endfor%><%if(macro_for_lib_modifier)%><%if(use_lib_modifier)%><%if(lib_modifier)%>;MPC_LIB_MODIFIER="<%lib_modifier%>"<%endif%><%endif%><%endif%>;$(NMakePreprocessorDefinitions) <%if(includes)%> <%foreach(includes)%><%include%>;<%endfor%>$(NMakeIncludeSearchPath) <%endif%> <%if(ForcedIncludeFiles)%> <%ForcedIncludeFiles%>;%(NMakeForcedIncludes) <%endif%> <%if(NMakeAssemblySearchPath)%> <%NMakeAssemblySearchPath%>;$(NMakeAssemblySearchPath) <%endif%> <%if(NMakeForcedUsingAssemblies)%> <%NMakeForcedUsingAssemblies%>;$(NMakeForcedUsingAssemblies) <%endif%> <%if(compile_flags)%> <%compile_flags%> <%endif%> <%makebuild%> CONF=<%configuration%> <%makerebuild%> CONF=<%configuration%> <%makeclean%> CONF=<%configuration%> <%makeoutput%> <%else%> <%if(type_is_dynamic)%><%if(dllout)%><%dllout%>\<%else%><%libout%>\<%endif%><%else%><%if(type_is_static)%><%libout%>\<%else%><%if(exeout)%><%exeout%>\<%if(windows_style)%><%output_dir("Debug")%>\<%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%>\<%else%><%output_dir(".")%>\<%endif%><%endif%><%endif%><%endif%> <%if(intdir)%><%intdir%>\<%else%><%intermediate_dir%>\<%noextension(project_file)%>\<%if(output_subdir)%><%output_subdir%>\<%endif%><%endif%> <%if(debug_prj)%>true<%else%>false<%endif%> <%if(type_is_dynamic)%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%else%><%if(type_is_static)%><%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%else%><%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%endif%><%endif%> <%marker(debug_cmd_args)%> <%if(debug_work_dir)%><%debug_work_dir%><%else%>$(OutDir)<%endif%> <%if(type_is_static && staticname && !compares(lib_ext, .lib))%> <%lib_ext%> <%else%> <%if(!type_is_static)%> <%if(exename || sharedname || staticname)%> <%if(type_is_dynamic && !compares(dll_ext, .dll))%> <%dll_ext%> <%else%> <%if(!type_is_dynamic && !compares(exe_ext, .exe))%> <%exe_ext%> <%endif%> <%endif%> <%endif%> <%endif%> <%endif%> AllRules.ruleset <%if(ReferencePath)%> <%ReferencePath%>;$(ReferencePath) <%endif%> <%if(EmbedManifest || keyfile)%> <%if(EmbedManifest)%><%EmbedManifest%><%else%><%if(keyfile)%>false<%endif%><%endif%> <%endif%> <%if(keyfile)%> <%keyfile%> <%endif%> <%endif%> <%endfor%> <%endfor%> <%foreach(platforms)%> <%foreach(configurations)%> <%if(prebuild)%> <%eval(prebuild)%> <%endif%> <%foreach(midl_defines)%><%midl_define%>;<%endfor%>%(PreprocessorDefinitions) <%foreach(midl_includes)%><%midl_include%>;<%endfor%>%(AdditionalIncludeDirectories) <%platform%> <%if(midl_notlb)%> false <%endif%> %(Filename).tlb %(Filename).h %(Filename)_i.c %(Filename)_p.c <%if(midl_flags)%> <%midl_flags%> <%endif%> <%optimize("Disabled")%> <%if(InlineFunctionExpansion)%> <%InlineFunctionExpansion%> <%endif%> <%if(EnableIntrinsicFunctions)%> true <%endif%> <%if(FavorSizeOrSpeed)%> <%FavorSizeOrSpeed%> <%endif%> <%if(OmitFramePointers)%> <%OmitFramePointers%> <%endif%> <%if(EnableFiberSafeOptimizations)%> true <%endif%> <%if(includes)%> <%foreach(includes)%><%include%>;<%endfor%>%(AdditionalIncludeDirectories) <%endif%> <%if(AdditionalUsingDirectories)%> <%AdditionalUsingDirectories%>;%(AdditionalUsingDirectories) <%endif%> <%if(unicode)%>UNICODE;_UNICODE;<%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%><%dynamicflag%>;<%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%><%staticflag%>;<%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%><%pch_define%>;<%endfor%><%endif%><%foreach(defines common_defines cpu_defines platform_defines macros)%><%define%><%fornotlast(";")%><%endfor%><%if(macro_for_lib_modifier)%><%if(use_lib_modifier)%><%if(lib_modifier)%>;MPC_LIB_MODIFIER="<%lib_modifier%>"<%endif%><%endif%><%endif%>;%(PreprocessorDefinitions) <%if(IgnoreStandardIncludePath)%> true <%endif%> <%if(PreprocessToFile)%> true <%endif%> <%if(PreprocessSuppressLineNumbers)%> true <%endif%> <%if(PreprocessKeepComments)%> true <%endif%> <%if(StringPooling)%> true <%endif%> <%if(!optimize)%> <%MinimalRebuild("true")%> <%endif%> <%if(SmallerTypeCheck)%> true <%endif%> <%if(runtime_library)%><%runtime_library%><%else%><%if(type_is_static || need_staticflags)%><%if(debug_prj)%>MultiThreadedDebug<%else%>MultiThreaded<%endif%><%else%><%if(debug_prj)%>MultiThreadedDebugDLL<%else%>MultiThreadedDLL<%endif%><%endif%><%endif%> <%if(StructMemberAlignment)%> <%StructMemberAlignment%> <%endif%> <%if(BufferSecurityCheck)%> <%BufferSecurityCheck%> <%endif%> <%if(FunctionLevelLinking)%> true <%endif%> <%if(EnableEnhancedInstructionSet)%> <%EnableEnhancedInstructionSet%> <%endif%> <%if(FloatingPointModel)%> <%FloatingPointModel%> <%endif%> <%if(FloatingPointExceptions)%> true <%endif%> <%if(DisableLanguageExtensions)%> true <%endif%> <%if(TreatWChar_tAsBuiltInType)%> <%TreatWChar_tAsBuiltInType%> <%endif%> <%if(ForceConformanceInForLoopScope)%> <%ForceConformanceInForLoopScope%> <%endif%> <%RuntimeTypeInfo("true")%> <%if(OpenMP || OpenMPSupport)%> true <%endif%> <%if(pch_header)%> Use <%if(pch_header_output)%> <%pch_header_output%> <%endif%> <%pch_header%> <%endif%> <%if(ExceptionHandling)%> <%ExceptionHandling%> <%endif%> <%if(!managed)%> <%if(BasicRuntimeChecks)%> <%BasicRuntimeChecks%> <%endif%> <%endif%> <%if(ExpandAttributedSource)%> true <%endif%> <%if(AssemblerOutput)%> AssemblyCode <%endif%> <%if(AssemblerListingLocation)%> <%AssemblerListingLocation%> <%endif%> <%if(ObjectFileName)%> <%ObjectFileName%> <%endif%> <%if(pdbc)%> <%if(type_is_static)%><%libout%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb<%else%><%intermediate_dir%>\<%noextension(project_file)%><%if(output_subdir)%>\<%output_subdir%><%endif%>\<%endif%> <%else%> <%if(ProgramDataBaseFileName)%> <%ProgramDataBaseFileName%> <%endif%> <%endif%> <%if(GenerateXMLDocumentationFiles)%> <%GenerateXMLDocumentationFiles%> <%endif%> <%if(XMLDocumentationFileName)%> <%XMLDocumentationFileName%> <%endif%> <%if(BrowseInformation)%> true <%endif%> <%if(BrowseInformationFile)%> <%BrowseInformationFile%> <%endif%> <%if(compares(warning_level, all))%>EnableAllWarnings<%else%><%if(compares(warning_level, none) || compares(warning_level, 0))%>TurnOffAllWarnings<%else%>Level<%warning_level("3")%><%endif%><%endif%> <%if(!managed && debug_format)%> <%debug_format%> <%endif%> <%if(CallingConvention)%> <%CallingConvention%> <%endif%> <%if(CompileAs)%> <%CompileAs%> <%endif%> <%if(DisableSpecificWarnings)%> <%foreach(DisableSpecificWarnings)%><%DisableSpecificWarning%>;<%endfor%>%(DisableSpecificWarnings) <%endif%> <%if(ForcedIncludeFiles)%> <%ForcedIncludeFiles%>;%(ForcedIncludeFiles) <%endif%> <%if(ForcedUsingFiles)%> <%ForcedUsingFiles%>;%(ForcedUsingFiles) <%endif%> <%if(ShowIncludes)%> true <%endif%> <%if(UndefinePreprocessorDefinitions)%> <%UndefinePreprocessorDefinitions%>;%(UndefinePreprocessorDefinitions) <%endif%> <%if(UndefineAllPreprocessorDefinitions)%> true <%endif%> <%if(UseFullPaths)%> true <%endif%> <%if(OmitDefaultLibName)%> true <%endif%> <%if(ErrorReporting)%> <%ErrorReporting%> <%endif%> <%if(TreatSpecificWarningsAsErrors)%> <%TreatSpecificWarningsAsErrors%>;%(TreatSpecificWarningsAsErrors) <%endif%> <%if(WarnAsError)%> true <%endif%> <%if(CompileAsManaged)%> <%CompileAsManaged%> <%endif%> <%if(MultiProcessorCompilation)%> <%MultiProcessorCompilation%> <%endif%> <%if(UseUnicodeForAssemblerListing)%> true <%endif%> <%if(compile_flags)%> <%compile_flags%> %(AdditionalOptions) <%endif%> <%if(unicode)%>UNICODE;_UNICODE;<%endif%><%foreach(defines macros platform_defines)%><%define%>;<%endfor%>%(PreprocessorDefinitions) <%culture("1033")%> <%foreach(includes)%><%include%>;<%endfor%>%(AdditionalIncludeDirectories) <%if(prelink)%> <%eval(prelink)%> <%endif%> <%if(type_is_static)%> <%if(staticname)%> <%libout%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%> <%endif%> %(AdditionalDependencies) <%foreach(libpaths)%><%libpath%>;<%endfor%>%(AdditionalLibraryDirectories) <%if(SuppressStartupBanner)%> true <%endif%> <%if(ModuleDefinitionFile)%> <%ModuleDefinitionFile%> <%endif%> <%if(IgnoreAllDefaultLibraries)%> true <%endif%> <%if(ignore_default_library_names)%> <%foreach(ignore_default_library_names)%><%ignore_default_library_name%>;<%endfor%>%(IgnoreSpecificDefaultLibraries) <%endif%> <%if(ExportNamedFunctions)%> <%ExportNamedFunctions%> <%endif%> <%if(ForceSymbolReferences)%> <%ForceSymbolReferences%> <%endif%> <%if(UseUnicodeResponseFiles)%> true <%endif%> <%if(ErrorReporting)%> <%ErrorReporting%> <%endif%> <%if(TreatLibWarningAsErrors)%> true <%endif%> <%if(TargetMachine)%> <%endif%> <%if(SubSystem)%> <%SubSystem%> <%endif%> <%if(MinimumRequiredVersion)%> <%MinimumRequiredVersion%> <%endif%> <%if(RemoveObjects)%> <%RemoveObjects%>;%(RemoveObjects) <%endif%> <%if(Verbose)%> true <%endif%> <%if(LinkTimeCodeGeneration)%> true <%endif%> <%if(lib_options)%> <%lib_options%> %(AdditionalOptions) <%endif%> <%else%> <%if(SubSystem)%> <%SubSystem%> <%endif%> <%if(GenerateDebugInformation)%> <%GenerateDebugInformation%> <%endif%> <%foreach(reverse(libs))%><%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>;<%endfor%><%foreach(reverse(lit_libs))%><%lit_lib%>.lib;<%endfor%><%foreach(reverse(pure_libs))%> <%pure_lib%>;<%endfor%>%(AdditionalDependencies) <%if(exename || sharedname || staticname)%> $(OutDir)<%if(type_is_dynamic)%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%else%><%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%><%endif%> <%endif%> <%if(ShowProgress)%> <%ShowProgress%> <%endif%> <%if(win_version)%> <%win_version%> <%endif%> <%if(SuppressStartupBanner)%> true <%endif%> <%if(RegisterOutput)%> true <%endif%> <%if(PerUserRedirection)%> true <%endif%> <%foreach(libpaths)%><%libpath%>;<%endfor%>%(AdditionalLibraryDirectories) <%if(LinkStatus)%> true <%endif%> <%if(PreventDllBinding)%> true <%endif%> <%if(LinkWarnAsError)%> true <%endif%> <%if(ForceFileOutput)%> <%ForceFileOutput%> <%endif%> <%if(CreateHotPatchableImage)%> <%CreateHotPatchableImage%> <%endif%> <%if(SpecifySectionAttributes)%> <%SpecifySectionAttributes%> <%endif%> <%if(IgnoreAllDefaultLibraries)%> true <%endif%> <%if(ignore_default_library_names)%> <%foreach(ignore_default_library_names)%><%ignore_default_library_name%>;<%endfor%>%(IgnoreSpecificDefaultLibraries) <%endif%> <%if(ModuleDefinitionFile)%> <%ModuleDefinitionFile%> <%else%> <%foreach(uniq(source_files))%> <%if(ends_with(source_file,\.def))%> <%source_file%> <%endif%> <%endfor%> <%endif%> <%if(AddModuleNamesToAssembly)%> <%AddModuleNamesToAssembly%>;%(AddModuleNamesToAssembly) <%endif%> <%if(EmbedManagedResourceFile)%> <%EmbedManagedResourceFile%>;%(EmbedManagedResourceFile) <%endif%> <%if(ForceSymbolReferences)%> <%ForceSymbolReferences%>;%(ForceSymbolReferences) <%endif%> <%if(DelayLoadDLLs)%> <%DelayLoadDLLs%>;%(DelayLoadDLLs) <%endif%> <%if(AssemblyLinkResource)%> <%AssemblyLinkResource%>;%(AssemblyLinkResource) <%endif%> <%if(GenerateManifest)%> true <%endif%> <%if(ManifestFile)%> <%ManifestFile%> <%endif%> <%if(AdditionalManifestDependencies)%> <%AdditionalManifestDependencies%>;%(AdditionalManifestDependencies) <%endif%> <%if(AllowIsolation)%> true <%endif%> <%if(AllowIsolation)%> true <%endif%> <%if(UACExecutionLevel)%> <%UACExecutionLevel%> <%endif%> <%if(UACUIAccess)%> true <%endif%> <%if(pdbl)%> <%if(sharedname)%> $(OutDir)\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%if(use_pdb_modifier)%><%pdb_modifier%><%endif%>.pdb <%else%> <%if(exename)%> $(OutDir)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%if(use_pdb_modifier)%><%pdb_modifier%><%endif%>.pdb <%endif%> <%endif%> <%endif%> <%if(StripPrivateSymbols)%> <%StripPrivateSymbols%> <%endif%> <%if(GenerateMapFile)%> true <%endif%> <%if(MapFileName)%> <%MapFileName%> <%endif%> <%if(MapExports)%> true <%endif%> <%if(AssemblyDebug)%> true <%endif%> <%if(MinimumRequiredVersion)%> <%MinimumRequiredVersion%> <%endif%> <%if(HeapReserveSize)%> <%HeapReserveSize%> <%endif%> <%if(HeapCommitSize)%> <%HeapCommitSize%> <%endif%> <%if(StackReserveSize)%> <%StackReserveSize%> <%endif%> <%if(StackCommitSize)%> <%StackCommitSize%> <%endif%> <%if(LargeAddressAware)%> true <%endif%> <%if(TerminalServerAware)%> true <%endif%> <%if(SwapRunFromCD)%> true <%endif%> <%if(SwapRunFromNet)%> true <%endif%> <%if(Driver)%> <%Driver%> <%endif%> <%if(OptimizeReferences || optimize)%> true <%endif%> <%if(EnableCOMDATFolding || optimize)%> true <%endif%> <%if(FunctionOrder)%> <%FunctionOrder%> <%endif%> <%if(ProfileGuidedDatabase)%> <%ProfileGuidedDatabase%> <%endif%> <%if(LinkTimeCodeGeneration)%> <%LinkTimeCodeGeneration%> <%endif%> <%if(MidlCommandFile)%> <%MidlCommandFile%> <%endif%> <%if(IgnoreEmbeddedIDL)%> true <%endif%> <%if(MergedIDLBaseFileName)%> <%MergedIDLBaseFileName%> <%endif%> <%if(TypeLibraryFile)%> <%TypeLibraryFile%> <%endif%> <%if(TypeLibraryResourceID)%> <%TypeLibraryResourceID%> <%endif%> <%if(unicode && unicode_mfc_entry && exename && source_files)%> <%unicode_mfc_entry%> <%else%> <%if(EntryPointSymbol)%> <%EntryPointSymbol%> <%endif%> <%endif%> <%if(NoEntryPoint)%> true <%endif%> <%if(SetChecksum)%> true <%endif%> <%if(BaseAddress)%> <%BaseAddress%> <%endif%> <%if(RandomizedBaseAddress)%> true <%endif%> <%if(FixedBaseAddress)%> true <%endif%> <%if(DataExecutionPrevention)%> true <%endif%> <%if(TurnOffAssemblyGeneration)%> true <%endif%> <%if(SupportUnloadOfDelayLoadedDLL)%> true <%endif%> <%if(SupportNobindOfDelayLoadedDLL)%> true <%endif%> <%if(ImportLibrary)%> <%ImportLibrary%> <%else%> <%if(type_is_dynamic && sharedname)%> <%libout%>\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%> <%endif%> <%endif%> <%if(MergeSections)%> <%MergeSections%> <%endif%> <%if(TargetMachine)%> <%endif%> <%if(Profile)%> true <%endif%> <%if(CLRThreadAttribute)%> <%CLRThreadAttribute%> <%endif%> <%if(CLRImageType)%> <%CLRImageType%> <%endif%> <%if(KeyFile)%> <%KeyFile%> <%endif%> <%if(KeyContainer)%> <%KeyContainer%> <%endif%> <%if(DelaySign)%> true <%endif%> <%if(CLRUnmanagedCodeCheck)%> true <%endif%> <%if(LinkErrorReporting)%> <%LinkErrorReporting%> <%endif%> <%if(SectionAlignment)%> <%SectionAlignment%> <%endif%> <%if(CLRSupportLastError)%> <%CLRSupportLastError%> <%endif%> <%if(ImageHasSafeExceptionHandlers)%> <%ImageHasSafeExceptionHandlers%> <%endif%> <%if(!source_files)%> /noentry<%if(link_options)%> <%link_options%><%endif%><%if(release_link_options && !debug_prj)%> <%release_link_options%><%endif%> %(AdditionalOptions) <%else%> <%if(link_options || release_link_options && !debug_prj)%> <%link_options%><%if(release_link_options && !debug_prj)%> <%release_link_options%><%endif%> %(AdditionalOptions) <%endif%> <%endif%> <%endif%> <%if(postbuild)%> <%eval(postbuild)%> <%endif%> <%endfor%> <%endfor%> <%if(after && add_references)%> <%endif%> <%foreach(AssemblyReferences)%> <%endfor%> <%foreach(comreferences)%> <%lc(comreference->guid)%> <%comreference->majorver("1")%> <%comreference->minorver("0")%> <%comreference->lcid("0")%> <%comreference->wrapper("tlbimp")%> <%comreference->isolated("false")%> <%if(comreference->copylocal)%> <%comreference->copylocal%> <%endif%> <%if(comreference->refout)%> <%comreference->refout%> <%endif%> <%if(comreference->clsa)%> <%comreference->clsa%> <%endif%> <%endfor%> <%if(exename || sharedname || staticname)%> <%if(source_files)%> <%if(pch_source)%> <%foreach(platforms)%> <%foreach(configurations)%> Create <%endfor%> <%endfor%> <%endif%> <%foreach(uniq(source_files))%> <%if(ends_with(source_file,\.def))%> <%else%> <%if(ends_with(source_file,\.[io]dl))%> <%else%> <%if(flag_overrides(source_file, buildflags) || flag_overrides(source_file, no_pch) || flag_overrides(source_file, managed))%> <%foreach(platforms)%> <%foreach(configurations)%> <%if(flag_overrides(source_file, no_pch))%> NotUsing <%endif%> <%if(flag_overrides(source_file, buildflags))%> <%flag_overrides(source_file, buildflags)%> %(AdditionalOptions) <%endif%> <%if(flag_overrides(source_file, managed))%> Default <%if(compares(flag_overrides(source_file, managed),0))%>false<%else%><%if(compares(flag_overrides(source_file, managed),1))%>true<%else%><%if(compares(flag_overrides(source_file, managed),2))%>Pure<%else%><%if(compares(flag_overrides(source_file, managed),3))%>Safe<%else%><%flag_overrides(source_file, managed)%><%endif%><%endif%><%endif%><%endif%> <%if(!ExceptionHandling || compares(ExceptionHandling, 'Sync'))%> Async <%endif%> <%endif%> <%endfor%> <%endfor%> <%endif%> <%if(duplicate_index(source_file))%> $(IntDir)\%(Filename)<%duplicate_index(source_file)%>.obj <%endif%> <%endif%> <%endif%> <%endfor%> <%endif%> <%endif%> <%if(template_files)%> <%foreach(uniq(template_files))%> <%foreach(platforms)%> <%foreach(configurations)%> true <%endfor%> <%endfor%> <%endfor%> <%endif%> <%if(header_files)%> <%foreach(uniq(header_files))%> <%endfor%> <%endif%> <%foreach(custom_types)%> <%if(custom_type->input_files)%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> <%foreach(platforms)%> <%foreach(configurations)%> <%if(custom_type->libpath)%>setlocal PATH=%PATH%;<%custom_type->libpath%> <%endif%><%if(flag_overrides(custom_type->input_file, gendir))%>if not exist <%flag_overrides(custom_type->input_file, gendir)%> mkdir <%flag_overrides(custom_type->input_file, gendir)%> <%endif%><%foreach(custom_type->input_file->commands)%><%if(custom_type->input_file->command->gdir)%>if not exist <%custom_type->input_file->command->gdir%> mkdir <%custom_type->input_file->command->gdir%> <%endif%><%endfor%><%if(custom_type->input_file->commands)%><%foreach(custom_type->input_file->commands)%>cmd /c "<%custom_type->input_file->command%> <%custom_type->input_file->command->flags%> "<%custom_type->input_file%>"<%if(custom_type->input_file->command->outopt)%> <%custom_type->input_file->command->outopt%> "<%custom_type->input_file->command->outfile%>""<%endif%><%fornotlast(" && ")%><%endfor%><%else%>cmd /c "<%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%>"<%custom_type->input_file%>" <%custom_type->output_option%><%foreach(custom_type->input_file->output_files)%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>"<%endfor%><%else%>"<%custom_type->input_file%>"<%endif%><%endif%>"<%if(flag_overrides(custom_type->input_file, postcommand))%><%foreach(custom_type->input_file)%> && <%flag_overrides(custom_type->input_file, postcommand)%><%endfor%><%else%><%if(custom_type->postcommand)%><%foreach(custom_type->input_file)%> && <%custom_type->postcommand%><%endfor%><%endif%><%endif%><%if(pch_header)%><%if(custom_type->pch_postrule)%><%foreach(custom_type->input_file->source_output_files)%> && echo #include "<%pch_header%>" > temporary.src && type "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>" >> temporary.src && move /y temporary.src "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>"<%endfor%><%endif%><%endif%><%if(custom_type->libpath)%> endlocal<%endif%> Invoking "<%if(custom_type->input_file->commands)%><%foreach(custom_type->input_file->commands)%><%custom_type->input_file->command%><%fornotlast(" and ")%><%endfor%><%else%><%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%><%endif%> on <%custom_type->input_file%>" <%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(";")%><%endfor%> <%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies || (!need_staticflags && (flag_overrides(custom_type->input_file, dependent_libs) || custom_type->dependent_libs)))%> <%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%dep%><%if(!has_extension(dep))%><%exe_ext%><%endif%><%fornotlast(";")%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%><%custom_type->dependent%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%><%fornotlast(";")%><%endfor%><%endif%><%endif%><%foreach(custom_type->input_file->dependencies)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent)%>;<%else%><%fornotfirst(";")%><%endif%><%custom_type->input_file->dependencie%><%endfor%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%>;<%else%><%fornotfirst(";")%><%endif%><%dirname(dep_lib)%>\<%libname_prefix%><%basename(dep_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%>;<%else%><%fornotfirst(";")%><%endif%><%dirname(custom_type->dependent_lib)%>\<%libname_prefix%><%basename(custom_type->dependent_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%endfor%><%endif%><%endif%><%endif%> <%endif%> <%endfor%> <%endfor%> <%else%> <%foreach(platforms)%> <%foreach(configurations)%> true <%endfor%> <%endfor%> <%endif%> <%endfor%> <%endif%> <%endfor%> <%if(inline_files)%> <%foreach(uniq(inline_files))%> <%endfor%> <%endif%> <%if(documentation_files)%> <%foreach(uniq(documentation_files))%> Document <%foreach(platforms)%> <%foreach(configurations)%> true <%endfor%> <%endfor%> <%endfor%> <%endif%> <%if(resource_files && !type_is_static)%> <%foreach(uniq(resource_files))%> <<%if(ends_with(resource_file,\.rc))%>ResourceCompile<%else%>None<%endif%> Include="<%resource_file%>" /> <%endfor%> <%endif%> ace-6.4.5+dfsg.orig/MPC/templates/wix.mpt0000644000175000017500000000031213154167361016231 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release conditional_include "vc10platforms" Release { } Debug { debug_prj = 1 } ace-6.4.5+dfsg.orig/MPC/templates/vc8java.mpt0000644000175000017500000000050713154167361016772 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release platforms = AnyCPU trace = 1 Release { optimize = 1 output_dir = Release } Debug { optimize = output_dir = Debug } conditional_include "user_vc8java" ace-6.4.5+dfsg.orig/MPC/templates/ccexe.mpt0000644000175000017500000000011713154167361016514 0ustar tggtgg// -*- MPC -*- conditional_include "cccommon" conditional_include "user_ccexe" ace-6.4.5+dfsg.orig/MPC/templates/vc6dspdllexe.mpt0000644000175000017500000000353713154167361020041 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "vccommon" conditional_include "windowscommon" type_description = "Console Application" type_code = 0x0103 configurations = Debug Release common_defines = WIN32 _CONSOLE subsystem = console Release { use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /GX /MD /GR defines = NDEBUG compile_flags_removed = /YX output_dir = Release intermediate_dir = Release debug_switch = } Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy defines = _DEBUG compile_flags_removed = /YX intermediate_dir = Debug lib_modifier = d pdbl = 1 pdbc = 1 } MFC Release { subsystem = windows use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /GX /MD /GR common_defines = WIN32 _WINDOWS defines = NDEBUG _AFXDLL compile_flags_removed = /YX output_dir = MFC_Release intermediate_dir = MFC_Release debug_switch = lib_modifier = mfc use_mfc = 2 unicode_mfc_entry = wWinMainCRTStartup } MFC Debug { subsystem = windows use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy common_defines = WIN32 _WINDOWS defines = _DEBUG _AFXDLL compile_flags_removed = /YX intermediate_dir = MFC_Debug output_dir = MFC_Debug lib_modifier = mfcd pdbl = 1 pdbc = 1 use_mfc = 2 unicode_mfc_entry = wWinMainCRTStartup } conditional_include "vcpartialmacros" conditional_include "user_vc6dspdllexe" ace-6.4.5+dfsg.orig/MPC/templates/bmake.mpd0000644000175000017500000004453513154167361016500 0ustar tggtgg#---------------------------------------------------------------------------- # Borland Makefile # # This file was automatically generated by MPC. Any changes made directly to # this file will be lost the next time it is generated. # #---------------------------------------------------------------------------- <%marker(top)%> <%foreach(configurations)%> !ifdef <%normalize(uc(configuration))%> OCFLAGS32 = <%if(optimize)%>-O1<%else%><%if(debug_prj)%>-v -y -Od -vi- -k<%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%> OCFLAGS32C = <%if(optimize)%>-O1<%else%><%if(debug_prj)%>-Od -vi- <%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%> OCFLAGS64 = <%if(optimize)%>-O3<%else%><%if(debug_prj)%>-g -O0 <%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%> CFG_DIR = <%intermediate_dir%>\\ LIBMODIFIER = <%if(use_lib_modifier)%><%lib_modifier%><%endif%> EXEMODIFIER = <%if(use_exe_modifier)%><%lib_modifier%><%endif%> <%if(type_is_static)%> STATIC_CFG = 1 <%endif%> <%if(type_is_static || need_staticflags)%> <%if(staticflags)%> STATIC_FLAGS =<%foreach(staticflags)%> -D<%staticflag%><%endfor%> <%endif%> <%else%> <%if(dynamicflags)%> DYN_FLAGS =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%> <%endif%> <%endif%> <%if(postlinkrmext)%> POSTLINKRM = <%postlinkrmext%> <%endif%> <%if(exename)%> EXEOUTPUTDIR = <%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug")%><%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%>\\ <%endif%> !else <%endfor%> !error You must define one of these valid configurations:<%foreach(configurations)%> <%normalize(uc(configuration))%><%endfor%> <%foreach(configurations)%> !endif <%endfor%> !ifdef UNICODE UC_CFLAGS = <%unicode_flags%> UNICODE_DIR = Unicode\\ UC_MAIN = w ULIBMODIFIER = <%unicode_lib_modifier%> UEXEMODIFIER = <%unicode_lib_modifier%> !endif !ifdef CODEGUARD CG_CFLAGS = -vG CG_LIB = cg32.lib !endif DLL_EXT = <%dll_ext%> EXE_EXT = <%exe_ext%> <%if(build64bit)%> STARTUP_BITS = 64 CC64 = <%cc64%> LINK64 = <%link64%> LIB_EXT = <%lib64_ext%> OBJ_EXT = <%obj64_ext%> THREADFLAGS = <%thrflags64%> BINARYFLAGS = <%binaryflags64%> LINKERPATHS = -L"$(BDS)\lib\win64\debug" -L"$(BDS)\lib\win64\release" WARNFLAGS64 = <%warnflags64%> <%else%> LINK32 = <%link32%> STARTUP_BITS = 32 !ifdef CLASSIC CC32 = <%cc32%> LIB_EXT = <%lib32_ext%> OBJ_EXT = <%obj32_ext%> THREADFLAGS = <%thrflags32%> BINARYFLAGS = <%binaryflags32%> LINKERPATHS = -L"$(BDS)\lib\win32\release" -L"$(BDS)\lib\win32\debug" WARNFLAGS32 = <%warnflags32%> !else CC32C = <%cc32c%> LIB_EXT = <%lib32c_ext%> OBJ_EXT = <%obj32c_ext%> THREADFLAGS = <%thrflags32c%> BINARYFLAGS = <%binaryflags32c%> LINKERPATHS = -L"$(BDS)\lib\win32c\debug" -L"$(BDS)\lib\win32c\release" WARNFLAGS32C = <%warnflags32c%> !endif <%endif%> RC = <%rc%> TLIB32 = <%tlib32%> DLLFLAGS = <%dllflags%> LIBFLAGS = <%libflags%> EXEFLAGS = <%exeflags%> CCFLAGS = <%ccflags%><%if(type_is_binary)%> $(BINARYFLAGS)<%endif%><%if(compile_flags)%> <%compile_flags%><%endif%> <%if(use_vcl)%> STARTUP_LETTER = <%if(exename)%>w<%else%><%startup_letter%><%endif%> <%else%> VCL_CFLAGS = -D_NO_VCL STARTUP_LETTER = <%startup_letter%> <%endif%> STARTUP_OBJ = c0$(STARTUP_LETTER)$(STARTUP_BITS)$(UC_MAIN)$(OBJ_EXT) INTERMEDIATE = $(CFG_DIR)$(UNICODE_DIR)<%noextension(project_name)%> <%if(exename)%> NAME = <%exename%>$(EXEMODIFIER) <%else%> <%if(sharedname)%> NAME = <%libname_prefix%><%sharedname%>$(LIBMODIFIER)$(ULIBMODIFIER) <%else%> <%if(staticname)%> NAME = <%libname_prefix%><%staticname%>$(LIBMODIFIER)$(ULIBMODIFIER) <%endif%> <%endif%> <%endif%> CPPDIR = <%cppdir%> RESDIR = <%rcdir%> <%if(exename || sharedname || staticname)%> OBJFILES = \ <%foreach(source_files)%> "$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)"<%fornotlast(" \\")%> <%endfor%> <%endif%> <%if(libpaths)%> LFLAGS = \ $(LINKERPATHS) \ <%if(debug_prj)%> -v \ -r \ <%endif%> <%if(linkflags)%> <%linkflags%> \ <%endif%> <%if(StackReserveSize)%> /S:<%StackReserveSize%> \ <%endif%> <%if(StackCommitSize)%> /Sc:<%StackCommitSize%> \ <%endif%> <%if(!optimize)%> -v<%if(libpaths)%> \<%endif%> <%endif%> <%foreach(libpaths)%> -L"<%libpath%>" -j"<%libpath%>"<%fornotlast(" \\")%> <%endfor%> <%endif%> <%if(build64bit)%> COMMON_LIBS = <%common_libs%> <%common64_libs%> <%else%> !ifdef CLASSIC COMMON_LIBS = $(CG_LIB) <%common_libs%> <%common32_libs%> !else COMMON_LIBS = <%common_libs%> <%common32c_libs%> !endif <%endif%> LIBFILES = \ <%foreach(reverse(libs))%> <%libname_prefix%><%lib%>$(LIBMODIFIER)$(ULIBMODIFIER)$(LIB_EXT) \ <%endfor%> <%foreach(reverse(lit_libs))%> <%lit_lib%>$(LIB_EXT) \ <%endfor%> <%foreach(reverse(pure_libs))%> <%pure_lib%> \ <%endfor%> $(COMMON_LIBS) <%if(resource_files)%> !ifndef STATIC_CFG RESOURCE = \ <%foreach(resource_files)%> $(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res<%fornotlast(" \\")%> <%endfor%> <%if(includes)%> RC_FLAGS = \ <%foreach(includes)%> -i"<%include%>"<%fornotlast(" \\")%> <%endfor%> <%endif%> !endif <%endif%> <%if(!build64bit)%> <%if(pch_header)%> # Borland bcc32 precompiled headers can choke on some header files. # Set NO_USE_PCH if you do not want to use precompiled headers. !ifndef NO_USE_PCH !ifdef CLASSIC PCH_CFLAGS = \ <%foreach(pch_defines)%> -D<%pch_define%> \ <%endfor%> -H=$(INTERMEDIATE)\<%noextension(project_name)%>.csm -Hh=<%pch_header%> !endif !endif <%endif%> <%endif%> <%if(build64bit)%> COMMON_FLAGS = \ <%foreach(common64_flags)%> <%common64_flag%><%fornotlast(" \\")%> <%endfor%> <%else%> !ifdef CLASSIC COMMON_FLAGS = \ <%foreach(common32_flags)%> <%common32_flag%><%fornotlast(" \\")%> <%endfor%> !else COMMON_FLAGS = \ <%foreach(common32c_flags)%> <%common32c_flag%><%fornotlast(" \\")%> <%endfor%> !endif <%endif%> <%if(build64bit)%> <%if(common64_defines)%> COMMON_DEFINES = \ <%foreach(common64_defines)%> -D<%common64_define%><%fornotlast(" \\")%> <%endfor%> <%endif%> <%else%> !ifdef CLASSIC <%if(common32_defines)%> COMMON_DEFINES = \ <%foreach(common32_defines)%> -D<%common32_define%><%fornotlast(" \\")%> <%endfor%> <%endif%> !else <%if(common32c_defines)%> COMMON_DEFINES = \ <%foreach(common32c_defines)%> -D<%common32c_define%><%fornotlast(" \\")%> <%endfor%> <%endif%> !endif <%endif%> CFLAGS = \ <%foreach(cflags)%> <%cflag%> \ <%endfor%> $(COMMON_FLAGS) \ $(COMMON_DEFINES) \ <%foreach(macros common_defines)%> -D<%macro%> \ <%endfor%> <%foreach(includes)%> -I"<%include%>" \ <%endfor%> $(PCH_CFLAGS) \ $(VCL_CFLAGS) <%marker(macros)%> <%if(exename)%> OUTPUTDIR = $(EXEOUTPUTDIR) all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(EXE_EXT)<%if(postbuild)%> __postbuild__<%endif%> $(OUTPUTDIR)$(NAME)$(EXE_EXT): $(OBJFILES) $(RESOURCE) @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)" <%if(prelink)%> <%eval(prelink)%> <%endif%> <%if(build64bit)%> $(LINK64) @&&! <%else%> $(LINK32) @&&! <%endif%> $(EXEFLAGS) $(LFLAGS) $(STARTUP_OBJ) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(EXE_EXT),, $(LIBFILES),, $(RESOURCE) ! <%endif%> <%if(sharedname)%> !ifndef STATIC_CFG OUTPUTDIR = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\\ all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(DLL_EXT)<%if(postbuild)%> __postbuild__<%endif%> $(OUTPUTDIR)$(NAME)$(DLL_EXT): $(OBJFILES) $(RESOURCE) @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)" <%if(prelink)%> <%eval(prelink)%> <%endif%> <%if(build64bit)%> $(LINK64) @&&! <%else%> $(LINK32) @&&! <%endif%> $(DLLFLAGS) $(LFLAGS) $(STARTUP_OBJ) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(DLL_EXT),, $(LIBFILES),, $(RESOURCE) ! !endif <%endif%> <%if(staticname)%> !ifdef STATIC_CFG OUTPUTDIR = <%libout%>\\ all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(LIB_EXT)<%if(postbuild)%> __postbuild__<%endif%> $(OUTPUTDIR)$(NAME)$(LIB_EXT): $(OBJFILES) @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)" $(TLIB32) $(LIBFLAGS) $(OUTPUTDIR)$(NAME)$(LIB_EXT) @&&! + $(**: = &^ + ) ! !endif <%endif%> <%if(!exename && !sharedname && !staticname)%> all:<%if(prebuild)%> __prebuild__<%endif%><%if(postbuild)%> __postbuild__<%endif%> @-rem <%endif%> <%if(custom_types)%> GENERATED_DIRTY =<%foreach(custom_types)%><%foreach(custom_type->input_files)%><%if(custom_type->input_file->output_files)%><%foreach(custom_type->input_file->output_files)%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%endfor%><%endif%><%endfor%><%endfor%> <%foreach(custom_types)%> <%if(custom_type->libpath)%> PATH = $(PATH);<%custom_type->libpath%> <%endif%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> <%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(" ")%><%endfor%>: <%custom_type->input_file%><%if(custom_type->input_file->dependencies)%> <%custom_type->input_file->dependencies%><%endif%> <%if(flag_overrides(custom_type->input_file, gendir))%> @if not exist "<%flag_overrides(custom_type->input_file, gendir)%>" mkdir "<%flag_overrides(custom_type->input_file, gendir)%>" <%endif%> <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%><%custom_type->input_file%> <%custom_type->output_option%> $@<%else%><%custom_type->input_file%><%endif%> <%if(flag_overrides(custom_type->input_file, postcommand))%> <%foreach(custom_type->input_file)%> <%flag_overrides(custom_type->input_file, postcommand)%> <%endfor%> <%else%> <%if(custom_type->postcommand)%> <%foreach(custom_type->input_file)%> <%custom_type->postcommand%> <%endfor%> <%endif%> <%endif%> <%if(pch_header)%> <%if(custom_type->pch_postrule)%> <%foreach(custom_type->input_file->source_output_files)%> @echo \#include "<%pch_header%>" > temporary.src @type <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temporary.src @move /y temporary.src <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> <%endfor%> <%endif%> <%endif%> <%endif%> <%endfor%> <%endfor%> <%if(exename || sharedname || staticname)%> <%if(source_files)%> $(OBJFILES): $(GENERATED_DIRTY) <%else%> all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%> <%endif%> <%else%> all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%> <%endif%> <%endif%> generated: $(GENERATED_DIRTY) @-rem .path$(OBJ_EXT) = $(INTERMEDIATE) .path.cpp = $(CPPDIR) <%if(build64bit)%> .cpp$(OBJ_EXT): @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $< <%else%> !ifdef CLASSIC .cpp$(OBJ_EXT): @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $< !else .cpp$(OBJ_EXT): @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(CC32C) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) $< !endif <%endif%> .path.cxx = $(CPPDIR) <%if(build64bit)%> .cxx$(OBJ_EXT): @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $< <%else%> !ifdef CLASSIC .cxx$(OBJ_EXT): @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $< !else .cxx$(OBJ_EXT): @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(CC32C) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) $< !endif <%endif%> .path.cc = $(CPPDIR) <%if(build64bit)%> .cc$(OBJ_EXT): @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $< <%else%> !ifdef CLASSIC .cc$(OBJ_EXT): @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $< !else .cc$(OBJ_EXT): @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(CC32C) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) $< !endif <%endif%> .path.C = $(CPPDIR) <%if(build64bit)%> .C$(OBJ_EXT): @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $< <%else%> !ifdef CLASSIC .C$(OBJ_EXT): @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $< !else .C$(OBJ_EXT): @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(CC32C) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) $< !endif <%endif%> .path.c = $(CPPDIR) <%if(build64bit)%> .c$(OBJ_EXT): @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $< <%else%> !ifdef CLASSIC .c$(OBJ_EXT): @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $< !else .c$(OBJ_EXT): @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(CC32C) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) $< !endif <%endif%> <%foreach(source_files)%> <%if(transdir(source_file) || flag_overrides(source_file, buildflags))%> "$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)": @if not exist "$(INTERMEDIATE)\<%transdir(source_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(source_file)%>" <%if(build64bit)%> $(CC64) <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) <%source_file%> <%else%> !ifdef CLASSIC $(CC32) <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) <%source_file%> !else $(CC32C) <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) <%source_file%> !endif <%endif%> <%endif%> <%endfor%> <%if(resource_files)%> !ifndef STATIC_CFG .path.res = $(INTERMEDIATE) .path.rc = $(RESDIR) .rc.res: @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)" $(RC) $(RC_FLAGS) -fo$@ $< <%foreach(resource_files)%> <%if(transdir(resource_file))%> "$(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res": @if not exist "$(INTERMEDIATE)\<%transdir(resource_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(resource_file)%>" $(RC) -fo$@ <%resource_file%> <%endif%> <%endfor%> !endif <%endif%> clean: @if exist "$(INTERMEDIATE)" rmdir /s/q $(INTERMEDIATE) realclean: clean <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> <%foreach(custom_type->input_file->output_files)%> <%if(flag_overrides(custom_type->input_file, gendir))%> @del "<%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%>" 2>NUL <%else%> @del "<%custom_type->input_file->output_file%>" 2>NUL <%endif%> <%endfor%> <%endif%> <%endfor%> <%endfor%> <%if(exename)%> @del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" 2>NUL <%else%> <%if(sharedname)%> @del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" 2>NUL <%endif%> <%if(staticname)%> @del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" 2>NUL <%endif%> <%endif%> <%if(exename || sharedname || staticname)%> @del "$(OUTPUTDIR)$(NAME)$(POSTLINKRM)" 2>NUL <%endif%> <%if(postclean)%> -<%eval(postclean)%> <%endif%> <%if(prebuild)%> __prebuild__: @<%eval(prebuild)%> <%endif%> <%if(postbuild)%> __postbuild__: @<%eval(postbuild)%> <%endif%> <%marker(local)%> <%marker(bottom)%> ace-6.4.5+dfsg.orig/MPC/templates/makedll.mpt0000644000175000017500000002742713154167361017053 0ustar tggtgg// -*- MPC -*- // *********************************************************************** // The default compiler for the 'make' project type is gcc (provided by // the fill_value() method in MakeProjectCreator.pm). This can be // controlled by setting the compilers template variable. It may be // changed on the MPC command line via the -value_template option. // Additionally, each compiler has a default platform. The default // platform for gcc is linux. This too can be changed via the // -value_template option. Below are some examples. // // Use SunCC on the default platform (solaris): // mwc.pl -type make -value_template compilers=SunCC // Use the default compiler (gcc) on LynxOS: // mwc.pl -type make -value_template platforms=lynxos // Use HP-UX aCC on the default platform (HP-UX): // mwc.pl -type make -value_template compilers=aCC // *********************************************************************** conditional_include "common" conditional_include "unixcommon" configurations = Release obj_ext = .o res_ext = .res compile_flags = arflags = pchsupport = 1 targetoutdir = libopt = -l build64bit = 1 pchext = .gch versupport = 1 supports_include = 1 visibility = depgen_flags = cc = cc notparallel = 1 // *********************************************************************** // Configuration Section // *********************************************************************** Debug { lib_modifier = d genflags = -g } Release { optimize = 1 genflags = -O } // *********************************************************************** // Compiler Section // *********************************************************************** java { cc = javac cxx = javac ld = : obj_ext = .class output_option = compile_option = ar = jar arflags = cvf platforms = jvm } gcj { cc = gcj cxx = gcj pic = -fPIC shflags = -shared platforms = linux exe_linkflags = --main=<%main%> } cxx_tru64 { cxx = cxx clean = cxx_repository so_locations tempincopt = "-ptr " tempinc = cxx_repository platforms = tru64 pchcreate = "-nopch_messages -create_pch " pchuse = "-nopch_messages -use_pch " } cxx_vms { cxx = cxx arflags = r compilerflags = -ieee -names_as_is_short linkflags = -threads shflags = -shared -auto_symvec clean = cxx_repository tempinc = cxx_repository platforms = openvms } dmc { cc = dmc cxx = dmc dmclink = 1 ar = lib arflags = -c obj_ext = .obj platforms = dmc_win } gcc { cc = gcc cxx = g++ pic = -fPIC shflags = -shared platforms = linux pchcreate = "-o " pchnobj = 1 checkopt = -Wall -Wextra -pedantic -fsyntax-only visopt = -fvisibility=hidden -fvisibility-inlines-hidden profopt = -pg -DCOMPILER_PROFILING covopt = -fprofile-arcs -ftest-coverage -DCOMPILER_COVERAGE } arm_elf_gcc { cc = arm-elf-gcc cxx = arm-elf-g++ ar = arm-elf-ar arflags = rcs compilerflags = -isystem "$(SYSTEMDIR)/arm-elf/include" shflags = -shared platforms = nucleus pchcreate = "-o " pchnobj = 1 checkopt = -Wall -Wextra -pedantic -fsyntax-only visopt = -fvisibility=hidden -fvisibility-inlines-hidden profopt = -pg -DCOMPILER_PROFILING covopt = -fprofile-arcs -ftest-coverage -DCOMPILER_COVERAGE } arm_keil { cc = armcc cxx = armcc ar = armar ld = armlink libpathopt = "--userlibpath " link_lib_name = 1 arflags = -rcs compilerflags = --gnu -DKEIL platforms = cmsis_cortex_m4 } Intel { cxx = icpc pic = -fPIC shflags = -shared platforms = linux visopt = -fvisibility=hidden } SunCC { cxx = CC pic = -KPIC shflags = -G compilerflags64 = -xarch=v9 linkflags = -library=Cstd -library=Crun clean = SunWS_cache ir.out platforms = solaris pchcreate = -xpch=collect: pchuse = -xpch=use: pchstop = -xpchstop= pchext = .Cpch visopt = -xldscope=hidden } aCC { cxx = aCC pic = +Z shflags = -b platforms = hpux compilerflags = -AA -D_RWSTD_MULTI_THREAD +W336 compilerflags64 = +DA2.0W +DS2.0W linkflags = -Wl,+s linkflags64 = -Wl,-x -Wl,+h$(@F) -ldl pchcreate = "+hdr_create " pchuse = "+hdr_use " } xlC_r { cc = xlc_r cxx = xlC_r arflags64 += -X64 -rv compilerflags64 = -q64 platforms = aix pchcreate = -qgenpcomp= pchuse = -qusepcomp= } SGICC { cxx = CC pic = -KPIC shflags = -shared compilerflags64 = -64 linkflags = -Wl,-woff,84 clean = ii_files platforms = irix pchcreate = -LANG:create_pch= pchuse = -diag_suppress 3056 -LANG:use_pch= } wrsppc { cc = gcc$(CPUTYPE) cxx = g++$(CPUTYPE) cputype = ppc cpu = PPC604 ar = ar$(CPUTYPE) nm = nm$(CPUTYPE) compilerflags = -mlongcall checkopt = -Wall -Wextra -pedantic -fsyntax-only platforms = vxworks } wrspentium { cc = gcc$(CPUTYPE) cxx = g++$(CPUTYPE) cputype = pentium cpu = PENTIUM ar = ar$(CPUTYPE) nm = nm$(CPUTYPE) checkopt = -Wall -Wextra -pedantic -fsyntax-only platforms = vxworks } NCC { cxx = NCC pic = -KPIC platforms = tandem } ghsppc { cc = cc$(CXXINT)$(CPUTYPE) cxx = cx$(CXXINT)$(CPUTYPE) ar = cx$(CXXINT)$(CPUTYPE) cputype = ppc arflags = --one_instantiation_per_object -archive -o compilerflags = --new_style_casts --one_instantiation_per_object --exceptions --std --long_long platforms = integrity } // *********************************************************************** // Platform Section // *********************************************************************** jvm { versupport = lib_prefix = dll_ext = lib_ext = .jar } tru64 { shflags = -shared /usr/lib/libcxxstd.a ldlibs = -ltli -lrt extracppflags = -D__USE_STD_IOSTREAM -D_REENTRANT } openvms { // If you want to create shareable images, you can // set dll_ext to .exe using the -value_template option of MPC. versupport = lib_prefix = dll_ext = exe_ext = .exe ldlibs = -lpthread extracppflags = -D__USE_STD_IOSTREAM -D_REENTRANT } linux { gnumake = 1 ldlibs = -ldl $(subst lib,-l,$(sort $(basename $(notdir $(wildcard /usr/lib/librt.so /lib/librt.so))))) -lpthread extracppflags = -D_REENTRANT } nucleus { gnumake = 1 extracppflags = -mcpu=arm7tdmi -msoft-float -mthumb-interwork } cmsis_cortex_m4 { gnumake = 1 extracppflags = --cpu=Cortex-M4 } solaris { shflags = -G ldlibs = -lsocket -ldl -lnsl -lgen -lposix4 -lthread extracppflags = -D_REENTRANT } hpux { dll_ext = .sl ldlibs = -lxti -lrt -lpthread -ldld extracppflags = -D_REENTRANT } aix { dll_ext = ldlibs = -ldl -lpthread extracppflags = -D_REENTRANT supports_include = } irix { ldlibs = -lsocket -lgen -lpthread } lynxos { dll_ext = extracppflags = -D__NO_INCLUDE_WARN__ -mthreads -mminimal-toc } macosx { ranlib = 1 dll_ext = .dylib shflags = -shared -dynamic } // I'm not sure if this is even useful anymore. macos { dld = libtool ranlib = 1 dll_ext = .dylib shflags = -dynamic ldlibs = -lcc_dynamic -lstdc++ -lSystem -ldl } unixware { ldlibs = -lsocket -ldl -lnsl -lgen -lposix4 -lthread extracppflags = -D_REENTRANT } qnx { ldlibs = -lsocket extracppflags = -D__GCC_BUILTIN } vxworks { versupport = dll_ext = exe_ext = .out specialscript = "for i in $$3; do for j in $$4; do i=`echo $$i | sed sa\^-laa`;[ -r \"$$j/lib$$i.a\" ] && libs=\"$$libs $$j/lib$$i.a\" && break;done;done;$$1 $$2 $$libs | munch | grep -v \\.cpp > $$6" prelinktarget = __ctordtor.c prelinktargetobj = __ctordtor$(OBJEXT) clean = __ctordtor$(OBJEXT) ldlibs = -L$(WIND_BASE)/target/lib/$(CPUTYPE)/$(CPU)/common$(CPU_SPECIFIC) -larch extracppflags = -nostdlib -I$(WIND_BASE)/target/h ld = ld$(CPUTYPE) linkflags = -X -r } vxworks_rtp { versupport = dll_ext = exe_ext = .vxe extracppflags = -I$(WIND_BASE)/target/usr/h -I$(WIND_BASE)/target/usr/h/wrn/coreip -mrtp ldlibs = -ldl linkflags = -L$(WIND_BASE)/target/usr/lib/$(CPUTYPE)/$(CPU)/common } cygwin { gnumake = 1 versupport = dll_ext = .dll exe_ext = .exe rc = windres res_ext = .o pic = depgen_flags = -t make } // MinGW compiler with the MSYS shell, make, etc. mingw_msys { versupport = lib_prefix = dll_ext = .dll lib_ext = .lib exe_ext = .exe ldlibs = -lwsock32 -lnetapi32 rc = rc pic = depgen_flags = -t make gnumake = 1 } // MinGW compiler with the built-in Windows shell and native make // (not cygwin or MSYS; GNUWin32 is recommended) // This also needs core utils (cat, cp, rm) from GNUWin32 // http://gnuwin32.sourceforge.net/packages/coreutils.htm // because the makefiles use forward slashes in their arguments. mingw { versupport = lib_prefix = dll_ext = .dll lib_ext = .lib exe_ext = .exe ldlibs = -lwsock32 -lnetapi32 rc = windres res_ext = .o devnull = nul makedir = mkdir move = move /y testdirstart = if not exist testdirend = pic = slash = \\ depgen_flags = -t make echo_outer_quote = expanded_variable_assignment = 1 gnumake = 1 } dmc_win { versupport = lib_prefix = dll_ext = .dll lib_ext = .lib exe_ext = .exe ldlibs = wsock32+kernel32 rc = rc devnull = nul delete = del /f/s/q type = type copy = copy /y makedir = mkdir move = move /y supports_include = testdirstart = if not exist testdirend = depgen_flags = -t make } tandem { shflags = -shared -all ldlibs = -lsocket -ldl -lnsl -lgen -lthread extracppflags = -D_REENTRANT } // For Integrity, the following should be set as environment variables, on // the make command line or within a verbatim section in your mpc file. // // OS_DIR The full path to your BSP installation. // BSP The BSP name (ex. sim800). // integrity { cxxint = int versupport = dll_ext = ldlibs = -lshm_client -lnet -lsocket -lposix extraarflags = -bsp $(BSP) -os_dir $(OS_DIR) --one_instantiation_per_object extracppflags = -integrate -dynamic -bsp $(BSP) -os_dir $(OS_DIR) --one_instantiation_per_object -non_shared -Uvector specialscript = "echo Kernel > $$6; echo Filename DynamicDownload >> $$6;echo EndKernel >> $$6; echo AddressSpace >> $$6;echo Filename $$5 >> $$6;echo Language C++ >> $$6;echo Library libINTEGRITY.so >> $$6;echo Library libc.so >> $$6;echo Library libscxx_e.so >> $$6;echo Task Initial >> $$6;echo StackLength 0x8000 >> $$6;echo EndTask >> $$6;echo EndAddressSpace >> $$6" prelinktarget = $(notdir $(BIN).int) postlinkbinary = $(MV) $(BIN) $(BIN).tmp && intex -bsp $(BSP) -os_dir $(OS_DIR) -intfile $(notdir $(BIN).int) -o $(BIN) $(BIN).tmp } conditional_include "user_makedll" ace-6.4.5+dfsg.orig/MPC/templates/vc12lib.mpt0000644000175000017500000000016413154167361016671 0ustar tggtgg// -*- MPC -*- conditional_include "vc12platforms" conditional_include "vc1xlib" conditional_include "user_vc12lib" ace-6.4.5+dfsg.orig/MPC/templates/vc11lib.mpt0000644000175000017500000000016413154167361016670 0ustar tggtgg// -*- MPC -*- conditional_include "vc11platforms" conditional_include "vc1xlib" conditional_include "user_vc11lib" ace-6.4.5+dfsg.orig/MPC/templates/sleexe.mpt0000644000175000017500000000016313154167361016713 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" conditional_include "user_sleexe" ace-6.4.5+dfsg.orig/MPC/templates/vc7csharp.mpd0000644000175000017500000001512613154167361017313 0ustar tggtgg " SchemaVersion = "<%schemaversion("2.0")%>" ProjectGuid = "{<%guid%>}" <%if(scc)%> SccProjectName = "<%scc%>" SccLocalPath = "<%scc%>" SccAuxPath = "<%scc%>" SccProvider = "<%scc%>" <%endif%> > <%foreach(ico_files)%> <%if(forfirst)%> ApplicationIcon = "<%ico_file%>" <%endif%> <%endfor%> <%else%> ApplicationIcon = "" <%endif%> AssemblyKeyContainerName = "" <%if(exename || sharedname || staticname)%> AssemblyName = "<%if(exename)%><%exename%><%else%><%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%endif%>" <%endif%> AssemblyOriginatorKeyFile = "<%keyfile%>" DefaultClientScript = "JScript" DefaultHTMLPageLayout = "Grid" DefaultTargetSchema = "IE50" DelaySign = "<%DelaySign("false")%>" <%if(exename || sharedname || staticname)%> OutputType = "<%if(exename)%><%if(winapp)%>Win<%endif%>Exe<%else%>Library<%endif%>" <%endif%> PreBuildEvent = "<%if(prebuild)%><%eval(prebuild)%><%endif%>" PostBuildEvent = "<%if(postbuild)%><%eval(postbuild)%><%endif%>" RootNamespace = "" RunPostBuildEvent = "OnBuildSuccess" StartupObject = "<%startupobject%>" <%if(libpaths)%> ReferencePath = "<%foreach(libpaths)%><%libpath%><%fornotlast(";")%><%endfor%>" <%endif%> > <%foreach(configurations)%> " NoStdLib = "false" NoWarn = "" Optimize = "<%if(optimize)%>true<%else%>false<%endif%>" <%if(exename || sharedname || staticname)%> OutputPath = "<%if(exename)%><%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir%><%endif%><%else%>.\<%output_dir%><%endif%><%else%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%output_dir%><%endif%>\" <%endif%> RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" WarningLevel = "4" /> <%endfor%> <%foreach(libs)%> <%endfor%> <%foreach(lib, lit_libs pure_libs)%> <%endfor%> <%foreach(source_files)%> <%endfor%> <%foreach(resx_files)%> <%endfor%> <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> input_file->output_files)%> BuildAction = "Compile" Generator = "<%if(custom_type->libpath)%>PATH=%PATH%;<%custom_type->libpath%> <%endif%><%if(flag_overrides(custom_type->input_file, gendir))%>if not exist <%flag_overrides(custom_type->input_file, gendir)%> mkdir <%flag_overrides(custom_type->input_file, gendir)%> <%endif%><%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%><%custom_type->input_file%> <%custom_type->output_option%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_files)%><%else%><%custom_type->input_file->output_files%><%endif%><%else%><%custom_type->input_file%><%endif%><%if(flag_overrides(custom_type->input_file, postcommand))%><%foreach(custom_type->input_file)%>&&<%flag_overrides(custom_type->input_file, postcommand)%><%endfor%><%else%><%if(custom_type->postcommand)%><%foreach(custom_type->input_file)%>&&<%custom_type->postcommand%><%endfor%><%endif%><%endif%>" <%else%> BuildAction = "None" <%endif%> /> <%endfor%> <%endfor%> <%foreach(aspx_files)%> <%endfor%> <%foreach(ico_files)%> <%endfor%> <%foreach(config_files)%> <%endfor%> <%foreach(documentation_files)%> <%endfor%> ace-6.4.5+dfsg.orig/MPC/templates/vc8vb.mpd0000644000175000017500000001363313154167361016444 0ustar tggtgg ToolsVersion="<%toolsversion%>"<%endif%>> Local <%prversion("8.0.50727")%> <%schemaversion("2.0")%> {<%guid%>} <%foreach(configurations)%> <%if(forfirst)%> <%configuration%> <%endif%> <%endfor%> <%foreach(platforms)%> <%if(forfirst)%> <%platform%> <%endif%> <%endfor%> <%if(ico_files)%> <%foreach(ico_files)%> <%if(forfirst)%> <%ico_file%> <%endif%> <%endfor%> <%endif%> <%if(exename || sharedname || staticname)%> <%if(exename)%><%exename%><%else%><%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%endif%> <%endif%> JScript Grid IE50 <%DelaySign("false")%> Binary <%if(exename || sharedname || staticname)%> <%if(exename)%><%if(winapp)%>Win<%endif%>Exe<%else%>Library<%endif%> <%endif%> On Off <%startupobject%> <%foreach(libpaths)%><%libpath%><%fornotlast(";")%><%endfor%> <%foreach(platforms)%> <%foreach(configurations)%> <%if(exename || sharedname || staticname)%> <%if(exename)%><%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir%><%endif%><%else%>.\<%output_dir%><%endif%><%else%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%output_dir%><%endif%>\ <%endif%> 285212672 <%foreach(defines common_defines macros)%><%define%><%fornotlast(";")%><%endfor%> <%if(optimize)%>false<%else%>true<%endif%> <%if(trace)%>true<%else%>false<%endif%> true <%if(optimize)%>true<%else%>false<%endif%> <%RegisterForComInterop("false")%> false false <%warning_level("1")%> 42016,42017,42018,42019,42032 <%endfor%> <%endfor%> <%if(after)%> <%endif%> <%foreach(libs)%> <%libname_prefix%><%lib%> <%endfor%> <%foreach(lib, sort(lit_libs pure_libs))%> <%lib%> <%endfor%> <%foreach(source_files)%> <%if(flag_overrides(source_file, subtype))%><%flag_overrides(source_file, subtype)%><%else%>Code<%endif%> <%endfor%> <%foreach(resx_files)%> <%endfor%> <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> <%if(custom_type->libpath)%>PATH=%PATH%;<%custom_type->libpath%> <%endif%><%if(flag_overrides(custom_type->input_file, gendir))%>if not exist <%flag_overrides(custom_type->input_file, gendir)%> mkdir <%flag_overrides(custom_type->input_file, gendir)%> <%endif%><%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%><%custom_type->input_file%> <%custom_type->output_option%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_files)%><%else%><%custom_type->input_file->output_files%><%endif%><%else%><%custom_type->input_file%><%endif%><%if(flag_overrides(custom_type->input_file, postcommand))%><%foreach(custom_type->input_file)%>&&<%flag_overrides(custom_type->input_file, postcommand)%><%endfor%><%else%><%if(custom_type->postcommand)%><%foreach(custom_type->input_file)%>&&<%custom_type->postcommand%><%endfor%><%endif%><%endif%> <%else%> <%endif%> <%endfor%> <%endfor%> <%foreach(ico_files)%> <%endfor%> <%foreach(config_files)%> <%endfor%> <%foreach(documentation_files)%> <%endfor%> <%if(prebuild)%><%eval(prebuild)%><%endif%> <%if(postbuild)%><%eval(postbuild)%><%endif%> ace-6.4.5+dfsg.orig/MPC/templates/bmakedll.mpt0000644000175000017500000000155113154167361017203 0ustar tggtgg// -*- MPC -*- conditional_include "bmakecommon" configurations = Debug Release "Static Debug" "Static Release" startup_letter = d Release { optimize = 1 defines = NDEBUG intermediate_dir = Release lib_modifier = _br postlinkrmext = .tds } Debug { optimize = debug_prj = 1 defines = _DEBUG intermediate_dir = Debug lib_modifier = _bd postlinkrmext = .tds } Static Release { optimize = 1 defines = NDEBUG output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = _bsr type_is_static = 1 } Static Debug { optimize = debug_prj = 1 defines = _DEBUG output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = _bsd type_is_static = 1 } conditional_include "user_bmakedll" ace-6.4.5+dfsg.orig/MPC/templates/cclib.mpt0000644000175000017500000000011713154167361016501 0ustar tggtgg// -*- MPC -*- conditional_include "cccommon" conditional_include "user_cclib" ace-6.4.5+dfsg.orig/MPC/templates/vs2017exe.mpt0000644000175000017500000000017013154167361017070 0ustar tggtgg// -*- MPC -*- conditional_include "vs2017platforms" conditional_include "vc1xexe" conditional_include "user_vs2017exe" ace-6.4.5+dfsg.orig/MPC/templates/vc6.mpd0000644000175000017500000004024613154167361016112 0ustar tggtgg# Microsoft Developer Studio Project File - Name="<%project_name%>" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "<%platform("Win32")%> (<%platform_hardware("x86")%>) <%if(exename || sharedname || staticname)%><%if(type_is_static && staticname)%>Static Library" 0x0104<%else%><%type_description%>" <%type_code%><%endif%><%else%>Generic Project" 0x010a<%endif%> CFG=<%project_name%> - <%platform("Win32")%> <%default_configuration("Debug")%> !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE run the tool that generated this project file and specify the !MESSAGE nmake output type. You can then use the following command: !MESSAGE !MESSAGE NMAKE. !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE CFG="<%project_name%> - <%platform%> <%default_configuration%>" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE <%foreach(configurations)%> !MESSAGE "<%project_name%> - <%platform%> <%configuration%>" (based on "<%platform%> (<%platform_hardware%>) <%if(exename || sharedname || staticname)%><%if(type_is_static && staticname)%>Static Library<%else%><%type_description%><%endif%><%else%>Generic Project<%endif%>") <%endfor%> !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe <%foreach(configurations)%> !<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%platform%> <%configuration%>" # PROP Use_MFC <%use_mfc("0")%> # PROP Use_Debug_Libraries <%use_debug_libraries("1")%> <%if(exename)%> # PROP Output_Dir "<%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%>" <%endif%> <%if(type_is_static)%> # PROP Output_Dir "<%output_dir%>" <%endif%> <%if(type_is_dynamic)%> # PROP Output_Dir "<%libout%>" <%endif%> # PROP Intermediate_Dir "<%intermediate_dir%>\<%noextension(project_file)%>" <%if(type_is_dynamic)%> # PROP Ignore_Export_Lib 0 <%endif%> # PROP Target_Dir "" <%if(type_is_static)%> LINK32=link.exe -lib <%endif%> # ADD CPP /nologo <%if(optimize)%><%optimize_flags("/O2")%><%else%><%debug_flags("/Ob0")%><%endif%> <%compile_flags%><%foreach(DisableSpecificWarnings)%> /wd<%DisableSpecificWarning%><%endfor%><%if(pdbc)%> /Fd"<%if(type_is_static)%><%libout%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb<%else%><%intermediate_dir%>\<%noextension(project_file)%>/<%endif%>"<%endif%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines common_defines macros)%>/D <%define%> <%endfor%><%if(unicode)%>/D UNICODE /D _UNICODE <%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%>/D <%dynamicflag%> <%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%>/D <%staticflag%> <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%> <%endfor%><%if(pch_source)%>/Yu<%else%>/YX<%endif%>"<%pch_header%>" /Fp"<%intermediate_dir%>\<%noextension(project_file)%>\<%noextension(pch_header)%>.pch" <%endif%>/FD /c <%if(compile_flags_removed)%> # SUBTRACT CPP <%compile_flags_removed%> <%endif%> <%if(midl_includes)%># ADD MTL <%foreach(midl_includes)%>/I "<%midl_include%>" <%endfor%><%endif%> # ADD MTL <%foreach(defines)%>/D "<%define%>" <%endfor%><%if(unicode)%>/D UNICODE /D _UNICODE <%endif%><%foreach(midl_defines)%>/D "<%midl_define%>" <%endfor%><%midl_flags%> # ADD RSC /l 0x409<%foreach(defines macros)%> /d <%define%><%endfor%><%if(unicode)%> /d UNICODE /d _UNICODE<%endif%><%foreach(includes)%> /i "<%include%>"<%endfor%> BSC32=bscmake.exe # ADD BSC32 /nologo <%if(sharedname || staticname)%>/o"<%libout%>\<%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>.bsc"<%endif%> <%if(type_is_binary)%> LINK32=link.exe # ADD LINK32 <%systemlibs("advapi32.lib user32.lib")%><%if(link_options)%> <%link_options%><%endif%> /INCREMENTAL:<%incremental("NO")%> <%foreach(reverse(libs))%><%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%> <%endfor%><%foreach(reverse(lit_libs))%><%lit_lib%>.lib <%endfor%><%foreach(reverse(pure_libs))%><%pure_lib%> <%endfor%><%foreach(libpaths)%>/libpath:"<%libpath%>" <%endfor%>/nologo<%if(win_version)%> /version:<%win_version%><%endif%><%if(StackReserveSize)%> /stack:<%StackReserveSize%><%if(StackCommitSize)%>,<%StackCommitSize%><%endif%><%endif%> /subsystem:<%subsystem("windows")%><%if(pdbl)%><%if(sharedname)%> /pdb:"<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb"<%else%><%if(exename)%> /pdb:"<%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir%><%endif%><%else%><%output_dir%><%endif%>\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>.pdb"<%endif%><%endif%><%else%> /pdb:none<%endif%><%if(type_is_dynamic)%> /implib:"<%libout%>\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>" <%if(!source_files)%>/noentry <%endif%>/dll<%endif%> <%if(unicode && unicode_mfc_entry && exename && source_files)%>/entry:"<%unicode_mfc_entry%>" <%endif%><%debug_switch("/debug")%> /machine:<%machine("I386")%> /out:"<%if(sharedname)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%endif%><%if(exename)%><%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir%><%endif%><%else%><%output_dir%><%endif%>\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%><%endif%>" <%if(link_flags_removed)%> # SUBTRACT LINK32 <%link_flags_removed%> <%endif%> <%endif%> <%if(type_is_static)%> LIB32=link.exe -lib # ADD LIB32 /nologo /out:"<%libout%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>" <%endif%> <%if(postbuild)%> # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Cmds=<%eval(postbuild)%> # End Special Build Tool <%endif%> <%endfor%> !ENDIF # Begin Target <%foreach(configurations)%> # Name "<%project_name%> - <%platform%> <%configuration%>" <%endfor%> <%if(exename || sharedname || staticname)%> # Begin Group "Source Files" # PROP Default_Filter "<%foreach(ext, extensions(source_files))%><%ext%><%fornotlast(";")%><%endfor%>" <%if(pch_source)%> <%if(pch_header)%> # Begin Source File SOURCE="<%pch_source%>" # ADD CPP /Yc"<%pch_header%>" # End Source File <%endif%> <%endif%> <%if(grouped_source_files)%> <%foreach(sort(grouped_source_files))%> # Begin Group "<%grouped_source_file%>" # PROP Default_Filter "" <%foreach(grouped_source_file->files)%> # Begin Source File SOURCE="<%grouped_source_file->file%>" <%if(duplicate_index(grouped_source_file->file))%> <%foreach(configurations)%> !<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%platform%> <%configuration%>" # ADD CPP <%if(flag_overrides(grouped_source_file->file, buildflags))%><%flag_overrides(grouped_source_file->file, buildflags)%> <%endif%>/Fo"<%intermediate_dir%>\<%noextension(project_file)%>\<%basenoextension(grouped_source_file->file)%><%duplicate_index(grouped_source_file->file)%>.obj" <%if(flag_overrides(grouped_source_file->file, no_pch))%> # SUBTRACT CPP /YX /Yc /Yu <%endif%> <%endfor%> !ENDIF <%else%> <%if(flag_overrides(grouped_source_file->file, buildflags))%> # ADD CPP <%flag_overrides(grouped_source_file->file, buildflags)%> <%endif%> <%if(flag_overrides(grouped_source_file->file, no_pch))%> # SUBTRACT CPP /YX /Yc /Yu <%endif%> <%endif%> # End Source File <%endfor%> # End Group <%endfor%> <%else%> <%foreach(source_files)%> # Begin Source File SOURCE="<%source_file%>" <%if(duplicate_index(source_file))%> <%foreach(configurations)%> !<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%platform%> <%configuration%>" # ADD CPP <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>/Fo"<%intermediate_dir%>\<%noextension(project_file)%>\<%basenoextension(source_file)%><%duplicate_index(source_file)%>.obj" <%if(flag_overrides(source_file, no_pch))%> # SUBTRACT CPP /YX /Yc /Yu <%endif%> <%endfor%> !ENDIF <%else%> <%if(flag_overrides(source_file, buildflags))%> # ADD CPP <%flag_overrides(source_file, buildflags)%> <%endif%> <%if(flag_overrides(source_file, no_pch))%> # SUBTRACT CPP /YX /Yc /Yu <%endif%> <%endif%> # End Source File <%endfor%> <%endif%> # End Group <%endif%> <%if(header_files)%> # Begin Group "Header Files" # PROP Default_Filter "<%foreach(ext, extensions(header_files))%><%ext%><%fornotlast(";")%><%endfor%>" <%if(pch_header)%> # Begin Source File SOURCE="<%pch_header%>" # End Source File <%endif%> <%if(grouped_header_files)%> <%foreach(sort(grouped_header_files))%> # Begin Group "<%grouped_header_file%>" # PROP Default_Filter "" <%foreach(grouped_header_file->files)%> # Begin Source File SOURCE="<%grouped_header_file->file%>" # End Source File <%endfor%> # End Group <%endfor%> <%else%> <%foreach(header_files)%> # Begin Source File SOURCE="<%header_file%>" # End Source File <%endfor%> <%endif%> # End Group <%endif%> <%if(inline_files)%> # Begin Group "Inline Files" # PROP Default_Filter "<%foreach(ext, extensions(inline_files))%><%ext%><%fornotlast(";")%><%endfor%>" <%if(grouped_inline_files)%> <%foreach(sort(grouped_inline_files))%> # Begin Group "<%grouped_inline_file%>" # PROP Default_Filter "" <%foreach(grouped_inline_file->files)%> # Begin Source File SOURCE="<%grouped_inline_file->file%>" # End Source File <%endfor%> # End Group <%endfor%> <%else%> <%foreach(inline_files)%> # Begin Source File SOURCE="<%inline_file%>" # End Source File <%endfor%> <%endif%> # End Group <%endif%> <%if(template_files)%> # Begin Group "Template Files" # PROP Default_Filter "" <%if(grouped_template_files)%> <%foreach(sort(grouped_template_files))%> # Begin Group "<%grouped_template_file%>" # PROP Default_Filter "" <%foreach(grouped_template_file->files)%> # Begin Source File SOURCE="<%grouped_template_file->file%>" # PROP Exclude_From_Build 1 # End Source File <%endfor%> # End Group <%endfor%> <%else%> <%foreach(template_files)%> # Begin Source File SOURCE="<%template_file%>" # PROP Exclude_From_Build 1 # End Source File <%endfor%> <%endif%> # End Group <%endif%> <%if(documentation_files)%> # Begin Group "Documentation" # PROP Default_Filter "" <%if(grouped_documentation_files)%> <%foreach(sort(grouped_documentation_files))%> # Begin Group "<%grouped_documentation_file%>" # PROP Default_Filter "" <%foreach(grouped_documentation_file->files)%> # Begin Source File SOURCE="<%grouped_documentation_file->file%>" # End Source File <%endfor%> # End Group <%endfor%> <%else%> <%foreach(documentation_files)%> # Begin Source File SOURCE="<%documentation_file%>" # End Source File <%endfor%> <%endif%> # End Group <%endif%> <%if(resource_files && !type_is_static)%> # Begin Group "Resource Files" # PROP Default_Filter "rc;ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" <%if(grouped_resource_files)%> <%foreach(sort(grouped_resource_files))%> # Begin Group "<%grouped_resource_file%>" # PROP Default_Filter "" <%foreach(grouped_resource_file->files)%> # Begin Source File SOURCE="<%grouped_resource_file->file%>" # End Source File <%endfor%> # End Group <%endfor%> <%else%> <%foreach(resource_files)%> # Begin Source File SOURCE="<%resource_file%>" # End Source File <%endfor%> <%endif%> # End Group <%endif%> <%foreach(custom_types)%> <%if(custom_type->input_files)%> # Begin Group "<%ucw(custom_type)%>" # PROP Default_Filter "<%foreach(custom_type->inputexts)%><%custom_type->inputext%><%fornotlast(";")%><%endfor%>" <%foreach(custom_type->input_files)%> # Begin Source File SOURCE="<%custom_type->input_file%>" <%if(custom_type->input_file->output_files)%> <%foreach(configurations)%> !<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%platform%> <%configuration%>" <%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies || (!need_staticflags && (flag_overrides(custom_type->input_file, dependent_libs) || custom_type->dependent_libs)))%> USERDEP__<%basenoextension(custom_type->input_file)%>=<%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%>"<%dep%><%if(!has_extension(dep))%><%exe_ext%><%endif%>"<%fornotlast(" ")%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%>"<%custom_type->dependent%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%>"<%fornotlast(" ")%><%endfor%><%endif%><%endif%><%foreach(custom_type->input_file->dependencies)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent)%> <%else%><%fornotfirst(" ")%><%endif%>"<%custom_type->input_file->dependencie%>"<%endfor%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%> <%else%><%fornotfirst(" ")%><%endif%>"<%dirname(dep_lib)%>\<%libname_prefix%><%basename(dep_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%>"<%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%> <%else%><%fornotfirst(" ")%><%endif%>"<%dirname(custom_type->dependent_lib)%>\<%libname_prefix%><%basename(custom_type->dependent_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%>"<%endfor%><%endif%><%endif%><%endif%> <%endif%> # PROP Ignore_Default_Tool 1 # Begin Custom Build - Invoking <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> on $(InputPath) InputPath="<%custom_type->input_file%>" BuildCmds= \ <%if(custom_type->libpath)%> PATH=%PATH%;<%custom_type->libpath%> \ <%endif%> <%if(flag_overrides(custom_type->input_file, gendir))%> mkdir <%flag_overrides(custom_type->input_file, gendir)%> 2> nul \ <%endif%> <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%>$(InputPath) <%custom_type->output_option%><%foreach(custom_type->input_file->output_files)%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>"<%endfor%><%else%>$(InputPath)<%endif%> \ <%if(flag_overrides(custom_type->input_file, postcommand))%> <%foreach(custom_type->input_file)%> <%flag_overrides(custom_type->input_file, postcommand)%> \ <%endfor%> <%else%> <%if(custom_type->postcommand)%> <%foreach(custom_type->input_file)%> <%custom_type->postcommand%> \ <%endfor%> <%endif%> <%endif%> <%if(pch_header)%> <%if(custom_type->pch_postrule)%> <%foreach(custom_type->input_file->source_output_files)%> echo #include "<%pch_header%>" > temporary.src \ type "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>" >> temporary.src \ move /y temporary.src "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>" <%endfor%> <%endif%> <%endif%> <%foreach(custom_type->input_file->output_files)%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(BuildCmds) <%endfor%> # End Custom Build <%endfor%> !ENDIF <%else%> # PROP Exclude_From_Build 1 <%endif%> # End Source File <%endfor%> # End Group <%endif%> <%endfor%> # End Target # End Project ace-6.4.5+dfsg.orig/MPC/templates/vs2017lib.mpt0000644000175000017500000000017013154167361017055 0ustar tggtgg// -*- MPC -*- conditional_include "vs2017platforms" conditional_include "vc1xlib" conditional_include "user_vs2017lib" ace-6.4.5+dfsg.orig/MPC/templates/bmakedllexe.mpt0000644000175000017500000000167513154167361017714 0ustar tggtgg// -*- MPC -*- conditional_include "bmakecommon" configurations = Debug Release "Static Debug" "Static Release" startup_letter = x Release { optimize = 1 defines = NDEBUG output_dir = Release intermediate_dir = Release lib_modifier = _br postlinkrmext = .tds } Debug { optimize = debug_prj = 1 defines = _DEBUG intermediate_dir = Debug lib_modifier = _bd postlinkrmext = .tds } Static Release { optimize = 1 defines = NDEBUG output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = _bsr postlinkrmext = .tds type_is_static = 1 } Static Debug { optimize = debug_prj = 1 defines = _DEBUG output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = _bsd postlinkrmext = .tds type_is_static = 1 } conditional_include "user_bmakedllexe" ace-6.4.5+dfsg.orig/MPC/templates/vccommon.mpt0000644000175000017500000000033613154167361017251 0ustar tggtgg// -*- MPC -*- // NOTE: This is really only common to vc6 and should remain that way. The // file is poorly named. -- Chad Elliott 9/23/2005 midl_defines = midl_flags = /nologo /mktyplib203 /win32 midl_includes = ace-6.4.5+dfsg.orig/MPC/templates/vc14libexe.mpt0000644000175000017500000000017213154167361017374 0ustar tggtgg// -*- MPC -*- conditional_include "vc14platforms" conditional_include "vc1xlibexe" conditional_include "user_vc14libexe" ace-6.4.5+dfsg.orig/MPC/templates/ghslib.mpt0000644000175000017500000000012213154167361016671 0ustar tggtgg// -*- MPC -*- conditional_include "ghscommon" conditional_include "user_ghslib" ace-6.4.5+dfsg.orig/MPC/templates/automakedll.mpt0000644000175000017500000000025713154167361017734 0ustar tggtgg// -*- MPC -*- conditional_include "common" lib_prefix = lib lib_ext = .la dll_ext = .la exe_ext = linkflags = includedir = conditional_include "user_automakedll" ace-6.4.5+dfsg.orig/MPC/templates/vc8.mpd0000644000175000017500000010435513154167361016116 0ustar tggtgg" encoding="<%encoding("Windows-1252")%>"?> " Version="<%vcversion%>" Name="<%project_name%>" ProjectGUID="{<%guid%>}" RootNamespace="<%project_name%>" Keyword="<%if(UseOfMFC)%>MFCProj<%else%><%platform("Win32")%>Proj<%endif%>" SignManifests="true" > <%foreach(platforms)%> <%endfor%> <%foreach(platforms)%> <%foreach(configurations)%> <%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%><%endif%><%endif%>" IntermediateDirectory="<%intermediate_dir%>\<%noextension(project_file)%><%if(output_subdir)%>\<%output_subdir%><%endif%>" <%if(type_is_static && staticname)%> ConfigurationType="4" <%else%> <%if(custom_only)%> ConfigurationType="10" <%else%> ConfigurationType="<%ConfigurationType%>" <%endif%> <%endif%> <%if(UseOfATL)%> UseOfATL="<%UseOfATL%>" <%endif%> <%if(UseOfMFC)%> UseOfMFC="<%UseOfMFC%>" <%endif%> <%if(unicode)%> CharacterSet="<%charset("1")%>" <%else%> CharacterSet="<%charset("0")%>" <%endif%> <%if(managed)%> ManagedExtensions="<%managed%>" <%endif%> > <%if(makeoutput)%> <%else%> CommandLine="<%eval(prebuild)%>" <%endif%> /> <%if(!custom_only)%> <%endfor%>" <%if(midl_notlb)%> GenerateTypeLibrary="false" <%endif%> TypeLibraryName="$(InputName).tlb" HeaderFileName="$(InputName).h" InterfaceIdentifierFileName="$(InputName)_i.c" ProxyFileName="$(InputName)_p.c" /> AdditionalOptions="<%compile_flags%>" <%endif%> Optimization="<%optimize("0")%>" <%if(InlineFunctionExpansion)%> InlineFunctionExpansion="<%InlineFunctionExpansion%>" <%endif%> <%if(EnableIntrinsicFunctions)%> EnableIntrinsicFunctions="<%EnableIntrinsicFunctions%>" <%endif%> <%if(FavorSizeOrSpeed)%> FavorSizeOrSpeed="<%FavorSizeOrSpeed%>" <%endif%> <%if(OmitFramePointers)%> OmitFramePointers="<%OmitFramePointers%>" <%endif%> <%if(EnableFiberSafeOptimizations)%> EnableFiberSafeOptimizations="<%EnableFiberSafeOptimizations%>" <%endif%> <%if(WholeProgramOptimization)%> WholeProgramOptimization="<%WholeProgramOptimization%>" <%endif%> <%if(includes)%> AdditionalIncludeDirectories="<%foreach(includes)%><%include%><%fornotlast(",")%><%endfor%>" <%endif%> <%if(AdditionalUsingDirectories)%> AdditionalUsingDirectories="<%AdditionalUsingDirectories%>" <%endif%> PreprocessorDefinitions="<%if(unicode)%>UNICODE;_UNICODE;<%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%><%dynamicflag%>;<%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%><%staticflag%>;<%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%><%pch_define%>;<%endfor%><%endif%><%foreach(defines common_defines cpu_defines platform_defines macros)%><%define%><%fornotlast(";")%><%endfor%><%if(macro_for_lib_modifier)%><%if(use_lib_modifier)%><%if(lib_modifier)%>;MPC_LIB_MODIFIER=\"<%lib_modifier%>\"<%endif%><%endif%><%endif%>" <%if(IgnoreStandardIncludePath)%> IgnoreStandardIncludePath="<%IgnoreStandardIncludePath%>" <%endif%> <%if(GeneratePreprocessedFile)%> GeneratePreprocessedFile="<%GeneratePreprocessedFile%>" <%endif%> <%if(KeepComments)%> KeepComments="<%KeepComments%>" <%endif%> <%if(StringPooling)%> StringPooling="<%StringPooling%>" <%endif%> <%if(!optimize)%> MinimalRebuild="<%MinimalRebuild("true")%>" <%endif%> <%if(ExceptionHandling)%> ExceptionHandling="<%ExceptionHandling%>" <%endif%> <%if(!managed)%> <%if(optimize)%> <%if(BasicRuntimeChecks)%> BasicRuntimeChecks="<%BasicRuntimeChecks%>" <%endif%> <%else%> BasicRuntimeChecks="<%BasicRuntimeChecks("3")%>" <%endif%> <%endif%> <%if(SmallerTypeCheck)%> SmallerTypeCheck="<%SmallerTypeCheck%>" <%endif%> <%if(runtime_library)%> RuntimeLibrary="<%runtime_library%>" <%else%> RuntimeLibrary="<%if(type_is_static || need_staticflags)%><%if(debug_prj)%>1<%else%>0<%endif%><%else%><%if(debug_prj)%>3<%else%>2<%endif%><%endif%>" <%endif%> <%if(StructMemberAlignment)%> StructMemberAlignment="<%StructMemberAlignment%>" <%endif%> <%if(BufferSecurityCheck)%> BufferSecurityCheck="<%BufferSecurityCheck%>" <%endif%> <%if(EnableFunctionLevelLinking)%> EnableFunctionLevelLinking="<%EnableFunctionLevelLinking%>" <%endif%> <%if(EnableEnhancedInstructionSet)%> EnableEnhancedInstructionSet="<%EnableEnhancedInstructionSet%>" <%endif%> <%if(FloatingPointModel)%> FloatingPointModel="<%FloatingPointModel%>" <%endif%> <%if(FloatingPointExceptions)%> FloatingPointExceptions="<%FloatingPointExceptions%>" <%endif%> <%if(DisableLanguageExtensions)%> DisableLanguageExtensions="<%DisableLanguageExtensions%>" <%endif%> <%if(DefaultCharIsUnsigned)%> DefaultCharIsUnsigned="<%DefaultCharIsUnsigned%>" <%endif%> <%if(TreatWChar_tAsBuiltInType)%> TreatWChar_tAsBuiltInType="<%TreatWChar_tAsBuiltInType%>" <%endif%> <%if(ForceConformanceInForLoopScope)%> ForceConformanceInForLoopScope="<%ForceConformanceInForLoopScope%>" <%endif%> RuntimeTypeInfo="<%RuntimeTypeInfo("true")%>" <%if(OpenMP)%> OpenMP="<%OpenMP%>" <%endif%> <%if(pch_header)%> UsePrecompiledHeader="2" PrecompiledHeaderThrough="<%pch_header%>" <%if(PrecompiledHeaderFile)%> PrecompiledHeaderFile="<%PrecompiledHeaderFile%>" <%endif%> <%endif%> <%if(ExpandAttributedSource)%> ExpandAttributedSource="<%ExpandAttributedSource%>" <%endif%> <%if(AssemblerOutput)%> AssemblerOutput="<%AssemblerOutput%>" <%endif%> <%if(AssemblerListingLocation)%> AssemblerListingLocation="<%AssemblerListingLocation%>" <%endif%> <%if(ObjectFile)%> ObjectFile="<%ObjectFile%>" <%endif%> <%if(pdbc)%> ProgramDataBaseFileName="<%if(type_is_static)%><%libout%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb<%else%><%intermediate_dir%>\<%noextension(project_file)%><%if(output_subdir)%>\<%output_subdir%><%endif%>/<%endif%>" <%else%> <%if(ProgramDataBaseFileName)%> ProgramDataBaseFileName="<%ProgramDataBaseFileName%>" <%endif%> <%endif%> <%if(GenerateXMLDocumentationFiles)%> GenerateXMLDocumentationFiles="<%GenerateXMLDocumentationFiles%>" <%endif%> <%if(XMLDocumentationFileName)%> XMLDocumentationFileName="<%XMLDocumentationFileName%>" <%endif%> <%if(BrowseInformation)%> BrowseInformation="<%BrowseInformation%>" <%endif%> <%if(BrowseInformationFile)%> BrowseInformationFile="<%BrowseInformationFile%>" <%endif%> WarningLevel="<%warning_level("3")%>" <%if(WarnAsError)%> WarnAsError="<%WarnAsError%>" <%endif%> Detect64BitPortabilityProblems="<%Detect64BitPortabilityProblems("true")%>" <%if(!optimize || debug_format)%> DebugInformationFormat="<%debug_format("3")%>" <%endif%> <%if(CallingConvention)%> CallingConvention="<%CallingConvention%>" <%endif%> <%if(CompileAs)%> CompileAs="<%CompileAs%>" <%endif%> <%if(DisableSpecificWarnings)%> DisableSpecificWarnings="<%foreach(DisableSpecificWarnings)%><%DisableSpecificWarning%><%fornotlast(";")%><%endfor%>" <%endif%> <%if(ForcedIncludeFiles)%> ForcedIncludeFiles="<%ForcedIncludeFiles%>" <%endif%> <%if(ForcedUsingFiles)%> ForcedUsingFiles="<%ForcedUsingFiles%>" <%endif%> <%if(ShowIncludes)%> ShowIncludes="<%ShowIncludes%>" <%endif%> <%if(UndefinePreprocessorDefinitions)%> UndefinePreprocessorDefinitions="<%UndefinePreprocessorDefinitions%>" <%endif%> <%if(UndefineAllPreprocessorDefinitions)%> UndefineAllPreprocessorDefinitions="<%UndefineAllPreprocessorDefinitions%>" <%endif%> <%if(EnablePREfast)%> EnablePREfast="<%EnablePREfast%>" <%endif%> <%if(UseFullPaths)%> UseFullPaths="<%UseFullPaths%>" <%endif%> <%if(OmitDefaultLibName)%> OmitDefaultLibName="<%OmitDefaultLibName%>" <%endif%> <%if(ErrorReporting)%> ErrorReporting="<%ErrorReporting%>" <%endif%> <%if(SuppressStartupBanner)%> SuppressStartupBanner="<%SuppressStartupBanner%>" <%endif%> /> <%endfor%>" Culture="<%culture("1033")%>" AdditionalIncludeDirectories="<%foreach(includes)%><%include%><%fornotlast(",")%><%endfor%>" /> CommandLine="<%eval(prelink)%>" <%endif%> /> Name="VCLibrarianTool" <%if(staticname)%> OutputFile="<%libout%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>" <%endif%> <%if(lib_options)%> AdditionalOptions="<%lib_options%>" <%endif%> <%else%> Name="VCLinkerTool" <%if(RegisterOutput)%> RegisterOutput="<%RegisterOutput%>" <%endif%> <%if(IgnoreImportLibrary)%> IgnoreImportLibrary="<%IgnoreImportLibrary%>" <%endif%> <%if(LinkLibraryDependencies)%> LinkLibraryDependencies="<%LinkLibraryDependencies%>" <%endif%> <%if(UseLibraryDependencyInputs)%> UseLibraryDependencyInputs="<%UseLibraryDependencyInputs%>" <%endif%> <%if(UseUnicodeResponseFiles)%> UseUnicodeResponseFiles="<%UseUnicodeResponseFiles%>" <%endif%> <%if(!source_files)%> AdditionalOptions="/noentry<%if(link_options)%> <%link_options%><%endif%><%if(release_link_options && !debug_prj)%> <%release_link_options%><%endif%>" <%else%> <%if(link_options || release_link_options && !debug_prj)%> AdditionalOptions="<%link_options%><%if(release_link_options && !debug_prj)%> <%release_link_options%><%endif%>" <%endif%> <%endif%> <%if(type_is_binary)%> AdditionalDependencies="<%foreach(reverse(libs))%><%fornotfirst(" ")%><%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%><%endfor%><%foreach(reverse(lit_libs))%> <%lit_lib%>.lib<%endfor%><%foreach(reverse(pure_libs))%> <%pure_lib%><%endfor%>" <%endif%> <%if(exename || sharedname || staticname)%> OutputFile="$(OutDir)\<%if(type_is_dynamic)%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%else%><%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%><%endif%>" <%endif%> <%if(win_version)%> Version="<%win_version%>" <%endif%> LinkIncremental="<%LinkIncremental("2")%>" SuppressStartupBanner="<%SuppressStartupBanner("true")%>" AdditionalLibraryDirectories="<%foreach(libpaths)%><%libpath%><%fornotlast(";")%><%endfor%>" <%if(ShowProgress)%> ShowProgress="<%ShowProgress%>" <%endif%> <%if(ignore_default_library_names)%> IgnoreDefaultLibraryNames="<%foreach(ignore_default_library_names)%><%ignore_default_library_name%><%fornotlast(";")%><%endfor%>" <%endif%> <%if(GenerateManifest)%> GenerateManifest="<%GenerateManifest%>" <%endif%> <%if(ManifestFile)%> ManifestFile="<%ManifestFile%>" <%endif%> <%if(AdditionalManifestDependencies)%> AdditionalManifestDependencies="<%AdditionalManifestDependencies%>" <%endif%> <%if(IgnoreAllDefaultLibraries)%> IgnoreAllDefaultLibraries="<%IgnoreAllDefaultLibraries%>" <%endif%> <%if(ModuleDefinitionFile)%> ModuleDefinitionFile="<%ModuleDefinitionFile%>" <%endif%> <%if(AddModuleNamesToAssembly)%> AddModuleNamesToAssembly="<%AddModuleNamesToAssembly%>" <%endif%> <%if(EmbedManagedResourceFile)%> EmbedManagedResourceFile="<%EmbedManagedResourceFile%>" <%endif%> <%if(ForceSymbolReferences)%> ForceSymbolReferences="<%ForceSymbolReferences%>" <%endif%> <%if(DelayLoadDLLs)%> DelayLoadDLLs="<%DelayLoadDLLs%>" <%endif%> <%if(AssemblyLinkResource)%> AssemblyLinkResource="<%AssemblyLinkResource%>" <%endif%> GenerateDebugInformation="<%GenerateDebugInformation("true")%>" <%if(AssemblyDebug)%> AssemblyDebug="<%AssemblyDebug%>" <%endif%> <%if(pdbl)%> <%if(sharedname)%> ProgramDatabaseFile="$(OutDir)\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb" <%else%> <%if(exename)%> ProgramDatabaseFile="$(OutDir)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>.pdb" <%endif%> <%endif%> <%endif%> <%if(StripPrivateSymbols)%> StripPrivateSymbols="<%StripPrivateSymbols%>" <%endif%> <%if(GenerateMapFile)%> GenerateMapFile="<%GenerateMapFile%>" <%endif%> <%if(MapFileName)%> MapFileName="<%MapFileName%>" <%endif%> <%if(MapExports)%> MapExports="<%MapExports%>" <%endif%> SubSystem="<%subsystem("2")%>" <%if(HeapReserveSize)%> HeapReserveSize="<%HeapReserveSize%>" <%endif%> <%if(HeapCommitSize)%> HeapCommitSize="<%HeapCommitSize%>" <%endif%> <%if(StackReserveSize)%> StackReserveSize="<%StackReserveSize%>" <%endif%> <%if(StackCommitSize)%> StackCommitSize="<%StackCommitSize%>" <%endif%> <%if(LargeAddressAware)%> LargeAddressAware="<%LargeAddressAware%>" <%endif%> <%if(TerminalServerAware)%> TerminalServerAware="<%TerminalServerAware%>" <%endif%> <%if(SwapRunFromCD)%> SwapRunFromCD="<%SwapRunFromCD%>" <%endif%> <%if(SwapRunFromNet)%> SwapRunFromNet="<%SwapRunFromNet%>" <%endif%> <%if(Driver)%> Driver="<%Driver%>" <%endif%> <%if(OptimizeReferences)%> OptimizeReferences="<%OptimizeReferences%>" <%else%> <%if(optimize)%> OptimizeReferences="<%OptimizeReferences("2")%>" <%endif%> <%endif%> <%if(EnableCOMDATFolding)%> EnableCOMDATFolding="<%EnableCOMDATFolding%>" <%else%> <%if(optimize)%> EnableCOMDATFolding="<%EnableCOMDATFolding("2")%>" <%endif%> <%endif%> <%if(OptimizeForWindows98)%> OptimizeForWindows98="<%OptimizeForWindows98%>" <%endif%> <%if(FunctionOrder)%> FunctionOrder="<%FunctionOrder%>" <%endif%> <%if(LinkTimeCodeGeneration)%> LinkTimeCodeGeneration="<%LinkTimeCodeGeneration%>" <%endif%> <%if(ProfileGuidedDatabase)%> ProfileGuidedDatabase="<%ProfileGuidedDatabase%>" <%endif%> <%if(unicode && unicode_mfc_entry && exename && source_files)%> EntryPointSymbol="<%unicode_mfc_entry%>" <%else%> <%if(EntryPointSymbol)%> EntryPointSymbol="<%EntryPointSymbol%>" <%endif%> <%endif%> <%if(ResourceOnlyDLL)%> ResourceOnlyDLL="<%ResourceOnlyDLL%>" <%endif%> <%if(SetChecksum)%> SetChecksum="<%SetChecksum%>" <%endif%> <%if(BaseAddress)%> BaseAddress="<%BaseAddress%>" <%endif%> <%if(TurnOffAssemblyGeneration)%> TurnOffAssemblyGeneration="<%TurnOffAssemblyGeneration%>" <%endif%> <%if(ImportLibrary)%> ImportLibrary="<%ImportLibrary%>" <%else%> <%if(type_is_dynamic && sharedname)%> ImportLibrary="<%libout%>\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>" <%endif%> <%endif%> <%if(SupportUnloadOfDelayLoadedDLL)%> SupportUnloadOfDelayLoadedDLL="<%SupportUnloadOfDelayLoadedDLL%>" <%endif%> <%if(MergeSections)%> MergeSections="<%MergeSections%>" <%endif%> TargetMachine="<%TargetMachine("1")%>" <%if(FixedBaseAddress || managed)%> FixedBaseAddress="<%FixedBaseAddress("1")%>" <%endif%> <%if(KeyFile)%> KeyFile="<%KeyFile%>" <%endif%> <%if(KeyContainer)%> KeyContainer="<%KeyContainer%>" <%endif%> <%if(DelaySign)%> DelaySign="<%DelaySign%>" <%endif%> <%if(AllowIsolation)%> AllowIsolation="<%AllowIsolation%>" <%endif%> <%if(Profile)%> Profile="<%Profile%>" <%endif%> <%if(CLRThreadAttribute)%> CLRThreadAttribute="<%CLRThreadAttribute%>" <%endif%> <%if(CLRImageType)%> CLRImageType="<%CLRImageType%>" <%endif%> <%if(ErrorReporting)%> ErrorReporting="<%ErrorReporting%>" <%endif%> <%endif%> /> <%endif%> CommandLine="<%eval(postbuild)%>" <%endif%> /> <%if(postclean)%> <%endif%> <%if(deploymenttool)%> <%endif%> <%endif%> <%endfor%> <%endfor%> <%if(after && add_references)%> <%endif%> <%foreach(AssemblyReferences)%> <%endfor%> <%if(exename || sharedname || staticname)%> <%if(source_files)%> <%endfor%>"> <%if(pch_source)%> <%foreach(platforms)%> <%foreach(configurations)%> <%endfor%> <%endfor%> <%endif%> <%if(grouped_source_files)%> <%foreach(sort(grouped_source_files))%> <%if(compares(grouped_source_file, default_group))%> <%foreach(grouped_source_file->files)%> <%if(duplicate_index(grouped_source_file->file))%> <%foreach(platforms)%> <%foreach(configurations)%> file, buildflags))%> AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>" <%endif%> <%if(flag_overrides(grouped_source_file->file, no_pch))%> UsePrecompiledHeader="0" <%endif%> <%if(flag_overrides(grouped_source_file->file, managed))%> BasicRuntimeChecks="0" CompileAsManaged="<%flag_overrides(grouped_source_file->file, managed)%>" <%if(!ExceptionHandling || compares(ExceptionHandling, 1))%> ExceptionHandling="2" <%endif%> <%endif%> ObjectFile="$(IntDir)\$(InputName)<%duplicate_index(grouped_source_file->file)%>.obj"/> <%endfor%> <%endfor%> <%else%> <%if(flag_overrides(grouped_source_file->file, buildflags) || flag_overrides(grouped_source_file->file, no_pch) || flag_overrides(grouped_source_file->file, managed))%> <%foreach(platforms)%> <%foreach(configurations)%> file, buildflags))%> AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>" <%endif%> <%if(flag_overrides(grouped_source_file->file, no_pch))%> UsePrecompiledHeader="0" <%endif%> <%if(flag_overrides(grouped_source_file->file, managed))%> BasicRuntimeChecks="0" CompileAsManaged="<%flag_overrides(grouped_source_file->file, managed)%>" <%if(!ExceptionHandling || compares(ExceptionHandling, 1))%> ExceptionHandling="2" <%endif%> <%endif%> /> <%endfor%> <%endfor%> <%endif%> <%endif%> <%endfor%> <%else%> <%foreach(grouped_source_file->files)%> <%if(duplicate_index(grouped_source_file->file))%> <%foreach(platforms)%> <%foreach(configurations)%> file, buildflags))%> AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>" <%endif%> <%if(flag_overrides(grouped_source_file->file, no_pch))%> UsePrecompiledHeader="0" <%endif%> <%if(flag_overrides(grouped_source_file->file, managed))%> BasicRuntimeChecks="0" CompileAsManaged="<%flag_overrides(grouped_source_file->file, managed)%>" <%if(!ExceptionHandling || compares(ExceptionHandling, 1))%> ExceptionHandling="2" <%endif%> <%endif%> ObjectFile="$(IntDir)\$(InputName)<%duplicate_index(grouped_source_file->file)%>.obj"/> <%endfor%> <%endfor%> <%else%> <%if(flag_overrides(grouped_source_file->file, buildflags) || flag_overrides(grouped_source_file->file, no_pch) || flag_overrides(grouped_source_file->file, managed))%> <%foreach(platforms)%> <%foreach(configurations)%> file, buildflags))%> AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>" <%endif%> <%if(flag_overrides(grouped_source_file->file, no_pch))%> UsePrecompiledHeader="0" <%endif%> <%if(flag_overrides(grouped_source_file->file, managed))%> BasicRuntimeChecks="0" CompileAsManaged="<%flag_overrides(grouped_source_file->file, managed)%>" <%if(!ExceptionHandling || compares(ExceptionHandling, 1))%> ExceptionHandling="2" <%endif%> <%endif%> /> <%endfor%> <%endfor%> <%endif%> <%endif%> <%endfor%> <%endif%> <%endfor%> <%else%> <%foreach(source_files)%> <%if(duplicate_index(source_file))%> <%foreach(platforms)%> <%foreach(configurations)%> AdditionalOptions="<%flag_overrides(source_file, buildflags)%>" <%endif%> <%if(flag_overrides(source_file, no_pch))%> UsePrecompiledHeader="0" <%endif%> <%if(flag_overrides(source_file, managed))%> BasicRuntimeChecks="0" CompileAsManaged="<%flag_overrides(source_file, managed)%>" <%if(!ExceptionHandling || compares(ExceptionHandling, 1))%> ExceptionHandling="2" <%endif%> <%endif%> ObjectFile="$(IntDir)\$(InputName)<%duplicate_index(source_file)%>.obj"/> <%endfor%> <%endfor%> <%else%> <%if(flag_overrides(source_file, buildflags) || flag_overrides(source_file, no_pch) || flag_overrides(source_file, managed))%> <%foreach(platforms)%> <%foreach(configurations)%> AdditionalOptions="<%flag_overrides(source_file, buildflags)%>" <%endif%> <%if(flag_overrides(source_file, no_pch))%> UsePrecompiledHeader="0" <%endif%> <%if(flag_overrides(source_file, managed))%> BasicRuntimeChecks="0" CompileAsManaged="<%flag_overrides(source_file, managed)%>" <%if(!ExceptionHandling || compares(ExceptionHandling, 1))%> ExceptionHandling="2" <%endif%> <%endif%> /> <%endfor%> <%endfor%> <%endif%> <%endif%> <%endfor%> <%endif%> <%endif%> <%endif%> <%if(header_files)%> <%endfor%>"> <%if(pch_header)%> <%endif%> <%if(grouped_header_files)%> <%foreach(sort(grouped_header_files))%> <%if(compares(grouped_header_file, default_group))%> <%foreach(grouped_header_file->files)%> file, dependent_upon))%> RelativePath="<%grouped_header_file->file%>" FileType="3"> <%else%> RelativePath="<%grouped_header_file->file%>"> <%endif%> <%endfor%> <%else%> <%foreach(grouped_header_file->files)%> file, dependent_upon))%> RelativePath="<%grouped_header_file->file%>" FileType="3"> <%else%> RelativePath="<%grouped_header_file->file%>"> <%endif%> <%endfor%> <%endif%> <%endfor%> <%else%> <%foreach(header_files)%> RelativePath="<%header_file%>" FileType="3"> <%else%> RelativePath="<%header_file%>"> <%endif%> <%endfor%> <%endif%> <%endif%> <%foreach(custom_types)%> <%if(custom_type->input_files)%> <%endfor%>"> <%foreach(custom_type->input_files)%> <%foreach(platforms)%> <%foreach(configurations)%> input_file->output_files)%> ExcludedFromBuild="true" <%endif%> > <%if(custom_type->input_file->output_files)%> input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies || (!need_staticflags && (flag_overrides(custom_type->input_file, dependent_libs) || custom_type->dependent_libs)))%> AdditionalDependencies="<%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%dep%><%if(!has_extension(dep))%><%exe_ext%><%endif%><%fornotlast(";")%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%><%custom_type->dependent%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%><%fornotlast(";")%><%endfor%><%endif%><%endif%><%foreach(custom_type->input_file->dependencies)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent)%>;<%else%><%fornotfirst(";")%><%endif%><%custom_type->input_file->dependencie%><%endfor%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%>;<%else%><%fornotfirst(";")%><%endif%><%dirname(dep_lib)%>\<%libname_prefix%><%basename(dep_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%>;<%else%><%fornotfirst(";")%><%endif%><%dirname(custom_type->dependent_lib)%>\<%libname_prefix%><%basename(custom_type->dependent_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%endfor%><%endif%><%endif%><%endif%>" <%endif%> Outputs="<%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(";")%><%endfor%>"/> <%endif%> <%endfor%> <%endfor%> <%endfor%> <%endif%> <%endfor%> <%if(inline_files)%> <%endfor%>"> <%if(grouped_inline_files)%> <%foreach(sort(grouped_inline_files))%> <%if(compares(grouped_inline_file, default_group))%> <%foreach(grouped_inline_file->files)%> <%endfor%> <%else%> <%foreach(grouped_inline_file->files)%> <%endfor%> <%endif%> <%endfor%> <%else%> <%foreach(inline_files)%> <%endfor%> <%endif%> <%endif%> <%if(template_files)%> <%if(grouped_template_files)%> <%foreach(sort(grouped_template_files))%> <%if(compares(grouped_template_file, default_group))%> <%foreach(grouped_template_file->files)%> <%foreach(platforms)%> <%foreach(configurations)%> <%endfor%> <%endfor%> <%endfor%> <%else%> <%foreach(grouped_template_file->files)%> <%foreach(platforms)%> <%foreach(configurations)%> <%endfor%> <%endfor%> <%endfor%> <%endif%> <%endfor%> <%else%> <%foreach(template_files)%> <%foreach(platforms)%> <%foreach(configurations)%> <%endfor%> <%endfor%> <%endfor%> <%endif%> <%endif%> <%if(documentation_files)%> <%if(grouped_documentation_files)%> <%foreach(sort(grouped_documentation_files))%> <%if(compares(grouped_documentation_file, default_group))%> <%foreach(grouped_documentation_file->files)%> <%foreach(platforms)%> <%foreach(configurations)%> <%endfor%> <%endfor%> <%endfor%> <%else%> <%foreach(grouped_documentation_file->files)%> <%foreach(platforms)%> <%foreach(configurations)%> <%endfor%> <%endfor%> <%endfor%> <%endif%> <%endfor%> <%else%> <%foreach(documentation_files)%> <%foreach(platforms)%> <%foreach(configurations)%> <%endfor%> <%endfor%> <%endfor%> <%endif%> <%endif%> <%if(resource_files && !type_is_static)%> <%if(grouped_resource_files)%> <%foreach(sort(grouped_resource_files))%> <%if(compares(grouped_resource_file, default_group))%> <%foreach(grouped_resource_file->files)%> <%endfor%> <%else%> <%foreach(grouped_resource_file->files)%> <%endfor%> <%endif%> <%endfor%> <%else%> <%foreach(resource_files)%> <%endfor%> <%endif%> <%endif%> ace-6.4.5+dfsg.orig/MPC/templates/vc8libexe.mpt0000644000175000017500000000344613154167361017326 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release common_defines = WIN32 _CONSOLE _CRT_NONSTDC_NO_WARNINGS ConfigurationType = 1 SubSystem = 1 Detect64BitPortabilityProblems = false MinimalRebuild = false conditional_include "vc8platforms" Release { LinkIncremental = 1 optimize = 2 defines = NDEBUG output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = s GenerateDebugInformation = false } Debug { debug_prj = 1 defines = _DEBUG output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = sd } Memcheck Release { optimize = 2 defines = NDEBUG output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = s BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 } Memcheck Debug { debug_prj = 1 defines = _DEBUG output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = sd BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 } MFC Release { LinkIncremental = 1 optimize = 2 defines = NDEBUG _AFXDLL output_dir = Static_MFC_Release intermediate_dir = Static_MFC_Release lib_modifier = mfcs UseOfMFC = 2 unicode_mfc_entry = wWinMainCRTStartup GenerateDebugInformation = false } MFC Debug { debug_prj = 1 defines = _DEBUG _AFXDLL output_dir = Static_MFC_Debug intermediate_dir = Static_MFC_Debug lib_modifier = mfcsd UseOfMFC = 2 unicode_mfc_entry = wWinMainCRTStartup } conditional_include "vcpartialmacros" conditional_include "user_vc8libexe" ace-6.4.5+dfsg.orig/MPC/templates/em3vcpdllexe.mpt0000644000175000017500000000523213154167361020023 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" type_description = Application platforms = "WCE ARM" "WCE ARMV4" "WCE emulator" "WCE x86" default_configuration = Debug default_platform = "WCE ARM" configurations = Debug Release common_defines = UNICODE _UNICODE unicode = 1 WCE x86 { type_code = 0x8301 cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = IX86 cpu_defines = _i386_ _X86_ x86 ignore_libs = OLDNAMES.lib pure_libs += $(CEx86Corelibc) } WCE emulator { type_code = 0xa601 cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = IX86 cpu_defines = _i386_ _X86_ x86 ignore_libs = OLDNAMES.lib pure_libs += $(CEx86Corelibc) } WCE ARM { type_code = 0x8501 cpu_id = D6518FFC-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = ARM cpp = clarm.exe cpu_defines = ARM _ARM_ } WCE ARMV4 { type_code = 0xa301 cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = ARM cpp = clarm.exe cpu_defines = ARM _ARM_ ARMV4 cpu_options = /QRxscale } Release { use_debug_libraries = optimize = 1 compile_flags = /W3 /GR defines = NDEBUG compile_flags_removed = /YX output_dir = Release intermediate_dir = Release } Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /Zi /GR /Gy defines = _DEBUG compile_flags_removed = /YX intermediate_dir = Debug lib_modifier = d pdbl = 1 pdbc = 1 } MFC Release { use_debug_libraries = optimize = 1 compile_flags = /W3 /GR defines = NDEBUG _AFXDLL compile_flags_removed = /YX output_dir = MFC_Release intermediate_dir = MFC_Release lib_modifier = mfc use_mfc = 2 unicode_mfc_entry = wWinMainCRTStartup } MFC Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /Zi /GR /Gy defines = _DEBUG _AFXDLL compile_flags_removed = /YX output_dir = MFC_Debug intermediate_dir = MFC_Debug lib_modifier = mfcd pdbl = 1 pdbc = 1 use_mfc = 2 unicode_mfc_entry = wWinMainCRTStartup } conditional_include "vcpartialmacros" conditional_include "user_em3vcpdllexe" ace-6.4.5+dfsg.orig/MPC/templates/vc10filters.mpd0000644000175000017500000001732313154167361017556 0ustar tggtgg" encoding="<%encoding("utf-8")%>"?> <%if(source_files)%> <%if(grouped_source_files)%> <%foreach(sort(grouped_source_files))%> <%if(!compares(grouped_source_file, default_group))%> {<%new_guid(grouped_source_file)%>} <%foreach(ext, extensions(source_files))%><%ext%><%fornotlast(";")%><%endfor%> <%endif%> <%endfor%> <%endif%> {<%new_guid(default_group)%>} <%foreach(ext, extensions(source_files))%><%ext%><%fornotlast(";")%><%endfor%> <%endif%> <%if(header_files)%> <%if(grouped_header_files)%> <%foreach(sort(grouped_header_files))%> <%if(!compares(grouped_header_file, default_group))%> {<%new_guid(grouped_header_file)%>} <%foreach(ext, extensions(header_files))%><%ext%><%fornotlast(";")%><%endfor%> <%endif%> <%endfor%> <%endif%> {<%new_guid('Header Files')%>} <%foreach(ext, extensions(header_files))%><%ext%><%fornotlast(";")%><%endfor%> <%endif%> <%foreach(custom_types)%> <%if(custom_type->input_files)%> {<%new_guid(custom_type)%>} <%if(custom_type->inputexts)%> <%foreach(custom_type->inputexts)%><%custom_type->inputext%><%fornotlast(";")%><%endfor%> <%endif%> <%endif%> <%endfor%> <%if(inline_files)%> <%if(grouped_inline_files)%> <%foreach(sort(grouped_inline_files))%> <%if(!compares(grouped_inline_file, default_group))%> {<%new_guid(grouped_inline_file)%>} <%foreach(ext, extensions(inline_files))%><%ext%><%fornotlast(";")%><%endfor%> <%endif%> <%endfor%> <%endif%> {<%new_guid('Inline Files')%>} <%foreach(ext, extensions(inline_files))%><%ext%><%fornotlast(";")%><%endfor%> <%endif%> <%if(template_files)%> <%if(grouped_template_files)%> <%foreach(sort(grouped_template_files))%> <%if(!compares(grouped_template_file, default_group))%> {<%new_guid(grouped_template_file)%>} <%endif%> <%endfor%> <%endif%> {<%new_guid('Template Files')%>} <%endif%> <%if(documentation_files)%> <%if(grouped_documentation_files)%> <%foreach(sort(grouped_documentation_files))%> <%if(!compares(grouped_documentation_file, default_group))%> {<%new_guid(grouped_documentation_file)%>} <%endif%> <%endfor%> <%endif%> {<%new_guid('Documentation')%>} <%endif%> <%if(resource_files && !type_is_static)%> <%if(grouped_resource_files)%> <%foreach(sort(grouped_resource_files))%> <%if(!compares(grouped_resource_file, default_group))%> {<%new_guid(grouped_resource_file)%>} rc;ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe <%endif%> <%endfor%> <%endif%> {<%new_guid('Resource Files')%>} rc;ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe <%endif%> <%if(exename || sharedname || staticname)%> <%if(source_files)%> <%if(grouped_source_files)%> <%foreach(sort(grouped_source_files))%> <%foreach(grouped_source_file->files)%> <%grouped_source_file%> <%endfor%> <%endfor%> <%else%> <%foreach(source_files)%> <%if(ends_with(source_file,\.def))%> Source Files <%else%> <%if(ends_with(source_file,\.[io]dl))%> Source Files <%else%> Source Files <%endif%> <%endif%> <%endfor%> <%endif%> <%endif%> <%endif%> <%if(header_files)%> <%if(grouped_header_files)%> <%foreach(sort(grouped_header_files))%> <%foreach(grouped_header_file->files)%> <%grouped_header_file%> <%endfor%> <%endfor%> <%else%> <%foreach(header_files)%> Header Files <%endfor%> <%endif%> <%endif%> <%foreach(custom_types)%> <%if(custom_type->input_files)%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> <%ucw(custom_type)%> <%else%> <%ucw(custom_type)%> <%endif%> <%endfor%> <%endif%> <%endfor%> <%if(inline_files)%> <%if(grouped_inline_files)%> <%foreach(sort(grouped_inline_files))%> <%foreach(grouped_inline_file->files)%> <%grouped_inline_file%> <%endfor%> <%endfor%> <%else%> <%foreach(inline_files)%> Inline Files <%endfor%> <%endif%> <%endif%> <%if(template_files)%> <%if(grouped_template_files)%> <%foreach(sort(grouped_template_files))%> <%foreach(grouped_template_file->files)%> <%grouped_template_file%> <%endfor%> <%endfor%> <%else%> <%foreach(template_files)%> Template Files <%endfor%> <%endif%> <%endif%> <%if(documentation_files)%> <%if(grouped_documentation_files)%> <%foreach(sort(grouped_documentation_files))%> <%foreach(grouped_documentation_file->files)%> <%grouped_documentation_file%> <%endfor%> <%endfor%> <%else%> <%foreach(documentation_files)%> Documentation <%endfor%> <%endif%> <%endif%> <%if(resource_files && !type_is_static)%> <%if(grouped_resource_files)%> <%foreach(sort(grouped_resource_files))%> <%foreach(grouped_resource_file->files)%> <%grouped_resource_file%> <%endfor%> <%endfor%> <%else%> <%foreach(resource_files)%> Resource Files <%endfor%> <%endif%> <%endif%> ace-6.4.5+dfsg.orig/MPC/templates/vc14platforms.mpt0000644000175000017500000000071613154167361020137 0ustar tggtgg// -*- MPC -*- // // Any of these platforms can set using value_template platforms= // when generating solutions/projects. // //platforms = Win32 x64 platforms = Win32 x64 default_platform = Win32 PlatformToolset = v140 Win32 { output_subdir = I386 } x64 { output_subdir = AMD64 cpu_defines = _AMD64_ platform_defines = _WIN64 TargetMachine = "0" // We let VC++ figure it out for us. link_options = /machine:AMD64 } ace-6.4.5+dfsg.orig/MPC/templates/bcb2007dll.mpt0000644000175000017500000000021413154167361017156 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" common_defines = WIN32 conditional_include "user_bdsdll" ace-6.4.5+dfsg.orig/MPC/templates/vc6dsplibexe.mpt0000644000175000017500000000401513154167361020024 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "vccommon" conditional_include "windowscommon" type_description = "Console Application" type_code = 0x0103 configurations = Debug Release default_configuration = Debug common_defines = WIN32 _CONSOLE subsystem = console Release { use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /GX /MD /GR defines = NDEBUG compile_flags_removed = /YX lib_modifier = s output_dir = Static_Release intermediate_dir = Static_Release debug_switch = } Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy defines = _DEBUG compile_flags_removed = /YX intermediate_dir = Static_Debug output_dir = Static_Debug lib_modifier = sd pdbl = 1 pdbc = 1 } MFC Release { subsystem = windows use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /GX /MD /GR common_defines = WIN32 _WINDOWS defines = NDEBUG _AFXDLL compile_flags_removed = /YX output_dir = Static_MFC_Release intermediate_dir = Static_MFC_Release debug_switch = lib_modifier = mfcs use_mfc = 2 unicode_mfc_entry = wWinMainCRTStartup } MFC Debug { subsystem = windows use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy common_defines = WIN32 _WINDOWS defines = _DEBUG _AFXDLL compile_flags_removed = /YX intermediate_dir = Static_MFC_Debug output_dir = Static_MFC_Debug lib_modifier = mfcsd pdbl = 1 pdbc = 1 use_mfc = 2 unicode_mfc_entry = wWinMainCRTStartup } conditional_include "vcpartialmacros" conditional_include "user_vc6dsplibexe" ace-6.4.5+dfsg.orig/MPC/templates/vc6dsplib.mpt0000644000175000017500000000322713154167361017326 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "vccommon" conditional_include "windowscommon" type_description = "Static Library" type_code = 0x0104 configurations = Debug Release common_defines = WIN32 _WINDOWS Release { use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /GX /MD /GR defines = NDEBUG compile_flags_removed = /YX output_dir = Static_Release intermediate_dir = Static_Release lib_modifier = s debug_switch = } Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy defines = _DEBUG compile_flags_removed = /Fr /YX output_dir = Static_Debug intermediate_dir = Static_Debug lib_modifier = sd pdbc = 1 } MFC Release { use_debug_libraries = 0 optimize = 1 compile_flags = /W3 /GX /MD /GR defines = NDEBUG compile_flags_removed = /YX output_dir = Static_MFC_Release intermediate_dir = Static_MFC_Release lib_modifier = mfcs debug_switch = use_mfc = 2 } MFC Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy defines = _DEBUG compile_flags_removed = /Fr /YX output_dir = Static_MFC_Debug intermediate_dir = Static_MFC_Debug lib_modifier = mfcsd pdbc = 1 use_mfc = 2 } conditional_include "vcpartialmacros" conditional_include "user_vc6dsplib" ace-6.4.5+dfsg.orig/MPC/templates/cdt6cproject.mpd0000644000175000017500000006554413154167361020016 0ustar tggtgg <%foreach(platforms)%> <%foreach(host_platform)%><%comment(there won't be more than one host_platform, but a foreach is used in order to access scoped assignments from the mpt)%> <%foreach(configurations)%> <%if(!nocross || vars_equal(platform, host_platform))%> <%comment(looks like for libraries there are externalsettings)%> <%foreach(binary_parsers)%> <%endfor%> <%foreach(error_parsers additional_error_parsers)%> <%endfor%> parent="org.eclipse.cdt.build.core.emptycfg" buildProperties="" <%else%> buildArtefactType="<%build_artefact_type%>" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=<%build_artefact_type%>,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.<%configuration%>" cleanCommand="<%delete("rm -rf")%>" parent="<%configuration_parent_root%>.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>" prebuildStep="<%eval(prebuild)%>" <%endif%> postbuildStep="<%shell%> ..<%slash%><%create_aux_file(postbuild_, platform, _, configuration, script_ext)%><%script_hdr%> <%if(!custom_only)%> <%if(type_is_dynamic)%> <%setenv%> DESTDIR=<%if(dllout)%><%if(!starts_with(dllout, [/\\\$]))%>..<%slash%>..<%slash%><%endif%><%convert_slashes(translate_vars(dllout))%><%else%><%if(libout)%><%if(!starts_with(libout, [/\\\$]))%>..<%slash%>..<%slash%><%endif%><%convert_slashes(translate_vars(libout))%><%else%>..<%slash%>..<%endif%><%endif%><%slash%><%platform%>-<%configuration%> <%if(mkdir_pre)%><%mkdir_pre%> <%envvar_pre%>DESTDIR<%envvar_post%><%endif%><%mkdir%> <%envvar_pre%>DESTDIR<%envvar_post%> <%cp%> <%lib_prefix%><%sharedname%><%lib_modifier%><%dll_ext%> <%envvar_pre%>DESTDIR<%envvar_post%><%else%> <%if(type_is_static)%> <%setenv%> DESTDIR=<%if(libout)%><%if(!starts_with(libout, [/\\\$]))%>..<%slash%>..<%slash%><%endif%><%convert_slashes(translate_vars(libout))%><%else%>..<%slash%>..<%endif%><%slash%><%platform%>-<%configuration%> <%if(mkdir_pre)%><%mkdir_pre%> <%envvar_pre%>DESTDIR<%envvar_post%><%endif%><%mkdir%> <%envvar_pre%>DESTDIR<%envvar_post%> <%cp%> <%lib_prefix%><%staticname%><%lib_modifier%><%lib_ext%> <%envvar_pre%>DESTDIR<%envvar_post%><%else%> <%if(exename)%> <%setenv%> DESTDIR=<%if(exeout)%><%if(!starts_with(exeout, [/\\\$]))%>..<%slash%>..<%slash%><%endif%><%convert_slashes(translate_vars(exeout))%><%else%>..<%slash%>..<%endif%><%endif%> <%cp%> <%exename%><%exe_ext%> <%envvar_pre%>DESTDIR<%envvar_post%> <%endif%><%endif%> <%endif%> <%if(postbuild)%><%eval(postbuild)%><%endif%> <%end_aux_file%>" > name="/" resourcePath=""> superClass="<%toolchain_superclass_root%>.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>"> cleanBuildTarget="clean" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" <%if(custom_only)%> superClass="org.eclipse.cdt.build.core.settings.default.builder" name="Gnu Make Builder.<%platform%>.<%configuration%>" buildPath="${workspace_loc:/<%project_name%>}/.." arguments="-f <%project_name%>.mk" <%else%> buildPath="${workspace_loc:/<%project_name%>/<%configuration%>}"<%comment(buildpath may need to include platform as well in the case of cross-compiles)%> managedBuildOn="true" name="CDT Internal Builder" superClass="org.eclipse.cdt.build.core.internal.builder" <%endif%> /> <%if(custom_only)%> <%else%> command="<%ccld%>" <%else%> <%if(cc)%> command="<%cc%>" <%endif%> <%endif%> id="<%c_linker_tool_superclass_root%>.<%project_type%>.<%configuration%>.1311461244" name="<%tool_name_prefix%> C Linker" superClass="<%c_linker_tool_superclass_root%>.<%project_type%>.<%configuration%>"> <%if(type_is_dynamic)%> command="<%cxxld%>" <%else%> <%if(cxx)%> command="<%cxx%>" <%endif%> <%endif%> id="<%cpp_linker_tool_superclass_root%>.<%project_type%>.<%configuration%>.335515345" name="<%tool_name_prefix%> C++ Linker" superClass="<%cpp_linker_tool_superclass_root%>.<%project_type%>.<%configuration%>"> command="<%as%>" <%endif%> id="cdt.managedbuild.tool.gnu.assembler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.897965604" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>"> command="<%ar%>" <%endif%> id="cdt.managedbuild.tool.gnu.archiver.<%if(platform_specializer)%><%platform_specializer%>.<%endif%>base.134329701" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.<%if(platform_specializer)%><%platform_specializer%>.<%endif%>base" /> command="<%cxx%>" <%endif%> id="cdt.managedbuild.tool.gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.1373363011" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>"> command="<%cc%>" <%endif%> id="cdt.managedbuild.tool.gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.1634417374" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>"> <%endif%><%comment(custom_only)%> <%if(custom_only)%> <%create_aux_file(../, project_name, .mk)%>.PHONY: all clean all: clean: <%rm%> <%if(starts_with(shell, cmd))%>$(subst /,\,$(GENERATED))<%else%>$(GENERATED)<%endif%><%if(starts_with(shell, cmd))%> 2>NUL<%endif%> SPACE := $(empty_variable) $(empty_variable) <%foreach(custom_types)%><%if(custom_type->libpath)%> <%libenv%> := $(<%libenv%>)<%pathsep%><%custom_type->libpath%> <%endif%><%foreach(custom_type->input_files)%><%if(custom_type->input_file->output_files)%> GENERATED +=<%foreach(custom_type->input_file->output_files)%> <%custom_type->input_file->output_file%><%endfor%> <%foreach(custom_type->input_file->output_files)%><%fornotfirst(" ")%><%if(flag_overrides(custom_type->input_file, gendir))%><%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%><%flag_overrides(custom_type->input_file, gendir)%>/<%endif%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%endfor%>: <%custom_type->input_file%><%foreach(custom_type->input_file->dependencies)%> <%if(contains(custom_type->input_file->dependencie, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%custom_type->input_file->dependencie%>)<%else%><%custom_type->input_file->dependencie%><%endif%><%endfor%><%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%> <%if(contains(dep, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%dep%>)<%else%><%dep%><%endif%><%if(!has_extension(dep))%><%exe%><%endif%><%endfor%><%else%><%foreach(custom_type->dependent)%> <%if(contains(custom_type->dependent, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%custom_type->dependent%>)<%else%><%custom_type->dependent%><%endif%><%if(!has_extension(custom_type->dependent))%><%exe%><%endif%><%endfor%><%endif%> <%if(flag_overrides(custom_type->input_file, gendir))%> <%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%> <%if(mkdir_pre)%><%mkdir_pre%> <%flag_overrides(custom_type->input_file, gendir)%> <%endif%><%mkdir%> <%flag_overrides(custom_type->input_file, gendir)%> <%endif%> <%endif%> <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%><%custom_type->input_file%> <%custom_type->output_option%> $@<%else%><%custom_type->input_file%><%endif%> <%if(flag_overrides(custom_type->input_file, postcommand))%> <%flag_overrides(custom_type->input_file, postcommand)%> <%else%> <%if(custom_type->postcommand)%> <%custom_type->postcommand%> <%endif%> <%endif%> <%if(pch_header)%> <%if(custom_type->pch_postrule)%> <%foreach(custom_type->input_file->source_output_files)%> @echo <%quote_echo%>#include "<%pch_header%>"<%quote_echo%> > <%makefile_tmpfile%> && <%cat%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>" >> <%makefile_tmpfile%> && <%mv%> <%makefile_tmpfile%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>" <%endfor%> <%endif%> <%endif%> <%endif%><%comment(has some output files)%><%endfor%><%comment(input_files)%><%endfor%><%comment(custom_types)%> all: $(GENERATED) <%end_aux_file%> <%else%><%comment(not custom_only)%> <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> input_file%>"<%if(custom_type->input_file->command->outopt)%> <%custom_type->input_file->command->outopt%> "<%custom_type->input_file->command->outfile%>"<%endif%><%fornotlast(" && ")%><%endfor%><%else%><%comment(COMMAND)%><%if(flag_overrides(custom_type->input_file, command))%><%translate_vars(flag_overrides(custom_type->input_file, command))%><%else%><%translate_vars(custom_type->command)%><%endif%> <%comment(COMMANDFLAGS)%><%if(flag_overrides(custom_type->input_file, commandflags))%><%translate_vars(flag_overrides(custom_type->input_file, commandflags))%><%else%><%if(custom_type->commandflags)%><%translate_vars(custom_type->commandflags)%><%endif%><%endif%> <%if(custom_type->output_option)%><%comment(with OUTPUT_OPTION)%>"<%custom_type->input_file%>" <%custom_type->output_option%><%foreach(custom_type->input_file->output_files)%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>"<%endfor%><%else%><%comment(without OUTPUT_OPTION)%>"<%custom_type->input_file%>"<%endif%><%endif%><%comment(POSTCOMMAND)%><%if(flag_overrides(custom_type->input_file, postcommand))%> && <%flag_overrides(custom_type->input_file, postcommand)%><%else%><%if(custom_type->postcommand)%> && <%custom_type->postcommand%><%endif%><%endif%><%comment(PCH_POSTRULE)%><%if(pch_header)%><%if(custom_type->pch_postrule)%><%foreach(custom_type->input_file->source_output_files)%> && echo <%quote_echo%>#include "<%pch_header%>"<%quote_echo%> > <%script_tmpfile%> && <%cat%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>" >> <%script_tmpfile%> && <%mv%> <%script_tmpfile%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>"<%endfor%><%endif%><%endif%><%comment(LINK_SRCDIR_TO_OUTDIR)%><%if(custom_type->input_file->output_files)%> && cd cdt_<%project_name%><%slash%><%platform%>-<%configuration%><%endif%><%foreach(custom_type->input_file->output_files)%> && <%ln%> ..<%slash%>..<%slash%><%if(dirname(custom_type->input_file->output_file))%><%dirname(custom_type->input_file->output_file)%><%slash%><%endif%><%basename(custom_type->input_file->output_file)%> .<%endfor%> <%end_aux_file%>" customBuildStep="true" id="mpc.generated.rcbs.<%platform%>.<%configuration%>.<%custom_type%>.<%normalize(custom_type->input_file)%>" name="Resource Custom Build Step for <%custom_type%> <%normalize(custom_type->input_file)%> (<%configuration%>)"> input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies || (!need_staticflags && (flag_overrides(custom_type->input_file, dependent_libs) || custom_type->dependent_libs)))%> paths="<%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%translate_vars(dep, 1)%><%if(!has_extension(dep))%><%exe_ext%><%endif%><%fornotlast(";")%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%><%translate_vars(custom_type->dependent, 1)%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%><%fornotlast(";")%><%endfor%><%endif%><%endif%><%foreach(custom_type->input_file->dependencies)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent)%>;<%else%><%fornotfirst(";")%><%endif%><%translate_vars(custom_type->input_file->dependencie, 1)%><%endfor%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%>;<%else%><%fornotfirst(";")%><%endif%><%translate_vars(dirname(dep_lib), 1)%>/<%lib_prefix%><%translate_vars(basename(dep_lib), 1)%><%lib_modifier%><%dll_ext%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%>;<%else%><%fornotfirst(";")%><%endif%><%translate_vars(dirname(custom_type->dependent_lib), 1)%>/<%lib_prefix%><%translate_vars(basename(custom_type->dependent_lib), 1)%><%lib_modifier%><%dll_ext%><%endfor%><%endif%><%endif%><%endif%>" <%endif%> /> <%endfor%>" /> <%endif%><%comment(generates any output)%><%endfor%><%comment(input file)%><%endfor%><%comment(custom type)%> <%comment(we may need to change the source_output_files to just output_files below to align it with what's used above)%> <%endif%><%comment(!custom_only)%> <%foreach(additional_storage_modules)%> <%endfor%> <%endif%> <%endfor%><%comment(configurations)%> <%endfor%><%comment(host_platform)%> <%endfor%><%comment(platforms)%> <%foreach(platforms)%> <%endfor%> ace-6.4.5+dfsg.orig/MPC/templates/vc11libexe.mpt0000644000175000017500000000017213154167361017371 0ustar tggtgg// -*- MPC -*- conditional_include "vc11platforms" conditional_include "vc1xlibexe" conditional_include "user_vc11libexe" ace-6.4.5+dfsg.orig/MPC/templates/wb26wrproject.mpd0000644000175000017500000004624113154167361020135 0ustar tggtgg <%foreach(platform)%><%comment(there can't be more than one active platform but using a foreach allows platform settings to be grouped in scopes in the mpt files)%> platform_name="<%platform_name%>" <%endif%>root="1" type="<%project_type%>"/> <%if(after && !disable_subprojects)%> <%endif%> <%if(compares(platform, VxWorks))%> <%if(sharedname || staticname)%> <%endif%> <%endif%> <%if(compares(platform, VxWorks))%> -L<%libpath%><%endfor%>"/> -l<%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%if(!standard_build)%><%lib_ext%><%endif%><%endfor%><%foreach(lit_libs)%> <%lit_lib%>.lib<%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%>"/> <%if(sharedname || staticname)%> <%endif%> <%endif%> <%foreach(buildspecs)%> <%foreach(includes platform_includes)%> <%endfor%> <%endfor%> <%foreach(wrprj_macros)%> <%endfor%> <%foreach(buildspecs)%> <%foreach(sort(wrprj_macros))%> <%if(compares(wrprj_macro, LIBPATH))%> -L<%if(!standard_build && !starts_with(libpath, [/\\\$]))%><%if(make_coexistence)%>../<%endif%>../<%endif%><%translate_vars(libpath, 1)%><%endfor%>"/> <%else%> <%if(compares(wrprj_macro, LIBS))%> -l<%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%endfor%><%foreach(lit_libs)%> <%lit_lib%>.lib<%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%>"/> <%else%> <%endif%> <%endif%> <%endfor%> <%endfor%> <%if(compares(platform, VxWorks))%> <%if(sharedname || staticname)%> <%endif%> <%endif%> <%if(!compares(platform, VxWorks))%> <%endif%> <%foreach(buildspecs)%> <%endfor%> <%foreach(buildspecs)%> <%endfor%> <%endfor%>"/> <%if(!compares(platform, VxWorks))%> <%foreach(buildspecs)%> <%endif%>"/> <%endfor%> <%endif%> <%foreach(buildspecs)%> <%endfor%> <%if(!compares(platform, VxWorks))%> <%foreach(buildspecs)%> <%endif%>"/> <%endfor%> <%endif%> <%foreach(buildspecs)%> <%endfor%> <%if(compares(platform, VxWorks))%> <%foreach(buildspecs)%> <%endfor%> <%foreach(buildspecs)%> <%endfor%> <%endif%> <%foreach(buildspecs)%> <%endfor%> <%foreach(buildspecs)%> <%endfor%> <%if(standard_build)%> <%if(exename || sharedname || staticname)%> <%if(exename)%> <%endif%> <%if(exename)%> <%endif%> /<%endif%>> <%if(exename)%> <%endif%> <%endif%> <%else%> <%endif%> <%if(!standard_build)%> <%if(exename)%> <%else%> <%if(sharedname && !compares(platform, VxWorks))%> <%foreach(buildspecs)%> <%foreach(source_files)%> <%endfor%> <%foreach(source_dirs)%> <%endfor%> <%endfor%> <%else%> <%if(staticname || sharedname)%> <%else%> <%endif%> <%endif%> <%endif%> <%if(!sharedname || compares(platform, VxWorks))%> <%if(exename && compares(platform, VxWorks))%> <%else%> <%foreach(source_files)%> <%endfor%> <%foreach(source_dirs)%> <%endfor%> <%endif%> <%endif%> <%if(exename && compares(platform, VxWorks))%> <%foreach(buildspecs)%> <%endfor%> <%if(pch_source)%> <%endif%> <%foreach(source_files)%> <%endfor%> <%foreach(source_dirs)%> <%endfor%> <%endif%> <%endif%> <%endfor%> ace-6.4.5+dfsg.orig/MPC/templates/vc7java.mpd0000644000175000017500000001265013154167361016753 0ustar tggtgg " SchemaVersion = "<%schemaversion("2.0")%>" ProjectGuid = "{<%guid%>}" <%if(scc)%> SccProjectName = "<%scc%>" SccLocalPath = "<%scc%>" SccAuxPath = "<%scc%>" SccProvider = "<%scc%>" <%endif%> > AssemblyName = "<%if(exename)%><%exename%><%else%><%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%endif%>" <%endif%> AssemblyOriginatorKeyFile = "<%keyfile%>" DefaultClientScript = "JScript" DefaultHTMLPageLayout = "Grid" DefaultTargetSchema = "IE50" DelaySign = "<%DelaySign("false")%>" <%if(exename || sharedname || staticname)%> OutputType = "<%if(exename)%><%if(winapp)%>Win<%endif%>Exe<%else%>Library<%endif%>" <%endif%> PreBuildEvent = "<%if(prebuild)%><%eval(prebuild)%><%endif%>" PostBuildEvent = "<%if(postbuild)%><%eval(postbuild)%><%endif%>" RootNamespace = "" RunPostBuildEvent = "OnBuildSuccess" StartupObject = "<%startupobject%>" <%if(libpaths)%> ReferencePath = "<%foreach(libpaths)%><%libpath%><%fornotlast(";")%><%endfor%>" <%endif%> > <%foreach(configurations)%> OutputPath = "<%if(exename)%><%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir%><%endif%><%else%>.\<%output_dir%><%endif%><%else%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%output_dir%><%endif%>\" <%endif%> RegisterForComInterop = "false" TreatWarningsAsErrors = "false" WarningLevel = "4" AdditionalOptions = "" /> <%endfor%> <%foreach(libs)%> <%endfor%> <%foreach(lib, lit_libs pure_libs)%> <%endfor%> <%foreach(source_files)%> <%endfor%> <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> input_file->output_files)%> BuildAction = "Compile" Generator = "<%if(custom_type->libpath)%>PATH=%PATH%;<%custom_type->libpath%> <%endif%><%if(flag_overrides(custom_type->input_file, gendir))%>if not exist <%flag_overrides(custom_type->input_file, gendir)%> mkdir <%flag_overrides(custom_type->input_file, gendir)%> <%endif%><%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%><%custom_type->input_file%> <%custom_type->output_option%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_files)%><%else%><%custom_type->input_file->output_files%><%endif%><%else%><%custom_type->input_file%><%endif%><%if(flag_overrides(custom_type->input_file, postcommand))%><%foreach(custom_type->input_file)%>&&<%flag_overrides(custom_type->input_file, postcommand)%><%endfor%><%else%><%if(custom_type->postcommand)%><%foreach(custom_type->input_file)%>&&<%custom_type->postcommand%><%endfor%><%endif%><%endif%>" <%else%> BuildAction = "None" <%endif%> /> <%endfor%> <%endfor%> <%foreach(documentation_files)%> <%endfor%> ace-6.4.5+dfsg.orig/MPC/templates/vc14dll.mpt0000644000175000017500000000016413154167361016700 0ustar tggtgg// -*- MPC -*- conditional_include "vc14platforms" conditional_include "vc1xdll" conditional_include "user_vc14dll" ace-6.4.5+dfsg.orig/MPC/templates/sle.mpd0000644000175000017500000002061213154167361016172 0ustar tggtgg <%foreach(source_files)%> <%endfor%> <%if(header_files)%> <%if(pch_header)%> <%endif%> <%foreach(header_files)%> <%endfor%> <%endif%> <%if(inline_files)%> <%foreach(inline_files)%> <%endfor%> <%endif%> <%if(template_files)%> <%foreach(template_files)%> <%endfor%> <%endif%> <%if(documentation_files)%> <%foreach(documentation_files)%> <%endfor%> <%endif%> <%if(resource_files)%> <%foreach(resource_files)%> <%endfor%> <%endif%> ace-6.4.5+dfsg.orig/MPC/templates/ghs.mpd0000644000175000017500000001700313154167361016170 0ustar tggtgg#!gbuild #primaryTarget=<%primaryTarget("ppc_integrity.tgt")%> <%if(exename)%> [Program] -o <%if(exeout)%><%reltop_exeout%><%else%><%reltop%><%endif%>/<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%> <%if(need_staticflags)%> {optional} -non_shared <%endif%> <%else%> <%if(sharedname)%> [Shared Object] -o <%if(dllout)%><%reltop_dllout%><%else%><%reltop_libout%><%endif%>/<%lib_prefix%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".so")%> <%else%> <%if(staticname)%> [Library] -o <%reltop_libout%>/<%lib_prefix%><%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".a")%> <%else%> [Subproject] <%endif%> <%endif%> <%endif%> <%if(bsp)%> -bsp <%bsp%> <%endif%> <%if(os_dir)%> -os_dir <%os_dir%> <%endif%> <%if(optimize)%> -Ospeed -OI <%else%> -G <%endif%> <%if(exceptions)%> --exceptions <%endif%> <%if(pch_header && !no_use_pch)%> --pch <%foreach(pch_defines)%> -D<%pch_define%> <%endfor%> <%endif%> <%foreach(reltop_includes)%> -I<%reltop_include%> <%endfor%> <%foreach(reltop_libpaths)%> -L<%reltop_libpath%> <%endfor%> <%if(libs || lit_libs || pure_libs)%> <%if(exename || sharedname)%> <%foreach(libs)%> -l<%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%> <%endfor%> <%foreach(lit_libs)%> -l<%lit_lib%> <%endfor%> <%foreach(pure_libs)%> <%pure_lib%> <%endfor%> <%endif%> <%endif%> <%if(sharedname)%> <%foreach(dynamicflags)%> -D<%dynamicflag%> <%endfor%> <%endif%> <%if(need_staticflags)%> <%foreach(staticflags)%> -D<%staticflag%> <%endfor%> <%endif%> <%if(macros)%> <%foreach(macros)%> -D<%macro%> <%endfor%> <%endif%> <%if(compile_flags)%> <%foreach(compile_flags)%> <%compile_flag%> <%endfor%> <%endif%> <%if(custom_only || !source_files && custom_types)%> .custom_build_rule [HTML Source] <%endif%> <%scope(enter, escape, \\)%> <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> <%if(!custom_only && source_files)%> <%custom_type->input_file%> [Text] <%endif%> <%if(custom_type->input_file->output_files)%> <%if(custom_type->output_option)%> <%foreach(custom_type->input_file->output_files)%> <%if(!custom_only && source_files)%> <%custom_type->input_file->output_file%> <%endif%> <%if(flag_overrides(custom_type->input_file, dependent))%> <%foreach(dep, flag_overrides(custom_type->input_file, dependent))%> :dependsRelative=<%dep%><%if(!has_extension(dep))%><%exe_ext%><%endif%> <%endfor%> <%else%> <%foreach(custom_type->dependent)%> :dependsRelative=<%custom_type->dependent%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%> <%endfor%> <%endif%> :dependsRelative=<%custom_type->input_file%> <%if(custom_type->input_file->dependencies)%> <%foreach(custom_type->input_file->dependencies)%> :dependsRelative=<%custom_type->input_file->dependencie%> <%endfor%> <%endif%> <%if(!need_staticflags)%> <%if(flag_overrides(custom_type->input_file, dependent_libs))%> <%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%> :dependsRelative=<%dirname(dep_lib)%>/<%lib_prefix%><%libname_prefix%><%basename(dep_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".so")%> <%endfor%> <%else%> <%if(custom_type->dependent_libs)%> <%foreach(custom_type->dependent_libs)%> :dependsRelative=<%dirname(custom_type->dependent_lib)%>/<%lib_prefix%><%libname_prefix%><%basename(custom_type->dependent_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".so")%> <%endfor%> <%endif%> <%endif%> <%endif%> <%if(flag_overrides(custom_type->input_file, gendir))%> :preexecShell='cd <%reltop%> && <%mkdir%> <%flag_overrides(custom_type->input_file, gendir)%><%postmkdir%>' <%endif%> :preexecShell='cd <%reltop%> && <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%><%if(custom_type->output_option)%> <%custom_type->input_file%> <%custom_type->output_option%> <%custom_type->input_file->output_file%><%else%> <%custom_type->input_file%><%endif%>' <%endfor%> <%else%> <%if(!custom_only && source_files)%> <%foreach(custom_type->input_file->source_output_files)%> <%if(forfirst)%> <%custom_type->input_file->source_output_file%> <%endif%> <%endfor%> <%endif%> <%if(flag_overrides(custom_type->input_file, dependent))%> <%foreach(dep, flag_overrides(custom_type->input_file, dependent))%> :dependsRelative=<%dep%><%if(!has_extension(dep))%><%exe_ext%><%endif%> <%endfor%> <%else%> <%foreach(custom_type->dependent)%> :dependsRelative=<%custom_type->dependent%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%> <%endfor%> <%endif%> :dependsRelative=<%custom_type->input_file%> <%if(custom_type->input_file->dependencies)%> <%foreach(custom_type->input_file->dependencies)%> :dependsRelative=<%custom_type->input_file->dependencie%> <%endfor%> <%endif%> <%if(flag_overrides(custom_type->input_file, gendir))%> :preexecShell='cd <%reltop%> && <%mkdir%> <%flag_overrides(custom_type->input_file, gendir)%><%postmkdir%>' <%endif%> :preexecShell='cd <%reltop%> && <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%custom_type->input_file%>' <%if(flag_overrides(custom_type->input_file, postcommand))%> <%foreach(custom_type->input_file)%> :preexecShell='cd <%reltop%> && <%flag_overrides(custom_type->input_file, postcommand)%>' <%endfor%> <%else%> <%if(custom_type->postcommand)%> <%foreach(custom_type->input_file)%> :preexecShell='cd <%reltop%> && <%custom_type->postcommand%>' <%endfor%> <%endif%> <%endif%> <%if(pch_header && !no_use_pch && custom_type->pch_postrule)%> <%foreach(custom_type->input_file->source_output_files)%> :preexecShell='cd <%reltop%> && echo #include "<%pch_header%>" > temporary.src' :preexecShell='cd <%reltop%> && <%cat%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temporary.src' :preexecShell='cd <%reltop%> && <%mv%> temporary.src <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>' <%endfor%> <%endif%> <%endif%> <%foreach(custom_type->input_file->output_files)%> :extraOutputFile=<%custom_type->input_file->output_file%> <%endfor%> <%if(custom_only || !source_files)%> -c :postexecShell='<%rm%> .c && <%rm%> .h' <%endif%> <%endif%> <%endfor%> <%endfor%> <%scope(leave)%> <%foreach(source_files)%> <%source_file%> <%if(compile_flags)%> -cxx_compiler.args=<%compile_flags%><%if(flag_overrides(source_file, buildflags))%> <%flag_overrides(source_file, buildflags)%><%endif%> <%else%> <%if(flag_overrides(source_file, buildflags))%> -cxx_compiler.args=<%flag_overrides(source_file, buildflags)%> <%endif%> <%endif%> <%endfor%> <%foreach(header_files)%> <%header_file%> <%endfor%> <%foreach(inline_files)%> <%inline_file%> <%endfor%> <%foreach(resource_files)%> <%resource_file%> <%endfor%> <%foreach(documentation_files)%> <%documentation_file%> [Documentation] <%endfor%> ace-6.4.5+dfsg.orig/MPC/templates/wb26exe.mpt0000644000175000017500000000012113154167361016702 0ustar tggtgg// -*- MPC -*- conditional_include "wb26dll" conditional_include "user_wb26exe" ace-6.4.5+dfsg.orig/MPC/templates/nmake.mpd0000644000175000017500000005023213154167361016503 0ustar tggtgg# Microsoft Developer Studio Generated NMAKE File <%marker(top)%> <%foreach(platforms)%> !<%fornotfirst("ELSE")%>IF "$(CFG)" == "" CFG=<%platform%> <%default_configuration%> !MESSAGE No configuration specified. Defaulting to <%platform%> <%default_configuration%>. <%endfor%> !ENDIF <%foreach(platforms)%> !IF <%foreach(configurations)%>"$(CFG)" == "<%platform%> <%configuration%>"<%fornotlast(" || ")%><%endfor%> !ELSE <%endfor%> !MESSAGE Invalid configuration "$(CFG)" specified. !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE <%foreach(platforms)%> !MESSAGE NMAKE /f "<%project_file%>" CFG="<%platform%> <%default_configuration%>" <%endfor%> !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE <%foreach(platforms)%> <%foreach(configurations)%> !MESSAGE "<%platform%> <%configuration%>" (based on "<%platform%> (<%machine_description%>) <%type_description("Dynamic-Link Library")%>") <%endfor%> <%endfor%> !MESSAGE !ERROR An invalid configuration was specified. <%foreach(platforms)%> !ENDIF <%endfor%> !IF "$(OS)" == "Windows_NT" NULL= !ELSE NULL=nul !ENDIF !IF "$(DEPGEN)" == "" !IF EXISTS("$(MPC_ROOT)/depgen.pl") DEPGEN=perl $(MPC_ROOT)/depgen.pl -i -t nmake !ELSEIF EXISTS("$(DEPGEN_ROOT)/depgen.pl") DEPGEN=perl $(DEPGEN_ROOT)/depgen.pl -i -t nmake !ELSEIF EXISTS("$(ACE_ROOT)/bin/depgen.pl") DEPGEN=perl $(ACE_ROOT)/bin/depgen.pl -i -t nmake !ENDIF !ENDIF GENERATED_DIRTY =<%foreach(custom_types)%><%foreach(custom_type->input_files)%><%foreach(custom_type->input_file->output_files)%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>"<%endfor%><%endfor%><%endfor%> <%foreach(platforms)%> <%foreach(configurations)%> !<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%platform%> <%configuration%>" <%if(exename)%> OUTDIR=<%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%> INSTALLDIR=<%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir%><%endif%><%else%><%output_dir%><%endif%> <%else%> <%if(type_is_static)%> OUTDIR=<%libout%> <%else%> <%if(type_is_dynamic)%> OUTDIR=<%if(dllout)%><%dllout%><%else%><%libout%><%endif%> <%endif%> <%endif%> <%endif%> INTDIR=<%intermediate_dir%>\<%project_name%>\<%machine%> ALL : "$(INTDIR)" "$(OUTDIR)"<%if(exename)%><%if(exeout)%> "$(INSTALLDIR)"<%endif%><%endif%><%if(prebuild)%> __prebuild__<%endif%> DEPENDCHECK $(GENERATED_DIRTY)<%if(type_is_dynamic)%><%if(sharedname || staticname)%> "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%>"<%endif%><%endif%><%if(staticname && type_is_static)%> "$(OUTDIR)\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>"<%endif%><%if(exename)%> "$(INSTALLDIR)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%>"<%endif%><%if(postbuild)%> __postbuild__<%endif%> DEPEND : !IF "$(DEPGEN)" == "" @echo No suitable dependency generator could be found. @echo One comes with MPC, just set the MPC_ROOT environment variable @echo to the full path of MPC. You can download MPC from @echo http://www.ociweb.com/products/mpc/down.html !ELSE <%if(source_files || pch_source)%> $(DEPGEN)<%foreach(includes)%> -I"<%include%>"<%endfor%><%foreach(defines cpu_defines common_defines platform_defines macros)%> -D<%define%><%endfor%><%if(unicode)%> -DUNICODE -D_UNICODE<%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%> -D<%staticflag%><%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%> -D<%pch_define%><%endfor%><%endif%> -f "<%noextension(project_file)%>.dep"<%foreach(uniq(source_files))%> "<%source_file%>"<%endfor%><%if(pch_source)%> "<%pch_source%>"<%endif%> <%else%> -@rem <%endif%> !ENDIF REALCLEAN : CLEAN <%if(pdbl && exename)%> -@del /f/q "$(INSTALLDIR)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>.pdb" <%endif%> <%if(sharedname && type_is_dynamic)%> <%if(pdbl)%> -@del /f/q "$(OUTDIR)\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb" <%endif%> -@del /f/q "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%>" -@del /f/q "$(OUTDIR)\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>" -@del /f/q "$(OUTDIR)\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.exp" -@del /f/q "$(OUTDIR)\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.ilk" <%else%> <%if(staticname && type_is_dynamic)%> <%if(pdbl || pdbc)%> -@del /f/q "$(OUTDIR)\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb" <%endif%> -@del /f/q "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%>" <%endif%> <%endif%> <%if(staticname && type_is_static || !sharedname && type_is_dynamic)%> -@del /f/q "$(OUTDIR)\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>" -@del /f/q "$(OUTDIR)\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.exp" -@del /f/q "$(OUTDIR)\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.ilk" <%endif%> <%if(pdbc && type_is_static)%> -@del /f/q "<%libout%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb" <%endif%> <%if(exename)%> -@del /f/q "$(INSTALLDIR)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%>" -@del /f/q "$(INSTALLDIR)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>.ilk" <%endif%> <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> <%foreach(custom_type->input_file->output_files)%> -@del /f/q "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" <%endfor%> <%endfor%> <%endfor%> <%if(postclean)%> -<%eval(postclean)%> <%endif%> "$(INTDIR)" : if not exist "<%intermediate_dir%>\$(NULL)" mkdir "<%intermediate_dir%>" if not exist "<%intermediate_dir%>\<%project_name%>\$(NULL)" mkdir "<%intermediate_dir%>\<%project_name%>" if not exist "$(INTDIR)\$(NULL)" mkdir "$(INTDIR)" CPP=<%cc("cl.exe")%> CPP_COMMON=<%if(TreatWChar_tAsBuiltInType)%>/Zc:wchar_t <%endif%>/nologo <%if(add_compile)%><%add_compile%> <%endif%><%if(optimize)%><%optimize_flags("/O2")%><%else%><%debug_flags("/Ob0")%><%endif%> <%compile_flags%><%foreach(DisableSpecificWarnings)%> /wd<%DisableSpecificWarning%><%endfor%><%if(managed)%> /GX- /Gm- /clr<%endif%><%if(pdbc)%> /Fd"<%if(type_is_static)%><%libout%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb<%else%>$(INTDIR)/<%endif%>"<%endif%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines cpu_defines common_defines platform_defines macros)%>/D <%define%> <%endfor%><%if(unicode)%>/D UNICODE /D _UNICODE <%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%>/D <%dynamicflag%> <%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%>/D <%staticflag%> <%endfor%><%endif%><%if(macro_for_lib_modifier)%><%if(use_lib_modifier)%><%if(lib_modifier)%>/D MPC_LIB_MODIFIER=\"<%lib_modifier%>\"<%endif%><%endif%><%endif%> /c <%if(pch_header)%>CPP_PCH=<%foreach(pch_defines)%>/D <%pch_define%> <%endfor%><%if(pch_source)%>/Yu<%else%>/YX<%endif%>"<%pch_header%>" /Fp"$(INTDIR)\<%transdir(pch_header)%><%basenoextension(pch_header)%>.pch"<%endif%> CPP_PROJ=$(CPP_COMMON) <%if(pch_header)%>$(CPP_PCH) <%endif%>/Fo"<%fo_flag("$(INTDIR)\\\\")%>" <%if(!type_is_static)%> RSC=<%rc("rc.exe")%> <%endif%> <%if(exename || sharedname || staticname)%> <%if(type_is_binary)%> LINK32=<%link("link.exe")%> LINK32_FLAGS=<%systemlibs%><%if(link_options)%> <%link_options%><%endif%><%if(profile)%> /PROFILE<%endif%> <%if(managed)%>/FIXED:NO <%endif%>/INCREMENTAL:<%incremental("NO")%> <%foreach(reverse(libs))%><%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%> <%endfor%><%foreach(reverse(lit_libs))%><%lit_lib%>.lib <%endfor%><%foreach(reverse(pure_libs))%><%pure_lib%> <%endfor%><%foreach(libpaths)%>/libpath:"<%libpath%>" <%endfor%>/nologo<%if(win_version)%> /version:<%win_version%><%endif%><%if(StackReserveSize)%> /stack:<%StackReserveSize%><%if(StackCommitSize)%>,<%StackCommitSize%><%endif%><%endif%> /subsystem:<%subsystem("windows")%><%if(type_is_dynamic)%> <%if(!source_files)%>/noentry <%endif%>/dll<%endif%> <%if(unicode && unicode_mfc_entry && exename && source_files)%>/entry:"<%unicode_mfc_entry%>" <%endif%><%debug_switch("/debug")%> <%if(pdbl)%>/pdb:"<%if(type_is_dynamic)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>.pdb<%endif%><%if(type_is_static)%>$(OUTDIR)\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb<%endif%>" <%endif%>/machine:<%machine("I386")%> /out:"<%if(type_is_dynamic)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%><%endif%>"<%if(type_is_dynamic)%> /implib:"$(OUTDIR)\<%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>"<%endif%> <%endif%> <%if(type_is_static)%> LINK32=<%link("link.exe")%> -lib LINK32_FLAGS=/nologo /machine:<%machine("I386")%><%if(link_options)%> <%link_options%><%endif%> /out:"<%libout%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>" <%endif%> LINK32_OBJS= \ <%if(!type_is_static)%> <%foreach(resource_files)%> "$(INTDIR)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res" \ <%endfor%> <%endif%> <%if(pch_source)%> "$(INTDIR)\<%transdir(pch_source)%><%basenoextension(pch_source)%>.obj" \ <%endif%> <%foreach(uniq(source_files))%> "$(INTDIR)\<%transdir(source_file)%><%basenoextension(source_file)%>.obj"<%fornotlast(" \\")%> <%endfor%> "<%if(type_is_dynamic)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%endif%><%if(type_is_static)%>$(OUTDIR)\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%><%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%><%endif%>" : $(DEF_FILE) $(LINK32_OBJS) <%if(prelink)%> <%eval(prelink)%> <%endif%> $(LINK32) @<< $(LINK32_FLAGS) $(LINK32_OBJS) << if exist "<%if(type_is_dynamic)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%>.manifest<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%>.manifest<%endif%><%if(type_is_static)%>$(OUTDIR)\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>.manifest<%endif%>" mt.exe -manifest "<%if(type_is_dynamic)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%>.manifest<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%>.manifest<%endif%><%if(type_is_static)%>$(OUTDIR)\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>.manifest<%endif%>" -outputresource:$@;<%if(type_is_dynamic)%>2<%endif%><%if(exename)%>1<%endif%><%if(type_is_static)%>2<%endif%> <%endif%> <%if(prebuild)%> __prebuild__: @<%eval(prebuild)%> <%endif%> <%if(postbuild)%> __postbuild__: @<%eval(postbuild)%> <%endif%> <%endfor%> !ENDIF <%endfor%> CLEAN : -@del /f/s/q "$(INTDIR)" <%if(exename)%> "$(INSTALLDIR)" :: if not exist "$(INSTALLDIR)\$(NULL)" mkdir "$(INSTALLDIR)" <%endif%> "$(OUTDIR)" :: if not exist "$(OUTDIR)\$(NULL)" mkdir "$(OUTDIR)" .c{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .cpp{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .cxx{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< << .c{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << .cpp{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << .cxx{$(INTDIR)}.sbr:: $(CPP) @<< $(CPP_PROJ) $< << !IF "$(NO_EXTERNAL_DEPS)" != "1" !IF EXISTS("<%noextension(project_file)%>.dep") !INCLUDE "<%noextension(project_file)%>.dep" !ENDIF !ENDIF <%marker(macros)%> <%foreach(platforms)%> !IF <%foreach(configurations)%>"$(CFG)" == "<%platform%> <%configuration%>" <%fornotlast("|| ")%><%endfor%> <%if(pch_source && pch_header)%> SOURCE="<%pch_source%>" <%foreach(configurations)%> !<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%platform%> <%configuration%>" CPP_SWITCHES=<%if(TreatWChar_tAsBuiltInType)%>/Zc:wchar_t <%endif%>/nologo <%if(add_compile)%><%add_compile%> <%endif%><%if(optimize)%><%optimize_flags%><%else%><%debug_flags%><%endif%> <%compile_flags%><%foreach(DisableSpecificWarnings)%> /wd<%DisableSpecificWarning%><%endfor%><%if(pdbc)%> /Fd"<%if(type_is_static)%><%libout%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb<%else%>$(INTDIR)/<%endif%>"<%endif%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines cpu_defines common_defines platform_defines macros)%>/D <%define%> <%endfor%><%if(unicode)%>/D UNICODE /D _UNICODE <%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%>/D <%dynamicflag%> <%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%>/D <%staticflag%> <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%> <%endfor%>/Fp"$(INTDIR)\<%transdir(pch_header)%><%basenoextension(pch_header)%>.pch" /Yc"<%pch_header%>" <%endif%> /c "$(INTDIR)\<%transdir(pch_source)%><%basenoextension(pch_source)%>.obj" "$(INTDIR)\<%transdir(pch_header)%><%basenoextension(pch_header)%>.pch" : $(SOURCE) <%if(transdir(pch_source))%> @if not exist "$(INTDIR)\<%transdir(pch_source)%>$(NULL)" mkdir "$(INTDIR)\<%transdir(pch_source)%>" <%endif%> $(CPP) @<< $(CPP_SWITCHES) /Fo"$(INTDIR)\<%transdir(pch_source)%><%basenoextension(pch_source)%>.obj" $(SOURCE) << <%endfor%> !ENDIF <%endif%> <%if(exename || sharedname || staticname)%> <%foreach(uniq(source_files))%> SOURCE="<%source_file%>" "$(INTDIR)\<%transdir(source_file)%><%basenoextension(source_file)%>.obj" : $(SOURCE) <%if(transdir(source_file))%> @if not exist "$(INTDIR)\<%transdir(source_file)%>$(NULL)" mkdir "$(INTDIR)\<%transdir(source_file)%>" <%endif%> $(CPP) <%if(pch_header && !flag_overrides(source_file, no_pch))%>$(CPP_PCH) <%endif%>$(CPP_COMMON) <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%><%if(flag_overrides(source_file, managed))%>/GX- /Gm- /clr <%endif%>/Fo"$(INTDIR)\<%transdir(source_file)%><%basenoextension(source_file)%>.obj" $(SOURCE) <%endfor%> <%endif%> <%if(custom_types)%> <%foreach(platforms)%> <%foreach(configurations)%> !<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%platform%> <%configuration%>" <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> SOURCE="<%custom_type->input_file%>" InputPath=<%custom_type->input_file%> <%foreach(custom_type->input_file->output_files)%>"<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" <%endfor%>: $(SOURCE) <%foreach(custom_type->input_file->dependencies)%> "<%custom_type->input_file->dependencie%>"<%endfor%><%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%> "<%dep%><%if(!has_extension(dep))%><%exe_ext%><%endif%>"<%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%> "<%custom_type->dependent%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%>"<%endfor%><%endif%><%endif%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%> "<%dirname(dep_lib)%>\<%libname_prefix%><%basename(dep_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%>"<%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%> "<%dirname(custom_type->dependent_lib)%>\<%libname_prefix%><%basename(custom_type->dependent_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%>"<%endfor%><%endif%><%endif%><%endif%> <-<%normalize(configuration)%>-<%normalize(custom_type)%>-<%normalize(custom_type->input_file)%>.bat @echo off <%if(custom_type->libpath)%> PATH=%PATH%;<%custom_type->libpath%> <%endif%> <%if(flag_overrides(custom_type->input_file, gendir))%> if not exist <%flag_overrides(custom_type->input_file, gendir)%> mkdir <%flag_overrides(custom_type->input_file, gendir)%> <%endif%> <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%>"$(InputPath)" <%custom_type->output_option%><%foreach(custom_type->input_file->output_files)%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>"<%endfor%><%else%>"$(InputPath)"<%endif%> <%if(flag_overrides(custom_type->input_file, postcommand))%> <%foreach(custom_type->input_file)%> <%flag_overrides(custom_type->input_file, postcommand)%> <%endfor%> <%else%> <%if(custom_type->postcommand)%> <%foreach(custom_type->input_file)%> <%custom_type->postcommand%> <%endfor%> <%endif%> <%endif%> <%if(pch_header)%> <%if(custom_type->pch_postrule)%> <%foreach(custom_type->input_file->source_output_files)%> echo #include "<%pch_header%>" > temporary.src type "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>" >> temporary.src move /y temporary.src "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>" <%endfor%> <%endif%> <%endif%> << <%endif%> <%endfor%> <%endfor%> <%endfor%> <%endfor%> !ENDIF <%endif%> <%if(!type_is_static)%> <%foreach(resource_files)%> SOURCE="<%resource_file%>" "$(INTDIR)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res" : $(SOURCE) <%if(transdir(resource_file))%> @if not exist "$(INTDIR)\<%transdir(resource_file)%>$(NULL)" mkdir "$(INTDIR)\<%transdir(resource_file)%>" <%endif%> $(RSC) /l 0x409 /fo"$(INTDIR)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res"<%foreach(defines cpu_defines platform_defines macros)%> /d <%define%><%endfor%><%if(unicode)%> /d UNICODE /d _UNICODE<%endif%><%foreach(includes)%> /i "<%include%>"<%endfor%> $(SOURCE) <%endfor%> <%endif%> <%marker(local)%> !ENDIF <%endfor%> GENERATED : "$(INTDIR)" "$(OUTDIR)" $(GENERATED_DIRTY) -@rem DEPENDCHECK : !IF "$(NO_EXTERNAL_DEPS)" != "1" !IF EXISTS("<%noextension(project_file)%>.dep") @echo Using "<%noextension(project_file)%>.dep" <%if(source_files || pch_source)%> !ELSE @echo Warning: cannot find "<%noextension(project_file)%>.dep" <%endif%> !ENDIF !ENDIF <%marker(bottom)%> ace-6.4.5+dfsg.orig/MPC/templates/vc8vb.mpt0000644000175000017500000000050513154167361016456 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release platforms = AnyCPU trace = 1 Release { optimize = 1 output_dir = Release } Debug { optimize = output_dir = Debug } conditional_include "user_vc8vb" ace-6.4.5+dfsg.orig/MPC/templates/em3.mpd0000644000175000017500000004177313154167361016106 0ustar tggtgg# Microsoft eMbedded Visual Tools Project File - Name="<%project_name%>" - Package Owner=<4> # Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02 # ** DO NOT EDIT ** <%foreach(platforms)%> # TARGTYPE "<%operating_system("Win32")%> (<%platform%>) <%if(exename || sharedname || staticname)%><%if(type_is_static && staticname)%>Static Library<%else%><%type_description%><%endif%><%else%>Dynamic-Link Library<%endif%>" <%type_code%> <%endfor%> CFG=<%project_name%> - <%operating_system("Win32")%> (<%default_platform%>) <%default_configuration%> !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE run the tool that generated this project file and specify the !MESSAGE nmake output type. You can then use the following command: !MESSAGE !MESSAGE NMAKE. !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE CFG="<%project_name%> - <%operating_system%> (<%default_platform%>) <%default_configuration%>" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE <%foreach(platforms)%> <%foreach(configurations)%> !MESSAGE "<%project_name%> - <%operating_system%> (<%platform%>) <%configuration%>" (based on "<%operating_system%> (<%platform%>) <%if(exename || sharedname || staticname)%><%if(type_is_static && staticname)%>Static Library<%else%><%type_description%><%endif%><%else%>Dynamic-Link Library<%endif%>") <%endfor%> <%endfor%> !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" # PROP ATL_Project <%atl_project("2")%> <%foreach(platforms)%> <%foreach(configurations)%> !<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%operating_system%> (<%platform%>) <%configuration%>" # PROP Use_MFC <%use_mfc("0")%> # PROP Use_Debug_Libraries <%if(use_debug_libraries)%><%use_debug_libraries%><%else%>0<%endif%> <%if(exename)%> # PROP Output_Dir "<%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%>\<%machine%>" <%endif%> <%if(type_is_static)%> # PROP Output_Dir "<%output_dir%>\<%machine%>" <%endif%> <%if(type_is_dynamic)%> # PROP Output_Dir "<%libout%>\<%machine%>" <%endif%> # PROP Intermediate_Dir "<%intermediate_dir%>\<%noextension(project_file)%>\<%machine%>" # PROP CPU_ID "{<%cpu_id%>}" # PROP Platform_ID "{<%platform_id%>}" <%if(type_is_dynamic)%> # PROP Ignore_Export_Lib 0 <%endif%> # PROP Target_Dir "" <%if(type_is_static)%> LINK32=link.exe -lib <%endif%> RSC=rc.exe # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CePlatform)"<%foreach(defines common_defines cpu_defines macros)%> /d <%define%><%endfor%><%foreach(includes)%> /i "<%include%>"<%endfor%> /r CPP=<%cpp("cl.exe")%> # ADD CPP /nologo <%if(optimize)%>/O2<%else%>/Ob0<%endif%> <%compile_flags%><%foreach(DisableSpecificWarnings)%> /wd<%DisableSpecificWarning%><%endfor%><%if(pdbc)%> /Fd"<%if(type_is_static)%><%libout%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb<%else%><%intermediate_dir%>\<%noextension(project_file)%>\<%machine%>/<%endif%>"<%endif%> <%cpu_options%> <%foreach(includes)%>/I "<%include%>" <%endfor%>/D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) <%foreach(defines common_defines cpu_defines macros)%>/D <%define%> <%endfor%><%if(type_is_dynamic)%><%foreach(dynamicflags)%>/D <%dynamicflag%> <%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%>/D <%staticflag%> <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%> <%endfor%><%if(pch_source)%>/Yu<%else%>/YX<%endif%>"<%pch_header%>" /Fp"<%intermediate_dir%>\<%noextension(project_file)%>\<%machine%>\<%noextension(pch_header)%>.pch" <%endif%> /FD /Gy /c <%if(compile_flags_removed)%> # SUBTRACT CPP <%compile_flags_removed%> <%endif%> BSC32=bscmake.exe # ADD BSC32 /nologo <%if(sharedname || staticname)%>/o"<%libout%>\<%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>.bsc"<%endif%> <%if(type_is_binary)%> LINK32=link.exe # ADD LINK32 <%systemlibs("winsock.lib commctrl.lib coredll.lib iphlpapi.lib")%><%if(link_options)%> <%link_options%><%endif%> /INCREMENTAL:<%incremental("NO")%> <%foreach(reverse(libs))%><%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%> <%endfor%><%foreach(reverse(lit_libs))%><%lit_lib%>.lib <%endfor%><%foreach(reverse(pure_libs))%><%pure_lib%> <%endfor%><%foreach(libpaths)%>/libpath:"<%libpath%>\<%machine%>" <%endfor%>/nologo /base:"<%base("0x00010000")%>" <%if(type_is_dynamic)%> /implib:"<%libout%>\<%machine%>\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>" /entry:"_DllMainCRTStartup"<%endif%> /nodefaultlib:"$(CENoDefaultLib)<%foreach(ignore_libs)%>,<%ignore_lib%><%endfor%>"<%if(win_version)%> /version:<%win_version%><%endif%><%if(StackReserveSize)%> /stack:<%StackReserveSize%><%if(StackCommitSize)%>,<%StackCommitSize%><%endif%><%endif%> /subsystem:$(CESubsystem) /align:"<%align("4096")%>"<%if(pdbl)%><%if(sharedname)%> /pdb:"<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%machine%>\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb"<%else%><%if(exename)%> /pdb:"<%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir%><%endif%><%else%><%output_dir%><%endif%>\<%machine%>\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>.pdb"<%endif%><%endif%><%else%> /pdb:none<%endif%> <%if(type_is_dynamic)%> <%if(!source_files)%>/noentry <%endif%>/dll<%endif%> <%if(unicode && unicode_mfc_entry && exename && source_files)%>/entry:"<%unicode_mfc_entry%>" <%endif%><%if(use_debug_libraries)%>/debug <%endif%>/machine:<%machine%> /out:"<%if(sharedname)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%machine%>\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%endif%><%if(exename)%><%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir%><%endif%><%else%><%output_dir%><%endif%>\<%machine%>\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%><%endif%>" <%if(link_flags_removed)%> # SUBTRACT LINK32 <%link_flags_removed%> <%endif%> <%endif%> <%if(type_is_static)%> LIB32=link.exe -lib # ADD LIB32 /nologo /out:"<%libout%>\<%machine%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>" <%endif%> <%if(postbuild)%> # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Cmds=<%eval(postbuild)%> # End Special Build Tool <%endif%> <%endfor%> !ENDIF <%endfor%> # Begin Target <%foreach(platforms)%> <%foreach(configurations)%> # Name "<%project_name%> - <%operating_system%> (<%platform%>) <%configuration%>" <%endfor%> <%endfor%> <%if(exename || sharedname || staticname)%> # Begin Group "Source Files" # PROP Default_Filter "<%foreach(ext, extensions(source_files))%><%ext%><%fornotlast(";")%><%endfor%>" <%if(pch_source)%> <%if(pch_header)%> # Begin Source File SOURCE="<%pch_source%>" # ADD CPP /Yc"<%pch_header%>" # End Source File <%endif%> <%endif%> <%if(grouped_source_files)%> <%foreach(sort(grouped_source_files))%> # Begin Group "<%grouped_source_file%>" # PROP Default_Filter "" <%foreach(grouped_source_file->files)%> # Begin Source File SOURCE="<%grouped_source_file->file%>" <%if(duplicate_index(grouped_source_file->file))%> <%foreach(platforms)%> <%foreach(configurations)%> !<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%operating_system%> (<%platform%>) <%configuration%>" # ADD CPP <%if(flag_overrides(grouped_source_file->file, buildflags))%><%flag_overrides(grouped_source_file->file, buildflags)%> <%endif%>/Fo"<%intermediate_dir%>\<%noextension(project_file)%>\<%machine%>\<%basenoextension(grouped_source_file->file)%><%duplicate_index(grouped_source_file->file)%>.obj" <%if(flag_overrides(grouped_source_file->file, no_pch))%> # SUBTRACT CPP /YX /Yc /Yu <%endif%> <%endfor%> !ENDIF <%endfor%> <%else%> <%if(flag_overrides(grouped_source_file->file, buildflags))%> # ADD CPP <%flag_overrides(grouped_source_file->file, buildflags)%> <%endif%> <%if(flag_overrides(grouped_source_file->file, no_pch))%> # SUBTRACT CPP /YX /Yc /Yu <%endif%> <%endif%> # End Source File <%endfor%> # End Group <%endfor%> <%else%> <%foreach(source_files)%> # Begin Source File SOURCE="<%source_file%>" <%if(duplicate_index(source_file))%> <%foreach(platforms)%> <%foreach(configurations)%> !<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%operating_system%> (<%platform%>) <%configuration%>" # ADD CPP <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>/Fo"<%intermediate_dir%>\<%noextension(project_file)%>\<%machine%>\<%basenoextension(source_file)%><%duplicate_index(source_file)%>.obj" <%if(flag_overrides(source_file, no_pch))%> # SUBTRACT CPP /YX /Yc /Yu <%endif%> <%endfor%> !ENDIF <%endfor%> <%else%> <%if(flag_overrides(source_file, buildflags))%> # ADD CPP <%flag_overrides(source_file, buildflags)%> <%endif%> <%if(flag_overrides(source_file, no_pch))%> # SUBTRACT CPP /YX /Yc /Yu <%endif%> <%endif%> # End Source File <%endfor%> <%endif%> # End Group <%endif%> <%if(header_files)%> # Begin Group "Header Files" # PROP Default_Filter "<%foreach(ext, extensions(header_files))%><%ext%><%fornotlast(";")%><%endfor%>" <%if(pch_header)%> # Begin Source File SOURCE="<%pch_header%>" # End Source File <%endif%> <%if(grouped_header_files)%> <%foreach(sort(grouped_header_files))%> # Begin Group "<%grouped_header_file%>" # PROP Default_Filter "" <%foreach(grouped_header_file->files)%> # Begin Source File SOURCE="<%grouped_header_file->file%>" # End Source File <%endfor%> # End Group <%endfor%> <%else%> <%foreach(header_files)%> # Begin Source File SOURCE="<%header_file%>" # End Source File <%endfor%> <%endif%> # End Group <%endif%> <%if(inline_files)%> # Begin Group "Inline Files" # PROP Default_Filter "<%foreach(ext, extensions(inline_files))%><%ext%><%fornotlast(";")%><%endfor%>" <%if(grouped_inline_files)%> <%foreach(sort(grouped_inline_files))%> # Begin Group "<%grouped_inline_file%>" # PROP Default_Filter "" <%foreach(grouped_inline_file->files)%> # Begin Source File SOURCE="<%grouped_inline_file->file%>" # End Source File <%endfor%> # End Group <%endfor%> <%else%> <%foreach(inline_files)%> # Begin Source File SOURCE="<%inline_file%>" # End Source File <%endfor%> <%endif%> # End Group <%endif%> <%if(template_files)%> # Begin Group "Template Files" # PROP Default_Filter "" <%if(grouped_template_files)%> <%foreach(sort(grouped_template_files))%> # Begin Group "<%grouped_template_file%>" # PROP Default_Filter "" <%foreach(grouped_template_file->files)%> # Begin Source File SOURCE="<%grouped_template_file->file%>" # PROP Exclude_From_Build 1 # End Source File <%endfor%> # End Group <%endfor%> <%else%> <%foreach(template_files)%> # Begin Source File SOURCE="<%template_file%>" # PROP Exclude_From_Build 1 # End Source File <%endfor%> <%endif%> # End Group <%endif%> <%if(documentation_files)%> # Begin Group "Documentation" # PROP Default_Filter "" <%if(grouped_documentation_files)%> <%foreach(sort(grouped_documentation_files))%> # Begin Group "<%grouped_documentation_file%>" # PROP Default_Filter "" <%foreach(grouped_documentation_file->files)%> # Begin Source File SOURCE="<%grouped_documentation_file->file%>" # End Source File <%endfor%> # End Group <%endfor%> <%else%> <%foreach(documentation_files)%> # Begin Source File SOURCE="<%documentation_file%>" # End Source File <%endfor%> <%endif%> # End Group <%endif%> <%if(resource_files && !type_is_static)%> # Begin Group "Resource Files" # PROP Default_Filter "rc;ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" <%if(grouped_resource_files)%> <%foreach(sort(grouped_resource_files))%> # Begin Group "<%grouped_resource_file%>" # PROP Default_Filter "" <%foreach(grouped_resource_file->files)%> # Begin Source File SOURCE="<%grouped_resource_file->file%>" # End Source File <%endfor%> # End Group <%endfor%> <%else%> <%foreach(resource_files)%> # Begin Source File SOURCE="<%resource_file%>" # End Source File <%endfor%> <%endif%> # End Group <%endif%> <%foreach(custom_types)%> <%if(custom_type->input_files)%> # Begin Group "<%ucw(custom_type)%>" # PROP Default_Filter "<%foreach(custom_type->inputexts)%><%custom_type->inputext%><%fornotlast(";")%><%endfor%>" <%foreach(custom_type->input_files)%> # Begin Source File SOURCE="<%custom_type->input_file%>" <%if(custom_type->input_file->output_files)%> <%foreach(platforms)%> <%foreach(configurations)%> !<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%operating_system%> (<%platform%>) <%configuration%>" <%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies || (!need_staticflags && (flag_overrides(custom_type->input_file, dependent_libs) || custom_type->dependent_libs)))%> USERDEP__<%basenoextension(custom_type->input_file)%>=<%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%>"<%dep%><%if(!has_extension(dep))%><%exe_ext%><%endif%>"<%fornotlast(" ")%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%>"<%custom_type->dependent%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%>"<%fornotlast(" ")%><%endfor%><%endif%><%endif%><%if(custom_type->input_file->dependencies)%><%foreach(custom_type->input_file->dependencies)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent)%> <%else%><%fornotfirst(" ")%><%endif%>"<%custom_type->input_file->dependencie%>"<%endfor%><%endif%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%> <%else%><%fornotfirst(" ")%><%endif%>"<%dirname(dep_lib)%>\<%machine%>\<%libname_prefix%><%basename(dep_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>"<%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%> <%else%><%fornotfirst(" ")%><%endif%>"<%dirname(custom_type->dependent_lib)%>\<%machine%>\<%libname_prefix%><%basename(custom_type->dependent_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>"<%endfor%><%endif%><%endif%><%endif%> <%endif%> # PROP Ignore_Default_Tool 1 # Begin Custom Build - Invoking <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> on $(InputPath) InputPath="<%custom_type->input_file%>" BuildCmds= \ <%if(custom_type->libpath)%> PATH=%PATH%;<%custom_type->libpath%> \ <%endif%> <%if(flag_overrides(custom_type->input_file, gendir))%> mkdir <%flag_overrides(custom_type->input_file, gendir)%> 2> nul \ <%endif%> <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%>$(InputPath) <%custom_type->output_option%><%foreach(custom_type->input_file->output_files)%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>"<%endfor%><%else%>$(InputPath)<%endif%> \ <%if(flag_overrides(custom_type->input_file, postcommand))%> <%foreach(custom_type->input_file)%> <%flag_overrides(custom_type->input_file, postcommand)%> \ <%endfor%> <%else%> <%if(custom_type->postcommand)%> <%foreach(custom_type->input_file)%> <%custom_type->postcommand%> \ <%endfor%> <%endif%> <%endif%> <%if(pch_header)%> <%if(custom_type->pch_postrule)%> <%foreach(custom_type->input_file->source_output_files)%> echo #include "<%pch_header%>" > temporary.src \ type "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>" >> temporary.src \ move /y temporary.src "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>" <%endfor%> <%endif%> <%endif%> <%foreach(custom_type->input_file->output_files)%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(BuildCmds) <%endfor%> # End Custom Build <%endfor%> !ENDIF <%endfor%> <%else%> # PROP Exclude_From_Build 1 <%endif%> # End Source File <%endfor%> # End Group <%endif%> <%endfor%> # End Target # End Project ace-6.4.5+dfsg.orig/MPC/templates/em3vcplibexe.mpt0000644000175000017500000000542213154167361020017 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" type_description = Application platforms = "WCE ARM" "WCE ARMV4" "WCE emulator" "WCE x86" default_configuration = Debug default_platform = "WCE ARM" configurations = Debug Release common_defines = UNICODE _UNICODE unicode = 1 WCE x86 { type_code = 0x8301 cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = IX86 cpu_defines = _i386_ _X86_ x86 ignore_libs = OLDNAMES.lib pure_libs += $(CEx86Corelibc) } WCE emulator { type_code = 0xa601 cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = IX86 cpu_defines = _i386_ _X86_ x86 ignore_libs = OLDNAMES.lib pure_libs += $(CEx86Corelibc) } WCE ARM { type_code = 0x8501 cpu_id = D6518FFC-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = ARM cpp = clarm.exe cpu_defines = ARM _ARM_ } WCE ARMV4 { type_code = 0xa301 cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099 platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA machine = ARM cpp = clarm.exe cpu_defines = ARM _ARM_ ARMV4 cpu_options = /QRxscale } Release { use_debug_libraries = optimize = 1 compile_flags = /W3 /GR defines = NDEBUG compile_flags_removed = /YX lib_modifier = s output_dir = Static_Release intermediate_dir = Static_Release } Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /Zi /GR /Gy defines = _DEBUG compile_flags_removed = /YX lib_modifier = sd output_dir = Static_Debug intermediate_dir = Static_Debug pdbl = 1 pdbc = 1 } MFC Release { use_debug_libraries = optimize = 1 compile_flags = /W3 /GR defines = NDEBUG _AFXDLL compile_flags_removed = /YX lib_modifier = mfcs output_dir = Static_MFC_Release intermediate_dir = Static_MFC_Release use_mfc = 2 unicode_mfc_entry = wWinMainCRTStartup } MFC Debug { use_debug_libraries = 1 optimize = compile_flags = /W3 /Gm /Zi /GR /Gy defines = _DEBUG _AFXDLL compile_flags_removed = /YX lib_modifier = mfcsd output_dir = Static_MFC_Debug intermediate_dir = Static_MFC_Debug pdbl = 1 pdbc = 1 use_mfc = 2 unicode_mfc_entry = wWinMainCRTStartup } conditional_include "vcpartialmacros" conditional_include "user_em3vcplibexe" ace-6.4.5+dfsg.orig/MPC/templates/vc1xdll.mpt0000644000175000017500000000357613154167361017016 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release common_defines = WIN32 _WINDOWS _CRT_NONSTDC_NO_WARNINGS ConfigurationType = 2 MinimalRebuild = false GenerateDebugInformation = true use_pdb_modifier = 1 pdb_modifier = _dll Release { optimize = MaxSpeed defines = NDEBUG output_dir = Release intermediate_dir = Release EnableIntrinsicFunctions = true WholeProgramOptimization = true } Debug { debug_prj = 1 defines = _DEBUG output_dir = . intermediate_dir = Debug lib_modifier = d pdbl = 1 pdbc = 1 } Memcheck Release { optimize = MaxSpeed defines = NDEBUG output_dir = Release intermediate_dir = Release BasicRuntimeChecks = 0 FixedBaseAddress = 1 EnableIntrinsicFunctions = true WholeProgramOptimization = true pdbl = 1 } Memcheck Debug { debug_prj = 1 defines = _DEBUG output_dir = . intermediate_dir = Debug lib_modifier = d BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 pdbl = 1 } MFC Release { optimize = MaxSpeed defines = NDEBUG output_dir = MFC_Release intermediate_dir = MFC_Release lib_modifier = mfc UseOfMFC = Dynamic EnableIntrinsicFunctions = true WholeProgramOptimization = true } MFC Debug { debug_prj = 1 defines = _DEBUG output_dir = MFC_Debug intermediate_dir = MFC_Debug lib_modifier = mfcd UseOfMFC = Dynamic pdbl = 1 pdbc = 1 } conditional_include "vcpartialmacros" ace-6.4.5+dfsg.orig/MPC/templates/vc7csharp.mpt0000644000175000017500000000045513154167361017332 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release trace = 1 Release { optimize = 1 output_dir = Release } Debug { optimize = output_dir = Debug } conditional_include "user_vc7csharp" ace-6.4.5+dfsg.orig/MPC/templates/wb26dll.mpt0000644000175000017500000001115713154167361016707 0ustar tggtgg// -*- MPC -*- conditional_include "common" lib_prefix = lib lib_ext = .a dll_ext = exe_ext = .out cxx_derivedsigs = *.o ass_derivedsigs = *.o c_derivedsigs = *.o part_derivedsigs = *.o ar_derivedsigs = .a platform = VxWorks VxWorks { platform_name = vxworks-6.4 project_type = DownloadableKernelModuleProject platform_includes = $(WIND_BASE)/target/h $(WIND_BASE)/target/h/wrn/coreip platform_makefilevars = WIND_BASE WIND_USR wrprj_macros = VX_CPU_FAMILY CPU TOOL_FAMILY TOOL TOOL_PATH CC_ARCH_SPEC buildspecs = PPC604gnu PPC603gnu PENTIUM4gnu PPC85XXgnu default_buildspec = PPC604gnu platform_asflags = -DCPU=$(CPU) -DTOOL_FAMILY=$(TOOL_FAMILY) -DTOOL=$(TOOL) -D_WRS_KERNEL platform_cxxflags = -DCPU=$(CPU) -DTOOL_FAMILY=$(TOOL_FAMILY) -DTOOL=$(TOOL) -D_WRS_KERNEL platform_ccflags = -DCPU=$(CPU) -DTOOL_FAMILY=$(TOOL_FAMILY) -DTOOL=$(TOOL) -D_WRS_KERNEL librarian_objects = @$(PRJ_ROOT_DIR)/filelist.txt exe_buildtool = Linker project_type_macro = DKM } linkflags = includedir = // *********************************************************************** // Build Specs Section // *********************************************************************** PPC603gnu { cc_arch_spec = -mcpu=603 -mstrict-align -mno-implicit-fp -D_WRS_HARDWARE_FP -mlongcall cpu = PPC603 tool_family = gnu tool = gnu vx_cpu_family = ppc cxx = ccppc ar = arppc nm = nmppc munchflag = ppc cxx_flags = -ansi -Wall -MD -MP -fexceptions -frtti -fweak -Wunused cxx_dbgflags = -g cxx_nondbgflags = -O2 -fstrength-reduce -fno-builtin ass_flags = -ansi -xassembler-with-cpp -MD -MP ass_dbgflags = -g ass_nondbgflags = -O2 -fstrength-reduce -fno-builtin c_flags = -Wall -MD -MP c_dbgflags = -g c_nondbgflags = -O2 -fstrength-reduce -fno-builtin ar_flags = crus ar_dbgflags = ar_nondbgflags = part_flags = part_dbgflags = part_nondbgflags = linker_flags = -T $(WIND_BASE)/target/h/tool/gnu/ldscripts/link.OUT linker_dbgflags = -g linker_nondbgflags = -O2 -fstrength-reduce -fno-builtin } PPC85XXgnu { cc_arch_spec = -mcpu=8540 -mstrict-align -msoft-float -mabi=no-spe -mlongcall cpu = PPC85XX tool_family = gnu tool = gnu vx_cpu_family = ppc cxx = ccppc ar = arppc nm = nmppc munchflag = ppc cxx_flags = -ansi -Wall -MD -MP -fexceptions -frtti -fweak -Wunused cxx_dbgflags = -g cxx_nondbgflags = -O2 -fstrength-reduce -fno-builtin ass_flags = -ansi -xassembler-with-cpp -MD -MP ass_dbgflags = -g ass_nondbgflags = -O2 -fstrength-reduce -fno-builtin c_flags = -Wall -MD -MP c_dbgflags = -g c_nondbgflags = -O2 -fstrength-reduce -fno-builtin ar_flags = crus ar_dbgflags = ar_nondbgflags = part_flags = part_dbgflags = part_nondbgflags = linker_flags = -T $(WIND_BASE)/target/h/tool/gnu/ldscripts/link.OUT linker_dbgflags = -g linker_nondbgflags = -O2 -fstrength-reduce -fno-builtin } PPC604gnu { cc_arch_spec = -mcpu=604 -mstrict-align -mno-implicit-fp -mlongcall cpu = PPC604 tool_family = gnu tool = gnu vx_cpu_family = ppc cxx = ccppc ar = arppc nm = nmppc munchflag = ppc cxx_flags = -ansi -Wall -MD -MP -fexceptions -frtti -fweak -Wunused cxx_dbgflags = -g cxx_nondbgflags = -O2 -fstrength-reduce -fno-builtin ass_flags = -ansi -xassembler-with-cpp -MD -MP ass_dbgflags = -g ass_nondbgflags = -O2 -fstrength-reduce -fno-builtin c_flags = -Wall -MD -MP c_dbgflags = -g c_nondbgflags = -O2 -fstrength-reduce -fno-builtin ar_flags = crus ar_dbgflags = ar_nondbgflags = part_flags = part_dbgflags = part_nondbgflags = linker_flags = -T $(WIND_BASE)/target/h/tool/gnu/ldscripts/link.OUT linker_dbgflags = -g linker_nondbgflags = -O2 -fstrength-reduce -fno-builtin } PENTIUM4gnu { cc_arch_spec = -mtune=pentium4 -march=pentium4 cpu = PENTIUM4 tool_family = gnu tool = gnu vx_cpu_family = pentium cxx = ccpentium ar = arpentium nm = nmpentium munchflag = pentium cxx_flags = -ansi -Wall -MD -MP -fexceptions -frtti -fweak -Wunused cxx_dbgflags = -g cxx_nondbgflags = -O2 -nostdlib -fno-builtin -fno-defer-pop -mno-sse -mno-sse2 ass_flags = -ansi -xassembler-with-cpp -MD -MP ass_dbgflags = -g ass_nondbgflags = -O2 -nostdlib -fno-builtin -fno-defer-pop -mno-sse -mno-sse2 c_flags = -Wall -MD -MP c_dbgflags = -g c_nondbgflags = -O2 -nostdlib -fno-builtin -fno-defer-pop -mno-sse -mno-sse2 ar_flags = crus ar_dbgflags = ar_nondbgflags = part_flags = part_dbgflags = part_nondbgflags = linker_flags = -T $(WIND_BASE)/target/h/tool/gnu/ldscripts/link.OUT linker_dbgflags = -g linker_nondbgflags = -O2 -nostdlib -fno-builtin -fno-defer-pop -mno-sse -mno-sse2 } conditional_include "user_wb26dll" ace-6.4.5+dfsg.orig/MPC/templates/cdt6project.mpd0000644000175000017500000001155513154167361017644 0ustar tggtgg <%project_name%> Generated by MPC <%if(after)%> <%endif%> org.eclipse.cdt.managedbuilder.core.genmakebuilder clean,full,incremental, ?name? org.eclipse.cdt.make.core.append_environment true org.eclipse.cdt.make.core.autoBuildTarget all org.eclipse.cdt.make.core.buildArguments org.eclipse.cdt.make.core.buildCommand make org.eclipse.cdt.make.core.buildLocation ${workspace_loc:/<%project_name%>/<%exeout%>} org.eclipse.cdt.make.core.cleanBuildTarget clean org.eclipse.cdt.make.core.contents org.eclipse.cdt.make.core.activeConfigSettings org.eclipse.cdt.make.core.enableAutoBuild false org.eclipse.cdt.make.core.enableCleanBuild true org.eclipse.cdt.make.core.enableFullBuild true org.eclipse.cdt.make.core.fullBuildTarget all org.eclipse.cdt.make.core.stopOnError true org.eclipse.cdt.make.core.useDefaultBuildCmd true org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder <%if(scanner_config_builder_triggers)%> <%scanner_config_builder_triggers%> <%endif%> org.eclipse.cdt.core.cnature org.eclipse.cdt.core.ccnature org.eclipse.cdt.managedbuilder.core.managedBuildNature org.eclipse.cdt.managedbuilder.core.ScannerConfigNature <%foreach(source_files)%> <%if(starts_with(source_file, \.\.))%><%basename(source_file)%><%else%><%source_file%><%endif%> 1 <%full_path(source_file)%> <%endfor%> <%foreach(header_files)%> <%if(starts_with(header_file, \.\.))%><%basename(header_file)%><%else%><%header_file%><%endif%> 1 <%full_path(header_file)%> <%endfor%> <%if(pch_header)%> <%if(starts_with(pch_header, \.\.))%><%basename(pch_header)%><%else%><%pch_header%><%endif%> 1 <%full_path(pch_header)%> <%endif%> <%foreach(inline_files)%> <%if(starts_with(inline_file, \.\.))%><%basename(inline_file)%><%else%><%inline_file%><%endif%> 1 <%full_path(inline_file)%> <%endfor%> <%foreach(template_files)%> <%if(starts_with(template_file, \.\.))%><%basename(template_file)%><%else%><%template_file%><%endif%> 1 <%full_path(template_file)%> <%endfor%> <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> <%if(starts_with(custom_type->input_file, \.\.))%><%basename(custom_type->input_file)%><%else%><%custom_type->input_file%><%endif%> 1 <%full_path(custom_type->input_file)%> <%endfor%> <%endfor%> <%if(custom_only)%> <%project_name%>.mk 1 <%full_path(..)%>/<%project_name%>.mk <%endif%> ace-6.4.5+dfsg.orig/MPC/templates/vc8dll.mpt0000644000175000017500000000301613154167361016622 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release common_defines = WIN32 _WINDOWS _CRT_NONSTDC_NO_WARNINGS ConfigurationType = 2 Detect64BitPortabilityProblems = false MinimalRebuild = false conditional_include "vc8platforms" Release { LinkIncremental = 1 optimize = 2 defines = NDEBUG output_dir = Release intermediate_dir = Release GenerateDebugInformation = false } Debug { debug_prj = 1 defines = _DEBUG output_dir = . intermediate_dir = Debug lib_modifier = d } Memcheck Release { optimize = 2 defines = NDEBUG output_dir = Release intermediate_dir = Release BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 } Memcheck Debug { debug_prj = 1 defines = _DEBUG output_dir = . intermediate_dir = Debug lib_modifier = d BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 } MFC Release { LinkIncremental = 1 optimize = 2 defines = NDEBUG output_dir = MFC_Release intermediate_dir = MFC_Release lib_modifier = mfc UseOfMFC = 2 GenerateDebugInformation = false } MFC Debug { debug_prj = 1 defines = _DEBUG output_dir = MFC_Debug intermediate_dir = MFC_Debug lib_modifier = mfcd UseOfMFC = 2 } conditional_include "vcpartialmacros" conditional_include "user_vc8dll" ace-6.4.5+dfsg.orig/MPC/templates/vc11exe.mpt0000644000175000017500000000016413154167361016703 0ustar tggtgg// -*- MPC -*- conditional_include "vc11platforms" conditional_include "vc1xexe" conditional_include "user_vc11exe" ace-6.4.5+dfsg.orig/MPC/templates/vc11dll.mpt0000644000175000017500000000016413154167361016675 0ustar tggtgg// -*- MPC -*- conditional_include "vc11platforms" conditional_include "vc1xdll" conditional_include "user_vc11dll" ace-6.4.5+dfsg.orig/MPC/templates/vc7exe.mpt0000644000175000017500000000434413154167361016634 0ustar tggtgg// -*- MPC -*- conditional_include "common" conditional_include "windowscommon" configurations = Debug Release common_defines = WIN32 _CONSOLE configuration_type = 1 subsystem = 1 output_subdir = I386 Release { LinkIncremental = 1 optimize = 3 defines = NDEBUG output_dir = Release intermediate_dir = Release } Debug { optimize = debug_prj = 1 defines = _DEBUG intermediate_dir = Debug lib_modifier = d pdbl = 1 pdbc = 1 } Memcheck Release { optimize = 3 defines = NDEBUG output_dir = Release intermediate_dir = Release BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 pdbl = 1 } Memcheck Debug { optimize = debug_prj = 1 defines = _DEBUG intermediate_dir = Debug lib_modifier = d pdbc = 1 BasicRuntimeChecks = 0 LinkIncremental = 1 FixedBaseAddress = 1 pdbl = 1 } MFC Release { LinkIncremental = 1 optimize = 3 common_defines = WIN32 _WINDOWS defines = NDEBUG _AFXDLL output_dir = MFC_Release intermediate_dir = MFC_Release lib_modifier = mfc use_mfc = 2 unicode_mfc_entry = wWinMainCRTStartup } MFC Debug { optimize = debug_prj = 1 common_defines = WIN32 _WINDOWS defines = _DEBUG _AFXDLL output_dir = MFC_Debug intermediate_dir = MFC_Debug lib_modifier = mfcd pdbl = 1 pdbc = 1 use_mfc = 2 unicode_mfc_entry = wWinMainCRTStartup } ETS Release { optimize = 3 defines = NDEBUG output_dir = ETS_Release intermediate_dir = ETS_Release runtime_library = 2 GenerateMapFile = TRUE lit_libs += etsapi wsock32 } ETS Debug { optimize = defines = _DEBUG output_dir = ETS_Debug intermediate_dir = ETS_Debug lib_modifier = d runtime_library = 3 pdbl = 1 pdbc = 1 GenerateMapFile = TRUE lit_libs += etsapi wsock32 } conditional_include "vcpartialmacros" conditional_include "user_vc7exe" ace-6.4.5+dfsg.orig/MPC/templates/automake.mpd0000644000175000017500000004270413154167361017223 0ustar tggtgg# @file <%project_file%> # <%marker(top)%> <%if(requires || avoids)%> <%foreach(uniq(requires))%> if BUILD_<%uc(require)%> <%endfor%> <%foreach(uniq(avoids))%> if !BUILD_<%uc(avoid)%> <%endfor%> <%endif%> <%marker(macros)%> <%if(man_files)%> man_MANS += <%man_files%> <%endif%> <%if(script_files)%> <%if(install_this_target)%>bin<%else%>noinst<%endif%>_SCRIPTS += <%script_files%> <%endif%> <%if(custom_types)%> <%foreach(custom_types)%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> BUILT_SOURCES += \ <%foreach(output_file, sort(custom_type->input_file->output_files))%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(output_file)%><%else%><%output_file%><%endif%><%fornotlast(" \\")%> <%endfor%> CLEANFILES += \ <%if(multiple(custom_type->input_file->output_files))%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basenoextension(custom_type->input_file)%><%else%><%noextension(custom_type->input_file)%><%endif%>-stamp<%keyname_used(custom_type->input_file, first)%> \ <%endif%> <%foreach(output_file, sort(custom_type->input_file->output_files))%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(output_file)%><%else%><%output_file%><%endif%><%fornotlast(" \\")%> <%endfor%> <%if(multiple(custom_type->input_file->output_files))%> <%foreach(output_file, sort(custom_type->input_file->output_files))%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(output_file)%><%else%><%output_file%><%endif%><%fornotlast(" ")%><%endfor%>: <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basenoextension(custom_type->input_file)%><%else%><%noextension(custom_type->input_file)%><%endif%>-stamp<%keyname_used(custom_type->input_file, second)%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basenoextension(custom_type->input_file)%><%else%><%noextension(custom_type->input_file)%><%endif%>-stamp<%keyname_used(custom_type->input_file, third)%>: $(srcdir)/<%custom_type->input_file%><%if(custom_type->input_file->dependencies)%><%foreach(custom_type->input_file->dependencies)%> <%scope(enter, escape, \\s)%><%custom_type->input_file->dependencie%><%scope(leave)%><%endfor%><%endif%><%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%> <%scope(enter, escape, \\s)%><%dep%><%scope(leave)%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%> <%scope(enter, escape, \\s)%><%custom_type->dependent%><%scope(leave)%><%endfor%><%endif%><%endif%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%> <%scope(enter, escape, \\s)%><%dirname(dep_lib)%>/lib<%libname_prefix%><%basename(dep_lib)%><%if(configurations)%><%lib_modifier%><%endif%>.la<%scope(leave)%><%endfor%><%else%><%foreach(custom_type->dependent_libs)%> <%scope(enter, escape, \\s)%><%dirname(custom_type->dependent_lib)%>/lib<%libname_prefix%><%basename(custom_type->dependent_lib)%><%if(configurations)%><%lib_modifier%><%endif%>.la<%scope(leave)%><%endfor%><%endif%><%endif%> <%else%> <%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/lib<%libname_prefix%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(" ")%><%endfor%>: $(srcdir)/<%custom_type->input_file%><%if(custom_type->input_file->dependencies)%><%foreach(custom_type->input_file->dependencies)%> <%scope(enter, escape, \\s)%><%custom_type->input_file->dependencie%><%scope(leave)%><%endfor%><%endif%><%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%> <%scope(enter, escape, \\s)%><%dep%><%scope(leave)%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%> <%scope(enter, escape, \\s)%><%custom_type->dependent%><%scope(leave)%><%endfor%><%endif%><%endif%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%> <%scope(enter, escape, \\s)%><%dirname(dep_lib)%>/lib<%libname_prefix%><%basename(dep_lib)%><%if(configurations)%><%lib_modifier%><%endif%>.la<%scope(leave)%><%endfor%><%else%><%foreach(custom_type->dependent_libs)%> <%scope(enter, escape, \\s)%><%dirname(custom_type->dependent_lib)%>/lib<%libname_prefix%><%basename(custom_type->dependent_lib)%><%if(configurations)%><%lib_modifier%><%endif%>.la<%scope(leave)%><%endfor%><%endif%><%endif%> <%endif%> <%if(flag_overrides(custom_type->input_file, gendir))%> mkdir -p <%flag_overrides(custom_type->input_file, gendir)%> <%endif%> <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%>$(srcdir)/<%custom_type->input_file%> <%custom_type->output_option%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_files)%><%else%><%custom_type->input_file->output_files%><%endif%><%else%>$(srcdir)/<%custom_type->input_file%><%endif%> <%if(flag_overrides(custom_type->input_file, postcommand))%> <%foreach(custom_type->input_file)%> <%flag_overrides(custom_type->input_file, postcommand)%> <%endfor%> <%else%> <%if(custom_type->postcommand)%> <%foreach(custom_type->input_file)%> <%custom_type->postcommand%> <%endfor%> <%endif%> <%endif%> <%if(multiple(custom_type->input_file->output_files))%> @touch "$@" <%endif%> <%endif%> <%endfor%> <%endfor%> <%endif%> <%marker(local)%> <%if(exename || sharedname || staticname)%> <%if(source_files)%> <%if(configurations)%> <%foreach(configurations)%> <%if(exename)%> <%if(install_this_target)%>bin<%else%>noinst<%endif%>_PROGRAMS += <%exename%><%lib_modifier%> <%configuration%> : <%exename%><%lib_modifier%> <%else%> <%if(install_this_target)%>lib<%else%>noinst<%endif%>_LTLIBRARIES += lib<%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%lib_modifier%>.la <%configuration%> : lib<%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%lib_modifier%>.la <%endif%> <%endfor%> <%else%> <%if(exename)%> <%if(install_this_target)%>bin<%else%>noinst<%endif%>_PROGRAMS += <%exename%> <%else%> <%if(install_this_target)%>lib<%else%>noinst<%endif%>_LTLIBRARIES += lib<%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>.la <%endif%> <%endif%> <%endif%> <%if(includes || defines || common_defines || macros || need_staticflags || dynamicflags || compile_flags)%> <%if(exename)%> <%normalize(exename)%>_CPPFLAGS<%if(configurations)%>_COMMON<%endif%> = \ <%else%> lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%if(!configurations)%>_la<%endif%>_CPPFLAGS<%if(configurations)%>_COMMON<%endif%> = \ <%endif%> <%foreach(includes)%> -I<%include%><%if(defines || common_defines || macros || need_staticflags || dynamicflags || compile_flags && !configurations)%> \<%else%><%fornotlast(" \\")%><%endif%> <%endfor%> <%foreach(defines common_defines macros)%> -D<%define%><%if(need_staticflags || dynamicflags || compile_flags && !configurations)%> \<%else%><%fornotlast(" \\")%><%endif%> <%endfor%> <%if(compile_flags && !configurations)%> <%foreach(compile_flags)%> <%compile_flag%><%if(need_staticflags || dynamicflags)%> \<%else%><%fornotlast(" \\")%><%endif%> <%endfor%> <%endif%> <%if(need_staticflags)%> <%if(staticflags)%> <%foreach(staticflags)%> -D<%staticflag%><%fornotlast(" \\")%> <%endfor%> <%else%> -D__NO_STATIC_FLAGS_AVAILABLE__ <%endif%> <%else%> <%foreach(dynamicflags)%> -D<%dynamicflag%><%fornotlast(" \\")%> <%endfor%> <%endif%> <%if(configurations)%> <%foreach(configurations)%> <%if(exename)%> <%normalize(exename)%><%lib_modifier%>_CPPFLAGS = $(<%normalize(exename)%>_CPPFLAGS_COMMON)<%if(compile_flags)%> <%compile_flags%><%endif%> <%else%> lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la_CPPFLAGS = $(lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_CPPFLAGS_COMMON)<%if(compile_flags)%> <%compile_flags%><%endif%> <%endif%> <%endfor%> <%endif%> <%endif%> <%if(source_files)%> <%if(exename)%> <%normalize(exename)%>_SOURCES<%if(configurations)%>_COMMON<%endif%> = \ <%else%> lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%if(!configurations)%>_la<%endif%>_SOURCES<%if(configurations)%>_COMMON<%endif%> = \ <%endif%> <%foreach(source_file, sort(source_files))%> <%if(!flag_overrides(source_file, buildflags))%> <%source_file%> \ <%endif%> <%endfor%> <%if(exename)%> <%foreach(header_file, sort(header_files inline_files))%> <%header_file%><%fornotlast(" \\")%> <%endfor%> <%endif%> <%if(configurations)%> <%foreach(configurations)%> <%if(exename)%> <%normalize(exename)%><%lib_modifier%>_SOURCES = $(<%normalize(exename)%>_SOURCES_COMMON) <%else%> lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la_SOURCES = $(lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_SOURCES_COMMON) <%endif%> <%endfor%> <%endif%> <%if(libpaths && contains(libpaths, \.\./))%> <%foreach(libpaths)%> <%if(contains(libpath, \.\./))%> <%libpath%>: mkdir -p <%libpath%> <%endif%> <%endfor%> <%if(exename)%> <%normalize(exename)%>_DEPENDENCIES<%if(configurations)%>_COMMON<%endif%> = \ <%else%> lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%if(!configurations)%>_la<%endif%>_DEPENDENCIES<%if(configurations)%>_COMMON<%endif%> = \ <%endif%> <%foreach(libpaths)%><%if(contains(libpath, \.\./))%> <%libpath%><%endif%><%endfor%> <%if(configurations)%> <%foreach(configurations)%> <%if(exename)%> <%normalize(exename)%><%lib_modifier%>_DEPENDENCIES += $(<%normalize(exename)%>_DEPENDENCIES_COMMON) <%else%> lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la_DEPENDENCIES += \ $(lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_DEPENDENCIES_COMMON) <%endif%> <%endfor%> <%endif%> <%endif%> <%if(exename)%> <%if(linkflags || libpaths)%> <%normalize(exename)%>_LDFLAGS<%if(configurations)%>_COMMON<%endif%> = \ <%linkflags%><%foreach(libpaths)%> -L<%libpath%><%endfor%> <%if(configurations)%> <%foreach(configurations)%> <%normalize(exename)%><%lib_modifier%>_LDFLAGS = $(<%normalize(exename)%>_LDFLAGS_COMMON) <%endfor%> <%endif%> <%endif%> <%else%> <%if(linkflags || libpaths || am_version && install_this_target || am_release && install_this_target)%> lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%if(!configurations)%>_la<%endif%>_LDFLAGS<%if(configurations)%>_COMMON<%endif%> = \ <%if(am_version && install_this_target)%> -version-number <%am_version%><%else%><%if(am_release && install_this_target)%> -release <%am_release%><%endif%><%endif%><%if(linkflags)%> <%linkflags%><%endif%><%foreach(libpaths)%> -L<%libpath%><%endfor%> <%if(configurations)%> <%foreach(configurations)%> lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la_LDFLAGS = $(lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_LDFLAGS_COMMON) <%endfor%> <%endif%> <%endif%> <%endif%> <%endif%> <%if(configurations)%> <%foreach(configurations)%> <%if(exename)%> <%if(libs || pure_libs || lit_libs)%> <%normalize(exename)%><%lib_modifier%>_LDADD = \ <%foreach(libs)%> lib<%libname_prefix%><%lib%><%lib_modifier%>.la<%if(lit_libs || pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%> <%endfor%> <%foreach(lit_libs)%> -l<%lit_lib%><%if(use_lib_modifier_for_lit_libs)%><%lib_modifier%><%endif%><%if(pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%> <%endfor%> <%foreach(pure_libs)%> <%pure_lib%><%fornotlast(" \\")%> <%endfor%> <%endif%> <%else%> <%if(install_this_target)%> <%if(libs || pure_libs || lit_libs)%> lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la_LIBADD = \ <%foreach(libs)%> lib<%libname_prefix%><%lib%><%lib_modifier%>.la<%if(lit_libs || pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%> <%endfor%> <%foreach(lit_libs)%> -l<%lit_lib%><%if(use_lib_modifier_for_lit_libs)%><%lib_modifier%><%endif%><%if(pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%> <%endfor%> <%foreach(pure_libs)%> <%pure_lib%><%fornotlast(" \\")%> <%endfor%> <%endif%> <%endif%> <%endif%> <%endfor%> <%else%> <%if(exename)%> <%if(libs || pure_libs || lit_libs)%> <%normalize(exename)%>_LDADD = \ <%foreach(libs)%> lib<%libname_prefix%><%lib%>.la<%if(lit_libs || pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%> <%endfor%> <%foreach(lit_libs)%> -l<%lit_lib%><%if(use_lib_modifier_for_lit_libs)%><%lib_modifier%><%endif%><%if(pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%> <%endfor%> <%foreach(pure_libs)%> <%pure_lib%><%fornotlast(" \\")%> <%endfor%> <%endif%> <%else%> <%if(install_this_target)%> <%if(libs || pure_libs || lit_libs)%> lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la_LIBADD = \ <%foreach(libs)%> lib<%libname_prefix%><%lib%><%lib_modifier%>.la<%if(lit_libs || pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%> <%endfor%> <%foreach(lit_libs)%> -l<%lit_lib%><%if(use_lib_modifier_for_lit_libs)%><%lib_modifier%><%endif%><%if(pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%> <%endfor%> <%foreach(pure_libs)%> <%pure_lib%><%fornotlast(" \\")%> <%endfor%> <%endif%> <%endif%> <%endif%> <%endif%> <%endif%> <%if(!exename)%> <%if(header_files || inline_files || template_files || idl_files || pidl_files)%> <%if(includedir)%> <%project_name%>_includedir = <%includedir%> <%endif%> <%if(install_headers)%><%project_name%>_include<%else%>noinst<%endif%>_HEADERS += \ <%foreach(header, sort(header_files inline_files template_files idl_files pidl_files))%> <%header%><%fornotlast(" \\")%> <%endfor%> <%endif%> <%endif%> <%if(pkgconfig_files)%> pkgconfig_DATA += \ <%foreach(pkgconfig_files)%> <%basenoextension(pkgconfig_file)%><%fornotlast(" \\")%> <%endfor%> CLEANFILES += \ <%foreach(pkgconfig_files)%> <%basenoextension(pkgconfig_file)%><%fornotlast(" \\")%> <%endfor%> <%foreach(pkgconfig_files)%> <%basenoextension(pkgconfig_file)%>: ${top_builddir}/config.status ${srcdir}/<%pkgconfig_file%> ${top_builddir}/config.status --file "$@":${srcdir}/<%pkgconfig_file%> <%endfor%> <%endif%> <%foreach(sort(source_files))%> <%if(flag_overrides(source_file, buildflags))%> <%if(configurations)%> <%foreach(configurations)%> <%if(exename)%><%normalize(exename)%><%lib_modifier%>_LDADD<%else%>lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la_LIBADD<%endif%> += lib<%normalize(source_file)%>_convenience<%forcount%><%lib_modifier%>.la noinst_LTLIBRARIES += lib<%normalize(source_file)%>_convenience<%forcount%><%lib_modifier%>.la lib<%normalize(source_file)%>_convenience<%forcount%><%lib_modifier%>_la_SOURCES = <%source_file%> lib<%normalize(source_file)%>_convenience<%forcount%><%lib_modifier%>_la_CPPFLAGS = $(<%if(exename)%><%normalize(exename)%><%lib_modifier%><%else%>lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la<%endif%>_CPPFLAGS) <%flag_overrides(source_file, buildflags)%><%if(compile_flags)%> <%compile_flags%><%endif%> <%endfor%> <%else%> <%if(exename)%><%normalize(exename)%>_LDADD<%else%>lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_LIBADD<%endif%> += lib<%normalize(source_file)%>_convenience<%forcount%>.la noinst_LTLIBRARIES += lib<%normalize(source_file)%>_convenience<%forcount%>.la lib<%normalize(source_file)%>_convenience<%forcount%>_la_SOURCES = <%source_file%> lib<%normalize(source_file)%>_convenience<%forcount%>_la_CPPFLAGS = $(<%if(exename)%><%normalize(exename)%><%else%>lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la<%endif%>_CPPFLAGS) <%flag_overrides(source_file, buildflags)%><%if(compile_flags)%> <%compile_flags%><%endif%> <%endif%> <%endif%> <%endfor%> <%if(postbuild)%> all: __postbuild__ __postbuild__: @<%eval(postbuild)%> <%endif%> <%if(avoids || requires)%> <%foreach(reverse(uniq(avoids)))%> endif !BUILD_<%uc(avoid)%> <%endfor%> <%foreach(reverse(uniq(requires)))%> endif BUILD_<%uc(require)%> <%endfor%> <%endif%> <%if(pkgconfig_files || resource_files)%> EXTRA_DIST += \ <%foreach(extra_dist, sort(pkgconfig_files resource_files))%> <%extra_dist%><%fornotlast(" \\")%> <%endfor%> <%endif%> <%marker(bottom)%> ace-6.4.5+dfsg.orig/MPC/mpc.pl0000755000175000017500000000402513154167361014026 0ustar tggtgg#! /usr/bin/perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # ****************************************************************** # Author: Chad Elliott # Date: 6/17/2002 # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** require 5.006; use strict; use FindBin; use File::Spec; use File::Basename; ## Sometimes $FindBin::RealBin will end up undefined. If it is, we need ## to use the directory of the built-in script name. And, for VMS, we ## have to convert that into a UNIX path so that Perl can use it ## internally. my $basePath = (defined $FindBin::RealBin && $FindBin::RealBin ne '' ? $FindBin::RealBin : File::Spec->rel2abs(dirname($0))); $basePath = VMS::Filespec::unixify($basePath) if ($^O eq 'VMS'); ## Add the full path to the MPC modules to the Perl include path my $mpcpath = $basePath; unshift(@INC, $mpcpath . '/modules'); ## If the ACE_ROOT environment variable is defined and this version of ## MPC is located inside the directory to which ACE_ROOT points, we will ## assume that the user wanted the ACE specific version of this script. ## We will change the $basePath to what it would have been had the user ## run this script out of $ACE_ROOT/bin. my $aceroot = $ENV{ACE_ROOT}; $aceroot =~ s!\\!/!g if (defined $aceroot); $basePath = $aceroot . '/bin/MakeProjectCreator' if (defined $aceroot && $aceroot eq dirname($basePath)); require Driver; # ************************************************************ # Subroutine Section # ************************************************************ sub getBasePath { return $mpcpath; } # ************************************************************ # Main Section # ************************************************************ my $driver = new Driver($basePath, Driver::projects()); exit($driver->run(@ARGV)); ace-6.4.5+dfsg.orig/MPC/devtools/0000775000175000017500000000000013157240624014544 5ustar tggtggace-6.4.5+dfsg.orig/MPC/devtools/highlight_template.pl0000755000175000017500000001505513154167361020755 0ustar tggtgg#! /usr/bin/perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # ****************************************************************** # Author: Chad Elliott # Date: 2/16/2006 # ****************************************************************** # ****************************************************************** # Pragma Section # ****************************************************************** use strict; use FileHandle; use FindBin; use File::Spec; use File::Basename; my $basePath = $FindBin::Bin; if ($^O eq 'VMS') { $basePath = File::Spec->rel2abs(dirname($0)) if ($basePath eq ''); $basePath = VMS::Filespec::unixify($basePath); } $basePath = dirname($basePath); unshift(@INC, $basePath . '/modules'); require ProjectCreator; require TemplateParser; # ****************************************************************** # Data Section # ****************************************************************** my %keywords; my %arrow_op; my $ifmod = 0; my $formod = 0; my $cmod = 50; my %keycolors = (0 => [160, 32, 240], 1 => [255, 50, 50], 2 => [50, 50, 255], ); my $version = '1.3'; # ****************************************************************** # Subroutine Section # ****************************************************************** sub setup_keywords { ## Get the main MPC keywords my $keywords = ProjectCreator::getKeywords(); foreach my $key (keys %$keywords) { $keywords{$key} = 0; } ## Get the pseudo template variables my $pjc = new ProjectCreator(); $keywords = $pjc->get_command_subs(); foreach my $key (keys %$keywords) { $keywords{$key} = 0; } ## Get the template function names $keywords = TemplateParser::getKeywords(); foreach my $key (keys %$keywords) { $keywords{$key} = 0; } ## Get the template parser arrow operator keys $keywords = TemplateParser::getArrowOp(); foreach my $key (keys %$keywords) { $arrow_op{$key} = 0; } ## These TemplateParser keywords need special values so ## that the color coding will recognize these as different ## from the rest of the keywords foreach my $key ('if', 'else', 'endif') { $keywords{$key} = 1; } foreach my $key ('foreach', 'forfirst', 'fornotfirst', 'fornotlast', 'forlast', 'endfor') { $keywords{$key} = 2; } } sub convert_to_html { my $line = shift; $line =~ s/&/&/g; $line =~ s//>/g; $line =~ s/"/"/g; $line =~ s/ / /g; $line =~ s/\t/        /g; $line =~ s/\n/
    /; return $line; } sub usageAndExit { print "highlight_template.pl v$version\n", "Usage: ", basename($0), "