Magellan Linux

Annotation of /branches/mage-next/src/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2810 - (hide annotations) (download)
Wed Sep 3 11:58:06 2014 UTC (9 years, 8 months ago) by niro
File size: 2081 byte(s)
-added highest_magefile program
1 niro 2577 include ../Makefile.inc
2    
3 niro 2601 SUBDIRS = helper tools up2date
4 niro 2577
5     INSTALLDIRS = $(SUBDIRS:%=install-%)
6     UNINSTALLDIRS = $(SUBDIRS:%=uninstall-%)
7     CLEANDIRS = $(SUBDIRS:%=clean-%)
8    
9 niro 2603 FILES = common.functions.sh mage4.functions.sh smage2.functions.sh
10 niro 2577 MAGE_SCRIPTS = compressdoc create_desktop_app depwalker mkinfodir pkg_all_sources pkgbuild_dir
11 niro 2584 SBIN_SCRIPTS= env-rebuild etc-update mage magequery smage2
12 niro 2810 PROGS = vercomp highestver highest_magefile
13 niro 2577
14 niro 2809 common_SOURCES = package.c package.h
15     vercomp_SOURCES = vercomp.c $(common_SOURCES)
16     highestver_SOURCES = highestver.c $(common_SOURCES)
17 niro 2810 highest_magefile_SOURCES = highest_magefile.c $(common_SOURCES)
18 niro 2809
19 niro 2584 all: $(SUBDIRS) $(FILES) $(MAGE_SCRIPTS) $(SBIN_SCRIPTS) $(PROGS)
20 niro 2577 $(CHMOD) +x $(MAGE_SCRIPTS)
21     $(CHMOD) +x $(SBIN_SCRIPTS)
22    
23 niro 2809 vercomp: $(vercomp_SOURCES)
24     $(CC) $(vercomp_SOURCES) -o $@
25    
26     highestver: $(highestver_SOURCES)
27     $(CC) $(highestver_SOURCES) -o $@
28    
29 niro 2810 highest_magefile: $(highest_magefile_SOURCES)
30     $(CC) $(highest_magefile_SOURCES) -o $@
31    
32 niro 2577 install: $(INSTALLDIRS) all
33     $(INSTALLDIR) $(DESTDIR)/$(MAGELIBDIR)
34 niro 2604 $(INSTALLFILE) $(FILES) $(DESTDIR)/$(MAGELIBDIR)
35 niro 2577 $(INSTALLEXEC) $(MAGE_SCRIPTS) $(DESTDIR)/$(MAGELIBDIR)
36 niro 2584 $(INSTALLEXEC) $(PROGS) $(DESTDIR)/$(MAGELIBDIR)
37 niro 2577 $(INSTALLDIR) $(DESTDIR)/$(SBINDIR)
38     $(INSTALLEXEC) $(SBIN_SCRIPTS) $(DESTDIR)/$(SBINDIR)
39    
40     uninstall: $(UNINSTALLDIRS)
41 niro 2604 for i in $(FILES); do $(RM) $(DESTDIR)/$(MAGELIBDIR)/$${i}; done
42 niro 2577 for i in $(MAGE_SCRIPTS); do $(RM) $(DESTDIR)/$(MAGELIBDIR)/$${i}; done
43 niro 2584 for i in $(PROGS); do $(RM) $(DESTDIR)/$(MAGELIBDIR)/$${i}; done
44 niro 2577 for i in $(SBIN_SCRIPTS); do $(RM) $(DESTDIR)/$(SBINDIR)/$${i}; done
45     $(RMDIR) $(DESTDIR)/$(MAGELIBDIR)
46     $(RMDIR) $(DESTDIR)/$(SBINDIR)
47    
48     clean: $(CLEANDIRS)
49     $(RM) $(FILES)
50     $(RM) $(MAGE_SCRIPTS)
51     $(RM) $(SBIN_SCRIPTS)
52 niro 2584 $(RM) $(PROGS)
53 niro 2577
54     $(SUBDIRS):
55     $(MAKE) -C $@
56    
57     $(INSTALLDIRS):
58     $(MAKE) -C $(@:install-%=%) install
59    
60     $(UNINSTALLDIRS):
61     $(MAKE) -C $(@:uninstall-%=%) uninstall
62    
63     $(CLEANDIRS):
64     $(MAKE) -C $(@:clean-%=%) clean
65    
66     .PHONY: $(SUBDIRS)
67     .PHONY: $(INSTALLDIRS)
68     .PHONY: $(UNINSTALLDIRS)
69     .PHONY: $(CLEANDIRS)
70    
71     .PHONY: all install uninstall clean