home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
files
/
program
/
m2posx02
/
m2ppx.g
< prev
next >
Wrap
Text File
|
1993-10-23
|
1KB
|
34 lines
# GULAM-Script for processing m2-files with preprocessor commands.
# Output is a file, which can be compiled by a m2-compiler
#
#
# Environment variables:
# PATH: must contain the directories, where the programs can be found
# GNUINC: full path, where the GNU-C-preprocessor searches for include files
# TEMP: directory for temporary files (RAM-disk or so)
#
# Parameters:
# $1: Name that identifies the compiler, e.g. LPRM2, HM2,...-- see PORTAB.M2H
# for valid names
# $2: Inputfile, m2 source code with preprocessor commands
# $3: Outputfile, m2 source code
#
# Programs: (all programs must be in a directory mentioned in PATH)
# cpp: the preprocessor (gcc-cpp.ttp or gcc.ttp)
# x2d1: removes multiple blank lines and does LF->CR/LF translation
# rm: removes the temporary file
#
# Switches:
# -P: removes sync lines (for the C-compiler) from cpp output
# -D<name>: defines the compiler
# -imacros <file>: full path of file PORTAB.M2H.
# NOTE: This was -i in versions 1.X of the GNU-C-preprocessor
#
# Sample call (in gulam): m2ppx LPRM2 file.ipp m:\file.mod
#
echo $2
cpp -P -D$1 -imacros f:\usr\include\m2\portab.m2h $2 ${TEMP}\cpp_tmp.999
x2d1 <${TEMP}\cpp_tmp.999 >$3
rm ${TEMP}\cpp_tmp.999