Hi, I'm in the process of migrating a qmake based project to autotools, but It haven't been that easy as I thought.
In a first version of the project, all the sources where under a src directory, so writing a Makefile.am file was fairly trivial and the project compiled fine. Now, the sources under src have been grouped in subdirectories. My Makefile.am is the following: INCLUDES = $(all_includes) -I../src METASOURCES = AUTO bin_PROGRAMS = ktoon ktoon_LDFLAGS = $(all_libraries) -lGLU -lGL -lming ktoon_LDADD = $(LIB_KDEUI) $(OBJECTS) ktoon_SOURCES = store/animation.cpp store/brush.cpp \ store/camera.cpp store/color.cpp store/document.cpp store/gldrawing.cpp \ store/keyframe.cpp store/layer.cpp store/palette.cpp store/point3d.cpp store/scene.cpp \ store/soundclip.cpp store/soundlayer.cpp store/status.cpp store/librarydata.cpp \ store/item.cpp store/folder.cpp store/symbol.cpp brushes/brushes.cpp \ color/colorcells.cpp color/colordisplay.cpp color/colorgradientselector.cpp \ color/colormixer.cpp color/colorpalette.cpp color/custompalette.cpp color/valueselector.cpp \ color/gradientswitch.cpp color/gradientviewer.cpp color/fillcolor.cpp color/outlinecolor.cpp \ exposure/esframe.cpp exposure/eslayer.cpp exposure/exposuresheet.cpp exposure/ilayer.cpp \ gl/glbitmap.cpp gl/drawingarea.cpp gl/glbrush.cpp gl/glcontrol.cpp gl/glellipse.cpp \ gl/glgraphiccomponent.cpp gl/glgrid.cpp gl/glline.cpp gl/glpencil.cpp gl/glpen.cpp \ gl/glrectangle.cpp gl/glimage.cpp cameras/glrendercamerapreview.cpp \ cameras/glsidecameraview.cpp cameras/gltopcameraview.cpp modal/preferences.cpp modal/properties.cpp \ modal/about.cpp modal/splash.cpp modal/import.cpp modal/export.cpp scenes/scenes.cpp \ timeline/timeline.cpp timeline/tlframe.cpp timeline/tlframesequence.cpp \ timeline/tlframesequencelayout.cpp timeline/tlframesequencemanager.cpp timeline/tllayer.cpp \ timeline/tllayermanager.cpp timeline/tllayersequence.cpp timeline/tlruler.cpp \ timeline/soundwidget.cpp tools/tools.cpp main.cpp ktoon.cpp \ images/images.cpp library/library.cpp \ library/symbolview.cpp library/symboltable.cpp library/symbolitem.cpp \ properties/ellipseproperties.cpp properties/brushproperties.cpp properties/rectangleproperties.cpp \ properties/lineproperties.cpp properties/pencilproperties.cpp properties/penproperties.cpp \ properties/imageproperties.cpp But when running make, when it tries to compile one of the sources in a subdirectory I get this error: source='store/animation.cpp' object='animation.o' libtool=no \ depfile='.deps/animation.Po' tmpdepfile='.deps/animation.TPo' \ depmode=gcc3 /bin/sh ../admin/depcomp \ #>- g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/lib/qt3//include -I/usr/X11R6/include -I../src -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -c -o animation.o `test -f 'store/animation.cpp' || echo './'`store/animation.cpp ../admin/depcomp: line 60: -MT: command not found make[2]: *** [animation.o] Error 127 In line 60 of depcomp is this check: case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" <---- line 60 stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; The files that aren't in a subdir compile fine. Any ideas? how should I write Makefile.am so this doesn't happen? Thanks in advance, -- Juan Luis Baptiste http://www.merlinux.org http://knetworkconf.sf.net