[79] | 1 | # Authors: Bas van der Vlies |
---|
| 2 | # Date : 28 Mar 2007 |
---|
| 3 | # Desc. : Simple Makefile |
---|
| 4 | # |
---|
| 5 | # SVN INFO: |
---|
[80] | 6 | # $Id: Makefile.in 187 2010-10-28 14:18:36Z bas $ |
---|
[79] | 7 | # |
---|
| 8 | # |
---|
| 9 | prefix=@prefix@ |
---|
[83] | 10 | exec_prefix=@exec_prefix@ |
---|
| 11 | SBIN_DIR=@sbindir@ |
---|
| 12 | BIN_DIR=@bindir@ |
---|
| 13 | DATA_DIR=@datadir@/doc/pxeconfig |
---|
[79] | 14 | PYTHON_BIN=@PYTHON@ |
---|
| 15 | CONFIG=@sysconfdir@ |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | INSTALL=./install-sh |
---|
| 19 | |
---|
[83] | 20 | PYTHON_FILES=pxeconfig hexls |
---|
[86] | 21 | EXAMPLES=default.flashqla default.harddisk default.memtest default.node_install pxeconfigd.xinetd |
---|
[187] | 22 | PXEMENU_DIRS=pxemenu |
---|
[107] | 23 | PXEMENU_FILES=README-pxemenu INSTALL-pxemenu |
---|
[79] | 24 | |
---|
[80] | 25 | all: compile |
---|
| 26 | |
---|
| 27 | compile: |
---|
[138] | 28 | python setup.py build |
---|
[80] | 29 | |
---|
[107] | 30 | install: install-conf install-examples install-pxemenu |
---|
[138] | 31 | python ./setup.py install --prefix $(DESTDIR)/$(exec_prefix) |
---|
[83] | 32 | $(INSTALL) -d $(DESTDIR)$(SBIN_DIR) |
---|
| 33 | $(INSTALL) -d $(DESTDIR)$(BIN_DIR) |
---|
[142] | 34 | $(INSTALL) -m 755 -o root src/pxeconfigd $(DESTDIR)$(SBIN_DIR) |
---|
[79] | 35 | for script in $(PYTHON_FILES) ; \ |
---|
| 36 | do \ |
---|
[142] | 37 | $(INSTALL) -m 755 -o root src/$$script $(DESTDIR)$(BIN_DIR)/$$script ;\ |
---|
[79] | 38 | done |
---|
| 39 | |
---|
| 40 | install-conf: |
---|
| 41 | if [ ! -f $(DESTDIR)/$(CONFIG)/pxeconfig.conf ] ; \ |
---|
| 42 | then \ |
---|
| 43 | $(INSTALL) -c -m 644 -o root pxeconfig.conf $(DESTDIR)/$(CONFIG)/pxeconfig.conf ;\ |
---|
| 44 | fi |
---|
[83] | 45 | |
---|
| 46 | install-examples: |
---|
| 47 | $(INSTALL) -d $(DESTDIR)$(DATA_DIR)/examples |
---|
| 48 | for file in $(EXAMPLES) ; \ |
---|
| 49 | do \ |
---|
| 50 | $(INSTALL) -c -m 644 -o root examples/$$file $(DESTDIR)$(DATA_DIR)/examples/$$file ;\ |
---|
| 51 | done |
---|
| 52 | |
---|
[107] | 53 | install-pxemenu: |
---|
| 54 | $(INSTALL) -d $(DESTDIR)$(DATA_DIR) |
---|
| 55 | for dir in $(PXEMENU_DIRS) ; \ |
---|
| 56 | do \ |
---|
| 57 | cp -a $$dir $(DESTDIR)$(DATA_DIR)/$$dir ;\ |
---|
| 58 | done |
---|
| 59 | for file in $(PXEMENU_FILES) ; \ |
---|
| 60 | do \ |
---|
| 61 | $(INSTALL) -c -m 644 -o root $$file $(DESTDIR)$(DATA_DIR)/$$file ;\ |
---|
| 62 | done |
---|
[79] | 63 | |
---|
| 64 | clean: distclean |
---|
| 65 | |
---|
| 66 | distclean: |
---|
[171] | 67 | rm src/pxeconfig src/pxe_global.py src/pxeconfigd src/hexls examples/pxeconfigd.xinetd config.log config.status Makefile |
---|
[172] | 68 | python setup.py clean -a |
---|