source: trunk/Makefile.in @ 485

Last change on this file since 485 was 332, checked in by bas, 11 years ago

Added a new configure option --with-install_user

  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1# Authors: Bas van der Vlies & Michel Jouvin
2# Date   : 13 Jan 2005
3# Desc.  : Simple Makefile
4#
5# SVN INFO:
6#      $Id: Makefile.in 332 2010-03-24 10:09:47Z bas $
7#
8#
9prefix=@prefix@
10EXEC_PREFIX=@exec_prefix@/bin
11PYTHON_BIN=@PYTHON@
12CONFIG=@sysconfdir@
13
14# User names
15#
16TRAC_USER=@trac_user@
17MTA_USER=@mta_user@
18INSTALL_USER=@install_user@
19DEBUG=@DEBUG@
20
21TRAC_SCRIPT_NAME=email2trac
22
23CC=@CC@
24INSTALL=./install-sh
25CFLAGS=-DMTA_USER=\"$(MTA_USER)\" -DTRAC_USER=\"$(TRAC_USER)\" -DTRAC_SCRIPT_NAME=\"$(TRAC_SCRIPT_NAME)\" -DTRAC_SCRIPT_PATH=\"$(EXEC_PREFIX)\" -DDEBUG=$(DEBUG)
26
27PYTHON_FILES=delete_spam.py email2trac.py
28WRAPPER_SRC=run_email2trac.c run_email2trac.h
29
30all: run_email2trac
31
32run_email2trac: $(WRAPPER_SRC) Makefile
33        $(CC) $(CFLAGS) -o $@ run_email2trac.c
34
35install: all install-conf
36        $(INSTALL) -d $(DESTDIR)$(EXEC_PREFIX)
37        for script in $(PYTHON_FILES) ; \
38        do \
39          name=`basename $$script '.py'` ;\
40          $(INSTALL) -m 755 -o $(INSTALL_USER) $$script  $(DESTDIR)$(EXEC_PREFIX)/$$name ;\
41        done
42
43        $(INSTALL) -m 4111 -o  $(INSTALL_USER) run_email2trac $(DESTDIR)$(EXEC_PREFIX)
44
45install-conf:
46        if [ ! -f  $(DESTDIR)/$(CONFIG)/email2trac.conf ] ; \
47        then \
48                $(INSTALL) -c -m 644 -o $(INSTALL_USER) email2trac.conf $(DESTDIR)/$(CONFIG)/email2trac.conf ;\
49        fi
50 
51clean:
52        rm run_email2trac
53
54distclean:
55        rm run_email2trac email2trac.py delete_spam.py config.log config.status Makefile
Note: See TracBrowser for help on using the repository browser.