X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=build%2FMakebottom;h=19d1179dc3fcf5ec5416ab1b64f4fa9dcbdbcbb3;hb=519baadc3b82940ca2b79ba6e9f794a7f870a528;hp=3214cac526069511c327cb21b6d646ee8801c768;hpb=d18403664f23ca1464d659b29912758d72b2abec;p=libucw.git diff --git a/build/Makebottom b/build/Makebottom index 3214cac5..19d1179d 100644 --- a/build/Makebottom +++ b/build/Makebottom @@ -39,13 +39,14 @@ force: # Rules for configuration files -run/cf/%: custom/cf/% $(o)/config.mk $(s)/build/genconf +run/cf/%: $(s)/cf/% $(o)/config.mk $(s)/build/genconf $(M)CF $< $(Q)$(s)/build/genconf $< $@ $(o)/config.mk -run/cf/%: $(s)/cf/% $(o)/config.mk $(s)/build/genconf +$(o)/%.cf: $(s)/%.cf $(o)/config.mk $(s)/build/genconf $(M)CF $< $(Q)$(s)/build/genconf $< $@ $(o)/config.mk + $(Q)cp $@ run/cf/$(basename $(@F)) # Rules for libraries @@ -54,13 +55,13 @@ run/cf/%: $(s)/cf/% $(o)/config.mk $(s)/build/genconf $(Q)rm -f $@ $(Q)ar rcs $@ $^ ifdef CONFIG_INSTALL_API - $(Q)$(call symlink,$@,run/lib) + $(Q)$(call symlink-alias,$@,run/lib,$(*F)$(LIBNAME_INFIX).a) endif %.so: $(M)LD $@ $(Q)$(CC) $(LSHARED) $(LDFLAGS) -o $@ $^ - $(Q)$(call symlink,$@,run/lib) + $(Q)$(call symlink-alias,$@,run/lib,$(*F)$(SONAME_INFIX).so$(SONAME_SUFFIX)) $(o)/%.pc: $(s)/%.pc $(o)/%.$(LS) $(M)PC $< @@ -120,13 +121,13 @@ $(o)/%-tt.o: $(s)/%.c $(o)/autoconf.h # Rules for testing -$(o)/%-t: $(o)/%-tt.o $(LIBSH) +$(o)/%-t: $(o)/%-tt.o $(TESTING_DEPS) $(M)LD-TEST $@ - $(Q)$(CC) $(LDFLAGS) -o $@ $(shell $(s)/build/lib-flags $^) $(LIBS) + $(Q)$(CC) $(LDFLAGS) -o $@ $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" $(s)/build/lib-flags $^) $(LIBS) $(o)/%.test: $(s)/%.t $(s)/build/tester $(M)TEST $@ - $(Q)$(s)/build/tester $< && touch $@ + $(Q)$(s)/build/tester --rundir=run $(TESTERFLAGS) $< && touch $@ # Rules for binaries @@ -134,7 +135,7 @@ BINDIR=bin $(o)/%: $(o)/%.o $(M)LD $@ - $(Q)$(CC) $(LDFLAGS) -o $@ $(shell $(s)/build/lib-flags $^) $(LIBS) + $(Q)$(CC) $(LDFLAGS) -o $@ $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" $(s)/build/lib-flags $^) $(LIBS) $(Q)$(call symlink,$@,run/$(BINDIR)) $(o)/%: $(s)/%.sh $(o)/config.mk $(s)/build/genconf @@ -185,7 +186,7 @@ $(DATAFILES): $(o)/%: $(s)/% # Default installation target default-install: - SH_EXTRA_RUNDIRS="$(sort $(EXTRA_RUNDIRS))" SH_INSTALL_RUNDIRS="$(sort $(INSTALL_RUNDIRS))" SH_CONFIGS="$(sort $(CONFIGS))" $(s)/build/installer $(INSTALL_DIR) + SH_EXTRA_RUNDIRS="$(sort $(EXTRA_RUNDIRS))" SH_INSTALL_RUNDIRS="$(sort $(INSTALL_RUNDIRS))" SH_CONFIGS="$(sort $(CONFIGS))" SH_AUTO_CONFIRM="$(CONFIRM)" $(s)/build/installer $(INSTALL_DIR) # Don't delete intermediate targets. There shouldn't be any, but due to bugs # in GNU Make rules with targets in not-yet-existing directories are ignored