called bytecode_libdir. Make install-bytecode-library depend on
the existence of that directory, and add a rule for creating it if
it does not exist by calling mkinstalldirs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10946
91177308-0d34-0410-b5e6-
96231b3b80d8
# dynamic target builds a shared object version of the library...
dynamic:: $(LIBNAME_CUR)
bytecodelib:: $(LIBNAME_BC)
-install-bytecode-library:: $(DESTDIR)$(LLVMGCCDIR)/bytecode-libs/lib$(LIBRARYNAME).bc
+bytecode_libdir = $(LLVMGCCDIR)/bytecode-libs
+install-bytecode-library:: $(DESTDIR)$(bytecode_libdir)/lib$(LIBRARYNAME).bc
-$(DESTDIR)$(LLVMGCCDIR)/bytecode-libs/lib$(LIBRARYNAME).bc: $(LIBNAME_BC)
+$(DESTDIR)$(bytecode_libdir):
+ $(MKDIR) $@
+
+$(DESTDIR)$(bytecode_libdir)/lib$(LIBRARYNAME).bc: $(LIBNAME_BC) $(DESTDIR)$(bytecode_libdir)
@${ECHO} ======= Installing $(LIBRARYNAME) bytecode library =======
cp $< $@