diff --git a/Makefile.am b/Makefile.am index 3d30a0247..f0c80c9f2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -66,21 +66,21 @@ BUILT_SOURCES += uicbgen.h EXTRA_DIST += build-utils/uicbgen.sh uicbgen.h: $(awesome_SOURCES) @echo "generating uicbgen.h from headers file" - $(top_srcdir)/build-utils/uicbgen.sh > uicbgen.h + $(top_srcdir)/build-utils/uicbgen.sh "$(top_srcdir)" > uicbgen.h CLEANFILES += layoutgen.h BUILT_SOURCES += layoutgen.h EXTRA_DIST += build-utils/layoutgen.sh layoutgen.h: $(awesome_SOURCES) @echo "generating layoutgen.h from layouts headers file" - $(top_srcdir)/build-utils/layoutgen.sh > layoutgen.h + $(top_srcdir)/build-utils/layoutgen.sh "$(top_srcdir)" > layoutgen.h CLEANFILES += widgetgen.h BUILT_SOURCES += widgetgen.h EXTRA_DIST += build-utils/widgetgen.sh widgetgen.h: widget.h @echo "generating widgetgen.h from widget.h" - $(top_srcdir)/build-utils/widgetgen.sh > widgetgen.h + $(top_srcdir)/build-utils/widgetgen.sh "$(top_srcdir)" > widgetgen.h if USING_GCC # If you are using gcc, and want to deactivate this default set of diff --git a/build-utils/layoutgen.sh b/build-utils/layoutgen.sh index 9f4e10e1a..e772b4dc6 100755 --- a/build-utils/layoutgen.sh +++ b/build-utils/layoutgen.sh @@ -1,9 +1,10 @@ #!/bin/sh +top_srcdir="${1-.}" echo "/* This file is autogenerated by" $(basename $0) "*/" echo echo "const name_func_link_t LayoutList[] =" echo "{" -for file in layouts/*.h +for file in ${top_srcdir}/layouts/*.h do echo " /* $file */" grep '^LayoutArrange layout_' $file | cut -d' ' -f2 | cut -d\; -f1 | while read layout diff --git a/build-utils/uicbgen.sh b/build-utils/uicbgen.sh index 59eb5c20c..744caa961 100755 --- a/build-utils/uicbgen.sh +++ b/build-utils/uicbgen.sh @@ -1,16 +1,17 @@ #!/bin/sh +top_srcdir="${1-.}" echo "/* This file is autogenerated by" $(basename $0) "*/" echo echo "const name_func_link_t UicbList[] =" echo "{" -for file in *.h layouts/*.h +for file in ${top_srcdir}/*.h ${top_srcdir}/layouts/*.h do echo " /* $file */" grep '^Uicb uicb_' $file | cut -d' ' -f2 | cut -d\; -f1 | while read uicb do shortname=$(echo $uicb | cut -d _ -f2-) echo " {\"$shortname\", $uicb}," - grep -q "\*$shortname\*" awesomerc.1.txt || \ + grep -q "\*$shortname\*" ${top_srcdir}/awesomerc.1.txt || \ echo " WARNING: $uicb NOT documented" >&2 done done diff --git a/build-utils/widgetgen.sh b/build-utils/widgetgen.sh index d6a7e52a8..92fb3688c 100755 --- a/build-utils/widgetgen.sh +++ b/build-utils/widgetgen.sh @@ -1,16 +1,17 @@ #!/bin/sh +top_srcdir="${1-.}" echo "/* This file is autogenerated by" $(basename $0) "*/" echo echo "const name_func_link_t WidgetList[] =" echo "{" -for file in widget.h +for file in ${top_srcdir}/widget.h do echo " /* $file */" - grep '^WidgetConstructor ' widget.h | cut -d' ' -f2 | cut -d\; -f1 | while read widget + grep '^WidgetConstructor ' "$file" | cut -d' ' -f2 | cut -d\; -f1 | while read widget do shortname=$(echo $widget | cut -d_ -f1) echo " {\"$shortname\", $widget}," - grep -q "^$shortname" awesomerc.1.txt || \ + grep -q "^$shortname" ${top_srcdir}/awesomerc.1.txt || \ echo " WARNING: $uicb NOT documented" >&2 done done