chiark
/
gitweb
/
~mdw
/
preload-hacks
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
72d85cd
)
Makefile: Cardboard cutout silent rules build.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 5 Jun 2010 10:53:59 +0000
(11:53 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 5 Jun 2010 10:53:59 +0000
(11:53 +0100)
Makefile
patch
|
blob
|
blame
|
history
diff --git
a/Makefile
b/Makefile
index b3360da536bf2fcaabb2ae98bd3e5de2a5bc3bba..49a157c0c1a220f1e8ba4bfbcd5c0ef97c96b39d 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-41,6
+41,24
@@
man1dir = ${mandir}/man1
## Private installation tree for packagers.
DESTDIR =
## Private installation tree for packagers.
DESTDIR =
+###--------------------------------------------------------------------------
+### Quiet building.
+
+## Verbosity.
+V = 0
+
+## Compilation.
+V_CC = $(V_CC_$(V))$(CC)
+V_CC_0 = @echo " CC $@";
+
+## Linking.
+V_LD = $(V_LD_$(V))$(LD)
+V_LD_0 = @echo " LD $@";
+
+## Generation.
+V_GEN = $(V_GEN_$(V))
+V_GEN_0 = @echo " GEN $@";
+
###--------------------------------------------------------------------------
### Build parameters.
###--------------------------------------------------------------------------
### Build parameters.
@@
-124,21
+142,18
@@
clean:
## Building sources.
%.o: %.c
## Building sources.
%.o: %.c
- $(CC) -c $(REAL_CFLAGS) $< -o $@
+ $(
V_
CC) -c $(REAL_CFLAGS) $< -o $@
## Constructing preload hacks.
noip.so: $(patsubst %.c, %.o, $(NOIP_SOURCES))
## Constructing preload hacks.
noip.so: $(patsubst %.c, %.o, $(NOIP_SOURCES))
- $(LD) $(REAL_LDFLAGS) $< $(LDLIBS) -o $@
+ $(
V_
LD) $(REAL_LDFLAGS) $< $(LDLIBS) -o $@
uopen.so: $(patsubst %.c, %.o, $(UOPEN_SOURCES))
uopen.so: $(patsubst %.c, %.o, $(UOPEN_SOURCES))
- $(LD) $(REAL_LDFLAGS) $< $(LDLIBS) -o $@
+ $(
V_
LD) $(REAL_LDFLAGS) $< $(LDLIBS) -o $@
## Constructing the scripts.
## Constructing the scripts.
-$(SCRIPTS): withlib.in
- for i in $(SCRIPTS); do \
- sed "s/@lib@/$$i/" withlib.in >$$i.new || exit 1; \
- chmod +x $$i.new || exit 1; \
- mv $$i.new $$i || exit 1; \
- done
+$(SCRIPTS): %: withlib.in
+ $(V_GEN)sed "s/@lib@/$@/" withlib.in >$@.new && \
+ chmod +x $@.new && mv $@.new $@
###--------------------------------------------------------------------------
### Installation.
###--------------------------------------------------------------------------
### Installation.