Environment variables for make

Hi,

Apologized me if I post to the wrong place.

I am reading FDP primer and got stuck in at chapter 8.3. I wonder about the meaning or the purposes of each environment variables used in Makefile. They are

WEB_PREFIX
WEBDIR
WEBBASE
DESTDIR

I raise this up since I try to get rid of /data from the default DESTDIR, ${HOME}/public_html by

[cmd=""]% make WEBDIR= WEBBASE= all install[/cmd]

I still have /data under ~/public_html and all documents are scattered among many subdirectories.

Would you please explain me what the meaning or the pursoses of those environment variables in Makefile are ?

I run the above command as a normal user that belong to or a member of www group not as root.

Many thanks in advance indeed for your times.
 
wblock@ said:
Where are you seeing them? From the main web site, in section 8.4, I don't see the first three, and DESTDIR is a standard where-to-install variable.

First of all, many thanks indeed for your times.

I looked at www/share/mk/web.site.mk also from www/en/Makefile and www/en/Makefile.inc

Why one put all documents under /data since one has already specified DESTDIR for web server. That should be placed under ${DESTDIR} instead of ${DESTDIR}/data. That is quite funny.

All doc, www, and ports are checked out from local repository as suggested at the end of chapter 8.1.
 
jotawski said:
Why one put all documents under /data since one has already specified DESTDIR for web server. That should be placed under ${DESTDIR} instead of ${DESTDIR}/data. That is quite funny.

If DESTDIR is NOT set it will point to /. Do you really want those files ending up in /?
 
SirDice said:
If DESTDIR is NOT set it will point to /. Do you really want those files ending up in /?

I do not mean there is no setting of DESTDIR but I mean why those all documents have to go to ${DESTDIR}/data instead of ${DESTDIR}.

Many thanks indeed for your times.
 
I'd expect $DESTDIR to be the root of the web site, with files like index.html. But most data files would go in data. There's a doc-supfile in /usr/share/examples/cvsup. Get a copy with csup(8) and you'll be able to build it and experiment with the variables.
 
wblock@ said:
I'd expect $DESTDIR to be the root of the web site, with files like index.html. But most data files would go in data. There's a doc-supfile in /usr/share/examples/cvsup. Get a copy with csup(8) and you'll be able to build it and experiment with the variables.

Yes, I also misunderstood that ${DESTDIR} should be, as commonly know for apache users, DocumentRoot. And if it were so ${DESTDIR} should be pointed to /usr/local/www/apache22/data, but once I looked into www/share/mk/web.site.mk, I found that I myself totally misunderstood by the fact that /data was assigned to WEBBASE in www/en/Makefile.en. Moreover, WEBDIR confused me further with its' assignment to data in www/en/Makefile

Now what the role of ${DESTDIR} is for.

And if we simply do [cmd=""]make all install[/cmd] what we will get are that the whole documents will be placed to ${HOME}/public_html, DESTDIR is defined in www/share/mk/bsd.web.mk quietly.

So that brings me up about the purpose of those environment variables asked.

Once again, many thanks indeed for your times.
 
jotawski said:
I do not mean there is no setting of DESTDIR but I mean why those all documents have to go to ${DESTDIR}/data instead of ${DESTDIR}.
Because DESTDIR works the same for all ports, including this one.

For example, applications end up in ${DESTDIR}${PREFIX}/bin/. By default DESTDIR will be / and PREFIX /usr/local/.

So setting DESTDIR to /somewhere/else/ will make the executables end up in /somewhere/else/usr/local/bin/. With this port they'd end up in /somewhere/else/data/.
 
Back
Top