Do not overwrite help-sections.h if it's not changed
This commit is contained in:
parent
76e6452618
commit
9501f790fe
@ -17,7 +17,7 @@ EXTRA_DIST = \
|
|||||||
|
|
||||||
dist_man_MANS = medit.1
|
dist_man_MANS = medit.1
|
||||||
|
|
||||||
BUILT_SOURCES = stamp-help help-sections.h medit.1
|
BUILT_SOURCES = stamp-help medit.1
|
||||||
|
|
||||||
help-sections.h: stamp-help
|
help-sections.h: stamp-help
|
||||||
build-docs: stamp-help
|
build-docs: stamp-help
|
||||||
@ -28,7 +28,7 @@ medit.1: man-medit.t2t
|
|||||||
stamp-help: $(t2t_sources) makedocs
|
stamp-help: $(t2t_sources) makedocs
|
||||||
rm -fr help && \
|
rm -fr help && \
|
||||||
$(mkdir_p) help && \
|
$(mkdir_p) help && \
|
||||||
$(srcdir)/makedocs $(srcdir) $(srcdir)/medit.t2t && \
|
$(srcdir)/makedocs $(srcdir)/medit.t2t && \
|
||||||
echo stamp > stamp-help
|
echo stamp > stamp-help
|
||||||
|
|
||||||
medit.lo: build-docs
|
medit.lo: build-docs
|
||||||
|
24
doc/makedocs
24
doc/makedocs
@ -1,10 +1,10 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
# makedocs SRCDIR INPUT
|
# makedocs INPUT
|
||||||
|
|
||||||
srcdir=`cd $1 && pwd`
|
srcdir=`cd \`dirname $1\` && pwd`
|
||||||
thisdir=`pwd`
|
thisdir=`pwd`
|
||||||
infile="$2"
|
infile="$1"
|
||||||
outfile="$thisdir"/`basename $infile .t2t`.html
|
outfile="$thisdir"/`basename $infile .t2t`.html
|
||||||
outdir="$thisdir/help"
|
outdir="$thisdir/help"
|
||||||
|
|
||||||
@ -29,16 +29,18 @@ generate () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
write_sections () {
|
write_sections () {
|
||||||
echo "#ifndef HELP_SECTIONS_H" > help-sections.h
|
echo "#ifndef HELP_SECTIONS_H" > $2
|
||||||
echo "#define HELP_SECTIONS_H" >> help-sections.h
|
echo "#define HELP_SECTIONS_H" >> $2
|
||||||
echo "" >> help-sections.h
|
echo "" >> $2
|
||||||
for s in `grep '@@.*@@' $1 | sed 's/.*@@\(.*\)@@.*/\1/'`; do
|
for s in `grep '@@.*@@' $1 | sed 's/.*@@\(.*\)@@.*/\1/'`; do
|
||||||
echo "#define HELP_SECTION_`echo $s | tr '[a-z]' '[A-Z]' | tr -- - _` \"$s\"" >> help-sections.h
|
echo "#define HELP_SECTION_`echo $s | tr '[a-z]' '[A-Z]' | tr -- - _` \"$s\"" >> $2
|
||||||
done
|
done
|
||||||
echo "" >> help-sections.h
|
echo "" >> $2
|
||||||
echo "#endif /* HELP_SECTIONS_H */" >> help-sections.h
|
echo "#endif /* HELP_SECTIONS_H */" >> $2
|
||||||
}
|
}
|
||||||
|
|
||||||
generate $infile $outfile || exit 1
|
generate $infile $outfile || exit 1
|
||||||
write_sections $outfile || exit 1
|
write_sections $outfile help-sections.h.tmp || exit 1
|
||||||
# rm $outfile || exit 1
|
cmp -s help-sections.h.tmp help-sections.h || cp help-sections.h.tmp help-sections.h || exit 1
|
||||||
|
rm -f help-sections.h.tmp
|
||||||
|
rm $outfile || exit 1
|
||||||
|
@ -77,7 +77,7 @@ e.g. /tmp/file.txt:200. Trailing colon is ignored
|
|||||||
= ENVIRONMENT VARIABLES =
|
= ENVIRONMENT VARIABLES =
|
||||||
|
|
||||||
: MEDIT_PID
|
: MEDIT_PID
|
||||||
if set, is used as --pid argument. When medit spawns a process (e.g. a DVI viewer) it sets
|
if set, it is used as --pid argument. When medit spawns a process (e.g. a DVI viewer) it sets
|
||||||
MEDIT_PID to its own process id, so the child process may in turn simply use 'medit filename'
|
MEDIT_PID to its own process id, so the child process may in turn simply use 'medit filename'
|
||||||
to open a file (e.g. for inverse DVI search).
|
to open a file (e.g. for inverse DVI search).
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@ moo/mooedit/language-specs/ruby.lang
|
|||||||
moo/mooedit/language-specs/scheme.lang
|
moo/mooedit/language-specs/scheme.lang
|
||||||
moo/mooedit/language-specs/sh.lang
|
moo/mooedit/language-specs/sh.lang
|
||||||
moo/mooedit/language-specs/sql.lang
|
moo/mooedit/language-specs/sql.lang
|
||||||
|
moo/mooedit/language-specs/t2t.lang
|
||||||
moo/mooedit/language-specs/tcl.lang
|
moo/mooedit/language-specs/tcl.lang
|
||||||
moo/mooedit/language-specs/texinfo.lang
|
moo/mooedit/language-specs/texinfo.lang
|
||||||
moo/mooedit/language-specs/vala.lang
|
moo/mooedit/language-specs/vala.lang
|
||||||
|
@ -51,6 +51,7 @@ moo/mooedit/language-specs/ruby.lang
|
|||||||
moo/mooedit/language-specs/scheme.lang
|
moo/mooedit/language-specs/scheme.lang
|
||||||
moo/mooedit/language-specs/sh.lang
|
moo/mooedit/language-specs/sh.lang
|
||||||
moo/mooedit/language-specs/sql.lang
|
moo/mooedit/language-specs/sql.lang
|
||||||
|
moo/mooedit/language-specs/t2t.lang
|
||||||
moo/mooedit/language-specs/tcl.lang
|
moo/mooedit/language-specs/tcl.lang
|
||||||
moo/mooedit/language-specs/texinfo.lang
|
moo/mooedit/language-specs/texinfo.lang
|
||||||
moo/mooedit/language-specs/vbnet.lang
|
moo/mooedit/language-specs/vbnet.lang
|
||||||
|
Loading…
x
Reference in New Issue
Block a user