* data.am: Use it.
* header.am: Include data.am.
+2001-04-27 Akim Demaille <akim@epita.fr>
+
+ * automake.in (&am_install_var): Transform `ONE_PRIMARY'.
+ * data.am: Use it.
+ * header.am: Include data.am.
+
+
2001-04-27 Akim Demaille <akim@epita.fr>
* automake.in (&am_install_var): Transform `PRIMARY'.
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,
## 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%
## 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
## 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%
## 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