home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
gawk-2.15.6-src.tgz
/
tar.out
/
fsf
/
gawk
/
mungeconf
< prev
next >
Wrap
Text File
|
1996-09-28
|
464b
|
21 lines
#! /bin/sh
# stdout is normally config.h
case $# in
2) ;;
*) echo "Usage: mungeconf sysfile distfile" >&2 ; exit 2 ;;
esac
sed '/^#/d; /^MAKE_*/d' $1 | # strip comments and Makefile stuff
sed '1s:.*:s~__SYSTEM__~&~:
2,$s:^\([^ ]*\)[ ].*:s~^/\\* #define[ ]*\1.*~#define &~:' >sedscr
sed -f sedscr $2
echo
echo '/* anything that follows is for system-specific short-term kludges */'
grep '^#define' $1 # for system-specific short-term kludges
rm -f sedscr