Closed astralchan closed 1 year ago
I'd like to have MANPREFIX
separated from MANDIR
, since in OpenBSD (and other systems), the MANPREFIX
is ${PREFIX}/man
(and not ${PREFIX}/share/man
). Having only MANDIR
would require the port maintainer or package maintainer to edit both the path and to remember to include the ${DESTDIR}
before it.
The ${...}
to $(...)
conversion is unnecessary. Both are mandated by POSIX (one is used in BSD makefiles and the other on GNU makefiles, I use the BSD style for habit).
Also, I prefer to not define ${CFLAGS}
and ${LDFLAGS}
, because a port maker or package maintainer may want to define other options to ${CC}
(for example, to specify another include directory or another name for the library), and passing those extra options on ${CFLAGS}
and ${LDFLAGS}
is the most common way. However, if the Makefile writer populates those variables, the package maintainer would have to resort to another method. If we were using GNU/BSD makefiles, we could use +=
to append the hardcoded values for those variables with the values specified by the package mantainer, but now that you are proposing full POSIX portability (and there is no +=
), appending is no more an option.
But, in the end, I don't know whether I want to achieve full POSIX portability... If xmenu
was to be fully portable, I'd have to edit not only its Makefile but also its code: It uses BSD/GNU extensions, such as the functions in the <err.h>
header. If we go full POSIX I'd have to implement my own err
-like functions...
I'd like to have
MANPREFIX
separated fromMANDIR
, since in OpenBSD (and other systems), theMANPREFIX
is${PREFIX}/man
(and not${PREFIX}/share/man
). Having onlyMANDIR
would require the port maintainer or package maintainer to edit both the path and to remember to include the${DESTDIR}
before it.The
${...}
to$(...)
conversion is unnecessary. Both are mandated by POSIX (one is used in BSD makefiles and the other on GNU makefiles, I use the BSD style for habit).Also, I prefer to not define
${CFLAGS}
and${LDFLAGS}
, because a port maker or package maintainer may want to define other options to${CC}
(for example, to specify another include directory or another name for the library), and passing those extra options on${CFLAGS}
and${LDFLAGS}
is the most common way. However, if the Makefile writer populates those variables, the package maintainer would have to resort to another method. If we were using GNU/BSD makefiles, we could use+=
to append the hardcoded values for those variables with the values specified by the package mantainer, but now that you are proposing full POSIX portability (and there is no+=
), appending is no more an option.But, in the end, I don't know whether I want to achieve full POSIX portability... If
xmenu
was to be fully portable, I'd have to edit not only its Makefile but also its code: It uses BSD/GNU extensions, such as the functions in the<err.h>
header. If we go full POSIX I'd have to implement my ownerr
-like functions...
Any objection to using pkg-config
?
Any objection to using
pkg-config
?
I do not want to use it, some BSD systems do not have it installed by default. And xmenu is already on the ports system of those BSDs, using pkg-config would require the ports maintainers to rewrite it.
Okay, when I get back home I'll update PR with ammended commit.
I figure if the idea is to make this portable, to write it POSIX compatible.
install
andPATH ?= value
are extensions of make(1p). You only have one.c
source file - no need to make a double suffix rule for object files. Tested with GNU Make and BSD Make.