From: Andre Noll Date: Sun, 12 May 2024 18:51:48 +0000 (+0200) Subject: Makefile: Replace "misma" by $(PACKAGE). X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=2b5cc3f202d88414042392ed752ef632ce0aa2f5;p=misma.git Makefile: Replace "misma" by $(PACKAGE). The change has no effect, except that rules become generic in the sense that they can be copied verbatim to a different project. --- diff --git a/Makefile b/Makefile index 32b2c10..778b599 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,8 @@ endif .ONESHELL: .SHELLFLAGS := -ec + +PACKAGE := misma PREFIX ?= /usr/local INSTALL ?= install MKDIR_P := mkdir -p @@ -19,10 +21,9 @@ RM := rm -f CHMOD := chmod GROFF := groff B := build -all := misma misma.8 +all := $(PACKAGE) $(PACKAGE).8 all: $(all) -PACKAGE := misma SLOGAN := the minimal snapshot manager AUTHOR := Andre Noll EMAIL := maan@tuebingen.mpg.de @@ -35,7 +36,7 @@ LICENSE := GPL-2.0+ LICENSE_URL := https://www.gnu.org/licenses/gpl-3.0-standalone.html LOGLEVELS := LL_DEBUG,LL_INFO,LL_NOTICE,LL_WARNING,LL_ERROR,LL_CRIT,LL_EMERG -units := misma util version misma.lsg +units := $(PACKAGE) $(PACKAGE).lsg util version deps := $(addprefix $(B)/, $(addsuffix .d, $(units))) objs := $(addprefix $(B)/, $(addsuffix .o, $(units))) @@ -92,7 +93,7 @@ GIT_VERSION := $(shell $(MKDIR_P) $(B) && ./version-gen.sh $(PACKAGE) $(version_ CC_CMD = $(CC) -c -o $@ $(XCPPFLAGS) $(CPPFLAGS) \ $(XCFLAGS) $(CFLAGS) -MMD -MF $(B)/$(*F).d -MT $@ -$(objs): misma.h $(B)/misma.lsg.h Makefile +$(objs): $(PACKAGE).h $(B)/$(PACKAGE).lsg.h Makefile $(B): @$(MKDIR_P) $@ @@ -163,7 +164,7 @@ $(B)/logo.svg: index.html.m4 Makefile $(M4_CMD) -D MODE=svg $< > $@ $(B)/index.html: index.html.m4 Makefile $(M4_CMD) $< > $@ -$(B)/misma.suite: misma.suite.m4 Makefile +$(B)/$(PACKAGE).suite: $(PACKAGE).suite.m4 Makefile $(M4_CMD) $< > $@ $(B)/%.lsg.c: $(B)/%.suite $(call SAY, LSGC $<) @@ -199,8 +200,8 @@ ifneq ($(findstring strip, $(MAKECMDGOALS)),) endif install install-strip: all $(MKDIR_P) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir) - $(INSTALL_PROGRAM) $(strip_option) misma $(DESTDIR)$(sbindir) - $(INSTALL_DATA) misma.8 $(DESTDIR)$(mandir) + $(INSTALL_PROGRAM) $(strip_option) $(PACKAGE) $(DESTDIR)$(sbindir) + $(INSTALL_DATA) $(PACKAGE).8 $(DESTDIR)$(mandir) clean: $(RM) $(B)/*.o $(all) @@ -232,8 +233,8 @@ Open source, licensed under the $(LICENSE) license. Documentation ~~~~~~~~~~~~~ -See misma.suite.m4. Or build the man page with \"make\" and run -\"man -l misma.8\". +See $(PACKAGE).suite.m4. Or build the man page with \"make\" and run +\"man -l $(PACKAGE).8\". Dependencies ~~~~~~~~~~~~