[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] DESTDIR support (make install)

From: Arkadiusz Miskiewicz <misiek_at_pld.ORG.PL>
Date: 2002-04-14 13:34:57 CEST

This patch adds DESTDIR support for make install target. One problem still
exists - installing apache module via apxs: it doesn't support DESTDIR
and it doesn't work when /etc/httpd/httpd.conf/ is directory with config
files not file. First problem is easy to fix with some magic involved like:
INSTALL_MOD_SHARED_DIR = @APXS@ -q LIBEXECDIR
INSTALL_MOD_SHARED = $(MKDIR) $(DESTDIR)$(INSTALL_MOD_SHARED_DIR) ; @APXS@ -S LIBEXECDIR=$(DESTDIR)$(INSTALL_MOD_SHARED_DIR) -i -a
I don't see a way to fix the other problem but it's apache not svn problem anyway.

Here it goes:

 * build/gen_base.py: Add support for DESTDIR in make install target.

--- /home/users/misiek/.SVN-OTHER/subversion/build/gen_base.py Sun Apr 14 13:16:19 2002
+++ build/gen_base.py Sun Apr 14 13:09:34 2002
@@ -233,14 +233,14 @@
         # Construct a .libs directory within the Apache area and populate it
         # with the appropriate files. Also drop the .la file in the target dir.
         self.ofile.write('\ninstall-mods-static: %s\n'
- '\t$(MKDIR) %s\n'
+ '\t$(MKDIR) $(DESTDIR)%s\n'
                          % (string.join(la_tweaked + s_files),
                             os.path.join('$(APACHE_TARGET)', '.libs')))
         for file in la_tweaked:
           dirname, fname = os.path.split(file)
           base = os.path.splitext(fname)[0]
- self.ofile.write('\t$(INSTALL_MOD_STATIC) %s %s\n'
- '\t$(INSTALL_MOD_STATIC) %s %s\n'
+ self.ofile.write('\t$(INSTALL_MOD_STATIC) %s $(DESTDIR)%s\n'
+ '\t$(INSTALL_MOD_STATIC) %s $(DESTDIR)%s\n'
                            % (os.path.join(dirname, '.libs', base + '.a'),
                               os.path.join('$(APACHE_TARGET)',
                                            '.libs',
@@ -250,7 +250,7 @@
 
         # copy the other files to the target dir
         for file in s_files:
- self.ofile.write('\t$(INSTALL_MOD_STATIC) %s %s\n'
+ self.ofile.write('\t$(INSTALL_MOD_STATIC) %s $(DESTDIR)%s\n'
                            % (file, os.path.join('$(APACHE_TARGET)',
                                                  os.path.basename(file))))
         self.ofile.write('\n')
@@ -258,12 +258,12 @@
       elif area != 'test' and area != 'fs-test':
         area_var = string.replace(area, '-', '_')
         self.ofile.write('install-%s: %s\n'
- '\t$(MKDIR) $(%sdir)\n'
+ '\t$(MKDIR) $(DESTDIR)$(%sdir)\n'
                          % (area, string.join(files), area_var))
         for file in files:
           # cd to dirname before install to work around libtool 1.4.2 bug.
           dirname, fname = os.path.split(file)
- self.ofile.write('\tcd %s ; $(INSTALL_%s) %s %s\n'
+ self.ofile.write('\tcd %s ; $(INSTALL_%s) %s $(DESTDIR)%s\n'
                            % (dirname,
                               string.upper(area_var),
                               fname,
@@ -280,10 +280,10 @@
     errors = errors or i_errors
 
     self.ofile.write('install-include: %s\n'
- '\t$(MKDIR) $(includedir)\n'
+ '\t$(MKDIR) $(DESTDIR)$(includedir)\n'
                      % (string.join(self.includes),))
     for file in self.includes:
- self.ofile.write('\t$(INSTALL_INCLUDE) %s %s\n'
+ self.ofile.write('\t$(INSTALL_INCLUDE) %s $(DESTDIR)%s\n'
                        % (os.path.join('$(top_srcdir)', file),
                           os.path.join('$(includedir)',
                                        os.path.basename(file))))

-- 
Arkadiusz Mi¶kiewicz   IPv6 ready PLD Linux at http://www.pld.org.pl
misiek(at)pld.org.pl   AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PWr
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Apr 14 13:35:58 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.