-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.postamble
42 lines (38 loc) · 1.68 KB
/
Makefile.postamble
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
#
# Define rules
#
ifeq "WINDOWS" "$(OS)"
newer$(EXECUTABLE_EXT): readdir.o
endif
# RDW 04/15/1999 -- Added OFILE_DIR to a rule that needed it
# to complete successfully
$(PRODUCTS): %$(EXECUTABLE_EXT): $(notdir %.o)
ifeq "$(PLATFORM_TYPE)" "PDO_UNIX"
$(CC) -o $(SYMROOT)/$@ $(RC_CFLAGS) $(OFILE_DIR)/$+
else
$(CC) -o $(SYMROOT)/$@ $(RC_CFLAGS) $+
endif
VERS_SYSTEM_DIR = $(DSTROOT)$(SYSTEM_DEVELOPER_DIR)/Makefiles/VersioningSystems
VERS_SYSTEM_STUFF = next-cvs.make next-cvs_project_version.sh
INSTALLDIRS = $(DSTROOT)$(INSTALLDIR) $(VERS_SYSTEM_DIR)
install-resources: $(VERS_SYSTEM_STUFF)
$(SILENT) $(RM) -rf $(VERS_SYSTEM_DIR)
$(SILENT) $(MKDIRS) $(INSTALLDIRS)
$(CP) -p $(GLOBAL_RESOURCES) $(HELP_FILES) $(DSTROOT)$(INSTALLDIR)
ifdef CHOWN
$(CHOWN) -R $(INSTALL_AS_USER):$(INSTALL_AS_GROUP) $(DSTROOT)$(INSTALLDIR)
endif
$(CP) -p $(VERS_SYSTEM_STUFF) $(VERS_SYSTEM_DIR)
$(CHMOD) 555 $(VERS_SYSTEM_DIR)/next-cvs_project_version.sh
ifdef CHOWN
$(CHOWN) -R $(INSTALL_AS_USER):$(INSTALL_AS_GROUP) $(VERS_SYSTEM_DIR)
endif
$(RM) -f $(DSTROOT)/$(INSTALLDIR)/platform.make
$(ECHO) MAKEFILE_SOURCE = pb_makefiles >> $(DSTROOT)$(INSTALLDIR)/platform.make
$(ECHO) OS = $(OS) >> $(DSTROOT)$(INSTALLDIR)/platform.make
$(ECHO) PLATFORM_OS = $(PLATFORM_OS) >> $(DSTROOT)$(INSTALLDIR)/platform.make
$(ECHO) 'include $$(MAKEFILEPATH)/$$(MAKEFILE_SOURCE)/platform-variables.make' >> $(DSTROOT)$(INSTALLDIR)/platform.make
$(CHMOD) -R a-w $(INSTALLDIRS)
# symlink /usr/lib/arch_tool to point at /Developer/Makefiles/pb_makefiles/arch_tool, to keep HIToolbox and other Carbon projects happy
$(MKDIRS) $(DSTROOT)/usr/lib
$(CP) -p $(DSTROOT)$(INSTALLDIR)/arch_tool $(DSTROOT)/usr/lib/arch_tool