makefile on solaris

  • Follow


I'm trying to get a makefile setup using the version of make that comes with
Solaris 9. My situation is that I have a large number of files, about 300
which all end in the extension of ".fmb". When the files are properly
compiled they end up with an extension of ".fmx". There is a dependency on
files with an extension of "*.plx". The plx files are created from "*.pll"
files. The pll have no dependencies, they are the starting point.

 I have another group of files which end in the extension of mmb. They are
much like the fmb files. The same rules apply.



The dependency of the fmb and mmb files is pretty simple. They all work the
same way.



To compile and individual fmb file one would enter "ifgenm module=zaq.fmb
module_type=form log=zaq.log"

To compile and individual mmb file one would enter "ifgenm module=cde.mmb
module_type=menu log=cde.log"



All of the pll and fmx file's prefixes are the same as the plx and fmx
files. I think I am saying this correctly, and example would be:  zaq.fmb
compiles to zaq.fmx  and xsw.pll compiles to xsw.plx



I can have new fmx and mmb files to compile pretty much without warning. The
developers copy the files out to a location on the system and their ready.



To deal  with this situation I want to have a makefile that groups the fmb
files together so that a developer can simply enter something like "make
new_fmb" which would look find the fmb files newer than the fmx and compile
that list. The same of the mmb files: something like "make new_mmb".



I am hoping there is a way to just group all the fmb files so that I do not
have to list all 300 fmb files in the makefile. I have tried some lines
like:



..fmb

            ifgenm module=$<

plus a bunch of other ways. My question is: Can this be done, grouping files
by extension and use the same line? I really want to avoid something like



1.fmb

            ifgenm module=$<



2.fmb

            ifgenm module=$<

and so on. If so what does the makefile look at, could I have an example

Thanks for your time.


0
Reply shankeyp (23) 2/24/2004 12:53:48 PM

In article <bJ6dneFJDoJJ1abdRVn-hQ@comcast.com>,
Oxmard <shankeyp@no-spam.comcast.net> wrote:
>I'm trying to get a makefile setup using the version of make that comes with
>Solaris 9. My situation is that I have a large number of files, about 300
>which all end in the extension of ".fmb". When the files are properly
>compiled they end up with an extension of ".fmx". There is a dependency on
>files with an extension of "*.plx". The plx files are created from "*.pll"
>files. The pll have no dependencies, they are the starting point.
>

Here is a piece of a Makefile that does something similar:
##########
JC = javac
DEFAULT_CLASSPATH = ..
JFLAGS = -g -classpath $(DEFAULT_CLASSPATH)

..SUFFIXES: .java .class

..java.class:
    $(JC) $(JFLAGS) $<

target: <list of class files to make>
##########

If the file foo.class is needed and foo.java is present and newer than
the java compiler javac is run.

I didn't bother trying to understand all the details of your requirements.
But I've given you enough to get started. Note that this is not perfect,
even for the java, but I have found it useful.

-- 
http://www.math.fsu.edu/~bellenot
bellenot <At/> math.fsu.edu 
+1.850.644.7189 (4053fax)
0
Reply fakeuser 2/24/2004 5:36:24 PM


So then you would enter: make target
Is that correct?

<fakeuser@invalid.domain> wrote in message news:c1g22o$j8m$1@news.fsu.edu...
> In article <bJ6dneFJDoJJ1abdRVn-hQ@comcast.com>,
> Oxmard <shankeyp@no-spam.comcast.net> wrote:
> >I'm trying to get a makefile setup using the version of make that comes
with
> >Solaris 9. My situation is that I have a large number of files, about 300
> >which all end in the extension of ".fmb". When the files are properly
> >compiled they end up with an extension of ".fmx". There is a dependency
on
> >files with an extension of "*.plx". The plx files are created from
"*.pll"
> >files. The pll have no dependencies, they are the starting point.
> >
>
> Here is a piece of a Makefile that does something similar:
> ##########
> JC = javac
> DEFAULT_CLASSPATH = ..
> JFLAGS = -g -classpath $(DEFAULT_CLASSPATH)
>
> .SUFFIXES: .java .class
>
> .java.class:
>     $(JC) $(JFLAGS) $<
>
> target: <list of class files to make>
> ##########
>
> If the file foo.class is needed and foo.java is present and newer than
> the java compiler javac is run.
>
> I didn't bother trying to understand all the details of your requirements.
> But I've given you enough to get started. Note that this is not perfect,
> even for the java, but I have found it useful.
>
> -- 
> http://www.math.fsu.edu/~bellenot
> bellenot <At/> math.fsu.edu
> +1.850.644.7189 (4053fax)


0
Reply Oxmard 2/25/2004 2:12:06 PM

In article <u6ednUkEsO4wMaHdRVn-gQ@comcast.com>,
Oxmard <shankeyp@no-spam.comcast.net> wrote:
><fakeuser@invalid.domain> wrote in message news:c1g22o$j8m$1@news.fsu.edu...
>> Here is a piece of a Makefile that does something similar:
>> ##########
>> JC = javac
>> DEFAULT_CLASSPATH = ..
>> JFLAGS = -g -classpath $(DEFAULT_CLASSPATH)
>>
>> .SUFFIXES: .java .class
>>
>> .java.class:
>>     $(JC) $(JFLAGS) $<
>>
>> target: <list of class files to make>
>> ##########
>
>
>So then you would enter: make target
>Is that correct?
>


Yes `make target' works, but so does just `make' as `target:' is the first
(and hence the default) target of the Makefile.


-- 
http://www.math.fsu.edu/~bellenot
bellenot <At/> math.fsu.edu 
+1.850.644.7189 (4053fax)
0
Reply fakeuser 2/25/2004 3:38:14 PM

3 Replies
124 Views

(page loaded in 0.06 seconds)

Similiar Articles:













7/29/2012 9:12:47 PM


Reply: