1 # Generic makefile for mBuild build process
3 # defile default operations
5 NOP = @echo "No operation for target $@"
7 COMPILE_TARGET = compile.stamp
9 ZIP = zip -r $(project).zip $(project)
10 DEB = fakeroot dpkg-deb --build $(project)
11 INSERT_BUILD = projects/tools/make/insert_build.sh
18 # Load project specification
21 .SUFFIXES: .stamp .zip
24 #-----------------------------------------------------------------
27 # : ohne Parameter wird compiliert
28 # - zip : packt ZIP file
29 # - deb : packt Debian package
31 #-----------------------------------------------------------------
33 compile: $(COMPILE_TARGET)
40 # Debian package ready
42 version: $(COMPILE_TARGET)
43 $(INSERT_BUILD) $(COMPILE_TARGET) $(build)
45 #-----------------------------------------------------------------
47 #-----------------------------------------------------------------
48 compile.stamp: $(SOURCES)
52 #-----------------------------------------------------------------
54 #-----------------------------------------------------------------
56 copy.stamp: $(COPY_PRE)
60 control.stamp: $(project).control
61 mkdir -p $(project)/DEBIAN
62 cp $(project).control $(project)/DEBIAN/control
63 if [ -f $(project).postinst ]; then cp $(project).postinst $(project)/DEBIAN/postinst; fi
66 $(project).zip: copy.stamp $(project)
69 $(project).deb: copy.stamp control.stamp
71 cp $(project).deb $(project)_$(version)$(_arch).deb
73 #-----------------------------------------------------------------
75 #-----------------------------------------------------------------
77 -rm *.stamp 2>/dev/null
78 if [ -e $(project).zip ]; then rm $(project).zip; fi
79 if [ -e $(project) ]; then rm -rf $(project); fi
81 #-----------------------------------------------------------------
83 #-----------------------------------------------------------------
84 %.pdf : %.tex $(SOURCES)
85 pdflatex $< && pdflatex $<