- # Process $1.m4 with m4 using the given options.
- echo "m4(): generating '$file' from '$file.m4' with options '$*'"
- # Add useful macros.
- (echo "define(\`IF', \`ifelse(\`\$1', \`\$2',dnl')dnl
-define(\`FI', \`)dnl')dnl";
- # Run the file (and the default macros) through m4.
- cat $file.m4) | $m4 "$@" >> $file
+ # Add warning to file and write a message to stdout.
+ warning "$file" "$file$extension" $command "$*"
+ # Generate $file from $file$extension using the given command.
+ cat "$file$extension" | $command "$@" >> "$file"