Use mkdir only when needed master
authorCharles Lehner <charles@claws-mail.org>
Fri, 31 Jul 2015 13:47:26 +0000 (09:47 -0400)
committerCharles Lehner <charles@claws-mail.org>
Fri, 31 Jul 2015 13:47:26 +0000 (09:47 -0400)
Makefile

index 505d3da7743e98669ef92c4ecd09b3bedb97ff5a..86e77d88e6a3c16a2189438b5843488d7b9c54f5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,12 +12,11 @@ LDFLAGS += `pkg-config --libs gtk+-2.0 claws-mail`
 $(LIB): $(OBJ)
        $(CC) $(LDFLAGS) -shared $^ -o $@
 
-$(PLUGINS_DIR):
+$(DESTDIR)$(PLUGINS_DIR):
        mkdir -p $@
 
-install: $(LIB) | $(PLUGINS_DIR)
-       mkdir -p $(DESTDIR)$(PLUGINS_DIR)
-       cp $< $(DESTDIR)$|
+install: $(LIB) | $(DESTDIR)$(PLUGINS_DIR)
+       cp $< $|
 
 uninstall:
        rm $(DESTDIR)$(PLUGINS_DIR)/$(LIB)