ifneq ($(NOPREPOST),1) LOCAL_INSTALL=local_install LOCAL_POSTINSTALL=local_postinstall endif LOCAL_CLEAN=local_clean DIRS = utils misc translate dialog tlmp modapi xconf askrunlevel netconf \ userconf fstab diajava lib main \ conf.files help.files images vpop3d modules diawxxt diawxgtk rpmfiles \ libmodules doc descriptions include rules.mak # preset info for gdebug dbg: dbgset -a. -b. -m/tmp/modules.dbg -r/tmp/ctrl.dbg -t/tmp/types.lst $(DIRS) typidx /tmp/types.lst /tmp/types.dbg ifeq ($(LINUXCONF_SUBREV),0) package-src: clean (cd ..; \ tar zcvf /x/xconf/linuxconf-$(PACKAGE_REV).src.tar.gz \ linuxconf-$(PACKAGE_REV)/. ) else package-src: clean (cd ..; \ ln -s linuxconf-$(LINUXCONF_REV) linuxconf-$(PACKAGE_REV) ; \ tar zcvf /x/xconf/linuxconf-$(PACKAGE_REV).src.tar.gz \ linuxconf-$(PACKAGE_REV)/. ; \ rm linuxconf-$(PACKAGE_REV) ) endif install.dir: mkdir -p $(RPM_BUILD_ROOT)/install $(BIN) $(SBIN) $(ETC) cp -R conf.files/install/. $(RPM_BUILD_ROOT)/install chmod +x $(RPM_BUILD_ROOT)/install/doinst.sh $(RPM_BUILD_ROOT)/install/uninstall_linuxconf.sh package: rm -fr /tmp/linuxconf-elf make NOPREPOST=1 RPM_BUILD_ROOT=/tmp/linuxconf-elf install.dir install strip package-elf package-nostrip: rm -fr /tmp/linuxconf-elf make NOPREPOST=1 RPM_BUILD_ROOT=/tmp/linuxconf-elf install.dir install package-elf # the tar must not contain conf.linuxconf because it will overwrite # the one in place after an upgrade. The install script will create it # anyway. package-elf: ( \ cd $(RPM_BUILD_ROOT)/ && \ tar zcvf /tmp/linuxconf-$(PACKAGE_REV).bin-$(BINFORM).tar.gz \ bin/linuxconf bin/remadmin \ usr/X11R6/bin/wxxt-linuxconf usr/lib/linuxconf \ install \ ) strip: strip $(RPM_BUILD_ROOT)/bin/linuxconf -strip -S $(RPM_BUILD_ROOT)/usr/lib/linuxconf/modules/*.so.* ANNOUNCE: ANNOUNCE.txt translate/sgml2flat @translate/sgml2flat $< $@ @rm -f $< ANNOUNCE*.html translate/sgml2flat: translate/sgml2flat.cc make -C translate sgml2flat clean_install: rm -fr $(LIB_LINUXCONF) local_install: @echo @echo Installing linuxconf in $(RPM_BUILD_ROOT)/usr/lib/linuxconf @echo The main utility is $(RPM_BUILD_ROOT)/bin/linuxconf @echo A bunch of symlinks are install in /bin and /sbin @echo @echo -n "Sleeping 4 seconds ..." @sleep 4 @echo @mkdir -p $(BIN) $(SBIN) $(ETC) local_postinstall: install.dir @rm -f help.files/sources/main/introweb.html @echo @echo Checking RC scripts @sh /install/doinst.sh install_for_rpm: clean_install mkdir -p $(BIN) $(SBIN) $(ETC) make NOPREPOST=1 install strip $(BIN)/linuxconf -strip -S $(LIB_LINUXCONF)/modules/*.so.* rm -fr $(LIB_LINUXCONF)/std rm -fr $(LIB_LINUXCONF)/debian mkdir $(LIB_LINUXCONF)/uninstall test -f $(ETC)/conf.linuxconf || touch $(ETC)/conf.linuxconf local_clean: rm -f `find . -name \*.bak -o -name DEADJOE -o -name \*~ -o -name core` publish-dropin: rm -fr /n/solucor/home/ftp/pub/linuxconf/dropins/redhat mkdir -p /n/solucor/home/ftp/pub/linuxconf/dropins/redhat (cd / \ && tar zcvf /n/solucor/home/ftp/pub/linuxconf/dropins/redhat/smb-dropin.tar.gz etc/linuxconf/control/smb \ && tar zcvf /n/solucor/home/ftp/pub/linuxconf/dropins/redhat/httpd-dropin.tar.gz etc/linuxconf/control/httpd \ ) RPMTOPDIR=/usr/src/redhat RPM=rpm buildrpm: buildspec buildsrc (unset LD_PRELOAD ; cd $(RPMTOPDIR)/SPECS && \ $(RPM) -vv -ba linuxconf-$(PACKAGE_REV).spec | tee /tmp/rpm.log) buildmyrpm: $(MAKE) RPM=myrpm RPMTOPDIR=/tmp/myrpm buildrpm buildmyspec: $(MAKE) RPM=myrpm RPMTOPDIR=/tmp/myrpm buildspec buildsrc build6.2: buildmyspec mv /tmp/myrpm/SOURCES/linuxconf-$(PACKAGE_REV).src.tar.gz \ /rh6.2/usr/src/redhat/SOURCES mv /tmp/myrpm/SPECS/linuxconf-$(PACKAGE_REV).spec /rh6.2/tmp buildspec: @rpmfiles/buildspec.sh $(PACKAGE_REV) $(RPMTOPDIR) $(RPMREV) PKGDIR=$(RPMTOPDIR)/SOURCES/linuxconf-$(PACKAGE_REV) buildsrc: rm -f main/linuxconf rm -fr $(PKGDIR) mkdir $(PKGDIR) find . ! -type d -a ! -name \*.o -a ! -name \*.os -a ! -name \*.a \ -a ! -name \*.bak -a ! -name \*.old \ -a ! -name \*.rej -a ! -name \*.orig \ | tar cf - --files-from - \ | dd bs=4000k \ | (cd $(PKGDIR) && tar xf -) (cd $(PKGDIR) && make clean && \ cd .. && \ tar zcf $(PKGDIR).src.tar.gz linuxconf-$(PACKAGE_REV)) rm -fr $(PKGDIR) install-helpwww: mkdir -p $(WWWBASE)/linuxconf/help.files/* rm -fr $(WWWBASE)/linuxconf/help.files/* cp -a help.files/sources/. $(WWWBASE)/linuxconf/help.files/. clean-newver: make -C modules clean rm -f askrunlevel/askrunlevel.o misc/module.o main/main.obt rm -f misc/linuxconf.o misc/linuxconf.os main/linuxconf.o make -C modules make -C misc make -C askrunlevel make -C main HEADLIST=dialog/dialog.h dialog/dialog.p dialog/dialog_def.h \ dialog/private_msg.h \ misc/dictionary.h \ misc/misc.h misc/sstring.h misc/configf.h misc/fviews.h misc/confdb.h \ misc/misc.p misc/module.h misc/popen.h misc/sstream.h \ misc/subsys.h misc/context.h misc/module_api.h \ netconf/daemoni.h translate/translat.h \ userconf/userconf.h userconf/userconf.p userconf/usercomng.h \ modapi/modapi.h modapi/modapi_def.h \ dialog/dialog.pe netconf/netconf.pe netconf/netconf_def.h \ dialog/modregister.h dialog/cmdsock.h \ fstab/fstab.h fstab/fstab.p diajava/proto.h diajava/protorev.h \ diajava/diajava.h diajava/diajava.p \ tlmp/tlmpdia/tlmpdia.h tlmp/tlmpdia/tlmpdia.p \ tlmp/tlmplib/tlmplib.h tlmp/tlmplib/tlmplib.p \ tlmp/tlmpmod/tlmpmod.h tlmp/tlmpmod/tlmpmod.p \ tlmp/tlmpnet/tlmpnet.h tlmp/tlmpnet/tlmpnet.p install-devel: rm -fr $(INCLUDE)/linuxconf mkdir -p $(INCLUDE)/linuxconf $(INCLUDE)/linuxconf/module_apis mkdir -p $(INCLUDE)/linuxconf/libmodules cp $(HEADLIST) $(INCLUDE)/linuxconf cp -a modules/module_apis/. $(INCLUDE)/linuxconf/module_apis cp -a libmodules/*/*.h libmodules/*/*.p $(INCLUDE)/linuxconf/libmodules/. rm -fr $(USRLIB)/liblinuxconf.a $(USRLIB)/linuxconf-devel rm -f $(USRLIB)/liblinuxconf.a ar cr $(USRLIB)/liblinuxconf.a misc/*.o dialog/*.o \ diajava/diajava.o diajava/_dict.o modapi/modapi.o modapi/internal.o \ tlmp/tlmpdia/*.o tlmp/tlmplib/*.o \ translate/translat.o translate/notload.o (cd messages && ./install-devel.sh $(USRLIB)/linuxconf-devel) cp translate/msgcomp translate/msgscan \ translate/msgclean translate/msgupd \ $(USRLIB)/linuxconf-devel/ cp -a builder/templates $(USRLIB)/linuxconf-devel/. cp -a builder/module.rpmspec $(USRLIB)/linuxconf-devel/. cp -a builder/filterspec.sh $(USRLIB)/linuxconf-devel/. cp -a builder/ccrules.mak $(USRLIB)/linuxconf-devel/. sed s/XXXLINUXCONFREVXXX/$(LINUXCONF_REV)/ builder/rules.mak \ | sed s/XXXLINUXCONFSUBREVXXX/$(LINUXCONF_SUBREV)/ \ | sed s/XXXLINUXCONFSUBSUBREVXXX/$(LINUXCONF_SUBSUBREV)/ \ > $(USRLIB)/linuxconf-devel/rules.mak cp -a builder/syncmsg.sh $(USRLIB)/linuxconf-devel/. cp -a modules/setupmod.sh $(USRLIB)/linuxconf-devel/. cp -a modules/stdmod.mak $(USRLIB)/linuxconf-devel/. cp -a modules/copydir.sh $(USRLIB)/linuxconf-devel/. cp -a help.files/scripts/sgml_2_help.sh $(USRLIB)/linuxconf-devel/. cp -a builder/install_helps.sh $(USRLIB)/linuxconf-devel/. install-lib: make -C lib rm -fr $(USRLIB)/linuxconf-lib mkdir -p $(USRLIB)/linuxconf-lib/help.eng cp $(USRLIB)/linuxconf/help.eng/linuxconf*.eng $(USRLIB)/linuxconf-lib/help.eng install -m755 lib/liblinuxconf.so.$(PACKAGE_REV) $(USRLIB)/liblinuxconf.so.$(PACKAGE_REV) ln -sf liblinuxconf.so.$(PACKAGE_REV) $(USRLIB)/liblinuxconf.so.$(LIB_REV) ln -sf liblinuxconf.so.$(PACKAGE_REV) $(USRLIB)/liblinuxconf.so publish_doc: make -C misc doc make -C dialog doc make -C userconf doc make -C doc doc local_doc: make WWWBASE=$(HOME)/n/html/linuxconf/ publish_doc all-index: make -C misc index make -C dialog index make -C netconf index make -C userconf index # Apply "make msg" in all directory with a *.m file all-msg: for f in `find . -name \*.m`; do make -C `dirname $$f` msg; done