Installing Ocaml/grammar module for SWIG - ocaml

Running Swig example for ocaml gives me this error message.
rm -rf swig.mli swig.ml swigp4.ml && ../../../preinst-swig -ocaml -co swig.mli 2>/dev/null && ../../../preinst-swig -ocaml -co swig.ml 2>/dev/null && ../../../preinst-swig -ocaml -co swigp4.ml 2>/dev/null && ocamlc -c swig.mli && ocamlc -c swig.ml && ocamlc -I ` camlp4 -where` -pp "camlp4o pa_extend.cmo q_MLast.cmo" -c swigp4.ml
File "swig.ml", line 159, characters 54-57:
Warning 20: this argument will not be used by the function.
File "swigp4.ml", line 26, characters 2-6:
Parse error: Deprecated syntax, the grammar module is expected
File "swigp4.ml", line 1, characters 0-1:
Error: Preprocessor error
The File "swigp4.ml", line 26, characters 2-6 has the following content.
EXTEND
Line 25: expr:
Line 26: [ [ e1 = expr ; "'" ; "[" ; e2 = expr ; "]" ->
Line 27: >
...
Line 114: | f = expr ; "'" ; "(" ; args = LIST0 (expr LEVEL "simple") SEP "," ; ")" ->
Line 115: >
Line 116: ] ] ;
Line 117: END ;;
What might be wrong? How to install grammar module with ocaml?
ADDED
I use Mac OS X 10.6.4, and I installed Ocaml from this site.
And I got the following result with 'camlp4 -where'.
simple> camlp4 -where
/usr/local/lib/ocaml/camlp4
The swigp4.ml is downloadable here.

I've never used this swig package, but have used the camlp4 grammar module. You probably have camlp4, so I'm guessing the issue is the syntax being used. You can check for camlp4 and the grammar module, find the camlp4 directory by,camlp4 -where and see if that directory has, /Camlp4Parsers/Camlp4GrammarParser.[cmi|cmo|cmx|o]
If it's the syntax, I pulled up some code for a camlp4 grammar, and the expressions are structured slightly differently (I'm unsure if that format is invalid or not, but it's at least not how I've structured it before)
[[ | expr1 | expr2 ]]
should be
[ [ expr1] | [expr2] ]

I believe you're not using the latest version of Swig. With Swig 1.3 I had the same issue. Try moving to swig 2.0.X and you'll have no issues.
I've been working on ocaml bindings for Xapian and unfortunately the ocaml support in Swig has gone a bit unmaintained. However, I've found the examples in the Swig source tree to be extremely helpful. I've put together a decent make recipe for compiling the swig dependencies. You'll probably notice this is not really any different than the swig examples, I am just shamelessly using this time to share it:
SWIG=../../swig/preinst-swig
swig:
$(SWIG) -ocaml -co swigp4.ml
$(SWIG) -ocaml -co swig.mli
$(SWIG) -ocaml -co swig.ml
ocamlfind ocamlc -package camlp4 \
-pp "camlp4o pa_extend.cmo q_MLast.cmo" \
-c swigp4.ml
ocamlc -c swig.mli swig.ml
You can then build with that by including a -pp "camlp4o ./swig4.cmo" when compiling any code that uses the syntax extensions. You will also need to add swig.cmo when linking. I've got a gist of my complete Makefile which you might also find useful.

Related

Unable to install tezos-crypto due to compliation error in package tezos-stdlib-unix

I am trying to install the library tezos-crypto using Opam on Kubuntu 20.04. I am getting the following error:
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of tezos-stdlib-unix failed at "/home/marc/.opam/opam-init/hooks/sandbox.sh build dune build -p
tezos-stdlib-unix -j 15".
#=== ERROR while compiling tezos-stdlib-unix.10.2 =============================#
# context 2.0.5 | linux/x86_64 | ocaml-base-compiler.4.11.1 | https://opam.ocaml.org#e0171a79
# path ~/.opam/default/.opam-switch/build/tezos-stdlib-unix.10.2
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p tezos-stdlib-unix -j 15
# exit-code 1
# env-file ~/.opam/log/tezos-stdlib-unix-69301-e0ba4f.env
# output-file ~/.opam/log/tezos-stdlib-unix-69301-e0ba4f.out
### output ###
# [...]
# (cd _build/default && /home/marc/.opam/default/bin/ocamlc.opt -w -40 -open Tezos_error_monad -open Tezos_error_monad.TzLwtreslib -open Tezos_event_logging -open Tezos_stdlib -open Data_encoding -g -bin-annot -I src/lib_stdlib_unix/.tezos_stdlib_unix.objs/byte -I /home/marc/.opam/default/lib/angstrom -I /home/marc/.opam/default/lib/astring -I /home/marc/.opam/default/lib/base -I /home/marc/.op[...]
# File "src/lib_stdlib_unix/file_descriptor_sink.ml", line 116, characters 16-24:
# 116 | Fmt.strf "%s-%d%s" chopped (Unix.getpid ()) ext
# ^^^^^^^^
# Alert deprecated: Fmt.strf
# use Fmt.str instead.
# (cd _build/default && /home/marc/.opam/default/bin/ocamlopt.opt -w -40 -open Tezos_error_monad -open Tezos_error_monad.TzLwtreslib -open Tezos_event_logging -open Tezos_stdlib -open Data_encoding -g -I src/lib_stdlib_unix/.tezos_stdlib_unix.objs/byte -I src/lib_stdlib_unix/.tezos_stdlib_unix.objs/native -I /home/marc/.opam/default/lib/angstrom -I /home/marc/.opam/default/lib/astring -I /home/[...]
# File "src/lib_stdlib_unix/file_descriptor_sink.ml", line 116, characters 16-24:
# 116 | Fmt.strf "%s-%d%s" chopped (Unix.getpid ()) ext
# ^^^^^^^^
# Alert deprecated: Fmt.strf
# use Fmt.str instead.
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build tezos-stdlib-unix 10.2
└─
╶─ No changes have been performed
How can I resolve this error?

Error during compiling application template written with Eliom of Ocsigen Start

When I try to compile an application template of Ocsigen Start following this instruction, the error shown below happens at make test.byte. Could you tell me how to fix this?
LC_ALL=C ocsigen-i18n-generator \
--languages en,fr \
--default-language en \
--primary myapp_i18n.tsv \
< assets/myapp_Demo_i18n.tsv \
> myapp_Demo_i18n.eliom
eliomc -w +A-4-7-9-37-38-39-41-42-44-45-48 -ppx -ppx "ocsigen-i18n-rewriter --prefix 'Myapp_' --suffix '_i18n' Myapp_i18n" -infer -package lwt_ppx -package js_of_ocaml-ppx_deriving_json -package ppx_deriving.std -package pgocaml -package ocsigen-start.server myapp_Demo_i18n.eliom
File "myapp_Demo_i18n.eliom", line 1, characters 24-37:
1 | let%shared languages = [Myapp_i18n.En;Myapp_i18n.Fr]
^^^^^^^^^^^^^
Error: Unbound constructor Myapp_i18n.En
make: *** [Makefile.os:213: _server/myapp_Demo_i18n.type_mli] Error 2
rm myapp_Demo_i18n.eliom

gcc soname unrecognized command line

I'm compiling sipXtapi and I need to compile with this line
gcc -shared -DPIC .libs/codec_pcmapcmu_la-CodecPcmaWrapper.o .libs/codec_pcmapcmu_la-CodecPcmuWrapper.o .libs/codec_pcmapcmu_la-G711.o .libs/codec_pcmapcmu_la-PlgPcmaPcmu.o -lc -W1,-soname=codec_pcmapcmu.so -o .libs/codec_pcmapcmu.so
gcc: error: unrecognized command line option ‘-W1,-soname=codec_pcmapcmu.so’
and this is the Makefile.am:
## Process this file with automake to produce Makefile.in
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/../sipXportLib/include -I$(top_srcdir)/contrib/libspandsp/src
pkgdata_LTLIBRARIES = codec_pcmapcmu.la
codec_pcmapcmu_la_SOURCES = \
CodecPcmaWrapper.c \
CodecPcmuWrapper.c \
G711.c \
PlgPcmaPcmu.c
if PCMAPCMU_STATIC
codec_pcmapcmu_la_CFLAGS = -DCODEC_STATIC
codec_pcmapcmu_la_LDFLAGS = -module -avoid-version -static else
codec_pcmapcmu_la_LDFLAGS = -module -avoid-version
all-local: codec_pcmapcmu.la
echo "Installing plugin codec_pcmapcmu.so ..."
cp -f .libs/codec_pcmapcmu.so #DEFAULT_CODECS_PATH#
clean-local:
rm -f #DEFAULT_CODECS_PATH#/codec_pcmapcmu.so endif
how can I solve the problem?
There's a spelling error there -W1 should be -Wl (that's a lower case L instead of the digit 1)

Why does make ignore my modifications?

I am trying to use E²LSH, here is the manual. When untarred, the folder of this library has a Makefile, a bin folder and a source folder (among with other stuff).
In the source folder there is LSHMain.cpp, which I have to modify.
I deleted the project (just to make sure I haven't destroyed something), re-download it, modifying the file and then I hit make, but when I run the executable it is like all my modifications are gone and the original code is taken into account only!
This happens regardless of building the project from scratch or not.
I suspect that this has to do with the scripts inside bin folder, because I have to run it like this:
bin/lsh argument_list
What should I change?
Here is the Makefile (reduced, since some stuff is irrelevant)
SOURCES_DIR:=sources
OBJ_DIR:=bin
OUT_DIR:=bin
TEST_DIR:=$(SOURCES_DIR)
#H_SOURCES:=`find $(SOURCES_DIR) -name "*.h"`
#CPP_SOURCES:=`find $(SOURCES_DIR) -name "*.cpp"`
#TEST_SOURCES:=`find $(TEST_DIR) -name "*.cpp"`
OBJ_SOURCES:=$(SOURCES_DIR)/BucketHashing.cpp \
$(SOURCES_DIR)/Geometry.cpp \
$(SOURCES_DIR)/LocalitySensitiveHashing.cpp \
$(SOURCES_DIR)/Random.cpp \
$(SOURCES_DIR)/Util.cpp \
$(SOURCES_DIR)/GlobalVars.cpp \
$(SOURCES_DIR)/SelfTuning.cpp \
$(SOURCES_DIR)/NearNeighbors.cpp
LSH_BUILD:=LSHMain
TEST_BUILDS:=exactNNs \
genDS \
compareOutputs \
genPlantedDS
GCC:=g++
OPTIONS:=-O3 -DREAL_FLOAT -DDEBUG
# -march=athlon -msse -mfpmath=sse
LIBRARIES:=-lm
#-ldmalloc
all:
bin/compile
c: compile
compile:
#mkdir -p $(OUT_DIR)
$(GCC) -o $(OUT_DIR)/$(LSH_BUILD) $(OPTIONS) $(OBJ_SOURCES) $(SOURCES_DIR)/$(LSH_BUILD).cpp $(LIBRARIES)
chmod g+rwx $(OUT_DIR)/$(LSH_BUILD)
and here are the compile and lsh scripts (inside the bin folder, the Makefile was in the same directory with source and bin folders):
#!/bin/bash
OUT_DIR=bin
SOURCES_DIR=sources
OBJ_SOURCES="$SOURCES_DIR/BucketHashing.cpp \
$SOURCES_DIR/Geometry.cpp \
$SOURCES_DIR/LocalitySensitiveHashing.cpp \
$SOURCES_DIR/Random.cpp \
$SOURCES_DIR/Util.cpp \
$SOURCES_DIR/GlobalVars.cpp \
$SOURCES_DIR/SelfTuning.cpp \
$SOURCES_DIR/NearNeighbors.cpp"
TEST_BUILDS="exactNNs \
genDS \
compareOutputs \
genPlantedDS"
defineFloat=REAL_FLOAT
g++ -o $OUT_DIR/testFloat -DREAL_FLOAT $OBJ_SOURCES $SOURCES_DIR/testFloat.cpp -lm >/dev/null 2>&1 || defineFloat=REAL_DOUBLE
OPTIONS="-O3 -D$defineFloat"
g++ -o $OUT_DIR/LSHMain $OPTIONS $OBJ_SOURCES $SOURCES_DIR/LSHMain.cpp -lm
chmod g+rwx $OUT_DIR/LSHMain
for i in $TEST_BUILDS; do
g++ -o ${OUT_DIR}/$i $OPTIONS ${SOURCES_DIR}/${i}.cpp $OBJ_SOURCES -lm; chmod g+rwx $OUT_DIR/${i};
done
the lsh script
#!/bin/bash
dir=bin
if [ $# -le 2 ]; then
echo Usage: $0 radius data_set_file query_set_file "[successProbability]"
exit
fi
paramsFile=$2.params
if [ $# -ge 4 ]; then
# success probability supplied
$dir/lsh_computeParams $1 "$2" "$3" $4 > "$paramsFile" || exit 1
else
# success probability not supplied
$dir/lsh_computeParams $1 "$2" "$3" > "$paramsFile" || exit 1
fi
chmod g+rw "$paramsFile"
echo "R*******" >/dev/stderr
echo "R*********************" >/dev/stderr
echo "R-NN DS params computed." >/dev/stderr
echo "R*********************" >/dev/stderr
echo "R*******" >/dev/stderr
$dir/lsh_fromParams "$2" "$3" "$paramsFile"
EDIT_1
When I run make I get:
bin/compile
sources/LocalitySensitiveHashing.cpp: In function ‘RNNParametersT readRNNParameters(FILE*)’:
sources/LocalitySensitiveHashing.cpp:62:22: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
(many many warnings, but no errors, I have checked that I can execute the program afterwards)
With make c I got:
g++ -o bin/LSHMain -O3 -DREAL_FLOAT -DDEBUG sources/BucketHashing.cpp sources/Geometry.cpp sources/LocalitySensitiveHashing.cpp sources/Random.cpp sources/Util.cpp sources/GlobalVars.cpp sources/SelfTuning.cpp sources/NearNeighbors.cpp sources/LSHMain.cpp -lm
warnings
chmod g+rwx bin/LSHMain
I really don't get why this didn't work....
With make compile I got:
g++ -o bin/LSHMain -O3 -DREAL_FLOAT -DDEBUG sources/BucketHashing.cpp sources/Geometry.cpp sources/LocalitySensitiveHashing.cpp sources/Random.cpp sources/Util.cpp sources/GlobalVars.cpp sources/SelfTuning.cpp sources/NearNeighbors.cpp sources/LSHMain.cpp -lm
warnings
chmod g+rwx bin/LSHMain
EDIT_2
the lsh_comouteParams is this:
#!/bin/bash
successProbability=0.9
if [ $# -le 1 ]; then
echo Usage: $0 radius data_set_file "{query_set_file | .} [successProbability]"
exit
fi
if [ $# -ge 4 ]; then
# success probability supplied
successProbability=$4
fi
arch=`uname`
nDataSet=` wc -l "$2"`
for x in $nDataSet; do nDataSet=$x; break; done
if [ "$3" != "." ]; then
nQuerySet=` wc -l "$3"`
for x in $nQuerySet; do nQuerySet=$x; break; done
else
nQuerySet=0
fi
dimension=`head -1 "$2" | wc -w`
#echo $nDataSet $nQuerySet $dimension
if [ -e bin/mem ]; then
m=`cat bin/mem`;
elif [ "$arch" = "Darwin" ]
then
#http://discussions.apple.com/thread.jspa?threadID=1608380&tstart=0
m=`top -l 1 | grep PhysMem | awk -F "[M,]" ' {print$10 }'`
let m=m*1024*1024
echo $m > bin/mem
else
s=`free -m | grep "Mem:"`
for i in $s; do m=$i; if [ "$i" != "Mem:" ]; then break; fi; done
m=${m}000000
echo $m > bin/mem
fi
bin/LSHMain $nDataSet $nQuerySet $dimension $successProbability "$1" "$2" "$3" $m -c
I had modified the file as such:
int main(int nargs, char **args){
printf("uoo\n");return 0;
if(nargs < 9){
usage(args[0]);
exit(1);
}
...
}
When E²LSH doesn't receive the correct arguments, it won't run it's LSHMain (regardless the fact that there is a relevant code for that in that file - which what tricked me so badly, because I thought that I was reaching that point inside main()).
There is a script in bin folder which will take over and print the very same message as usage() would print, that's why I thought that I was reaching that call. The function call lies inside if(nargs < 9), which made me to give in purpose less arguments so that it would sure fall inside that if and won't execute the algorithm (which takes time).
In short:
In order to reach the point that the code source/LSHMain.cpp gets executed one must pass the correct arguments to to bin/lsh. If not, bin/lsh script will only be executed, thus shadowing the modifications made in source/LSHMain.cpp.
Hope that this answer will make future users to avoid such a trap. Special thanks to Etan Reisner that helped me and eventually made me think to delete source/LSHMain.cpp, which made me to figure out what was happening.

How to write clean target?

First of all, I am not sure that what I am going to ask is my problem. Perhaps it is something else, so, please, don't hesitate to point that out. I think that the place I went wrong is the clean target of my Makefile, but it could be something else entirely.
Here is what happens: after running make clean and then make few targets, which have their resulting files deleted during the clean don't rebuild. (In addition to my question I'd be interested in a way to cancel entirely all caching GNU/Make does, it has been a major pain since whenever I ever used it, and never had any positive consequences, not even once).
If I then run make again, some of the targets are rebuilt. If I run make one more time, the targets that depend on the targets built in the previous round are rebuilt and so on.
Here's the corresponding Makefile section:
PACKAGE = i-iterate
DOCDST = ${PACKAGE}/docs
HTMLDOCDST = ${PACKAGE}/html-docs
DOCSRC = ${PACKAGE}/info
IC = makeinfo
ICO = --force
TEXI2HTML = texi2html
TEXI2HTMLO = --split section --use-nodes
HTML2WIKI = html2wiki
HTML2WIKIO = --dialect GoogleCode
TEXI = $(wildcard $(DOCSRC)/*.texi)
INFO = $(addprefix $(DOCDST)/,$(notdir $(TEXI:.texi=.info)))
WIKIDST = ../wiki
HTML = $(wildcard $(HTMLDOCDST)/*.html)
WIKI = $(addprefix $(WIKIDST)/,$(notdir $(HTML:.html=.wiki)))
$(DOCDST)/%.info: $(DOCSRC)/%.texi
echo "info builds: $<"
$(IC) $(ICO) -o $# $<
$(TEXI2HTML) $(TEXI2HTMLO) $<
$(WIKIDST)/%.wiki: $(HTMLDOCDST)/%.html
$(HTML2WIKI) $(HTML2WIKIO) $< > $#
default: prepare $(INFO) move-html $(WIKI) rename-wiki byte-compile
cp -r lisp info Makefile README i-pkg.el ${PACKAGE}
prepare:
mkdir -p ${PACKAGE}
mkdir -p ${DOCDST}
mkdir -p ${HTMLDOCDST}
move-html:
$(shell [[ '0' -ne `find ./ -maxdepth 1 -name "*.html" | wc -l` ]] && \
mv -f *.html ${HTMLDOCDST}/)
rename-wiki:
$(shell cd ${WIKIDST} && rename 'i-iterate' 'Iterate' *.wiki)
$(shell find ${WIKIDST} -name "*.wiki" -exec sed -i \
's/\[i-iterate/\[Iterate/g;s/\.html\#/\#/g;s/</\</g;s/>/\>/g' \
'{}' \;)
byte-compile:
emacs -Q -L ./lisp -batch -f batch-byte-compile ./lisp/*.el
clean:
rm -f ./lisp/*.elc
rm -f ./*.html
rm -rf ${DOCDST}
rm -rf ${HTMLDOCDST}
rm -rf ${PACKAGE}
And here's the output:
First run
$ make
mkdir -p i-iterate
mkdir -p i-iterate/docs
mkdir -p i-iterate/html-docs
emacs -Q -L ./lisp -batch -f batch-byte-compile ./lisp/*.el
Wrote /home/wvxvw/Projects/i-iterate/trunk/lisp/i-iterate.elc
cp -r lisp info Makefile README i-pkg.el i-iterate
Second run
$ make
mkdir -p i-iterate
mkdir -p i-iterate/docs
mkdir -p i-iterate/html-docs
echo "info builds: i-iterate/info/i-iterate.texi"
info builds: i-iterate/info/i-iterate.texi
makeinfo --force -o i-iterate/docs/i-iterate.info i-iterate/info/i-iterate.texi
texi2html --split section --use-nodes i-iterate/info/i-iterate.texi
emacs -Q -L ./lisp -batch -f batch-byte-compile ./lisp/*.el
Wrote /home/wvxvw/Projects/i-iterate/trunk/lisp/i-iterate.elc
cp -r lisp info Makefile README i-pkg.el i-iterate
Third run
$ make
mkdir -p i-iterate
mkdir -p i-iterate/docs
mkdir -p i-iterate/html-docs
echo "info builds: i-iterate/info/i-iterate.texi"
info builds: i-iterate/info/i-iterate.texi
makeinfo --force -o i-iterate/docs/i-iterate.info i-iterate/info/i-iterate.texi
texi2html --split section --use-nodes i-iterate/info/i-iterate.texi
html2wiki --dialect GoogleCode i-iterate/html-docs/i-iterate_9.html > ../wiki/i-iterate_9.wiki
# ... a bunch more of the documentation pages ...
/i-iterate_5.wiki
html2wiki --dialect GoogleCode i-iterate/html-docs/i-iterate_2.html > ../wiki/i-iterate_2.wiki
emacs -Q -L ./lisp -batch -f batch-byte-compile ./lisp/*.el
Wrote /home/wvxvw/Projects/i-iterate/trunk/lisp/i-iterate.elc
cp -r lisp info Makefile README i-pkg.el i-iterate
As you can see, the $(INFO) isn't even entered on the first run, even though the directory where it outputs the file was just deleted and created anew. The exact same thing happens later when it (doesn't) rebuild the $(WIKI).
EDIT:
Here's the directory structure, text following # signs is comments.
|- info
| +- documentation.texi
|- lisp
| +- source.el
| +- binary.elc # generated during compile
|- docs # should be deleted and created during the build
| +- documentation.info
|- html-docs # should be deleted and created during the build
| +- documentation.html
|- i-iterate # sources are copied here for distribution
| |- info
| | +- documentation.texi
| |- lisp
| | +- source.el
An update to the original Makefile, but the problem isn't solved
TEXI = $(wildcard $(DOCSRC)/*.texi)
INFO = $(addprefix $(DOCDST)/,$(notdir $(TEXI:.texi=.info)))
WIKIDST = ../wiki
$(DOCDST)/%.info: $(DOCSRC)/%.texi
#echo "info builds: $<"
$(IC) $(ICO) -o $# $<
$(TEXI2HTML) $(TEXI2HTMLO) $<
# This rule is not applied! :(
$(WIKIDST)/%.wiki: $(HTMLDOCDST)/%.html
#echo "Wiki: $<"
$(HTML2WIKI) $(HTML2WIKIO) $< > $#
default: prepare $(INFO) move-html rename-wiki byte-compile
cp -r lisp info Makefile README i-pkg.el ${PACKAGE}
prepare:
mkdir -p ${PACKAGE}
mkdir -p ${DOCDST}
mkdir -p ${HTMLDOCDST}
move-html:
$(shell [[ '0' -ne `find ./ -maxdepth 1 -name "*.html" | wc -l` ]] && \
mv -f *.html ${HTMLDOCDST}/)
$(eval HTML := $(wildcard $(HTMLDOCDST)/*.html))
$(eval WIKI := $(addprefix $(WIKIDST)/,$(notdir $(HTML:.html=.wiki))))
#echo "HTML: $(HTML)" # prints as expected
#echo "WIKI: $(WIKI)" # prints as expected
rename-wiki: $(WIKI) # this dependency never triggers
# the $(WIKIDST)/%.wiki rule
#echo "Renaming: `ls $(HTMLDOCDST)`" # the files are there
$(shell cd ${WIKIDST} && rename 'i-iterate' 'Iterate' *.wiki)
$(shell find ${WIKIDST} -name "*.wiki" -exec sed -i \
's/\[i-iterate/\[Iterate/g;s/\.html\#/\#/g;s/</\</g;s/>/\>/g' \
'{}' \;)
Trying to execute $(WIKI) in this way doesn't trigger the correspondent rule for some reason.
And if I change rename-wiki to look something like:
rename-wiki: ../wiki/file.wiki
I get "no rule to build the target. Even though $(WIKIDIST)/%.wiki is the rule to build the target.
EDIT2:
Finally, I could achieve what I want in doing it like so:
move-html:
$(shell [[ '0' -ne `find ./ -maxdepth 1 -name "*.html" | wc -l` ]] && \
mv -f *.html $(HTMLDOCDST)/)
$(foreach html, $(wildcard $(HTMLDOCDST)/*.html), \
$(HTML2WIKI) $(HTML2WIKIO) $(html) > \
$(addprefix $(WIKIDST)/, $(notdir $(html:.html=.wiki))))
Needless to mention how much I like the solution and the language that makes one devise one.
There are several problems here. This may take a few iterations.
First, when you make clean you delete i-iterate/ and everything in it, including i-iterate/info/whatever.texi. Since there are no texi files, Make deduces that no info files need be made; $(INFO) is an empty list.
I gather that by some black magic the emacs command creates an info/ directory full of texi files out of the ether, which Make then copies into i-iterate/ (in the default rule). Is that correct? If it is correct, then we should do this before the $(INFO) step. I suspect that the same is true of the $(WIKI) step, but let's not get ahead of ourselves.