From: Aleksey Cheusov <vle@gmx.net>
To: ALT Linux Sisyphus discussions <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] mk-configure -- lightweight replacement for GNU autotools
Date: Sun, 12 Jul 2009 18:15:15 +0300
Message-ID: <s937hyeszjw.fsf@chen.chizhovka.net> (raw)
In-Reply-To: <4A59F895.10003@altlinux.ru> (Alexey Gladkov's message of "Sun, 12 Jul 2009 18:52:05 +0400")
>>> Вопрос: зачем ?
>> Об этом достаточно подробно написано по ссылкам.
> Читал. Многое спорно, но спорить не буду.
Все на свете субъективно. Критика autobloat естественно тоже.
>> Гораздо более простую и легкую в использовании систему.
> Run bmake for configuring and building your project and pass to it
> building parameters, e.g.
> env CC=pcc CFLAGS='-O0 -g' PREFIX=/home/you/software-dir \
> bmake all install
> Перспектива указания всех опций руками через окружение представляется
> мне сомнительным удовольствием.
Разверни "всех опций руками". Каким конкретно опций?
> Переменные окружения это конечно хорошо, но считать это альтернативой
> механизму указания опций сборки, мне кажется, нельзя.
Как раз наоборот.
bmake PREFIX=/usr/pkg MANDIR=/some/where/man
по сути своей ничем не отличется от
./configure --prefix=/usr/pkg --mandir=/some/where/man
Не вижу необходимости плодить сущности без необходимости.
Опции не нужны. На самом деле хватает указания значений переменных
make-а.
Опции же типа ./configure --lalala-includedir=yyy --lalala-libdir=yyy
я считаю, эм... скажем так, весьма сомнительным дизайнерским решением.
> Я не имею ввиду опции компилятора, я имею ввиду опциональность
> поддержки библиотек и фичей проекта.
Опциальность внешних библиотек и фич проекта делает также через указания
значений переменных make-а.
bmake USE_EXTERNAL_LIBX=1 USE_LOCALLIBY=1
Не вижу никаких принципиальных отличий от опций ./configure.
Построение же приложения с или без каких-то библиотек в зависимости от
их наличия -- натуральное зло, об этом знает каждый пакетировщик.
> You need not remember about configure script, their options and many
> other things.
> В случае configure, присутствует уровень абстракции ключей,
> определяющих ту или иную особенность сборки, от конечных -DFOO=1 и -lbar.
На мой взгляд этот уровень не нужен, как не нужен сам ./configure.
> Как в mk-configure можно описать ситуацию, когда проект в зависимости
> от пользовательского параметра собирается либо с внешней библиотекой,
> либо с внутренней версией этой библиотеки ?
Пример1 Makefile:
...
.if USE_FEATURE_X
CFLAGS+= -DUSE_FEATURE_X
LDFLAGS+= -lX
.endif
...
Полный пример Makefile (смотри строки, помеченные `!'):
PROG= hello_world
SRCS= main.c
MAN= hello_world.1
INFILES= hello_world.1
INSCRIPTS= hello_world2
INTEXTS_SED+= -e 's,@HELLO_VERSION@,${VERSION},'
SCRIPTS= ${INSCRIPTS}
! .if USE_LIBHELLO1
! .include "../libhello1/linkme.mk"
! DPLIBS+= -lhello1
! CFLAGS+= -DUSE_LIBHELLO1
! .endif
.include "../libhello2/linkme.mk"
DPLIBS+= -lhello2
.include "../Makefile.version"
.include <mkc.intexts.mk>
.include <mkc.prog.mk>
--
Best regards, Aleksey Cheusov.
next prev parent reply other threads:[~2009-07-12 15:15 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-12 5:53 Aleksey Cheusov
2009-07-12 9:18 ` Gleb Kulikov
2009-07-12 14:44 ` Aleksey Cheusov
2009-07-12 17:18 ` Gleb Kulikov
2009-07-12 17:37 ` Aleksey Cheusov
2009-07-16 10:52 ` Gleb Kulikov
2009-07-12 22:13 ` Mikhail Yakshin
2009-07-13 19:56 ` Aleksey Cheusov
2009-07-13 21:02 ` Led
2009-07-13 21:18 ` Aleksey Cheusov
2009-07-14 1:49 ` [sisyphus] [JT] " Pavel N. Solovyov
2009-07-14 5:22 ` Afanasov Dmitry
2009-07-14 6:21 ` Aleksey Cheusov
2009-07-14 23:13 ` [sisyphus] " Mikhail Yakshin
2009-07-15 19:23 ` Aleksey Cheusov
2009-07-15 19:41 ` Vitaly Kuznetsov
2009-07-15 19:53 ` Aleksey Cheusov
2009-07-12 12:03 ` Alexey I. Froloff
2009-07-12 12:07 ` Alexey Gladkov
2009-07-12 13:48 ` Aleksey Cheusov
2009-07-12 14:52 ` Alexey Gladkov
2009-07-12 15:15 ` Aleksey Cheusov [this message]
2009-07-12 18:57 ` Денис Смирнов
2009-07-12 20:02 ` Aleksey Cheusov
2009-07-12 20:31 ` Alexey I. Froloff
2009-07-12 20:41 ` Aleksey Cheusov
2009-07-12 20:49 ` Alexey I. Froloff
2009-07-12 21:00 ` Aleksey Cheusov
2009-07-12 21:03 ` Aleksey Cheusov
2009-07-12 22:17 ` Alexey I. Froloff
2009-07-13 20:03 ` Aleksey Cheusov
2009-07-13 20:54 ` Alexey I. Froloff
2009-07-13 21:06 ` Aleksey Cheusov
2009-07-13 21:12 ` Alexey I. Froloff
2009-07-13 21:23 ` Aleksey Cheusov
2009-07-13 21:43 ` Alexey I. Froloff
2009-07-12 21:27 ` Alexey Rusakov
2009-07-12 21:36 ` Alexey I. Froloff
2009-07-12 22:29 ` Aleksey Cheusov
2009-07-12 23:04 ` Alexey I. Froloff
2009-07-13 5:26 ` Alexey Rusakov
2009-07-13 6:05 ` Денис Смирнов
2009-07-13 8:26 ` Afanasov Dmitry
2009-07-13 17:54 ` Денис Смирнов
2009-07-13 20:20 ` Aleksey Cheusov
2009-07-13 20:52 ` Alexey I. Froloff
2009-07-13 21:06 ` Aleksey Cheusov
2009-07-13 21:39 ` Alexey I. Froloff
2009-07-13 19:43 ` [sisyphus] mk-configure: args vs options Dmitry V. Levin
2009-07-13 20:28 ` Aleksey Cheusov
2009-07-13 20:40 ` Dmitry V. Levin
2009-07-12 16:06 ` [sisyphus] mk-configure -- lightweight replacement for GNU autotools Led
2009-07-12 16:18 ` Aleksey Cheusov
2009-07-12 16:28 ` Led
2009-07-13 20:36 ` Dmitry V. Levin
2009-07-13 20:56 ` Aleksey Cheusov
2009-07-13 21:29 ` Dmitry V. Levin
2009-07-14 6:37 ` Aleksey Cheusov
2009-07-14 6:53 ` Afanasov Dmitry
2009-07-14 18:25 ` Aleksey Cheusov
2009-07-14 18:32 ` Led
2010-06-12 14:56 ` Aleksey Cheusov
2010-06-15 3:25 ` REAL
2010-06-15 6:05 ` Aleksey Cheusov
2010-06-15 5:29 ` REAL
2010-06-15 7:19 ` Slava Semushin
2010-06-15 7:22 ` Aleksey Cheusov
2010-06-15 7:03 ` REAL
2010-06-15 7:52 ` REAL
2010-06-15 9:39 ` Aleksey Cheusov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s937hyeszjw.fsf@chen.chizhovka.net \
--to=vle@gmx.net \
--cc=sisyphus@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git