Edit

kc3-lang/automake/depend.am

Branch :

  • Show log

    Commit

  • Author : Tom Tromey
    Date : 1996-02-15 03:06:25
    Hash : 2c2c8a19
    Message : Fixlet

  • 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.
    ## Actually, use a plain "echo" and not ":".  Why?  From the Autoconf
    ## manual, node Automatic Remaking:
    ## On some old BSD systems, `touch' or any command that results in an
    ## empty file does not update the timestamps, so use a command like
    ## `echo' as a workaround.
    	echo > $@
    
    -include $(DEP_FILES)
    $(DEP_FILES): $(srcdir)/.deps/.P
    
    $(srcdir)/.deps/%.P: $(srcdir)/%.c
    	@echo "mkdeps $< > $@"
    ## Use funny regexp because otherwise too much can be matched when
    ## srcdir begins with ".".  Can't use \< since sed doesn't recognize
    ## "." as a word start.  Regexp-quote srcdir because "." is a matching
    ## operator which commonly appears in filenames.
    	@re=`echo 's,^$(srcdir)/*,,g;s, $(srcdir)/*, ,g' | sed 's,\.,\\\\.,g'`; \
    	  $(MKDEP) $< | sed "$$re" > $@-tmp
    	@if test -n "$o"; then			\
    	  sed 's/\.o:/$$o:/' $@-tmp > $@;	\
    	  rm $@-tmp;				\
    	else					\
    	  mv $@-tmp $@;				\
    	fi
    
    # End of maintainer-only section