diff options
-rw-r--r-- | src/Makefile.am | 12 | ||||
-rw-r--r-- | src/deftwmrc.sed | 4 | ||||
-rwxr-xr-x | src/gen_deftwmrc.sh | 17 |
3 files changed, 19 insertions, 14 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index c0e7994..5da94ea 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -74,14 +74,6 @@ twm_SOURCES = \ BUILT_SOURCES = gram.h deftwmrc.c deftwmrc.c: system.twmrc - $(AM_V_at)rm -f $@ ; \ - echo '/* ' >>$@ ; \ - echo ' * This file is generated automatically from the default' >>$@ ; \ - echo ' * twm bindings file system.twmrc by the twm Makefile.' >>$@ ; \ - echo ' */' >>$@ ; \ - echo '' >>$@ ; \ - echo 'const unsigned char *defTwmrc[] = {' >>$@ ; \ - $(SED) -f ${srcdir}/deftwmrc.sed < ${srcdir}/system.twmrc >>$@ ; \ - echo ' (const unsigned char *) 0 };' >>$@ + $(srcdir)/gen_deftwmrc.sh $@ $< -EXTRA_DIST = deftwmrc.sed siconify.bm +EXTRA_DIST = siconify.bm diff --git a/src/deftwmrc.sed b/src/deftwmrc.sed deleted file mode 100644 index 30f8c27..0000000 --- a/src/deftwmrc.sed +++ /dev/null @@ -1,4 +0,0 @@ -/^#/d -s/"/\\"/g -s/^/ (const unsigned char *) "/ -s/$/",/ diff --git a/src/gen_deftwmrc.sh b/src/gen_deftwmrc.sh new file mode 100755 index 0000000..ec7188c --- /dev/null +++ b/src/gen_deftwmrc.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +rm -f ${1} +echo '/* ' >>${1} +echo ' * This file is generated automatically from the default' >>${1} +echo ' * twm bindings file system.twmrc by the twm Makefile.' >>${1} +echo ' */' >>${1} +echo '' >>${1} +echo 'const unsigned char *defTwmrc[] = {' >>${1} +sed \ + -e '/^#/d' \ + -e 's/"/\\"/g' \ + -e 's/^/ (const unsigned char *) "/' \ + -e 's/$/",/' \ + <${2} \ + >>${1} +echo ' (const unsigned char *) 0 };' >>${1} |