NO

Author Topic: How to use POMAKE?  (Read 11752 times)

PhilG57

  • Guest
How to use POMAKE?
« on: June 06, 2012, 04:20:23 PM »
I have to admit I don't know how to use POMAKE.  I know the ".ppj" file changes when I make changes within the workspace or project, but it is difficult to correlate these changes to ".ppj" changes.  I understand the ".ppj" is pretty much a text file with embedded make commands, but I don't know how to access or edit that file directly.  Thanks. 


CommonTater

  • Guest
Re: How to use POMAKE?
« Reply #1 on: June 06, 2012, 04:26:23 PM »
I have to admit I don't know how to use POMAKE.  I know the ".ppj" file changes when I make changes within the workspace or project, but it is difficult to correlate these changes to ".ppj" changes.  I understand the ".ppj" is pretty much a text file with embedded make commands, but I don't know how to access or edit that file directly.  Thanks. 

Pelles Project files are plain text, you can open them with notepad.  BUT ... be warned... unless you know exactly what you are doing it is far easier to screw up your project than it is to fix it.

As with most things in Pelles C, your best information source for POMAKE is the help file... 
Help -> Contents -> Command line tools -> POMAKE


PhilG57

  • Guest
Re: How to use POMAKE?
« Reply #2 on: June 06, 2012, 04:31:23 PM »
Thanks, but the help file 'General description' says "...when POMAKE starts....".  How do I invoke POMAKE directly, preferably from within the overall workspace and/or project?  Do I have to invoke it directly much as I do for the complete IDE environment?  Thanks again. 

CommonTater

  • Guest
Re: How to use POMAKE?
« Reply #3 on: June 06, 2012, 05:16:11 PM »
These are command line tools... They have no GUI.  You can't simply click on them; you have to execute them from a command shell  ...  once you have a command shell open in your project's directory you would type (for example) pomake /F myproject.ppj and press enter...
 
Why don't you tell us exactly what you're trying to do...
Maybe more information will bring better answers.
 
 

PhilG57

  • Guest
Re: How to use POMAKE?
« Reply #4 on: June 06, 2012, 05:34:25 PM »
Thanks again.  I'm not much for 'good ol' command line programs, especially in a WIN32 environment, but I'll give it a try later on.  I suspect it will work as you specify.

I'm messing around with static and dynamic linked versions of the same program; I'm not certain how to specify that difference under the IDE umbrella and thought jumping into make might be easier.  For example, it looks as if I want to specify an additional ".lib" or ".obj" files for link editing, I include those file names in the appropriate project options (Link) section.  But then, the IDE could not find my files....

I'll be away from the computer for a couple of days and will report back.  Thanks again. 

CommonTater

  • Guest
Re: How to use POMAKE?
« Reply #5 on: June 06, 2012, 06:02:12 PM »
I'm messing around with static and dynamic linked versions of the same program; I'm not certain how to specify that difference under the IDE umbrella and thought jumping into make might be easier.

If you mean static vs dynamic linking to a C Runtime Library that is controled at  ...

Project -> Project Options -> Compiler -> Runtime Library

.. just set the option to "Multithreaded DLL" to link to an external CRT library.


If you mean putting your code in a DLL as opposed to a Static LIB... well that's a bit more complex.  The two are different enough that you'd probably be smartest to create one of each...

Quote
For example, it looks as if I want to specify an additional ".lib" or ".obj" files for link editing, I include those file names in the appropriate project options (Link) section.  But then, the IDE could not find my files....
Did you add their paths to the Folders list?

Project -> Project Options -> Folders -> Libraries
Project -> Project Options -> Folders -> Includes

Offline AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: How to use POMAKE?
« Reply #6 on: June 06, 2012, 09:50:13 PM »
I have to admit I don't know how to use POMAKE.  I know the ".ppj" file changes when I make changes within the workspace or project, but it is difficult to correlate these changes to ".ppj" changes.  I understand the ".ppj" is pretty much a text file with embedded make commands, but I don't know how to access or edit that file directly.  Thanks.
Why do you want to edit or change something in the ppj file. All you need can be done with the IDE and if you start build the project, poide starts build the project by using the ppj file.
best regards
 Alex ;)

CommonTater

  • Guest
Re: How to use POMAKE?
« Reply #7 on: June 06, 2012, 11:01:01 PM »
Why do you want to edit or change something in the ppj file. All you need can be done with the IDE and if you start build the project, poide starts build the project by using the ppj file.

Hi Alex...
 
FWIW, I quite often make manual edits in PPJ files.  They don't always move as nicely as we'd like, sometimes they get relative paths wrong, and then there's the eternal version# fix problem....

However; I'm wondering just what our friend is up against...
Is he making a proper project before starting?
Is he experiencing difficulty integrating files?
etc.



Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: How to use POMAKE?
« Reply #8 on: June 07, 2012, 09:57:43 AM »
POMAKE works more or less like MAKE (you can look to the make manual from GNU).
Some predefined variables have different symbols, you can find them in the help file (in it are reported only the differences from standard make).
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

PhilG57

  • Guest
Re: How to use POMAKE?
« Reply #9 on: June 11, 2012, 04:21:05 AM »
Hi, I'm back and will test out sometime tomorrow some of these suggestions .  Many thanks for all the good ideas; here are some answers to the queries above....

I always let the IDE create the .ppj and other files.  In this case, I have multiple projects within a workspace and the workspace is now set up well.  FYI, I did notice that when creating additional projects (File->New->Project) the IDE always created the new .ppj in a sub-directory of where the .ppw file lived.  I had to move the newly created ,ppj and .ppx files to the main directory and then used the iDE to add projects to the workspace.  Then, of course, I added code modules to the project.

My desire is eventually to have two versions of this program: one linked static (all the modules together) and one with some code modules separate in my own separate DLL.

My interest in POMAKE is akin to that of the old Unix or GNU make; I'd like to have my one workspace, with multiple projects, and to be able to tell the IDE to make one version or the other.  Something like: POMAKE myprogram static or POMAKE myprogram dll.

My next task is to play with POMAKE using the command line interface to see what flexibility and strengths it brings.

Thanks again to all for the suggestions and help. 

CommonTater

  • Guest
Re: How to use POMAKE?
« Reply #10 on: June 11, 2012, 08:34:19 AM »
My interest in POMAKE is akin to that of the old Unix or GNU make; I'd like to have my one workspace, with multiple projects, and to be able to tell the IDE to make one version or the other.  Something like: POMAKE myprogram static or POMAKE myprogram dll.

Actually what you're describing is something you can do directly from the IDE...
 
Install the Workspace Editor AddIn So you can create a workspace (.ppw) file independently of the New Project wizard. 
 
Create the root folder for your workspace by hand.
 
Select File->New->Project... in the wizard at the bottom select the workspace folder in the Location bar... then create your first project by typing it's name...
 
Follow on this by creating your other projects... editing the paths etc. as necessary.
 
Now click File -> Edit Workspace Files ... from there you can add your projects to your own custom workspace and save the file anyplace you like.  (I'm assuming you will want to use the base workspace folder)...
 
To open your custom workspace... just double click it in explorer and let POIDE open it by file association.  Or you can use File-> Open and select it there.
 
Now you can add files to your projects... keep in mind that projects can share the same source files, even if it builds them differently (Take a look at the source code for the workspace editor... you'll see what I mean)

To build any of your projects just select Project -> Build or click the Build button on the IDE's toolbar.  To rebuild, select Project -> Rebuild.  Project -> Rebuild Workspace will rebuild everything in one pass.
 
Easy stuff...
 
 
 
 
 
« Last Edit: June 11, 2012, 08:40:58 AM by CommonTater »

PhilG57

  • Guest
Re: How to use POMAKE?
« Reply #11 on: June 19, 2012, 12:24:32 PM »
Sorry for the delayed response; during the summer I'm often away from the computer for several days in a row...

1) I tried using POMAKE via the command line interface but it was not successful.  I'm an old mainframe, DOS, and Unix person who seems to have gotten too comfortable with the GUI...

2) I downloaded and installed the Workspace Editor but it did not run on my 4.5 version of Pelles fine compiler.  Unfortunately, I have no plans to upgrade to a more current release as v4.5 is super fast with all the features I think I need.

3) I've fiddled around with the IDE, creating numerous projects of various types and believe I can kludge up a workable process to accomplish what I want.   I did mis-step and create several projects of the wrong type (Win32 vs. console or 'lib'); is there any way to change the type of project once it has been created and has had files added to it?

4) Also, is there any way to tell the IDE I just want a program compiled and not linked nor made into a 'lib' entry?  I realize I can just add the source module to a project and compile it with another module.  But I would like to have a project separate from any of the others which is 'compile only' project.  Later I'll want to include those object files in a link edit of a bunch of files.

Thanks.
   

CommonTater

  • Guest
Re: How to use POMAKE?
« Reply #12 on: June 19, 2012, 01:35:16 PM »
1) I tried using POMAKE via the command line interface but it was not successful.  I'm an old mainframe, DOS, and Unix person who seems to have gotten too comfortable with the GUI...

Don't sweat it... I've been using Pelle's C for a long time and I've never used POMAKE yet... the IDE's always done what I've asked of it. There should be no reason to "go legacy" there's no added power or features for doing it.

Quote
2) I downloaded and installed the Workspace Editor but it did not run on my 4.5 version of Pelles fine compiler.  Unfortunately, I have no plans to upgrade to a more current release as v4.5 is super fast with all the features I think I need.

Whew... 4.5 is pretty old... What OS is this running on?
 
I would strongly suggest you update to at least 6.0... the new 7.0 would be better.
 
Quote
3) I've fiddled around with the IDE, creating numerous projects of various types and believe I can kludge up a workable process to accomplish what I want.   I did mis-step and create several projects of the wrong type (Win32 vs. console or 'lib'); is there any way to change the type of project once it has been created and has had files added to it?

Not easily... In POIDE large parts of it's behaviour are controlled by the POC_PROJECT_TYPE macro, if you try changing it, it's likely to cause more problems than it solves.  Your simplest way out would be to delete the .PPJ file and create a new one, then add your source files to it. (Shouldn't take more than a couple of minutes.)
 
Quote
4) Also, is there any way to tell the IDE I just want a program compiled and not linked nor made into a 'lib' entry?  I realize I can just add the source module to a project and compile it with another module.  But I would like to have a project separate from any of the others which is 'compile only' project.  Later I'll want to include those object files in a link edit of a bunch of files.

Sure, that's easy... just click the compile button on the toolbar.  Sweep your mouse slowly along the toolbar and you'll see what each button does in a pop-up tooltip.  Alternatively you can use the compile function from the Project menu.
 
Phil... it would really help if you'd tell us what you're trying to do with all this... I'm pretty sure most of us just fire up the IDE, write some code, build and go; there's not a lot of chatter about he command line toolchain (which is used by the IDE) at all.  For you to be messing with this as you are I'd have to postulate either a wildly complex task or something of a wrong turn...
 

migf1

  • Guest
Re: How to use POMAKE?
« Reply #13 on: June 19, 2012, 05:19:33 PM »
Based on the fact that you said you are a MSDOS, Unix kind of guy, you may consider working with gnu-make. I'm successfully using this for a long time, through the MinGW bintools.

Assuming you are familiar with make/gnu-make you may either create different makefiles for each task you are aiming to, or you can have just one makefile and pass them parameters through its command-line. There's nothing stopping you to use the Pelles C compiler/assembler/linker/etc specific tools within the makefile.

Most of them can also be done with pomake, but if you are more familiar with make/gnu-make it may be more easy for you ;)


PhilG57

  • Guest
Re: How to use POMAKE?
« Reply #14 on: June 19, 2012, 10:09:17 PM »
Thanks again for the suggestions and advice...

1) I'm running WinXP with no plans to 'upgrade' to a newer version of the OS.  I know XP is no longer supported but my hardware platform is pretty stable.  Also, I load lots of programs and tools and they all seem to work well with XP. 
2) Some time ago, I tried a later version of Pelles C (maybe 5.0) and thought it slow.  Since I really don't need any of the newer compiler features (focused on desktop apps), I'm happy with 4.5.
3) I understand I can compile only individual files; I was hoping for a way to easily compile (only) a bunch of files which are packaged into a project.  I was hoping for a magic setting in the project file to indicate 'compile only'.
4) Thanks for suggestion gnu-make but I'm trying to stay within the boundaries of the Pelles IDE.  And with GUI based tools.
5) I am working on a large, complicated, and very old MSDOS / Unix project which I hope to convert to Windows.  Naturally it is now a "console" program so I'm using the IDE to get it working in that state.  Eventually, I'll convert it to a "Win32" program with all the attendant changes.  There are many source files and the finished result has an option to create both a static and dynamic linked versions of the programs.  There are also 'lib' files plus other additional files to be compiled and linked with some of the routines.  I've been reviewing an old make file trying to figure out what modules are linked with the 'lib' files and which have to have several source modules all linked together.  It's a fun, learning project, which I hope to be able to use with my later programming efforts.  I have a workspace with 19 projects, sharing the same source files, and which seems to satisfy most of the various compile and link edit configurations.

Thanks again.