Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a29c04a

Browse files
committed
Allow installation into directories containing spaces in the name.
1 parent 3a20db9 commit a29c04a

File tree

49 files changed

+258
-249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+258
-249
lines changed

config/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# $PostgreSQL: pgsql/config/Makefile,v 1.1 2004/07/30 12:26:39 petere Exp $
1+
# $PostgreSQL: pgsql/config/Makefile,v 1.2 2005/12/09 21:19:34 petere Exp $
22

33
subdir = config
44
top_builddir = ..
55
include $(top_builddir)/src/Makefile.global
66

77

88
install: all installdirs
9-
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(pgxsdir)/config/install-sh
10-
$(INSTALL_SCRIPT) $(srcdir)/mkinstalldirs $(DESTDIR)$(pgxsdir)/config/mkinstalldirs
9+
$(INSTALL_SCRIPT) $(srcdir)/install-sh '$(DESTDIR)$(pgxsdir)/config/install-sh'
10+
$(INSTALL_SCRIPT) $(srcdir)/mkinstalldirs '$(DESTDIR)$(pgxsdir)/config/mkinstalldirs'
1111

1212
installdirs:
13-
$(mkinstalldirs) $(DESTDIR)$(pgxsdir)/config
13+
$(mkinstalldirs) '$(DESTDIR)$(pgxsdir)/config'
1414

1515
uninstall:
16-
rm -f $(DESTDIR)$(pgxsdir)/config/install-sh $(DESTDIR)$(pgxsdir)/config/mkinstalldirs
16+
rm -f '$(DESTDIR)$(pgxsdir)/config/install-sh' '$(DESTDIR)$(pgxsdir)/config/mkinstalldirs'

contrib/mSQL-interface/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# $PostgreSQL: pgsql/contrib/mSQL-interface/Makefile,v 1.10 2005/09/27 17:13:05 tgl Exp $
2+
# $PostgreSQL: pgsql/contrib/mSQL-interface/Makefile,v 1.11 2005/12/09 21:19:34 petere Exp $
33
#
44

55
NAME = mpgsql
@@ -22,13 +22,13 @@ endif
2222
all: all-lib
2323

2424
install: all installdirs install-lib
25-
$(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
25+
$(INSTALL_DATA) $(srcdir)/README.$(NAME) '$(DESTDIR)$(docdir)/contrib'
2626

2727
installdirs:
28-
$(mkinstalldirs) $(libdir) $(docdir)/contrib
28+
$(mkinstalldirs) $(libdir) '$(DESTDIR)$(docdir)/contrib'
2929

3030
uninstall: uninstall-lib
31-
rm -f $(docdir)/contrib/README.$(NAME)
31+
rm -f '$(DESTDIR)$(docdir)/contrib/README.$(NAME)'
3232

3333
clean distclean maintainer-clean: clean-lib
3434
rm -f $(OBJS)

doc/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $PostgreSQL: pgsql/doc/Makefile,v 1.27 2003/11/29 19:51:36 pgsql Exp $
7+
# $PostgreSQL: pgsql/doc/Makefile,v 1.28 2005/12/09 21:19:34 petere Exp $
88
#
99
#----------------------------------------------------------------------------
1010

@@ -83,10 +83,10 @@ endif
8383

8484
installdirs:
8585
ifdef found_html
86-
$(mkinstalldirs) $(DESTDIR)$(docdir)/html
86+
$(mkinstalldirs) '$(DESTDIR)$(docdir)'/html
8787
endif
8888
ifdef found_man
89-
$(mkinstalldirs) $(addprefix $(DESTDIR)$(mandir)/man, 1 $(sqlmansectnum))
89+
$(mkinstalldirs) $(addprefix '$(DESTDIR)$(mandir)'/man, 1 $(sqlmansectnum))
9090
endif
9191

9292

src/Makefile

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $PostgreSQL: pgsql/src/Makefile,v 1.37 2005/11/28 12:03:56 alvherre Exp $
7+
# $PostgreSQL: pgsql/src/Makefile,v 1.38 2005/12/09 21:19:34 petere Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -29,20 +29,20 @@ all install installdirs uninstall dep depend distprep:
2929
install: install-local
3030

3131
install-local: installdirs-local
32-
$(INSTALL_DATA) Makefile.global $(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.global
33-
$(INSTALL_DATA) Makefile.port $(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.port
34-
$(INSTALL_DATA) $(srcdir)/Makefile.shlib $(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.shlib
35-
$(INSTALL_DATA) $(srcdir)/nls-global.mk $(DESTDIR)$(pgxsdir)/$(subdir)/nls-global.mk
32+
$(INSTALL_DATA) Makefile.global '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.global'
33+
$(INSTALL_DATA) Makefile.port '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.port'
34+
$(INSTALL_DATA) $(srcdir)/Makefile.shlib '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.shlib'
35+
$(INSTALL_DATA) $(srcdir)/nls-global.mk '$(DESTDIR)$(pgxsdir)/$(subdir)/nls-global.mk'
3636

3737
installdirs: installdirs-local
3838

3939
installdirs-local:
40-
$(mkinstalldirs) $(DESTDIR)$(pgxsdir)/$(subdir)
40+
$(mkinstalldirs) '$(DESTDIR)$(pgxsdir)/$(subdir)'
4141

4242
uninstall: uninstall-local
4343

4444
uninstall-local:
45-
rm -f $(addprefix $(DESTDIR)$(pgxsdir)/$(subdir), Makefile.global Makefile.port Makefile.shlib nls-global.mk)
45+
rm -f $(addprefix '$(DESTDIR)$(pgxsdir)/$(subdir)'/, Makefile.global Makefile.port Makefile.shlib nls-global.mk)
4646

4747
clean:
4848
$(MAKE) -C port $@

src/Makefile.shlib

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copyright (c) 1998, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.99 2005/12/03 20:16:31 tgl Exp $
9+
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.100 2005/12/09 21:19:34 petere Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -162,7 +162,7 @@ ifeq ($(PORTNAME), hpux)
162162
# can't use the CC-syntax rpath pattern here
163163
rpath =
164164
ifeq ($(enable_rpath), yes)
165-
LINK.shared = $(LD) +h $(soname) -b +b $(rpathdir)
165+
LINK.shared = $(LD) +h $(soname) -b +b '$(rpathdir)'
166166
else
167167
LINK.shared = $(LD) +h $(soname) -b
168168
endif
@@ -366,24 +366,24 @@ endif # enable_shared
366366
install-lib: install-lib-static install-lib-shared
367367

368368
install-lib-static: lib$(NAME).a
369-
$(INSTALL_STLIB) $< $(DESTDIR)$(libdir)/lib$(NAME).a
369+
$(INSTALL_STLIB) $< '$(DESTDIR)$(libdir)/lib$(NAME).a'
370370
ifeq ($(PORTNAME), darwin)
371-
cd $(DESTDIR)$(libdir) && \
371+
cd '$(DESTDIR)$(libdir)' && \
372372
ranlib lib$(NAME).a
373373
endif
374374

375375
ifeq ($(enable_shared), yes)
376376
install-lib-shared: $(shlib)
377-
$(INSTALL_SHLIB) $< $(DESTDIR)$(libdir)/$(shlib)
377+
$(INSTALL_SHLIB) $< '$(DESTDIR)$(libdir)/$(shlib)'
378378
ifneq ($(PORTNAME), cygwin)
379379
ifneq ($(PORTNAME), win32)
380380
ifneq ($(shlib), $(shlib_major))
381-
cd $(DESTDIR)$(libdir) && \
381+
cd '$(DESTDIR)$(libdir)' && \
382382
rm -f $(shlib_major) && \
383383
$(LN_S) $(shlib) $(shlib_major)
384384
endif
385385
ifneq ($(shlib), $(shlib_bare))
386-
cd $(DESTDIR)$(libdir) && \
386+
cd '$(DESTDIR)$(libdir)' && \
387387
rm -f $(shlib_bare) && \
388388
$(LN_S) $(shlib) $(shlib_bare)
389389
endif
@@ -398,11 +398,11 @@ endif # enable_shared
398398

399399
.PHONY: uninstall-lib
400400
uninstall-lib:
401-
rm -f $(DESTDIR)$(libdir)/lib$(NAME).a
401+
rm -f '$(DESTDIR)$(libdir)/lib$(NAME).a'
402402
ifeq ($(enable_shared), yes)
403-
rm -f $(DESTDIR)$(libdir)/$(shlib_bare) \
404-
$(DESTDIR)$(libdir)/$(shlib_major) \
405-
$(DESTDIR)$(libdir)/$(shlib)
403+
rm -f '$(DESTDIR)$(libdir)/$(shlib_bare)' \
404+
'$(DESTDIR)$(libdir)/$(shlib_major)' \
405+
'$(DESTDIR)$(libdir)/$(shlib)'
406406
endif # enable_shared
407407

408408

src/backend/Makefile

+24-24
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $PostgreSQL: pgsql/src/backend/Makefile,v 1.112 2005/11/28 22:43:30 tgl Exp $
7+
# $PostgreSQL: pgsql/src/backend/Makefile,v 1.113 2005/12/09 21:19:34 petere Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -159,73 +159,73 @@ distprep:
159159
install: all installdirs install-bin
160160
ifeq ($(PORTNAME), cygwin)
161161
ifeq ($(MAKE_DLL), true)
162-
$(INSTALL_DATA) libpostgres.a $(DESTDIR)$(libdir)/libpostgres.a
162+
$(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
163163
endif
164164
endif
165165
ifeq ($(PORTNAME), win32)
166166
ifeq ($(MAKE_DLL), true)
167-
$(INSTALL_DATA) libpostgres.a $(DESTDIR)$(libdir)/libpostgres.a
167+
$(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
168168
endif
169169
endif
170170
$(MAKE) -C catalog install-data
171-
$(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample $(DESTDIR)$(datadir)/pg_hba.conf.sample
172-
$(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample $(DESTDIR)$(datadir)/pg_ident.conf.sample
173-
$(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample $(DESTDIR)$(datadir)/postgresql.conf.sample
174-
$(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample $(DESTDIR)$(datadir)/recovery.conf.sample
171+
$(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample'
172+
$(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample'
173+
$(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample'
174+
$(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample'
175175

176176
install-bin: postgres $(POSTGRES_IMP) installdirs
177-
$(INSTALL_PROGRAM) postgres$(X) $(DESTDIR)$(bindir)/postgres$(X)
177+
$(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)'
178178
ifneq ($(PORTNAME), win32)
179-
@rm -f $(DESTDIR)$(bindir)/postmaster$(X)
180-
ln -s postgres$(X) $(DESTDIR)$(bindir)/postmaster$(X)
179+
@rm -f '$(DESTDIR)$(bindir)/postmaster$(X)'
180+
ln -s postgres$(X) '$(DESTDIR)$(bindir)/postmaster$(X)'
181181
else
182-
$(INSTALL_PROGRAM) postgres$(X) $(DESTDIR)$(bindir)/postmaster$(X)
182+
$(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postmaster$(X)'
183183
endif
184184
ifeq ($(MAKE_EXPORTS), true)
185-
$(INSTALL_DATA) $(POSTGRES_IMP) $(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)
185+
$(INSTALL_DATA) $(POSTGRES_IMP) '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)'
186186
endif
187187

188188
.PHONY: install-bin
189189

190190
installdirs:
191-
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)
191+
$(mkinstalldirs) '$(DESTDIR)$(bindir)' '$(DESTDIR)$(datadir)'
192192
ifeq ($(PORTNAME), cygwin)
193193
ifeq ($(MAKE_DLL), true)
194-
$(mkinstalldirs) $(DESTDIR)$(libdir)
194+
$(mkinstalldirs) '$(DESTDIR)$(libdir)'
195195
endif
196196
endif
197197
ifeq ($(PORTNAME), win32)
198198
ifeq ($(MAKE_DLL), true)
199-
$(mkinstalldirs) $(DESTDIR)$(libdir)
199+
$(mkinstalldirs) '$(DESTDIR)$(libdir)'
200200
endif
201201
endif
202202
ifeq ($(MAKE_EXPORTS), true)
203-
$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
203+
$(mkinstalldirs) '$(DESTDIR)$(pkglibdir)'
204204
endif
205205

206206

207207
##########################################################################
208208

209209
uninstall:
210-
rm -f $(DESTDIR)$(bindir)/postgres$(X) $(DESTDIR)$(bindir)/postmaster
210+
rm -f '$(DESTDIR)$(bindir)/postgres$(X)' '$(DESTDIR)$(bindir)/postmaster'
211211
ifeq ($(MAKE_EXPORTS), true)
212-
rm -f $(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)
212+
rm -f '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)'
213213
endif
214214
ifeq ($(PORTNAME), cygwin)
215215
ifeq ($(MAKE_DLL), true)
216-
rm -f $(DESTDIR)$(libdir)/libpostgres.a
216+
rm -f '$(DESTDIR)$(libdir)/libpostgres.a'
217217
endif
218218
endif
219219
ifeq ($(PORTNAME), win32)
220220
ifeq ($(MAKE_DLL), true)
221-
rm -f $(DESTDIR)$(libdir)/libpostgres.a
221+
rm -f '$(DESTDIR)$(libdir)/libpostgres.a'
222222
endif
223223
endif
224224
$(MAKE) -C catalog uninstall-data
225-
rm -f $(DESTDIR)$(datadir)/pg_hba.conf.sample \
226-
$(DESTDIR)$(datadir)/pg_service.conf.sample \
227-
$(DESTDIR)$(datadir)/pg_ident.conf.sample \
228-
$(DESTDIR)$(datadir)/postgresql.conf.sample
225+
rm -f '$(DESTDIR)$(datadir)/pg_hba.conf.sample' \
226+
'$(DESTDIR)$(datadir)/pg_ident.conf.sample' \
227+
'$(DESTDIR)$(datadir)/postgresql.conf.sample' \
228+
'$(DESTDIR)$(datadir)/recovery.conf.sample'
229229

230230

231231
##########################################################################

src/backend/catalog/Makefile

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Makefile for backend/catalog
44
#
5-
# $PostgreSQL: pgsql/src/backend/catalog/Makefile,v 1.57 2005/09/08 20:07:41 tgl Exp $
5+
# $PostgreSQL: pgsql/src/backend/catalog/Makefile,v 1.58 2005/12/09 21:19:35 petere Exp $
66
#
77
#-------------------------------------------------------------------------
88

@@ -49,18 +49,18 @@ postgres.bki: genbki.sh $(POSTGRES_BKI_SRCS) \
4949

5050
.PHONY: install-data
5151
install-data: $(BKIFILES) installdirs
52-
$(INSTALL_DATA) postgres.bki $(DESTDIR)$(datadir)/postgres.bki
53-
$(INSTALL_DATA) postgres.description $(DESTDIR)$(datadir)/postgres.description
54-
$(INSTALL_DATA) $(srcdir)/system_views.sql $(DESTDIR)$(datadir)/system_views.sql
55-
$(INSTALL_DATA) $(srcdir)/information_schema.sql $(DESTDIR)$(datadir)/information_schema.sql
56-
$(INSTALL_DATA) $(srcdir)/sql_features.txt $(DESTDIR)$(datadir)/sql_features.txt
52+
$(INSTALL_DATA) postgres.bki '$(DESTDIR)$(datadir)/postgres.bki'
53+
$(INSTALL_DATA) postgres.description '$(DESTDIR)$(datadir)/postgres.description'
54+
$(INSTALL_DATA) $(srcdir)/system_views.sql '$(DESTDIR)$(datadir)/system_views.sql'
55+
$(INSTALL_DATA) $(srcdir)/information_schema.sql '$(DESTDIR)$(datadir)/information_schema.sql'
56+
$(INSTALL_DATA) $(srcdir)/sql_features.txt '$(DESTDIR)$(datadir)/sql_features.txt'
5757

5858
installdirs:
59-
$(mkinstalldirs) $(DESTDIR)$(datadir)
59+
$(mkinstalldirs) '$(DESTDIR)$(datadir)'
6060

6161
.PHONY: uninstall-data
6262
uninstall-data:
63-
rm -f $(addprefix $(DESTDIR)$(datadir)/, $(BKIFILES) system_views.sql information_schema.sql sql_features.txt)
63+
rm -f $(addprefix '$(DESTDIR)$(datadir)'/, $(BKIFILES) system_views.sql information_schema.sql sql_features.txt)
6464

6565
clean:
6666
rm -f SUBSYS.o $(OBJS) $(BKIFILES)

src/backend/utils/mb/conversion_procs/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for utils/mb/conversion_procs
55
#
66
# IDENTIFICATION
7-
# $PostgreSQL: pgsql/src/backend/utils/mb/conversion_procs/Makefile,v 1.14 2005/05/03 19:17:59 tgl Exp $
7+
# $PostgreSQL: pgsql/src/backend/utils/mb/conversion_procs/Makefile,v 1.15 2005/12/09 21:19:35 petere Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -184,14 +184,14 @@ $(REGRESSION_SCRIPT): Makefile
184184
cat regress_epilogue >> $@;
185185

186186
install: $(SQLSCRIPT) installdirs
187-
$(INSTALL_DATA) $(SQLSCRIPT) $(DESTDIR)$(datadir)
187+
$(INSTALL_DATA) $(SQLSCRIPT) '$(DESTDIR)$(datadir)'
188188
@for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit; done
189189

190190
installdirs:
191-
$(mkinstalldirs) $(DESTDIR)$(datadir) $(DESTDIR)$(pkglibdir)
191+
$(mkinstalldirs) '$(DESTDIR)$(datadir)' '$(DESTDIR)$(pkglibdir)'
192192

193193
uninstall:
194-
rm -f $(DESTDIR)$(datadir)/$(SQLSCRIPT)
194+
rm -f '$(DESTDIR)$(datadir)/$(SQLSCRIPT)'
195195
@for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit; done
196196

197197
clean distclean maintainer-clean:

src/backend/utils/mb/conversion_procs/proc.mk

+6-3
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@ all: all-shared-lib
1111

1212
include $(top_srcdir)/src/Makefile.shlib
1313

14-
install: all
14+
install: all installdirs
1515
ifeq ($(enable_shared), yes)
16-
$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)
16+
$(INSTALL_SHLIB) $(shlib) '$(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)'
1717
endif
1818

19+
installdirs:
20+
$(mkinstalldirs) '$(DESTDIR)$(pkglibdir)'
21+
1922
uninstall:
20-
rm -f $(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)
23+
rm -f '$(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)'
2124

2225
clean distclean maintainer-clean: clean-lib
2326
rm -f $(OBJS)

src/bin/initdb/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.49 2005/03/25 18:17:12 momjian Exp $
8+
# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.50 2005/12/09 21:19:35 petere Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -24,13 +24,13 @@ initdb: $(OBJS) $(libpq_builddir)/libpq.a
2424
$(CC) $(CFLAGS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LIBS) -o $@$(X)
2525

2626
install: all installdirs
27-
$(INSTALL_PROGRAM) initdb$(X) $(DESTDIR)$(bindir)/initdb$(X)
27+
$(INSTALL_PROGRAM) initdb$(X) '$(DESTDIR)$(bindir)/initdb$(X)'
2828

2929
installdirs:
30-
$(mkinstalldirs) $(DESTDIR)$(bindir)
30+
$(mkinstalldirs) '$(DESTDIR)$(bindir)'
3131

3232
uninstall:
33-
rm -f $(DESTDIR)$(bindir)/initdb$(X)
33+
rm -f '$(DESTDIR)$(bindir)/initdb$(X)'
3434

3535
clean distclean maintainer-clean:
3636
rm -f initdb$(X) $(OBJS)

0 commit comments

Comments
 (0)