diff options
author | Jason A. Donenfeld | 2014-01-14 13:47:28 +0100 |
---|---|---|
committer | Jason A. Donenfeld | 2014-01-14 13:47:28 +0100 |
commit | a9a7f68244b3393725643b35fb3f685b05ccea9e (patch) | |
tree | f2930b542e1b5815e56b569affa661e38a030f7b /cgit.mk | |
parent | 027e88a1a150cd468943cda3a4b8e6bd6e662376 (diff) | |
download | cgit-a9a7f68244b3393725643b35fb3f685b05ccea9e.tar.gz cgit-a9a7f68244b3393725643b35fb3f685b05ccea9e.tar.bz2 cgit-a9a7f68244b3393725643b35fb3f685b05ccea9e.zip |
makefile: only display lua message once
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'cgit.mk')
-rw-r--r-- | cgit.mk | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -25,10 +25,8 @@ ifdef NO_C99_FORMAT | |||
25 | CFLAGS += -DNO_C99_FORMAT | 25 | CFLAGS += -DNO_C99_FORMAT |
26 | endif | 26 | endif |
27 | 27 | ||
28 | nullstring := | ||
29 | fourspace := $(nullstring) | ||
30 | ifdef NO_LUA | 28 | ifdef NO_LUA |
31 | $(info $(fourspace)* building without specified Lua support) | 29 | LUA_MESSAGE := linking without specified Lua support |
32 | CGIT_CFLAGS += -DNO_LUA | 30 | CGIT_CFLAGS += -DNO_LUA |
33 | else | 31 | else |
34 | LUAJIT_CFLAGS := $(shell pkg-config --cflags luajit 2>/dev/null) | 32 | LUAJIT_CFLAGS := $(shell pkg-config --cflags luajit 2>/dev/null) |
@@ -39,26 +37,26 @@ ifeq (JIT,$(LUA_IMPLEMENTATION)) | |||
39 | ifeq ($(strip $(LUAJIT_LIBS)),) | 37 | ifeq ($(strip $(LUAJIT_LIBS)),) |
40 | $(error LuaJIT specified via LUA_IMPLEMENTATION=JIT, but library could not be found.) | 38 | $(error LuaJIT specified via LUA_IMPLEMENTATION=JIT, but library could not be found.) |
41 | endif | 39 | endif |
42 | $(info $(fourspace)* building with selected LuaJIT) | 40 | LUA_MESSAGE := linking with selected LuaJIT |
43 | CGIT_LIBS += $(LUAJIT_LIBS) | 41 | CGIT_LIBS += $(LUAJIT_LIBS) |
44 | CGIT_CFLAGS += $(LUAJIT_CFLAGS) | 42 | CGIT_CFLAGS += $(LUAJIT_CFLAGS) |
45 | else ifeq (VANILLA,$(LUA_IMPLEMENTATION)) | 43 | else ifeq (VANILLA,$(LUA_IMPLEMENTATION)) |
46 | ifeq ($(strip $(LUA_LIBS)),) | 44 | ifeq ($(strip $(LUA_LIBS)),) |
47 | $(error Lua specified via LUA_IMPLEMENTATION=VANILLA, but library could not be found.) | 45 | $(error Lua specified via LUA_IMPLEMENTATION=VANILLA, but library could not be found.) |
48 | endif | 46 | endif |
49 | $(info $(fourspace)* building with selected Lua) | 47 | LUA_MESSAGE := linking with selected Lua |
50 | CGIT_LIBS += $(LUA_LIBS) | 48 | CGIT_LIBS += $(LUA_LIBS) |
51 | CGIT_LIBS += $(LUA_CFLAGS) | 49 | CGIT_LIBS += $(LUA_CFLAGS) |
52 | else ifneq ($(strip $(LUAJIT_LIBS)),) | 50 | else ifneq ($(strip $(LUAJIT_LIBS)),) |
53 | $(info $(fourspace)* building with autodetected LuaJIT) | 51 | LUA_MESSAGE := linking with autodetected LuaJIT |
54 | CGIT_LIBS += $(LUAJIT_LIBS) | 52 | CGIT_LIBS += $(LUAJIT_LIBS) |
55 | CGIT_CFLAGS += $(LUAJIT_CFLAGS) | 53 | CGIT_CFLAGS += $(LUAJIT_CFLAGS) |
56 | else ifneq ($(strip $(LUA_LIBS)),) | 54 | else ifneq ($(strip $(LUA_LIBS)),) |
57 | $(info $(fourspace)* building with autodetected Lua) | 55 | LUA_MESSAGE := linking with autodetected Lua |
58 | CGIT_LIBS += $(LUA_LIBS) | 56 | CGIT_LIBS += $(LUA_LIBS) |
59 | CGIT_CFLAGS += $(LUA_CFLAGS) | 57 | CGIT_CFLAGS += $(LUA_CFLAGS) |
60 | else | 58 | else |
61 | $(info $(fourspace)* building without autodetected Lua support) | 59 | LUA_MESSAGE := linking without autodetected Lua support |
62 | NO_LUA := YesPlease | 60 | NO_LUA := YesPlease |
63 | CGIT_CFLAGS += -DNO_LUA | 61 | CGIT_CFLAGS += -DNO_LUA |
64 | endif | 62 | endif |
@@ -133,4 +131,5 @@ $(CGIT_OBJS): %.o: %.c GIT-CFLAGS $(CGIT_PREFIX)CGIT-CFLAGS $(missing_dep_dirs) | |||
133 | $(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $(CGIT_CFLAGS) $< | 131 | $(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $(CGIT_CFLAGS) $< |
134 | 132 | ||
135 | $(CGIT_PREFIX)cgit: $(CGIT_OBJS) GIT-LDFLAGS $(GITLIBS) | 133 | $(CGIT_PREFIX)cgit: $(CGIT_OBJS) GIT-LDFLAGS $(GITLIBS) |
134 | @echo 1>&1 " * $(LUA_MESSAGE)" | ||
136 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) $(CGIT_LIBS) | 135 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) $(CGIT_LIBS) |