(Minor) cleanup of some of the autoconf code with respect to the handling
[mmh] / config / Makefile.in
1 #
2 # Makefile for config subdirectory
3 #
4 # $Id$
5 #
6
7 # nmh version
8 VERSION = @VERSION@
9
10 SHELL = /bin/sh
11
12 top_srcdir = @top_srcdir@
13 srcdir     = @srcdir@
14 VPATH      = @srcdir@
15
16 prefix      = @prefix@
17 exec_prefix = @exec_prefix@
18 bindir      = @bindir@
19 libdir      = @libdir@
20 etcdir      = @sysconfdir@
21
22 default_editor = @editorpath@
23 default_pager  = @pagerpath@
24
25 CC         = @CC@
26 CFLAGS     = @CFLAGS@
27 DEFS       = @DEFS@
28 INCLUDES   = -I.. -I$(top_srcdir) @CPPFLAGS@
29 CONFIGDEFS = -DNMHBINDIR='"$(bindir)"' -DNMHETCDIR='"$(etcdir)"' -DNMHLIBDIR='"$(libdir)"' \
30              -DDEFAULT_EDITOR='"$(default_editor)"' -DDEFAULT_PAGER='"$(default_pager)"'
31
32 COMPILE  = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
33 COMPILE2 = $(CC) -c $(DEFS) $(CONFIGDEFS) $(INCLUDES) $(CFLAGS)
34
35 .SUFFIXES:
36 .SUFFIXES: .c .o
37
38 .c.o:
39         $(COMPILE) $<
40
41 # source files
42 SRCS = config.c
43
44 # object files
45 OBJS = config.o version.o
46
47 # auxiliary files
48 AUX = Makefile.in version.sh
49
50 # all files in this directory included in the distribution
51 DIST = $(SRCS) $(AUX)
52
53 # ========= DEPENDENCIES FOR BUILDING ==========
54
55 all: $(OBJS)
56
57 version.c:
58         ${srcdir}/version.sh $(VERSION) > version.c
59
60 config.o: config.c
61         $(COMPILE2) $(srcdir)/config.c
62
63 install:
64
65 uninstall:
66
67 lint:
68
69 # ========== DEPENDENCIES FOR CLEANUP ==========
70
71 mostlyclean:
72         rm -f *.o *~
73
74 clean: mostlyclean
75         rm -f version.c
76
77 distclean: clean
78         rm -f Makefile
79
80 realclean: distclean
81
82 superclean: realclean
83
84 # ========== DEPENDENCIES FOR MAINTENANCE ==========
85
86 subdir = config
87
88 Makefile: Makefile.in ../config.status
89         cd .. && ./config.status $(subdir)/$@
90  
91 distdir = ../`cat ../distname`/$(subdir)
92 nmhdist: $(DIST)
93         @echo "Copying distribution files in $(subdir)"
94         @for file in $(DIST); do \
95           cp -p $(srcdir)/$$file $(distdir); \
96         done
97