From 430d000de09ef50243a9a10435ec33ba6e1e66cd Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 26 Mar 1997 05:57:50 +0000 Subject: [PATCH] follow GNU standards --- ChangeLog | 10 ++++++++++ TODO | 3 ++- automake.in | 2 +- automake.texi | 6 +++++- data.am | 1 + header-vars.am | 3 +++ header.am | 1 + lib/am/data.am | 1 + lib/am/header-vars.am | 3 +++ lib/am/header.am | 1 + lib/am/libs.am | 1 + lib/am/lisp.am | 1 + lib/am/ltlib.am | 1 + lib/am/progs.am | 1 + lib/am/scripts.am | 1 + lib/am/texinfos.am | 8 +++++++- libs.am | 1 + lisp.am | 1 + ltlib.am | 1 + progs.am | 1 + scripts.am | 1 + texinfos.am | 8 +++++++- 22 files changed, 52 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 18ad0d9..159ca7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ Tue Mar 25 22:09:45 1997 Tom Tromey + Update to follow GNU Standards: + * automake.in (handle_man_pages): Use NORMAL_UNINSTALL before + uninstall-man. + * texinfos.am (uninstall-info): Use two loops, and have + PRE_UNINSTALL before running install-info. + * data.am, header.am, libs.am, lisp.am, ltlib.am, progs.am, + scripts.am, texinfos.am: Use NORMAL_UNINSTALL. + * header-vars.am (PRE_UNINSTALL, POST_UNINSTALL, + NORMAL_UNINSTALL): Define. + * automake.in (scan_one_configure_file): Don't define ANSI2KNR as a configure varriable. diff --git a/TODO b/TODO index 6ee7dcf..074d36e 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,5 @@ -Priorities for release: +* NORMAL_INSTALL / NORMAL_UNINSTALL -vs- recursive rules + * copyrights on m4 files, aclocal output * if no AM_INIT_AUTOMAKE, then don't handle `missing' stuff. diff --git a/automake.in b/automake.in index d336195..ecfef69 100755 --- a/automake.in +++ b/automake.in @@ -2015,7 +2015,7 @@ sub handle_man_pages } $output_rules .= "\n"; - $output_rules .= "uninstall-man:\n"; + $output_rules .= "uninstall-man:\n\t\$(NORMAL_UNINSTALL)\n"; foreach $key (sort keys %inames) { $_ = $uninstall_man_format; diff --git a/automake.texi b/automake.texi index 7b854b3..acc70c1 100644 --- a/automake.texi +++ b/automake.texi @@ -2145,7 +2145,11 @@ standards. @item If @samp{VERSION} indicates that this is an alpha release, and the file @file{README-alpha} appears in the topmost directory of a package, then -it is included in the distribution. +it is included in the distribution. This is done in @samp{--gnits} +mode, and no other, because this mode is the only one where version +number formats are constrained, and hence the only mode where +@code{automake} can automatically determine whether @file{README-alpha} +should be included. @item The file @file{THANKS} is required. diff --git a/data.am b/data.am index 5647fcb..6bc1d3e 100644 --- a/data.am +++ b/data.am @@ -31,6 +31,7 @@ install-@DIR@DATA: $(@DIR@_DATA) done uninstall-@DIR@DATA: + $(NORMAL_UNINSTALL) list="$(@DIR@_DATA)"; for p in $$list; do \ rm -f $(@DIR@dir)/$$p; \ done diff --git a/header-vars.am b/header-vars.am index dae6fc1..f96643a 100644 --- a/header-vars.am +++ b/header-vars.am @@ -60,3 +60,6 @@ transform = @program_transform_name@ NORMAL_INSTALL = @: PRE_INSTALL = @: POST_INSTALL = @: +NORMAL_UNINSTALL = @: +PRE_UNINSTALL = @: +POST_UNINSTALL = @: diff --git a/header.am b/header.am index 3b0da99..eacad56 100644 --- a/header.am +++ b/header.am @@ -26,6 +26,7 @@ install-@DIR@HEADERS: $(@DIR@_HEADERS) done uninstall-@DIR@HEADERS: + $(NORMAL_UNINSTALL) list="$(@DIR@_HEADERS)"; for p in $$list; do \ rm -f $(@DIR@dir)/$$p; \ done diff --git a/lib/am/data.am b/lib/am/data.am index 5647fcb..6bc1d3e 100644 --- a/lib/am/data.am +++ b/lib/am/data.am @@ -31,6 +31,7 @@ install-@DIR@DATA: $(@DIR@_DATA) done uninstall-@DIR@DATA: + $(NORMAL_UNINSTALL) list="$(@DIR@_DATA)"; for p in $$list; do \ rm -f $(@DIR@dir)/$$p; \ done diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am index dae6fc1..f96643a 100644 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@ -60,3 +60,6 @@ transform = @program_transform_name@ NORMAL_INSTALL = @: PRE_INSTALL = @: POST_INSTALL = @: +NORMAL_UNINSTALL = @: +PRE_UNINSTALL = @: +POST_UNINSTALL = @: diff --git a/lib/am/header.am b/lib/am/header.am index 3b0da99..eacad56 100644 --- a/lib/am/header.am +++ b/lib/am/header.am @@ -26,6 +26,7 @@ install-@DIR@HEADERS: $(@DIR@_HEADERS) done uninstall-@DIR@HEADERS: + $(NORMAL_UNINSTALL) list="$(@DIR@_HEADERS)"; for p in $$list; do \ rm -f $(@DIR@dir)/$$p; \ done diff --git a/lib/am/libs.am b/lib/am/libs.am index edbbf67..6fbc557 100644 --- a/lib/am/libs.am +++ b/lib/am/libs.am @@ -41,6 +41,7 @@ install-@DIR@LIBRARIES: $(@DIR@_LIBRARIES) done uninstall-@DIR@LIBRARIES: + $(NORMAL_UNINSTALL) list="$(@DIR@_LIBRARIES)"; for p in $$list; do \ rm -f $(@DIR@dir)/$$p; \ done diff --git a/lib/am/lisp.am b/lib/am/lisp.am index 1d6e9bc..58e9c49 100644 --- a/lib/am/lisp.am +++ b/lib/am/lisp.am @@ -31,6 +31,7 @@ install-@DIR@LISP: $(@DIR@_LISP) $(ELCFILES) done uninstall-@DIR@LISP: + $(NORMAL_UNINSTALL) list="$(@DIR@_LISP)"; for p in $$list; do \ rm -f $(@DIR@dir)/$$p $(@DIR@dir)/$${p}c; \ done diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am index a30b666..3530a7f 100644 --- a/lib/am/ltlib.am +++ b/lib/am/ltlib.am @@ -30,6 +30,7 @@ install-@DIR@LTLIBRARIES: $(@DIR@_LTLIBRARIES) done uninstall-@DIR@LTLIBRARIES: + $(NORMAL_UNINSTALL) list="$(@DIR@_LTLIBRARIES)"; for p in $$list; do \ @LIBTOOL --mode=uninstall@ rm -f $(@DIR@dir)/$$p; \ done diff --git a/lib/am/progs.am b/lib/am/progs.am index 68689e8..0e590f2 100644 --- a/lib/am/progs.am +++ b/lib/am/progs.am @@ -33,6 +33,7 @@ install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS) done uninstall-@DIR@PROGRAMS: + $(NORMAL_UNINSTALL) list="$(@DIR@_PROGRAMS)"; for p in $$list; do \ rm -f $(@DIR@dir)/`echo $$p|sed '$(transform)'`@EXEEXT@; \ done diff --git a/lib/am/scripts.am b/lib/am/scripts.am index 9ca60ff..5328c1a 100644 --- a/lib/am/scripts.am +++ b/lib/am/scripts.am @@ -31,6 +31,7 @@ install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS) done uninstall-@DIR@SCRIPTS: + $(NORMAL_UNINSTALL) list="$(@DIR@_SCRIPTS)"; for p in $$list; do \ rm -f $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ done diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index 53d93bb..85bdba8 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -101,13 +101,19 @@ install-info-am: $(INFO_DEPS) else : ; fi uninstall-info: + $(PRE_UNINSTALL) +## Run two loops here so that we can handle PRE_UNINSTALL and +## NORMAL_UNINSTALL correctly. if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ ii=yes; \ else ii=; fi; \ for file in $(INFO_DEPS); do \ - (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ test -z $ii || install-info --info-dir=$(infodir) --remove $$file; \ done + $(NORMAL_UNINSTALL) + for file in $(INFO_DEPS); do \ + (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ + done dist-info: $(INFO_DEPS) for base in $(INFO_DEPS); do \ diff --git a/libs.am b/libs.am index edbbf67..6fbc557 100644 --- a/libs.am +++ b/libs.am @@ -41,6 +41,7 @@ install-@DIR@LIBRARIES: $(@DIR@_LIBRARIES) done uninstall-@DIR@LIBRARIES: + $(NORMAL_UNINSTALL) list="$(@DIR@_LIBRARIES)"; for p in $$list; do \ rm -f $(@DIR@dir)/$$p; \ done diff --git a/lisp.am b/lisp.am index 1d6e9bc..58e9c49 100644 --- a/lisp.am +++ b/lisp.am @@ -31,6 +31,7 @@ install-@DIR@LISP: $(@DIR@_LISP) $(ELCFILES) done uninstall-@DIR@LISP: + $(NORMAL_UNINSTALL) list="$(@DIR@_LISP)"; for p in $$list; do \ rm -f $(@DIR@dir)/$$p $(@DIR@dir)/$${p}c; \ done diff --git a/ltlib.am b/ltlib.am index a30b666..3530a7f 100644 --- a/ltlib.am +++ b/ltlib.am @@ -30,6 +30,7 @@ install-@DIR@LTLIBRARIES: $(@DIR@_LTLIBRARIES) done uninstall-@DIR@LTLIBRARIES: + $(NORMAL_UNINSTALL) list="$(@DIR@_LTLIBRARIES)"; for p in $$list; do \ @LIBTOOL --mode=uninstall@ rm -f $(@DIR@dir)/$$p; \ done diff --git a/progs.am b/progs.am index 68689e8..0e590f2 100644 --- a/progs.am +++ b/progs.am @@ -33,6 +33,7 @@ install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS) done uninstall-@DIR@PROGRAMS: + $(NORMAL_UNINSTALL) list="$(@DIR@_PROGRAMS)"; for p in $$list; do \ rm -f $(@DIR@dir)/`echo $$p|sed '$(transform)'`@EXEEXT@; \ done diff --git a/scripts.am b/scripts.am index 9ca60ff..5328c1a 100644 --- a/scripts.am +++ b/scripts.am @@ -31,6 +31,7 @@ install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS) done uninstall-@DIR@SCRIPTS: + $(NORMAL_UNINSTALL) list="$(@DIR@_SCRIPTS)"; for p in $$list; do \ rm -f $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ done diff --git a/texinfos.am b/texinfos.am index 53d93bb..85bdba8 100644 --- a/texinfos.am +++ b/texinfos.am @@ -101,13 +101,19 @@ install-info-am: $(INFO_DEPS) else : ; fi uninstall-info: + $(PRE_UNINSTALL) +## Run two loops here so that we can handle PRE_UNINSTALL and +## NORMAL_UNINSTALL correctly. if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ ii=yes; \ else ii=; fi; \ for file in $(INFO_DEPS); do \ - (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ test -z $ii || install-info --info-dir=$(infodir) --remove $$file; \ done + $(NORMAL_UNINSTALL) + for file in $(INFO_DEPS); do \ + (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ + done dist-info: $(INFO_DEPS) for base in $(INFO_DEPS); do \ -- 2.7.4