## automake - create Makefile.in from Makefile.am ## Copyright 2001 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. .PHONY: distdir distdir: $(DISTFILES) ## ## For Gnits users, this is pretty handy. Look at 15 lines ## in case some explanatory text is desirable. ## @TOPDIR@@CK-NEWS@ @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" > /dev/null; then :; else \ @TOPDIR@@CK-NEWS@ echo "NEWS not updated; not releasing" 1>&2; \ @TOPDIR@@CK-NEWS@ exit 1; \ @TOPDIR@@CK-NEWS@ fi ## ## Only for the top dir. ## @TOPDIR@ -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) @TOPDIR@ mkdir $(distdir) ## ## $(mkinstalldirs) @DISTDIRS@ ## ## @for file in $(DISTFILES); do \ ## ## In loop, test for file existence because sometimes a file gets ## included in DISTFILES twice. For example this happens when a single ## source file is used in building more than one program. Also, there ## are situations in which "ln" can fail. For instance a file to ## distribute could actually be a cross-filesystem symlink -- this can ## easily happen if "gettextize" was run on the distribution. ## @CYGNUS@ if test -f $$file; then d=.; else d=$(srcdir); fi; \ @NCYGNUS@ d=$(srcdir); \ ## if test -d $$d/$$file; then \ ## Don't mention $$file in destination argument, since this fails if ## destination directory already exists. Also, use `-R' and not `-r'. ## `-r' is almost always incorrect. cp -pR $$d/$$file $(distdir) \ || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done ## ## Test for directory existence here because previous automake ## invocation might have created some directories. Note that we ## explicitly set distdir for the subdir make; that lets us mix-n-match ## many automake-using packages into one large package, and have "dist" ## at the top level do the right thing. If we're in the topmost ## directory, then we use `distdir' instead of `top_distdir'; this lets ## us work correctly with an enclosing package. ## @SUBDIRS@ for subdir in $(@DIST_SUBDIR_NAME@); do \ @SUBDIRS@ if test "$$subdir" = .; then :; else \ @SUBDIRS@ test -d $(distdir)/$$subdir \ @SUBDIRS@ || mkdir $(distdir)/$$subdir \ @SUBDIRS@ || exit 1; \ @SUBDIRS@ (cd $$subdir && \ @SUBDIRS@ $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(@TOP_DISTDIR@) distdir=../$(distdir)/$$subdir distdir) \ @SUBDIRS@ || exit 1; \ @SUBDIRS@ fi; \ @SUBDIRS@ done