forked from uyuni-project/uyuni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.defs
47 lines (34 loc) · 1.04 KB
/
Makefile.defs
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
41
42
43
44
45
46
47
# Makefile for the backend directory
#
# perl setup
PERL = /usr/bin/perl
export PERL
PERLMAKE = Makefile.perl
# installation stuff
INSTALL = /usr/bin/install -c --verbose
INSTALL_BIN = $(INSTALL) -m 755
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_DIR = $(INSTALL) -m 755 -d
# handling isntallation dircetories
DIRS += $(addprefix $(PREFIX), \
$(sort $(EXTRA_DIRS)) $(INSTALL_DEST))
# nice macro to work with
descend-subdirs = @$(foreach d,$(SUBDIRS),$(MAKE) -C $(d) $@ || exit 1; )
all ::
install :: all $(DIRS)
$(DIRS) :
$(INSTALL_DIR) $@
clean ::
@find . -name \*~ -exec rm -fv {} \;
@find . -name .\#* -exec rm -fv {} \;
@find . -name core -exec rm -fv {} \;
# subdirs are treated at the end
all install clean :: $(SUBDIRS)
$(descend-subdirs)
# if we have a Makefile.PL file then we're building a perl module
all install distclean:: $(if $(wildcard Makefile.PL),$(PERLMAKE))
$(if $(wildcard Makefile.PL), $(MAKE) -f $(PERLMAKE) $@)
Makefile.perl: Makefile.PL
$(PERL) $< $(PERLARGS) INSTALLDIRS=vendor
clean:: distclean
@rm -fv $(PERLMAKE)