自动生成Makefile

来源:互联网 发布:淘宝背景音乐怎么添加 编辑:程序博客网 时间:2024/06/05 06:40

AutoMake 学习笔记

作者:许振文

过程记录:

1. autoscan2. 修改configure.scan,重命名为configure.in,编辑Makefile.am3. 运行aclocal4. autoconf5. automake --add-missing6. ./configure && make && make install了。

制作目录结构及文件:

helight@helight:myshell$ lssrchelight@helight:myshell$ ls src/myshell.chelight@helight:myshell$

接下来运行“autoscan”并且编辑相关文件:

1.将"configure.scan"重命名为"configure.in"。
2.在本文件夹和子文件夹中建立Makefile.am文件。
helight@helight:myshell$ autoscan helight@helight:myshell$ lsautoscan.log  configure.scan  srchelight@helight:myshell$ mv configure.scan configure.inhelight@helight:myshell$ vim configure.in helight@helight:myshell$ vim Makefile.amhelight@helight:myshell$ vim src/Makefile.am

修改后的configure.in

#                                               -*- Autoconf -*-                          # Process this file with autoconf to produce a configure script.AC_PREREQ(2.61)AC_INIT("myshell", "0.01", "helight.xu@gmail.com")AC_CONFIG_SRCDIR([src/myshell.c])AC_CONFIG_HEADER([config.h])AM_INIT_AUTOMAKE("myshell", "0.01")# Checks for programs.AC_PROG_CC# Checks for libraries.# Checks for header files.AC_HEADER_STDCAC_HEADER_SYS_WAITAC_CHECK_HEADERS([stdlib.h string.h unistd.h])# Checks for typedefs, structures, and compiler characteristics.AC_TYPE_PID_TAC_TYPE_UID_T# Checks for library functions.AC_FUNC_FORKAC_FUNC_MALLOCAC_CHECK_FUNCS([memset strrchr])AC_CONFIG_FILES(Makefile        src/Makefile)AC_OUTPUT

与autoscan生成的文件相比,主要添加修改了以下几行:

AC_INIT("myshell", "0.01", "helight.xu@gmail.com")AM_INIT_AUTOMAKE("myshell", "0.01")AC_CONFIG_FILES(Makefile        src/Makefile)

新建立的Makefile.am文件的内容

helight@helight:myshell$ cat Makefile.am #Makefile.amSUBDIRS = srchelight@helight:myshell$

新建立的src/Makefile.am文件的内容

helight@helight:myshell$ cat src/Makefile.am #src/Makefiel.ambin_PROGRAMS = myshellmyshell_SOURCES = myshell.chelight@helight:myshell$ 

接下来运行aclocal

此时会生成aclocal.m4和autom4te.cache。
helight@helight:myshell$ aclocalhelight@helight:myshell$ lsaclocal.m4  autoscan.log  configure.in  Makefile.am  srchelight@helight:myshell$

再运行:autoconf生成configure文件.

helight@helight:myshell$ autoconf helight@helight:myshell$ lsaclocal.m4      autoscan.log  configure.in  srcautom4te.cache  configure     Makefile.amhelight@helight:myshell$

再运行autohead 生成config.h.in

helight@helight:myshell$ autoheader helight@helight:myshell$ lsaclocal.m4      autoscan.log  configure     Makefile.amautom4te.cache  config.h.in   configure.in  srchelight@helight:myshell$

最后运行automake --add-missing 就能得到Makefile.in

helight@helight:myshell$ automake --add-missingconfigure.in: installing `./install-sh'configure.in: installing `./mkinstalldirs'configure.in: installing `./missing'Makefile.am: installing `./COPYING'Makefile.am: installing `./INSTALL'Makefile.am: required file `./NEWS' not foundMakefile.am: required file `./README' not foundMakefile.am: required file `./AUTHORS' not foundMakefile.am: required file `./ChangeLog' not foundsrc/Makefile.am: installing `./depcomp'helight@helight:myshell$ lsaclocal.m4      config.h.in   COPYING  install-sh   missingautom4te.cache  configure     depcomp  Makefile.am  mkinstalldirsautoscan.log    configure.in  INSTALL  Makefile.in  srchelight@helight:myshell$
这里可以看到提示缺少一些文件。但这些文件是可以不要的。

可以configure了

helight@helight:myshell$ ./configure checking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for gawk... nochecking for mawk... mawkchecking whether make sets $(MAKE)... yeschecking for gcc... gccchecking for C compiler default output file name... a.outchecking whether the C compiler works... yeschecking whether we are cross compiling... nochecking for suffix of executables... checking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking for style of include used by make... GNUchecking dependency style of gcc... gcc3checking how to run the C preprocessor... gcc -Echecking for grep that handles long lines and -e... /bin/grepchecking for egrep... /bin/grep -Echecking for ANSI C header files... yeschecking for sys/wait.h that is POSIX.1 compatible... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking for stdlib.h... (cached) yeschecking for string.h... (cached) yeschecking for unistd.h... (cached) yeschecking for pid_t... yeschecking for uid_t in sys/types.h... yeschecking vfork.h usability... nochecking vfork.h presence... nochecking for vfork.h... nochecking for fork... yeschecking for vfork... yeschecking for working fork... yeschecking for working vfork... (cached) yeschecking for stdlib.h... (cached) yeschecking for GNU libc compatible malloc... yeschecking for memset... yeschecking for strrchr... yesconfigure: creating ./config.statusconfig.status: creating Makefileconfig.status: creating src/Makefileconfig.status: creating config.hconfig.status: executing depfiles commandshelight@helight:myshell$ 

编译make

helight@helight:myshell$ make

最后附上一张automake的工作流程图:

automake


实例解说:

  实验一、LINUX 环境编程

一.实验目的
    了解 LINUX 实验环境的基本使用方法,减少对 LINUX 的陌生感,熟悉 LINUX 的实验环境。
学会使用 LINUX 常用操作命令;学会使用 gcc 编译程序;学习 make 工具的使用及使用
automake 工具集自动生成 Makefile;学习 gdb 调试工具的使用方法。
二.实验条件
IBM-PC 兼容机
Fedora14 Linux 操作系统
三.实验原理
  1. Linux 基本操作:见教材 4.4 节
  2. gcc 编译器使用:见教材 5.1 节
  3.make 与 Makefile 编写:见教材 5.2 节
  4 白动生成 Makefile:见教材 5.3 节
  5. gdb 调试工具使用:见教材 5.4 节
  6. Linux 下集成开发工具,见教材 5 .5 节
四.实验步骤分析
1.编写计算 5+9/3 的程序,                一个头文件 myhead.h、
                                               一个进行加法运算的 myadd.c
                      分成四个文件:
        一个进行除法运算的 mydiv.c 文件和一个求出最终结果并打印的 result.c 文件。
文件、                                                       然后编
写一个 Makefile,使它们在 make 工具下生成正确的可执行文件 myresult。具体步骤如下:
    1.1 新建实验目录,在目录下使用 vi 编辑器编辑程序的 4 个源文件。

myadd.c


mydiv.c


result.c


myhead.h


  1.2 编写 Makefile 文件


  1.3 使用 make 工具生成可执行文件 myresult。


  1.4 运行可执行文件,得到运行结果


2 用 autoconf 和 automake 工具生成 Makefile 文件,实验步骤如下:

  2.1 在源码目录下运行 autoscan,生成 configure.scan 文件。

  2.2 修改 configure.scan 文件并命名为 configure.in。

  2.3 运行 aclocal 和 autoconf,生成 configure 文件。


  2.4 编辑 Makefile.am 文件,运行 automake 生成 Makefile.in 文件。


  2.5 运行./configure 生成 Makefile.
  2.6 对比自动生成的 Makefile 和自己编写的 Makefile,自动生成的 Makefile 很长,具体
见附录 1.
3.用 gdb 调试工且调试实验 1 生成的可执行文件 myresult
  3.1 启动 gdb 调试 myresult
  3.2 在加法和除法结束处设置断点,检查它们的输出结果。
3.3 继续执行完程序。
3.4 附加题
五.实验结果与总结
 实验结果见实验步骤与附录 1,。
 在 Linux 下使用最多的编程语言是 C 和 C++。在 Linux 下使用 C 开发应用程序,必须学会
使用 GCC 编译程序、Makefile 管理程序的编译已经 GDB 调试程序。这次实验让我掌握了这
些工具,收获很大。
附录 1
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.
pkgdatadir = $(datadir)/result
pkgincludedir = $(includedir)/result
pkglibdir = $(libdir)/result
pkglibexecdir = $(libexecdir)/result
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = result$(EXEEXT)
subdir = .
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
   $(srcdir)/Makefile.in $(top_srcdir)/configure depcomp \
   install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
   $(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
am_result_OBJECTS = myadd.$(OBJEXT) mydiv.$(OBJEXT) result.$(OBJEXT)
result_OBJECTS = $(am_result_OBJECTS)
result_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I.
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
   $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(result_SOURCES)
DIST_SOURCES = $(result_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
   { test ! -d "$(distdir)" \
      || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
              && rm -fr "$(distdir)"; }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = ${SHELL} /home/test1/test12/missing --run aclocal-1.11
AMTAR = ${SHELL} /home/test1/test12/missing --run tar
AUTOCONF = ${SHELL} /home/test1/test12/missing --run autoconf
AUTOHEADER = ${SHELL} /home/test1/test12/missing --run autoheader
AUTOMAKE = ${SHELL} /home/test1/test12/missing --run automake-1.11
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
  CPP = gcc -E
  CPPFLAGS =
  CYGPATH_W = echo
  DEFS          =        -DPACKAGE_NAME=\"result\"         -DPACKAGE_TARNAME=\"result\"
-DPACKAGE_VERSION=\"1.0\"                  -DPACKAGE_STRING=\"result\             1.0\"
-DPACKAGE_BUGREPORT=\"421997399@qq.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"result\"
-DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1
  DEPDIR = .deps
  ECHO_C =
  ECHO_N = -n
  ECHO_T =
  EGREP = /bin/grep -E
  EXEEXT =
  GREP = /bin/grep
  INSTALL = /usr/bin/install -c
  INSTALL_DATA = ${INSTALL} -m 644
  INSTALL_PROGRAM = ${INSTALL}
  INSTALL_SCRIPT = ${INSTALL}
  INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
  LDFLAGS =
  LIBOBJS =
  LIBS =
  LTLIBOBJS =
  MAKEINFO = ${SHELL} /home/test1/test12/missing --run makeinfo
  MKDIR_P = /bin/mkdir -p
  OBJEXT = o
  PACKAGE = result
  PACKAGE_BUGREPORT = 421997399@qq.com
  PACKAGE_NAME = result
  PACKAGE_STRING = result 1.0
  PACKAGE_TARNAME = result
  PACKAGE_URL =
  PACKAGE_VERSION = 1.0
  PATH_SEPARATOR = :
  SET_MAKE =
  SHELL = /bin/sh
  STRIP =
  VERSION = 1.0
  abs_builddir = /home/test1/test12
  abs_srcdir = /home/test1/test12
  abs_top_builddir = /home/test1/test12
  abs_top_srcdir = /home/test1/test12
ac_ct_CC = gcc
am__include = include
am__leading_dot = .
am__quote =
am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin
build_alias =
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host_alias =
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = ${SHELL} /home/test1/test12/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = /bin/mkdir -p
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr/local
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target_alias =
top_build_prefix =
top_builddir = .
top_srcdir = .
AUTOMAKE_OPTIONS = foreign
result_SOURCES = myadd.c mydiv.c result.c
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
am--refresh:
   @:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
   @for dep in $?; do \
      case '$(am__configure_deps)' in \
         *$$dep*) \
            echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
            $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
         && exit 0; \
            exit 1;; \
      esac; \
   done; \
   echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
   $(am__cd) $(top_srcdir) && \
      $(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
   @case '$?' in \
      *config.status*) \
         echo ' $(SHELL) ./config.status'; \
         $(SHELL) ./config.status;; \
      *) \
         echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
         cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
   esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
   $(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
   $(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
   $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
   @$(NORMAL_INSTALL)
   test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
   @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
   for p in $$list; do echo "$$p $$p"; done | \
   sed 's/$(EXEEXT)$$//' | \
   while read p p1; do if test -f $$p; \
      then echo "$$p"; echo "$$p"; else :; fi; \
   done | \
   sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
            -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
      sed 'N;N;N;s,\n, ,g' | \
      $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
            if ($$2 == $$4) files[d] = files[d] " " $$1; \
            else { print "f", $$3 "/" $$4, $$1; } } \
         END { for (d in files) print "f", d, files[d] }' | \
      while read type dir files; do \
            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
            test -z "$$files" || { \
                echo        "      $(INSTALL_PROGRAM_ENV)              $(INSTALL_PROGRAM) $$files
'$(DESTDIR)$(bindir)$$dir'"; \
                $(INSTALL_PROGRAM_ENV)                         $(INSTALL_PROGRAM)         $$files
"$(DESTDIR)$(bindir)$$dir" || exit $$?; \
            }\
      ; done
   uninstall-binPROGRAMS:
      @$(NORMAL_UNINSTALL)
      @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
      files=`for p in $$list; do echo "$$p"; done | \
         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
                -e 's/$$/$(EXEEXT)/' `; \
      test -n "$$list" || exit 0; \
      echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
      cd "$(DESTDIR)$(bindir)" && rm -f $$files
   clean-binPROGRAMS:
      -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
   result$(EXEEXT): $(result_OBJECTS) $(result_DEPENDENCIES)
      @rm -f result$(EXEEXT)
      $(LINK) $(result_OBJECTS) $(result_LDADD) $(LIBS)
   mostlyclean-compile:
      -rm -f *.$(OBJEXT)
   distclean-compile:
      -rm -f *.tab.c
   include ./$(DEPDIR)/myadd.Po
   include ./$(DEPDIR)/mydiv.Po
   include ./$(DEPDIR)/result.Po
   .c.o:
   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
   $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
# source='$<' object='$@' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(COMPILE) -c $<
.c.obj:
   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
   $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
# source='$<' object='$@' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(COMPILE) -c `$(CYGPATH_W) '$<'`
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
   list='$(SOURCES) $(HEADERS) $(LISP) $(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; nonempty = 1; } \
               END { if (nonempty) { for (i in files) print i; }; }'`; \
   mkid -fID $$unique
tags: TAGS
            $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
TAGS:
           $(TAGS_FILES) $(LISP)
   set x; \
   here=`pwd`; \
   list='$(SOURCES) $(HEADERS) $(LISP) $(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; nonempty = 1; } \
               END { if (nonempty) { for (i in files) print i; }; }'`; \
   shift; \
   if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
       test -n "$$unique" || unique=$$empty_fix; \
       if test $$# -gt 0; then \
           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
               "$$@" $$unique; \
       else \
           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
               $$unique; \
       fi; \
   fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
           $(TAGS_FILES) $(LISP)
   list='$(SOURCES) $(HEADERS) $(LISP) $(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; nonempty = 1; } \
               END { if (nonempty) { for (i in files) print i; }; }'`; \
   test -z "$(CTAGS_ARGS)$$unique" \
       || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
             $$unique
GTAGS:
   here=`$(am__cd) $(top_builddir) && pwd` \
       && $(am__cd) $(top_srcdir) \
       && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
   -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
   $(am__remove_distdir)
   test -d "$(distdir)" || mkdir "$(distdir)"
   @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
   topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
   list='$(DISTFILES)'; \
       dist_files=`for file in $$list; do echo $$file; done | \
       sed -e "s|^$$srcdirstrip/||;t" \
               -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
   case $$dist_files in \
       */*) $(MKDIR_P) `echo "$$dist_files" | \
                      sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
                      sort -u` ;; \
   esac; \
   for file in $$dist_files; do \
       if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
       if test -d $$d/$$file; then \
           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
           if test -d "$(distdir)/$$file"; then \
               find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
           fi; \
           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
               cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
          fi; \
          cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
      else \
          test -f "$(distdir)/$$file" \
          || cp -p $$d/$$file "$(distdir)/$$file" \
          || exit 1; \
      fi; \
   done
   -test -n "$(am__skip_mode_fix)" \
   || find "$(distdir)" -type d ! -perm -755 \
          -exec chmod u+rwx,go+rx {} \; -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 $(install_sh) -c -m a+r {} {} \; \
   || chmod -R a+r "$(distdir)"
dist-gzip: distdir
   tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
   $(am__remove_distdir)
dist-bzip2: distdir
   tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
   $(am__remove_distdir)
dist-lzma: distdir
   tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
   $(am__remove_distdir)
dist-xz: distdir
   tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
   $(am__remove_distdir)
dist-tarZ: distdir
   tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
   $(am__remove_distdir)
dist-shar: distdir
   shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
   $(am__remove_distdir)
dist-zip: distdir
   -rm -f $(distdir).zip
   zip -rq $(distdir).zip $(distdir)
   $(am__remove_distdir)
dist dist-all: distdir
   tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
   $(am__remove_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
   case '$(DIST_ARCHIVES)' in \
   *.tar.gz*) \
      GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
   *.tar.bz2*) \
      bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
   *.tar.lzma*) \
      lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
   *.tar.xz*) \
      xz -dc $(distdir).tar.xz | $(am__untar) ;;\
   *.tar.Z*) \
      uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
   *.shar.gz*) \
      GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
   *.zip*) \
      unzip $(distdir).zip ;;\
   esac
   chmod -R a-w $(distdir); chmod a+w $(distdir)
   mkdir $(distdir)/_build
   mkdir $(distdir)/_inst
   chmod a-w $(distdir)
   test -d $(distdir)/_build || exit 0; \
   dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
      && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
      && am__cwd=`pwd` \
      && $(am__cd) $(distdir)/_build \
      && ../configure --srcdir=.. --prefix="$$dc_install_base" \
         $(DISTCHECK_CONFIGURE_FLAGS) \
      && $(MAKE) $(AM_MAKEFLAGS) \
      && $(MAKE) $(AM_MAKEFLAGS) dvi \
      && $(MAKE) $(AM_MAKEFLAGS) check \
      && $(MAKE) $(AM_MAKEFLAGS) install \
      && $(MAKE) $(AM_MAKEFLAGS) installcheck \
      && $(MAKE) $(AM_MAKEFLAGS) uninstall \
      && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
               distuninstallcheck \
      && chmod -R a-w "$$dc_install_base" \
      && ({ \
              (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
                      distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
            } || { rm -rf "$$dc_destdir"; exit 1; }) \
      && rm -rf "$$dc_destdir" \
      && $(MAKE) $(AM_MAKEFLAGS) dist \
      && rm -rf $(DIST_ARCHIVES) \
      && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
      && cd "$$am__cwd" \
      || exit 1
   $(am__remove_distdir)
   @(echo "$(distdir) archives ready for distribution: "; \
      list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
      sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
   @$(am__cd) '$(distuninstallcheck_dir)' \
   && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
        || { echo "ERROR: files left after uninstall:" ; \
               if test -n "$(DESTDIR)"; then \
                   echo " (check DESTDIR support)"; \
               fi ; \
               $(distuninstallcheck_listfiles) ; \
               exit 1; } >&2
distcleancheck: distclean
   @if test '$(srcdir)' = . ; then \
      echo "ERROR: distcleancheck can only run from a VPATH build" ; \
      exit 1 ; \
   fi
   @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
      || { echo "ERROR: files left in build directory after distclean:" ; \
              $(distcleancheck_listfiles) ; \
              exit 1; } >&2
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
   for dir in "$(DESTDIR)$(bindir)"; do \
      test -z "$$dir" || $(MKDIR_P) "$$dir"; \
   done
install: install-am
  install-exec: install-exec-am
  install-data: install-data-am
  uninstall: uninstall-am
  install-am: all-am
     @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  installcheck: installcheck-am
  install-strip:
     $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
        install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
        `test -z '$(STRIP)' || \
           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
  mostlyclean-generic:
  clean-generic:
  distclean-generic:
     -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
     -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)"        || rm -f
$(CONFIG_CLEAN_VPATH_FILES)
  maintainer-clean-generic:
     @echo "This command is intended for maintainers to use"
     @echo "it deletes files that may require special tools to rebuild."
  clean: clean-am
  clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
  distclean: distclean-am
     -rm -f $(am__CONFIG_DISTCLEAN_FILES)
     -rm -rf ./$(DEPDIR)
     -rm -f Makefile
  distclean-am: clean-am distclean-compile distclean-generic \
     distclean-tags
  dvi: dvi-am
  dvi-am:
  html: html-am
  html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-binPROGRAMS
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
   -rm -f $(am__CONFIG_DISTCLEAN_FILES)
   -rm -rf $(top_srcdir)/autom4te.cache
   -rm -rf ./$(DEPDIR)
   -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
   clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
   dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
   distcheck distclean distclean-compile distclean-generic \
   distclean-tags distcleancheck distdir distuninstallcheck dvi \
   dvi-am html html-am info info-am install install-am \
   install-binPROGRAMS install-data install-data-am install-dvi \
   install-dvi-am install-exec install-exec-am install-html \
   install-html-am install-info install-info-am install-man \
   install-pdf install-pdf-am install-ps install-ps-am \
   install-strip installcheck installcheck-am installdirs \
   maintainer-clean maintainer-clean-generic mostlyclean \
   mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
   tags uninstall uninstall-am uninstall-binPROGRAMS
# 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: