Re: Port from Linux, Makefile not in top-level

From: Yasuhiro Kimura <yasu_at_utahime.org>
Date: Sat, 19 Jun 2021 01:46:02 +0900 (JST)
From: Xavier Humbert <xavier_at_groumpf.org>
Subject: Port from Linux, Makefile not in top-level
Date: Fri, 18 Jun 2021 18:19:45 +0200

> Hi, I'm porting rudder-agent to FreeBSD, but I have a problem since
> the
> main Makefile is not at the top level of the hierarchy, as shown below
> (excerpt)
> 
> rudder-sources-6.2.7/
> ├── rudder-agent
> │   ├── bin
> │   ├── etc
> │   ├── LICENSE
> │   ├── man
> │   ├── qa-test
> │   ├── README.md
> │   └── share
> ├── rudder-packages
> │   └── rudder-agent
> │       └── SOURCES
> │           ├── Makefile
> │           └── Makefile.orig
> └── NO Makefile AT THIS LEVEL
> 
> The solution, at first glance seems to be simple : set
> WRKSRC_SUBDIR=rudder-packages/${PORTNAME}/SOURCES
>     (ie
> work/rudder-sources-6.2.7/rudder-packages/rudder-agent/SOURCES)
> 
> In fact, ${WRKSRC_SUBDIR}/Makefile takes care of the first-level
> "rudder-agent", and files are correctly installed in the "stage"
> directory,
> but a huge problem arises :
> "make makepatch" and "make patch" ignore this first-level directory,
> and I
> have files to patch here
> 
> What would be the solution ? If I leave alone WRKSRC_SUBDIR using a
> "do-build"
> target in my Makefile :
> │ do-build:
> │    cd ${WRKSRC}/rudder-packages/rudder-agent/SOURCES && \
> │      ${SETENV} ${MAKE_ENV} ${MAKE_CMD} install)
> Nothing works, and make all complains about a top-level Makefile
> missing
> 
> TIA, hope I've been clear enough, feel free to ask more
> 
> Regards

Setting BUILD_WRKSRC and INSTALL_WRKSRC may help you. See comments of
Mk/bsd.port.mk for detail.

---
Yasuhiro Kimura
Received on Fri Jun 18 2021 - 16:46:02 UTC

Original text of this message