How to conveniently specify a long line of command options?
Posted: Mon Dec 17, 2007 4:39 am
Hello!
I am hooking GRUB bootloader's built-in commands. When I use GRUB's "./configure" to rebuild GRUB, I need to specify a lot of options in the command line. This is very inconvenient. Is there any way to type those options in some text file and then use it together with ./configure?
Some examples.
Lets "options.txt" be the file with the command line options that I need to specify. For example, it will contain the following text:
--enable-protector-mode \
--enable-example-kernel \
--disable-reiserfs \
--disable-iso9660 \
--disable-ffs \
"CFLAGS=-g -fno-stack-protector"
I tried the following variants but without success:
1) $ ./configure 'cat options.txt'
2) $ ./configute $(cat options.txt)
3) cat options.txt | ./configure
configure either doesn't understand the backlash ('\') from 'options.txt' or doesn't like CFLAGS. If I copy the text from "options.txt" and then manually insert it immediately after "$ ./configure ", then everything works fine. For example, why doesn't variant number 3) work?
Can anyone help me?
Thanks.
Best regards,
Xela
I am hooking GRUB bootloader's built-in commands. When I use GRUB's "./configure" to rebuild GRUB, I need to specify a lot of options in the command line. This is very inconvenient. Is there any way to type those options in some text file and then use it together with ./configure?
Some examples.
Lets "options.txt" be the file with the command line options that I need to specify. For example, it will contain the following text:
--enable-protector-mode \
--enable-example-kernel \
--disable-reiserfs \
--disable-iso9660 \
--disable-ffs \
"CFLAGS=-g -fno-stack-protector"
I tried the following variants but without success:
1) $ ./configure 'cat options.txt'
2) $ ./configute $(cat options.txt)
3) cat options.txt | ./configure
configure either doesn't understand the backlash ('\') from 'options.txt' or doesn't like CFLAGS. If I copy the text from "options.txt" and then manually insert it immediately after "$ ./configure ", then everything works fine. For example, why doesn't variant number 3) work?
Can anyone help me?
Thanks.
Best regards,
Xela