]> sourceware.org Git - automake.git/commitdiff
Added --install-missing option
authorTom Tromey <tromey@redhat.com>
Mon, 11 Dec 1995 01:27:23 +0000 (01:27 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 11 Dec 1995 01:27:23 +0000 (01:27 +0000)
ChangeLog
Makefile.am
Makefile.in
NEWS
TODO
automake.in
lib/am/Makefile.am

index 1f103adbb17e679ff9c4b7ec6da83bd187ea363f..7ccd877a605ee2977ec84585ae718cdf70d2cba5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,19 @@
 Sun Dec 10 11:59:33 1995  Tom Tromey  <tromey@cambric.colorado.edu>
 
+       * Makefile.am (pkgdata_DATA): Cause INSTALL, install-sh, mdate-sh,
+       mkinstalldirs, texinfo.tex to be installed.
+       * automake.in (symlink_exists): New global.
+       (install_missing): Ditto.
+       (require_file): Install missing files if possible.
+       (parse_arguments): Handle --install-missing option.
+       (initialize_global_constants): Document --install-missing.
+
        * Makefile.am (cvs-dist): Don't release unless NEWS updated.
        Ensure 'checks' pass before release.
+       (maintainer-check): Renamed.  Look in $(srcdir) for sources.  From
+       Franc,ois Pinard.
+       (cvs-dist): Depend on maintainer-check instead of explicitly
+       running check.
 
        * configure.in (VERSION): Version 0.26.
 
index 2c0a83529eda455deb62a509dd001ce227c3ba5e..eccfe0b4f25716ca8a868702cd5dcdb0ec4d1594 100644 (file)
@@ -12,7 +12,8 @@ program.am programs.am remake-hdr.am \
 remake-subd.am remake.am scripts.am subdirs.am tags.am tags-subd.am \
 tags-clean.am \
 texi-clean.am texi-version.am texinfos-vars.am texinfos.am \
-libraries-clean.am scripts-clean.am programs-clean.am data-clean.am
+libraries-clean.am scripts-clean.am programs-clean.am data-clean.am \
+INSTALL install-sh mdate-sh mkinstalldirs texinfo.tex
 
 DIST_OTHER = automake.in
 
@@ -27,9 +28,9 @@ ETAGS_ARGS = automake.in --lang=none \
 # * syntax check with perl4 and perl5.
 # * make sure the scripts don't use 'true'
 # These are only really guaranteed to work on my machine.
-check-local: automake
+maintainer-check: automake
        @PERL@ -c -w automake
-       if grep '^[^#].*true' [a-z]*.am; then   \
+       if grep '^[^#].*true' $(srcdir)/[a-z]*.am; then \
          echo "can't use 'true' in GNU Makefile" 1>&2; \
          exit 1;                               \
        else :; fi
@@ -42,8 +43,7 @@ automake: automake.in
 
 # Tag before making distribution.  Also, don't make a distribution if
 # checks fail.  Also, make sure the NEWS file is up-to-date.
-cvs-dist:
-       $(MAKE) check
+cvs-dist: maintainer-check
        if sed 1q NEWS | grep -e "$(VERSION)"; then :; else \
          echo "NEWS not updated; not releasing" 1>&2; \
          exit 1;                               \
index acf1fc1d040222f5cb8b787a9d6fcc324451b44f..edb4291c19ccf689013729c3c71bf99dfbc2e598 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 0.25 from Makefile.am
+# Makefile.in generated automatically by automake 0.26 from Makefile.am
 # Copyright (C) 1994, 1995 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -59,7 +59,8 @@ program.am programs.am remake-hdr.am \
 remake-subd.am remake.am scripts.am subdirs.am tags.am tags-subd.am \
 tags-clean.am \
 texi-clean.am texi-version.am texinfos-vars.am texinfos.am \
-libraries-clean.am scripts-clean.am programs-clean.am data-clean.am
+libraries-clean.am scripts-clean.am programs-clean.am data-clean.am \
+INSTALL install-sh mdate-sh mkinstalldirs texinfo.tex
 
 DIST_OTHER = automake.in
 
@@ -84,7 +85,7 @@ DVIS = automake.dvi
 DATA = $(pkgdata_DATA)
 
 ACLOCAL = aclocal.m4
-DIST_COMMON = mkinstalldirs configure Makefile.in stamp-vti configure.in ChangeLog THANKS README version.texi mdate-sh TODO INSTALL Makefile.am texinfo.tex NEWS aclocal.m4 install-sh
+DIST_COMMON = mkinstalldirs configure Makefile.in stamp-vti configure.in ChangeLog THANKS README version.texi mdate-sh TODO INSTALL Makefile.am NEWS aclocal.m4 install-sh
 
 PACKAGE = @PACKAGE@
 VERSION = @VERSION@
@@ -247,7 +248,7 @@ info: $(INFO_DEPS)
 
 dvi: $(DVIS)
 
-check: check-local
+check: 
 
 installcheck: 
 
@@ -294,9 +295,9 @@ maintainer-clean: distclean maintainer-clean-binSCRIPTS maintainer-clean-vti mai
 # * syntax check with perl4 and perl5.
 # * make sure the scripts don't use 'true'
 # These are only really guaranteed to work on my machine.
-check-local: automake
+maintainer-check: automake
        @PERL@ -c -w automake
-       if grep '^[^#].*true' [a-z]*.am; then   \
+       if grep '^[^#].*true' $(srcdir)/[a-z]*.am; then \
          echo "can't use 'true' in GNU Makefile" 1>&2; \
          exit 1;                               \
        else :; fi
@@ -309,8 +310,7 @@ automake: automake.in
 
 # Tag before making distribution.  Also, don't make a distribution if
 # checks fail.  Also, make sure the NEWS file is up-to-date.
-cvs-dist:
-       $(MAKE) check
+cvs-dist: maintainer-check
        if sed 1q NEWS | grep -e "$(VERSION)"; then :; else \
          echo "NEWS not updated; not releasing" 1>&2; \
          exit 1;                               \
diff --git a/NEWS b/NEWS
index dea0209c6a0ac5642ab71da106a5fd4691e25df7..60acb217576cbe000993dfb3e0ba96cdcd543bbf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+New in 0.26:
+* Added --install-missing option.
+\f
 New in 0.25:
 * Bug fixes.
 * Works with Perl 4 again.
diff --git a/TODO b/TODO
index 2a0b6373d546d5a6dd817a97301f9d466dcbe1ea..a6f182ecd1376cfbfb6ae5e8ebe462e06cc68e82 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,5 +1,6 @@
 Top priorities:
 * Fix up how 'clean' interacts with new naming scheme.
+* am_error should use printf-style arguments (for eventual gettext scheme)
 
 uninstall and pkg-dirs should rm -rf the dir.
 
@@ -36,9 +37,6 @@ Should 'distclean' remove $(SCRIPTS)?
 Should 'maintainer-clean' do "rm -rf .deps"?
 Should look for clean-local targets in Makefile.am.
 
-Consider a --install-missing option to install missing files such as
-mdate-sh, texinfo.tex, etc.
-
 Think about writing a small tool to guess what the local Makefile.am
 should look like.
 
index 996c28e6ef26a868ff39525d40fefd2dc84804b8..c4212e78eeb0783b74410372705696961cd032bb 100755 (executable)
@@ -54,6 +54,12 @@ $use_dependencies = 1;
 # we have processed all input files.
 $exit_status = 0;
 
+# From the Perl manual.
+$symlink_exists = (eval 'symlink ("", "");', $@ eq '');
+
+# TRUE if missing standard files should be installed.
+$install_missing = 0;
+
 \f
 
 &initialize_global_constants;
@@ -131,6 +137,10 @@ sub parse_arguments
            shift (@arglist);
            $output_directory = $arglist[0];
        }
+       elsif ($arglist[0] eq '--install-missing')
+       {
+           $install_missing = 1;
+       }
        elsif ($arglist[0] eq '--')
        {
            # Stop option processing.
@@ -1193,6 +1203,7 @@ sub initialize_global_constants
   --amdir=DIR           directory storing config files
   --help                print this help, then exit
   --include-deps        include generated dependencies in Makefile.in
+  --install-missing     install missing standard files
   --output-dir=DIR      put generated Makefile.in's into DIR
   --strictness=LEVEL    set strictness level.  LEVEL is normal, gnu, gnits
   --version             print version number, then exit\n";
@@ -1411,6 +1422,19 @@ sub require_file
     {
        &push_dist_common ($file);
     }
+    elsif ($install_missing && -f ($am_dir . '/' . $file))
+    {
+       # Install the missing file.  Symlink if we can, copy if we must.
+       if ($symlink_exists)
+       {
+           symlink ($am_dir . '/' . $file, $fullfile);
+       }
+       else
+       {
+           system ('cp', $am_dir . '/' . $file, $fullfile);
+       }
+       &am_error ("required file \"$fullfile\" not found; installing");
+    }
     elsif ($strictness >= $mystrict)
     {
        # Only an error if strictness constraint violated.
index 2c0a83529eda455deb62a509dd001ce227c3ba5e..eccfe0b4f25716ca8a868702cd5dcdb0ec4d1594 100644 (file)
@@ -12,7 +12,8 @@ program.am programs.am remake-hdr.am \
 remake-subd.am remake.am scripts.am subdirs.am tags.am tags-subd.am \
 tags-clean.am \
 texi-clean.am texi-version.am texinfos-vars.am texinfos.am \
-libraries-clean.am scripts-clean.am programs-clean.am data-clean.am
+libraries-clean.am scripts-clean.am programs-clean.am data-clean.am \
+INSTALL install-sh mdate-sh mkinstalldirs texinfo.tex
 
 DIST_OTHER = automake.in
 
@@ -27,9 +28,9 @@ ETAGS_ARGS = automake.in --lang=none \
 # * syntax check with perl4 and perl5.
 # * make sure the scripts don't use 'true'
 # These are only really guaranteed to work on my machine.
-check-local: automake
+maintainer-check: automake
        @PERL@ -c -w automake
-       if grep '^[^#].*true' [a-z]*.am; then   \
+       if grep '^[^#].*true' $(srcdir)/[a-z]*.am; then \
          echo "can't use 'true' in GNU Makefile" 1>&2; \
          exit 1;                               \
        else :; fi
@@ -42,8 +43,7 @@ automake: automake.in
 
 # Tag before making distribution.  Also, don't make a distribution if
 # checks fail.  Also, make sure the NEWS file is up-to-date.
-cvs-dist:
-       $(MAKE) check
+cvs-dist: maintainer-check
        if sed 1q NEWS | grep -e "$(VERSION)"; then :; else \
          echo "NEWS not updated; not releasing" 1>&2; \
          exit 1;                               \
This page took 0.044315 seconds and 5 git commands to generate.