help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Different processing to achive same end result ? Can it be done.


From: EXT-Pennington, Dale K
Subject: Different processing to achive same end result ? Can it be done.
Date: Fri, 22 Aug 2008 11:17:00 -0500

Got a bit of an odd one here folks,

We are working with code that comes from an outside source, which limits
how much we can change it.

In particular we have interface definition files (.idl files) that we
run through an idl compiler to generate various .C and .h files. This
works fine.

However, some of the .h files from the idl compiler need to be hand
edited before they are compiled into objects. To automate this part, I
just intend to save versions of the as-generated and as-modified .h's
and then do a simple script in the rule that would do something like :

If( new.h = as_generated.h)
  copy as-modified.h into final.h
Else
  report error
Endif

The trick is only some of the .h's need editing, and I prefer not to
keep lots of redundant reference files. 

This means I have 2 classes of IDL files. 

Class 1 needs no editing, and is handled by the implicit rule :

%C.h %S.h %C.C %S.C : %.idl
        <invoke idl compiler>

Class 2 needs the editing and the proceesing is more like

%C_gen.h %S.h %C.C %S.C : %.idl
        <invoke idl compiler with option to produce alternate name for
C.h file>

Run comparison script on the %C_gen.h to produce the %C.h file or
generate an error.

I keep the IDL names in make variables, and use make macro processing to
produce the dependency names.

The question is, can I set up one make file to handle both styles of
processing ? Or should I create make subfiles and just invoke them from
the main makefile when one of the IDL files needs updating ?

Thanks,
Dale Pennington





reply via email to

[Prev in Thread] Current Thread [Next in Thread]