Shell pre-processor available?

Shell pre-processor available?

Post by Joe Tokars » Thu, 16 Dec 1993 23:33:18



Hello, all.

While working on some (Bourne) scripts recently, I became aware of a need here
for a tool like a 'shell pre-processor'.  We have many scripts that are
independent of the rest for operations such as installations; each of the
scripts has a common set of shell functions (e.g., 'check_superuser',
'find_NIS_host', etc.).  Due to the nature of the scripts (installation), we
can't source in a file that contains these common functions.

What I'm looking for is a package (free or otherwise) that would effectively
pre-process a shell source at 'build time'; some type of directive like
'#!include common_func.sh' would preform an expansion of that line and actually
PASTE the contents of 'common_func.sh' in place of the '#!include' line.  That
way, we could keep one set of common functions and just reference them from
the necessary shell sources.

Does anybody know if such an animal exists?  Please post or e-mail; I'll post
a summary of e-mail responses if there's any interest.

Thanks in advance!

--
Joseph Tokarski, Principal Engineer    | "This ain't no technological breakdown,
General DataComm, Middlebury, CT 06762 |  Oh no, this is the Road to Hell."
phone: (203) 758-1811 ext. 7684        |

 
 
 

Shell pre-processor available?

Post by Jeremy Mathe » Tue, 21 Dec 1993 06:17:00



>...
>What I'm looking for is a package (free or otherwise) that would effectively
>pre-process a shell source at 'build time'; some type of directive like
>'#!include common_func.sh' would preform an expansion of that line and actually
>PASTE the contents of 'common_func.sh' in place of the '#!include' line.  That
>way, we could keep one set of common functions and just reference them from
>the necessary shell sources.

On Simtel (wuarchive, etc), in one of the langauge subdirectories (C,
Pascal, or something like that - Actually, I think it is the Pascal directory),
there is a package that purports to be able to add pre-processor functionality
to any language (as a front end).  Check it out.

************************************************************************
The Zapruder film was a*film.


          hundreds, if not thousands, of dollars, every time he posts -
************************************************************************
rwvpf wpnrrj ibf ijrfer

 
 
 

Shell pre-processor available?

Post by Fuzzy F » Tue, 21 Dec 1993 06:45:47



>What I'm looking for is a package (free or otherwise) that would
>effectively pre-process a shell source at 'build time'; some type of
>directive like '#!include common_func.sh' would preform an expansion of
>that line and actually PASTE the contents of 'common_func.sh' in place
>of the '#!include' line.

Say, isn't that what the "." operator does in Bourne shell?

--

       "Are you thinking what I'm thinking, Pinky?"
       "I think so Brain, but...  If our feet went the other way,
        we'd fall on our faces."

 
 
 

1. Installing apache 1.3.3; gcc error with pre-processor

Hello!

When I try to install apache 1.3.3 I get the
error "C pre-processor NOT-AVAILABLE."

This is on an Intel machine running Redhat 5.1.

I've already uninstalled and reinstalled
gcc-2.7.2.3-13 to no avail.

I only found one other problem like mine
on DejaNews and that went unresolved.

This box was just set up new with RH 5.1.
my path is
PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/jim/bin

TIA to anyone with any possible help.

Jim


Using config file: Configuration
Creating Makefile
 + configured for Linux platform
 + setting C compiler to gcc
 + setting C pre-processor to NOT-AVAILABLE
 + checking for system header files
 + adding selected modules
 + doing sanity check on compiler and options
./helpers/TestCompile: make: command not found
** A test compilation with your Makefile configuration
** failed. This is most likely because your C compiler
** is not ANSI. Apache requires an ANSI C Compiler, such
** as gcc. The above error message from your compiler
** will also provide a clue.
 Aborting!

gcc-2.7.2.3-13

2. OpenSource Question

3. Pre-processor symbol for Solaris 1/2

4. SAMBA MAster Broswer elections

5. C (gcc): Using pre-processor symbols (ifdef) inside of a string (sort of)

6. Problem with PPP on 56K modem?

7. Wsmake 0.6.3 - website pre-processor

8. pon network problem

9. Wsmake 0.6.2 - website pre-processor

10. Any known strangeness with pre-processor in egcs?

11. C Pre-processor directive

12. Wsmake 0.6.1 - website pre-processor

13. xlf 2.1 pre-processor experience?