Richard W.M. Jones wrote:
On Wed, Nov 19, 2008 at 03:01:56PM +0100, Farkas Levente wrote:
> Richard W.M. Jones wrote:
>> Anyway, what are you actually trying to achieve? I'm assuming this is
>> part of your plan to combine /etc/rpm/macros.mingw32 and
>> /usr/bin/mingw32-configure into a single script. This is an admirable
>> goal because it reduces duplication, but if it means using some
>> massively complex shell hackery instead, then the cure might be worse
>> than the disease.
>>
>> I'd prefer to see a patch which keeps the duplication, if that's going
>> to be quicker.
> ok so here is the current state of the patch and a few comments.
> - add a few more path macros just to be complete
> - put into one line the _mingw32_cflags because currently during compile
> it look very ugly with the line beaks in all gcc command line
> - add a _mingw32_env macro with define all useful enviroment variable to
> be able to use at different places (if you like i can explain all variable)
> - rewrite _mingw32_configure to use the env and use all configure options
> - add _mingw32_make and _mingw32_makeinstall macros
> actually we've got projects which not use autoconf just a makefile, but
> like to compile it without problems.
Yup, I cannot see any problem with that patch. Except you need to
add -mms-bitfields to the mingw32-configure shell script too so
that they are kept the same.
Do you want to apply the patch, or would you like me to do it?
> in this case i can add a new one liner file mingw32-scripts.sh into
> libexec like:
> $(rpm --eval "%{_"`basename $0|tr "-"
"_"`"}")
> and create symlinks in bin to this file as mingw32-configure,
> mingw32-make, mingw32-env and these can be run. so every script can use
> macros.mingw32, but currently not working:-(
Honestly, don't worry about this. Just keep the duplication for now.
for me that's the most annoying thing:-(
that's why i do the whole stuff.
so probably on friday i'll have some free time to find the reason why
not work. while this works:
rpm --eval %{_mingw32_configure}>out;chmod +x out;./out
i can't find any other "in script" solution to run the output of rpm
--eval:-(
--
Levente "Si vis pacem para bellum!"