File: Makefile

package info (click to toggle)
bliss 0.77-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 876 kB
  • sloc: cpp: 6,505; makefile: 181; sh: 6
file content (85 lines) | stat: -rw-r--r-- 1,924 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# /usr/share/doc/bliss/examples/Makefile
#
# Ad hoc Makefile for building and playing with the sample sources
# distributed within the debian package bliss.
#
# Recommended usage:
#  create a dedicated folder somewhere in your HOME directory;
#  link all the files in /usr/share/doc/bliss/examples in the dedicated folder;
#  launch this Makefile in the dedicated folder:
#  $ make
#  for a basic cleanup, consider the clean target:
#  $ make clean
#  for an entire cleanup, the maintainer-clean target:
#  $ make maintainer-clean
#  for other targets, just read the Makefile.
#
# written for Debian by Jerome Benoit <calculus@rezozer.net>
# on behalf of the Debian Science Team
# copyright: 2016-2023 Jerome Benoit <calculus@rezozer.net>
# distributed under the terms and conditions of GPL version 3 or later
#

SHELL=/bin/bash

default: all

PROGRAMS = \
	$(patsubst %.cc,%,$(wildcard *.cc))

RESULTFILES = \
	$(patsubst %.col,%-col.result,$(wildcard *.col)) \
	enumerate.result

DIFFFILES = \
	$(patsubst %.output,%.diff,$(wildcard *.output))

CXXFLAGS = $(shell pkg-config libbliss-cxx --cflags)
LDXXLIBS = $(shell pkg-config libbliss-cxx --libs)

CXXFLAGS += -Wall -g

all: build check

build: $(PROGRAMS)

checkclean:
	$(RM) $(DIFFFILES) $(RESULTFILES)

check-run: $(RESULTFILES)

check-res: $(DIFFFILES)

check: checkclean check-run check-res

clean: checkclean
	$(RM) $(PROGRAMS)

maintainer-clean: clean

% : %.cc
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $< $(LDXXLIBS)

%-col.result : %.col bliss
	@echo "===8><--- $< ---"
	( set -o pipefail ; ./bliss $< | tee $@ )
	@echo "----------><8==="
	@echo

enumerate.result : enumerate
	@echo "===8><--- $< ---"
	( set -o pipefail ; ./enumerate | tee $@ )
	@echo "----------><8==="
	@echo

%.diff : %.result %.output
	@echo "===8><--- $* ---"
	( set -o pipefail ; diff -N $^ | tee $@ )
	@echo "----------><8==="
	@echo

.PRECIOUS: %.result

.DELETE_ON_ERROR:

.NOTPARALLEL: