1
votes

My makefile loops endless but can't figure out why? Here is it further informations at sf.net/p/ags


    AUTOMAKE_OPTIONS = foreign

    top_srcdir = $(shell pwd)/src/ags

    SUBDIRS = src/ags \
            doc

    -include ./src/ags/Makefile.am \
            $(top_srcdir)/util/Makefile.am \
            $(top_srcdir)/lib/Makefile.am \
            $(top_srcdir)/object/Makefile.am \
            $(top_srcdir)/widget/Makefile.am \
            $(top_srcdir)/audio/Makefile.am \
            $(top_srcdir)/audio/task/Makefile.am \
            $(top_srcdir)/audio/file/Makefile.am \
            $(top_srcdir)/audio/recall/Makefile.am \
            $(top_srcdir)/audio/task/recall/Makefile.am \
            $(top_srcdir)/file/Makefile.am \
            $(top_srcdir)/X/Makefile.am \
            $(top_srcdir)/X/editor/Makefile.am \
            $(top_srcdir)/X/machine/Makefile.am \
            $(top_srcdir)/file/Makefile.am \
            $(top_srcdir)/server/Makefile.am \
            ./doc/Makefile.am

    CC = gcc

    # what flags you want to pass to the C compiler & linker                                                                                                                                                                                                                        
    CFLAGS = -g --pedantic -Wall -O -I./src -I/usr/include
    LDFLAGS = -L/lib -L/usr/lib -L/usr/X11/lib -lm -pthread -lrt -lgmp

    # this lists the binaries to produce, the (non-PHONY, binary) targets in                                                                                                                                                                                                        
    # the previous manual Makefile                                                                                                                                                                                                                                                  
    noinst_LIBRARIES = libags.a libags-thread.a libags-audio.a
    bin_PROGRAMS = gsequencer

    # library                                                                                                                                                                                                                                                                       
    libags_a_CFLAGS=
    libags_a_LDFLAGS =

    # application                                                                                                                                                                                                                                                                   
    gsequencer_CFLAGS=
    gsequencer_LDFLAGS=
    gsequencer_LDADD=libags.a libags-thread.a libags-audio.a

    #                                                                                                                                                                                                                                                                               
    libags_audio_h_sources = $(ags_recall_audio_h_sources) $(ags_audio_task_h_sources) $(ags_xorg_task_h_sources) $(ags_audio_file_h_sources) $(ags_audio_recall_task_h_sources)
    libags_audio_c_sources = $(ags_recall_audio_c_sources) $(ags_audio_task_c_sources) $(ags_xorg_task_c_sources) $(ags_audio_file_c_sources) $(ags_audio_recall_task_c_sources)

    gsequencer_h_sources = $(ags_xorg_h_sources) $(ags_machine_h_sources) $(ags_editor_h_sources)
    gsequencer_c_sources = $(ags_xorg_c_sources) $(ags_machine_c_sources) $(ags_editor_c_sources)

    libags_a_SOURCES = $(ags_lib_c_sources) $(ags_object_c_sources) $(ags_util_c_sources)
    libags_thread_a_SOURCES = $(ags_thread_c_sources)
    libags_audio_a_SOURCES = $(ags_audio_c_sources)
    libags_gui_a_SOURCES = $(ags_widget_c_sources)

    gsequencer_SOURCES = $(gsequencer_c_sources) $(ags_server_c_sources) $(ags_file_c_sources)

1
That's not a makefile that's an automake file. And what do you mean it "loops endless". What does? Running make? What is it doing when it is looping? Are the timestamps on all your files accurate? - Etan Reisner
configure runs again and again - h3lix
What do you mean with timestamp of all my files - there many source files. Do me have to check em all? - h3lix
So make isn't looping at all then. configure is. And yes, I mean every source file and the directories. This sort of looping usually (in my experience) means that a timestamp somewhere is in the future and the autotools are noticing that and continually thinking they need to re-execute configure as a result. (Start with the autotool input files. The .in and .am files.) - Etan Reisner
You should add an automake tag to your question. I don't remember automake supporting the -include directive, just include. Also, I'm not sure this is how include is meant to be used in automake; why are you including all these .am files here? I would think that these directories would be added as SUBDIRS. - MadScientist

1 Answers

1
votes

Wiping all build scripts

rm *

Touching all files

find . -type f | xargs touch

Running the following to rebuild build scripts did it finally

aclocal
autoheader
libtoolize --force --copy
automake --add-missing --copy --foreign
autoconf
./configure
make

PROBLEM: empty Makefile.am caused infinite loop SOLUTION: add an empty variable to it