diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rwxr-xr-x | automake.in | 31 | ||||
-rw-r--r-- | data.am | 6 | ||||
-rw-r--r-- | header.am | 6 | ||||
-rw-r--r-- | lib/am/data.am | 6 | ||||
-rw-r--r-- | lib/am/header.am | 6 | ||||
-rw-r--r-- | lib/am/lisp.am | 6 | ||||
-rw-r--r-- | lisp.am | 6 |
8 files changed, 61 insertions, 18 deletions
@@ -1,3 +1,15 @@ +1999-12-18 Tom Tromey <tromey@cygnus.com> + + Partial fix for PR automake/40: + * lisp.am (install-@DIR@LISP): Handle nobase_ case. + (uninstall-@DIR@LISP): Likewise. + * header.am (install-@DIR@HEADERS): Handle nobase_ case. + (uninstall-@DIR@HEADERS): Likewise. + * data.am (install-@DIR@DATA): Handle nobase_ case. + (uninstall-@DIR@DATA): Likewise. + * automake.in (am_primary_prefixes): Recognize `nobase_' prefix. + (am_install_var): Recognize and handle `nobase_' prefix. + 1999-12-17 Tom Tromey <tromey@cygnus.com> * automake.in (get_object_extension): Added space before `-I.'. diff --git a/automake.in b/automake.in index d43e9966d..69dc9c39d 100755 --- a/automake.in +++ b/automake.in @@ -6983,11 +6983,11 @@ sub am_primary_prefixes $valid{'EXTRA'} = 0; foreach $varname (keys %contents) { - if ($varname =~ /^(dist_|nodist_)?(.*)_$primary$/) + if ($varname =~ /^(nobase_)?(dist_|nodist_)?(.*)_$primary$/) { - if (($1 ne '' && ! $can_dist) - || (! defined $valid{$2} - && ! &variable_defined ($2 . 'dir') + if (($2 ne '' && ! $can_dist) + || (! defined $valid{$3} + && ! &variable_defined ($3 . 'dir') # Note that a configure variable is always # legitimate. It is natural to name such # variables after the primary, so we explicitly @@ -6999,7 +6999,7 @@ sub am_primary_prefixes else { # Ensure all extended prefixes are actually used. - $valid{$1 . $2} = 1; + $valid{$1 . $2 . $3} = 1; } } } @@ -7108,11 +7108,19 @@ sub am_install_var local ($one_name); local ($X); local ($nodir_name); + local ($strip_subdir) = 1; foreach $X (sort keys %valid) { $one_name = $X . '_' . $primary; if (&variable_defined ($one_name)) { + # If subdir prefix should be preserved, do so. + if ($X =~ /^nobase_/) + { + $strip_subdir = 0; + $X =~ s/^nobase_//; + } + # If files should be distributed, do so. if ($can_dist) { @@ -7262,10 +7270,21 @@ sub am_install_var next; } + local ($subdir_xform); + if ($strip_subdir) + { + $subdir_xform = 's/^NOBASE.*$//; s/^BASE//;'; + } + else + { + $subdir_xform = 's/^BASE.*$//; s/^NOBASE//;'; + } + $output_rules .= &file_contents_with_transform ('s/\@DIR\@/' . $X . '/g;' . 's/\@NDIR\@/' . $nodir_name . '/go;' - . $ltxform . $cygxform, + . $ltxform . $cygxform + . $subdir_xform, $file); push (@uninstall, 'uninstall-' . $X . $primary); @@ -25,7 +25,8 @@ install-@DIR@DATA: $(@DIR@_DATA) ## If the _DATA variable has an entry like foo/bar, install it as ## $(destdir)/bar, not $(destdir)/foo/bar. The user can always make a ## new dir variable for the latter case. - f="`echo $$p | sed -e 's|^.*/||'`"; \ +BASE f="`echo $$p | sed -e 's|^.*/||'`"; \ +NOBASE f="$$p"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@NDIR@dir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@NDIR@dir)/$$f; \ done @@ -33,7 +34,8 @@ install-@DIR@DATA: $(@DIR@_DATA) uninstall-@DIR@DATA: @$(NORMAL_UNINSTALL) @list='$(@DIR@_DATA)'; for p in $$list; do \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ +BASE f="`echo $$p | sed -e 's|^.*/||'`"; \ +NOBASE f="$$p"; \ echo " rm -f $(DESTDIR)$(@NDIR@dir)/$$f"; \ rm -f $(DESTDIR)$(@NDIR@dir)/$$f; \ done @@ -23,7 +23,8 @@ install-@DIR@HEADERS: $(@DIR@_HEADERS) @list='$(@DIR@_HEADERS)'; for p in $$list; do \ ## A header file can be in the source directory or the build directory. if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ +BASE f="`echo $$p | sed -e 's|^.*/||'`"; \ +NOBASE f="$$p"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@NDIR@dir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@NDIR@dir)/$$f; \ done @@ -31,7 +32,8 @@ install-@DIR@HEADERS: $(@DIR@_HEADERS) uninstall-@DIR@HEADERS: @$(NORMAL_UNINSTALL) @list='$(@DIR@_HEADERS)'; for p in $$list; do \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ +BASE f="`echo $$p | sed -e 's|^.*/||'`"; \ +NOBASE f="$$p"; \ echo " rm -f $(DESTDIR)$(@NDIR@dir)/$$f"; \ rm -f $(DESTDIR)$(@NDIR@dir)/$$f; \ done diff --git a/lib/am/data.am b/lib/am/data.am index 416d28797..37b8eb7c0 100644 --- a/lib/am/data.am +++ b/lib/am/data.am @@ -25,7 +25,8 @@ install-@DIR@DATA: $(@DIR@_DATA) ## If the _DATA variable has an entry like foo/bar, install it as ## $(destdir)/bar, not $(destdir)/foo/bar. The user can always make a ## new dir variable for the latter case. - f="`echo $$p | sed -e 's|^.*/||'`"; \ +BASE f="`echo $$p | sed -e 's|^.*/||'`"; \ +NOBASE f="$$p"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@NDIR@dir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@NDIR@dir)/$$f; \ done @@ -33,7 +34,8 @@ install-@DIR@DATA: $(@DIR@_DATA) uninstall-@DIR@DATA: @$(NORMAL_UNINSTALL) @list='$(@DIR@_DATA)'; for p in $$list; do \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ +BASE f="`echo $$p | sed -e 's|^.*/||'`"; \ +NOBASE f="$$p"; \ echo " rm -f $(DESTDIR)$(@NDIR@dir)/$$f"; \ rm -f $(DESTDIR)$(@NDIR@dir)/$$f; \ done diff --git a/lib/am/header.am b/lib/am/header.am index 3b437d242..5cf5e8c34 100644 --- a/lib/am/header.am +++ b/lib/am/header.am @@ -23,7 +23,8 @@ install-@DIR@HEADERS: $(@DIR@_HEADERS) @list='$(@DIR@_HEADERS)'; for p in $$list; do \ ## A header file can be in the source directory or the build directory. if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ +BASE f="`echo $$p | sed -e 's|^.*/||'`"; \ +NOBASE f="$$p"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@NDIR@dir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@NDIR@dir)/$$f; \ done @@ -31,7 +32,8 @@ install-@DIR@HEADERS: $(@DIR@_HEADERS) uninstall-@DIR@HEADERS: @$(NORMAL_UNINSTALL) @list='$(@DIR@_HEADERS)'; for p in $$list; do \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ +BASE f="`echo $$p | sed -e 's|^.*/||'`"; \ +NOBASE f="$$p"; \ echo " rm -f $(DESTDIR)$(@NDIR@dir)/$$f"; \ rm -f $(DESTDIR)$(@NDIR@dir)/$$f; \ done diff --git a/lib/am/lisp.am b/lib/am/lisp.am index 9dc9de286..b737a6dda 100644 --- a/lib/am/lisp.am +++ b/lib/am/lisp.am @@ -23,7 +23,8 @@ install-@DIR@LISP: $(@DIR@_LISP) $(ELCFILES) @list='$(@DIR@_LISP)'; for p in $$list; do \ ## A lisp file can be in the source directory or the build directory. if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ +BASE f="`echo $$p | sed -e 's|^.*/||'`"; \ +NOBASE f="$$p"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@NDIR@dir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@NDIR@dir)/$$f; \ ## Only install .elc file if it exists. @@ -36,7 +37,8 @@ install-@DIR@LISP: $(@DIR@_LISP) $(ELCFILES) uninstall-@DIR@LISP: @$(NORMAL_UNINSTALL) @list='$(@DIR@_LISP)'; for p in $$list; do \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ +BASE f="`echo $$p | sed -e 's|^.*/||'`"; \ +NOBASE f="$$p"; \ echo " rm -f $(@NDIR@dir)/$$f $(DESTDIR)$(@NDIR@dir)/$${f}c"; \ rm -f $(@NDIR@dir)/$$f $(DESTDIR)$(@NDIR@dir)/$${f}c; \ done @@ -23,7 +23,8 @@ install-@DIR@LISP: $(@DIR@_LISP) $(ELCFILES) @list='$(@DIR@_LISP)'; for p in $$list; do \ ## A lisp file can be in the source directory or the build directory. if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ +BASE f="`echo $$p | sed -e 's|^.*/||'`"; \ +NOBASE f="$$p"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@NDIR@dir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@NDIR@dir)/$$f; \ ## Only install .elc file if it exists. @@ -36,7 +37,8 @@ install-@DIR@LISP: $(@DIR@_LISP) $(ELCFILES) uninstall-@DIR@LISP: @$(NORMAL_UNINSTALL) @list='$(@DIR@_LISP)'; for p in $$list; do \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ +BASE f="`echo $$p | sed -e 's|^.*/||'`"; \ +NOBASE f="$$p"; \ echo " rm -f $(@NDIR@dir)/$$f $(DESTDIR)$(@NDIR@dir)/$${f}c"; \ rm -f $(@NDIR@dir)/$$f $(DESTDIR)$(@NDIR@dir)/$${f}c; \ done |