summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rwxr-xr-xautomake.in24
-rw-r--r--lib/am/libs.am3
-rw-r--r--lib/am/ltlib.am3
-rw-r--r--lib/am/progs.am3
-rw-r--r--lib/am/python.am3
-rw-r--r--lib/am/scripts.am3
-rw-r--r--libs.am3
-rw-r--r--ltlib.am3
-rw-r--r--progs.am3
-rw-r--r--python.am3
-rw-r--r--scripts.am3
-rwxr-xr-xtests/instdata2.test64
13 files changed, 104 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index ee5281dc1..f97c2c43e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2001-02-26 Akim Demaille <akim@epita.fr>
+ * 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 <akim@epita.fr>
+
* texinfos.am: No ?EXEC? hook as currently installing TEXINFOS is
necessarily in infodir.
diff --git a/automake.in b/automake.in
index d45941855..6297318f0 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 5de5cf549..8c682cd0d 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 2961f0b4c..2de94b7f2 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 d7853a859..2c1cc281e 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 78365df0f..b63e0a618 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 a746ce831..21218e468 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 5de5cf549..8c682cd0d 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 2961f0b4c..2de94b7f2 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 d7853a859..2c1cc281e 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 78365df0f..b63e0a618 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 a746ce831..21218e468 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 8e1d69fca..569e6c131 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