gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, cmake, updated. gawk-4.1.0-93-g2cd2431


From: Juergen Kahrs
Subject: [gawk-diffs] [SCM] gawk branch, cmake, updated. gawk-4.1.0-93-g2cd2431
Date: Sun, 19 May 2013 09:45:31 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, cmake has been updated
       via  2cd2431737dd088c4eb957e27aa6a1edb17aa88e (commit)
      from  9c32ff7ed5aeca6906dbdb5bcf602f675893f3be (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=2cd2431737dd088c4eb957e27aa6a1edb17aa88e

commit 2cd2431737dd088c4eb957e27aa6a1edb17aa88e
Author: Juergen Kahrs <address@hidden>
Date:   Sun May 19 11:45:18 2013 +0200

    Added more doc dependencies; some of them incomplete.

diff --git a/cmake/docmaker b/cmake/docmaker
index f9a821e..873d946 100755
--- a/cmake/docmaker
+++ b/cmake/docmaker
@@ -1,61 +1,100 @@
 #!/bin/sh
 
-# TODO
-# Check all dependencies first, then build the target.
-# Each target shall be implemented as one function.
-
-if test $# -lt 1; then
+# The first parameter is the target, the file to be built.
+# All remaining parameters are dependencies (file names).
+if [ $# -lt 1 ] ; then
   echo "  $0: Incorrect number ($#) of parameters passed: $*"
 fi
 OUTFILE=$1
-if test $OUTFILE = gawk.texi; then
-  INFILE=gawktexi.in
-  COMMAND="awk -f sidebar.awk < gawktexi.in > gawk.texi"
-elif test $OUTFILE = gawk.dvi; then
-  INFILE=gawk.texi
-  COMMAND="texi2dvi  -q --clean gawk.texi"
-elif test $OUTFILE = gawkinet.dvi; then
-  INFILE=gawkinet.texi
-  COMMAND="texi2dvi  -q --clean gawkinet.texi"
-elif test $OUTFILE = gawk.1.ps; then
-  INFILE=gawk.1
-  COMMAND="groff -z -man gawk.1 > gawk.1.ps"
-elif test $OUTFILE = igawk.1.ps; then
-  INFILE=igawk.1
-  COMMAND="groff -z -man igawk.1 > igawk.1.ps"
-elif test $OUTFILE = gawk.1.pdf; then
-  INFILE=gawk.1.ps
-  COMMAND="ps2pdf -q gawk.1.ps gawk.1.pdf"
-elif test $OUTFILE = igawk.1.pdf; then
-  INFILE=igawk.1.ps
-  COMMAND="ps2pdf -q igawk.1.ps igawk.1.pdf"
-elif test $OUTFILE = gawk.ps; then
-  INFILE=gawk.dvi
-  COMMAND="dvips -q -o gawk.ps gawk.dvi"
-elif test $OUTFILE = gawkinet.ps; then
-  INFILE=gawkinet.dvi
-  COMMAND="dvips -q -o gawkinet.ps gawkinet.dvi"
-elif test $OUTFILE = gawk.pdf; then
-  INFILE=gawk.ps
-  COMMAND="ps2pdf -q gawk.ps gawk.pdf"
-elif test $OUTFILE = gawkinet.pdf; then
-  INFILE=gawkinet.ps
-  COMMAND="ps2pdf -q gawkinet.ps gawkinet.pdf"
-else
-  echo "  unknwon target $OUTFILE"
-  exit 1
-fi
+shift 1
+INFILES="$@"
 
-if ! test -r "$INFILE"; then
-  echo " $0: Cannot read input file $INFILE"
-  exit 1
-fi
+MAKEINFO="makeinfo --no-split --force"
+TROFF="groff -t -Tps -U"
+SEDME="sed -e \"s/^level0 restore/level0 restore flashme 100 72 moveto 
(Copyright `date '+%m-%d-%y %T'`, FSF, Inc. (all)) show/\" -e \"s/^\/level0 
save def/\/level0 save def 30 -48 translate/\""
+SEDME2="sed '/%%Page: 10 10/,/0 Cg EP/d'"
+
+function BuildTarget()
+{
+  local OUTFILE=$1
+  local INFILE=""
+  local COMMAND=""
+
+  FILEBASE=${OUTFILE%.*}
+  case $OUTFILE in
+    *\.in | *\.1 | macros | cardfonts | colors | ad.block | setter.outline | \
+    gawkinet.texi | rflashlight.eps | api-figure1.fig | api-figure2.fig | 
api-figure3.fig | \
+    general-program.fig | process-flow.fig | statist.eps)
+      INFILE=$OUTFILE
+      ;;
+    *\.texi)
+      if [ $FILEBASE = gawk ] ; then
+               INFILE=gawktexi.in
+      else
+               INFILE=$OUTFILE.in
+      fi
+      COMMAND="awk -f sidebar.awk < $INFILE > $OUTFILE"
+      ;;
+    *\.dvi)
+      INFILE=$FILEBASE.texi
+      COMMAND="texi2dvi -q --clean $INFILE"
+      ;;
+    *\.info)
+      INFILE=$FILEBASE.texi
+      COMMAND="${MAKEINFO} $INFILE"
+      ;;
+    *\.ps)
+      if [ $FILEBASE = awkcard ] ; then
+        INFILE=awkcard.in
+        COMMAND="${TROFF} $* | ${SEDME} | cat setter.outline - | ${SEDME2} > 
awkcard.ps"
+      elif [ $FILEBASE = gawk.1 -o $FILEBASE = igawk.1 ] ; then
+        INFILE=$FILEBASE
+        COMMAND="groff -z -man $INFILE > $OUTFILE"
+      else
+        INFILE=$FILEBASE.dvi
+        COMMAND="dvips -q -o $OUTFILE $INFILE"
+      fi
+      ;;
+    *\.pdf)
+      INFILE=$FILEBASE.ps
+      COMMAND="ps2pdf -q $INFILE $OUTFILE"
+      ;;
+    *\.tr)
+      INFILE=$FILEBASE.in
+      COMMAND="sed 's:SRCDIR:.:' < $INFILE > $OUTFILE"
+      ;;
+    *\.nc)
+      INFILE=$FILEBASE.in
+      COMMAND="sed 's:SRCDIR:.:' < $INFILE > $OUTFILE"
+      COMMAND="${TROFF} $* | ${SEDME} | cat setter.outline - | ${SEDME2} > 
$FILEBASE.ps && touch $OUTFILE"
+      ;;
+    *)
+      echo "  unknwon target $OUTFILE"
+      exit 1
+  esac
 
-if test -f "$OUTFILE"; then
-  if test "$INFILE" -ot "$OUTFILE" ; then
-    printf "  Target %15s is up-to-date\n" $OUTFILE
-    exit 0
+  if  [ ! -r "$INFILE" ] ; then
+    echo " $0: Cannot read input file $INFILE"
+    exit 1
   fi
-fi
-echo "  Generating $OUTFILE from $INFILE"
-echo $COMMAND | sh
+  
+  if [ -f "$OUTFILE" ] ; then
+    if [ "$INFILE" -ot "$OUTFILE" ] ; then
+      #printf "  Target %15s is up-to-date\n" $OUTFILE
+      exit 0
+    fi
+  fi
+  #echo "  Generating $OUTFILE from $INFILE"
+  echo $COMMAND | sh -x
+  #echo "COMMAND=$COMMAND"
+}
+
+# Build all dependencies first, then build the target.
+for dep in $INFILES
+do
+  #echo $OUTFILE depends on $dep
+  BuildTarget $dep
+  :
+done
+BuildTarget $OUTFILE
+
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 85ac0b3..e12f5de 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -37,9 +37,18 @@ ENDMACRO(DocDependency)
 find_program(TEXI2DVI_CONVERTER texi2dvi)
 if (TEXI2DVI_CONVERTER)
   add_custom_target(doc)
-  DocDependency(gawk.texi gawktexi.in)
+  DocDependency(gawk.texi gawktexi.in rflashlight.eps api-figure1.fig 
api-figure2.fig api-figure3.fig general-program.fig process-flow.fig)
+  DocDependency(rflashlight.eps)
+  DocDependency(api-figure1.fig)
+  DocDependency(api-figure2.fig)
+  DocDependency(api-figure3.fig)
+  DocDependency(general-program.fig)
+  DocDependency(process-flow.fig)
   DocDependency(gawk.dvi gawk.texi)
+  DocDependency(gawk.info gawk.texi)
   DocDependency(gawkinet.dvi gawkinet.texi)
+  DocDependency(gawkinet.info gawkinet.texi)
+  DocDependency(gawkinet.texi statist.eps)
   DocDependency(gawk.1.ps gawk.1)
   DocDependency(igawk.1.ps igawk.1)
   find_program(DVIPS_CONVERTER dvips)
@@ -54,8 +63,20 @@ if (TEXI2DVI_CONVERTER)
       DocDependency(gawkinet.pdf gawkinet.ps)
       install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gawk.1.pdf DESTINATION doc)
       install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/igawk.1.pdf DESTINATION doc)
+      install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gawk.info DESTINATION doc)
       install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gawk.pdf DESTINATION doc)
+      install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gawkinet.info DESTINATION doc)
       install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gawkinet.pdf DESTINATION doc)
+
+      set(CARDSRC macros cardfonts colors awkcard.tr)
+      set(CARDSRC_N macros cardfonts no.colors awkcard.tr)
+      set(CARDFILES  ${CARDSRC} ad.block awkcard.in setter.outline)
+      DocDependency(awkcard.tr awkcard.in)
+      DocDependency(awkcard.nc ${CARDFILES})
+      DocDependency(awkcard.ps ${CARDFILES})
+      DocDependency(awkcard.pdf awkcard.ps)
+      install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/awkcard.pdf DESTINATION doc)
+
     else()
       message(WARNING "Found no ps2pdf tool; no doc will be generated")
       install(CODE "MESSAGE(\"doc generated only in .ps files\")")

-----------------------------------------------------------------------

Summary of changes:
 cmake/docmaker     |  145 +++++++++++++++++++++++++++++++++-------------------
 doc/CMakeLists.txt |   23 ++++++++-
 2 files changed, 114 insertions(+), 54 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]