]> git.stg.codes - stg.git/blobdiff - projects/sgconv/Makefile
Fixes due to stupid behaviour of BSD-like install.
[stg.git] / projects / sgconv / Makefile
index ceea22b76e6ecf0b7dbe75556dfdd94d96721f73..ff6308eddc5414f298b5e681a45cbba2ad8f2d02 100644 (file)
@@ -10,9 +10,9 @@ SRCS = ./main.cpp \
        ./settings_impl.cpp
 
 STGLIBS = dotconfpp \
-         conffiles \
-         logger \
-         crypto \
+          conffiles \
+          logger \
+          crypto \
           common
 
 STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS)))
@@ -45,7 +45,7 @@ all: libs plugins $(PROG) ../../Makefile.conf
 libs:
        $(MAKE) -C $(DIR_LIBSRC)
 
-plugins: libs 
+plugins: libs
        $(MAKE) -C $(DIR_PLUGINS)
 
 $(PROG): $(OBJS)
@@ -67,9 +67,11 @@ install: install-bin
 
 install-bin:
 ifeq ($(DEBUG), yes)
-       install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG)
+       mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/bin
+       install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG)
 else
-       install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG)
+       mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/bin
+       install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG)
 endif
        $(MAKE) -C $(DIR_PLUGINS) install