~martin-decky/helenos/rcu

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Jiri Svoboda
  • Date: 2011-02-23 20:57:57 UTC
  • Revision ID: jiri@wiwaxia-20110223205757-2roj4h09oq88fqh7
Attempt at automatic building of release files. To do:
 * better naming
 * do we need any special tuning for release? (e.g., non-debug build)

Type 'make dist' in main source dir, this builds distribution files under dist/

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
CONFIG_MAKEFILE = Makefile.config
42
42
CONFIG_HEADER = config.h
43
43
 
44
 
.PHONY: all precheck cscope autotool config_auto config_default config distclean clean check
 
44
.PHONY: all precheck cscope autotool config_auto config_default config distclean clean check distfile dist
45
45
 
46
46
all: $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER)
47
47
        cp -a $(COMMON_HEADER) $(COMMON_HEADER_PREV)
63
63
        $(CHECK)
64
64
endif
65
65
 
 
66
# Autotool (detects compiler features)
 
67
 
66
68
$(COMMON_MAKEFILE): autotool
67
69
$(COMMON_HEADER): autotool
68
70
 
70
72
        $(AUTOTOOL)
71
73
        -[ -f $(COMMON_HEADER_PREV) ] && diff -q $(COMMON_HEADER_PREV) $(COMMON_HEADER) && mv -f $(COMMON_HEADER_PREV) $(COMMON_HEADER)
72
74
 
 
75
# Build-time configuration
 
76
 
73
77
$(CONFIG_MAKEFILE): config_default
74
78
$(CONFIG_HEADER): config_default
75
79
 
83
87
config: $(CONFIG_RULES)
84
88
        $(CONFIG) $<
85
89
 
 
90
# Distribution files
 
91
 
 
92
distfile: all
 
93
        $(MAKE) -C dist distfile
 
94
 
 
95
dist:
 
96
        $(MAKE) -C dist dist
 
97
 
 
98
# Cleaning
 
99
 
86
100
distclean: clean
87
 
        rm -f $(CSCOPE).out $(COMMON_MAKEFILE) $(COMMON_HEADER) $(COMMON_HEADER_PREV) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) tools/*.pyc tools/checkers/*.pyc
 
101
        rm -f $(CSCOPE).out $(COMMON_MAKEFILE) $(COMMON_HEADER) $(COMMON_HEADER_PREV) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) tools/*.pyc tools/checkers/*.pyc dist/HelenOS-*
88
102
 
89
103
clean:
90
104
        rm -fr $(SANDBOX)