build: Handle all programs names transformations
Previously only prepending a prefix was handled when installing 'crontab'. Using the 'transform' Make macro allows the installation process to support generic transformations as defined by the '--program-suffix' and '--program-transform-name' configure options. * configure.ac: Don't substitue '@real_program_prefix@'. * Makefile.am (fpp): Remove. (transform_exe): New macro. [MULTI_USER] (install-exec-hook): Use it when installing 'crontab'.
This commit is contained in:
		
					parent
					
						
							
								22ba12d1aa
							
						
					
				
			
			
				commit
				
					
						dd9d6a6b06
					
				
			
		
					 2 changed files with 4 additions and 11 deletions
				
			
		|  | @ -172,12 +172,13 @@ EXTRA_DIST = \ | |||
| ## Installation.  ## | ||||
| ## -------------- ## | ||||
| 
 | ||||
| #full program prefix | ||||
| fpp = $(DESTDIR)$(bindir)/@real_program_prefix@ | ||||
| # Sed command for Transforming program names. | ||||
| transform_exe = s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/ | ||||
| 
 | ||||
| if MULTI_USER | ||||
| install-exec-hook: | ||||
| 	chmod u+s $(fpp)crontab$(EXEEXT) | ||||
| 	tcrontab=`echo crontab$(EXEEXT) | sed '$(transform_exe)'`; \ | ||||
| 	chmod u+s $(DESTDIR)$(bindir)/$${tcrontab} | ||||
| endif | ||||
| 
 | ||||
| ## --------------- ## | ||||
|  |  | |||
|  | @ -133,14 +133,6 @@ AC_ARG_WITH(tmp-dir, | |||
| AC_MSG_RESULT($CONFIG_TMP_DIR) | ||||
| AC_SUBST(CONFIG_TMP_DIR) | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|          | ||||
| # This is to support `make DESTDIR=...' | ||||
|                          | ||||
| real_program_prefix=`echo $program_prefix | sed s/NONE//` | ||||
| AC_SUBST(real_program_prefix) | ||||
| 
 | ||||
| AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in], | ||||
|   [chmod +x pre-inst-env]) | ||||
| AC_CONFIG_FILES([doc/config.texi | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Mathieu Lirzin
				Mathieu Lirzin