octave-maintainers
[Top][All Lists]
Advanced

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

Re: no make target for mkoctfile.exe


From: Benjamin Lindner
Subject: Re: no make target for mkoctfile.exe
Date: Sat, 16 Jan 2010 22:08:34 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Benjamin Lindner wrote:
Hello,

I am trying to build current development sources for mingw,
and the build succeeds past building the documentation, but
then fails with

Making all in test
make[2]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-4_gcc-4.4.0-dw2/test'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-4_gcc-4.4.0-dw2/test' make[2]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-4_gcc-4.4.0-dw2' make[2]: *** No rule to make target `mkoctfile.exe', needed by `all-am'. Stop. make[2]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-4_gcc-4.4.0-dw2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-4_gcc-4.4.0-dw2'
make: *** [all] Error 2

I then commented out the make rule for mkoctfile.exe in makefile.am
as

diff -r c146b308739f Makefile.am
--- a/Makefile.am       Thu Jan 14 14:07:33 2010 +0100
+++ b/Makefile.am       Sat Jan 16 17:58:42 2010 +0100
@@ -144,11 +144,11 @@
 mkoctfile.cc: mkoctfile.cc.in Makefile
        @$(do_subst_config_vals)

-# ifneq ($(EXEEXT),)
-# mkoctfile$(EXEEXT): mkoctfile.o
-#      $(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
-#          $(ALL_LDFLAGS) -o $@ mkoctfile.o
-# endif
+ifneq ($(EXEEXT),)
+mkoctfile$(EXEEXT): mkoctfile.o
+       $(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
+           $(ALL_LDFLAGS) -o $@ mkoctfile.o
+endif

 run-octave: run-octave.in Makefile
        @$(do_subst_script_vals)

but then I get the error

make[2]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-4_gcc-4.4.0-dw2' make[2]: *** No rule to make target `mkoctfile.o', needed by `mkoctfile.exe'. Stop. make[2]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-4_gcc-4.4.0-dw2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-4_gcc-4.4.0-dw2'
make: *** [all] Error 2

Now there is a rule to create mkoctfile.cc from mkoctfile.cc.in.
But I'd thought make could figure out how to compile a .o from a .cc file without explicit rules for that, shouldn't it?

I can work around this one by modifying the makefile rule
to

ifneq ($(EXEEXT),)
mkoctfile$(EXEEXT): mkoctfile.cc
        $(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
        $(ALL_LDFLAGS) -o $@ $<
endif

(having mkoctfile.exe depend on mkoctfile.cc instread of mkoctfile.o)

But now automake chokes on this with the message
   Makefile.am:151: endif without if
This looks like automake cannot handle an ifneq conditional?

I get the build to complete when I remove the conditionals altogether as in the attached changeset.

benjamin
# HG changeset patch
# User Benjamin Lindner <address@hidden>
# Date 1263673941 -3600
# Node ID 78a09deb16b80768b34c967e42ed92b9c3452a0b
# Parent  c146b308739f152035b27f54af09789860259c56
enable makefile rules for mkoctfile.exe, octave-config.exe and octave-bug.exe

diff -r c146b308739f -r 78a09deb16b8 ChangeLog
--- a/ChangeLog Thu Jan 14 14:07:33 2010 +0100
+++ b/ChangeLog Sat Jan 16 21:32:21 2010 +0100
@@ -1,3 +1,8 @@
+2010-01-14  Benjamin Lindner  <address@hidden>
+
+       * makefile.am: add make rules for mkoctfile.exe, octave-bug.exe and 
+       octave-config.exe
+
 2010-01-14  Jaroslav Hajek  <address@hidden>
 
        * NEWS: Update.
diff -r c146b308739f -r 78a09deb16b8 Makefile.am
--- a/Makefile.am       Thu Jan 14 14:07:33 2010 +0100
+++ b/Makefile.am       Sat Jan 16 21:32:21 2010 +0100
@@ -118,11 +118,9 @@
 octave-bug.cc: octave-bug.cc.in Makefile
        @$(do_subst_config_vals)
 
-# ifneq ($(EXEEXT),)
-# octave-bug$(EXEEXT): octave-bug.o
-#      $(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
-#          $(ALL_LDFLAGS) -o $@ octave-bug.o
-# endif
+octave-bug.exe: octave-bug.cc
+       $(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
+           $(ALL_LDFLAGS) -o $@ $<
 
 octave-config: octave-config.in Makefile
        @$(do_subst_default_vals)
@@ -131,11 +129,9 @@
 octave-config.cc: octave-config.cc.in Makefile
        @$(do_subst_default_vals)
 
-# ifneq ($(EXEEXT),)
-# octave-config$(EXEEXT): octave-config.o
-#      $(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
-#          $(ALL_LDFLAGS) -o $@ octave-config.o
-# endif
+octave-config.exe: octave-config.cc
+       $(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
+           $(ALL_LDFLAGS) -o $@ $<
 
 mkoctfile: mkoctfile.in Makefile
        @$(do_subst_config_vals)
@@ -144,11 +140,9 @@
 mkoctfile.cc: mkoctfile.cc.in Makefile
        @$(do_subst_config_vals)
 
-# ifneq ($(EXEEXT),)
-# mkoctfile$(EXEEXT): mkoctfile.o
-#      $(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
-#          $(ALL_LDFLAGS) -o $@ mkoctfile.o
-# endif
+mkoctfile.exe: mkoctfile.cc
+       $(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
+           $(ALL_LDFLAGS) -o $@ $<
 
 run-octave: run-octave.in Makefile
        @$(do_subst_script_vals)

reply via email to

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