tabbed

Customized build of tabbed, the suckless tab manager
git clone git://src.adamsgaard.dk/tabbed
Log | Files | Refs | Submodules | README

commit 8587169a059ea48e013f45686dcdddfe8a9e65ce
parent 9407fd4f8e8f2731d4800b1852739b914fe0e9f6
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Sun, 10 Mar 2019 13:16:29 +0100

Fix build rules with submodules

Diffstat:
MMakefile | 34+++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,28 +1,28 @@ -default: tabbed/tabbed +REPO=tabbed +default: install .PHONY: install -install: /usr/local/bin/tabbed +install: /usr/local/bin/$(REPO) -tabbed/tabbed: tabbed/config.h - @echo "Building tabbed" - make -C tabbed/ +$(REPO)/$(REPO): $(REPO)/config.h + @echo "Building $(REPO)" + make -C $(REPO)/ -tabbed/config.h: tabbed/config.def.h general.diff config.h - @echo "Copying default configuration to source directory" - @echo "Apply patches" - -for f in *.diff; do cp $$f tabbed/ && (cd tabbed && patch -p1 -N < $$f); done +$(REPO)/config.h: general.diff + cp *.diff $(REPO) + (cd $(REPO) && git apply *.diff) -tabbed/config.def.h: - git submodule update --init --recursive +/usr/local/bin/$(REPO): $(REPO)/$(REPO) + sudo make -C $(REPO)/ install -/usr/local/bin/tabbed: tabbed/tabbed - sudo make -C tabbed/ install +general.diff: config.h $(REPO)/Makefile + cp $(REPO)/config.def.h $(REPO)/config.h + -diff -u $(REPO)/config.h $< > $@ -general.diff: config.h - cp tabbed/config.def.h tabbed/config.h - -diff -u tabbed/config.h $< > $@ +$(REPO)/Makefile: + git submodule update --init --recursive .PHONY: clean install default clean: - $(RM) -r tabbed/ + $(RM) -r $(REPO)/ $(RM) general.diff