File: builddir.mk

package info (click to toggle)
eterm 0.9.6-6
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 4,332 kB
  • sloc: ansic: 28,134; sh: 8,849; asm: 365; makefile: 143; perl: 74
file content (23 lines) | stat: -rw-r--r-- 567 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
BUILD_DIR := debian/build
BUILD_DIR_TARGETS := build install patch unpatch

build: tarcopy
build-arch: build
$(BUILD_DIR_TARGETS):
	$(MAKE) -f debian/rules -C $(BUILD_DIR) $@ USE_BUILD_DIR=TRUE

cp_excludes := .pc debian
cp_targets =  $(filter-out $(cp_excludes),$(wildcard *))

tarcopy: debian/stamp-tarcopy
debian/stamp-tarcopy:
	mkdir -p $(BUILD_DIR)
	tar cf - $(cp_targets) | tar xvf - -C $(BUILD_DIR)
	ln -sv $(CURDIR)/debian $(BUILD_DIR)
	touch $@

clean: clean_extras
clean_extras:
	rm -rf $(BUILD_DIR) $(wildcard debian/stamp-*)

.PHONY: tarcopy clean_extras