automake
[Top][All Lists]
Advanced

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

automake: Automatic Dependency Tracking


From: Dave Brolley
Subject: automake: Automatic Dependency Tracking
Date: Fri, 12 Jan 2001 14:12:29 -0500
User-agent: Mozilla/5.0 (Windows; U; Win95; en-US; m18) Gecko/20001108 Netscape6/6.0

Hi,

The automake online documentation says, regarding automatic dependency tracking:

" this mode is enabled by default if any C program or library is defined in the current directory"

I have a project which contains a mix of C and C++ sources, and dependency tracking does not seem to be enabled. I've attached my Makefile.am and Makefile.in for reference. Just wobdering if I'm missing something. I'm using automake 1.4b on Cygwin 1.1.7.

Also, is there anyway to enabled this for projects containing only C++ source?

Thanks,
Dave
## Process this with automake to create Makefile.in

AUTOMAKE_OPTIONS = foreign

address@hidden@

# Create a libtool convenience archive
lib_LTLIBRARIES = libdeblayer.la

FSIMLIB=fsim.la
PIOLIB=pio.la

# directories
fsimdir=$(srcdir)/../fsim
ssidir=$(srcdir)/../ssi

# TODO -- Revisit these
#DEFINES =-D_WINDOWS -D_WINDLL -D_AFXDLL -D_MBCS -D_AFXEXT \
#       -DDEB_LAYER -DBUILD_UI \
#       -DFSIM_DLL=stringize($(FSIMLIB)) \
#       -DBUILDNUM=stringize($(BUILDNUM))
DEFINES =-DCYGNUS_LOCAL -D_WINDOWS -D_WINDLL -D_AFXDLL -D_MBCS -D_AFXEXT \
        -DDEB_LAYER -DBUILD_UI \
        -DFSIM_DLL='stringize($(FSIMLIB))' \
        -DBUILDNUM='stringize($(BUILDNUM))'

INCLUDES = -I $(fsimdir) -I $(ssidir) $(DEFINES)

# Source files
FSIMHEADERS=$(fsimdir)/disassem.h $(fsimdir)/opc_dse.h $(fsimdir)/opc_mte.h \
        $(fsimdir)/opc_pe.h $(fsimdir)/shmlib.h

SSIHEADERS=$(ssidir)/cla_mem.h $(ssidir)/tables.h $(ssidir)/targ_sim.h \
        $(ssidir)/sim_cla.h $(ssidir)/targ_api.h

DLHEADERS=app_ldr.h clumem.h err_msg.h objf_io.h sectstor.h tcl.h \
        app_tbl.h common.h fileio.h proc_id.h stdafx.h tcldecls.h \
        cdsptype.h cpu_td.h fsimshare.h read_obj.h step.h tool_err.h \
        cdsptype2.h deb_map.h init.h reftype.h sys_ldr.h tool_io.h \
        cla_regs.h debug_api.h iolib.h resource.h syslib.h \
        clatrans.h debug_msg.h misc_msg.h script.h sysmem.h

THEHEADERS=$(FSIMHEADERS) $(SSIHEADERS) $(DLHEADERS)

CPP_SRC=allocatr.cpp breakpt.cpp cpu_td.cpp deb_layer2.cpp deb_map.cpp \
        deb_script.cpp debug_api.cpp debug_msg.cpp disassem.cpp \
        err_msg.cpp init.cpp load.cpp memory.cpp misc_msg.cpp \
        objf_io.cpp read_obj.cpp script.cpp step.cpp sys_ldr.cpp \
        reftype.cpp sectstor.cpp tool_err.cpp tool_io.cpp \
        fileio.cpp processio.cpp

C_SRC=clumem.c

THESOURCES=$(CPP_SRC) $(C_SRC)
libdeblayer_la_SOURCES = $(THESOURCES) $(THEHEADERS)

libdeblayer_la_LIBADDS=/usr/lib/libtcl80.a
libdeblayer_la_LDFLAGS=-no-undefined

# Makefile.in generated automatically by automake 1.4b from Makefile.am

# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_FLAG =
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :







@SET_MAKE@






host_alias = @host_alias@
host_triplet = @host@
AS = @AS@
BUILDNUM = @BUILDNUM@
CC = @CC@
CXX = @CXX@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@


AUTOMAKE_OPTIONS = foreign

BUILDNUM = @BUILDNUM@

# Create a libtool convenience archive
lib_LTLIBRARIES = libdeblayer.la

FSIMLIB = fsim.la
PIOLIB = pio.la

# directories
fsimdir = $(srcdir)/../fsim
ssidir = $(srcdir)/../ssi

# TODO -- Revisit these
#DEFINES =-D_WINDOWS -D_WINDLL -D_AFXDLL -D_MBCS -D_AFXEXT \
#       -DDEB_LAYER -DBUILD_UI \
#       -DFSIM_DLL=stringize($(FSIMLIB)) \
#       -DBUILDNUM=stringize($(BUILDNUM))
DEFINES = -DCYGNUS_LOCAL -D_WINDOWS -D_WINDLL -D_AFXDLL -D_MBCS -D_AFXEXT \
        -DDEB_LAYER -DBUILD_UI \
        -DFSIM_DLL='stringize($(FSIMLIB))' \
        -DBUILDNUM='stringize($(BUILDNUM))'


INCLUDES = -I $(fsimdir) -I $(ssidir) $(DEFINES)

# Source files
FSIMHEADERS = $(fsimdir)/disassem.h $(fsimdir)/opc_dse.h $(fsimdir)/opc_mte.h \
        $(fsimdir)/opc_pe.h $(fsimdir)/shmlib.h


SSIHEADERS = $(ssidir)/cla_mem.h $(ssidir)/tables.h $(ssidir)/targ_sim.h \
        $(ssidir)/sim_cla.h $(ssidir)/targ_api.h


DLHEADERS = app_ldr.h clumem.h err_msg.h objf_io.h sectstor.h tcl.h \
        app_tbl.h common.h fileio.h proc_id.h stdafx.h tcldecls.h \
        cdsptype.h cpu_td.h fsimshare.h read_obj.h step.h tool_err.h \
        cdsptype2.h deb_map.h init.h reftype.h sys_ldr.h tool_io.h \
        cla_regs.h debug_api.h iolib.h resource.h syslib.h \
        clatrans.h debug_msg.h misc_msg.h script.h sysmem.h


THEHEADERS = $(FSIMHEADERS) $(SSIHEADERS) $(DLHEADERS)

CPP_SRC = allocatr.cpp breakpt.cpp cpu_td.cpp deb_layer2.cpp deb_map.cpp \
        deb_script.cpp debug_api.cpp debug_msg.cpp disassem.cpp \
        err_msg.cpp init.cpp load.cpp memory.cpp misc_msg.cpp \
        objf_io.cpp read_obj.cpp script.cpp step.cpp sys_ldr.cpp \
        reftype.cpp sectstor.cpp tool_err.cpp tool_io.cpp \
        fileio.cpp processio.cpp


C_SRC = clumem.c

THESOURCES = $(CPP_SRC) $(C_SRC)
libdeblayer_la_SOURCES = $(THESOURCES) $(THEHEADERS)

libdeblayer_la_LIBADDS = /usr/lib/libtcl80.a
libdeblayer_la_LDFLAGS = -no-undefined
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
CONFIG_CLEAN_FILES = 
LTLIBRARIES =  $(lib_LTLIBRARIES)

DEFS = @DEFS@ -I. -I$(srcdir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@





libdeblayer_la_LIBADD = 
am_libdeblayer_la_OBJECTS =  allocatr.lo breakpt.lo cpu_td.lo \
deb_layer2.lo deb_map.lo deb_script.lo debug_api.lo debug_msg.lo \
disassem.lo err_msg.lo init.lo load.lo memory.lo misc_msg.lo objf_io.lo \
read_obj.lo script.lo step.lo sys_ldr.lo reftype.lo sectstor.lo \
tool_err.lo tool_io.lo fileio.lo processio.lo clumem.lo
libdeblayer_la_OBJECTS =  $(am_libdeblayer_la_OBJECTS)
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) 
$(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CFLAGS = @CFLAGS@
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) 
$(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXFLAGS = @CXXFLAGS@
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) 
$(AM_LDFLAGS) $(LDFLAGS) -o $@
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) 
$(LDFLAGS) -o $@
DIST_SOURCES =  $(libdeblayer_la_SOURCES)
depcomp = 
DIST_COMMON =  ../../config.guess ../../config.sub ../../install-sh \
../../ltmain.sh ../../missing ../../mkinstalldirs Makefile.am \
Makefile.in aclocal.m4 configure configure.in

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)





GZIP_ENV = --best
SOURCES = $(libdeblayer_la_SOURCES)
OBJECTS = $(am_libdeblayer_la_OBJECTS)

all: all-redirect
.SUFFIXES:
.SUFFIXES: .c .cpp .h .lo .o
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am 
$(top_srcdir)/configure.in $(ACLOCAL_M4) 
        cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile

Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
        cd $(top_builddir) \
          && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status

$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in 
        cd $(srcdir) && $(ACLOCAL)





config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        $(SHELL) ./config.status --recheck
$(srcdir)/configure: @address@hidden(srcdir)/configure.in $(ACLOCAL_M4) 
$(CONFIGURE_DEPENDENCIES)
        cd $(srcdir) && $(AUTOCONF)




mostlyclean-libLTLIBRARIES:

clean-libLTLIBRARIES:
        -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)

distclean-libLTLIBRARIES:

maintainer-clean-libLTLIBRARIES:




install-libLTLIBRARIES: $(lib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(libdir)
        @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
          if test -f $$p; then \
            echo " $(LIBTOOL)  --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) 
$$p $(DESTDIR)$(libdir)/$$p"; \
            $(LIBTOOL)  --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p 
$(DESTDIR)$(libdir)/$$p; \
          else :; fi; \
        done

uninstall-libLTLIBRARIES:
        @$(NORMAL_UNINSTALL)
        @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
          echo " $(LIBTOOL)  --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \
          $(LIBTOOL)  --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
        done




mostlyclean-compile:
        -rm -f *.o core *.core

clean-compile:

distclean-compile:
        -rm -f *.tab.c

maintainer-clean-compile:




mostlyclean-libtool:
        -rm -f *.lo

clean-libtool:
        -rm -rf .libs _libs

distclean-libtool:

maintainer-clean-libtool:




libdeblayer.la: $(libdeblayer_la_OBJECTS) $(libdeblayer_la_DEPENDENCIES)
        $(CXXLINK) -rpath $(libdir) $(libdeblayer_la_LDFLAGS) 
$(libdeblayer_la_OBJECTS) $(libdeblayer_la_LIBADD) $(LIBS)
.c.o:
        $(COMPILE) -c $<
.c.lo:
        $(LTCOMPILE) -c -o $@ $<
.cpp.o:
        $(CXXCOMPILE) -c -o $@ $<
.cpp.lo:
        $(LTCXXCOMPILE) -c -o $@ $<




tags: TAGS

ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
          $(AWK) '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
        mkid -fID $$unique $(LISP)

TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
        tags=; \
        here=`pwd`; \
        list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
          $(AWK) '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
        test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
          || etags $(ETAGS_ARGS) $$tags  $$unique $(LISP)

GTAGS:
        here=`CDPATH=: && cd $(top_builddir) && pwd` \
          && cd $(top_srcdir) \
          && gtags -i $$here




mostlyclean-tags:

clean-tags:

distclean-tags:
        -rm -f TAGS ID

maintainer-clean-tags:

distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)





# This target untars the dist file and tries a VPATH configuration.  Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
        -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
        GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
        chmod -R a-w $(distdir); chmod a+w $(distdir)
        mkdir $(distdir)/=build
        mkdir $(distdir)/=inst
        chmod a-w $(distdir)
        dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
          && cd $(distdir)/=build \
          && ../configure --srcdir=.. --prefix=$$dc_install_base \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
          && $(MAKE) $(AM_MAKEFLAGS) check \
          && $(MAKE) $(AM_MAKEFLAGS) install \
          && $(MAKE) $(AM_MAKEFLAGS) installcheck \
          && $(MAKE) $(AM_MAKEFLAGS) uninstall \
          && test `find $$dc_install_base -type f -print | wc -l` -le 1 \
          && $(MAKE) $(AM_MAKEFLAGS) dist \
          && $(MAKE) $(AM_MAKEFLAGS) distclean \
          && rm -f $(distdir).tar.gz \
          && test `find . -type f -print | wc -l` -eq 0
        -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
        @banner="$(distdir).tar.gz is ready for distribution"; \
        dashes=`echo "$$banner" | sed s/./=/g`; \
        echo "$$dashes"; \
        echo "$$banner"; \
        echo "$$dashes"
dist: distdir
        -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} 
\; \
        || chmod -R a+r $(distdir)
        $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > 
$(distdir).tar.gz
        -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
dist-all: distdir
        -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} 
\; \
        || chmod -R a+r $(distdir)
        $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > 
$(distdir).tar.gz
        -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
distdir: $(DISTFILES)
        -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
        mkdir $(distdir)
        $(mkinstalldirs) $(distdir)/../..
        @for file in $(DISTFILES); do \
          if test -f $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            cp -pR $$d/$$file $(distdir) \
            || exit 1; \
          else \
            test -f $(distdir)/$$file \
            || cp -p $$d/$$file $(distdir)/$$file \
            || exit 1; \
          fi; \
        done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am:
check: check-am
installcheck-am:
installcheck: installcheck-am
install-info-am: 
install-info: install-info-am
install-exec-am: install-libLTLIBRARIES
install-exec: install-exec-am

install-data-am:
install-data: install-data-am

install-am: all-am
        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-libLTLIBRARIES
uninstall: uninstall-am
all-am: Makefile $(LTLIBRARIES)
all-redirect: all-am
install-strip:
        $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs:
        $(mkinstalldirs)  $(DESTDIR)$(libdir)






mostlyclean-generic:

clean-generic:

distclean-generic:
        -rm -f Makefile $(CONFIG_CLEAN_FILES)
        -rm -f config.cache config.log stamp-h stamp-h[0-9]*

maintainer-clean-generic:
        -rm -f Makefile.in
mostlyclean-am:  mostlyclean-libLTLIBRARIES mostlyclean-compile \
                mostlyclean-libtool mostlyclean-tags \
                mostlyclean-generic

mostlyclean: mostlyclean-am

clean-am:  clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
                clean-generic mostlyclean-am

clean: clean-am

distclean-am:  distclean-libLTLIBRARIES distclean-compile \
                distclean-libtool distclean-tags distclean-generic \
                clean-am
        -rm -f libtool

distclean: distclean-am
        -rm -f config.status

maintainer-clean-am:  maintainer-clean-libLTLIBRARIES \
                maintainer-clean-compile maintainer-clean-libtool \
                maintainer-clean-tags maintainer-clean-generic \
                distclean-am
        @echo "This command is intended for maintainers to use;"
        @echo "it deletes files that may require special tools to rebuild."

maintainer-clean: maintainer-clean-am
        -rm -f config.status

.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
distclean-compile clean-compile maintainer-clean-compile \
mostlyclean-libtool distclean-libtool clean-libtool \
maintainer-clean-libtool tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
check-am installcheck-am installcheck install-info-am install-info \
install-exec-am install-exec install-data-am install-data install-am \
install uninstall-am uninstall all-redirect all-am all install-strip \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean





# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

reply via email to

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