summaryrefslogtreecommitdiff
path: root/Makerules.am
blob: 5106fef181327e8f4cd9abd7ac015ce626656568 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Makerules: how to do some things.

# Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.

# Permission to use, copy, modify and distribute this software and its
# documentation is hereby granted, provided that both the copyright
# notice and this permission notice appear in all copies of the
# software, derivative works or modified versions, and any portions
# thereof, and that both notices appear in supporting documentation.
#
# THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS
# "AS IS" CONDITION.  THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY
# LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
# USE OF THIS SOFTWARE.

#
# Building foo.h from foo.sym.
#

EXTRA_DIST += \
	gensym.awk
%.symc: %.sym gensym.awk
	$(AWK_V) $(AWK) -f $(word 2,$^) $< > $@
%.symc.o: %.symc config.h
	$(AM_V_CC) $(COMPILE) -S -x c -o $@ $<
%.h: %.symc.o
	$(AM_V_GEN) sed < $< > $@		\
	  -e 's/^[^*].*$$//'			\
	  -e 's/^[*]/#define/'			\
	  -e 's/mAgIc[^-0-9]*//'

# Makerules.mig: how to do some MIG-related things.
include Makerules.mig.am

#
# gzip files.
#

%.gz: %
	$(GZIP_V) $(GZIP) -9 < $< > $@

#
# strip files.
#

%.stripped: %
	$(STRIP) -o $@ $<

#
# Echo target.
#

echo-%:
	@echo '$* = `$($*)'\'