From: Akim Demaille Date: Mon, 26 Feb 2001 19:16:15 +0000 (+0000) Subject: * automake.in (&am_install_var): Recognize whether predefined X-Git-Tag: handle-languages~215 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=265aeebdafc356d400a126330c40abe63b2e4fed;p=automake.git * automake.in (&am_install_var): Recognize whether predefined directories are `data' or `exec'. * libs.am, ltlib.am, progs.am, python.am, scripts.am: Install ?EXEC?. * tests/instdata2.test: Update. --- diff --git a/ChangeLog b/ChangeLog index ee5281dc..f97c2c43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-02-26 Akim Demaille + + * automake.in (&am_install_var): Recognize whether predefined + directories are `data' or `exec'. + * libs.am, ltlib.am, progs.am, python.am, scripts.am: Install + ?EXEC?. + * tests/instdata2.test: Update. + 2001-02-26 Akim Demaille * texinfos.am: No ?EXEC? hook as currently installing TEXINFOS is diff --git a/automake.in b/automake.in index d4594185..6297318f 100755 --- a/automake.in +++ b/automake.in @@ -7075,12 +7075,34 @@ sub am_install_var next; } + # Directories installed during 'install-exec' phase. + my %exec_dir_p = + ( + 'bin' => 1, + 'sbin' => 1, + 'libexec' => 1, + 'data' => 0, + 'sysconf' => 1, + 'localstate' => 1, + 'lib' => 1, + 'info' => 0, + 'man' => 0, + 'include' => 0, + 'oldinclude' => 0, + 'pkgdata' => 0, + 'pkglib' => 1, + 'pkginclude' => 0 + ); + my $exec_p = (defined $exec_dir_p {$X} + ? $exec_dir_p {$X} + : ($X =~ /exec/)); + $output_rules .= &file_contents ($file, &transform ('DIR' => $X, 'NDIR' => $nodir_name, 'BASE' => $strip_subdir, - 'EXEC' => $X =~ /exec/) + 'EXEC' => $exec_p) . $ltxform . $cygxform); } diff --git a/lib/am/libs.am b/lib/am/libs.am index 5de5cf54..8c682cd0 100644 --- a/lib/am/libs.am +++ b/lib/am/libs.am @@ -17,7 +17,8 @@ ## 02111-1307, USA. _am_installdirs += $(DESTDIR)$(@NDIR@dir) -.PHONY install-exec-am: install-@DIR@LIBRARIES +?EXEC?.PHONY install-exec-am: install-@DIR@LIBRARIES +?!EXEC?.PHONY install-data-am: install-@DIR@LIBRARIES install-@DIR@LIBRARIES: $(@DIR@_LIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(@NDIR@dir) diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am index 2961f0b4..2de94b7f 100644 --- a/lib/am/ltlib.am +++ b/lib/am/ltlib.am @@ -18,7 +18,8 @@ ## 02111-1307, USA. _am_installdirs += $(DESTDIR)$(@NDIR@dir) -.PHONY install-exec-am: install-@DIR@LTLIBRARIES +?EXEC?.PHONY install-exec-am: install-@DIR@LTLIBRARIES +?!EXEC?.PHONY install-data-am: install-@DIR@LTLIBRARIES install-@DIR@LTLIBRARIES: $(@DIR@_LTLIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(@NDIR@dir) diff --git a/lib/am/progs.am b/lib/am/progs.am index d7853a85..2c1cc281 100644 --- a/lib/am/progs.am +++ b/lib/am/progs.am @@ -17,7 +17,8 @@ ## 02111-1307, USA. _am_installdirs += $(DESTDIR)$(@NDIR@dir) -.PHONY install-exec-am: install-@DIR@PROGRAMS +?EXEC?.PHONY install-exec-am: install-@DIR@PROGRAMS +?!EXEC?.PHONY install-data-am: install-@DIR@PROGRAMS install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(@NDIR@dir) diff --git a/lib/am/python.am b/lib/am/python.am index 78365df0..b63e0a61 100644 --- a/lib/am/python.am +++ b/lib/am/python.am @@ -17,7 +17,8 @@ ## 02111-1307, USA. _am_installdirs += $(DESTDIR)$(@DIR@dir) -.PHONY install-exec-am: install-@DIR@PYTHON +?EXEC?.PHONY install-exec-am: install-@DIR@PYTHON +?!EXEC?.PHONY install-data-am: install-@DIR@PYTHON install-@DIR@PYTHON: $(@DIR@_PYTHON) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(@DIR@dir) diff --git a/lib/am/scripts.am b/lib/am/scripts.am index a746ce83..21218e46 100644 --- a/lib/am/scripts.am +++ b/lib/am/scripts.am @@ -17,7 +17,8 @@ ## 02111-1307, USA. _am_installdirs += $(DESTDIR)$(@NDIR@dir) -.PHONY install-exec-am: install-@DIR@SCRIPTS +?EXEC?.PHONY install-exec-am: install-@DIR@SCRIPTS +?!EXEC?.PHONY install-data-am: install-@DIR@SCRIPTS install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(@NDIR@dir) diff --git a/libs.am b/libs.am index 5de5cf54..8c682cd0 100644 --- a/libs.am +++ b/libs.am @@ -17,7 +17,8 @@ ## 02111-1307, USA. _am_installdirs += $(DESTDIR)$(@NDIR@dir) -.PHONY install-exec-am: install-@DIR@LIBRARIES +?EXEC?.PHONY install-exec-am: install-@DIR@LIBRARIES +?!EXEC?.PHONY install-data-am: install-@DIR@LIBRARIES install-@DIR@LIBRARIES: $(@DIR@_LIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(@NDIR@dir) diff --git a/ltlib.am b/ltlib.am index 2961f0b4..2de94b7f 100644 --- a/ltlib.am +++ b/ltlib.am @@ -18,7 +18,8 @@ ## 02111-1307, USA. _am_installdirs += $(DESTDIR)$(@NDIR@dir) -.PHONY install-exec-am: install-@DIR@LTLIBRARIES +?EXEC?.PHONY install-exec-am: install-@DIR@LTLIBRARIES +?!EXEC?.PHONY install-data-am: install-@DIR@LTLIBRARIES install-@DIR@LTLIBRARIES: $(@DIR@_LTLIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(@NDIR@dir) diff --git a/progs.am b/progs.am index d7853a85..2c1cc281 100644 --- a/progs.am +++ b/progs.am @@ -17,7 +17,8 @@ ## 02111-1307, USA. _am_installdirs += $(DESTDIR)$(@NDIR@dir) -.PHONY install-exec-am: install-@DIR@PROGRAMS +?EXEC?.PHONY install-exec-am: install-@DIR@PROGRAMS +?!EXEC?.PHONY install-data-am: install-@DIR@PROGRAMS install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(@NDIR@dir) diff --git a/python.am b/python.am index 78365df0..b63e0a61 100644 --- a/python.am +++ b/python.am @@ -17,7 +17,8 @@ ## 02111-1307, USA. _am_installdirs += $(DESTDIR)$(@DIR@dir) -.PHONY install-exec-am: install-@DIR@PYTHON +?EXEC?.PHONY install-exec-am: install-@DIR@PYTHON +?!EXEC?.PHONY install-data-am: install-@DIR@PYTHON install-@DIR@PYTHON: $(@DIR@_PYTHON) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(@DIR@dir) diff --git a/scripts.am b/scripts.am index a746ce83..21218e46 100644 --- a/scripts.am +++ b/scripts.am @@ -17,7 +17,8 @@ ## 02111-1307, USA. _am_installdirs += $(DESTDIR)$(@NDIR@dir) -.PHONY install-exec-am: install-@DIR@SCRIPTS +?EXEC?.PHONY install-exec-am: install-@DIR@SCRIPTS +?!EXEC?.PHONY install-data-am: install-@DIR@SCRIPTS install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(@NDIR@dir) diff --git a/tests/instdata2.test b/tests/instdata2.test index 8e1d69fc..569e6c13 100755 --- a/tests/instdata2.test +++ b/tests/instdata2.test @@ -5,7 +5,7 @@ . $srcdir/defs || exit 1 -cat >Makefile.am << \EOF +cat >Makefile.am << 'EOF' # User directories. inclexecdir = $(exec_prefix)/include inclexec_HEADERS = my-config.h @@ -13,21 +13,63 @@ inclexec_HEADERS = my-config.h incldatadir = $(prefix)/include incldata_HEADERS = my-data.h -# Standard directories. -bin_DATA = data -sbin_DATA = data -libexec_DATA = data +## Standard directories: _DATA +## Commented out are invalid combinations. +##bin_DATA = data +##sbin_DATA = data +##libexec_DATA = data +data_DATA = data sysconf_DATA = data localstate_DATA = data -lib_DATA = data -pkglib_DATA = data -sbin_DATA = data +##lib_DATA = data +##info_DATA = data +##man_DATA = data +##include_DATA = data +##oldinclude_DATA = data +pkgdata_DATA = data +##pkglib_DATA = data +##pkginclude_DATA = data + +## Standard directories: _SCRIPTS +## Commented out are invalid combinations. +bin_SCRIPTS = script +sbin_SCRIPTS = script +libexec_SCRIPTS = script +##data_SCRIPTS = script +##sysconf_SCRIPTS = script +##localstate_SCRIPTS = script +##lib_SCRIPTS = script +##info_SCRIPTS = script +##man_SCRIPTS = script +##include_SCRIPTS = script +##oldinclude_SCRIPTS = script +pkgdata_SCRIPTS = script +##pkglib_SCRIPTS = script +##pkginclude_SCRIPTS = script EOF set -e $AUTOMAKE -grep '^install-exec-am:.* install-inclexecHEADERS' Makefile.in -grep '^install-data-am:.* install-incldataHEADERS' Makefile.in -grep '^install-exec-am:.* install-sbinDATA' Makefile.in + +# install-SCRIPTS targets. +sed -n '/^install-data-am/,/^ /p' Makefile.in > produced + +cat > expected <<'EOF' +install-data-am: install-dataDATA install-incldataHEADERS \ + install-pkgdataDATA install-pkgdataSCRIPTS +EOF + +diff expected produced + + +# install-exec targets. +sed -n '/^install-exec-am/,/^ /p' Makefile.in > produced + +cat > expected <<'EOF' +install-exec-am: install-binSCRIPTS install-inclexecHEADERS \ + install-libexecSCRIPTS install-localstateDATA \ +EOF + +diff expected produced exit 0