Re: Makefile --srcdir option

Heime <[email protected]>
Newsgroups gmane.emacs.help
Message-ID <d49iiKHl1bp_RXNQ4l7qjLrkAGlemrCikAoIgOUKGI0uRdeA1THBcp27xTbGYkVbgNEeYNnA7i83mlYJe8L5dKCO9ohhkKnsrSmbD_3MGLo=@protonmail.com>
On Monday, April 27th, 2026 at 7:19 AM, [email protected] <[email protected]> wrote:

> Heime <[email protected]> writes:
> 
> > How can I make a --srcdir user option for a makefile that builds
> > a package documentation.  And what would customarily be the default
> > source directory: a . or a fullpath?
> >
> 
> 1. You can specify it in the makefile:
> 
>     srcdir = /path/to/my/source/files/

Yes.  But would you suggest to use srcdir = . and run the makefile 
at that location.  If I use /path/to/my/source/files/ this will 
have to change when users copy their files to their preferred 
location.
 
>     (info "(make) Using Variables")
> 
> 2. You can specify it to ‘make’:
> 
>      $ make srcdir=/path/to/my/source/files/

Would the user supplied srcdir to the `make' command override the 
srcdir = /path/to/my/source/files/ in the makefile?  Or would I 
need to perform some argument checks in the makefile itself?
 
> 3. There are other means (for example, by referencing an
> environment variable), which you can ask the ‘make’ users
> mailing list:
> 
>    https://lists.gnu.org/mailman/listinfo/help-make
> 
>    [email protected]

I will check this as well.
 
> --
> The lyf so short, the craft so long to lerne.
> - Geoffrey Chaucer, The Parliament of Birds.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.