Bug 35678

Summary: docproj Makefiles for web are broken for paths with spaces
Product: Documentation Reporter: Robert Watson <rwatson>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Robert Watson freebsd_committer freebsd_triage 2002-03-08 16:10:01 UTC
When building a web page using sgml, if any segment of the file system path
for the working directory contains a space or other irregular character,
things get broken.

How-To-Repeat: 
  sproing:~/Operating Systems/FreeBSD/commit/www/en/smp> make
  /usr/bin/sed -e 's/<!ENTITY date[ \t]*"$Free[B]SD. .* \(.* .*\) .* .* $">/<!ENTITY date "Last modified: \1">/'  index.sgml |  /usr/bin/env SGML_CATALOG_FILES=  /usr/local/bin/sgmlnorm -d  -c /usr/local/share/sgml/html/catalog -D /home/rwatson/Operating Systems/FreeBSD/commit/www/en/smp > index.html ||  (/bin/rm -f index.html && false)
  /usr/local/bin/sgmlnorm:E: cannot find "Systems/FreeBSD/commit/www/en/smp"; tried "Systems/FreeBSD/commit/www/en/smp", "/home/rwatson/Operating/Systems/FreeBSD/commit/www/en/smp"
  *** Error code 1

  Stop in /home/rwatson/Operating Systems/FreeBSD/commit/www/en/smp.

Note that it used "Systems/FreeBSD...." indicating that a command line
broke the path into two seperate strings.
Comment 1 Peter Pentchev 2002-03-11 11:43:21 UTC
On Fri, Mar 08, 2002 at 11:07:48AM -0500, Robert Watson wrote:
> 
> >Number:         35678
> >Category:       docs
> >Synopsis:       docproj Makefiles for web are broken for paths with spaces
> >Originator:     Robert Watson
> >Environment:
> System: FreeBSD sproing.gw.tislabs.com 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Tue Jan 15 11:18:08 EST 2002     rwatson@sproing.gw.tislabs.com:/usr/obj/usr/src/sys/SPROING  i386
> 
> docproj-1.9         The "meta-port" for the FreeBSD Documentation Project
> 
> >Description:
> 
> When building a web page using sgml, if any segment of the file system path
> for the working directory contains a space or other irregular character,
> things get broken.

This is not really specific to docproj, though, is it?  I would think
that this happens in any Makefile that refers to either the current
directory or some working directory or some file by an absolute path.
This stems directly from make(1)'s use of sh(1) to execute commands;
I do not think it can be easily fixed :(

Just as an example..

[roam@straylight:v0 /Op Sys/FreeBSD/src/bin/mkdir]$ make cleandir
cd: can't cd to /Op
*** Error code 2

Stop in /Op Sys/FreeBSD/src/bin/mkdir.
[roam@straylight:v0 /Op Sys/FreeBSD/src/bin/mkdir]$ make -dl cleandir
cd /Op Sys/FreeBSD/src/bin/mkdir && make clean cleandepend
cd: can't cd to /Op
*** Error code 2

Stop in /Op Sys/FreeBSD/src/bin/mkdir.
[roam@straylight:v0 /Op Sys/FreeBSD/src/bin/mkdir]$

..so it affects the source tree as well.

G'luck,
Peter

-- 
Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
What would this sentence be like if pi were 3?
Comment 2 Tom Rhodes freebsd_committer freebsd_triage 2003-01-27 05:28:29 UTC
State Changed
From-To: open->closed

This is not a problem specific to the doc project.  In fact I don't think 
this is a bug at all, its a conflict of using make(1) with absolute paths.
Comment 3 Tom Rhodes freebsd_committer freebsd_triage 2003-01-30 23:24:38 UTC
State Changed
From-To: closed->suspended

Reopen.
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2012-05-07 04:49:52 UTC
State Changed
From-To: suspended->closed

Not A Bug