[csw-maintainers] gar.lib.mk default for PATCHDIR

Dagobert Michelsen dam at opencsw.org
Wed Mar 21 13:46:50 CET 2012


Hi Andrey,

Am 21.03.2012 um 04:01 schrieb Бондаренко Андрей Витальевич:
> File gar.lib.mk as of revision 17456 has following definition for PATCHDIR
>  
> PATCHDIR ?= $(WORKDIR)/$(DISTNAME)
>  
> Is it ok? I see “gpatch: **** Can't change to directory” error messages if WORKSRC is changed from default. May be it should be:
>  
> PATCHDIR ?= $(WORKSRC)

No, it is intended this way. The rationale goes like this:

- Upstream packages stuff which is unpacked to $(WORKDIR) in the directory $(DISTNAME)
- The stuff to build is in $(WORKSRC) which defaults to $(WORKDIR)/$(DISTNAME), but may
  be a subdirectory like $(WORKDIR)/$(DISTNAME)/unix
- If you work on patches you will most certainly do so for the whole package in
  $(PATCHDIR), even if you have modified $(WORKSRC)

This also means that you need to adjust $(DISTNAME) even if you have adjusted
$(WORKSRC).

Additionally, it is recommended to also use $(DISTNAME) in $(DISTFILES).
Also $(WORKDIR)/$(DISTNAME) is used to find the file $(LICENSE).


Best regards

  -- Dago



More information about the maintainers mailing list