little clarification
[hband-tools.git] / compiled-tools / wall.d / Makefile
blobed038ae83f82b39d975738fe41f5171ee4fc557f
2 SOURCEDIR = util-linux
5 SUPPORTED_COMMIT = da00806c1916a8a67fd6f4ef4016de92bab340dd
9 wall: $(SOURCEDIR)/wall
10 install $< $@
13 define make_uptream_target
14 $(MAKE) -C $(SOURCEDIR) $(subst $(SOURCEDIR)/,,$@)
15 endef
17 define checkout_supported_commit
18 cd $(SOURCEDIR) && if [ $$(git show -s --format=%H) != $(SUPPORTED_COMMIT) ]; then git checkout $(SUPPORTED_COMMIT); fi
19 endef
22 $(SOURCEDIR)/wall: $(SOURCEDIR)/term-utils/wall.c
23 $(make_uptream_target)
25 $(SOURCEDIR)/term-utils/wall.c: $(SOURCEDIR)/Makefile
26 $(checkout_supported_commit)
27 cd $(SOURCEDIR) && git checkout HEAD -- term-utils/wall.c
28 patch -d $(SOURCEDIR) -p2 -i ../wall.c.patch -f
31 $(SOURCEDIR)/Makefile: $(SOURCEDIR)/configure
32 cd $(SOURCEDIR) && ./configure --disable-all-programs --enable-wall --without-python
34 $(SOURCEDIR)/configure: $(SOURCEDIR)/autogen.sh
35 $(checkout_supported_commit)
36 cd $(SOURCEDIR) && ./autogen.sh
37 touch $@
39 $(SOURCEDIR)/autogen.sh: $(SOURCEDIR)/.git/HEAD
40 $(checkout_supported_commit)
41 touch $@
44 $(SOURCEDIR)/.git/HEAD: | $(SOURCEDIR)
45 $(checkout_supported_commit)
48 $(SOURCEDIR):
49 git clone https://salsa.debian.org/debian/util-linux.git $(SOURCEDIR)
52 clean:
53 cd $(SOURCEDIR) && git checkout HEAD -- .
54 cd $(SOURCEDIR) && git clean -x -d -f
55 touch $(SOURCEDIR)/autogen.sh
57 .PHONY: clean