summaryrefslogtreecommitdiffstats
path: root/src/config/post.in
blob: 4f5e0e291e32230120830cbc79e13ae8bd44ed02 (plain)
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
# config/post.in
# put all:: first just in case no other rules occur here
#
all::

check::

.depend: $(SRCS) $(SRCTOP)/util/depfix.sed
	if test -n "$(SRCS)" ; then \
		cc -M $(CFLAGS) $(SRCS) | sed -f $(SRCTOP)/util/depfix.sed | \
			sed -e 's;$(srcdir)/;$$(srcdir)/;g' > .depend; \
	else :; fi

depend: .depend
	if test -n "$(SRCS)" ; then \
		sed -e '/^# +++ Dependency line eater +++/,$$d' \
			< $(srcdir)/Makefile.in | cat - .depend \
			> $(srcdir)/Makefile.in.new; \
	$(MV) $(srcdir)/Makefile.in $(srcdir)/Makefile.in.old; \
	$(MV) $(srcdir)/Makefile.in.new $(srcdir)/Makefile.in; \
	else :; fi

clean:: clean-$(WHAT)
	$(RM) config.log pre.out post.out Makefile.out

clean-unix::
	if test -n "$(OBJS)" ; then $(RM) $(OBJS); else :; fi
	$(RM) .depend

clean-windows::
	$(RM) *.$(OBJEXT)
	$(RM) msvc.pdb *.err