Edit

kc3-lang/automake/lib/am/subdirs.am

Branch :

  • Show log

    Commit

  • Author : Tom Tromey
    Date : 1998-10-01 00:23:45
    Hash : 72c1e14a
    Message : Some bug fixes, plus a complete rewrite of source file handling: * texinfos.am (install-info-am): Handle case where INFO_DEPS is empty. Reported by Andrew Cagney. (uninstall-info): Likewise. (dist-info): Likewise. * automake.in (handle_texinfo): Error if user tries to generate HTML. * automake.in (do_one_clean_target): Don't push previous clean target if this target is `mostly'. Report from Raja R Harinath. * subdirs.am (mostlyclean-recursive ...): Build local_target, not target. From Raja R Harinath. Completely changed how languages and source files are handled: * automake.in: Call register_language for each language. (lang_c_rewrite): New function. (lang_cxx_rewrite): Likewise. (lang_header_rewrite): Likewise. (lang_yacc_rewrite): Likewise. (lang_yaccxx_rewrite): Likewise. (lang_lex_rewrite): Likewise. (lang_lexxx_rewrite): Likewise. (lang_asm_rewrite): Likewise. (lang_fortran_rewrite): Likewise. (register_language): Likewise. (extension_map): New global. (language_map): Likewise. (resolve_linker): New function. (handle_single_transform_list): Rewrote to use lang_X_rewrite functions. Changed meaning of first argument. (initialize_per_input): Removed seen_any_source. Initialize language_scratch, extension_seen. Removed cxx_extensions, seen_c_source, dir_holds_headers, dir_holds_sources. (handle_source_transform): Don't compute $objpat. Pass $obj directly to handle_single_transform_list. (handle_built_sources): Fixed call to handle_single_transform_list. (lang_c_finish): New function. (lang_cxx_finish): Likewise. (lang_header_finish): Likewise. (lang_yacc_finish): Likewise. (lang_yaccxx_finish): Likewise. (lang_lex_finish): Likewise. (lang_lexxx_finish): Likewise.. (lang_asm_finish): Likewise. (lang_fortran_finish): Likewise. (yacc_lex_finish_helper): Likewise. (libtool_compiler): Likewise. (saw_extension): New function. (handle_lib_objects_cond): Use saw_extension, not old variables. (handle_yacc_lex_cxx): Removed. (finish_languages): New function. (get_object_extension): Don't set dir_holds_sources. (handle_headers): Don't set dir_holds_headers. Instead, call saw_extension. (saw_sources_p): New function. (handle_tags): Use it. (handle_dependencies): Likewise. (cxx_extensions): New function. (handle_dependencies): Use it. (generate_makefile): Call finish_languages, not handle_yacc_lex_cxx.

  • lib/am/subdirs.am
  • ## automake - create Makefile.in from Makefile.am
    ## Copyright (C) 1994, 1995, 1996, 1997, 1998 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 directory's subdirectories are mostly independent; you can cd
    # into them and run `make' without going through this Makefile.
    # To change the values of `make' variables: instead of editing Makefiles,
    # (1) if the variable is set in `config.status', edit `config.status'
    #     (which will cause the Makefiles to be regenerated when you run `make');
    # (2) otherwise, pass the desired values on the `make' command line.
    
    @SET_MAKE@
    
    all-recursive install-data-recursive install-exec-recursive \
    installdirs-recursive install-recursive uninstall-recursive @INSTALLINFO@ \
    check-recursive installcheck-recursive info-recursive dvi-recursive:
    	@set fnord $(MAKEFLAGS); amf=$$2; \
    	dot_seen=no; \
    	target=`echo $@ | sed s/-recursive//`; \
    	list='$(SUBDIRS)'; for subdir in $$list; do \
    	  echo "Making $$target in $$subdir"; \
    	  if test "$$subdir" = "."; then \
    	    dot_seen=yes; \
    	    local_target="$$target-am"; \
    	  else \
    	    local_target="$$target"; \
    	  fi; \
    	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
    ## This trick allows "-k" to keep its natural meaning when running a
    ## recursive rule.
    	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
    	done; \
    	if test "$$dot_seen" = "no"; then \
    	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
    	fi; test -z "$$fail"
    
    ## We run all `clean' targets in reverse order.  Why?  It's an attempt
    ## to alleviate a problem that can happen when dependencies are
    ## enabled.  In this case, the .P file in one directory can depend on
    ## some automatically generated header in an earlier directory.  Since
    ## the dependencies are required before any target is examined, make
    ## bombs.
    mostlyclean-recursive clean-recursive distclean-recursive \
    maintainer-clean-recursive:
    	@set fnord $(MAKEFLAGS); amf=$$2; \
    	dot_seen=no; \
    	rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
    	  rev="$$subdir $$rev"; \
    	  test "$$subdir" = "." && dot_seen=yes; \
    	done; \
    ## If we haven't seen `.', then add it at the beginning.
    	test "$$dot_seen" = "no" && rev=". $$rev"; \
    	target=`echo $@ | sed s/-recursive//`; \
    	for subdir in $$rev; do \
    	  echo "Making $$target in $$subdir"; \
    	  if test "$$subdir" = "."; then \
    	    local_target="$$target-am"; \
    	  else \
    	    local_target="$$target"; \
    	  fi; \
    	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
    ## This trick allows "-k" to keep its natural meaning when running a
    ## recursive rule.
    	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
    	done && test -z "$$fail"