diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/build-doc.mk | 16 | ||||
-rw-r--r-- | mk/build.mk | 94 |
2 files changed, 89 insertions, 21 deletions
diff --git a/mk/build-doc.mk b/mk/build-doc.mk index 5fb301e..42a30f3 100644 --- a/mk/build-doc.mk +++ b/mk/build-doc.mk @@ -15,41 +15,57 @@ dvi: bin/mds.dvi obj/logo.svg: doc/logo.svg + @printf '\e[00;01;31mCP\e[34m %s\e[00m\n' "$@" @mkdir -p obj cp $< $@ + @echo obj/logo.pdf: doc/logo.svg @mkdir -p obj + @printf '\e[00;01;31mPDF\e[34m %s\e[00m\n' "$@" rsvg-convert --format=pdf $< > $@ + @echo obj/logo.eps: obj/logo.ps + @printf '\e[00;01;31mEPS\e[34m %s\e[00m\n' "$@" ps2eps $< + @echo obj/logo.ps: doc/logo.svg + @printf '\e[00;01;31mPS\e[34m %s\e[00m\n' "$@" @mkdir -p obj rsvg-convert --format=ps $< > $@ + @echo bin/%.info $(foreach P,$(INFOPARTS),bin/%.info-$(P)): doc/info/%.texinfo doc/info/*.texinfo + @printf '\e[00;01;31mTEXI\e[34m %s\e[00m\n' "$@" @mkdir -p bin $(MAKEINFO) $(TEXIFLAGS) $< mv $*.info $*.info-* bin + @echo bin/%.pdf: doc/info/%.texinfo doc/info/*.texinfo # obj/logo.pdf + @printf '\e[00;01;31mTEXI\e[34m %s\e[00m\n' "$@" @! test -d obj/pdf || rm -rf obj/pdf @mkdir -p obj/pdf bin cd obj/pdf && texi2pdf $(TEXIFLAGS) ../../$< < /dev/null mv obj/pdf/$*.pdf $@ + @echo bin/%.dvi: doc/info/%.texinfo doc/info/*.texinfo # obj/logo.eps + @printf '\e[00;01;31mTEXI\e[34m %s\e[00m\n' "$@" @! test -d obj/dvi || rm -rf obj/dvi @mkdir -p obj/dvi bin cd obj/dvi && $(TEXI2DVI) $(TEXIFLAGS) ../../$< < /dev/null mv obj/dvi/$*.dvi $@ + @echo bin/%.ps: doc/info/%.texinfo doc/info/*.texinfo # obj/logo.eps + @printf '\e[00;01;31mTEXI\e[34m %s\e[00m\n' "$@" @! test -d obj/ps || rm -rf obj/ps @mkdir -p obj/ps bin cd obj/ps && texi2pdf $(TEXIFLAGS) --ps ../../$< < /dev/null mv obj/ps/$*.ps $@ + @echo diff --git a/mk/build.mk b/mk/build.mk index cc1d57a..4f59b8b 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -27,12 +27,14 @@ bin/mds-server: $(OBJ_mds-server) obj/mds-base.o bin/libmdsserver.so else bin/mds-server: $(OBJ_mds-server) obj/mds-base.o endif - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mLD\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -o $@ $(LDS) $(LDS_mds-server) $(OBJ_mds-server) obj/mds-base.o ifeq ($(DEBUG),y) mv $@ $@.real cp test.d/mds-server $@ endif + @echo ifneq ($(LIBMDSSERVER_IS_INSTALLED),y) @@ -40,8 +42,10 @@ bin/mds-registry: $(OBJ_mds-registry) obj/mds-base.o bin/libmdsserver.so else bin/mds-registry: $(OBJ_mds-registry) obj/mds-base.o endif - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mLD\e[34m %s\e[00m\n' "$@"o + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -o $@ $(LDS) $(LDS_mds-registry) $(OBJ_mds-registry) obj/mds-base.o + @echo # Link small servers. @@ -51,8 +55,10 @@ bin/%: obj/%.o obj/mds-base.o bin/libmdsserver.so else bin/%: obj/%.o obj/mds-base.o endif - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mLD\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -o $@ $(LDS) $(LDS_$*) $< obj/mds-base.o + @echo # Link kernel. @@ -62,8 +68,10 @@ bin/mds: obj/mds.o bin/libmdsserver.so else bin/mds: obj/mds.o endif - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mLD\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -o $@ $(LDS) $(LDS_mds) $< + @echo # Link utilies that do not use mds-base. @@ -73,66 +81,97 @@ bin/mds-kbdc: $(OBJ_mds-kbdc) bin/libmdsserver.so else bin/mds-kbdc: $(OBJ_mds-kbdc) endif - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mLD\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -o $@ $(LDS) $(LDS_mds-kbdc) $(OBJ_mds-kbdc) + @echo # Build object files for kernel/servers/utilities. ifneq ($(LIBMDSSERVER_IS_INSTALLED),y) obj/%.o: src/%.c src/%.h src/mds-base.h src/libmdsserver/*.h $(SEDED) - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mCC\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -Isrc -c -o $@ $< + @echo obj/%.o: src/%.c src/mds-base.h src/libmdsserver/*.h $(SEDED) - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mCC\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -Isrc -c -o $@ $< + @echo obj/mds-server/%.o: src/mds-server/%.c src/mds-server/*.h src/mds-base.h src/libmdsserver/*.h $(SEDED) - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mCC\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -Isrc -c -o $@ $< + @echo obj/mds-registry/%.o: src/mds-registry/%.c src/mds-registry/*.h src/mds-base.h src/libmdsserver/*.h $(SEDED) - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mCC\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -Isrc -c -o $@ $< + @echo obj/mds-kbdc/%.o: src/mds-kbdc/%.c src/mds-kbdc/*.h src/libmdsserver/*.h $(SEDED) - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mCC\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -Isrc -c -o $@ $< + @echo else obj/%.o: src/%.c src/%.h src/mds-base.h $(SEDED) - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mCC\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -c -o $@ $< + @echo obj/%.o: src/%.c src/mds-base.h $(SEDED) - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mCC\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -c -o $@ $< + @echo obj/mds-server/%.o: src/mds-server/%.c src/mds-server/*.h src/mds-base.h $(SEDED) - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mCC\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -c -o $@ $< + @echo obj/mds-registry/%.o: src/mds-registry/%.c src/mds-registry/*.h src/mds-base.h $(SEDED) - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mCC\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -c -o $@ $< + @echo obj/mds-kbdc/%.o: src/mds-kbdc/%.c src/mds-kbdc/*.h $(SEDED) - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mCC\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -c -o $@ $< + @echo endif # Build libmdsserver. bin/libmdsserver.so.$(LIBMDSSERVER_VERSION): $(foreach O,$(SERVEROBJ),obj/libmdsserver/$(O).o) - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mLD\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -shared -Wl,-soname,libmdsclient.so.$(LIBMDSSERVER_MAJOR) -o $@ $^ + @echo bin/libmdsserver.so.$(LIBMDSSERVER_MAJOR): bin/libmdsserver.so.$(LIBMDSSERVER_VERSION) + @printf '\e[00;01;31mLN\e[34m %s\e[00m\n' "$@" ln -sf libmdsserver.so.$(LIBMDSSERVER_VERSION) $@ + @echo bin/libmdsserver.so: bin/libmdsserver.so.$(LIBMDSSERVER_VERSION) + @printf '\e[00;01;31mLN\e[34m %s\e[00m\n' "$@" ln -sf libmdsserver.so.$(LIBMDSSERVER_VERSION) $@ + @echo obj/libmdsserver/%.o: src/libmdsserver/%.c src/libmdsserver/*.h $(SEDED) - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mCC\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -fPIC -c -o $@ $< + @echo # sed header files. ifneq ($(LIBMDSSERVER_IS_INSTALLED),y) src/libmdsserver/config.h: src/libmdsserver/config.h.in + @printf '\e[00;01;31mSED\e[34m %s\e[00m\n' "$@" cp $< $@ sed -i 's:@PKGNAME@:$(PKGNAME):g' $@ sed -i 's:@LIBEXECDIR@:$(LIBEXECDIR):g' $@ @@ -158,40 +197,53 @@ src/libmdsserver/config.h: src/libmdsserver/config.h.in sed -i 's:@SHM_PATH_PATTERN@:$(SHM_PATH_PATTERN):g' $@ sed -i 's:@MDS_RUNTIME_ROOT_DIRECTORY@:$(MDS_RUNTIME_ROOT_DIRECTORY):g' $@ sed -i 's:@MDS_STORAGE_ROOT_DIRECTORY@:$(MDS_STORAGE_ROOT_DIRECTORY):g' $@ + @echo endif bin/libmdsserver.pc: src/libmdsserver/libmdsserver.pc.in - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mSED\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) cp $< $@ sed -i 's:@LIBDIR@:$(LIBDIR):g' $@ sed -i 's:@INCLUDEDIR@:$(INCLUDEDIR):g' $@ sed -i 's:@VERSION@:$(LIBMDSSERVER_VERSION):g' $@ sed -i 's:@LIBS@:$(LIBMDSSERVER_LIBS):g' $@ sed -i 's:@CFLAGS@:$(LIBMDSSERVER_CFLAGS):g' $@ + @echo # Build libmdsclient. bin/libmdsclient.so.$(LIBMDSCLIENT_VERSION): $(foreach O,$(CLIENTOBJ),obj/libmdsclient/$(O).o) - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mLD\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -shared -Wl,-soname,libmdsclient.so.$(LIBMDSCLIENT_MAJOR) -o $@ $^ + @echo bin/libmdsclient.so.$(LIBMDSCLIENT_MAJOR): bin/libmdsclient.so.$(LIBMDSCLIENT_VERSION) + @printf '\e[00;01;31mLN\e[34m %s\e[00m\n' "$@" ln -sf libmdsclient.so.$(LIBMDSCLIENT_VERSION) $@ + @echo bin/libmdsclient.so: bin/libmdsclient.so.$(LIBMDSCLIENT_VERSION) + @printf '\e[00;01;31mLN\e[34m %s\e[00m\n' "$@" ln -sf libmdsclient.so.$(LIBMDSCLIENT_VERSION) $@ + @echo obj/libmdsclient/%.o: src/libmdsclient/%.c src/libmdsclient/*.h $(SEDED) - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mCC\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) $(CC) $(C_FLAGS) -fPIC -Isrc -c -o $@ $< + @echo bin/libmdsclient.pc: src/libmdsclient/libmdsclient.pc.in - mkdir -p $(shell dirname $@) + @printf '\e[00;01;31mSED\e[34m %s\e[00m\n' "$@" + @mkdir -p $(shell dirname $@) cp $< $@ sed -i 's:@LIBDIR@:$(LIBDIR):g' $@ sed -i 's:@INCLUDEDIR@:$(INCLUDEDIR):g' $@ sed -i 's:@VERSION@:$(LIBMDSCLIENT_VERSION):g' $@ sed -i 's:@LIBS@:$(LIBMDSCLIENT_LIBS):g' $@ sed -i 's:@CFLAGS@:$(LIBMDSCLIENT_CFLAGS):g' $@ + @echo |