summaryrefslogtreecommitdiff
path: root/Makefile.in
blob: d88e35ace9c5266f0275a26b955e604f21e65492 (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
33
34
35
36
37
38
39
40
VPATH		= @srcdir@
srcdir		= @srcdir@
top_srcdir	= @top_srcdir@

VERSION		= $(shell cat version-nr)

GENFILES	= version.h

default: all
include Makefile.conf

SUBDIRS		= include optlib lib dpkg-deb split scripts utils main \
		  @DSELECTDIR@ po methods man doc

all: version.h all-recursive

install: all install-recursive
	$(mkinstalldirs) $(DESTDIR)$(dpkgconfdir)/origins
	$(mkinstalldirs) $(DESTDIR)$(dpkgsharedir)/origins
	$(INSTALL_DATA) $(srcdir)/origin $(DESTDIR)$(dpkgconfdir)/origins/debian
	$(INSTALL_DATA) $(srcdir)/archtable $(DESTDIR)$(dpkgsharedir)/archtable

clean: clean-recursive
	rm -f $(GENFILES)

distclean: clean distclean-recursive
	rm -f Makefile.conf Makefile config.cache config.h config.log config.status
	rm -f automake/gettext.m4 automake/progtest.m4 automake/lcmessage.m4

version.h: version-nr
	echo "#define DPKG_VERSION \"$(VERSION)\" /* This line modified by Makefile */" > version.h

all-recursive install-recursive clean-recursive distclean-recursive: %-recursive:
	$(MAKE) $(MFLAGS) $(patsubst %,$*-%,$(SUBDIRS))

$(foreach target,all install clean distclean,$(patsubst %,$(target)-%,$(SUBDIRS))):
	$(MAKE) $(MFLAGS) -C "$(shell echo "$@" | sed 's/[^-]*-//')" "$(shell echo "$@" | sed 's/-.*//')"

.PHONY: all install clean distclean 
.PHONY: all-recursive install-recursive clean-recursive distclean-recursive