diff --git a/make_templates/header_only_lib b/make_templates/header_only_lib index 7b9d872cd4986610f26c6ca0c5a2caa5ece99f5b..02bc1ceb507866ff32f9081d020b0be08c795a9b 100644 --- a/make_templates/header_only_lib +++ b/make_templates/header_only_lib @@ -2,6 +2,7 @@ INSTALL_INCLUDE := include ifneq ($(shell cat COPYRIGHT 2> /dev/null),) COPYRIGHT ?= COPYRIGHT +COPYRIGHT_DEP = COPYRIGHT else COPYRIGHT ?= /dev/null endif @@ -20,14 +21,14 @@ default: install: $(INCLUDE) @echo Install complete! -$(INCDIR)/%.h: $(SRCDIR)/%.h $(COPYRIGHT) +$(INCDIR)/%.h: $(SRCDIR)/%.h $(COPYRIGHT_DEP) @mkdir -p $(@D) - cat $(COPYRIGHT) >> $@ 2> /dev/null || true + cat $(COPYRIGHT) >> $@ cat $< >> $@ -$(INCDIR)/%.hpp: $(SRCDIR)/%.hpp $(COPYRIGHT) +$(INCDIR)/%.hpp: $(SRCDIR)/%.hpp $(COPYRIGHT_DEP) @mkdir -p $(@D) - cat $(COPYRIGHT) >> $@ 2> /dev/null || true + cat $(COPYRIGHT) >> $@ cat $< >> $@ uninstall: diff --git a/make_templates/static_lib b/make_templates/static_lib index 4ea31429fcc8b73aa1200b8cf6ce5a444b66a34d..71fcafe951f8593f128e20dcc9302a22c97c3c96 100644 --- a/make_templates/static_lib +++ b/make_templates/static_lib @@ -15,6 +15,7 @@ INSTALL_LIB := lib ifneq ($(shell cat COPYRIGHT 2> /dev/null),) COPYRIGHT ?= COPYRIGHT +COPYRIGHT_DEP = COPYRIGHT else COPYRIGHT ?= /dev/null endif @@ -96,21 +97,21 @@ $(LIBDIR)/$(TARGET): $(OUT) | $(LIBDIR) $(LIBDIR): @mkdir -p $@ -$(INCDIR)/%.h: $(SRCDIR)/%.h $(COPYRIGHT) +$(INCDIR)/%.h: $(SRCDIR)/%.h $(COPYRIGHT_DEP) @mkdir -p $(@D) - cat $(COPYRIGHT) >> $@ 2> /dev/null || true + cat $(COPYRIGHT) >> $@ cat $< >> $@ -$(INCDIR)/%.hpp: $(SRCDIR)/%.hpp $(COPYRIGHT) +$(INCDIR)/%.hpp: $(SRCDIR)/%.hpp $(COPYRIGHT_DEP) @mkdir -p $(@D) - cat $(COPYRIGHT) >> $@ 2> /dev/null || true + cat $(COPYRIGHT) >> $@ cat $< >> $@ install_source: $(INSTALL_SOURCES) -$(INSTALL_SRCDIR)/%: $(SRCDIR)/% $(COPYRIGHT) +$(INSTALL_SRCDIR)/%: $(SRCDIR)/% $(COPYRIGHT_DEP) @mkdir -p $(@D) - cat $(COPYRIGHT) >> $@ 2> /dev/null || true + cat $(COPYRIGHT) >> $@ cat $< >> $@ uninstall: @@ -118,11 +119,18 @@ uninstall: @rmdir -p $(INCDIRS) 2> /dev/null || true -rm $(LIBDIR)/$(TARGET) @rmdir -p $(LIBDIR) 2> /dev/null || true + @echo Archives/includes uninstalled! + +uninstall_source: -rm $(INSTALL_SOURCES) @rmdir -p $(INSTALL_SRCDIRS) 2> /dev/null || true - @echo Uninstall complete! + @echo Source code uninstalled! + +uninstall_all: uninstall uninstall_source + @echo Everything uninstalled! + -include $(DEPENDS) .PRECIOUS : $(OBJECTS) -.PHONY : clean distclean uninstall +.PHONY : clean distclean uninstall uninstall_source uninstall_all