Changeset e10b64a458adbedb5374c99f50675b3c60581d5d

Show
Ignore:
Timestamp:
07/08/03 15:09:30 (5 years ago)
Author:
Sam Hocevar <sam@videolan.org>
git-committer:
Sam Hocevar <sam@videolan.org> 1057669770 +0000
git-parent:

[26674bd9edbc995fc287d7be20fccd15438adc85]

git-author:
Sam Hocevar <sam@videolan.org> 1057669770 +0000
Message:
  • bootstrap:
    + Removed a useless use of cut.
    + Do not fail in the "clean" rule if no targets were built.
  • Makefile.am:
    + Propagate $(srcdir) to toolbox.
  • toolbox:
    + Do not include .moc files in POTFILES.in.
    + Fixed the generation of MSVC project files (untested).
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Makefile.am

    r26674bd re10b64a  
    107107 
    108108include/vlc_symbols.h: Makefile $(HEADERS_include) 
    109     $(srcdir)/toolbox --update-includes 
     109    srcdir=$(srcdir) $(srcdir)/toolbox --update-includes 
    110110 
    111111src/misc/modules_plugin.h: Makefile src/misc/modules_plugin.h.in $(HEADERS_include) 
    112     $(srcdir)/toolbox --update-includes 
     112    srcdir=$(srcdir) $(srcdir)/toolbox --update-includes 
    113113 
    114114src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in 
    115     $(srcdir)/toolbox --update-includes 
     115    srcdir=$(srcdir) $(srcdir)/toolbox --update-includes 
    116116 
    117117# These dependencies are mandatory 
     
    209209dist-hook: 
    210210    mv $(distdir)/vlc.ebuild $(distdir)/vlc-${VERSION}.ebuild 
    211     cd $(distdir) && $(srcdir)/toolbox --update-vc 
     211    cd $(distdir) && srcdir=$(srcdir) $(srcdir)/toolbox --update-vc 
    212212 
    213213############################################################################### 
  • bootstrap

    r76bbfba re10b64a  
    22 
    33##  bootstrap file for the VLC media player 
    4 ##  $Id: bootstrap,v 1.66 2003/07/07 16:53:48 sam Exp $ 
     4##  $Id: bootstrap,v 1.67 2003/07/08 13:09:30 sam Exp $ 
    55## 
    66##  Authors: Sam Hocevar <sam@zoy.org> 
     
    6161 
    6262modules="" 
    63 count=0 
    6463 
    6564rm -f modules/Makefile.am && cat > modules/Makefile.am << EOF 
     
    7473  printf "." 
    7574  mf="modules/${dir}/Modules.am" 
    76   basedir="`echo ${dir} | cut -f1 -d/`
     75  basedir="${dir%%\/*}
    7776  # automake will not recurse for make dist if we don't define SUBDIRS = . 
    7877  subdirs="`sed -ne 's,'modules/${dir}'/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`" 
    79   #parent=`echo ${dir} | sed -e 's@[^/]*@..@g'` 
    80   #echo "  modules/${dir}/Makefile" >> m4/private.m4-tmp3 
    8178  rm -f modules/${dir}/Makefile.am && cat > modules/${dir}/Makefile.am << EOF 
    8279 
     
    9693clean: clean-local 
    9794clean-local: 
    98     rm -f *.a *.so *.dll *.sl *.dylib 
     95    -rm -f *.a *.so *.dll *.sl *.dylib 
    9996 
    10097EOF 
    10198  for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf}` 
    10299  do 
    103     count="`expr ${count} + 1`" 
    104100    if grep '^SOURCES_'${mod}'.*=.*PRIVATE' < ${mf} >/dev/null 2>&1; then 
    105101        PRIVATE='#'; else 
     
    130126    if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF 
    131127clean-${mod}: 
    132     rm -f \$(nodist_SOURCES_${mod}) 
     128    -test -z "\$(nodist_SOURCES_${mod})" || rm -f \$(nodist_SOURCES_${mod}) 
    133129 
    134130EOF 
     
    165161 
    166162if UNTRUE 
    167 L${count}p = lib${mod}_plugin.a 
    168 D${count}p = lib${mod}_plugin\$(LIBEXT) 
    169 L${count}b = lib${mod}.a 
    170 L${count}pic = lib${mod}_pic.a 
    171 EOF 
    172     if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF 
    173 B${count} = \$(nodist_SOURCES_${mod}) 
     163L${mod}-p = lib${mod}_plugin.a 
     164D${mod}-p = lib${mod}_plugin\$(LIBEXT) 
     165L${mod}-b = lib${mod}.a 
     166L${mod}-pic = lib${mod}_pic.a 
     167EOF 
     168    if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF 
     169B${mod} = \$(nodist_SOURCES_${mod}) 
    174170EOF 
    175171    fi 
     
    179175EOF 
    180176    if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF 
    181 ${PRIVATE}BUILT_SOURCES += \$(B${count}) 
     177${PRIVATE}BUILT_SOURCES += \$(B${mod}) 
    182178EOF 
    183179    fi 
     
    216212lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\` 
    217213 
    218 libvlc_LIBRARIES += \$(L${count}b) \$(L${count}pic) 
    219 lib${mod}_DATA = \$(D${count}p) 
     214libvlc_LIBRARIES += \$(L${mod}-b) \$(L${mod}-pic) 
     215lib${mod}_DATA = \$(D${mod}-p) 
    220216 
    221217lib${mod}dir = \$(libdir)/vlc/${topdir} 
    222 ${PRIVATE}noinst_LIBRARIES += \$(L${count}p) 
     218${PRIVATE}noinst_LIBRARIES += \$(L${mod}-p) 
    223219${PRIVATE}lib${mod}_plugin\$(LIBEXT): \$(lib${mod}_plugin_a_OBJECTS) 
    224220${PRIVATE}  @case \`\$(VLC_CONFIG) --linkage ${mod}\` in \\ 
  • toolbox

    r09496f1 re10b64a  
    22 
    33##  toolbox for the VLC media player 
    4 ##  $Id: toolbox,v 1.38 2003/07/05 14:47:53 sam Exp $ 
     4##  $Id: toolbox,v 1.39 2003/07/08 13:09:30 sam Exp $ 
    55## 
    66##  Authors: Samuel Hocevar <sam@zoy.org> 
     
    2828  --update-flexml         generate and fix flexml and flex code 
    2929  --changelog             update the CVS changelog 
    30   --distclean             "make distclean" 
     30  --distclean             "make distclean" on steroids 
    3131  --make-woody <dir>      change distdir <dir> to a woody distdir 
    3232EOF 
     
    121121  echo "generating Visual Studio files..." 
    122122 
    123   srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`" 
     123  if test -z "${srcdir}"; then 
     124    srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`" 
     125  fi 
    124126 
    125127  #  The evil ^M 
     
    261263 
    262264  # plugins files 
    263   grep '^L_[^ ]*_pic =' Modules.am | while read a b c 
    264   do 
    265     makefile="`echo $c | sed -e 's@/[^/]*$@/Modules.am@'`" 
    266     plugin="`echo $a | sed 's/L_\(.*\)_pic/\1/'`" 
    267     # this is an attempt at getting a list of plugin sources... we take the 
    268     # production and remove everything that does not contain "module", which 
    269     # means you miss $(NULL), but other variables too. 
    270     cfiles=`grep -v '[^-_a-zA-Z0-9]*#' ${makefile} | awk 'BEGIN{a=0}{if(!a&&$0~/^SOURCES_'${plugin}'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if($0~/^[a-zA-Z]/){exit;}print $0}}' | tr '\\ ' '\n\n' | sed -ne 's,/,\\\\,g; s/.*modules/modules/p'` 
    271     hfiles=`for i in ${cfiles} ; do echo $i ; done | grep '\.h$'` 
    272     cfiles=`for i in ${cfiles} ; do echo $i ; done | grep -v '\.h$'` 
    273     for dir in evc msvc 
     265  for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' ${srcdir}/configure.ac` 
     266  do 
     267    mf="${srcdir}/modules/${dir}/Modules.am" 
     268    for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf}` 
    274269    do 
    275       test "${dir}" = "evc" && suf="vcp" || suf="dsp" 
    276       source="${dir}/plugins.${suf}.in" 
    277       target="${dir}/plugin_${plugin}.${suf}" 
    278       echo "${target}" 
    279       perl -pe 'if(/�SOURCES�/){last;} s/�PLUGIN�/'${plugin}'/g' < ${source} > ${target} 
    280       for cfile in ${cfiles} 
     270      # this is an attempt at getting a list of plugin sources... we take the 
     271      # production and remove everything that does not contain "module", which 
     272      # means you miss $(NULL), but other variables too. 
     273      allfiles=`grep -v '[^-_a-zA-Z0-9]*#' ${mf} | awk 'BEGIN{a=0}{if(!a&&$0~/^SOURCES_'${mod}'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if($0~/^[a-zA-Z]/){exit;}print $0}}' | tr '\\ ' '\n\n' | grep '\.'` 
     274      hfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep '\.h$'` 
     275      cfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep -v '\.h$'` 
     276      for dir in evc msvc 
    281277      do 
    282         cat >> ${target} << EOF 
    283 # Begin Source File${M} 
    284 SOURCE="..\\${cfile}"${M} 
    285 # ADD CPP /D "__VLC__" /D "__PLUGIN__"  /D "MODULE_NAME=${plugin}" /D "MODULE_NAME_IS_${plugin}" ${M} 
    286 # End Source File${M} 
    287 EOF 
     278        test "${dir}" = "evc" && suf="vcp" || suf="dsp" 
     279        source="${dir}/plugins.${suf}.in" 
     280        target="${dir}/plugin_${mod}.${suf}" 
     281        echo "${target}" 
     282        perl -pe 'if(/�SOURCES�/){last;} s/�PLUGIN�/'${mod}'/g' < ${source} > ${target} 
     283        for cfile in ${cfiles} 
     284        do 
     285          cat >> ${target} << EOF 
     286# Begin Source File${M} 
     287SOURCE="..\\modules\\`echo ${dir}/${cfile} | sed 's,/,\\\\,g'`"${M} 
     288# ADD CPP /D "__VLC__" /D "__PLUGIN__"  /D "MODULE_NAME=${mod}" /D "MODULE_NAME_IS_${mod}" ${M} 
     289# End Source File${M} 
     290EOF 
     291        done 
     292        # sed is really nicer for this... unfortunately it's broken under cygwin 
     293        # sed -ne '1,/�SOURCES�/d; /�HEADERS�/,$d; p' < ${source} >> ${target} 
     294        perl -e 'while(<>){if(/�SOURCES�/){last;}}while(<>){if(/�HEADERS�/){last;}print $_}' < ${source} >> ${target} 
     295        for hfile in ${hfiles} 
     296        do 
     297          cat >> ${target} << EOF 
     298# Begin Source File${M} 
     299SOURCE="..\\modules\\`echo ${dir}/${hfile} | sed 's,/,\\\\,g'`"${M} 
     300# End Source File${M} 
     301EOF 
     302        done 
     303        # sed -ne '1,/�HEADERS�/d; p' < ${source} >> ${target} 
     304        perl -e 'while(<>){if(/�HEADERS�/){last;}}while(<>){print $_}' < ${source} >> ${target} 
    288305      done 
    289       # sed is really nicer for this... unfortunately it's broken under cygwin 
    290       # sed -ne '1,/�SOURCES�/d; /�HEADERS�/,$d; p' < ${source} >> ${target} 
    291       perl -e 'while(<>){if(/�SOURCES�/){last;}}while(<>){if(/�HEADERS�/){last;}print $_}' < ${source} >> ${target} 
    292       for hfile in ${hfiles} 
    293       do 
    294         cat >> ${target} << EOF 
    295 # Begin Source File${M} 
    296 SOURCE="..\\${hfile}"${M} 
    297 # End Source File${M} 
    298 EOF 
    299       done 
    300       # sed -ne '1,/�HEADERS�/d; p' < ${source} >> ${target} 
    301       perl -e 'while(<>){if(/�HEADERS�/){last;}}while(<>){print $_}' < ${source} >> ${target} 
    302306    done 
    303307  done 
     
    353357  echo "" >> po/POTFILES.in 
    354358  echo "# modules" >> po/POTFILES.in 
    355   find modules -name '*.[chm]' -o -name '*.[ch]pp' | grep -v 'gui/win32/' | sort >> po/POTFILES.in 
     359  find modules -name '*.[chm]' -o -name '*.[ch]pp' \ 
     360    | grep -v '\(gui/win32/\|\.moc\.\)' \ 
     361    | sort >> po/POTFILES.in 
    356362  # clean old potfiles 
    357363  cd po 
     
    372378  #set -x 
    373379 
    374   srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`" 
     380  if test -z "${srcdir}"; then 
     381    srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`" 
     382  fi 
    375383  LIBVLC_HEADERS=`getfiles HEADERS_include` 
    376384  BUILTINS=`sed -ne 's/.*builtins *= *" *\([^"]*\)".*/\1/p' vlc-config`