automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

90-header-include-data.patch


From: Akim Demaille
Subject: 90-header-include-data.patch
Date: Wed, 28 Mar 2001 09:28:24 +0200

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * automake.in (&am_install_var): Transform `ONE_PRIMARY'.
        * data.am: Use it.
        * header.am: Include data.am.
        
        
Index: automake.in
--- automake.in Sun, 25 Mar 2001 18:37:07 +0200 akim (am/f/39_automake.i 1.215 
755)
+++ automake.in Sun, 25 Mar 2001 18:46:06 +0200 akim (am/f/39_automake.i 1.215 
755)
@@ -7166,11 +7166,15 @@ sub am_install_var
            my $exec_p = (defined $exec_dir_p {$X}
                          ? $exec_dir_p {$X}
                          : ($X =~ /exec/));
+
+           # Singular form of $PRIMARY.
+           (my $one_primary = $primary) =~ s/S$//;
            $output_rules .= &file_contents ($file,
-                                            ('PRIMARY' => $primary,
-                                             'DIR'     => $X,
-                                             'NDIR'    => $nodir_name,
-                                             'BASE'    => $strip_subdir,
+                                            ('PRIMARY'     => $primary,
+                                             'ONE_PRIMARY' => $one_primary,
+                                             'DIR'         => $X,
+                                             'NDIR'        => $nodir_name,
+                                             'BASE'        => $strip_subdir,
 
                                              'EXEC'    => $exec_p,
                                              'INSTALL' => $install_p,
Index: data.am
--- data.am Sun, 25 Mar 2001 18:37:07 +0200 akim (am/g/46_data.am 1.13 644)
+++ data.am Sun, 25 Mar 2001 18:44:50 +0200 akim (am/g/46_data.am 1.13 644)
@@ -30,13 +30,14 @@
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
        @list='$(%DIR%_%PRIMARY%)'; for p in $$list; do \
+## A file can be in the source directory or the build directory.
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 ## If the _%PRIMARY% 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.
 ?BASE?   f="`echo $$p | sed -e 's|^.*/||'`"; \
 ?!BASE?          f="$$p"; \
-         echo " $(INSTALL_%PRIMARY%) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
+         echo " $(INSTALL_%ONE_PRIMARY%) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
          $(INSTALL_%PRIMARY%) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
        done
 endif %?INSTALL%
Index: header.am
--- header.am Mon, 12 Mar 2001 21:28:36 +0100 akim (am/g/38_header.am 1.11 644)
+++ header.am Sun, 25 Mar 2001 18:42:00 +0200 akim (am/g/38_header.am 1.11 644)
@@ -17,51 +17,5 @@
 ## 02111-1307, USA.
 
 
-## ------------ ##
-## Installing.  ##
-## ------------ ##
-
-if %?INSTALL%
-_am_installdirs += $(DESTDIR)$(%NDIR%dir)
-?EXEC?.PHONY install-exec-am: install-%DIR%HEADERS
-?!EXEC?.PHONY install-data-am: install-%DIR%HEADERS
-install-%DIR%HEADERS: $(%DIR%_HEADERS)
-       @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
-## Funny invocation because Makefile variable can be empty, leading to
-## a syntax error in sh.
-       @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; \
-?BASE?   f="`echo $$p | sed -e 's|^.*/||'`"; \
-?!BASE?          f="$$p"; \
-         echo " $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
-         $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
-       done
-endif %?INSTALL%
-
-
-## -------------- ##
-## Uninstalling.  ##
-## -------------- ##
-
-if %?INSTALL%
-.PHONY uninstall-am: uninstall-%DIR%HEADERS
-uninstall-%DIR%HEADERS:
-       @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_HEADERS)'; for p in $$list; do \
-?BASE?   f="`echo $$p | sed -e 's|^.*/||'`"; \
-?!BASE?          f="$$p"; \
-         echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f"; \
-         rm -f $(DESTDIR)$(%NDIR%dir)/$$f; \
-       done
-endif %?INSTALL%
-
-
-## -------------- ##
-## Distributing.  ##
-## -------------- ##
-
-if %?DIST%
-DIST_COMMON += $(%DIR%_HEADERS)
-endif %?DIST%
+## Exactly the same as data.am.
+include data.am



reply via email to

[Prev in Thread] Current Thread [Next in Thread]