Give the ".../llvm-gcc/bytecode-libs" directory a variable of its own,
authorBrian Gaeke <gaeke@uiuc.edu>
Wed, 21 Jan 2004 23:57:21 +0000 (23:57 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Wed, 21 Jan 2004 23:57:21 +0000 (23:57 +0000)
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

Makefile.rules

index 96df1461b138408431fc2ba74103dcee21f5b5e4..325cf09496353fff286b1db867da094f5b580d1a 100644 (file)
@@ -482,9 +482,13 @@ LIBNAME_BC   := $(DESTLIBBYTECODE)/lib$(LIBRARYNAME).bc
 # 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 $< $@