Edit

kc3-lang/automake/depend.am

Branch :

  • Show log

    Commit

  • Author : Tom Tromey
    Date : 1996-01-12 06:48:19
    Hash : 13e929e9
    Message : Added AUTOMAKE_OPTIONS Fixes from Franc,ois

  • depend.am
  • ## automake - create Makefile.in from Makefile.am
    ## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
    
    ## This program is free software; you can redistribute it and/or modify
    ## it under the terms of the GNU General Public License as published by
    ## the Free Software Foundation; either version 2, or (at your option)
    ## any later version.
    
    ## This program is distributed in the hope that it will be useful,
    ## but WITHOUT ANY WARRANTY; without even the implied warranty of
    ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    ## GNU General Public License for more details.
    
    ## You should have received a copy of the GNU General Public License
    ## along with this program; if not, write to the Free Software
    ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    ## 02111-1307, USA.
    # This fragment is probably only useful for maintainers.  It relies on
    # GNU make and gcc.  It is only included in the generated Makefile.in
    # if `automake' is not passed the `--include-deps' flag.
    
    MKDEP = gcc -MM $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
    
    ## We use ".P" as the name of our placeholder because it can't be
    ## duplicated by any C source file.  (Well, there could be ".c", but
    ## no one does that in practice)
    -include $(srcdir)/.deps/.P
    $(srcdir)/.deps/.P: $(BUILT_SOURCES)
    	cd $(srcdir) && test -d .deps || mkdir .deps
    ## Use ":" here and not "echo timestamp".  Otherwise GNU Make barfs:
    ## .deps/.P:1: *** missing separator.  Stop.
    	: > $@
    
    -include $(DEP_FILES)
    $(DEP_FILES): $(srcdir)/.deps/.P
    
    $(srcdir)/.deps/%.P: $(srcdir)/%.c
    	@echo "mkdeps $< > $@"
    ## Need \< in regexp because otherwise when srcdir=. too much can be
    ## matched.  Also we regexp-quote srcdir because "." is a matching
    ## operator, and commonly appears in filenames.
    	@re=`echo 's,\<$(srcdir),,g' | sed 's/\./\\./g'`; \
    	  $(MKDEP) $< | sed $$re > $@-tmp
    	@if test -n "$o"; then			\
    	  sed 's/\.o:/$$o:/' $@-tmp > $@;	\
    	else					\
    	  mv $@-tmp $@;				\
    	fi
    
    # End of maintainer-only section