home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep 4.2J (Developer)
/
os42jdev.iso
/
NextDeveloper
/
Makefiles
/
pb_makefiles
/
reinstall.make
< prev
next >
Wrap
Text File
|
1997-01-02
|
2KB
|
43 lines
#
# reinstall.make
#
# Rules for rebuilding an installed set of products for Windows, were we can
# not strip binaries after they are linked. Instead, we clone all the object
# files and strip them individually, creating a new set of directories to link from.
#
STRIPNAME = STRIPPED
GARBAGE += $(OBJROOT)/$(STRIPNAME) $(SYMROOT)/$(STRIPNAME)
ifeq "$(REINSTALLING)" "YES"
ifneq "$(STRIP_ON_INSTALL)" "NO"
STRIPO = $(NEXT_ROOT)/NextDeveloper/Libraries/gcc-lib/$(ARCH)/StabsToCodeview.exe
STRIPDIRS = $(OBJROOT)/$(STRIPNAME) $(SYMROOT)/$(STRIPNAME)
CLONE_AND_STRIP = $(FIND) . '(' -name $(STRIPNAME) -prune ')' \
-o '(' -type d -exec $(MKDIRS) $(STRIPNAME)/'{}' ';' ')' \
-o '(' -name '*.exe' -o -name '*.dll' -o -name '*.lib' -name 'lib*.a' ')' \
-o '(' -name '*.EXE' -o -name '*.DLL' -o -name '*.LIB' -name 'LIB*.A' ')' \
-o '(' -name '*.ofileList' -o -name '*.ofilelist' -o -name '*.lastbuildtime.*' ')' \
-o '(' -name '*.o' -exec $(STRIPO) -g0 '{}' -o $(STRIPNAME)/'{}' ';' ')' \
-o -exec $(CP) -p '{}' $(STRIPNAME)/'{}' ';'
.PHONY: clone_and_strip reinstall-stripped
clone_and_strip:
$(MKDIRS) $(OBJROOT)/$(STRIPNAME) $(SYMROOT)/$(STRIPNAME)
cd $(OBJROOT) && $(CLONE_AND_STRIP)
cd $(SYMROOT) && $(CLONE_AND_STRIP)
reinstall-stripped: clone_and_strip
$(SILENT)if $(ECHO) $(OBJROOT) | $(GREP) -v $(STRIPNAME) $(BURY_STDERR) ; then \
cmd='$(MAKE) install OBJROOT=$(OBJROOT)/$(STRIPNAME) SYMROOT=$(SYMROOT)/$(STRIPNAME) DEBUG_SYMBOLS_CFLAG= SKIP_EXPORTING_HEADERS=YES' ; \
$(ECHO) $$cmd ; $$cmd ; \
fi
endif
endif