-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
75 lines (60 loc) · 1.6 KB
/
Makefile
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
PROJECT=42sh
VERSION=1.0
USER=maarek_j
TARBALL=${USER}-${PROJECT}-${VERSION}
BIN=42sh
all:
make -C build
cp -vf build/*.a lib/
cp -vf build/${BIN} .
clean: checkclean
make -C build clean
rm -fv lib/*.so lib/*.a
rm -fv ${BIN}
cleandoc:
rm -Rfv doc/html doc/latex
checkclean:
cp test/build/CMakeLists.txt test/
rm -fR test/build/*
rm -fv test/main_test/*
mv test/CMakeLists.txt test/build/
rm -fv test/html/index.html
buildclean:
cp build/CMakeLists.txt .
rm -fR build/*
mv CMakeLists.txt build/
distclean: clean cleandoc buildclean
rm -fv src/42sh/config.h
find . -type f -name "*~" -exec rm -rfv {} \;
find . -type f -name "*.swp" -exec rm -rfv {} \;
find . -type f -name "~*" -exec rm -rfv {} \;
find . -type f -name "\#*" -exec rm -rfv {} \;
rm -vf ${TARBALL}.tar.bz2
rm -Rvf ${TARBALL}
find . -type f -name "*~" -exec rm -rfv {} \;
dist: distclean
mkdir ${TARBALL}
cp -Rvf `ls | grep -v ${TARBALL}` ${TARBALL}
tar --exclude='.*' -cvjf ${TARBALL}.tar.bz2 ${TARBALL}
chmod 640 ${TARBALL}.tar.bz2
rm -Rf ${TARBALL}
distcheck: dist
tar -xvjf ${TARBALL}.tar.bz2 ${TARBALL}
cd ${TARBALL}
./configure && make check
doc: cleandoc
doxygen doc/doxyfile.conf
make -C doc/latex
checkbuild: all
export CFLAGS="-std=c99";
(cd test/build ; cmake -G"Unix Makefiles" ; cd ../..);
make -C test/build
checkhtml: check
(cd test; firefox html/index.html);
check: checkbuild
(cd test; perl Moulinette.pl);
norme:
grep -nE ".{79}" ${SRC_DIR}*.c ${INCLUDE_DIR}*.h ; echo -n
grep -nE "[^ ] +;" ${SRC_DIR}*.c ${INCLUDE_DIR}*.h ; echo -n
grep -nE " $" ${SRC_DIR}*.c ${INCLUDE_DIR}*.h ; echo -n
.PHONY: check