[mythtv] [patch] automagic settings.pro (version 7)

Daniel Thor Kristjansson danielk at mrl.nyu.edu
Tue Mar 1 22:10:04 UTC 2005


On Tue, 1 Mar 2005, Jeremiah Morris wrote:
]On Mar 1, 2005, at 3:28 PM, Daniel Thor Kristjansson wrote:
]Your patch is still against the old settings.pro, so it'll cause crashes on the
]old version and won't apply on the new version...

Easy enough to fix, see attached.


]>         QMAKE_CXXFLAGS_RELEASE = $$OPTFLAGS -O2 -g
]I thought QMAKE_CXXFLAGS_RELEASE wouldn't be used in debug mode? Besides, we
]wouldn't want the optimization settings there, there's no difference between
]debug and profile under OS X that way.

That should be QMAKE_CXXFLAGS_DEBUG (fixed in patch).

Mac developers do not want Altivec in the debug version?
You know the -O2 overides any earlier -O, right?


]It would probably be simpler to treat the Altivec flags like the arts or
]directfb flags, and add them into QMAKE_CXXFLAGS outside of the config
]settings. If you use *= instead of +=, they shouldn't be duplicated even when
]they're included via $$OPTFLAGS.

I think "*=" is not good in this case because you might want to 
override the earlier compile options, if there is already something like 
"-O3 -Os" and then you add "-O3" with *= it will have no effect, but 
with "+=" it will work correctly and add it to the end overriding "-Os"

Treating them like arts or directfb flags is a good idea. But I'm 
just using the pre-existing script here, I don't have a Mac to test
any changes. I think this is better done by someone running a Mac.


]> I'm not setting any extra USING_ defines for now. I think
]My vote is to include them in config.h instead of the command line. Anything
]that needs one of the USING_ defines should include config.h and get it from
]there.

The problem with putting things in config.h is that it forces a 
recompile of all the files including config.h. Plus, doing this
would greatly increase the size of the patch and make it more 
likely to have bugs.


]One other thing: is there a reason why you build CCONFIG and 
]CONFIG_DEFINES immediately, instead of waiting for the creation of 
]config.mak and config.h? That would save on duplicate tests -- the 
]script is large enough without having two test blocks for each feature.

It could be built later. But this would make the script longer not 
shorter, the secondary test of these consists of 8 lines:
  if test x"$CCONFIG" != x"" ; then
    echo "CCONFIG=$CCONFIG" >> config.mak
  fi

  if test x"$CONFIG_DEFINES" != x"" ; then
    echo "CONFIG_DEFINES=$CONFIG_DEFINES" >> config.mak
  fi

If one tested for each feature after creating config.mak, 
this would be 30-40 lines... one would save maybe 10 lines
earlier in the script.

-- Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config-v7.patch.bz2
Type: application/octet-stream
Size: 7536 bytes
Desc: 
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050301/a2b8d62f/config-v7.patch.obj


More information about the mythtv-dev mailing list