File: Makefile.postamble

package info (click to toggle)
gnustep-base 1.31.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,580 kB
  • sloc: objc: 239,446; ansic: 36,519; cpp: 122; sh: 112; makefile: 100; xml: 32
file content (174 lines) | stat: -rw-r--r-- 5,569 bytes parent folder | download | duplicates (2)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
#  -*-makefile-gmake-*-
#  Makefile.postamble
#
#  Copyright (C) 1997 Free Software Foundation, Inc.
#
#  Author: Scott Christley <scottc@net-community.com>
#
#  This file is part of the GNUstep Base Library.
#
#  This library is free software; you can redistribute it and/or
#  modify it under the terms of the GNU Lesser General Public
#  License as published by the Free Software Foundation; either
#  version 2 of the License, or (at your option) any later version.
#
#  This library is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
#  Library General Public License for more details.
#
#  If you are interested in a warranty or support for this source code,
#  contact Scott Christley at scottc@net-community.com
#
#  You should have received a copy of the GNU Lesser General Public
#  License along with this library; see the file COPYING.LIB.
#  If not, write to the Free Software Foundation,
#  31 Milk Street #960789 Boston, MA 02196 USA.

#
#   Makefile.postamble
#
#   Project specific makefile rules
#
#   Uncomment the targets you want.
#   The double colons (::) are important, do not make them single colons
#   otherwise the normal makefile rules will not be performed.
#

# Things to do before compiling
before-all::  $(GENERATED_HFILES)

# Things to do after compiling
after-all:: Info-gnustep.plist

# Things to do before installing
#before-install::

# Things to do after installing
#
ifeq ($(OBJC2RUNTIME),0)
after-install::
	$(MKDIRS) $(GNUSTEP_HEADERS)/ObjectiveC2
	$(MKDIRS) $(GNUSTEP_HEADERS)/ObjectiveC2/objc
	for file in $(OBJECTIVEC2_HEADERS); do \
	  $(INSTALL_DATA) ../Headers/ObjectiveC2/objc/$$file \
	    $(GNUSTEP_HEADERS)/ObjectiveC2/objc/$$file ; \
	done
endif
after-install::
ifneq ($(base),no)
	$(MKDIRS) $(GNUSTEP_HEADERS)/CoreFoundation
	for file in $(COREFOUNDATION_HEADERS); do \
	  $(INSTALL_DATA) ../Headers/CoreFoundation/$$file \
	  $(GNUSTEP_HEADERS)/CoreFoundation/$$file ; \
	done
endif
	$(MKDIRS) $(GNUSTEP_HEADERS)/GNUstepBase
	for file in $(GNUSTEPBASE_HEADERS); do \
	  $(INSTALL_DATA) ../Headers/GNUstepBase/$$file \
	  $(GNUSTEP_HEADERS)/GNUstepBase/$$file ; \
	done
	$(INSTALL_DATA) $(GNUSTEP_TARGET_DIR)/GNUstepBase/GSConfig.h \
	  $(GNUSTEP_HEADERS)/GNUstepBase/GSConfig.h
	if [ "$(DESTDIR)" = "" ]; then \
	  services=/etc/services; \
	  if [ "`$(WHOAMI)`" != root ]; then \
	      echo "WARNING: Please add the following lines to $$services"; \
	      echo "gdomap 538/tcp # GNUstep distrib objects"; \
	      echo "gdomap 538/udp # GNUstep distrib objects"; \
	  else \
	    if [ "`fgrep gdomap $$services 2>/dev/null`" = "" ]; then \
	      echo "GNUstep addons for /etc/services written to $$services"; \
	      set -x; \
	      echo "gdomap 538/tcp # GNUstep distrib objects" >> $$services; \
	      echo "gdomap 538/udp # GNUstep distrib objects" >> $$services; \
	    fi; \
	  fi; \
	fi

# Things to do before uninstalling
ifeq ($(OBJC2RUNTIME),0)
before-uninstall::
	for file in $(OBJECTIVEC2_HEADERS); do \
	  rm -f $(GNUSTEP_HEADERS)/ObjectiveC2/objc/$$file ; \
	done
endif

before-uninstall::
	for file in $(GNUSTEPBASE_HEADERS); do \
	  rm -f $(GNUSTEP_HEADERS)/GNUstepBase/$$file ; \
	done
	rm -f $(GNUSTEP_HEADERS)/$(GNUSTEP_TARGET_DIR)/GNUstepBase/GSConfig.h

# Things to do before cleaning
# before-clean::

# Things to do after cleaning
after-clean::
	rm -f libgnustep-base.def Info-gnustep.plist

# Things to do before distcleaning
# before-distclean::

# Things to do after distcleaning
after-distclean::
	rm -f $(GNUSTEP_TARGET_DIR)/config.h
	rm -f $(GNUSTEP_TARGET_DIR)/GNUstepBase/GSConfig.h
#	rm -rf $(GNUSTEP_TARGET_DIR)

# Things to do before checking
# before-check::

# Things to do after checking
# after-check::

dynamic-load.h: ../config.status
	rm -f dynamic-load.h
	cp $(DYNAMIC_LINKER)-load.h dynamic-load.h

#
# The following header files are specific to a target, so to enable multiple
# builds in the same directory, we copy them to a target-specific subdirectory
# which will be found by the compiler first when compiling for that target
#
$(GNUSTEP_TARGET_DIR)/config.h: ../config.status
	$(MKDIRS) $(GNUSTEP_TARGET_DIR)
	-cp $(HEADER_DIR_BASE)/config.h $(GNUSTEP_TARGET_DIR)
	-touch $(GNUSTEP_TARGET_DIR)/config.h

$(GNUSTEP_TARGET_DIR)/GNUstepBase/GSConfig.h: ../config.status
	$(MKDIRS) $(GNUSTEP_TARGET_DIR)/GNUstepBase
	-cp $(HEADER_DIR_BASE)/GSConfig.h $(GNUSTEP_TARGET_DIR)/GNUstepBase
	-touch $(GNUSTEP_TARGET_DIR)/GNUstepBase/GSConfig.h

#
# Files where optimisation breaks the code!
# These have to filter the optimisation flag out.
#
libgnustep-base-entry.m_FILE_FILTER_OUT_FLAGS = -O%   # gcc 4.4 on mingw

#
# Make list of class names for DLL exports. Uses the actual classes from
# the .o files, so it should really have everything needed.
#
libgnustep-base.def: $(OBJ_FILES_TO_LINK)
	rm -f $@
	rm -f _tmp.def
	cat win32-def.top > $@
	nm $^ | grep '^........ [TR] _' | sed 's/[^_]*_//' > _tmp.def
	cat _tmp.def | grep "_class_name_" >> $@
	rm -rf _tmp.def

#
# Make an Info.plist since libraries don't have these normally
#
Info-gnustep.plist: ../Version
	$(ECHO_CREATING)(echo "{"; \
	echo "  NSExecutable = \"gnustep-base\";"; \
	echo "  NSPrincipalClass = \"NSObject\";"; \
	echo "  GSBundleShortVersionString = \"$(VERSION)\";"; \
	echo "  GSBundleVersion = $(VERSION_NUMBER);"; \
	echo "  CFBundleShortVersionString = \"$(VERSION)\";"; \
	echo "  CFBundleVersion = $(VERSION_NUMBER);"; \
	echo "}") > $@$(END_ECHO)