4 # This script was used to covert recursive Makefile.am's to included versions in the plugins dir
5 # it does only some stupid repeating tasks, manual editing is needed afterwards
7 echo "This was a one-shot script and is only kept for documentation purposes"
14 # process commented out include lines
15 if test "${file:0:8}" = "#include"; then
16 makefileam
=${file#*/*/}
17 pluginname
=$
(sed -e 's/noinst_LTLIBRARIES *= *\(.*\).la/\1/p;d' $makefileam)
18 if test ! "$pluginname"; then
19 pluginname
=${makefileam%/*}
22 echo "Working in $makefileam for $pluginname"
24 #cp $makefileam $makefileam.new
29 # Formatting, souround = with spaces, remove double spaces and tabs and spaces at end of line
34 # insert the srcdir var
36 ${pluginname}_la_srcdir = \$(top_srcdir)/plugins/${pluginname}
42 # INCLUDES to _CPPFLAGS
43 g/^INCLUDES/s/INCLUDES/${pluginname}_la_CPPFLAGS/
45 #add srcdir to SOURCES
46 g/_la_SOURCES/s/\([^ ]*\.[^ ]*\)/\$(${pluginname}_la_srcdir)\/\1/g
49 g/^AM_CXXFLAGS/s/AM_CXXFLAGS/${pluginname}_la_CXXFLAGS/
52 g/_HEADERS/s/\([^ ]*\.[^ ]*\)/\$(${pluginname}_la_srcdir)\/\1/g
54 #add dir to backslashified lines
55 g/^ /s/\([^ ]*\.[^ ]*\)/\$(${pluginname}_la_srcdir)\/\1/g
57 #add dir to EXTRA_DIST
58 g/EXTRA_DIST/s/\([^ ]*\.[^ ]*\)/\$(${pluginname}_la_srcdir)\/\1/g
60 # Fix LIBADD libeffectv_la_LIBADD = \$(top_builddir)/plugins/colors/libcolors.la
61 g/_la_LIBADD/s/\(libeffectv_la_LIBADD\) *= *.*\/\([^/]*\)/\1 = \2/
63 # replace = with += for shared variables
64 g/^noinst_HEADERS/s/=/+=/
65 g/^noinst_LTLIBRARIES/s/=/+=/
67 g/^plugin_LTLIBRARIES/s/=/+=/
74 #diff -W200 -dy $makefileam $makefileam.new | less